[PATCH] D12027: [lld][LinkerScript] Consider order of headers in PHDRS command

Denis Protivensky via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 01:25:09 PDT 2015


denis-protivensky created this revision.
denis-protivensky added reviewers: Bigcheese, rafaelauler.
denis-protivensky added a subscriber: llvm-commits.
denis-protivensky added a project: lld.

Sort segments according to their order in PHDRS command.
Handle first load segment containing ELF and program headers.
Discard ELF and program headers if not set by PT_PHDR or first PT_LOAD segment in PHDRS command.

Test cases are included.

http://reviews.llvm.org/D12027

Files:
  include/lld/Core/Error.h
  include/lld/ReaderWriter/LinkerScript.h
  lib/Core/Error.cpp
  lib/ReaderWriter/ELF/HeaderChunks.h
  lib/ReaderWriter/ELF/OutputELFWriter.cpp
  lib/ReaderWriter/ELF/TargetLayout.cpp
  lib/ReaderWriter/ELF/TargetLayout.h
  lib/ReaderWriter/LinkerScript.cpp
  test/elf/linkerscript/phdrs-all-none.test
  test/elf/linkerscript/phdrs-custom-none.test
  test/elf/linkerscript/phdrs-custom-order.test
  test/elf/linkerscript/phdrs-different.test
  test/elf/linkerscript/phdrs-dup-name.test
  test/elf/linkerscript/phdrs-extra-program.test
  test/elf/linkerscript/phdrs-flags.test
  test/elf/linkerscript/phdrs-has-program.test
  test/elf/linkerscript/phdrs-load-empty.test
  test/elf/linkerscript/phdrs-load-filehdr.test
  test/elf/linkerscript/phdrs-load-phdrs.test
  test/elf/linkerscript/phdrs-misplaced-program.test
  test/elf/linkerscript/phdrs-no-program.test
  test/elf/linkerscript/phdrs-one-none.test
  test/elf/linkerscript/phdrs-program-good-phdrs.test
  test/elf/linkerscript/phdrs-same-flags.test
  test/elf/linkerscript/phdrs-same.test
  test/elf/linkerscript/sections-dup-name.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12027.32135.patch
Type: text/x-patch
Size: 24032 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150814/f5ce74a8/attachment.bin>


More information about the llvm-commits mailing list