3 ms·
This ELF file is not minimal. A loadable ELF file needs no sections at all. The section header table can be empty and the .shrstr section does not need to be pr
by bregma 3y ago
This ELF file is not minimal. A loadable ELF file needs no sections at all. The section header table can be empty and the .shrstr section does not need to be present. The .text entry is a just a pointer into one of the LOAD segments and can also be eliminated.
- boricj 3y agoThis is acknowledged by the author: > Technically, the section header table and the section header string table are not needed, but having them sets the stage for adding more sections in the future, namely dynamic linking and debug symbol sections.
- BobbyTables2 3y agoThe author sounds horribly mistaken. Even dynamically linked executables tables do not need sections!! It just so happens to be that the runtime symbol table is defined to be the same format as the normal symbol table. Although it shows up as .dynsym, the runtime linker doesn’t find it that way!
- aengelke 3y agoDynamic linking doesn't require section headers, either, just a PT_DYNAMIC program header to refer to the .dynamic section (which in turn refers to .dynsym, .dynstr, .rela.dyn, .init_array, stc.).
- bregma 3y ago> A loadable ELF file needs no sections at all. Dynamic linking is a process that takes place with loadable ELF files. A loadable ELF file needs no sections at all.