aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCELFStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCELFStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCELFStreamer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp
index 49071bd..38744a0 100644
--- a/llvm/lib/MC/MCELFStreamer.cpp
+++ b/llvm/lib/MC/MCELFStreamer.cpp
@@ -88,8 +88,10 @@ void MCELFStreamer::changeSection(MCSection *Section, uint32_t Subsection) {
if (SectionELF->getFlags() & ELF::SHF_GNU_RETAIN)
getWriter().markGnuAbi();
- changeSectionImpl(Section, Subsection);
- Asm.registerSymbol(*Section->getBeginSymbol());
+ MCObjectStreamer::changeSection(Section, Subsection);
+ auto *Sym = static_cast<MCSymbolELF *>(Section->getBeginSymbol());
+ Sym->setBinding(ELF::STB_LOCAL);
+ Sym->setType(ELF::STT_SECTION);
}
void MCELFStreamer::emitWeakReference(MCSymbol *Alias, const MCSymbol *Target) {