[lld] [lld-macho] Include branch extension thunks in linker map (PR #120496)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 13:16:32 PST 2024
================
@@ -220,7 +242,12 @@ void macho::writeMapFile() {
os << "# Address\tSize \tFile Name\n";
for (const OutputSegment *seg : outputSegments) {
for (const OutputSection *osec : seg->getSections()) {
- if (auto *concatOsec = dyn_cast<ConcatOutputSection>(osec)) {
+ const TextOutputSection *textOsec = dyn_cast<TextOutputSection>(osec);
+ if (textOsec && textOsec->getThunks().size()) {
+ auto inputsAndThunks =
+ mergeOrderedInputs(textOsec->inputs, textOsec->getThunks());
+ printIsecArrSyms(inputsAndThunks);
+ } else if (auto *concatOsec = dyn_cast<ConcatOutputSection>(osec)) {
printIsecArrSyms(concatOsec->inputs);
----------------
alx32 wrote:
Switched `mergeOrderedInputs` to use `std::merge`. Leaving the rest as-is for now - We can reopen the conversation via another comment.
https://github.com/llvm/llvm-project/pull/120496
More information about the llvm-commits
mailing list