[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/19962] New: R_ARM_COPY relocation generated with -znocopyreloc
From: |
david at zentus dot com |
Subject: |
[Bug ld/19962] New: R_ARM_COPY relocation generated with -znocopyreloc |
Date: |
Sun, 17 Apr 2016 15:07:00 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19962
Bug ID: 19962
Summary: R_ARM_COPY relocation generated with -znocopyreloc
Product: binutils
Version: 2.25
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: david at zentus dot com
Target Milestone: ---
Linking with -znocopyreloc has no effect on ARM. The result binary still
contains an R_ARM_COPY relocation.
$ 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
$ as -o data-ref.o data-ref.s
$ as -o libdata.o libdata.s
$ ld.bfd -shared -o libdata.so libdata.o
$ ld.bfd -znocopyreloc -o data-ref data-ref.o libdata.so
$ readelf -r data-ref
Relocation section '.rel.dyn' at offset 0x20c contains 1 entries:
Offset Info Type Sym.Value Sym. Name
000202c0 00000314 R_ARM_COPY 000202c0 data_object
Linking with ld.gold does the right thing:
Relocation section '.rel.dyn' at offset 0x19c contains 1 entries:
Offset Info Type Sym.Value Sym. Name
00009240 00000102 R_ARM_ABS32 00000000 data_object
Related to bug 16177 (I borrowed the example program from there).
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/19962] New: R_ARM_COPY relocation generated with -znocopyreloc,
david at zentus dot com <=