4 Commits

Author SHA1 Message Date
Philip Craig d6094add33 build/elf: fix sh_info for SHT_DYNSYM section
It's possible to have local symbols in the dynamic symbol table,
and sh_info should count these, the same as it already does
for SHT_SYMTAB.

Also be sure to exclude these from the GNU hash table.
2024-03-25 16:02:26 +10:00
Philip Craig bafb1c3d3e build/elf: fix sh_size for attribute sections 2024-03-25 16:02:26 +10:00
Philip Craig f3432e9807 elf: allow for absence of dynstr (#646)
.dynstr doesn't need to be present if there are no dynamic strings.

- handle section index 0 in read::elf::SectionTable::strings
- don't require .dynstr when writing if there are no strings
- don't print name of symbol index 0 in readobj example
2024-03-19 14:56:51 +10:00
Philip Craig 67d53c27f7 build/elf: improve handling of sh_offset for SHT_NOBITS when writing (#645) 2024-03-19 13:40:38 +10:00