[lld] [lld][ELF] Merge .ltext.* input sections into .ltext output section (PR #190305)

Farid Zakaria via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 21:44:25 PDT 2026


fzakaria wrote:

> Before you force pushed, the `.ltext.*` -> `.ltext` change looks good.
> 
> Now you also do `.ltext.hot.f1` => `.ltext`. Does LLVM actually utilize hot/cold/unlikely for `.ltext`?

I found it https://github.com/llvm/llvm-project/blob/bc11c85b6b16f1daabfc9e8b326c9568c3318cb9/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp#L664

The name comes from the following which could be `.ltext`.
```
SmallString<128> Name =
      getSectionPrefixForGlobal(Kind, TM.isLargeGlobalValue(GO));
```

I'm not very familiar with this code-flow but I thought your feedback was going to be for me to mimic the behavior.

https://github.com/llvm/llvm-project/pull/190305


More information about the llvm-commits mailing list