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
Asked
Active
Viewed 1,626 times
2
ctrl-alt-delor
- 27,473
- 9
- 58
- 102
Trey
- 85
- 8
-
2Welcome to Unix&Linux SE! With a quick glance to `man strip`, the options `-R
` or `--remove-section= – telcoM May 20 '18 at 07:09` look promising. Did you already try them? If you did, did they not work, or were they unsuitable for some other reason? -
Please edit that information into your actual question, as it is rather important for understanding your problem. `strip --version` output could be useful too. These comments are not permanent and will be deleted after a while. – telcoM May 20 '18 at 07:18
1 Answers
2
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>
schily
- 18,806
- 5
- 38
- 60