Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22475

How can I keep a symbol during gcc strip?

$
0
0

Using arm-linux-gnueabi-gcc, I'm working with a shared object that has an undefined reference to "main". I'm using dlopen() to open this library. However, when my program is compiled with "-Wl,-s", the symbol main is removed, which causes dlopen() to fail with an undefined symbol "main".

In gcc, is there any way I can perform a strip, but keep the symbol main?

Edit: even better, can I put just the symbol "main" in the dynamic section (similar to -rdynamic)?


Viewing all articles
Browse latest Browse all 22475

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>