diff options
Diffstat (limited to 'llvm/lib/MC/MCMachOStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCMachOStreamer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCMachOStreamer.cpp b/llvm/lib/MC/MCMachOStreamer.cpp index 6297340..e951073 100644 --- a/llvm/lib/MC/MCMachOStreamer.cpp +++ b/llvm/lib/MC/MCMachOStreamer.cpp @@ -162,9 +162,10 @@ void MCMachOStreamer::ChangeSection(MCSection *Section, // Output a linker-local symbol so we don't need section-relative local // relocations. The linker hates us when we do that. - if (LabelSections && !HasSectionLabel[Section]) { + if (LabelSections && !HasSectionLabel[Section] && + !Section->getBeginSymbol()) { MCSymbol *Label = getContext().createLinkerPrivateTempSymbol(); - EmitLabel(Label); + Section->setBeginSymbol(Label); HasSectionLabel[Section] = true; } } |