[ELF][RISCV] Allow PT_LOAD to have overlapping p_offset ranges on EM_RISCV
authorFangrui Song <maskray@google.com>
Wed, 28 Aug 2019 12:06:06 +0000 (12:06 +0000)
committerFangrui Song <maskray@google.com>
Wed, 28 Aug 2019 12:06:06 +0000 (12:06 +0000)
commit523f999acf6faa94d497ca1e81cb676d0a6063d5
tree137cbd8d68850251482d9833f29a13506bf2b256
parentab6594575a221debb2a02f6b0e277c6cc86e9154
[ELF][RISCV] Allow PT_LOAD to have overlapping p_offset ranges on EM_RISCV

Port the D64906 technique to RISC-V. It deletes 3 alignments at
PT_LOAD boundaries for the default case: the size of a RISC-V binary
decreases by at most 12kb.

llvm-svn: 370192
lld/ELF/Writer.cpp
lld/test/ELF/riscv-gp.s
lld/test/ELF/riscv-plt.s
lld/test/ELF/riscv-reloc-copy.s
lld/test/ELF/riscv-reloc-got.s
lld/test/ELF/riscv-tls-gd.s
lld/test/ELF/riscv-tls-ie.s
lld/test/ELF/riscv-tls-ld.s
lld/test/ELF/riscv32-reloc-32-pic.s
lld/test/ELF/riscv64-reloc-64-pic.s