File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 22# RUN: rm -rf %t && split-file %s %t && cd %t
33# RUN: llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
44
5- # RUN: ld.lld -T lds a.o -o a
5+ # RUN: ld.lld --relax - T lds a.o -o a
66# RUN: llvm-objdump -d --no-show-raw-insn a | FileCheck %s --check-prefixes=RELAX,RELAX-MID
77
88## Unsure whether this needs a diagnostic. GNU ld allows this.
9- # RUN: ld.lld -T lds -pie a.o -o a.pie
9+ # RUN: ld.lld --relax - T lds -pie a.o -o a.pie
1010# RUN: llvm-objdump -d --no-show-raw-insn a.pie | FileCheck %s --check-prefixes=RELAX,RELAX-MID
1111
12- # RUN: ld.lld -T lds -pie -z notext -z ifunc-noplt a.o -o a.ifunc-noplt
12+ # RUN: ld.lld --relax - T lds -pie -z notext -z ifunc-noplt a.o -o a.ifunc-noplt
1313# RUN: llvm-objdump -d --no-show-raw-insn a.ifunc-noplt | FileCheck %s --check-prefixes=RELAX,NORELAX-MID
1414
1515# RELAX-LABEL: <_start>:
Original file line number Diff line number Diff line change 44
55# RUN: llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
66# RUN: llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax b.s -o b.64.o
7- # RUN: ld.lld -shared -soname=b.so b.64.o -o b.64.so
8- # RUN: ld.lld -T lds a.64.o b.64.so -o 64
7+ # RUN: ld.lld --relax - shared -soname=b.so b.64.o -o b.64.so
8+ # RUN: ld.lld --relax - T lds a.64.o b.64.so -o 64
99# RUN: llvm-objdump -td --no-show-raw-insn 64 | FileCheck %s --check-prefix=RELAX
1010
1111## --no-relax disables relaxation.
12- # RUN: ld.lld -T lds a.64.o b.64.so --no-relax -o 64.norelax
12+ # RUN: ld.lld --no-relax - T lds a.64.o b.64.so -o 64.norelax
1313# RUN: llvm-objdump -td --no-show-raw-insn 64.norelax | FileCheck %s --check-prefix=NORELAX
1414
1515# RELAX: {{0*}}00010000 g .text {{0*}}0000001c _start
Original file line number Diff line number Diff line change 33## Call36 and tail36 need LA64 basic integer, so they donot have 32-bit version.
44
55# RUN: llvm-mc --filetype=obj --triple=loongarch64 --mattr=+relax %s -o %t.64.o
6- # RUN: ld.lld -Ttext=0x10000 --emit-relocs %t.64.o -o %t.64
6+ # RUN: ld.lld --relax - Ttext=0x10000 --emit-relocs %t.64.o -o %t.64
77# RUN: llvm-objdump -dr %t.64 | FileCheck %s --check-prefix=RELAX
88
99## -r should keep original relocations.
10- # RUN: ld.lld -r %t.64.o -o %t.64.r
10+ # RUN: ld.lld --relax - r %t.64.o -o %t.64.r
1111# RUN: llvm-objdump -dr %t.64.r | FileCheck %s --check-prefix=CHECKR
1212
1313## --no-relax should keep original relocations.
14- # RUN: ld.lld -Ttext=0x10000 --emit-relocs --no-relax %t.64.o -o %t.64.norelax
14+ # RUN: ld.lld --no-relax - Ttext=0x10000 --emit-relocs %t.64.o -o %t.64.norelax
1515# RUN: llvm-objdump -dr %t.64.norelax | FileCheck %s --check-prefix=NORELAX
1616
1717# RELAX: 00010000 <_start>:
You can’t perform that action at this time.
0 commit comments