[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/19962] R_ARM_COPY relocation generated with -znocopyreloc
From: |
matz at suse dot de |
Subject: |
[Bug ld/19962] R_ARM_COPY relocation generated with -znocopyreloc |
Date: |
Wed, 21 Jul 2021 15:52:13 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19962
Michael Matz <matz at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matz at suse dot de
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Michael Matz <matz at suse dot de> ---
So with current master binutils, without additional changes I don't see copy
relocs on aarch64 with the (adjusted for data size) example:
% cat data-ref.s
.globl _start
.p2align 4
_start:
ret
.data
.globl data_object
# .section .rodata,"a",@progbits
object_reference:
.quad data_object
.size object_reference,8
% cat libdata.s
.data
.globl data_object
.type data_object, %object
.size data_object, 8
data_object:
.quad 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 -znocopyreloc -o data-ref data-ref.o libdata.so
% readelf -rW data-ref
Relocation section '.rela.dyn' at offset 0x230 contains 1 entry:
Offset Info Type Symbol's Value
Symbol's Name + Addend
0000000000411000 0000000100000101 R_AARCH64_ABS64 0000000000000000
data_object + 0
This doesn't change when the '.section rodata' directive is uncommented, i.e.
when the reference comes from a read-only section. Still no copy-reloc.
(Without the -znocopyreloc linker option we do generate a copy reloc, but
that's expected).
So, right now I don't see anything in need for fixing. This all was somewhat
related to a go problem: https://github.com/golang/go/issues/22040 . If that
one still exists then it's different from _this_ problem report here.
If there's new info or a reproducer that still shows a problem, please reopen.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/19962] R_ARM_COPY relocation generated with -znocopyreloc,
matz at suse dot de <=