https://sourceware.org/bugzilla/show_bug.cgi?id=29377
Fangrui Song <i at maskray dot me> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |i at maskray dot me --- Comment #3 from Fangrui Song <i at maskray dot me> --- This patch looks good to me. __attribute__((visibility("protected"))) void *foo() { return (void *)foo; } % gcc -m32 -fpic -shared -fuse-ld=bfd b.c /usr/bin/ld.bfd: /tmp/cc3Ay0Gh.o: relocation R_X86_64_PC32 against protected symbol `foo' can not be used when making a shared object /usr/bin/ld.bfd: final link failed: bad value collect2: error: ld returned 1 exit status I'd still with that the x86 port considers https://sourceware.org/pipermail/binutils/2022-June/121423.html I have fixed GNU ld's aarch64/arm ports to match other ports and lld. This addresses all issues reported on https://maskray.me/blog/2021-01-09-copy-relocations-canonical-plt-entries-and-protected -- You are receiving this mail because: You are on the CC list for the bug.