[PATCH] D28313: Change which input sections we concatenate

Rafael Ávila de Espíndola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 13:31:48 PST 2017


rafael created this revision.
rafael added reviewers: ruiu, emaste, kettenis.
rafael added a subscriber: llvm-commits.

After Mark's patch I was wondering what was the rationale for the ELF spec requiring us to merge only sections with matching flags and types. I tried emailing https://groups.google.com/forum/#!forum/generic-abi, but looks like my emails are not being posted (the list is probably moderated). I emailed Cary Coutant instead.

Cary pointed out that the section was a late addition and didn't got the scrutiny it deserved. Given that and the problems found by implementing the letter of the standard, I propose changing lld to merge all sections with the same name and issue errors if the types or some critical flags are different.

This should allow an unmodified firefox linked with lld to run.

This also merges some code with the linkerscript path.


https://reviews.llvm.org/D28313

Files:
  ELF/LinkerScript.cpp
  ELF/OutputSections.cpp
  ELF/OutputSections.h
  test/ELF/incompatible-section-flags.s
  test/ELF/incompatible-section-types.s
  test/ELF/linkerscript/phdrs.s
  test/ELF/linkerscript/sections.s
  test/ELF/section-name.s
  test/ELF/string-table.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28313.83114.patch
Type: text/x-patch
Size: 15661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170104/0e264a9b/attachment.bin>


More information about the llvm-commits mailing list