This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Executable shared object
- From: Singh Pradyuman-R50282 <Pradyuman dot Singh at motorola dot com>
- To: "'Eljay Love-Jensen'" <eljay at adobe dot com>, Singh Pradyuman-R50282 <Pradyuman dot Singh at motorola dot com>, "'Paolo Massimino'" <paolo dot massimino at loquendo dot com>, gcc-help at gcc dot gnu dot org
- Date: Wed, 16 Jul 2003 18:48:24 +0530
- Subject: RE: Executable shared object
Hi Eljay,
I didnt want to put code which uses the shared lib itself inside it, anyway, but yes it would work,
you just need to use -dy instead of -G in ld (-G overrides -dy and makes non-executable .so) ie.,
ld -o libexpm.so exp1.o exp2.o exp3.o libuseso.o -dy -ldl -lc
Thanks & regards,
Pradyuman.
-----Original Message-----
From: Eljay Love-Jensen [mailto:eljay@adobe.com]
Sent: Wednesday, July 16, 2003 5:47 PM
To: Singh Pradyuman-R50282; 'Paolo Massimino'; gcc-help@gcc.gnu.org
Subject: RE: Executable shared object
Hi Pradyuman,
That doesn't quite do what Paolo is asking for.
Why not just put libuseso.c directly in the libexpm.so file (that would do what Paolo wants)?
gcc -fPIC -c exp1.c exp2.c exp3.c libuseso.c
ld -G -o libexpm.so exp1.o exp2.o exp3.o libuseso.o -dy -ldl -lc
Then the problem becomes "Hey, that doesn't work!"
--Eljay