[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/28370] New: aarch64: relocation R_AARCH64_ADR_PREL_PG_HI21 again
From: |
i at maskray dot me |
Subject: |
[Bug ld/28370] New: aarch64: relocation R_AARCH64_ADR_PREL_PG_HI21 against STT_GNU_IFUNC symbol `ifunc' isn't handled by elf64_aarch64_final_link_relocate |
Date: |
Wed, 22 Sep 2021 03:35:13 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28370
Bug ID: 28370
Summary: aarch64: relocation R_AARCH64_ADR_PREL_PG_HI21 against
STT_GNU_IFUNC symbol `ifunc' isn't handled by
elf64_aarch64_final_link_relocate
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: ---
GCC -fpic may generate direct relocations to take the address of an ifunc,
since an ifunc is not required to use the function attribute.
(GCC appears to use GOT when taking the address of an hidden
__attribute__((ifunc(...))))
cat > ./a.c <<eof
__attribute__((visibility("hidden"))) void ifunc(void);
void (*addr(void))(void) { return ifunc; }
eof
cat > ./b.c <<eof
void impl(void) {}
void *resolver() { return impl; }
__attribute__((ifunc("resolver"), visibility("hidden"))) void ifunc(void);
eof
aarch64-linux-gnu-gcc -fpic -c a.c b.c
% ./ld-new -shared a.o b.o
./ld-new: a.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against STT_GNU_IFUNC
symbol `ifunc' isn't handled by elf64_aarch64_final_link_relocate
a.o: in function `addr':
a.c:(.text+0x0): dangerous relocation: unsupported relocation
./ld-new: a.o: relocation R_AARCH64_ADD_ABS_LO12_NC against STT_GNU_IFUNC
symbol `ifunc' isn't handled by elf64_aarch64_final_link_relocate
a.c:(.text+0x4): dangerous relocation: unsupported relocation
The x86-64 port handles the case.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/28370] New: aarch64: relocation R_AARCH64_ADR_PREL_PG_HI21 against STT_GNU_IFUNC symbol `ifunc' isn't handled by elf64_aarch64_final_link_relocate,
i at maskray dot me <=