Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why does the program work after removing the symbol information?

I made one SO file and compiled it with a compile option called "-Xlinker –strip-all " to counter any reverse engineering (use clang).

Thanks to this, most of the symbols of functions other than functions directly exposed to the outside do not appear (objdump -TC test.so).
The question is, if a symbol is deleted like this, it should not be used inside the program, so I think it is normal.
What am I missing?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You’re right, debugging symbols aren’t needed by the program itself to execute; the linker computes (and therefore knows at link-time) what the memory-address of each function/global-variable/etc will be at run-time, so it can just place that memory-address directly into the executable where necessary.

The symbols are there for a debugger to use, to make the debugging output easier for a human (or a debugging tool) to use and understand.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading