[oi-dev] What is the equivalent for GNU ld's --export-dynamic?

Bob Friesenhahn bfriesen at simple.dallas.tx.us
Wed Mar 24 16:03:32 UTC 2021


On Wed, 24 Mar 2021, cretin1997 via oi-dev wrote:
>
> I currently remove the option because I don't know the equivalent for Sun's ld. This allowed the compiler to successfully generate a shared library file but I didn't test to see if this shared library even work or not. I think better ask first before actually push the changes. Yes, of course I'm using git, in case any of you ask me about that.

Do you actually need this option?  This option enables shared 
libraries to resolve symbols from the program (e.g. using 
dlopen(),dlsym()) which loaded them.  It also causes the executable to 
expose all of its extern symbols, which will make the program more 
bloated, and likely less optimized.

Solaris and modern Linux defaults are different regarding default 
symbol visibility.  Linux has become more restrictive.

Bob
-- 
Bob Friesenhahn
bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt



More information about the oi-dev mailing list