[PATCH] D109393: [asan] Changed the label for error reporting code to use GOT instead of PLT.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 7 17:35:55 PDT 2021


pcc added a comment.

Have you verified that things work at runtime with this change? Because I believe that your change will result in branching to the GOT entry for the runtime functions. Since GOT entries are just addresses and are not executable, I believe that this would result in a segfault.

I believe that R_X86_64_PLT32 is the correct relocation to use in this case. What's unclear to me though is how you're getting that error. That should only be happening if the relocation is being applied to an address of the wrong size. Can you check what the value of `Type` is in `checkIs32` in `llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp` when the check fails? I suspect that the JMP_1 in your instruction somehow remains a JMP_1 instead of being properly "unrelaxed" to JMP_4.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109393/new/

https://reviews.llvm.org/D109393



More information about the llvm-commits mailing list