bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/28501] New: ld arm: R_ARM_GOTOFF32 referencing a preemptible sym


From: i at maskray dot me
Subject: [Bug ld/28501] New: ld arm: R_ARM_GOTOFF32 referencing a preemptible symbol should be disallowed
Date: Tue, 26 Oct 2021 20:18:48 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28501

            Bug ID: 28501
           Summary: ld arm: R_ARM_GOTOFF32 referencing a preemptible
                    symbol should be disallowed
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: i at maskray dot me
  Target Milestone: ---

cat >a.s <<e
.globl _dl_argv
_dl_argv:
  nop

.word _dl_argv(GOTOFF)
e
arm-linux-gnueabi-gcc -fpic -c arm.s


% arm-linux-gnueabi-ld -shared arm.o  # incorrectly allowed; should issue an
error like R_X86_64_PC32/R_AARCH64_PREL32
% ld.lld -shared arm.o
ld.lld: error: relocation R_ARM_GOTOFF32 cannot be used against symbol
_dl_argv; recompile with -fPIC
>>> defined in arm.o
>>> referenced by arm.o:(.text+0x4)
% ld.lld -shared -Bsymbolic arm.o     # -Bsymbolic makes defined symbols
non-preemptible, so no diagnostic



As of 2021-10, glibc sysdeps/arm/dl-machine.h has such incorrect usage:
https://sourceware.org/pipermail/libc-alpha/2021-October/132315.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]