Kouros
Kouros

Reputation: 361

choose what symbols to export to avoid use of rdynamic option

Hello my application is loading a shared library using dlopen. The library needs functions from the application, so I compliled certain sources from the application with the rdynamic option. That means all symbols from that source are exported to the symbol table. My question is: Is it possible to export only certain functions?

Upvotes: 0

Views: 272

Answers (1)

Konstantin Vladimirov
Konstantin Vladimirov

Reputation: 7009

Consider using gold linker instead of ld. It has --export-dynamic-symbol option, which does the exact thing you want.

AFAIC there is no such support for ld.

Upvotes: 1

Related Questions