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

微笑、不失礼 提交于 2019-12-04 19:23:11

问题


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 ASLR need this information? If not, why keep them around in the first place?

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


回答1:


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.



来源:https://stackoverflow.com/questions/14175040/effects-of-removing-all-symbol-table-and-relocation-information-from-an-executab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!