I've noticed that strip removes ELF sections, such as .symtab and .strtab, but is there a way to force it to remove the .shstrtab section as well? I already tried the -R option but it didn't work. Strip just exits as if nothing happened. The current strip version is 2.30
1 Answer
If you are using the standard ELF tools, the functionality you asked for is in the mcs program that is a hard link to strip..
Use:
mcs -d -n .shstrtab <object-file-name>
man strip, the options-R <section name>or--remove-section=<section name>look promising. Did you already try them? If you did, did they not work, or were they unsuitable for some other reason?strip --versionoutput could be useful too. These comments are not permanent and will be deleted after a while.