[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/17277] New: ld -shared: bogus DT_TEXTREL marker (and R_ARM_NONE)
From: |
roland at gnu dot org |
Subject: |
[Bug ld/17277] New: ld -shared: bogus DT_TEXTREL marker (and R_ARM_NONE) for PC-relative cross-section relocs (e.g. movw/movt) |
Date: |
Fri, 15 Aug 2014 21:34:01 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=17277
Bug ID: 17277
Summary: ld -shared: bogus DT_TEXTREL marker (and R_ARM_NONE)
for PC-relative cross-section relocs (e.g. movw/movt)
Product: binutils
Version: 2.24
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: roland at gnu dot org
Reproduced with:
$ cat pcrel-shared.s
.syntax unified
.arm
.arch armv7-a
.text
.globl foo
.type foo,%function
foo: movw r0, #:lower16:symbol - 1f - 8
movt r0, #:upper16:symbol - 1f - 8
1: add r0, pc
bx lr
.data
.globl symbol
.hidden symbol
symbol: .long 22
$ arm-linux-gnueabi-as -o pcrel-shared.o pcrel-shared.s
$ arm-linux-gnueabi-ld -shared -o pcrel-shared.so pcrel-shared.o
$ readelf -dr pcrel-shared.so
Dynamic section at offset 0x1e4 contains 10 entries:
Tag Type Name/Value
0x00000004 (HASH) 0x94
0x00000005 (STRTAB) 0x184
0x00000006 (SYMTAB) 0xd4
0x0000000a (STRSZ) 63 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000011 (REL) 0x1c4
0x00000012 (RELSZ) 16 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x00000016 (TEXTREL) 0x0
0x00000000 (NULL) 0x0
Relocation section '.rel.dyn' at offset 0x1c4 contains 2 entries:
Offset Info Type Sym.Value Sym. Name
00000000 00000000 R_ARM_NONE
00000000 00000000 R_ARM_NONE
$
The R_ARM_NONE relocs are bogus. More important is the DT_TEXTREL marker,
which is harmfully bogus.
Appears in 2.24 (and earlier) and trunk du jour. Gold does not have this bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/17277] New: ld -shared: bogus DT_TEXTREL marker (and R_ARM_NONE) for PC-relative cross-section relocs (e.g. movw/movt),
roland at gnu dot org <=