#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
> 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.
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.