[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/16177] New: R_ARM_COPY reloc generated for reference in wr
From: |
roland at gnu dot org |
Subject: |
[Bug binutils/16177] New: R_ARM_COPY reloc generated for reference in writable section |
Date: |
Fri, 15 Nov 2013 20:51:34 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=16177
Bug ID: 16177
Summary: R_ARM_COPY reloc generated for reference in writable
section
Product: binutils
Version: 2.25 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: roland at gnu dot org
When a writable input section (i.e. data) refers to a symbol defined in an
ET_DYN object, BFD ld for ARM targets generates a COPY dynamic reloc. For
other targets like x86, this situation generates a plain data dynamic
reloc. Gold for ARM also generates the plain data dynamic reloc.
I can't understand any rationale for generating a synthetic data object and
copy reloc for it in this situation. A copy reloc is only appropriate when
the reference is from a read-only input section (e.g. from an instruction).
$ cat data-ref.s
.globl _start
.p2align 4
_start:
bkpt
.data
.globl data_object
object_reference:
.long data_object
.size object_reference,4
$ cat libdata.s
.data
.globl data_object
.type data_object, %object
.size data_object, 4
data_object:
.long 123
$ ./gas/as-new -o data-ref.o data-ref.s
$ ./gas/as-new -o libdata.o libdata.s
$ ./ld/ld-new -shared -o libdata.so libdata.o
$ ./ld/ld-new -o data-ref data-ref.o libdata.so
$ readelf -r data-ref
Relocation section '.rel.dyn' at offset 0x224 contains 1 entries:
Offset Info Type Sym.Value Sym. Name
100302bc 00000314 R_ARM_COPY 100302bc data_object
$ ./gold/ld-new -o data-ref-gold data-ref.o libdata.so
$ readelf -r data-ref-gold
Relocation section '.rel.dyn' at offset 0x190 contains 1 entries:
Offset Info Type Sym.Value Sym. Name
00009230 00000102 R_ARM_ABS32 00000000 data_object
$
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/16177] New: R_ARM_COPY reloc generated for reference in writable section,
roland at gnu dot org <=