#598899 ELF: Section headers are not mandatory

Package:
ht
Source:
ht
Description:
Viewer/editor/analyser (mostly) for executables
Submitter:
Celelibi
Date:
2010-10-30 20:09:02 UTC
Severity:
normal
#598899#5
Date:
2010-10-02 22:36:25 UTC
From:
To:
Hello,

In ELF files, section headers are not mandatory. The sstrip tool [1]
remove a few things strip left out, including section headers. The
output file is still a valid ELF and is still runnable by Linux.
Howerver, hte thows a "Zero count for section headers" error when trying
to open a such file.

All I did is comment out "test and thow" instruction in file htelf.cc at
lines 155 and 201 to make it almost works. ("elf/image" view is not
accessible).

regards,
Celelibi

[1] http://www.muppetlabs.com/~breadbox/software/elfkickers.html

#598899#10
Date:
2010-10-03 00:21:54 UTC
From:
To:
Here is a patch (a bit more clean than just commenting out the check)
that will allow ht to work on ELF files without sections.


Regards,
Celelibi

#598899#15
Date:
2010-10-30 20:04:48 UTC
From:
To:
Here is a patch that allow the elf/image view on an ELF file without section.

Celelibi