[PATCH] D66717: [ELF] Do not ICF two sections with different output sections (by SECTIONS commands)

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 00:30:09 PDT 2019


MaskRay updated this revision to Diff 217083.
MaskRay added a comment.

Delete a stale .ARM.exidx* check.

I think the new processSymbolAssignments() gives us a simple workaround for https://bugs.llvm.org/show_bug.cgi?id=42506

     // Change values of linker-script-defined symbols from placeholders (assigned
     // by declareSymbols) to actual definitions.
     script->processSymbolAssignments();
  +  script->processSymbolAssignments();

If we call script->processSymbolAssignments() the second time, `__efistub_stext_offset` will be changed to an absolute value.

If we say D66279 <https://reviews.llvm.org/D66279> solves the the value convergence problem, then adding another processSymbolAssignments() can be said to solve the type (absolute or non-absolute) convergence problem.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66717/new/

https://reviews.llvm.org/D66717

Files:
  ELF/Driver.cpp
  ELF/ICF.cpp
  ELF/LinkerScript.cpp
  ELF/LinkerScript.h
  ELF/Writer.cpp
  ELF/Writer.h
  test/ELF/linkerscript/early-assign-symbol.s
  test/ELF/linkerscript/icf-different-output-sections.s
  test/ELF/linkerscript/subalign.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66717.217083.patch
Type: text/x-patch
Size: 15615 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190826/b1b7ee66/attachment.bin>


More information about the llvm-commits mailing list