This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Exporting symbols from static binary?


Sam Lantinga <slouken@devolution.com> writes:

|> Linux, x86:
|> 
|> We are trying to build a statically linked binary which still exports
|> symbols to shared objects it loads dynamically via dlopen().

You can't do that.  Static binaries have no dynamic symbol table, as you
have already found out.

|> As a side note, if for some reason two versions of libc are linked, either
|> explicitly via -lc,/usr/lib/libc.a, or implicitly by the dependencies of
|> the shared libraries the binary is linked with, then the resulting binary
|> will crash with a segmentation fault.

Then don't do that.  But if -lc causes two different versions of libc to
be linked in then your installation is broken somehow.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.cs.uni-dortmund.de                      completely different"
schwab@gnu.org