https://sourceware.org/bugzilla/show_bug.cgi?id=19472
Bug ID: 19472 Summary: [aarch64] Large shared objects need pc-relative stubs or relocations for absolute stubs Product: binutils Version: 2.27 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: kyle+llvm at iteratee dot net CC: ian at airs dot com Target Milestone: --- When linking a large enough .so, I end up with the following invalid long call stub: 12427da8: 58000050 ldr x16, 12427db0 <lstat64+0x59fc> 12427dac: d61f0200 br x16 12427db0: 091d5bb0 .inst 0x091d5bb0 ; undefined 12427db4: 00000000 .inst 0x00000000 ; undefined With no relocation entry for 12427db0. This is incorrect, as when the .so gets relocated, the absolute branch results in a segfault. There are 2 apparent solutions: For .so's as well as for PIE, use the PC-relative stub, or Include a relocation in the stub. There's a tradeoff of call cost vs loading time. I think the simpler choice is to use the pc-relative branch for large .so's as this mirrors large PIE code. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils