This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC PATCH] Avoid emitting TEXTREL marker for R_ARM_NONE relocs.
- From: Roland McGrath <mcgrathr at google dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Thu, 13 Mar 2014 10:32:18 -0700
- Subject: Re: [RFC PATCH] Avoid emitting TEXTREL marker for R_ARM_NONE relocs.
- Authentication-results: sourceware.org; auth=none
- References: <CAB=4xhr7yOFiFByCMieKYoNsGe3ZaMb5cj0GL4K3CFUTJf6fTw at mail dot gmail dot com> <20140312225242 dot GX26922 at bubble dot grove dot modra dot org> <CAB=4xhqjS+nu8Atde_Br4ghK80bBcjOy-UPXstx--4xdhd=c8g at mail dot gmail dot com>
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