[lld] [lld][ELF] Skip zero-sized symbols in balanced partitioning (PR #151685)
Pengying Xu via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 1 10:25:11 PDT 2025
================
@@ -286,16 +297,48 @@ merged2: // @merged2
.Lfunc_end7:
.size merged2, .Lfunc_end7-merged2
// -- End function
+ .section .text.L1,"axR", at progbits
+ .p2align 2 // -- Begin function L1
+ .type L1, at function
+L1: // @L1
----------------
Colibrow wrote:
I may be wrong here. `.text.L1` is a section type symbol and the section itself is not 0, but when addSection, we need process the symbols from symtab, this corresponding section type symbol is zero sized and this symbol->section points to `.text.L1`, which causes this symbol to be added first rather than the Temporal Profiling Traced function `L1`(this `L1` points to the `.text.L1` too and in fact it is the real function of `.text.L1`).
And regarding MachO, I am not sure if this siatuation will happen.
https://github.com/llvm/llvm-project/pull/151685
More information about the llvm-commits
mailing list