Re: Compiling dynamic library to use with dlopen()
From: Gary R. Hook (nospam_at_nospammers.net)
Date: 05/20/03
- Next message: Wladimir Mutel: "Physical partition size for 72GB-disk - ?"
- Previous message: Gereon Wenzel: "Re: identify AIX software on tape"
- In reply to: Barney: "Re: Compiling dynamic library to use with dlopen()"
- Next in thread: Barney: "Re: Compiling dynamic library to use with dlopen()"
- Reply: Barney: "Re: Compiling dynamic library to use with dlopen()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 20 May 2003 13:55:21 GMT
Barney wrote:
> Hemant Shah <shah@typhoon.xnet.com> wrote in message news:<ba34ks$h6a$1@flood.xnet.com>...
>
>>ld -G -T512 -H512 -esomeFunction -odynlink3.sl dynlink3.o
Don't use -T512 and -H512. It's unnecessary on current levels of AIX,
and wastes space.
Always, always, _always_ (did I say "always"?) list system libs when
building modules on AIX. Our libraries contain both static and dynamic
archive members, some of which you may need at link time.
You should not use -G without building your main app with -brtl, if
you have symbols that are runtime resolved. In this example, I'm
referring to printf(). Unless of course, you've architected the
module to work both with and without runtime linking.
>>I tried -brtl and -ldl options but still get same error. How do I compile
>>the above code properly.
The dl routines are in libc now; libdl is no longer required.
> The -e option not only does not export the function someFunction, it
> actually prevents it being exported, even if you use the -bexpall
> option.
Incorrect. -e only specifies the entry point, which can also (or not)
be an exported symbol.
I would suggest reading up on AIX linking at
http://www.ibm.com/servers/esdd/pdfs/aix_ll.pdf
-- Gary R. Hook / AIX PartnerWorld for Developers / These opinions are MINE ________________________________________________________________________
- Next message: Wladimir Mutel: "Physical partition size for 72GB-disk - ?"
- Previous message: Gereon Wenzel: "Re: identify AIX software on tape"
- In reply to: Barney: "Re: Compiling dynamic library to use with dlopen()"
- Next in thread: Barney: "Re: Compiling dynamic library to use with dlopen()"
- Reply: Barney: "Re: Compiling dynamic library to use with dlopen()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]