https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291669
Bug ID: 291669
Summary: ELF section names .hash, .plt sometimes don't appear
in the .shstrtab table in ELF
Product: Base System
Version: 15.0-CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: misc
Assignee: [email protected]
Reporter: [email protected]
Testcase:
The shared library /usr/local/lib/libopcodes.so installed by binutils-2.44,1 on
15 STABLE amd64 contains .hash and .plt sections, but both of them are missing
in .shstrtab
The .shstrtab section doesn't contaun these 2 names:
> 01389490 96 54 8c 00 00 00 00 00 00 2e 74 65 78 74 00 2e |.T........text..|
> 013894a0 67 6f 74 00 2e 67 6f 74 2e 70 6c 74 00 2e 72 65 |got..got.plt..re|
> 013894b0 6c 61 2e 70 6c 74 00 2e 69 6e 69 74 00 2e 62 73 |la.plt..init..bs|
> 013894c0 73 00 2e 64 74 6f 72 73 00 2e 63 74 6f 72 73 00 |s..dtors..ctors.|
> 013894d0 2e 64 79 6e 73 74 72 00 2e 65 68 5f 66 72 61 6d |.dynstr..eh_fram|
> 013894e0 65 5f 68 64 72 00 2e 67 6e 75 2e 76 65 72 73 69 |e_hdr..gnu.versi|
> 013894f0 6f 6e 5f 72 00 2e 64 61 74 61 2e 72 65 6c 2e 72 |on_r..data.rel.r|
> 01389500 6f 00 2e 72 65 6c 61 2e 64 79 6e 00 2e 67 6e 75 |o..rela.dyn..gnu|
> 01389510 2e 76 65 72 73 69 6f 6e 00 2e 64 79 6e 73 79 6d |.version..dynsym|
> 01389520 00 2e 66 69 6e 69 00 2e 67 6e 75 2e 68 61 73 68 |..fini..gnu.hash|
> 01389530 00 2e 72 65 6c 72 6f 5f 70 61 64 64 69 6e 67 00 |..relro_padding.|
> 01389540 2e 6e 6f 74 65 2e 74 61 67 00 2e 65 68 5f 66 72 |.note.tag..eh_fr|
> 01389550 61 6d 65 00 2e 64 79 6e 61 6d 69 63 00 2e 73 68 |ame..dynamic..sh|
> 01389560 73 74 72 74 61 62 00 2e 72 6f 64 61 74 61 00 2e |strtab..rodata..|
> 01389570 64 61 74 61 00 00 00 00 00 00 00 00 00 00 00 00 |data............|
> 01389580 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
However, these sections are present in this file:
> $ elfdump -a /usr/local/lib/libopcodes.so | grep -E "(\.hash|\.plt)"
> sh_name: .gnu.hash
> sh_name: .hash
> sh_name: .rela.plt
> sh_name: .plt
> sh_name: .got.plt
> relocation with addend (.rela.plt):
The definition of the .shstrtab section:
The .shstrtab (section header string table) in an ELF (Executable and Linkable
Format) file is a dedicated section that holds the names of all other sections
within that ELF file.
--
You are receiving this mail because:
You are the assignee for the bug.