[lld] r304433 - Synchronize the linker script with -r.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 1 09:30:12 PDT 2017
Author: rafael
Date: Thu Jun 1 11:30:12 2017
New Revision: 304433
URL: http://llvm.org/viewvc/llvm-project?rev=304433&view=rev
Log:
Synchronize the linker script with -r.
I don't have a testcase in mind, but there is no reason to have the
linker script out of sync during a -r link.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=304433&r1=304432&r2=304433&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Jun 1 11:30:12 2017
@@ -273,10 +273,11 @@ template <class ELFT> void Writer<ELFT>:
parallelForEach(OutputSections.begin(), OutputSections.end(),
[](OutputSection *S) { S->maybeCompress<ELFT>(); });
+ Script->synchronize();
+
if (Config->Relocatable) {
assignFileOffsets();
} else {
- Script->synchronize();
Script->assignAddresses(Phdrs, OutputSectionCommands);
// Remove empty PT_LOAD to avoid causing the dynamic linker to try to mmap a
More information about the llvm-commits
mailing list