diff options
author | Weiming Zhao <weimingz@codeaurora.org> | 2017-03-28 05:40:36 +0000 |
---|---|---|
committer | Weiming Zhao <weimingz@codeaurora.org> | 2017-03-28 05:40:36 +0000 |
commit | 320848458b5da8f5a41ca9aa51a05ffad36eda1a (patch) | |
tree | 44329826c4cbb3bfea2cecc4e316b31e7e0d7cdd /llvm/lib/MC/MCELFStreamer.cpp | |
parent | 6a8518086a4a85b59cd05b6f3ce283660e3ffc52 (diff) | |
download | bcm5719-llvm-320848458b5da8f5a41ca9aa51a05ffad36eda1a.tar.gz bcm5719-llvm-320848458b5da8f5a41ca9aa51a05ffad36eda1a.zip |
Dont emit Mapping symbols for sections that contain only data.
Summary:
Dont emit mapping symbols for sections that contain only data.
Patched by Shankar Easwaran <shankare@codeaurora.org>
Reviewers: rengolin, peter.smith, weimingz, kparzysz, t.p.northover
Reviewed By: t.p.northover
Subscribers: t.p.northover, llvm-commits
Differential Revision: https://reviews.llvm.org/D30724
llvm-svn: 298901
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); |