4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-dynamic-05.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# a pointer equality.
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
# RUN: llvm-readobj -dt -r -s %t.exe | FileCheck -check-prefix=PLT %s

# PLT: Section {
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-dynamic-06-64.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# b) Linker creates a single R_MIPS_REL32 relocation.
#
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mips64el -shared -o %t.so %t.o
# RUN: lld -flavor old-gnu -target mips64el -shared -o %t.so %t.o
# RUN: llvm-readobj -dt -r -s %t.so | FileCheck -check-prefix=SYM %s
# RUN: llvm-readobj -mips-plt-got %t.so | FileCheck -check-prefix=GOT %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-dynamic-06.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# b) Linker creates a single R_MIPS_REL32 relocation.
#
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t.o
# RUN: llvm-readobj -dt -r -s %t.so | FileCheck -check-prefix=SYM %s
# RUN: llvm-readobj -mips-plt-got %t.so | FileCheck -check-prefix=GOT %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-dynamic-07-64.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# a) Emitting of R_MIPS_REL32 relocations.
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
# RUN: lld -flavor gnu -target mips64el -shared -o %t1.so %t-so.o
# RUN: lld -flavor old-gnu -target mips64el -shared -o %t1.so %t-so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mips64el -shared --noinhibit-exec \
# RUN: lld -flavor old-gnu -target mips64el -shared --noinhibit-exec \
# RUN: -o %t2.so %t-o.o %t1.so
# RUN: llvm-readobj -dt -r -sections %t2.so | FileCheck %s
# RUN: llvm-readobj -mips-plt-got %t2.so | FileCheck -check-prefix=GOT %s
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-dynamic-07.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# b) There should be no R_MIPS_REL32 relocations for the _gp_disp symbol.
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t1.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t1.so %t-so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec \
# RUN: lld -flavor old-gnu -target mipsel -shared --noinhibit-exec \
# RUN: -o %t2.so %t-o.o %t1.so
# RUN: llvm-readobj -dt -r -sections %t2.so | FileCheck %s
# RUN: llvm-readobj -mips-plt-got %t2.so | FileCheck -check-prefix=GOT %s
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-dynamic-08-64.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# a) Emitting of R_MIPS_REL32 relocations.
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
# RUN: lld -flavor gnu -target mips64el -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mips64el -shared -o %t.so %t-so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mips64el -e T0 --noinhibit-exec \
# RUN: lld -flavor old-gnu -target mips64el -e T0 --noinhibit-exec \
# RUN: -o %t.exe %t-o.o %t.so
# RUN: llvm-readobj -dt -r -sections %t.exe | FileCheck %s
# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-dynamic-08-micro.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# a) Emitting of R_MIPS_REL32 relocations.
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mipsel -e T0 --noinhibit-exec \
# RUN: lld -flavor old-gnu -target mipsel -e T0 --noinhibit-exec \
# RUN: -o %t.exe %t-o.o %t.so
# RUN: llvm-readobj -dt -r -sections %t.exe | FileCheck %s
# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-dynamic-08.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# a) Emitting of R_MIPS_REL32 relocations.
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mipsel -e T0 --noinhibit-exec \
# RUN: lld -flavor old-gnu -target mipsel -e T0 --noinhibit-exec \
# RUN: -o %t.exe %t-o.o %t.so
# RUN: llvm-readobj -dt -r -sections %t.exe | FileCheck %s
# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-dynamic-09-micro.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# b) There should be no PLT entries.
#
# RUN: yaml2obj -format=elf %s > %t-obj
# RUN: lld -flavor gnu -target mipsel --noinhibit-exec -e T0 -o %t2-exe %t-obj
# RUN: lld -flavor old-gnu -target mipsel --noinhibit-exec -e T0 -o %t2-exe %t-obj
# RUN: llvm-readobj -dt -r -s %t2-exe | FileCheck -check-prefix=PLT-SYM %s

# PLT-SYM: Sections [
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-dynamic-09.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# b) There should be no PLT entries.
#
# RUN: yaml2obj -format=elf %s > %t-obj
# RUN: lld -flavor gnu -target mipsel --noinhibit-exec -e T0 -o %t2-exe %t-obj
# RUN: lld -flavor old-gnu -target mipsel --noinhibit-exec -e T0 -o %t2-exe %t-obj
# RUN: llvm-readobj -dt -r -s %t2-exe | FileCheck -check-prefix=PLT-SYM %s

# PLT-SYM: Sections [
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-dynamic-10-micro.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-o1.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o2.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o1.o %t-o2.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t-o1.o %t-o2.o
# RUN: llvm-readobj -dt -r -s %t.exe | FileCheck -check-prefix=PLT-SYM %s

# PLT-SYM: Sections [
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-dynamic-10.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-o1.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o2.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o1.o %t-o2.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t-o1.o %t-o2.o
# RUN: llvm-readobj -dt -r -s %t.exe | FileCheck -check-prefix=PLT-SYM %s

# PLT-SYM: Sections [
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-dynamic-11.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# b) There should be no PLT entries.
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t1.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t1.so %t-so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t2.so %t-o.o %t1.so
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t2.so %t-o.o %t1.so
# RUN: llvm-readobj -dt -r -s %t2.so | FileCheck -check-prefix=PLT-SYM %s

# PLT-SYM: Sections [
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-dynamic-12.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# a pointer equality.
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
# RUN: llvm-readobj -dt -r %t.exe | FileCheck -check-prefix=PLT-SYM %s
# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-dynamic-13.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# b) Applying addendum from the original relocation.
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=RAW %s
# RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=REL %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-dynamic-14.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# b) Applying addendum from the original relocation.
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
# RUN: lld -flavor gnu -target mips64el -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mips64el -shared -o %t.so %t-so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mips64el -e T0 -o %t.exe %t-o.o %t.so
# RUN: lld -flavor old-gnu -target mips64el -e T0 -o %t.exe %t-o.o %t.so
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=RAW %s
# RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=REL %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-dynamic-15.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# symbols if the symbols referenced by R_MIPS_32 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t.o
# RUN: llvm-objdump -s %t.so | FileCheck -check-prefix=RAW %s
# RUN: llvm-readobj -r %t.so | FileCheck -check-prefix=REL %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-eh-01.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# calculation, adding GOT entries etc.

# RUN: yaml2obj -format=elf -docnum 1 %s > %t.so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t.so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t1.o
# RUN: yaml2obj -format=elf -docnum 3 %s > %t2.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t1.o %t2.o %t.so
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t1.o %t2.o %t.so
# RUN: llvm-objdump -s -t %t.exe | FileCheck -check-prefix=RAW %s
# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-eh-02.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# c) No entries in the dynamic symbols table has the STO_MIPS_PLT flag.
#
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
# RUN: llvm-readobj -dt -r %t.exe | FileCheck -check-prefix=PLT-SYM %s

# PLT-SYM: Relocations [
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-eh-03.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# RUN: yaml2obj -format=elf -docnum 1 %s > %t1.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t2.o
# RUN: lld -flavor gnu -target mipsel -e T0 \
# RUN: lld -flavor old-gnu -target mipsel -e T0 \
# RUN: -pcrel-eh-reloc -o %t.exe %t1.o %t2.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck -check-prefix=RAW %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-got-hilo-01.test
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Check handling of R_MIPS_GOT_HI16 / R_MIPS_GOT_LO16 relocations.

# RUN: yaml2obj -format=elf -docnum 1 %s > %t1.so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t1.so %t1.so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t1.so %t1.so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t2.so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t2.so %t2.so.o %t1.so
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t2.so %t2.so.o %t1.so
# RUN: llvm-objdump -s -t %t2.so | FileCheck -check-prefix=RAW %s
# RUN: llvm-readobj -mips-plt-got %t2.so | FileCheck -check-prefix=GOT %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-got-hilo-micro.test
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Check handling of R_MICROMIPS_GOT_HI16 / R_MICROMIPS_GOT_LO16 relocations.

# RUN: yaml2obj -format=elf -docnum 1 %s > %t1.so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t1.so %t1.so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t1.so %t1.so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t2.so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t2.so %t2.so.o %t1.so
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t2.so %t2.so.o %t1.so
# RUN: llvm-objdump -s -t %t2.so | FileCheck -check-prefix=RAW %s
# RUN: llvm-readobj -mips-plt-got %t2.so | FileCheck -check-prefix=GOT %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-gprel16-micro-overflow.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check R_MICROMIPS_GPREL16 relocation overflow handling.
#
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: not lld -flavor gnu -target mipsel -shared -o %t.so %t.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -shared -o %t.so %t.o 2>&1 \
# RUN: | FileCheck %s

# CHECK: Relocation out of range in file {{.*}} reference from +0 to L0+0 of type 136 (R_MICROMIPS_GPREL16)
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-gprel16-micro.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check R_MICROMIPS_GPREL16 relocation handling.
#
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t.o
# RUN: llvm-readobj -symbols %t.so | FileCheck -check-prefix=SYM %s
# RUN: llvm-objdump -s %t.so | FileCheck -check-prefix=SEC %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-gprel16-overflow.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check R_MIPS_GPREL16 relocation overflow handling.
#
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: not lld -flavor gnu -target mipsel -shared -o %t.so %t.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -shared -o %t.so %t.o 2>&1 \
# RUN: | FileCheck %s

# CHECK: Relocation out of range in file {{.*}} reference from +0 to T1+-32768 of type 7 (R_MIPS_GPREL16)
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-gprel16.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check R_MIPS_GPREL16 relocation handling.
#
# RUN: yaml2obj -format=elf %s > %t-obj
# RUN: lld -flavor gnu -target mipsel -e G1 -shared -o %t.so %t-obj
# RUN: lld -flavor old-gnu -target mipsel -e G1 -shared -o %t.so %t-obj
# RUN: llvm-readobj -symbols %t.so | FileCheck -check-prefix=SYM %s
# RUN: llvm-objdump -s %t.so | FileCheck -check-prefix=SEC %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-gprel32-64.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check R_MIPS_GPREL32/R_MIPS_64 relocations handling.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mips64el -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mips64el -e T0 -o %t.exe %t.o
# RUN: llvm-readobj -r %t.exe | FileCheck --check-prefix=REL-EXE %s
# RUN: llvm-objdump -s %t.exe | FileCheck %s
# RUN: llvm-nm %t.exe | FileCheck --check-prefix=SYM %s
Expand All @@ -16,7 +16,7 @@
# SYM: 00000001200001e8 t LT1
# SYM: 0000000120001000 N _GLOBAL_OFFSET_TABLE_

# RUN: lld -flavor gnu -target mips64el -shared -o %t.so %t.o
# RUN: lld -flavor old-gnu -target mips64el -shared -o %t.so %t.o
# RUN: llvm-readobj -r %t.so | FileCheck --check-prefix=REL-SO %s

# REL-SO: Relocations [
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-gprel32.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check R_MIPS_GPREL32 relocation handling.
#
# RUN: yaml2obj -format=elf %s > %t-obj
# RUN: lld -flavor gnu -target mipsel -o %t-exe %t-obj
# RUN: lld -flavor old-gnu -target mipsel -o %t-exe %t-obj
# RUN: llvm-readobj -symbols %t-exe | FileCheck -check-prefix=SYM %s
# RUN: llvm-objdump -s %t-exe | FileCheck -check-prefix=SEC %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-gprel7-micro-overflow.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check R_MICROMIPS_GPREL7_S2 relocation overflow handling.
#
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: not lld -flavor gnu -target mipsel -shared -o %t.so %t.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -shared -o %t.so %t.o 2>&1 \
# RUN: | FileCheck %s

# CHECK: Relocation out of range in file {{.*}} reference from +0 to L0+-4 of type 172 (R_MICROMIPS_GPREL7_S2)
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-gprel7-micro.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check R_MICROMIPS_GPREL7_S2 relocation handling.
#
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t.o
# RUN: llvm-readobj -symbols %t.so | FileCheck -check-prefix=SYM %s
# RUN: llvm-objdump -s %t.so | FileCheck -check-prefix=SEC %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-hi0-lo16-micro.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MICROMIPS_HI0_LO16 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-high-01.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Check handling R_MIPS_HIGHER / R_MIPS_HIGHEST relocations.

# RUN: llvm-mc -arch=mips64el -filetype=obj -o=%t.o %s
# RUN: lld -flavor gnu -target mips64el -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mips64el -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -d %t.exe | FileCheck %s

# CHECK: Disassembly of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-high-02.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Check handling R_MICROMIPS_HIGHER / R_MICROMIPS_HIGHEST relocations.

# RUN: llvm-mc -arch=mips64el -filetype=obj -o=%t.o %s
# RUN: lld -flavor gnu -target mips64el -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mips64el -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -d %t.exe | FileCheck %s

# CHECK: Disassembly of section .text:
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/rel-jalr-01.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Check handling of the R_MIPS_JALR relocation.

# RUN: yaml2obj -format=elf -docnum 1 %s > %t1.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t1.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t1.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t2.o
# RUN: lld -flavor gnu -target mipsel -o %t.exe %t2.o %t.so
# RUN: lld -flavor old-gnu -target mipsel -o %t.exe %t2.o %t.so
# RUN: llvm-objdump -d %t.exe | FileCheck %s

# CHECK: __start:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-jalr-02.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# in case of relocatable targets.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t.o
# RUN: llvm-objdump -d %t.so | FileCheck %s

# CHECK: __start:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-lit-micro.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MICROMIPS_LITERAL relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-lit.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_LITERAL relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc-hilo.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_PCHI16 / R_MIPS_PCLO16 relocations.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc16-align.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check incorrect alignment handling for R_MIPS_PC16 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: not lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: | FileCheck %s

# CHECK: Relocation not aligned in file {{.*}} reference from T0+0 to T1+0 of type 10 (R_MIPS_PC16)
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc16-overflow.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check R_MIPS_PC16 relocation overflow handling.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: not lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: | FileCheck %s

# CHECK: Relocation out of range in file {{.*}} reference from T0+0 to T1+131068 of type 10 (R_MIPS_PC16)
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc16.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_PC16 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc18-s3-align.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check incorrect alignment handling for R_MIPS_PC18_S3 relocation target.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: not lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: | FileCheck %s

# CHECK: Relocation not aligned in file {{.*}} reference from T1+0 to T1+0 of type 62 (R_MIPS_PC18_S3)
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc18-s3-micro.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MICROMIPS_PC18_S3 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc18-s3.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_PC18_S3 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc19-s2-align.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check incorrect alignment handling for R_MIPS_PC19_S2 relocation target.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: not lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: | FileCheck %s

# CHECK: Relocation not aligned in file {{.*}} reference from T0+0 to T1+0 of type 63 (R_MIPS_PC19_S2)
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc19-s2-micro.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MICROMIPS_PC19_S2 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc19-s2.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_PC19_S2 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc21-s2-align.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check incorrect alignment handling for R_MIPS_PC21_S2 relocation target.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: not lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: | FileCheck %s

# CHECK: Relocation not aligned in file {{.*}} reference from T0+0 to T1+0 of type 60 (R_MIPS_PC21_S2)
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc21-s2-micro.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MICROMIPS_PC21_S2 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc21-s2-overflow.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check R_MIPS_PC21_S2 relocation overflow handling.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: not lld -flavor gnu -target mipsel -shared -o %t.exe %t.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -shared -o %t.exe %t.o 2>&1 \
# RUN: | FileCheck %s

# CHECK: Relocation out of range in file {{.*}} reference from T0+0 to T1+4194300 of type 60 (R_MIPS_PC21_S2)
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc21-s2.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_PC21_S2 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc26-s2-align.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check incorrect alignment handling for R_MIPS_PC26_S2 relocation target.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: not lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: | FileCheck %s

# CHECK: Relocation not aligned in file {{.*}} reference from T0+0 to T1+0 of type 61 (R_MIPS_PC26_S2)
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc26-s2-micro.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MICROMIPS_PC26_S2 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc26-s2.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_PC26_S2 relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc32.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Check handling of R_MIPS_PC32 relocation.
# RUN: yaml2obj -format=elf %s > %t-obj
# RUN: lld -flavor gnu -target mipsel -o %t-exe %t-obj
# RUN: lld -flavor old-gnu -target mipsel -o %t-exe %t-obj
# RUN: llvm-objdump -s -t %t-exe | FileCheck %s

# CHECK: Contents of section .data:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-pc7-10-16-23.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# R_MICROMIPS_PC16_S1, and R_MICROMIPS_PC23_S2 relocations.

# RUN: yaml2obj -format=elf %s > %t-obj
# RUN: lld -flavor gnu -target mipsel -o %t-exe %t-obj
# RUN: lld -flavor old-gnu -target mipsel -o %t-exe %t-obj
# RUN: llvm-objdump -s -t %t-exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-sub-micro.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MICROMIPS_SUB relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mips64el -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mips64el -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .data:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/rel-sub.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_SUB relocation.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mips64el -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mips64el -o %t.exe %t.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s

# CHECK: Contents of section .data:
Expand Down
6 changes: 3 additions & 3 deletions lld/test/elf/Mips/rld_map.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# .rld_map section, and __RLD_MAP symbol.

# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
# RUN: lld -flavor gnu -target mips %t.o -o %t.exe
# RUN: lld -flavor old-gnu -target mips %t.o -o %t.exe
# RUN: llvm-readobj -dynamic-table -s -st %t.exe \
# RUN: | FileCheck -check-prefix=EXE-DYN %s

Expand All @@ -28,12 +28,12 @@
# EXE-DYN: 0x70000016 MIPS_RLD_MAP 0x[[ADDR]]
# EXE-DYN: 0x70000035 MIPS_RLD_MAP_REL 0x1E48

# RUN: lld -flavor gnu -target mips -static %t.o -o %t.exe
# RUN: lld -flavor old-gnu -target mips -static %t.o -o %t.exe
# RUN: llvm-nm -just-symbol-name %t.exe | FileCheck -check-prefix=EXE-STATIC %s

# EXE-STATIC-NOT: __RLD_MAP

# RUN: lld -flavor gnu -target mips -shared %t.o -o %t.so
# RUN: lld -flavor old-gnu -target mips -shared %t.o -o %t.so
# RUN: llvm-nm -just-symbol-name %t.so | FileCheck -check-prefix=DYNLIB %s

# DYNLIB-NOT: __RLD_MAP
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/sign-rela.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check that relocation addend read from RELA record is not sign-extended.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mips64el -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mips64el -o %t.exe %t.o
# RUN: llvm-objdump -s %t.exe | FileCheck %s

# CHECK: {{[0-9a-f]+}} 01000000 00000000 ........
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/st-other.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

# RUN: yaml2obj -format=elf %s > %t-micro.o

# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-micro.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-micro.o
# RUN: llvm-readobj -dyn-symbols %t.so | FileCheck -check-prefix=SO %s

# RUN: lld -flavor gnu -target mipsel -e S0 -o %t.exe %t-micro.o
# RUN: lld -flavor old-gnu -target mipsel -e S0 -o %t.exe %t-micro.o
# RUN: llvm-readobj -symbols %t.exe | FileCheck -check-prefix=EXE-SYM %s
# RUN: llvm-readobj -dyn-symbols %t.exe | FileCheck -check-prefix=EXE-DSYM %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/static-01.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# RUN: yaml2obj -format=elf -docnum 1 %s > %t1.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t2.o
# RUN: lld -flavor gnu -target mipsel -e T0 -static -o %t.exe %t1.o %t2.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -static -o %t.exe %t1.o %t2.o
# RUN: llvm-nm %t.exe | FileCheck %s

# CHECK: 00401000 N _GLOBAL_OFFSET_TABLE_
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-1-micro.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# relocations.

# RUN: yaml2obj -format=elf -o %t.o %s
# RUN: lld -flavor gnu -target mipsel -e L0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e L0 -o %t.exe %t.o
# RUN: llvm-objdump -s %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-1.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_TLS_TPREL_HI16 / R_MIPS_TLS_TPREL_LO16 relocations.

# RUN: yaml2obj -format=elf -o %t.o %s
# RUN: lld -flavor gnu -target mipsel -e L0 -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e L0 -o %t.exe %t.o
# RUN: llvm-objdump -s %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-2-64-static.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_TLS_GD relocation in case of -static linking.

# RUN: yaml2obj -format=elf -o %t.o %s
# RUN: lld -flavor gnu -target mips64el -e T0 -static -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mips64el -e T0 -static -o %t.exe %t.o
# RUN: llvm-objdump -s %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-2-64.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Create a shared library with thread symbol D1.
# RUN: yaml2obj -format=elf -o %t-so.o %s
# RUN: lld -flavor gnu -target mips64el -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mips64el -shared -o %t.so %t-so.o

# Check dynamic relocations and GOT in the shared library.
# RUN: llvm-readobj -r %t.so | FileCheck -check-prefix=REL %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-2-micro.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Create a shared library with thread symbol D1.
# RUN: yaml2obj -format=elf -o %t-so.o %s
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so.o

# Check dynamic relocations and GOT in the shared library.
# RUN: llvm-readobj -r %t.so | FileCheck -check-prefix=REL %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-2-static.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# RUN: yaml2obj -format=elf -docnum 1 -o %t1.o %s
# RUN: yaml2obj -format=elf -docnum 2 -o %t2.o %s
# RUN: lld -flavor gnu -target mipsel -e T0 -static -o %t.exe %t1.o %t2.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -static -o %t.exe %t1.o %t2.o
# RUN: llvm-objdump -s %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-2.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Create a shared library with thread symbol D1.
# RUN: yaml2obj -format=elf -o %t-so.o %s
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so.o

# Check dynamic relocations and GOT in the shared library.
# RUN: llvm-readobj -r %t.so | FileCheck -check-prefix=REL %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-3-64-static.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_TLS_GOTTPREL relocation in case of -static linking.

# RUN: yaml2obj -format=elf -o %t.o %s
# RUN: lld -flavor gnu -target mips64el -e T0 -static -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mips64el -e T0 -static -o %t.exe %t.o
# RUN: llvm-objdump -s %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/tls-3-micro.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

# Create a shared library with thread symbol D1.
# RUN: yaml2obj -format=elf -docnum 1 -o %t-so.o %s
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so.o

# Create executable file linked using two object files and the shared library.
# The object files defines thread symbols D0 and D2.
# RUN: yaml2obj -format=elf -docnum 2 -o %t-o1.o %s
# RUN: yaml2obj -format=elf -docnum 3 -o %t-o2.o %s
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o1.o %t-o2.o %t.so
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t-o1.o %t-o2.o %t.so

# Check dynamic relocations and GOT in the executable file.
# RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=REL %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-3-static.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_TLS_GOTTPREL relocation in case of -static linking.

# RUN: yaml2obj -format=elf -o %t.o %s
# RUN: lld -flavor gnu -target mipsel -e T0 -static -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -static -o %t.exe %t.o
# RUN: llvm-objdump -s %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/tls-3.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

# Create a shared library with thread symbol D1.
# RUN: yaml2obj -format=elf -docnum 1 -o %t-so.o %s
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so.o

# Create executable file linked using two object files and the shared library.
# The object files defines thread symbols D0 and D2.
# RUN: yaml2obj -format=elf -docnum 2 -o %t-o1.o %s
# RUN: yaml2obj -format=elf -docnum 3 -o %t-o2.o %s
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o1.o %t-o2.o %t.so
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t-o1.o %t-o2.o %t.so

# Check dynamic relocations and GOT in the executable file.
# RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=REL %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-4-64-static.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_TLS_LDM relocation in case of -static linking.

# RUN: yaml2obj -format=elf -o %t.o %s
# RUN: lld -flavor gnu -target mips64el -e T0 -static -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mips64el -e T0 -static -o %t.exe %t.o
# RUN: llvm-objdump -s %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-4-micro.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# RUN: yaml2obj -format=elf -docnum 1 -o %t-so1.o %s
# RUN: yaml2obj -format=elf -docnum 2 -o %t-so2.o %s
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so1.o %t-so2.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so1.o %t-so2.o

# RUN: llvm-readobj -r %t.so | FileCheck -check-prefix=REL %s
# RUN: llvm-readobj -dynamic-table %t.so | FileCheck -check-prefix=DYN %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-4-static.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check handling of R_MIPS_TLS_LDM relocation in case of -static linking.

# RUN: yaml2obj -format=elf -o %t.o %s
# RUN: lld -flavor gnu -target mipsel -e T0 -static -o %t.exe %t.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -static -o %t.exe %t.o
# RUN: llvm-objdump -s %t.exe | FileCheck %s

# CHECK: Contents of section .text:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-4.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# RUN: yaml2obj -format=elf -docnum 1 -o %t-so1.o %s
# RUN: yaml2obj -format=elf -docnum 2 -o %t-so2.o %s
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so1.o %t-so2.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so1.o %t-so2.o

# RUN: llvm-readobj -r %t.so | FileCheck -check-prefix=REL %s
# RUN: llvm-readobj -dynamic-table %t.so | FileCheck -check-prefix=DYN %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-5-64.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# by the R_MIPS_TLS_GD relocation gets an entry in the dynamic symbol table.

# RUN: yaml2obj -format=elf -o %t-o.o %s
# RUN: lld -flavor gnu -target mips64el -e T0 -o %t.exe %t-o.o
# RUN: lld -flavor old-gnu -target mips64el -e T0 -o %t.exe %t-o.o

# Check dynamic relocations:
# RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=REL %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-5-micro.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# the R_MICROMIPS_TLS_GD relocation gets an entry in the dynamic symbol table.

# RUN: yaml2obj -format=elf -o %t-o.o %s
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t-o.o

# Check dynamic relocations:
# RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=REL %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/tls-5.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# by the R_MIPS_TLS_GD relocation gets an entry in the dynamic symbol table.

# RUN: yaml2obj -format=elf -o %t-o.o %s
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t-o.o

# Check dynamic relocations:
# RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=REL %s
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/Mips/validate-rel-01.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# in case of shared library linking.

# RUN: yaml2obj -format=elf -docnum 1 %s > %t-hi.o
# RUN: not lld -flavor gnu -target mipsel -shared -o %t.so %t-hi.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -shared -o %t.so %t-hi.o 2>&1 \
# RUN: | FileCheck -check-prefix=RHI %s

# RHI: R_MIPS_HI16 (5) relocation cannot be used when making a shared object, recompile {{.*}}validate-rel-01.test.tmp-hi.o with -fPIC

# RUN: yaml2obj -format=elf -docnum 2 %s > %t-26.o
# RUN: not lld -flavor gnu -target mipsel -shared -o %t.so %t-26.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -shared -o %t.so %t-26.o 2>&1 \
# RUN: | FileCheck -check-prefix=R26 %s

# R26: R_MIPS_26 (4) relocation cannot be used when making a shared object, recompile {{.*}}validate-rel-01.test.tmp-26.o with -fPIC
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/Mips/validate-rel-03.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# against local symbol.

# RUN: yaml2obj -format=elf -docnum 1 %s > %t.o
# RUN: not lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: not lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o 2>&1 \
# RUN: | FileCheck %s

# CHECK: R_MIPS_CALL16 (11) relocation cannot be used against local symbol L0 in file {{.*}}validate-rel-03.test.tmp.o
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/ExampleTarget/triple.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check that the Example Target is actually used.

# RUN: yaml2obj -format=elf %s -o %t.o
# RUN: lld -flavor gnu -target x86_64-example-freebsd9 %t.o -o %t.exe
# RUN: lld -flavor old-gnu -target x86_64-example-freebsd9 %t.o -o %t.exe
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
#
# CHECK: Type: 0xFF00
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/alignoffset.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Build executable
# RUN: yaml2obj -format=elf -docnum 1 %s -o %t.o
# RUN: lld -flavor gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: lld -flavor old-gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: --no-align-segments --rosegment --noinhibit-exec
# RUN: llvm-readobj -program-headers %t.exe | FileCheck %s
#
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/X86_64/debug.test
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Test that debug info is assigned typeNoAlloc and that the output sections have
# a virtual address of 0.
RUN: lld -flavor gnu -target x86_64 -e main --output-filetype=yaml \
RUN: lld -flavor old-gnu -target x86_64 -e main --output-filetype=yaml \
RUN: %p/Inputs/debug0.x86-64 %p/Inputs/debug1.x86-64 -o %t
RUN: FileCheck %s -check-prefix YAML < %t

RUN: lld -flavor gnu -target x86_64 -e main %p/Inputs/debug0.x86-64 \
RUN: lld -flavor old-gnu -target x86_64 -e main %p/Inputs/debug0.x86-64 \
RUN: %p/Inputs/debug1.x86-64 -o %t1
RUN: llvm-readobj -sections %t1 | FileCheck %s -check-prefix ELF
# Verify that non SHF_ALLOC sections are relocated correctly.
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/defsym.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: lld -flavor gnu -target x86_64 --defsym=main=fn --noinhibit-exec \
RUN: lld -flavor old-gnu -target x86_64 --defsym=main=fn --noinhibit-exec \
RUN: %p/Inputs/fn.o -o %t
RUN: llvm-readobj -symbols %t | FileCheck %s

Expand Down
6 changes: 3 additions & 3 deletions lld/test/elf/X86_64/demangle.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# Once there is a way to add undefined symbols using yaml2obj, the test will be
# changed.

RUN: lld -flavor gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec 2>&1 | FileCheck -check-prefix=DEMANGLE %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec --no-demangle 2>&1 | FileCheck -check-prefix=NODEMANGLE %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec --demangle 2>&1 | FileCheck -check-prefix=DEMANGLE %s
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec 2>&1 | FileCheck -check-prefix=DEMANGLE %s
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec --no-demangle 2>&1 | FileCheck -check-prefix=NODEMANGLE %s
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec --demangle 2>&1 | FileCheck -check-prefix=DEMANGLE %s

#DEMANGLE: undefcpp.o: foo(char const*)
#NODEMANGLE: undefcpp.o: _Z3fooPKc
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/dontignorezerosize-sections.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This tests that lld is not ignoring zero sized sections
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/zerosizedsection.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/zerosizedsection.o \
RUN: --noinhibit-exec --output-filetype=yaml -o %t
RUN: FileCheck %s < %t

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/dynamicvars.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# values.

#RUN: yaml2obj --format elf -docnum 1 %s -o %t.o
#RUN: lld -flavor gnu -target x86_64 -e main %t.o -o %t1 --noinhibit-exec
#RUN: lld -flavor old-gnu -target x86_64 -e main %t.o -o %t1 --noinhibit-exec
#RUN: llvm-readobj -sections -symbols %t1 | FileCheck -check-prefix CHECKSYMS %s


Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/dynlib-nointerp-section.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: lld -flavor gnu -target x86_64 %p/Inputs/no-interp-section.o -o %t -shared
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/no-interp-section.o -o %t -shared
RUN: llvm-objdump -section-headers %t | FileCheck %s

CHECK-NOT: .interp
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/dynlib-search.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This tests the functionality for finding the shared library libfn.so for ELF
RUN: lld -flavor gnu -target x86_64 %p/Inputs/main.o -L%p/Inputs/ -lfn -o %t \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/main.o -L%p/Inputs/ -lfn -o %t \
RUN: --noinhibit-exec -t 2> %t1
RUN: FileCheck %s < %t1

Expand Down
8 changes: 4 additions & 4 deletions lld/test/elf/X86_64/dynsym-weak.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
# symbol as strong.

# RUN: yaml2obj -format=elf -docnum 1 %s > %t.foo.o
# RUN: lld -flavor gnu -target x86_64 -shared -o %t.so %t.foo.o
# RUN: lld -flavor old-gnu -target x86_64 -shared -o %t.so %t.foo.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t.main.o
#
# Link executable file with strong symbol. Weak symbol is in the shared lib.
# RUN: lld -flavor gnu -target x86_64 -e main -o %t1.exe %t.main.o %t.so
# RUN: lld -flavor old-gnu -target x86_64 -e main -o %t1.exe %t.main.o %t.so
# RUN: llvm-readobj -dyn-symbols %t1.exe | FileCheck -check-prefix=EXE %s
#
# Link executable file. Strong and weak symbol come from different object files.
# RUN: lld -flavor gnu -target x86_64 -e main -o %t2.exe %t.main.o %t.foo.o
# RUN: lld -flavor old-gnu -target x86_64 -e main -o %t2.exe %t.main.o %t.foo.o
# RUN: llvm-readobj -dyn-symbols %t2.exe | FileCheck -check-prefix=OBJ %s
#
# Link shared library. Weak symbol is in the another shared lib.
# RUN: lld -flavor gnu -target x86_64 -shared -o %t.res.so %t.main.o %t.so
# RUN: lld -flavor old-gnu -target x86_64 -shared -o %t.res.so %t.main.o %t.so
# RUN: llvm-readobj -dyn-symbols %t.res.so | FileCheck -check-prefix=SO %s

# EXE: Symbol {
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/extern-tls.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This tests verifies that TLS variables have correct offsets
# when variables the TLS variables are not defined in the program
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/externtls.x86-64 -static \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/externtls.x86-64 -static \
RUN: --output-filetype=yaml --noinhibit-exec | FileCheck %s -check-prefix=CHECKGOT

# Currently x86_64 relocation pass handles the R_X86_64_GOTTPOFF by
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/X86_64/general-dynamic-tls.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

# Prepare inputs
#RUN: yaml2obj -format=elf %p/Inputs/generaltls-so.o.yaml -o=%t.o.so
#RUN: lld -flavor gnu -target x86_64 -shared %t.o.so -o %T/libgeneraltls.so
#RUN: lld -flavor old-gnu -target x86_64 -shared %t.o.so -o %T/libgeneraltls.so
#RUN: yaml2obj -format=elf %s -o=%t.o

# Link - (we supply --defsym=__tls_get_addr to avoid the need to link with
# system libraries)
#RUN: lld -flavor gnu -target x86_64 -e main %t.o -L%T -lgeneraltls -o %t1 \
#RUN: lld -flavor old-gnu -target x86_64 -e main %t.o -L%T -lgeneraltls -o %t1 \
#RUN: --defsym=__tls_get_addr=0

# Check
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/imagebase.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Build executable
# RUN: yaml2obj -format=elf -docnum 1 %s -o %t.o
# RUN: lld -flavor gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: lld -flavor old-gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: --no-align-segments --noinhibit-exec --image-base 0x600000
# RUN: llvm-readobj -program-headers %t.exe | FileCheck %s
#
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/initfini-order.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This tests the functionality that lld is able to emit
# init_array/fini_array sections in the right order.

RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/initfini.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/initfini.o \
RUN: --noinhibit-exec -o %t
RUN: llvm-objdump -t -section-headers %t | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/initfini.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# corresponds to the the .init_array/.fini_array sections
# in the output ELF.

RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/initfini.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/initfini.o \
RUN: --noinhibit-exec --output-filetype=yaml -o %t
RUN: FileCheck %s < %t

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/largebss.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Any typeZeroFill content wouldn't have space reserved in the file to store
# its content

RUN: lld -flavor gnu -target x86_64 %p/Inputs/largebss.o --output-filetype=yaml --noinhibit-exec | FileCheck %s
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/largebss.o --output-filetype=yaml --noinhibit-exec | FileCheck %s

CHECK: - name: largecommon
CHECK: scope: global
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/layoutpass-order.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This test checks that we follow the command line order of layouting
# symbols in the output file

RUN: lld -flavor gnu -target x86_64 %p/Inputs/layoutpass/1.o \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/layoutpass/1.o \
RUN: %p/Inputs/layoutpass/lib2.a %p/Inputs/layoutpass/3.o -o %t \
RUN: --noinhibit-exec -static

Expand Down
10 changes: 5 additions & 5 deletions lld/test/elf/X86_64/maxpagesize.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

# Build executable
# RUN: yaml2obj -format=elf -docnum 1 %s -o %t.o
# RUN: not lld -flavor gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: not lld -flavor old-gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: --no-align-segments --noinhibit-exec -z max-page-size=0
# RUN: not lld -flavor gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: not lld -flavor old-gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: --no-align-segments --noinhibit-exec -z max-page-size=0xFF
# RUN: not lld -flavor gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: not lld -flavor old-gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: --no-align-segments --noinhibit-exec -z max-page-size=0x1010
# RUN: lld -flavor gnu -target x86_64 %t.o -o %t1.exe -static \
# RUN: lld -flavor old-gnu -target x86_64 %t.o -o %t1.exe -static \
# RUN: --no-align-segments --noinhibit-exec -z max-page-size=0x100000
# RUN: lld -flavor gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: lld -flavor old-gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: --no-align-segments --noinhibit-exec -z max-page-size=0x10000
# RUN: llvm-readobj -program-headers %t.exe | FileCheck %s
# RUN: llvm-readobj -program-headers %t1.exe | FileCheck %s -check-prefix=CHECKLARGE
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/X86_64/mergesimilarstrings.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# when merging strings is enabled.
#
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target x86_64 %t.o --noinhibit-exec -o %t1.out
# RUN: lld -flavor old-gnu -target x86_64 %t.o --noinhibit-exec -o %t1.out
# RUN: llvm-readobj -sections %t1.out | FileCheck %s
# RUN: lld -flavor gnu -target x86_64 %t.o --noinhibit-exec -o %t2.out --output-filetype=yaml
# RUN: lld -flavor old-gnu -target x86_64 %t.o --noinhibit-exec -o %t2.out --output-filetype=yaml
# RUN: FileCheck %s -check-prefix=CHECKRELOCS < %t2.out

FileHeader:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/multi-weak-layout.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Test that we are able to layout multiple weak symbols
# properly

RUN: lld -flavor gnu -target x86_64 %p/Inputs/multiweaksyms.o \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/multiweaksyms.o \
RUN: --noinhibit-exec -static --output-filetype=yaml -o %t
RUN: FileCheck %s -check-prefix=WEAKSYMS < %t

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/X86_64/multi-weak-override.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Test for weak symbol getting overridden
RUN: lld -flavor gnu -target x86_64 %p/Inputs/multi-weak.o \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/multi-weak.o \
RUN: %p/Inputs/multi-ovrd.o -o %t -e main --noinhibit-exec
RUN: llvm-nm -n %t | FileCheck -check-prefix=WEAKORDER %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/multi-weak.o \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/multi-weak.o \
RUN: %p/Inputs/multi-ovrd.o --output-filetype=yaml -o %t2 --noinhibit-exec
RUN: FileCheck -check-prefix=WEAKATOMSORDER %s < %t2

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/X86_64/multi-weak-syms-order.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Test for weak symbol getting overridden
RUN: lld -flavor gnu -target x86_64 %p/Inputs/multi-weak.o -o %t --noinhibit-exec
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/multi-weak.o -o %t --noinhibit-exec
RUN: llvm-nm -n %t | FileCheck -check-prefix=WEAKORDER %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/multi-weak.o -o %t2 --output-filetype=yaml --noinhibit-exec
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/multi-weak.o -o %t2 --output-filetype=yaml --noinhibit-exec
RUN: FileCheck -check-prefix=WEAKATOMSORDER %s < %t2

WEAKORDER: {{[0-9a-f]+}} T fn
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/nmagic.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This tests verifies functionality of NMAGIC that we create only two segments,
# PT_LOAD, PT_TLS
# The data segment should be aligned to a page boundary
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/nmagic.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/nmagic.o \
RUN: --noinhibit-exec -o %t --nmagic -static
RUN: llvm-readobj -sections %t | FileCheck -check-prefix=NMAGICSECTIONS %s
RUN: llvm-readobj -program-headers %t | FileCheck -check-prefix=NMAGICPROGRAMHEADERS %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/noalignsegments.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Build executable
# RUN: yaml2obj -format=elf -docnum 1 %s -o %t.o
# RUN: lld -flavor gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: lld -flavor old-gnu -target x86_64 %t.o -o %t.exe -static \
# RUN: --no-align-segments --noinhibit-exec
# RUN: llvm-readobj -program-headers %t.exe | FileCheck %s
#
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/note-sections-ro_plus_rw.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# if they appear in the input, it looks like we need to differentiate RO note
# sections from RW note sections, and each creating a segment of its own

RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/note_ro_rw.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/note_ro_rw.o \
RUN: --noinhibit-exec -o %t -static
RUN: llvm-readobj -sections %t | FileCheck -check-prefix=NOTESECTIONS %s
RUN: llvm-readobj -program-headers %t | FileCheck -check-prefix=NOTESEGMENT %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/note-sections.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This tests the functionality that lld is able to recreate the note sections
# if they appear in the input

RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/note.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/note.o \
RUN: --noinhibit-exec -o %t -static
RUN: llvm-readobj -sections %t | FileCheck -check-prefix=NOTESECTIONS %s
RUN: llvm-readobj -program-headers %t | FileCheck -check-prefix=NOTESEGMENT %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/omagic.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This tests verifies functionality of omagic that we create only two segments,
# PT_LOAD, PT_TLS
# The data segment should not be aligned to a page boundary
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/nmagic.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/nmagic.o \
RUN: --noinhibit-exec -o %t --omagic -static
RUN: llvm-readobj -sections %t | FileCheck -check-prefix=OMAGICSECTIONS %s
RUN: llvm-readobj -program-headers %t | FileCheck -check-prefix=OMAGICPROGRAMHEADERS %s
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/X86_64/outputsegments.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

# Build executable
# RUN: yaml2obj -format=elf -docnum 1 %s -o %t.o
# RUN: lld -flavor gnu -target x86_64 %t.o -o %t1.exe -static \
# RUN: lld -flavor old-gnu -target x86_64 %t.o -o %t1.exe -static \
# RUN: --no-align-segments --noinhibit-exec
# RUN: lld -flavor gnu -target x86_64 %t.o -o %t2.exe -static \
# RUN: lld -flavor old-gnu -target x86_64 %t.o -o %t2.exe -static \
# RUN: --noinhibit-exec
# RUN: llvm-readobj -program-headers %t1.exe | FileCheck %s -check-prefix=SEGMENTS
# RUN: llvm-readobj -program-headers %t2.exe | FileCheck %s -check-prefix=SEGMENTS
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/reloc_r_x86_64_16.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tests that lld can handle relocations of type R_X86_64_16
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t1.o
#RUN: lld -flavor gnu -target x86_64 %t1.o --noinhibit-exec -o %t2.out -static
#RUN: lld -flavor old-gnu -target x86_64 %t1.o --noinhibit-exec -o %t2.out -static
#RUN: llvm-objdump -s %t2.out | FileCheck %s
#CHECK: Contents of section .data:
#CHECK: 401000 0210
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/reloc_r_x86_64_pc16.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tests that lld can handle relocations of type R_X86_64_PC16
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t1.o
#RUN: lld -flavor gnu -target x86_64 %t1.o --noinhibit-exec -o %t2.out -static
#RUN: lld -flavor old-gnu -target x86_64 %t1.o --noinhibit-exec -o %t2.out -static
#RUN: llvm-objdump -s %t2.out | FileCheck %s
#CHECK: Contents of section .data:
#CHECK: 401000 0700
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/reloc_r_x86_64_pc64.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tests that lld can handle relocations of type R_X86_64_PC64
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t1.o
#RUN: lld -flavor gnu -target x86_64 %t1.o --noinhibit-exec -o %t2.out -static
#RUN: lld -flavor old-gnu -target x86_64 %t1.o --noinhibit-exec -o %t2.out -static
#RUN: llvm-objdump -s %t2.out | FileCheck %s
#CHECK: Contents of section .data:
#CHECK: 401000 0a00
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/rodata.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This tests that the ordinals for all merge atoms and defined atoms have been
# set properly

RUN: lld -flavor gnu -target x86_64 %p/Inputs/rodata.o --noinhibit-exec \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/rodata.o --noinhibit-exec \
RUN: --merge-strings -static -o %t1
RUN: llvm-nm -n %t1 | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/sectionchoice.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This tests that we are able to properly set the sectionChoice for DefinedAtoms
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/zerosizedsection.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/zerosizedsection.o \
RUN: --noinhibit-exec -o %t --output-filetype=yaml
RUN: FileCheck %s < %t

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/sectionmap.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This tests that we are able to merge the section .gcc_except_table,
# .data.rel.local, .data.rel.ro, any other sections that belong to .data
# into appropriate output sections
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/sectionmap.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/sectionmap.o \
RUN: --noinhibit-exec -o %t
RUN: llvm-readobj -sections %t | FileCheck %s -check-prefix=VERIFYSECTIONHEADERS

Expand Down
16 changes: 8 additions & 8 deletions lld/test/elf/X86_64/startGroupEndGroup.test
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# This tests functionality of --start-group, --end-group

# This link should fail with unresolve symbol
RUN: not lld -flavor gnu -target x86_64 %p/Inputs/group/1.o \
RUN: not lld -flavor old-gnu -target x86_64 %p/Inputs/group/1.o \
RUN: %p/Inputs/group/libfn.a %p/Inputs/group/libfn1.a -o x 2> %t.err

# Test group
RUN: lld -flavor gnu -target x86_64 %p/Inputs/group/1.o --start-group \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/group/1.o --start-group \
RUN: %p/Inputs/group/libfn.a %p/Inputs/group/libfn1.a --end-group -o %t1

# Mix object files in group
RUN: lld -flavor gnu -target x86_64 %p/Inputs/group/1.o --start-group \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/group/1.o --start-group \
RUN: %p/Inputs/group/fn.o %p/Inputs/group/fn2.o \
RUN: %p/Inputs/group/fn1.o --end-group -o %t2

# Mix Whole archive input, the group should not iterate the file libfn.a
RUN: lld -flavor gnu -target x86_64 %p/Inputs/group/1.o --start-group \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/group/1.o --start-group \
RUN: --whole-archive %p/Inputs/group/libfn.a --no-whole-archive \
RUN: %p/Inputs/group/libfn1.a --end-group -o %t3

# Defined symbols in a shared library.
RUN: lld -flavor gnu -target x86_64 %p/Inputs/group/1.o --start-group \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/group/1.o --start-group \
RUN: %p/Inputs/group/libfn2.so %p/Inputs/group/fn1.o %p/Inputs/group/fn.o \
RUN: --end-group -o %t4

# Test alias options too, as they are more widely used
# Test group
RUN: lld -flavor gnu -target x86_64 %p/Inputs/group/1.o '-(' \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/group/1.o '-(' \
RUN: %p/Inputs/group/libfn.a %p/Inputs/group/libfn1.a '-)' -o %t1.alias

# Mix object files in group
RUN: lld -flavor gnu -target x86_64 %p/Inputs/group/1.o '-(' \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/group/1.o '-(' \
RUN: %p/Inputs/group/fn.o %p/Inputs/group/fn2.o \
RUN: %p/Inputs/group/fn1.o '-)' -o %t2.alias

# Mix Whole archive input, the group should not iterate the file libfn.a
RUN: lld -flavor gnu -target x86_64 %p/Inputs/group/1.o '-(' \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/group/1.o '-(' \
RUN: --whole-archive %p/Inputs/group/libfn.a --no-whole-archive \
RUN: %p/Inputs/group/libfn1.a '-)' -o %t3.alias

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/startGroupEndGroupWithDynlib.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This tests functionality of --start-group, --end-group with a dynamic library

# Mix dynamic libraries/object files in group
RUN: lld -flavor gnu -target x86_64 %p/Inputs/group/1.o --start-group \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/group/1.o --start-group \
RUN: %p/Inputs/group/libfn.so %p/Inputs/group/fn2.o \
RUN: %p/Inputs/group/fn1.o --end-group -o %t1

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/staticlib-search.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This tests the functionality for finding the static library libfn.a for ELF
RUN: lld -flavor gnu -target x86_64 %p/Inputs/main.o -L%p/Inputs/ -lfn -o %t \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/main.o -L%p/Inputs/ -lfn -o %t \
RUN: --noinhibit-exec -static -t 2> %t1
RUN: FileCheck %s < %t1

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/X86_64/undef.test
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This tests the functionality that an undefined symbol thats defined in the
# commmand line pulls in the required object file from the archive library
# which is usually the usecase for it
RUN: lld -flavor gnu -target x86_64 -u fn %p/Inputs/libfn.a -o %t --noinhibit-exec
RUN: lld -flavor old-gnu -target x86_64 -u fn %p/Inputs/libfn.a -o %t --noinhibit-exec
RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=SYMFROMARCHIVE %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/libfn.a -o %t --noinhibit-exec
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/libfn.a -o %t --noinhibit-exec
RUN: llvm-readobj -symbols %t | FileCheck %s

SYMFROMARCHIVE: Symbol {
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/X86_64/underscore-end.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This tests verifies that the value of _end symbol is point to the right value
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/nmagic.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/nmagic.o \
RUN: --noinhibit-exec -o %t --nmagic
RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=NMAGICABSSYMBOLS %s
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/nmagic.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/nmagic.o \
RUN: --noinhibit-exec -o %t --omagic
RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=OMAGICABSSYMBOLS %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/X86_64/weak-override.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Test for weak symbol getting overridden
RUN: lld -flavor gnu -target x86_64 %p/Inputs/weak.o %p/Inputs/ovrd.o \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/weak.o %p/Inputs/ovrd.o \
RUN: -o %t --noinhibit-exec
RUN: llvm-nm %t | FileCheck -check-prefix=WEAKORDER %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/weak.o \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/weak.o \
RUN: %p/Inputs/ovrd.o -o %t2 --output-filetype=yaml --noinhibit-exec
RUN: FileCheck -check-prefix=WEAKATOMSORDER %s < %t2

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/X86_64/weak-zero-sized.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Test for zero sized weak atoms, there is only a single weak atom
RUN: lld -flavor gnu -target x86_64 %p/Inputs/weak-zero-sized.o -o %t \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/weak-zero-sized.o -o %t \
RUN: --noinhibit-exec
RUN: llvm-nm %t | FileCheck -check-prefix=WEAKORDER %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/weak-zero-sized.o \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/weak-zero-sized.o \
RUN: --output-filetype=yaml -o %t2 --noinhibit-exec
RUN: FileCheck -check-prefix=WEAKATOMSORDER %s < %t2

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/X86_64/weaksym.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# symbol.

#RUN: yaml2obj --format elf %s -o %t.o
#RUN: lld -flavor gnu -target x86_64 -e main %t.o -o %t1
#RUN: lld -flavor old-gnu -target x86_64 -e main %t.o -o %t1
#RUN: llvm-readobj -dt %t1 | FileCheck -check-prefix CHECKSYMS %s

#CHECKSYMS: Name: x@
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/X86_64/yamlinput.test
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This tests the functionality that lld is able to read
# an input YAML from a previous link

RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/initfini.o \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/initfini.o \
RUN: --noinhibit-exec --output-filetype=yaml -o %t.objtxt
RUN: lld -flavor gnu -target x86_64-linux %t.objtxt \
RUN: lld -flavor old-gnu -target x86_64-linux %t.objtxt \
RUN: --noinhibit-exec -o %t1
RUN: llvm-readobj -sections %t1 | FileCheck %s -check-prefix=SECTIONS

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/abs-dup.objtxt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Tests handling an absolute symbol with no name
# RUN: lld -flavor gnu -target x86_64 -r %s \
# RUN: lld -flavor old-gnu -target x86_64 -r %s \
# RUN: --output-filetype=yaml | FileCheck %s

absolute-atoms:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/abs.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# built using: "gcc -m32"
#
RUN: lld -flavor gnu -target i386 --output-filetype=yaml -r %p/Inputs/abs-test.i386 | FileCheck -check-prefix=YAML %s
RUN: lld -flavor old-gnu -target i386 --output-filetype=yaml -r %p/Inputs/abs-test.i386 | FileCheck -check-prefix=YAML %s

YAML: absolute-atoms:
YAML: - name: absLocalSymbol
Expand Down
6 changes: 3 additions & 3 deletions lld/test/elf/allowduplicates.objtxt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# RUN: lld -flavor gnu -target x86_64 --allow-multiple-definition %s \
# RUN: lld -flavor old-gnu -target x86_64 --allow-multiple-definition %s \
# RUN: %p/Inputs/allowduplicates.objtxt \
# RUN: --output-filetype=yaml --noinhibit-exec | FileCheck %s
#
# RUN: not lld -flavor gnu -target x86_64 %s %p/Inputs/allowduplicates.objtxt \
# RUN: not lld -flavor old-gnu -target x86_64 %s %p/Inputs/allowduplicates.objtxt \
# RUN: --output-filetype=yaml \
# RUN: --noinhibit-exec 2>&1 | FileCheck -check-prefix=ERROR %s
#
# RUN: lld -flavor gnu -target x86_64 -z muldefs %s \
# RUN: lld -flavor old-gnu -target x86_64 -z muldefs %s \
# RUN: %p/Inputs/allowduplicates.objtxt \
# RUN: --noinhibit-exec --output-filetype=yaml | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/archive-elf-forceload.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# }
# gcc -c main.c fn.c fn1.c

RUN: lld -flavor gnu -target x86_64-linux -e main %p/Inputs/mainobj.x86_64 \
RUN: lld -flavor old-gnu -target x86_64-linux -e main %p/Inputs/mainobj.x86_64 \
RUN: --whole-archive %p/Inputs/libfnarchive.a --no-whole-archive --output-filetype=yaml \
RUN: | FileCheck -check-prefix FORCELOAD %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/archive-elf.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# }
# gcc -c main.c fn.c fn1.c

RUN: lld -flavor gnu -target x86_64-linux --output-filetype=yaml -r \
RUN: lld -flavor old-gnu -target x86_64-linux --output-filetype=yaml -r \
RUN: %p/Inputs/mainobj.x86_64 %p/Inputs/libfnarchive.a | \
RUN: FileCheck -check-prefix NOFORCELOAD %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/as-needed.test
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
RUN: --as-needed %p/Inputs/shared.so-x86-64 %p/Inputs/libifunc.x86-64.so \
RUN: -o %t1 -e main --allow-shlib-undefined
RUN: llvm-readobj -dynamic-table %t1 | FileCheck %s -check-prefix AS_NEEDED

AS_NEEDED: NEEDED SharedLibrary (shared.so-x86-64)
AS_NEEDED-NOT: NEEDED SharedLibrary (libifunc.x86-64.so)

RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 %p/Inputs/libifunc.x86-64.so \
RUN: -o %t2 -e main --allow-shlib-undefined
RUN: llvm-readobj -dynamic-table %t2 | FileCheck %s -check-prefix NO_AS_NEEDED
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/branch.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RUN: lld -flavor gnu -target hexagon -static --output-filetype=yaml \
RUN: lld -flavor old-gnu -target hexagon -static --output-filetype=yaml \
RUN: %p/Inputs/branch-test.hexagon %p/Inputs/target-test.hexagon --noinhibit-exec | FileCheck %s -check-prefix hexagon-yaml
RUN: lld -flavor gnu -target hexagon -e target -o %t1 \
RUN: lld -flavor old-gnu -target hexagon -e target -o %t1 \
RUN: %p/Inputs/branch-test.hexagon %p/Inputs/target-test.hexagon --noinhibit-exec
RUN: llvm-readobj -h %t1 | FileCheck -check-prefix=hexagon-readobj %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/check.test
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This tests the basic functionality of ordering data and functions as they
# appear in the inputs
RUN: lld -flavor gnu -target i386 -e global_func --noinhibit-exec --output-filetype=yaml \
RUN: lld -flavor old-gnu -target i386 -e global_func --noinhibit-exec --output-filetype=yaml \
RUN: %p/Inputs/object-test.elf-i386 -o %t
RUN: FileCheck %s -check-prefix ELF-i386 < %t
RUN: lld -flavor gnu -target hexagon -e global_func --noinhibit-exec --output-filetype=yaml \
RUN: lld -flavor old-gnu -target hexagon -e global_func --noinhibit-exec --output-filetype=yaml \
RUN: %p/Inputs/object-test.elf-hexagon -o %t1
RUN: FileCheck %s -check-prefix ELF-hexagon < %t1

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/checkrodata.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

RUN: lld -flavor gnu -target i386 -o %t1 %p/Inputs/rodata-test.i386 --noinhibit-exec
RUN: lld -flavor old-gnu -target i386 -o %t1 %p/Inputs/rodata-test.i386 --noinhibit-exec
RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix=i386 %s
RUN: lld -flavor gnu -target hexagon -o %t2 %p/Inputs/rodata-test.hexagon --noinhibit-exec
RUN: lld -flavor old-gnu -target hexagon -o %t2 %p/Inputs/rodata-test.hexagon --noinhibit-exec
RUN: llvm-objdump -section-headers %t2 | FileCheck -check-prefix=hexagon %s

i386: .rodata 00000004 0000000000000114 DATA
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/common.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: lld -flavor gnu -target x86_64-linux -o %t %p/Inputs/relocs.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux -o %t %p/Inputs/relocs.x86-64 \
RUN: -e _start -static
RUN: llvm-readobj -t %t | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/consecutive-weak-sym-defs.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
#RUN: yaml2obj -format=elf %p/Inputs/consecutive-weak-defs.o.yaml -o=%t1.o
#RUN: yaml2obj -format=elf %p/Inputs/main-with-global-def.o.yaml -o=%t2.o
#RUN: lld -flavor gnu -target x86_64 %t1.o %t2.o -e=main -o %t1
#RUN: lld -flavor old-gnu -target x86_64 %t1.o %t2.o -e=main -o %t1
#RUN: obj2yaml %t1 | FileCheck -check-prefix CHECKLAYOUT %s
#
# Check that the layout has not been changed:
Expand Down
6 changes: 3 additions & 3 deletions lld/test/elf/defsym.objtxt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# RUN: lld -flavor gnu -target x86_64 --defsym=foo=0x1234 -r %s \
# RUN: lld -flavor old-gnu -target x86_64 --defsym=foo=0x1234 -r %s \
# RUN: --output-filetype=yaml | FileCheck -check-prefix=ABS %s

# RUN: lld -flavor gnu -target x86_64 --defsym=foo=main -r %s \
# RUN: lld -flavor old-gnu -target x86_64 --defsym=foo=main -r %s \
# RUN: --output-filetype=yaml | FileCheck -check-prefix=ALIAS %s

# RUN: lld -flavor gnu -target x86_64 --defsym foo=main -r %s \
# RUN: lld -flavor old-gnu -target x86_64 --defsym foo=main -r %s \
# RUN: --output-filetype=yaml | FileCheck -check-prefix=ALIAS %s

defined-atoms:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/discard-all.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Test that -x/--discard all works.
#
#RUN: yaml2obj -format=elf %s -o=%t.o
#RUN: lld -flavor gnu -target x86_64 %t.o -e=main -x -o %t1
#RUN: lld -flavor old-gnu -target x86_64 %t.o -e=main -x -o %t1
#RUN: llvm-objdump -t %t1 | FileCheck %s

#CHECK-NOT: 0000000000400210 l F .text 00000009 local
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/discard-locals.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Test that -X/--discard-locals works.
#
#RUN: yaml2obj -format=elf %s -o=%t.o
#RUN: lld -flavor gnu -target x86_64 %t.o -shared -X -o %t1
#RUN: lld -flavor old-gnu -target x86_64 %t.o -shared -X -o %t1
#RUN: llvm-objdump -t %t1 | FileCheck %s

#CHECK-NOT: 0000000000400121 l .rodata 00000000 .Lsym8
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/dynamic-segorder.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 -o %t -e main --allow-shlib-undefined \
RUN: --defsym=__tls_get_addr=0
RUN: llvm-objdump -p %t | FileCheck %s
Expand Down
10 changes: 5 additions & 5 deletions lld/test/elf/dynamic-undef.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
#
# This test will fail because there are unresolved symbols from the shared
# library and we are passing --no-allow-shlib-undefined
RUN: not lld -flavor gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: not lld -flavor old-gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 -o %t -e main --no-allow-shlib-undefined 2> %t1
RUN: FileCheck -check-prefix=EXEC %s < %t1
# This test will pass because of --allow-shlib-undefined
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 -o %t -e main --allow-shlib-undefined \
RUN: --defsym=__tls_get_addr=0
# This test will pass becase --allow-shlib-undefined is the default.
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 -o %t -e main \
RUN: --defsym=__tls_get_addr=0
# Building shared libraries should not fail when there is a undefined symbol.
# Test creation of shared library, this should pass because we are using
# shared option and by default, dynamic library wouldn't create undefined atoms
# from the input shared library
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 -o %t.usenoundefines -e main -shared
RUN: llvm-readobj -symbols %t.usenoundefines | FileCheck %s -check-prefix=SHLIB-NOUNDEF
# Test creation of shared library, this should fail because we are using
# shared option setting the options to use the shared library undefines to
# create undefined atoms from the input shared library
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/tls.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 -o %t.useundefines -e main -shared \
RUN: --use-shlib-undefines --no-allow-shlib-undefined 2> %t2
RUN: llvm-readobj -symbols %t.useundefines | FileCheck -check-prefix=SHLIB-UNDEF-SYMBOLS %s
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/dynamic.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Checks functionality of dynamic executables
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 -o %t -e main --allow-shlib-undefined \
RUN: -rpath /l1:/l2 -rpath /l3
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/use-shared.x86-64 \
RUN: %p/Inputs/shared.so-x86-64 --output-filetype=yaml -o %t2 --allow-shlib-undefined \
RUN: --noinhibit-exec
RUN: llvm-objdump -p %t >> %t2
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/eh_frame_hdr.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#RUN: yaml2obj -format=elf %s > %t
#RUN: lld -flavor gnu -target x86_64-linux %t --noinhibit-exec \
#RUN: lld -flavor old-gnu -target x86_64-linux %t --noinhibit-exec \
#RUN: -o %t1
#RUN: llvm-objdump -s %t1 | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/entry.objtxt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# }
#

# RUN: lld -flavor gnu -target x86_64 %s -e _entrypoint --noinhibit-exec -o %t1
# RUN: lld -flavor old-gnu -target x86_64 %s -e _entrypoint --noinhibit-exec -o %t1
# RUN: llvm-nm -n %t1 | FileCheck %s
#
# CHECK: U _entrypoint
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/export-dynamic.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# its dynamic symbol table.

#RUN: yaml2obj -format=elf %s -o=%t.o
#RUN: lld -flavor gnu -target x86_64 -E %t.o -e=main -o %t1
#RUN: lld -flavor old-gnu -target x86_64 -E %t.o -e=main -o %t1
#RUN: llvm-readobj -dt %t1 | FileCheck -check-prefix CHECKSYMS %s

#CHECKSYMS: myfunc1@
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/filenotfound.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Check that a file that cannot be found results in a proper error message
RUN: not lld -flavor gnu -target x86_64 %p/Inputs/nofile.o 2>&1 | FileCheck %s
RUN: not lld -flavor old-gnu -target x86_64 %p/Inputs/nofile.o 2>&1 | FileCheck %s
#CHECK: lld: cannot find file {{.+[\\/]}}nofile.o
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# .long foo
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t.linkonce1a.o
#RUN: yaml2obj -format=elf -docnum 2 %s -o %t.linkonce1b.o
#RUN: lld -flavor gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: --noinhibit-exec --output-filetype=yaml -o %t2.out.yaml
#RUN: lld -flavor gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: --noinhibit-exec -o %t2.out
#RUN: FileCheck %s -check-prefix=CHECKGNULINKONCE < %t2.out.yaml
#RUN: llvm-readobj -sections %t2.out | FileCheck %s -check-prefix=CHECKGNULINKONCESECTIONS
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/gnulinkonce/gnulinkonce-report-undef.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
# .long foo
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t.linkonce1a.o
#RUN: yaml2obj -format=elf -docnum 2 %s -o %t.linkonce1b.o
#RUN: not lld -flavor gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: not lld -flavor old-gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: --output-filetype=yaml -o %t2.out.yaml 2>&1 | FileCheck \
#RUN: -check-prefix=UNDEFS %s
#RUN: not lld -flavor gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: not lld -flavor old-gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: -o %t2.out 2>&1 | FileCheck -check-prefix=UNDEFS %s
#UNDEFS: Undefined symbol: {{.*}} foo
---
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/gnulinkonce/gnulinkonce.test
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
# .long 0
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t.linkonce1a.o
#RUN: yaml2obj -format=elf -docnum 2 %s -o %t.linkonce1b.o
#RUN: lld -flavor gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: --noinhibit-exec --output-filetype=yaml -o %t2.out.yaml
#RUN: lld -flavor gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.linkonce1a.o %t.linkonce1b.o \
#RUN: --noinhibit-exec -o %t2.out
#RUN: FileCheck %s -check-prefix=CHECKGNULINKONCE < %t2.out.yaml
#RUN: llvm-readobj -sections %t2.out | FileCheck %s -check-prefix=CHECKGNULINKONCESECTIONS
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/gotpcrel.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This test checks that GOTPCREL entries are being handled properly
RUN: lld -flavor gnu -target x86_64-linux -static -e main --output-filetype=yaml \
RUN: lld -flavor old-gnu -target x86_64-linux -static -e main --output-filetype=yaml \
RUN: --noinhibit-exec %p/Inputs/gotpcrel.x86-64 \
RUN: | FileCheck %s -check-prefix=YAML

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/gottpoff.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Reference: Ulrich Drepper's "ELF Handling for Thread-Local storage"

#RUN: yaml2obj -format=elf %s -o %t.o
#RUN: lld -flavor gnu -target x86_64 %t.o -o %t -e=main --defsym=__tls_get_addr=0
#RUN: lld -flavor old-gnu -target x86_64 %t.o -o %t -e=main --defsym=__tls_get_addr=0
#RUN: llvm-readobj -r %t | FileCheck %s
#
#CHECK: Section (5) .rela.dyn {
Expand Down
20 changes: 10 additions & 10 deletions lld/test/elf/group-cmd-search.test
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
This link should finish successfully. The --start-group/--end-group
contains an existing absolute path to the file.

RUN: lld -flavor gnu -target x86_64 -shared \
RUN: lld -flavor old-gnu -target x86_64 -shared \
RUN: -L%p/Inputs %p/Inputs/use-shared.x86-64 \
RUN: --start-group %p/Inputs/shared.so-x86-64 --end-group -o %t1
*/
Expand All @@ -41,7 +41,7 @@ RUN: --start-group %p/Inputs/shared.so-x86-64 --end-group -o %t1
There is no shared.so-x86-64 file in the current directory.

RUN: not \
RUN: lld -flavor gnu -target x86_64 -shared \
RUN: lld -flavor old-gnu -target x86_64 -shared \
RUN: -L%p/Inputs %p/Inputs/use-shared.x86-64 \
RUN: --start-group shared.so-x86-64 --end-group -o %t2
*/
Expand All @@ -52,7 +52,7 @@ RUN: --start-group shared.so-x86-64 --end-group -o %t2
should not attempt to search it under the sysroot directory.

RUN: not \
RUN: lld -flavor gnu -target x86_64 -shared --sysroot=%p/Inputs \
RUN: lld -flavor old-gnu -target x86_64 -shared --sysroot=%p/Inputs \
RUN: -L%p/Inputs %p/Inputs/use-shared.x86-64 \
RUN: --start-group /shared.so-x86-64 --end-group -o %t3
*/
Expand All @@ -62,7 +62,7 @@ RUN: --start-group /shared.so-x86-64 --end-group -o %t3
script contains "GROUP ( shared.so-x86-64 )" command and the linker
has to search shared.so-x86-64 through the library search paths.

RUN: lld -flavor gnu -target x86_64 -shared \
RUN: lld -flavor old-gnu -target x86_64 -shared \
RUN: -L%p/Inputs %p/Inputs/use-shared.x86-64 \
RUN: %p/Inputs/group-cmd-search-1.ls -o %t4
*/
Expand All @@ -73,7 +73,7 @@ RUN: %p/Inputs/group-cmd-search-1.ls -o %t4
a non-existing absolute path but there is no --sysroot argument.

RUN: not \
RUN: lld -flavor gnu -target x86_64 -shared \
RUN: lld -flavor old-gnu -target x86_64 -shared \
RUN: -L%p/Inputs %p/Inputs/use-shared.x86-64 \
RUN: %p/Inputs/group-cmd-search-2.ls -o %t5
*/
Expand All @@ -84,7 +84,7 @@ RUN: %p/Inputs/group-cmd-search-2.ls -o %t5
directory is provided. The linker has to search the absolute path
under the sysroot directory.

RUN: lld -flavor gnu -target x86_64 -shared --sysroot=%p/Inputs \
RUN: lld -flavor old-gnu -target x86_64 -shared --sysroot=%p/Inputs \
RUN: -L%p/Inputs %p/Inputs/use-shared.x86-64 \
RUN: %p/Inputs/group-cmd-search-2.ls -o %t6
*/
Expand All @@ -95,7 +95,7 @@ RUN: %p/Inputs/group-cmd-search-2.ls -o %t6
directory is provided. The linker has to search the absolute path
under the sysroot directory.

RUN: lld -flavor gnu -target x86_64 -shared --sysroot=%p/Inputs/../Inputs \
RUN: lld -flavor old-gnu -target x86_64 -shared --sysroot=%p/Inputs/../Inputs \
RUN: -L%p/Inputs %p/Inputs/use-shared.x86-64 \
RUN: %p/Inputs/group-cmd-search-2.ls -o %t6
*/
Expand All @@ -108,7 +108,7 @@ RUN: %p/Inputs/group-cmd-search-2.ls -o %t6
has a -l<lib name> form and should be found by constructing a full
library name lib<lib name>.a and iterating through lib dirs.

RUN: lld -flavor gnu -target x86_64 -shared \
RUN: lld -flavor old-gnu -target x86_64 -shared \
RUN: -L%p/Inputs %p/Inputs/use-shared.x86-64 \
RUN: %p/Inputs/group-cmd-search-3.ls -o %t8
*/
Expand All @@ -120,13 +120,13 @@ RUN: %p/Inputs/group-cmd-search-3.ls -o %t8
But the linker script itself is not under the sysroot.

RUN: not \
RUN: lld -flavor gnu -target x86_64 -shared --sysroot=%p/Inputs \
RUN: lld -flavor old-gnu -target x86_64 -shared --sysroot=%p/Inputs \
RUN: -L%p/Inputs %p/Inputs/use-shared.x86-64 \
RUN: %s -o %t7
*/

/*
RUN: lld -flavor gnu -target x86_64 -shared \
RUN: lld -flavor old-gnu -target x86_64 -shared \
RUN: -L%p/Inputs %p/Inputs/use-shared.x86-64 \
RUN: -l:group-cmd-search-1.ls -o %t9
*/
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/hexagon-quickdata-sort.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: lld -flavor gnu -target hexagon %p/Inputs/quickdata-sort-test.o.elf-hexagon -o %t1 --noinhibit-exec
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/quickdata-sort-test.o.elf-hexagon -o %t1 --noinhibit-exec
RUN: llvm-nm -n %t1 | FileCheck %s -check-prefix=quickdataSort

quickdataSort: 00002000 D A1
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/hexagon-quickdata-sortcommon.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: lld -flavor gnu -target hexagon -o %t1 --noinhibit-exec \
RUN: lld -flavor old-gnu -target hexagon -o %t1 --noinhibit-exec \
RUN: %p/Inputs/quickdata-sortcommon-test.o.elf-hexagon
RUN: llvm-nm -n %t1 | FileCheck %s -check-prefix=quickdataSortCommon

Expand Down
8 changes: 4 additions & 4 deletions lld/test/elf/ifunc.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

# This test checks that IRELATIVE relocations are created for symbols that
# need relocation even for static links.
RUN: lld -flavor gnu -target x86_64-linux --output-filetype=yaml -r \
RUN: lld -flavor old-gnu -target x86_64-linux --output-filetype=yaml -r \
RUN: %p/Inputs/ifunc.x86-64 | FileCheck %s

RUN: lld -flavor gnu -target x86_64-linux --output-filetype=yaml --noinhibit-exec \
RUN: lld -flavor old-gnu -target x86_64-linux --output-filetype=yaml --noinhibit-exec \
RUN: %p/Inputs/ifunc.x86-64 %p/Inputs/ifunc.cpp.x86-64 \
RUN: | FileCheck %s --check-prefix=PLT

RUN: lld -flavor gnu -target x86_64-linux -o %t %p/Inputs/ifunc.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux -o %t %p/Inputs/ifunc.x86-64 \
RUN: -e main -static %p/Inputs/ifunc.cpp.x86-64
RUN: llvm-objdump -d -s %t| FileCheck %s --check-prefix=BIN
RUN: llvm-readobj -r %t | FileCheck %s --check-prefix=RELATIVEADDEND

# Test that STT_GNU_IFUNC symbols have type Code in SharedLibraryAtom.
RUN: lld -flavor gnu -target x86_64-linux --output-filetype=yaml \
RUN: lld -flavor old-gnu -target x86_64-linux --output-filetype=yaml \
RUN: --noinhibit-exec %p/Inputs/ifunc.cpp.x86-64 -L%p/Inputs -lifunc.x86-64 \
RUN: | FileCheck %s --check-prefix=SHARED

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/ignore-unknownoption.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This test tests that lld is able to print unknown options that are not
# recognized.
RUN: not lld -flavor gnu -target x86_64 --gc-sections 2> %t
RUN: not lld -flavor old-gnu -target x86_64 --gc-sections 2> %t
RUN: FileCheck %s < %t
CHECK: warning: ignoring unknown argument: --gc-sections
2 changes: 1 addition & 1 deletion lld/test/elf/init_array-order.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#RUN: yaml2obj -format=elf %s > %t
#RUN: lld -flavor gnu -target x86_64-linux %t --noinhibit-exec \
#RUN: lld -flavor old-gnu -target x86_64-linux %t --noinhibit-exec \
#RUN: -o %t1.out
#RUN: llvm-objdump -s %t1.out | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/init_array.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# specially for C++ global constructors).

#RUN: yaml2obj -format=elf %s -o=%t.o
#RUN: lld -flavor gnu -target x86_64 %t.o -o %t -e=main
#RUN: lld -flavor old-gnu -target x86_64 %t.o -o %t -e=main
#RUN: llvm-objdump -t -section-headers %t | FileCheck %s

#CHECK: .init_array {{[0-9]+}} [[ADDR:[0-9]+]]
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/initfini-options.test-1.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# are undefined the linker does not emit DT_INIT/DT_FINI tags.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target x86_64 -shared --noinhibit-exec -o %t.so %t.o
# RUN: lld -flavor old-gnu -target x86_64 -shared --noinhibit-exec -o %t.so %t.o
# RUN: llvm-readobj -dynamic-table %t.so | FileCheck %s

# CHECK-NOT: 0x000000000000000C INIT 0x{{[0-9A-F]+}}
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/initfini-options.test-2.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# DT_INIT/DT_FINI tags point to these symbols.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target x86_64 -shared -o %t.so %t.o
# RUN: lld -flavor old-gnu -target x86_64 -shared -o %t.so %t.o
# RUN: llvm-readobj -symbols -dynamic-table %t.so | FileCheck %s

# CHECK: Name: _init (8)
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/initfini-options.test-3.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# and the linker uses these name to search symbols and setup DT_INIT/DT_FINI.

# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target x86_64 -shared -o %t.so %t.o \
# RUN: lld -flavor old-gnu -target x86_64 -shared -o %t.so %t.o \
# RUN: -init _init -init _start -fini _fini -fini _stop
# RUN: llvm-readobj -symbols -dynamic-table %t.so | FileCheck %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/librarynotfound.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Tests the functionality of library not found
RUN: not lld -flavor gnu -lfn 2> %t1
RUN: not lld -flavor old-gnu -lfn 2> %t1
RUN: FileCheck %s < %t1

CHECK: Unable to find library -lfn
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/externs.objtxt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check symbols defined with the EXTERN command are added as undefined
# symbols.

# RUN: lld -flavor gnu -target x86_64 -T %p/Inputs/externs.ls -r %s \
# RUN: lld -flavor old-gnu -target x86_64 -T %p/Inputs/externs.ls -r %s \
# RUN: --output-filetype=yaml | FileCheck %s

defined-atoms:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/filename-with-wildcards.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN: yaml2obj -format=elf %p/Inputs/prog2.o.yaml -o=%T/p2-wc.o
RUN: yaml2obj -format=elf %p/Inputs/prog3.o.yaml -o=%T/p3-wc.o
RUN: cd %T

RUN: lld -flavor gnu -target x86_64 -T %s p1-wc.o p2-wc.o p3-wc.o \
RUN: lld -flavor old-gnu -target x86_64 -T %s p1-wc.o p2-wc.o p3-wc.o \
RUN: -static -o %t1
RUN: llvm-readobj -s %t1 | FileCheck -check-prefix CHECKSECTIONS %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/linkerscript/invalid-script-cli-1.test
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Check that the -T/--script options issue an error when passed
# filenames for files that do not exist.

RUN: not lld -flavor gnu -target x86_64 -T idonotexist.ls 2> %t.err
RUN: not lld -flavor old-gnu -target x86_64 -T idonotexist.ls 2> %t.err
RUN: FileCheck %s < %t.err

RUN: not lld -flavor gnu -target x86_64 --script=idonotexist.ls 2> %t.err
RUN: not lld -flavor old-gnu -target x86_64 --script=idonotexist.ls 2> %t.err
RUN: FileCheck %s < %t.err

CHECK: {{.*}}lld: cannot find file {{.*}}idonotexist.ls
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/invalid-script-cli-2.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Check that linker script are *not* picked up with -lscript.ls.

RUN: not lld -flavor gnu -target x86_64 -L%p/Inputs/ -lvalid.ls 2> %t.err
RUN: not lld -flavor old-gnu -target x86_64 -L%p/Inputs/ -lvalid.ls 2> %t.err
RUN: FileCheck %s < %t.err

CHECK: {{.*}}: Unable to find library -lvalid.ls
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/invalid.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Check for errors from invalid linker scripts
RUN: not lld -flavor gnu -target x86_64 %p/Inputs/invalid.ls 2> %t.err
RUN: not lld -flavor old-gnu -target x86_64 %p/Inputs/invalid.ls 2> %t.err
RUN: FileCheck %s < %t.err

CHECK: {{.*}}invalid.ls: Error parsing linker script
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-all-none.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test when all segments are marked as NONE.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix NONE-ALL-PHDRS %s
*/

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-custom-none.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test when PHDRS contains custom NONE segment.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix CUSTOM-NONE-SECS %s
RUN: llvm-readobj -program-headers %t1 | FileCheck -check-prefix CUSTOM-NONE-HDRS %s
*/
Expand Down
8 changes: 4 additions & 4 deletions lld/test/elf/linkerscript/phdrs-default.test
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o
/*
Test when no linker script passed.

RUN: lld -flavor gnu -target x86_64 %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 %t.o -static -o %t1
RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix SECTIONS %s
RUN: llvm-readobj -program-headers %t1 | FileCheck -check-prefix HEADERS %s

Expand All @@ -58,15 +58,15 @@ HEADERS: }
/*
Test when linker script doesn't contain PHDRS and sections are not assigned to any segments.

RUN: lld -flavor gnu -target x86_64 -T %p/phdrs/sections-no-phdrs.script %t.o -static -o %t2
RUN: lld -flavor old-gnu -target x86_64 -T %p/phdrs/sections-no-phdrs.script %t.o -static -o %t2
RUN: llvm-objdump -section-headers %t2 | FileCheck -check-prefix SECTIONS %s
RUN: llvm-readobj -program-headers %t2 | FileCheck -check-prefix HEADERS %s
*/

/*
Test when linker script contains empty PHDRS and sections are not assigned to any segments.

RUN: lld -flavor gnu -target x86_64 -T %p/phdrs/sections-empty-phdrs.script %t.o -static -o %t3
RUN: lld -flavor old-gnu -target x86_64 -T %p/phdrs/sections-empty-phdrs.script %t.o -static -o %t3
RUN: llvm-objdump -section-headers %t3 | FileCheck -check-prefix SECTIONS %s
RUN: llvm-readobj -program-headers %t3 | FileCheck -check-prefix HEADERS %s
*/
Expand All @@ -76,7 +76,7 @@ Test when linker script contains empty PHDRS and sections are only assigned to N
or not assigned at all.
NOTE: Segments with the name NONE are ignored in such a case.

RUN: lld -flavor gnu -target x86_64 -T %p/phdrs/sections-none-phdrs.script %t.o -static -o %t4
RUN: lld -flavor old-gnu -target x86_64 -T %p/phdrs/sections-none-phdrs.script %t.o -static -o %t4
RUN: llvm-objdump -section-headers %t4 | FileCheck -check-prefix SECTIONS %s
RUN: llvm-readobj -program-headers %t4 | FileCheck -check-prefix HEADERS %s
*/
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-different.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test sections put to different segments.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix DIFF-PHDRS-SECS %s
RUN: llvm-readobj -program-headers %t1 | FileCheck -check-prefix DIFF-PHDRS-HDRS %s
*/
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-extra-program.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test extra program header generates error.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: not lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1 &> %t1-error
RUN: not lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1 &> %t1-error
RUN: FileCheck -check-prefix EXTRA-PROGRAM-PHDR %s < %t1-error
*/

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-flags.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test sections put to different segments with FLAGS attribute set.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix FLAGS-PHDRS-SECS %s
RUN: llvm-readobj -program-headers %t1 | FileCheck -check-prefix FLAGS-PHDRS-HDRS %s
*/
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-has-program.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test when program segment is set it's generated.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: llvm-readobj -program-headers %t1 | FileCheck -check-prefix PROGRAM-PHDR %s
*/

Expand Down
6 changes: 3 additions & 3 deletions lld/test/elf/linkerscript/phdrs-invalid.test
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o
/*
Test undefined header used when no PHDRS defined.

RUN: not lld -flavor gnu -target x86_64 -T %p/phdrs/undef-no-phdrs.script %t.o -static -o %t1 &> %t1-error
RUN: not lld -flavor old-gnu -target x86_64 -T %p/phdrs/undef-no-phdrs.script %t.o -static -o %t1 &> %t1-error
RUN: FileCheck -check-prefix UNDEF-NO-PHDRS %s < %t1-error

UNDEF-NO-PHDRS: Unknown header identifiers (missing in PHDRS command) are used
Expand All @@ -47,7 +47,7 @@ UNDEF-NO-PHDRS: Unknown header identifiers (missing in PHDRS command) are used
/*
Test undefined header used when PHDRS is empty.

RUN: not lld -flavor gnu -target x86_64 -T %p/phdrs/undef-empty-phdrs.script %t.o -static -o %t2 &> %t2-error
RUN: not lld -flavor old-gnu -target x86_64 -T %p/phdrs/undef-empty-phdrs.script %t.o -static -o %t2 &> %t2-error
RUN: FileCheck -check-prefix UNDEF-EMPTY-PHDRS %s < %t2-error

UNDEF-EMPTY-PHDRS: Unknown header identifiers (missing in PHDRS command) are used
Expand All @@ -56,7 +56,7 @@ UNDEF-EMPTY-PHDRS: Unknown header identifiers (missing in PHDRS command) are use
/*
Test undefined header used when PHDRS contains definitions.

RUN: not lld -flavor gnu -target x86_64 -T %p/phdrs/undef-id-phdrs.script %t.o -static -o %t3 &> %t3-error
RUN: not lld -flavor old-gnu -target x86_64 -T %p/phdrs/undef-id-phdrs.script %t.o -static -o %t3 &> %t3-error
RUN: FileCheck -check-prefix UNDEF-ID-PHDRS %s < %t3-error

UNDEF-ID-PHDRS: Unknown header identifiers (missing in PHDRS command) are used
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-misplaced-program.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test misplaced program header generates error.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: not lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1 &> %t1-error
RUN: not lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1 &> %t1-error
RUN: FileCheck -check-prefix MISPLACED-PROGRAM-PHDR %s < %t1-error
*/

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-no-program.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test when no program segment set it's not generated.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: llvm-readobj -program-headers %t1 | FileCheck -check-prefix PROGRAM-PHDR %s
*/

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-one-none.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test when one segment is marked as NONE.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix NONE-PHDRS-SECS %s
RUN: llvm-readobj -program-headers %t1 | FileCheck -check-prefix NONE-PHDRS-HDRS %s
*/
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-program-flags.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test when program segment contains only FLAGS attribute.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: llvm-readobj -program-headers %t1 | FileCheck -check-prefix PROGRAM-FLAGS-PHDR %s
*/

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-program-good-phdrs.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test when program segment contains only PHDRS attribute.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: llvm-readobj -program-headers %t1 | FileCheck -check-prefix PROGRAM-PHDRS-PHDR %s
*/

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-program-no-phdrs.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test when program segment doesn't contain PHDRS attribute.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: not lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1 &> %t1-error
RUN: not lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1 &> %t1-error
RUN: FileCheck -check-prefix PROGRAM-PHDR-NO-PHDRS %s < %t1-error
*/

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-program-wrong-phdrs.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test when program segment contains PHDRS attribute not mapped to load segment.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: not lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1 &> %t1-error
RUN: not lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1 &> %t1-error
RUN: FileCheck -check-prefix PROGRAM-PHDR-WRONG-PHDRS %s < %t1-error
*/

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-same-flags.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test sections put to same segment with FLAGS attribute set.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix FLAGS-PHDRS-SECS %s
RUN: llvm-readobj -program-headers %t1 | FileCheck -check-prefix FLAGS-PHDRS-HDRS %s
*/
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/phdrs-same.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test sections put to same segment.

RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1
RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix SAME-PHDRS-SECS %s
RUN: llvm-readobj -program-headers %t1 | FileCheck -check-prefix SAME-PHDRS-HDRS %s
*/
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/sections-order.test
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ RUN: yaml2obj -format=elf %p/Inputs/prog2.o.yaml -o=%T/prog2.o
RUN: yaml2obj -format=elf %p/Inputs/prog3.o.yaml -o=%T/prog3.o
RUN: cd %T

RUN: lld -flavor gnu -target x86_64 -T %s prog1.o prog2.o prog3.o \
RUN: lld -flavor old-gnu -target x86_64 -T %s prog1.o prog2.o prog3.o \
RUN: -static -o %t1
RUN: llvm-readobj -s %t1 | FileCheck -check-prefix CHECKSECTIONS %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/sections-with-wildcards.test
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RUN: yaml2obj -format=elf %p/Inputs/prog2.o.yaml -o=%T/p2.o
RUN: yaml2obj -format=elf %p/Inputs/prog3.o.yaml -o=%T/p3.o
RUN: cd %T

RUN: lld -flavor gnu -target x86_64 -T %s p1.o p2.o p3.o \
RUN: lld -flavor old-gnu -target x86_64 -T %s p1.o p2.o p3.o \
RUN: -static -o %t1
RUN: llvm-readobj -s %t1 | FileCheck -check-prefix CHECKSECTIONS %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/symbol-definition-so.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SECTIONS
/*
RUN: yaml2obj -format=elf %p/Inputs/simple-pic.o.yaml -o=%t.o

RUN: lld -flavor gnu -target x86_64 -shared -T %s %t.o -o %t.so
RUN: lld -flavor old-gnu -target x86_64 -shared -T %s %t.o -o %t.so
RUN: llvm-readobj -s -symbols %t.so | FileCheck -check-prefix CHECKSYMS %s

CHECKSYMS: Name: .data
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/linkerscript/symbol-definition.test
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ SECTIONS
RUN: mkdir -p %T
RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%T/simple.o

RUN: lld -flavor gnu -target x86_64 -T %s %T/simple.o -static -o %t1
RUN: lld -flavor old-gnu -target x86_64 -T %s %T/simple.o -static -o %t1
RUN: llvm-readobj -symbols %t1 | FileCheck -check-prefix CHECKSYMS %s

CHECKSYMS: Name: MYSTRING
Expand Down
8 changes: 4 additions & 4 deletions lld/test/elf/linkerscript/valid-script-cli.objtxt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Check that the linker script inputs are accepted properly.

# RUN: lld -flavor gnu -target x86_64 %p/Inputs/valid.ls -r %s \
# RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/valid.ls -r %s \
# RUN: --output-filetype=yaml | FileCheck %s

# RUN: lld -flavor gnu -target x86_64 -T %p/Inputs/valid.ls -r %s \
# RUN: lld -flavor old-gnu -target x86_64 -T %p/Inputs/valid.ls -r %s \
# RUN: --output-filetype=yaml | FileCheck %s

# RUN: lld -flavor gnu -target x86_64 --script=%p/Inputs/valid.ls -r %s \
# RUN: lld -flavor old-gnu -target x86_64 --script=%p/Inputs/valid.ls -r %s \
# RUN: --output-filetype=yaml | FileCheck %s

# RUN: lld -flavor gnu -target x86_64 -L%p/Inputs/ -l:valid.ls -r %s \
# RUN: lld -flavor old-gnu -target x86_64 -L%p/Inputs/ -l:valid.ls -r %s \
# RUN: --output-filetype=yaml | FileCheck %s

defined-atoms:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/loginputfiles.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# }
# gcc -c main.c fn.c fn1.c

RUN: lld -flavor gnu -target x86_64-linux \
RUN: lld -flavor old-gnu -target x86_64-linux \
RUN: %p/Inputs/mainobj.x86_64 %p/Inputs/libfnarchive.a -t --noinhibit-exec 2>&1 | \
RUN: FileCheck -check-prefix INPUTFILES %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/mergeatoms.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Tests that atoms are merged by testing it with --merge-strings option
RUN: lld -flavor gnu -target x86_64-linux --merge-strings -o %t1 \
RUN: lld -flavor old-gnu -target x86_64-linux --merge-strings -o %t1 \
RUN: %p/Inputs/foo.o.x86-64 %p/Inputs/bar.o.x86-64 -e bar1
RUN: llvm-objdump -s %t1 | FileCheck -check-prefix=mergeAtoms %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/mergeconstants.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The test checks for mergeable strings that appear in the object file
RUN: lld -flavor gnu --merge-strings --output-filetype=yaml -target x86_64 \
RUN: lld -flavor old-gnu --merge-strings --output-filetype=yaml -target x86_64 \
RUN: %p/Inputs/constants-merge.x86-64 --noinhibit-exec \
RUN: | FileCheck -check-prefix=mergeAtoms %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/mergeglobalatoms.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ELF files can have mergeable strings which are global!, treat them as global
# defined atoms
RUN: lld -flavor gnu --output-filetype=yaml %p/Inputs/globalconst.o.x86-64 \
RUN: lld -flavor old-gnu --output-filetype=yaml %p/Inputs/globalconst.o.x86-64 \
RUN: --noinhibit-exec -target x86_64 | FileCheck -check-prefix=globalatoms %s

globalatoms: - name: mystr
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/no-unique-section-names.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Check handling object files with non-unique named sections.

RUN: lld -flavor gnu -target x86_64-linux -shared -o %t \
RUN: lld -flavor old-gnu -target x86_64-linux -shared -o %t \
RUN: %p/Inputs/no-unique-section-names.x86-64
RUN: llvm-objdump -s %p/Inputs/no-unique-section-names.x86-64 %t \
RUN: | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/note.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Check that the linker is not ignoring input sections.
# RUN: yaml2obj -format=elf %s > %t.obj
# RUN: lld -flavor gnu -target x86_64 %t.obj -o %t.exe --noinhibit-exec
# RUN: lld -flavor old-gnu -target x86_64 %t.obj -o %t.exe --noinhibit-exec
# RUN: llvm-readobj -s %t.exe | FileCheck %s

# CHECK: Section {
Expand Down
6 changes: 3 additions & 3 deletions lld/test/elf/options/dynamic-linker.test
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This tests the functionality of specifying dynamic-linker argument in the
# command line
RUN: lld -flavor gnu -target x86_64 --dynamic-linker="/xyz.so" \
RUN: lld -flavor old-gnu -target x86_64 --dynamic-linker="/xyz.so" \
RUN: %p/../Inputs/foo.o.x86-64 --noinhibit-exec -o %t
RUN: llvm-objdump -s %t | FileCheck -check-prefix=DYNAMICINTERP1 %s
RUN: lld -flavor gnu -target x86_64 --dynamic-linker="" \
RUN: lld -flavor old-gnu -target x86_64 --dynamic-linker="" \
RUN: %p/../Inputs/foo.o.x86-64 --noinhibit-exec -o %t1
RUN: llvm-objdump -s %t1 | FileCheck -check-prefix=DYNAMICINTERP2 %s
RUN: lld -flavor gnu -target x86_64 -dynamic-linker /xyz.so \
RUN: lld -flavor old-gnu -target x86_64 -dynamic-linker /xyz.so \
RUN: %p/../Inputs/foo.o.x86-64 --noinhibit-exec -o %t2
RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=DYNAMICINTERP1 %s

Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/options/target-specific-args.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Test of target specific options
# RUN: lld -flavor gnu -target x86_64 --target1-rel \
# RUN: lld -flavor old-gnu -target x86_64 --target1-rel \
# RUN: %p/../Inputs/foo.o.x86-64 --noinhibit-exec -o %t 2>&1 | FileCheck %s

# CHECK: warning: ignoring unsupported ARM/ELF specific argument: --target1-rel
4 changes: 2 additions & 2 deletions lld/test/elf/phdr.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This test checks emission for program header for ELF binaries
RUN: lld -flavor gnu -target i386-linux -o %t1 -e main %p/Inputs/phdr.i386 \
RUN: lld -flavor old-gnu -target i386-linux -o %t1 -e main %p/Inputs/phdr.i386 \
RUN: && llvm-readobj -program-headers %t1 | FileCheck -check-prefix=I386 %s
RUN: lld -flavor gnu -target x86_64-linux -o %t1 -e _start %p/Inputs/relocs.x86-64 -static \
RUN: lld -flavor old-gnu -target x86_64-linux -o %t1 -e _start %p/Inputs/relocs.x86-64 -static \
RUN: && llvm-objdump -p %t1 | FileCheck %s -check-prefix=X86_64


Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/quickdata.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: lld -flavor gnu -target hexagon --output-filetype=yaml %p/Inputs/quickdata-test.elf-hexagon \
RUN: lld -flavor old-gnu -target hexagon --output-filetype=yaml %p/Inputs/quickdata-test.elf-hexagon \
RUN: --noinhibit-exec | FileCheck %s -check-prefix hexagon

hexagon: - name: ac1
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/reloc.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: lld -flavor gnu -target i386 --merge-strings -r --output-filetype=yaml \
RUN: lld -flavor old-gnu -target i386 --merge-strings -r --output-filetype=yaml \
RUN: %p/Inputs/reloc-test.elf-i386 | FileCheck %s -check-prefix ELF-i386

ELF-i386: defined-atoms:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/responsefile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not lld -flavor gnu --abc @%p/Inputs/responsefile --baz >& %t.log
# RUN: not lld -flavor old-gnu --abc @%p/Inputs/responsefile --baz >& %t.log
# RUN: FileCheck %s < %t.log

CHECK: warning: ignoring unknown argument: --abc
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/rodata.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN: lld -flavor gnu -target x86_64-linux -o %t %p/Inputs/constdata.x86-64 \
RUN: lld -flavor old-gnu -target x86_64-linux -o %t %p/Inputs/constdata.x86-64 \
RUN: -static -e _start
RUN: llvm-objdump -s %t | FileCheck %s

Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/rosegment.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Tests that the option --rosegment produces an output file with a separate
# segment created for read only data.
RUN: lld -flavor gnu -target x86_64 %p/Inputs/rodata.o -o %t1.elf \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/rodata.o -o %t1.elf \
RUN: --noinhibit-exec
RUN: lld -flavor gnu -target x86_64 %p/Inputs/rodata.o --rosegment -o %t2.elf \
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/rodata.o --rosegment -o %t2.elf \
RUN: --noinhibit-exec
RUN: llvm-readobj -program-headers %t1.elf | FileCheck %s -check-prefix=NORO-SEGMENT
RUN: llvm-readobj -program-headers %t2.elf | FileCheck %s -check-prefix=RO-SEGMENT
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/sectionGroups/sectiongroup-new-members.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#bar:
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t.group1a.o
#RUN: yaml2obj -format=elf -docnum 2 %s -o %t.group1b.o
#RUN: lld -flavor gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: --noinhibit-exec --output-filetype=yaml -o %t2.out.yaml
#RUN: lld -flavor gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: --noinhibit-exec -o %t2.out
#RUN: FileCheck %s -check-prefix=CHECKGROUP < %t2.out.yaml
#RUN: llvm-readobj -sections %t2.out | FileCheck %s -check-prefix=CHECKGROUPSECTIONS
Expand Down
4 changes: 2 additions & 2 deletions lld/test/elf/sectionGroups/sectiongroup-simple.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#bar:
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t.group1a.o
#RUN: yaml2obj -format=elf -docnum 2 %s -o %t.group1b.o
#RUN: lld -flavor gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: --noinhibit-exec --output-filetype=yaml -o %t2.out.yaml
#RUN: lld -flavor gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: --noinhibit-exec -o %t2.out
#RUN: FileCheck %s -check-prefix=CHECKGROUP < %t2.out.yaml
#RUN: llvm-readobj -sections %t2.out | FileCheck %s -check-prefix=CHECKGROUPSECTIONS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t.group1a.o
#RUN: yaml2obj -format=elf -docnum 2 %s -o %t.group1b.o
#RUN: lld -flavor gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: --noinhibit-exec -o %t2.out 2>&1 | FileCheck %s
#CHECK: Undefined symbol: {{.*}} g1
---
Expand Down
2 changes: 1 addition & 1 deletion lld/test/elf/sectionGroups/sectiongroup-undef-member.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t.group1a.o
#RUN: yaml2obj -format=elf -docnum 2 %s -o %t.group1b.o
#RUN: lld -flavor gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.group1a.o %t.group1b.o \
#RUN: --noinhibit-exec -o %t2.out 2>&1 | FileCheck %s
#CHECK: Undefined symbol: {{.*}} g1
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t.comdat1.o
#RUN: yaml2obj -format=elf -docnum 2 %s -o %t.comdat2.o
#RUN: yaml2obj -format=elf -docnum 3 %s -o %t.g1.o
#RUN: lld -flavor gnu -target x86_64 %t.comdat1.o %t.comdat2.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.comdat1.o %t.comdat2.o \
#RUN: %t.g1.o --noinhibit-exec --output-filetype=yaml -o %t2.out.yaml
#RUN: lld -flavor gnu -target x86_64 %t.comdat1.o %t.comdat2.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.comdat1.o %t.comdat2.o \
#RUN: %t.g1.o --noinhibit-exec -o %t2.out
#RUN: FileCheck %s -check-prefix=CHECKGROUP < %t2.out.yaml
#RUN: llvm-readobj -sections %t2.out | FileCheck %s -check-prefix=CHECKGROUPSECTIONS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#RUN: yaml2obj -format=elf -docnum 1 %s -o %t.comdat1.o
#RUN: yaml2obj -format=elf -docnum 2 %s -o %t.comdat2.o
#RUN: yaml2obj -format=elf -docnum 3 %s -o %t.g1.o
#RUN: lld -flavor gnu -target x86_64 %t.comdat1.o %t.comdat2.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.comdat1.o %t.comdat2.o \
#RUN: %t.g1.o --noinhibit-exec --output-filetype=yaml -o %t2.out.yaml
#RUN: lld -flavor gnu -target x86_64 %t.comdat1.o %t.comdat2.o \
#RUN: lld -flavor old-gnu -target x86_64 %t.comdat1.o %t.comdat2.o \
#RUN: %t.g1.o --noinhibit-exec -o %t2.out
#RUN: FileCheck %s -check-prefix=CHECKGROUP < %t2.out.yaml
#RUN: llvm-readobj -sections %t2.out | FileCheck %s -check-prefix=CHECKGROUPSECTIONS
Expand Down
Loading