Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Effects of removing all symbol table and relocation information from an executable?

Compilation using gcc -s and Unix strip remove all symbol table and relocation information from an executable (making it smaller in size).

Could this ever affect the functioning of the executable? Do some operating systems which perform Address Space Layout Randomization (ASLR) need this information? If not, why keep them around in the first place?

A slightly-detailed overview of the above would be helpful.

like image 689
Anirudh Ramanathan Avatar asked Jan 05 '13 18:01

Anirudh Ramanathan


1 Answers

It seems pretty clear that removing relocation information would interfere with ASLR.

However, I've taken a look at man strip on a couple of my systems, and none of them suggest that strip does (or indeed can?) remove relocation information. It is mainly about removing debugging symbols.

like image 60
NPE Avatar answered Nov 11 '22 21:11

NPE