[PATCH] D36739: [LLD][ELF] Move fixSectionAlignments() before first call to assignAddresses()

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 07:05:23 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL312636: [ELF] Move fixSectionAlignments() before first call to assignAddresses() (authored by psmith).

Changed prior to commit:
  https://reviews.llvm.org/D36739?vs=111164&id=114005#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D36739

Files:
  lld/trunk/ELF/Writer.cpp


Index: lld/trunk/ELF/Writer.cpp
===================================================================
--- lld/trunk/ELF/Writer.cpp
+++ lld/trunk/ELF/Writer.cpp
@@ -192,9 +192,6 @@
   if (ErrorCount)
     return;
 
-  if (!Script->Opt.HasSections && !Config->Relocatable)
-    fixSectionAlignments();
-
   // If -compressed-debug-sections is specified, we need to compress
   // .debug_* sections. Do it right now because it changes the size of
   // output sections.
@@ -1385,6 +1382,9 @@
                   InX::Dynamic},
                  [](SyntheticSection *SS) { SS->finalizeContents(); });
 
+  if (!Script->Opt.HasSections && !Config->Relocatable)
+    fixSectionAlignments();
+
   // Some architectures use small displacements for jump instructions.
   // It is linker's responsibility to create thunks containing long
   // jump instructions if jump targets are too far. Create thunks.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36739.114005.patch
Type: text/x-patch
Size: 893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170906/1c0d9fb2/attachment.bin>


More information about the llvm-commits mailing list