4 Commits

Author SHA1 Message Date
Christopher Cole
2e05d70302
Handle the case where ehdr.e_phnum > 0xffff
If the number of segments is greater than or equal to PN_XNUM (0xffff),
e_phnum is set to PN_XNUM, and the actual number of program header table
entries is contained in the sh_info field of the section header at index 0.

The phnum.m68k.so is a sample object file that tests this code path but then
actually only has 1 segment - it just indirects phnum through shdr0.
2022-11-10 13:36:58 -08:00
Christopher Cole
33e3435a7f
Add sample object with with > 0xff00 section headers
Also add unit tests that we properly parse e_shnum and e_shstrndx out of
shdr0 in that case.
2022-11-09 16:04:28 -08:00
Christopher Cole
dd8e9c7814
Add some sample objects for various architectures 2022-11-07 14:54:24 -08:00
Christopher Cole
7672d5cf93
Rename sample object files used in tests to be more descriptive 2022-11-06 18:54:41 -08:00