问题
Like the question says: We are building on Linux using the GNU linker, and on Solaris using the solaris ld
. GNU ld
supports the --export-dynamic
flag, which:
When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time.
What is the equivalent to this flag using the solaris linker? Is there an equivalent?
回答1:
The Sun Studio linker (ld
), by default, exports all symbols.
回答2:
You can find the complete reference for the Sun linker on docs.sun.com. Search for the "Linker and Libraries Guide". By "all symbols" you mean all global symbols, right? C file-static symbols are not promoted to global right? I don't think that would work.
来源:https://stackoverflow.com/questions/596076/solaris-linker-equivalent-to-the-gnu-ld-export-dynamic-flag