[ELF] Support --no-align-segments.
authorShankar Easwaran <shankare@codeaurora.org>
Sat, 8 Nov 2014 03:44:49 +0000 (03:44 +0000)
committerShankar Easwaran <shankare@codeaurora.org>
Sat, 8 Nov 2014 03:44:49 +0000 (03:44 +0000)
commit22c76a5d79ad6ceb4bbf46b6b280dfd10483bade
tree7d7ab83b247d028e5fd78b01d435d5651824a6c6
parent8da0bf3b7cf3670095d7ce9eac885dfc5976720e
[ELF] Support --no-align-segments.

lld generates an ELF by adhering to the ELF spec by aligning vma/fileoffset to a
page boundary, but this becomes an issue when dealing with large pages. This
adds support so that lld generated executables adheres to the ELF spec with the
rule vma % p_align = offset % p_align.

This is supported by the flag --no-align-segments.

This could be the default in few targets like X86_64 to save space on disk.

llvm-svn: 221571
lld/include/lld/ReaderWriter/ELFLinkingContext.h
lld/lib/Driver/GnuLdDriver.cpp
lld/lib/Driver/GnuLdOptions.td
lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
lld/lib/ReaderWriter/ELF/SegmentChunks.h
lld/test/elf/X86_64/noalignsegments.test [new file with mode: 0644]
lld/test/elf/phdr.test