[PATCH] D70362: Fix fatal linker error on R_MIPS_JALR against a local TLS symbol
James Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 04:17:18 PST 2019
jrtc27 added a comment.
`R_MIPS_JALR` really should not be being emitted here; its semantics are a hint to say that you are making a direct call to the referenced symbol (albeit by indirecting through a loaded GOT entry), but this is an indirect call. Interestingly, Local Dynamic is the only case where LLVM wants to emit the relocation; the three other models all leave it out, as does a normal global. This is because it happens to have the same structure as a direct call in the SelectionDAG representation, with the second operand for the instruction defining `$t9` being a GlobalAddressSDNode, just this time an `MO_DTPREL_LO` rather than the expected `MO_GOT_CALL` (`%call16`)/`MO_CALL_LO16` (`%call_lo`).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70362/new/
https://reviews.llvm.org/D70362
More information about the llvm-commits
mailing list