Files
2018-11-06 09:15:36 +00:00
..
2018-11-06 09:15:36 +00:00
2018-11-06 09:15:36 +00:00
2018-11-06 09:15:36 +00:00
2018-11-06 09:15:36 +00:00
2018-11-06 09:15:36 +00:00
2018-11-06 09:15:36 +00:00
2018-11-06 09:15:36 +00:00

sstrip is a small utility that removes the contents at the end of an
ELF file that are not part of the program's memory image.

Most ELF executables are built with both a program header table and a
section header table. However, only the former is required in order
for the OS to load, link and execute a program. sstrip attempts to
extract the ELF header, the program header table, and its contents,
leaving everything else in the bit bucket. It can only remove parts of
the file that occur at the end, after the parts to be saved. However,
this almost always includes the section header table, along with a few
other sections that are not involved in program loading and execution.

It should be noted that most programs that work with ELF files are
dependent on the section header table as an index to the file's
contents. Thus, utilities such as gdb and objdump will often have
limited functionality when working with an executable with no section
header table. Some other utilities may refuse to work with them at
all.

sstrip is at heart a very simple program. It depends upon the common
practice of putting the parts of the file that contribute to the
memory image at the front, and the remaining material at the end. This
permits it to discard the latter material without affecting file
offsets and memory addresses in what remains. Of course, the ELF
standard permits files to be organized in almost any order, so if a
pathological linker decided to put the program segment header table at
the end of the file, sstrip would be unable to remove anything.