[RFC PATCH] Avoid emitting TEXTREL marker for R_ARM_NONE relocs.
Roland McGrath
mcgrathr@google.com
Thu Mar 13 17:32:00 GMT 2014
Alan,
It was indeed .eh_frame that led to it. Here's a trivial test case:
$ head eh[123].s
==> eh1.s <==
.cfi_sections .eh_frame
foo:
.cfi_startproc
.cfi_personality 0, pers
.cfi_endproc
==> eh2.s <==
.cfi_sections .eh_frame
bar:
.cfi_startproc
.cfi_personality 0, pers
.cfi_endproc
==> eh3.s <==
.globl pers
pers:
nop
$ ./ld/ld-new --eh-frame-hdr -shared -o eh.so eh[123].o
$ readelf -dr eh.so
Dynamic section at offset 0x260 contains 10 entries:
Tag Type Name/Value
0x00000004 (HASH) 0x100000d4
0x00000005 (STRTAB) 0x100001b0
0x00000006 (SYMTAB) 0x10000110
0x0000000a (STRSZ) 64 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000011 (REL) 0x100001f0
0x00000012 (RELSZ) 16 (bytes)
0x00000013 (RELENT) 8 (bytes)
WRONG=> 0x00000016 (TEXTREL) 0x0
0x00000000 (NULL) 0x0
Relocation section '.rel.dyn' at offset 0x1f0 contains 2 entries:
Offset Info Type Sym.Value Sym. Name
UGLY=> 00000000 00000000 R_ARM_NONE
1000022e 00000202 R_ARM_ABS32 00000000 pers
$
It's no longer an urgent issue for me, but I think it deserves to be fixed.
Thanks,
Roland
More information about the Binutils
mailing list