Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
10 changed files
with
169 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
# REQUIRES: riscv | ||
# RUN: llvm-mc -filetype=obj -triple=riscv32 %p/Inputs/relocation-copy.s -o %t1.o | ||
# RUN: ld.lld -shared %t1.o -o %t1.so | ||
# RUN: ld.lld -shared %t1.o -soname=t1.so -o %t1.so | ||
# RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.o | ||
# RUN: ld.lld %t.o %t1.so -o %t | ||
# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s | ||
# RUN: llvm-readobj -r %t | FileCheck --check-prefixes=REL,REL32 %s | ||
# RUN: llvm-nm -S %t | FileCheck --check-prefix=NM32 %s | ||
|
||
# RUN: llvm-mc -filetype=obj -triple=riscv64 %p/Inputs/relocation-copy.s -o %t1.o | ||
# RUN: ld.lld -shared %t1.o -o %t1.so | ||
# RUN: ld.lld -shared %t1.o -soname=t1.so -o %t1.so | ||
# RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.o | ||
# RUN: ld.lld %t.o %t1.so -o %t | ||
# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s | ||
# RUN: llvm-readobj -r %t | FileCheck --check-prefixes=REL,REL64 %s | ||
# RUN: llvm-nm -S %t | FileCheck --check-prefix=NM64 %s | ||
|
||
# RELOC: .rela.dyn { | ||
# RELOC-NEXT: 0x13000 R_RISCV_COPY x 0x0 | ||
# RELOC-NEXT: } | ||
# REL: .rela.dyn { | ||
# REL32-NEXT: 0x13210 R_RISCV_COPY x 0x0 | ||
# REL64-NEXT: 0x13360 R_RISCV_COPY x 0x0 | ||
# REL-NEXT: } | ||
|
||
# NM32: 00013000 00000004 B x | ||
# NM64: 0000000000013000 0000000000000004 B x | ||
# NM32: 00013210 00000004 B x | ||
# NM64: 0000000000013360 0000000000000004 B x | ||
|
||
la a0, x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.