https://sourceware.org/bugzilla/show_bug.cgi?id=26141
Bug ID: 26141 Summary: -fvisibility=hidden generates JUMP11 relocations on ARM Product: binutils Version: 2.33 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: jason at zx2c4 dot com Target Milestone: --- There used to be a problem with binutils where JUMP11 relocations would be generated for THUMB2 code, prompting the linux kernel to add this interesting workaround: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/Kconfig?id=5e857ce6eae7ca21b2055cca4885545e29228fe2#n1431 This worked, but was suboptimal, so in time binutils fixed the bug, tracked here: https://sourceware.org/bugzilla/show_bug.cgi?id=12532 AFAICT, the fix there worked, and the kernel no longer generates JUMP11 relocations in THUMB2 mode and all is well. However, the fix appears to stop working with -fvisibility=hidden. I imagine this is so due to some conflicting code where the forced B.W is only generated for static functions, since non-static ones will be relocated differently, but then because of -fvisibility=hidden, they get treated like statics, only B is used instead of the forced B.W, causing this issue to crop up again. OpenWRT experienced this when including WireGuard on a new board. I fixed it like this: https://git.zx2c4.com/wireguard-linux-compat/commit/?id=178cdfffb99f2fd6fb4a5bfd2f9319461d93f53b -- You are receiving this mail because: You are on the CC list for the bug.