Update mclinker for llvm rebase to r233350.
Change-Id: Ic2e8c152e881681d6b827f9ace76bcb87b907147
diff --git a/lib/Object/ObjectLinker.cpp b/lib/Object/ObjectLinker.cpp
index 0ab7315..801cbaf 100644
--- a/lib/Object/ObjectLinker.cpp
+++ b/lib/Object/ObjectLinker.cpp
@@ -383,7 +383,8 @@
// FIXME: disable debug string merge when doing partial link.
if (LinkerConfig::Object == m_Config.codeGenType())
(*sect)->setKind(LDFileFormat::Debug);
- } // Fall through
+ }
+ // Fall through
default: {
if (!(*sect)->hasSectionData())
continue; // skip
@@ -835,6 +836,13 @@
(*iter)->apply(*m_LDBackend.getRelocator());
}
+ // apply relocations created by LD backend
+ for (TargetLDBackend::extra_reloc_iterator
+ iter = m_LDBackend.extra_reloc_begin(),
+ end = m_LDBackend.extra_reloc_end(); iter != end; ++iter) {
+ iter->apply(*m_LDBackend.getRelocator());
+ }
+
return true;
}
@@ -907,6 +915,13 @@
writeRelocationResult(*reloc, data);
}
}
+
+ // sync relocations created by LD backend
+ for (TargetLDBackend::extra_reloc_iterator
+ iter = m_LDBackend.extra_reloc_begin(),
+ end = m_LDBackend.extra_reloc_end(); iter != end; ++iter) {
+ writeRelocationResult(*iter, data);
+ }
}
void ObjectLinker::partialSyncRelocationResult(FileOutputBuffer& pOutput) {