summaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCObjectStreamer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index 44a82f75576b..d9c39bbedf37 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -408,6 +408,13 @@ void MCObjectStreamer::emitInstToFragment(const MCInst &Inst,
Inst, IF->getContentsForAppending(), Fixups, STI);
IF->doneAppending();
IF->appendFixups(Fixups);
+
+ for (auto &Fixup : Fixups) {
+ if (Fixup.isLinkerRelaxable()) {
+ IF->setLinkerRelaxable();
+ getCurrentSectionOnly()->setLinkerRelaxable();
+ }
+ }
}
#ifndef NDEBUG