[PATCH] D81784: [ELF] Resolve relocations in .debug_* referencing (discarded symbols or ICF folded section symbols) to tombstone values
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 05:55:42 PDT 2020
jhenderson added a comment.
Another of our downstream tests has flagged up another issue with this change, this time with TLS symbols. clang appears to use R_X86_64_DTPOFF64 relocations for such symbols, rather than R_X86_64_64 relocations. This means the condition `type == target->symbolicRel` is not triggering for them. In our downstream port, we didn't check the relocation type, so the references to the discarded TLS variables was always patched to -1. Meanwhile, old LLD before this change appears to be patching it to 0. New LLD is patching it to something relative to the start of the TLS block (in my case it's `0xffffffffffff8000`, but I imagine it depends on layout/base address etc). I think we need to relax the relocation type check, possibly even remove it completely.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81784/new/
https://reviews.llvm.org/D81784
More information about the llvm-commits
mailing list