[lld] [lld][ELF] Demote symbols in discarded sections to Undefined. (PR #68777)
Bevin Hansson via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 11 01:38:21 PDT 2023
================
@@ -714,6 +714,22 @@ template <class ELFT> void Writer<ELFT>::copyLocalSymbols() {
// No reason to keep local undefined symbol in symtab.
if (!dr)
continue;
+
+ // Demote locals which did not end up in any partition. This is similar
+ // to what we do in Driver.cpp, but that only works on globals.
+ // Don't do this for section symbols; they are expected to be lost.
----------------
bevin-hansson wrote:
I'm a bit unsure about this. I had to prevent this for section symbols, because a few tests fail otherwise, mostly ones related to arm exidx sections. I don't understand the mechanisms at play enough to know exactly what is supposed to happen.
https://github.com/llvm/llvm-project/pull/68777
More information about the llvm-commits
mailing list