[PATCH] D10918: [lld][ELF] Apply segments from linker scripts

Denis Protivensky dprotivensky at accesssoftek.com
Fri Jul 3 02:48:19 PDT 2015


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

Put sections to segments according to linker scripts if available.
Rework the code of TargetLayout::assignSectionsToSegments so it operates on the given list of segments, which can be either read from linker scripts or constructed as before.
Consider flags set for segments through linker scripts.

NOTE: handling program header, as well as PHDRS and FILEHDR attributes of PHDRS command will be implemented separately.

http://reviews.llvm.org/D10918

Files:
  include/lld/ReaderWriter/LinkerScript.h
  lib/ReaderWriter/ELF/ARM/ARMTargetHandler.h
  lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h
  lib/ReaderWriter/ELF/Mips/MipsTargetLayout.cpp
  lib/ReaderWriter/ELF/Mips/MipsTargetLayout.h
  lib/ReaderWriter/ELF/SectionChunks.h
  lib/ReaderWriter/ELF/SegmentChunks.cpp
  lib/ReaderWriter/ELF/SegmentChunks.h
  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-different.test
  test/elf/linkerscript/phdrs-flags.test
  test/elf/linkerscript/phdrs-one-none.test
  test/elf/linkerscript/phdrs-same-flags.test
  test/elf/linkerscript/phdrs-same.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10918.29002.patch
Type: text/x-patch
Size: 27009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150703/e77a2426/attachment.bin>


More information about the llvm-commits mailing list