linker throws error no .eh_frame_hdr will be created
kamlesh kumar
kamleshbhalui@gmail.com
Thu Jun 3 08:32:46 GMT 2021
Hi Devs,
When I give executable as input in linker like below it throws error,
but resulted binary almost contain similar section.
$ ./build-binutils-2.36/ld/ld-new -r test.exe -o bar
./build-binutils-2.36/ld/ld-new: error in test.exe(.eh_frame); no
.eh_frame_hdr table will be created
$ readelfppcspe -S test.exe
There are 17 section headers, starting at offset 0x60d758:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS 00100000 002000 4f2e0b 00 WAX
0 0 8192
[ 2] .eh_frame_hdr PROGBITS 005f2e10 4f4e10 001a0c 00 A 0 0 4
[ 3] .eh_frame PROGBITS 005f481c 4f681c 009a18 00 A 0 0 4
[ 4] .gcc_except_table PROGBITS 005fe240 500240 003000 00 A 0 0 4
[ 5] .wrs_build_vars PROGBITS 00601240 503240 000178 00 Ax 0 0 1
[ 6] .data PROGBITS 00602000 504000 057bd0 00 WA
0 0 4096
[ 7] .tdata PROGBITS 00659bd0 55bbd0 000005 00 WAT 0 0 4
[ 8] .tbss NOBITS 00659be0 55bbd5 000810 00 WAT 0 0 4
[ 9] .sdata PROGBITS 00659c00 55bc00 001f10 00 WA
0 0 128
[10] .sbss NOBITS 0065c000 55db10 000ef8 00 WA 0 0 64
[11] .bss NOBITS 0065d000 55db10 058b8c 00 WA
0 0 512
[12] .PPC.EMB.apuinfo NOTE 00000000 55db10 000024 00 0 0 1
[13] .gnu.attributes GNU_ATTRIBUTES 00000000 55db34 000012 00 0 0 1
[14] .symtab SYMTAB 00000000 55db48 057510 10
15 10256 4
[15] .strtab STRTAB 00000000 5b5058 05865c 00 0 0 1
[16] .shstrtab STRTAB 00000000 60d6b4 0000a1 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
v (VLE), p (processor specific)
$ readelfppcspe -S bar
There are 17 section headers, starting at offset 0x60d848:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS 00000000 002000 4f2e0b 00 WAX
0 0 8192
[ 2] .wrs_build_vars PROGBITS 00000000 4f4e0b 000178 00 A 0 0 1
[ 3] .eh_frame_hdr PROGBITS 00000000 4f4f84 001a0c 00 A 0 0 4
[ 4] .eh_frame PROGBITS 00000000 4f6990 009a18 00 A 0 0 4
[ 5] .gcc_except_table PROGBITS 00000000 5003a8 003000 00 A 0 0 4
[ 6] .tdata PROGBITS 00000000 5033a8 000005 00 WAT 0 0 4
[ 7] .tbss NOBITS 00000000 5033b0 000810 00 WAT 0 0 4
[ 8] .data PROGBITS 00000000 504000 057bd0 00 WA
0 0 4096
[ 9] .sdata PROGBITS 00000000 55bc00 001f10 00 WA
0 0 128
[10] .sbss NOBITS 00000000 55db40 000ef8 00 WA 0 0 64
[11] .bss NOBITS 00000000 55dc00 058b8c 00 WA
0 0 512
[12] .PPC.EMB.apuinfo NOTE 00000000 55dc00 000024 00 0 0 1
[13] .gnu.attributes GNU_ATTRIBUTES 00000000 55dc24 000012 00 0 0 1
[14] .symtab SYMTAB 00000000 55dc38 057510 10
15 10256 4
[15] .strtab STRTAB 00000000 5b5148 05865c 00 0 0 1
[16] .shstrtab STRTAB 00000000 60d7a4 0000a1 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
v (VLE), p (processor specific)
we do not get any error in the 2.23 linker.
I would like to know Is this bug in the linker? or Is behaving correctly?
./kamlesh
More information about the Binutils
mailing list