summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2018-08-06 21:59:58 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2018-08-06 21:59:58 +0000
commit69dd7cd45e1863de09fccdfba074c3eda5cff745 (patch)
tree7589d791930030037ac7196edbd22d804c27ea46 /llvm/lib/MC/ELFObjectWriter.cpp
parentd49ab0b21486dd47284eef8b0f075128adc4128b (diff)
downloadbcm5719-llvm-69dd7cd45e1863de09fccdfba074c3eda5cff745.tar.gz
bcm5719-llvm-69dd7cd45e1863de09fccdfba074c3eda5cff745.zip
MC: Redirect .addrsig directives referring to private (.L) symbols to the section symbol.
This matches our behaviour for regular (i.e. relocated) references to private symbols and therefore avoids needing to unnecessarily write address-significant .L symbols to the object file's symbol table, which can interfere with stack traces. Fixes check-cfi after r339050. llvm-svn: 339066
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index db531f75c87..358c036f2a7 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -1273,6 +1273,8 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssembler &Asm,
for (const MCSymbol *&Sym : AddrsigSyms) {
if (const MCSymbol *R = Renames.lookup(cast<MCSymbolELF>(Sym)))
Sym = R;
+ if (Sym->isInSection() && Sym->getName().startswith(".L"))
+ Sym = Sym->getSection().getBeginSymbol();
Sym->setUsedInReloc();
}
}
OpenPOWER on IntegriCloud