[PATCH] D81784: [ELF] Resolve relocations in .debug_* referencing (discarded symbols or ICF folded section symbols) to tombstone values
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 18 12:34:32 PDT 2020
MaskRay marked 5 inline comments as done.
MaskRay added inline comments.
================
Comment at: lld/ELF/InputSection.cpp:932
+ // address selection entry). Use -2 instead.
+ if (name == ".debug_loc" || name == ".debug_ranges")
+ --tombstone;
----------------
avl wrote:
> I think it is better not to do string comparisons for every relocation pointing to deleted code.
> It is worth to move this name comparisons before the loop.
I think it is actually more efficient doing string comparisons here. The tombstone value code path is rare. By doing string comparisons here, we don't perform string comparisons in the normal code paths.
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