I can't find any similar option that would include all the function names into the final release binary. Or does clang
do it by default?
DIFFERENCE BETWEEN g++ & gcc g++ is used to compile C++ program. gcc is used to compile C program.
Clang is much faster and uses far less memory than GCC. Clang aims to provide extremely clear and concise diagnostics (error and warning messages), and includes support for expressive diagnostics. GCC's warnings are sometimes acceptable, but are often confusing and it does not support expressive diagnostics.
Clang is designed to provide a frontend compiler that can replace GCC. Apple Inc. (including NeXT later) has been using GCC as the official compiler.
The correct answer to this question is -Wl,-export_dynamic
and not -Wl,--export-dynamic
.
-Wl,--export-dynamic
is only correct if you are using the GNU linker on ELF platforms.
This question is about OS X.
Source: http://www.opensource.apple.com/source/ld64/ld64-236.3/src/ld/Options.cpp
...
else if ( strcmp(arg, "-export_dynamic") == 0 ) {
fExportDynamic = true;
}
...
At least clang 3.3 seems to support -rdynamic
though neither clang --help
nor the manpage documents it. (If you are on OSX, -rdynamic isn't needed)
gcc -rdynamic
says "-rdynamic
Pass the flag --export-dynamic to the ELF linker, on targets that support it."
So clang should also be able to do the same with -Wl,--export-dynamic
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With