[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/25500] New: [powerpc] R_PPC_REL16_LO/R_PPC64_REL16_LO referencin
From: |
i at maskray dot me |
Subject: |
[Bug ld/25500] New: [powerpc] R_PPC_REL16_LO/R_PPC64_REL16_LO referencing a preemptible symbol should be rejected |
Date: |
Tue, 04 Feb 2020 05:55:52 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25500
Bug ID: 25500
Summary: [powerpc] R_PPC_REL16_LO/R_PPC64_REL16_LO referencing
a preemptible symbol should be rejected
Product: binutils
Version: 2.35 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: i at maskray dot me
Target Milestone: ---
x86-64 (and many other archs)
cat > b.s <<e
.byte 0xe8
.long foo - . - 4
.section .text.foo,"ax",@progbits
.globl foo
foo:
e
as b.s -o b.o
ld.bfd b.o -shared # relocation R_X86_64_PC32 against symbol `foo' can not be
used when making a shared object; recompile with -fPIC
powerpc32/powerpc64
cat > a.s <<e
bcl 20,31,.+4
mflr 9
addi 9,9, (__kernel_datapage_offset - (.-4))@l
.section .text.foo,"ax",@progbits
.globl __kernel_datapage_offset
__kernel_datapage_offset:
e
powerpc-linux-gnu-as a.s -o a.o
powerpc-linux-gnu-ld -shared a.o # no error
powerpc64le-linux-gnu-as a.s -o a.o
powerpc64le-linux-gnu-ld -shared a.o # no error
This is incorrect. STB_DEFAULT STV_DEFAULT __kernel_datapage_offset is
preemptible in a shared object. If __kernel_datapage_offset binds to another
component at runtime, the patched instruction will be wrong.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/25500] New: [powerpc] R_PPC_REL16_LO/R_PPC64_REL16_LO referencing a preemptible symbol should be rejected,
i at maskray dot me <=