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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 02:33:13 PDT 2019


grimar added a comment.

Given the direction of how linkerscript support is going forward in LLD last time, this approach looks generally good to me.



================
Comment at: test/ELF/linkerscript/early-assign-symbol.s:11
 
 # Simple cases that we can handle.
 
----------------
Since with this patch we can handle the case above, this comment needs either to be moved/removed and/or updated.


================
Comment at: test/ELF/linkerscript/icf-different-output-sections.s:45
+.section .rodata.bar1,"a"
+.byte 42
----------------
Seems you only need to have a 2 .rodata sections for this test?

I'd suggest testing/demonstrating the output from the 2 scripts here probably:

1) .rodata.foo : { *(.rodata.foo*) } .rodata.bar : { *(.rodata.bar*) }

2) .rodata: { *(.rodata.*) } 

I.e. idea is to show in the test that we can put sections in a single or a multiple sections and 
that in the case (2) input sections will be folded and in case (1) they will not.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D66717





More information about the llvm-commits mailing list