diff options
author | Weiming Zhao <weimingz@codeaurora.org> | 2017-04-03 21:50:04 +0000 |
---|---|---|
committer | Weiming Zhao <weimingz@codeaurora.org> | 2017-04-03 21:50:04 +0000 |
commit | 74a7fa059484465536cb4f5040da056ae4d9699b (patch) | |
tree | 4cbdfc0e250ba97bf0a5ab9083eee9da42a7d6df /llvm/lib/MC/MCELFStreamer.cpp | |
parent | b600e138cc17e1e4d897747b2e7e1ed21177c8c5 (diff) | |
download | bcm5719-llvm-74a7fa059484465536cb4f5040da056ae4d9699b.tar.gz bcm5719-llvm-74a7fa059484465536cb4f5040da056ae4d9699b.zip |
Reland r298901 with modifications (reverted in r298932)
Dont emit Mapping symbols for sections that contain only data.
Summary:
Dont emit mapping symbols for sections that contain only data.
Reviewers: rengolin, weimingz, kparzysz, t.p.northover, peter.smith
Reviewed By: t.p.northover
Patched by Shankar Easwaran <shankare@codeaurora.org>
Subscribers: alekseyshl, t.p.northover, llvm-commits
Differential Revision: https://reviews.llvm.org/D30724
llvm-svn: 299392
Diffstat (limited to 'llvm/lib/MC/MCELFStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCELFStreamer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp index de0791281d2..c8e0223c057 100644 --- a/llvm/lib/MC/MCELFStreamer.cpp +++ b/llvm/lib/MC/MCELFStreamer.cpp @@ -103,6 +103,16 @@ void MCELFStreamer::EmitLabel(MCSymbol *S, SMLoc Loc) { Symbol->setType(ELF::STT_TLS); } +void MCELFStreamer::EmitLabel(MCSymbol *S, SMLoc Loc, MCFragment *F) { + auto *Symbol = cast<MCSymbolELF>(S); + MCObjectStreamer::EmitLabel(Symbol, Loc, F); + + const MCSectionELF &Section = + static_cast<const MCSectionELF &>(*getCurrentSectionOnly()); + if (Section.getFlags() & ELF::SHF_TLS) + Symbol->setType(ELF::STT_TLS); +} + void MCELFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) { // Let the target do whatever target specific stuff it needs to do. getAssembler().getBackend().handleAssemblerFlag(Flag); |