Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Entry point not found: __start

781 views
Skip to first unread message

POC

unread,
Oct 21, 2002, 5:47:08 PM10/21/02
to
New to AIX. I'm compiling to create a simple shared library from the
following code stored in a file called testing.c, on AIX 5.1:

#include <stdio.h>
void sayHello() {
printf ("Hello world!!!!\n");
}

I'm trying to put the output in a shared library called libtesting.so.
However the gcc compiles complains thusly:

ld: 0711-327 WARNING: Entry point not found: __start
ld: 0711-244 ERROR: No csects or exported symbols have been saved.

The Makefile looks like:

testing: testing.o
gcc -Wl,-G,-brtl -o ./lib/libtesting.so testing.o -fPIC
-bE:testing.exp -bM:SRE -bnoentry

My testing.exp file looks like:

#! ./lib/libtesting.o
sayHello


What's going on?

-- POC

Paul Pluzhnikov

unread,
Oct 22, 2002, 1:05:00 AM10/22/02
to
ces...@saic.com (POC) writes:

> testing: testing.o
> gcc -Wl,-G,-brtl -o ./lib/libtesting.so testing.o -fPIC
> -bE:testing.exp -bM:SRE -bnoentry

Should be '-Wl,-bE:... -Wl,-bM:SRE -Wl,-bnoentry'

From "info gcc":

`-b MACHINE'
The argument MACHINE specifies the target machine for compilation.
This is useful when you have installed GCC as a cross-compiler.

> My testing.exp file looks like:
>

> #! ./lib/libtesting.o <<< this is most likely wrong,
<<< should be libtesting.so,
<<< but I am not positive. Gary?

Do yourself a favor, read this before continuing (AIX shared
libraries don't resemble any other UNIX):

http://www-1.ibm.com/servers/esdd/pdfs/aix_ll.pdf

Cheers,
--
In order to understand recursion you must first understand recursion.

Message has been deleted

Ahmad Noori

unread,
Oct 22, 2002, 6:09:25 PM10/22/02
to
I am building a library and a program that calls a function in the
library. I was able to build the library without any problems but
when I build the app, I get the following message:

ld: 0711-327 WARNING: Entry point not found: __start

And then when I try to run my app, I get the following error message:

exec(): 0509-036 Cannot load program ./testit because of the following
errors:
0509-151 The program does not have an entry point or
the o_snentry field in the auxiliary header is
invalid.
0509-194 Examine file headers with the 'dump -ohv' command.

This is the command that I use to build my lib:

testing: testing.o
gcc -o libtesting.so testing.o -Wl,-bE:libtesting.exp
-Wl,-bM:SRE -Wl,-bnoentry
testing.o: testing.c
gcc -o testing.o -c testing.c

And this is how I build my app:

gcc -o testit testit.c /usr/SSAF/ssaf-v13/builds/aix/libtesting.so
-L/usr/SSAF/ssaf-v13/builds/aix –Wl,-brtl

I get the following warring message: ld: 0711-327 WARNING: Entry
point not found: __start

This is what I have in my libtesting.exp:
#! /usr/SSAF/ssaf-v13/builds/aix/libtesting.so
sayHello

I went through this doc
http://www-1.ibm.com/servers/esdd/pdfs/aix_ll.pdf and I even tried
example 4 and I got the same message as my app. Any ideas anyone…


Thanks

ScriptOmatic

unread,
Oct 22, 2002, 8:17:38 PM10/22/02
to
Ahmad Noori wrote:
>
> I am building a library and a program that calls a function in the
> library. I was able to build the library without any problems but
> when I build the app, I get the following message:
>
> ld: 0711-327 WARNING: Entry point not found: __start
>
> And then when I try to run my app, I get the following error message:
>
> exec(): 0509-036 Cannot load program ./testit because of the following
> errors:
> 0509-151 The program does not have an entry point or
> the o_snentry field in the auxiliary header is
> invalid.
> 0509-194 Examine file headers with the 'dump -ohv' command.
>
> This is the command that I use to build my lib:
>
> testing: testing.o
> gcc -o libtesting.so testing.o -Wl,-bE:libtesting.exp
> -Wl,-bM:SRE -Wl,-bnoentry
> testing.o: testing.c
> gcc -o testing.o -c testing.c
>
> And this is how I build my app:
>
> gcc -o testit testit.c /usr/SSAF/ssaf-v13/builds/aix/libtesting.so
> -L/usr/SSAF/ssaf-v13/builds/aix -Wl,-brtl

>
> I get the following warring message: ld: 0711-327 WARNING: Entry
> point not found: __start
>
> This is what I have in my libtesting.exp:
> #! /usr/SSAF/ssaf-v13/builds/aix/libtesting.so
> sayHello
>
> I went through this doc
> http://www-1.ibm.com/servers/esdd/pdfs/aix_ll.pdf and I even tried
> example 4 and I got the same message as my app. Any ideas anyone?
>
> Thanks

I hope this is not too obvious,
does the libarary have a "start()" function? Or possible an
_start() function? For dynamic libraries, AFAIK, each requires
a _start(), _init(), or some such entry point, depending on the vendor.

--
http://ftp.opensysmon.com is a shell script archive site with an
opensource system monitoring and network monitoring software package.
Many platforms are supplied already compiled.

Message has been deleted
Message has been deleted
0 new messages