aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCMachOStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCMachOStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCMachOStreamer.cpp5
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;
}
}