mirror of
https://github.com/intel/llvm.git
synced 2026-01-31 16:29:50 +08:00
Rename the gnu flavour to gnu old.
This is the first step in making ELF2 the default. llvm-svn: 253188
This commit is contained in:
@@ -68,11 +68,11 @@ public:
|
||||
|
||||
enum class Flavor {
|
||||
invalid,
|
||||
gnu_ld, // -flavor gnu
|
||||
gnu_ld2, // -flavor gnu2
|
||||
win_link, // -flavor link
|
||||
darwin_ld, // -flavor darwin
|
||||
core // -flavor core OR -core
|
||||
old_gnu_ld, // -flavor old-gnu
|
||||
gnu_ld2, // -flavor gnu2
|
||||
win_link, // -flavor link
|
||||
darwin_ld, // -flavor darwin
|
||||
core // -flavor core OR -core
|
||||
};
|
||||
|
||||
struct ProgramNameParts {
|
||||
@@ -84,14 +84,14 @@ struct ProgramNameParts {
|
||||
|
||||
static Flavor strToFlavor(StringRef str) {
|
||||
return llvm::StringSwitch<Flavor>(str)
|
||||
.Case("gnu", Flavor::gnu_ld)
|
||||
.Case("old-gnu", Flavor::old_gnu_ld)
|
||||
.Case("gnu2", Flavor::gnu_ld2)
|
||||
.Case("ld.lld2", Flavor::gnu_ld2)
|
||||
.Case("link", Flavor::win_link)
|
||||
.Case("lld-link", Flavor::win_link)
|
||||
.Case("darwin", Flavor::darwin_ld)
|
||||
.Case("core", Flavor::core)
|
||||
.Case("ld", Flavor::gnu_ld)
|
||||
.Case("ld", Flavor::old_gnu_ld)
|
||||
.Default(Flavor::invalid);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ static Flavor getFlavor(llvm::MutableArrayRef<const char *> &args,
|
||||
return Flavor::darwin_ld;
|
||||
#endif
|
||||
// On a ELF based systems, if linker binary is named "ld", use gnu driver.
|
||||
return Flavor::gnu_ld;
|
||||
return Flavor::old_gnu_ld;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -202,7 +202,7 @@ bool UniversalDriver::link(llvm::MutableArrayRef<const char *> args,
|
||||
|
||||
// Switch to appropriate driver.
|
||||
switch (flavor) {
|
||||
case Flavor::gnu_ld:
|
||||
case Flavor::old_gnu_ld:
|
||||
return GnuLdDriver::linkELF(args, diagnostics);
|
||||
case Flavor::gnu_ld2:
|
||||
elf2::link(args);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check that search paths explicitly provided by the -L option
|
||||
# are used in search before default paths.
|
||||
|
||||
RUN: not lld -flavor gnu -target x86_64 -t -ltest \
|
||||
RUN: not lld -flavor old-gnu -target x86_64 -t -ltest \
|
||||
RUN: --sysroot=%p/Inputs -L%p/Inputs 2> %t
|
||||
RUN: FileCheck %s < %t
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# argument in the command line (bug 20975);
|
||||
# b) UniversalDriver correctly removes -flavor along with its value and the
|
||||
# underlying linker does not get a corrupted command line (bug 20977).
|
||||
RUN: lld --help -flavor gnu | FileCheck %s
|
||||
RUN: lld --help -flavor old-gnu | FileCheck %s
|
||||
|
||||
CHECK: --noinhibit-exec
|
||||
CHECK: --output-filetype
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
RUN: not lld -flavor gnu -t -ltest -L%p/Inputs 2> %t.err
|
||||
RUN: not lld -flavor old-gnu -t -ltest -L%p/Inputs 2> %t.err
|
||||
RUN: FileCheck %s < %t.err
|
||||
|
||||
RUN: not lld -flavor gnu -target x86_64--netbsd -t -ltest \
|
||||
RUN: not lld -flavor old-gnu -target x86_64--netbsd -t -ltest \
|
||||
RUN: --sysroot=%p/Inputs 2> %t2
|
||||
RUN: FileCheck -check-prefix=NETBSD-AMD64 %s < %t2
|
||||
RUN: not lld -flavor gnu -target x86_64--netbsd -nostdlib -t -ltest \
|
||||
RUN: not lld -flavor old-gnu -target x86_64--netbsd -nostdlib -t -ltest \
|
||||
RUN: --sysroot=%p/Inputs 2> %t3
|
||||
RUN: FileCheck -check-prefix=NETBSD-AMD64-NS %s < %t3
|
||||
RUN: not lld -flavor gnu -target i386--netbsd -t -ltest \
|
||||
RUN: not lld -flavor old-gnu -target i386--netbsd -t -ltest \
|
||||
RUN: --sysroot=%p/Inputs 2> %t4
|
||||
RUN: FileCheck -check-prefix=NETBSD-I386 %s < %t4
|
||||
RUN: not lld -flavor gnu -target x86_64--netbsd -m elf_i386 -t -ltest \
|
||||
RUN: not lld -flavor old-gnu -target x86_64--netbsd -m elf_i386 -t -ltest \
|
||||
RUN: --sysroot=%p/Inputs 2> %t5
|
||||
RUN: FileCheck -check-prefix=NETBSD-AMD64_32 %s < %t5
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum=1 %s > %t-so.o
|
||||
# RUN: yaml2obj -format=elf -docnum=2 %s > %t-exe.o
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
|
||||
# RUN: lld -flavor gnu -target mipsel -o %t.exe %t-exe.o --whole-archive %t.so
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-so.o
|
||||
# RUN: lld -flavor old-gnu -target mipsel -o %t.exe %t-exe.o --whole-archive %t.so
|
||||
|
||||
# so.o
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# This test, tests the Gnu lld option --help
|
||||
RUN: lld -flavor gnu --help | FileCheck %s
|
||||
RUN: lld -flavor old-gnu --help | FileCheck %s
|
||||
|
||||
CHECK: --noinhibit-exec
|
||||
CHECK: --output-filetype
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# RUN: lld -flavor gnu -u undefinedsymbol -e entrysymbol %s \
|
||||
# RUN: lld -flavor old-gnu -u undefinedsymbol -e entrysymbol %s \
|
||||
# RUN: --output-filetype=yaml --noinhibit-exec | FileCheck %s
|
||||
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RUN: lld -flavor gnu -target aarch64--linux-gnu --defsym=main=fn \
|
||||
RUN: lld -flavor old-gnu -target aarch64--linux-gnu --defsym=main=fn \
|
||||
RUN: --noinhibit-exec %p/Inputs/fn.o -o %t
|
||||
RUN: llvm-readobj -symbols %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# This tests that lld is not ignoring zero sized sections
|
||||
RUN: lld -flavor gnu -target aarch64--linux-gnu %p/Inputs/zerosizedsection.o \
|
||||
RUN: lld -flavor old-gnu -target aarch64--linux-gnu %p/Inputs/zerosizedsection.o \
|
||||
RUN: --noinhibit-exec --output-filetype=yaml -o %t
|
||||
RUN: FileCheck %s < %t
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# values.
|
||||
|
||||
# RUN: yaml2obj --format elf -docnum 1 %s -o %t.o
|
||||
# RUN: lld -flavor gnu -target aarch64 -e main %t.o -o %t1 --noinhibit-exec
|
||||
# RUN: lld -flavor old-gnu -target aarch64 -e main %t.o -o %t1 --noinhibit-exec
|
||||
# RUN: llvm-readobj -sections -symbols %t1 | FileCheck %s
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RUN: lld -flavor gnu -target aarch64--linux-gnu %p/Inputs/no-interp-section.o \
|
||||
RUN: lld -flavor old-gnu -target aarch64--linux-gnu %p/Inputs/no-interp-section.o \
|
||||
RUN: -o %t -shared
|
||||
RUN: llvm-objdump -section-headers %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#RUN: yaml2obj -format=elf %p/Inputs/general-dyn-tls-0.yaml -o=%t-t1.o
|
||||
#RUN: yaml2obj -format=elf %s -o %t-t0.o
|
||||
#RUN: lld -flavor gnu -target arm64 --noinhibit-exec -o %t.exe %t-t0.o %t-t1.o
|
||||
#RUN: lld -flavor old-gnu -target arm64 --noinhibit-exec -o %t.exe %t-t0.o %t-t1.o
|
||||
#RUN: llvm-readobj -relocations %t.exe | FileCheck %s -check-prefix=CHECKRELOCATION
|
||||
#RUN: llvm-objdump -s -t %t.exe | FileCheck %s
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# corresponds to the the .init_array/.fini_array sections
|
||||
# in the output ELF.
|
||||
|
||||
RUN: lld -flavor gnu -target aarch64--linux-gnu %p/Inputs/initfini.o \
|
||||
RUN: lld -flavor old-gnu -target aarch64--linux-gnu %p/Inputs/initfini.o \
|
||||
RUN: --noinhibit-exec --output-filetype=yaml -o %t
|
||||
RUN: FileCheck %s < %t
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#RUN: yaml2obj -format=elf %p/Inputs/initial-exec-tls-1.yaml -o=%t-t1.o
|
||||
#RUN: yaml2obj -format=elf %s -o %t-t0.o
|
||||
#RUN: lld -flavor gnu -target arm64 --noinhibit-exec -o %t.exe %t-t0.o %t-t1.o
|
||||
#RUN: lld -flavor old-gnu -target arm64 --noinhibit-exec -o %t.exe %t-t0.o %t-t1.o
|
||||
#RUN: llvm-readobj -relocations %t.exe | FileCheck %s -check-prefix=CHECKRELOCATION
|
||||
#RUN: llvm-objdump -s -t %t.exe | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check for correct offsets when handling relocations for local TLS
|
||||
# access (R_AARCH64_TLSLE_ADD_TPREL_HI12, R_AARCH64_TLSLE_ADD_TPREL_LO12_NC)
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: lld -flavor gnu -target arm64 --noinhibit-exec -o %t-exe %t-obj
|
||||
# RUN: lld -flavor old-gnu -target arm64 --noinhibit-exec -o %t-exe %t-obj
|
||||
# RUN: llvm-objdump -s -t %t-exe | FileCheck %s
|
||||
|
||||
# CHECK: Contents of section .text:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_ABS16 relocation overflow.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: not lld -flavor gnu -target arm64 -o %t-exe %t-obj 2>&1 | FileCheck %s
|
||||
# RUN: not lld -flavor old-gnu -target arm64 -o %t-exe %t-obj 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: Relocation out of range in file {{.*}}: reference from data1+0 to data1+0 of type 259 (R_AARCH64_ABS16)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_ABS16 relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: lld -flavor gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: lld -flavor old-gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: llvm-objdump -s -t %t-exe | FileCheck %s
|
||||
|
||||
# CHECK: Contents of section .data:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_ABS32 relocation overflow.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: not lld -flavor gnu -target arm64 -o %t-exe %t-obj 2>&1 | FileCheck %s
|
||||
# RUN: not lld -flavor old-gnu -target arm64 -o %t-exe %t-obj 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK-DAG: Relocation out of range in file {{.*}}: reference from data1+0 to data2+34359738369 of type 258 (R_AARCH64_ABS32)
|
||||
# CHECK-DAG: Relocation out of range in file {{.*}}: reference from data2+0 to data1+34359738369 of type 258 (R_AARCH64_ABS32)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_ABS32 relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: lld -flavor gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: lld -flavor old-gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: llvm-objdump -s -t %t-exe | FileCheck %s
|
||||
|
||||
# CHECK: Contents of section .data:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_ABS64 relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: lld -flavor gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: lld -flavor old-gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: llvm-objdump -s -t %t-exe | FileCheck %s
|
||||
|
||||
# CHECK: Contents of section .data:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_ADR_PREL_PG_HI21 relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: not lld -flavor gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: not lld -flavor old-gnu -target arm64 -o %t-exe %t-obj
|
||||
|
||||
# CHECK: Relocation out of range in file {{.*}}: reference from _start+0 to data1+1048577 of type 274 (R_AARCH64_ADR_PREL_LO21)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Check handling of R_AARCH64_ADR_PREL_LO21 relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: lld -flavor gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: lld -flavor old-gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: llvm-objdump -d -t %t-exe | FileCheck %s
|
||||
|
||||
# CHECK: Disassembly of section .text:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_ADR_PREL_PG_HI21 relocation overflow.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: not lld -flavor gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: not lld -flavor old-gnu -target arm64 -o %t-exe %t-obj
|
||||
|
||||
# CHECK-DAG: Relocation out of range in file {{.*}}: reference from _start+0 to data1+2147483649 of type 275 (R_AARCH64_ADR_PREL_PG_HI21)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Check handling of R_AARCH64_ADR_PREL_PG_HI21 relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: lld -flavor gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: lld -flavor old-gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: llvm-objdump -d -t %t-exe | FileCheck %s
|
||||
|
||||
# CHECK: Disassembly of section .text:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of a bad relocation (in this case dynamic in a static object).
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: not lld -flavor gnu -target arm64 -o %t-exe %t-obj 2>&1 | FileCheck %s
|
||||
# RUN: not lld -flavor old-gnu -target arm64 -o %t-exe %t-obj 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: Unhandled reference type in file {{.*}}: reference from data1+4 to data1+0 of type 1024 (R_AARCH64_COPY)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_PREL16 relocation overflow.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: not lld -flavor gnu -target arm64 -o %t-exe %t-obj 2>&1 | FileCheck %s
|
||||
# RUN: not lld -flavor old-gnu -target arm64 -o %t-exe %t-obj 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: Relocation out of range in file {{.*}}: reference from data1+0 to data2+524289 of type 262 (R_AARCH64_PREL16)
|
||||
# CHECK: Relocation out of range in file {{.*}}: reference from data2+0 to data1+524289 of type 262 (R_AARCH64_PREL16)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_PREL16 relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: lld -flavor gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: lld -flavor old-gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: llvm-objdump -s -t %t-exe | FileCheck %s
|
||||
|
||||
# CHECK: Contents of section .data:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_PREL32 relocation overflow.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: not lld -flavor gnu -target arm64 -o %t-exe %t-obj 2>&1 | FileCheck %s
|
||||
# RUN: not lld -flavor old-gnu -target arm64 -o %t-exe %t-obj 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: Relocation out of range in file {{.*}}: reference from data1+0 to data2+34359738369 of type 261 (R_AARCH64_PREL32)
|
||||
# CHECK: Relocation out of range in file {{.*}}: reference from data2+0 to data1+34359738369 of type 261 (R_AARCH64_PREL32)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_PREL32 relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: lld -flavor gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: lld -flavor old-gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: llvm-objdump -s -t %t-exe | FileCheck %s
|
||||
|
||||
# CHECK: Contents of section .data:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_AARCH64_PREL64 relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-obj
|
||||
# RUN: lld -flavor gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: lld -flavor old-gnu -target arm64 -o %t-exe %t-obj
|
||||
# RUN: llvm-objdump -s -t %t-exe | FileCheck %s
|
||||
|
||||
# CHECK: Contents of section .data:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# RUN: yaml2obj -format=elf %s > %t.obj
|
||||
# RUN: lld -flavor gnu -target amdgcn--hsa %t.obj -o %t.exe --noinhibit-exec
|
||||
# RUN: lld -flavor old-gnu -target amdgcn--hsa %t.obj -o %t.exe --noinhibit-exec
|
||||
# RUN: llvm-readobj -h -program-headers -s -symbols %t.exe | FileCheck %s
|
||||
|
||||
# CHECK: ElfHeader {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# 3. Symbol content.
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-a.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-a.o -o %t-a
|
||||
# RUN: llvm-readobj -symbols %t-a | FileCheck -check-prefix=SYM-ADDR %s
|
||||
# RUN: llvm-readobj -symbols %t-a | FileCheck -check-prefix=SYM-SIZE %s
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check that defined symbols are present in the generated executable
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu --defsym=main=fn \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu --defsym=main=fn \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-readobj -symbols %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check that proper dynamic symbols are present in the generated executable
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=STATIC %s
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# STATIC-NOT: Name: _DYNAMIC
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=EXEC-DYN %s
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
# EXEC-DYN-NEXT: Section: Absolute (0xFFF1)
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -shared --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=SHARED %s
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 1. Check entry point address for ARM code - should be even.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-arm.o -o %t-arm
|
||||
# RUN: llvm-readobj -file-headers %t-arm | FileCheck -check-prefix=ARM-ENTRY %s
|
||||
#
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
# 2. Check entry point address for Thumb code - should be odd.
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-thm.o -o %t-thm
|
||||
# RUN: llvm-readobj -file-headers %t-thm | FileCheck -check-prefix=THM-ENTRY %s
|
||||
#
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
# 3. Check wrong entry point address align for ARM code.
|
||||
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-arm-wrong.o
|
||||
# RUN: not lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: not lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-arm-wrong.o -o %t-arm-wrong 2> %t-error
|
||||
# FileCheck -check-prefix=ARM-WRONG %s < %t-error
|
||||
#
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# .ARM.exidx contents checking
|
||||
# RUN: yaml2obj -format=elf %s > %t.o
|
||||
# RUN: lld -flavor gnu -target arm-none-linux-eabi -static -o %t %t.o
|
||||
# RUN: lld -flavor old-gnu -target arm-none-linux-eabi -static -o %t %t.o
|
||||
# RUN: llvm-objdump -s -t -section-headers %t | FileCheck %s
|
||||
#
|
||||
# CHECK: Sections:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# 1. Check header flags for statically linked executable with default options.
|
||||
# RUN: yaml2obj -format=elf %s > %t.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t.o -o %t
|
||||
# RUN: llvm-readobj -file-headers %t | FileCheck -check-prefix=STATIC-DEF %s
|
||||
#
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
# 2. Check header flags for dynamically linked executable with default options.
|
||||
# RUN: yaml2obj -format=elf %s > %t.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: --noinhibit-exec %t.o -o %t
|
||||
# RUN: llvm-readobj -file-headers %t | FileCheck -check-prefix=EXEC-DYN-DEF %s
|
||||
#
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
# 3. Check header flags for shared object with default options.
|
||||
# RUN: yaml2obj -format=elf %s > %t.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -shared \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -shared \
|
||||
# RUN: --noinhibit-exec %t.o -o %t
|
||||
# RUN: llvm-readobj -file-headers %t | FileCheck -check-prefix=SHARED-DEF %s
|
||||
#
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# 1. ARM <=> Thumb generates both veneers.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-a-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu --defsym=main=f_a \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu --defsym=main=f_a \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-a-arm.o %t-t-thm.o -o %t
|
||||
# RUN: llvm-objdump -t %t | FileCheck -check-prefix=INTER %s
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# 2. Thumb <=> Thumb doesn't generate veneers.
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-a-thm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu --defsym=main=f_t \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu --defsym=main=f_t \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-t-thm.o %t-a-thm.o -o %t
|
||||
# RUN: llvm-objdump -t %t | FileCheck -check-prefix=THUMB %s
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check that mapping symbols have zero size, local binding and none type.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-a.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-t.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-a.o %t-t.o -o %t
|
||||
# RUN: llvm-readobj -symbols %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check that _MISSING_SYMBOL_ symbol is not resolved
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: Undefined symbol: {{.*}}: _MISSING_SYMBOL_
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# 1. ARM code generates PLT entries.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: --noinhibit-exec %t-arm.o -lfn -L%p/Inputs -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=ARM %s
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
# 2. Thumb code generates PLT entries with veneers.
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: --noinhibit-exec %t-thm.o -lfn -L%p/Inputs -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=THM %s
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
# 3. Thumb code generates PLT entries without veneers when bl->blx is done.
|
||||
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: --noinhibit-exec %t-thm.o -lfn -L%p/Inputs -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=THM-BLX %s
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
# Generation of mapping symbols.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: --noinhibit-exec %t-arm.o -lfn -L%p/Inputs -o %t-arm
|
||||
# RUN: llvm-readobj -symbols %t-arm | FileCheck -check-prefix=ARM-MAPPING %s
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
# ARM-MAPPING: Name: {{[$]?[a]?[.]?}}__plt_fn
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: --noinhibit-exec %t-thm.o -lfn -L%p/Inputs -o %t-thm
|
||||
# RUN: llvm-readobj -symbols %t-thm | FileCheck -check-prefix=THM-MAPPING %s
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# 1. ARM code generates PLT without transition veneer.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-f1-arm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-f1-arm.o -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=ARM-ONE %s
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
# 2. Thumb code generates PLT with transition veneer.
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-f1-thm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-f1-thm.o -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=THM-ONE %s
|
||||
|
||||
@@ -28,21 +28,21 @@
|
||||
# 3. ARM + Thumb code generate same single PLT with transition veneer.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-f1-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-f1-thm-for-arm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-f1-arm.o %t-f1-thm-for-arm.o -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=THM-ONE %s
|
||||
|
||||
# 4. Thumb + ARM code generate same single PLT with transition veneer.
|
||||
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-f1-thm-for-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-f1-arm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-f1-thm-for-arm.o %t-f1-arm.o -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=THM-ONE %s
|
||||
|
||||
# 5. ARM + ARM code generate two PLTs without transition veneers.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-f1-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 4 %s > %t-f2-arm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-f1-arm.o %t-f2-arm.o -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=ARM-TWO %s
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
# 6. ARM + Thumb code generate two PLTs without and with transition veneer.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-f1-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 5 %s > %t-f2-thm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-f1-arm.o %t-f2-thm.o -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=ARM-THM-TWO %s
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
# 7. Thumb + ARM code generate two PLTs with and without transition veneer.
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-f1-thm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 4 %s > %t-f2-arm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-f1-thm.o %t-f2-arm.o -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=THM-ARM-TWO %s
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
# 8. Thumb + Thumb code generate two PLTs with transition veneers.
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-f1-thm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 5 %s > %t-f2-thm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-f1-thm.o %t-f2-thm.o -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=THM-TWO %s
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
# 9. Thumb code generates PLT without transition veneer when bl->blx is done.
|
||||
# RUN: yaml2obj -format=elf -docnum 6 %s > %t-f1-thm-c.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-f1-thm-c.o -o %t
|
||||
# RUN: llvm-objdump -s %t | FileCheck -check-prefix=THM-BL %s
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-arm.o %t-thm.o -o %t
|
||||
# RUN: llvm-readobj -symbols %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_ARM_ABS32 relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_ARM_CALL relocation.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# CHECK: 00400088 g F .text {{[0-9a-f]+}} main
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
|
||||
# RUN: not lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: not lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t 2> %t-error
|
||||
# RUN: FileCheck -check-prefix=OVERFLOW %s < %t-error
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-arm.o %t-thm.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=STATIC %s
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: --noinhibit-exec %t-arm.o %t-thm.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=EXEC-DYN %s
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-arm.o %t-thm.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=STATIC %s
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: --noinhibit-exec %t-arm.o %t-thm.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=EXEC-DYN %s
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_ARM_JUMP24 relocation.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# CHECK: 00400090 g F .text {{[0-9a-f]+}} main
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
|
||||
# RUN: not lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: not lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t 2> %t-error
|
||||
# RUN: FileCheck -check-prefix=OVERFLOW %s < %t-error
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_ARM_MOVW_ABS_NC and R_ARM_MOVT_ABS relocation pair.
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_ARM_PREL31 relocation.
|
||||
# RUN: yaml2obj -format=elf -docnum=1 %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec --defsym=main=__gxx_personality_v0 %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# CHECK: 00400054 g F .text {{[0-9a-f]+}} __gxx_personality_v0
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum=2 %s > %t-o.o
|
||||
# RUN: not lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: not lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec --defsym=main=__gxx_personality_v0 %t-o.o -o %t 2> %t-error
|
||||
# RUN: FileCheck -check-prefix=OVERFLOW %s < %t-error
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# 1. R_ARM_TARGET1 is equal to R_ARM_ABS32
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-abs32.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec --target1-abs %t-abs32.o -o %t-abs32
|
||||
# RUN: llvm-objdump -s -t %t-abs32 | FileCheck -check-prefix=CHECK-ABS32 %s
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# 2. R_ARM_TARGET1 is equal to R_ARM_REL32
|
||||
# Check handling of R_ARM_REL32 relocation.
|
||||
# RUN: yaml2obj -format=elf %s -docnum 2 > %t-rel32.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec --target1-rel %t-rel32.o -o %t-rel32
|
||||
# RUN: llvm-objdump -s -t %t-rel32 | FileCheck -check-prefix=CHECK-REL32 %s
|
||||
#
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check ARM <=> Thumb interwork.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-arm.o %t-thm.o -o %t
|
||||
|
||||
# Check R_ARM_CALL veneer to call Thumb code
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# for other cases.
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_ARM_COPY relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: --noinhibit-exec %t-o.o -lobj -L%p/Inputs -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
# RUN: llvm-readobj -relocations %t | FileCheck -check-prefix=READOBJ %s
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check handling of R_ARM_GLOB_DAT relocation.
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -shared \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -shared \
|
||||
# RUN: --noinhibit-exec %t-o.o -lfn -L%p/Inputs -o %t
|
||||
# RUN: llvm-readobj -relocations %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check handling of R_ARM_GOT_BREL relocation.
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# R_ARM_LDR_PC_G2).
|
||||
#
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: -e plt_func %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of IFUNC (gnu_indirect_function).
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check handling of R_ARM_JUMP_SLOT relocation.
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -shared \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -shared \
|
||||
# RUN: --noinhibit-exec %t-o.o -lfn -L%p/Inputs -o %t
|
||||
# RUN: llvm-readobj -relocations %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_ARM_REL32 relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_ARM_THM_CALL relocation.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# CHECK: 00400080 g F .text {{[0-9a-f]+}} main
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
|
||||
# RUN: not lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: not lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t 2> %t-error
|
||||
# RUN: FileCheck -check-prefix=OVERFLOW %s < %t-error
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_ARM_THM_JUMP11 relocation.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# CHECK: 004001a4 g F .text 00000004 __gnu_h2f_alternative
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
|
||||
# RUN: not lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: not lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t 2> %t-error
|
||||
# RUN: FileCheck -check-prefix=OVERFLOW %s < %t-error
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-arm.o %t-thm.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=STATIC %s
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: --noinhibit-exec %t-arm.o %t-thm.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=EXEC-DYN %s
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Check handling of R_ARM_THM_JUMP24 relocation.
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# CHECK: 00400084 g F .text {{[0-9a-f]+}} main
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
|
||||
# RUN: not lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: not lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t 2> %t-error
|
||||
# RUN: FileCheck -check-prefix=OVERFLOW %s < %t-error
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 1. Check handling of R_ARM_THM_MOVW_ABS_NC and R_THM_ARM_MOVT_ABS relocation pair.
|
||||
# 2. Check that instructions are not cropped for symbols that address Thumb code.
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck %s
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=INSN-CROP %s
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-tls.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-tlsv.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-tls.o %t-tlsv.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=STATIC %s
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-tls.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-tlsv.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: --noinhibit-exec %t-tls.o %t-tlsv.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=EXEC-DYN %s
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check handling of R_ARM_TLS_LE32 relocation.
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=STATIC %s
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# STATIC: 00000000 g .tdata 00000004 i
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=EXEC-DYN %s
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Check handling of R_ARM_V4BX relocation.
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi \
|
||||
# RUN: --noinhibit-exec %t-o.o -o %t
|
||||
# RUN: llvm-objdump -d -triple=armv4t %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# 3. Symbol content.
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-t.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-t.o -o %t-t
|
||||
# RUN: llvm-readobj -symbols %t-t | FileCheck -check-prefix=SYM-ADDR %s
|
||||
# RUN: llvm-readobj -symbols %t-t | FileCheck -check-prefix=SYM-SIZE %s
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# R_ARM_GLOB_DAT may be present for the same symbol in the linked binary.
|
||||
|
||||
# RUN: yaml2obj -format=elf %s > %t-o.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -shared \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -shared \
|
||||
# RUN: --noinhibit-exec %t-o.o -lfn -L%p/Inputs -o %t
|
||||
# RUN: llvm-readobj -relocations %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check that _GLOBAL_OFFSET_TABLE_ symbol is resolved
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-got.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-got.o -o %t
|
||||
# RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=GOT %s
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# Check that __exidx_start/_end symbols are resolved
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-exidx.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --defsym=main=fn --noinhibit-exec %t-exidx.o -o %t
|
||||
# RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=EXIDX %s
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-got.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-exidx.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-got.o %t-exidx.o -o %t
|
||||
# RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=SYMS %s
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-arm.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm.o
|
||||
# RUN: lld -flavor gnu -target arm-linux-gnu --defsym=main=fa \
|
||||
# RUN: lld -flavor old-gnu -target arm-linux-gnu --defsym=main=fa \
|
||||
# RUN: -Bstatic --noinhibit-exec %t-arm.o %t-thm.o -o %t
|
||||
# RUN: llvm-readobj -symbols %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check weak references fixup.
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-jmp11.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-jmp11.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=JMP11-CHECK %s
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
# JMP11-CHECK: 00000000 w *UND* 00000000 __gnu_h2f_internal
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-thm-call.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-thm-call.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=THM-CALL-CHECK %s
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
# THM-CALL-CHECK: 00000000 w *UND* 00000000 weak_fn
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-arm-call.o
|
||||
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \
|
||||
# RUN: --noinhibit-exec %t-arm-call.o -o %t
|
||||
# RUN: llvm-objdump -s -t %t | FileCheck -check-prefix=ARM-CALL-CHECK %s
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RUN: lld -flavor gnu -target hexagon %p/Inputs/dynobj-data.o \
|
||||
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/dynobj-data.o \
|
||||
RUN: -o %t --noinhibit-exec -shared
|
||||
RUN: llvm-objdump -s %t > %t1
|
||||
RUN: FileCheck -check-prefix=CHECKRELOCS %s < %t1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# This tests GOT's and PLT's for dynamic libraries for Hexagon
|
||||
RUN: lld -flavor gnu -target hexagon %p/Inputs/dynobj.o \
|
||||
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/dynobj.o \
|
||||
RUN: -o %t --output-filetype=yaml -shared --noinhibit-exec
|
||||
RUN: FileCheck -check-prefix=CHECKGOTPLT %s < %t
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RUN: lld -flavor gnu -target hexagon %p/Inputs/dynobj.o \
|
||||
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/dynobj.o \
|
||||
RUN: -o %t --noinhibit-exec -shared
|
||||
RUN: llvm-objdump -s %t > %t1
|
||||
RUN: FileCheck -check-prefix=CHECKHASH %s < %t1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Tests that the relocation sections have the right alignment.
|
||||
RUN: lld -flavor gnu -target hexagon %p/Inputs/use-shared.hexagon -shared -o %t1
|
||||
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/use-shared.hexagon -shared -o %t1
|
||||
RUN: llvm-readobj -sections %t1 > %t2
|
||||
RUN: FileCheck -check-prefix=SECTIONS %s < %t2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RUN: lld -flavor gnu -target hexagon %p/Inputs/dynobj.o \
|
||||
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/dynobj.o \
|
||||
RUN: -o %t --noinhibit-exec -shared
|
||||
RUN: llvm-nm -n -M %t > %t1
|
||||
RUN: FileCheck -check-prefix=CHECKSYMS %s < %t1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RUN: lld -flavor gnu -target hexagon %p/Inputs/use-shared.hexagon -shared -o %t1
|
||||
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/use-shared.hexagon -shared -o %t1
|
||||
RUN: llvm-readobj -dyn-symbols %t1 > %t2
|
||||
RUN: FileCheck -check-prefix=DYNSYMS %s < %t2
|
||||
RUN: llvm-readobj -program-headers %t1 | FileCheck %s
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RUN: lld -flavor gnu -target hexagon %p/Inputs/got-plt-order.o -o %t -shared
|
||||
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/got-plt-order.o -o %t -shared
|
||||
RUN: llvm-objdump -section-headers %t | FileCheck %s
|
||||
|
||||
CHECK: .got
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RUN: lld -flavor gnu -target hexagon %p/Inputs/use-shared.hexagon \
|
||||
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/use-shared.hexagon \
|
||||
RUN: --output-filetype=yaml --noinhibit-exec -o %t2
|
||||
RUN: FileCheck %s < %t2
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# This tests that we lld is able to get the contentType properly for archives
|
||||
# when they intermittently get loaded at an address whose alignment is 2
|
||||
|
||||
RUN: lld -flavor gnu -target hexagon --whole-archive %p/Inputs/libMaxAlignment.a \
|
||||
RUN: lld -flavor old-gnu -target hexagon --whole-archive %p/Inputs/libMaxAlignment.a \
|
||||
RUN: --noinhibit-exec -static -o %t
|
||||
RUN: llvm-nm %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RUN: lld -flavor gnu -target hexagon %p/Inputs/dynobj.o -shared \
|
||||
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/dynobj.o -shared \
|
||||
RUN: --noinhibit-exec -o %t
|
||||
RUN: llvm-objdump -section-headers %t | FileCheck %s
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RUN: lld -flavor gnu -target hexagon %p/Inputs/sda-base.o -o %t1 --noinhibit-exec
|
||||
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/sda-base.o -o %t1 --noinhibit-exec
|
||||
RUN: llvm-nm -n %t1 | FileCheck %s -check-prefix=sdabase
|
||||
|
||||
sdabase: 00002000 A _SDA_BASE_
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# This tests that a typeZeroFillFast atom is associated with a section that has
|
||||
# the correct memory size.
|
||||
|
||||
RUN: lld -flavor gnu -target hexagon %p/Inputs/sdata1.o %p/Inputs/sdata2.o \
|
||||
RUN: lld -flavor old-gnu -target hexagon %p/Inputs/sdata1.o %p/Inputs/sdata2.o \
|
||||
RUN: -o %t --noinhibit-exec -static
|
||||
RUN: llvm-readobj -sections %t | FileCheck -check-prefix=CHECKSECTIONSANDSIZE %s
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Check rejecting .MIPS.abiflags section with a wrong version.
|
||||
|
||||
# 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: {{.*}}abi-flags-01.test.tmp.o: .MIPS.abiflags section has unsupported version '1'
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# settings as the input section.
|
||||
|
||||
# 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 -s -program-headers -mips-abi-flags %t.so | FileCheck %s
|
||||
|
||||
# CHECK: Section {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t1.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t2.o
|
||||
# RUN: yaml2obj -format=elf -docnum 3 %s > %t3.o
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t1.o %t2.o %t3.o
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t1.o %t2.o %t3.o
|
||||
# RUN: llvm-readobj -mips-abi-flags %t.so | FileCheck %s
|
||||
|
||||
# CHECK: MIPS ABI Flags {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-64.o
|
||||
# RUN: yaml2obj -format=elf -docnum 4 %s > %t-64a.o
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t1 %t-xx.o %t-double.o
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t1 %t-xx.o %t-double.o
|
||||
# RUN: llvm-readobj -mips-abi-flags %t1 | FileCheck -check-prefix=XX-DOUBLE %s
|
||||
|
||||
# XX-DOUBLE: FP ABI: Hard float (double precision) (0x1)
|
||||
@@ -19,7 +19,7 @@
|
||||
# XX-DOUBLE: CPR1 size: 32
|
||||
# XX-DOUBLE: Flags 1 [ (0x0)
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t2 %t-xx.o %t-64.o
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t2 %t-xx.o %t-64.o
|
||||
# RUN: llvm-readobj -mips-abi-flags %t2 | FileCheck -check-prefix=XX-64 %s
|
||||
|
||||
# XX-64: FP ABI: Hard float (32-bit CPU, 64-bit FPU) (0x6)
|
||||
@@ -28,7 +28,7 @@
|
||||
# XX-64: Flags 1 [ (0x1)
|
||||
# XX-64: ODDSPREG (0x1)
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t3 %t-xx.o %t-64a.o
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t3 %t-xx.o %t-64a.o
|
||||
# RUN: llvm-readobj -mips-abi-flags %t3 | FileCheck -check-prefix=XX-64A %s
|
||||
|
||||
# XX-64A: FP ABI: Hard float compat (32-bit CPU, 64-bit FPU) (0x7)
|
||||
@@ -36,7 +36,7 @@
|
||||
# XX-64A: CPR1 size: 64
|
||||
# XX-64A: Flags 1 [ (0x0)
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t4 %t-64.o %t-64a.o
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t4 %t-64.o %t-64a.o
|
||||
# RUN: llvm-readobj -mips-abi-flags %t4 | FileCheck -check-prefix=64-64A %s
|
||||
|
||||
# 64-64A: FP ABI: Hard float (32-bit CPU, 64-bit FPU) (0x6)
|
||||
|
||||
@@ -13,57 +13,57 @@
|
||||
# RUN: yaml2obj -format=elf -docnum 5 %s > %t-64.o
|
||||
# RUN: yaml2obj -format=elf -docnum 6 %s > %t-64a.o
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t1 %t-xx.o %t-sgl.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t1 %t-xx.o %t-sgl.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=XX-SINGLE-WARN %s
|
||||
|
||||
# XX-SINGLE-WARN: FP ABI {{-mfpxx|-msingle-float}} is incompatible with {{-msingle-float|-mfpxx}}
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t2 %t-xx.o %t-soft.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t2 %t-xx.o %t-soft.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=XX-SOFT-WARN %s
|
||||
|
||||
# XX-SOFT-WARN: FP ABI {{-mfpxx|-msoft-float}} is incompatible with {{-msoft-float|-mfpxx}}
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t3 %t-dbl.o %t-sgl.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t3 %t-dbl.o %t-sgl.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=DOUBLE-SINGLE-WARN %s
|
||||
|
||||
# DOUBLE-SINGLE-WARN: FP ABI {{-mdouble-float|-msingle-float}} is incompatible with {{-msingle-float|-mdouble-float}}
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t4 %t-dbl.o %t-soft.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t4 %t-dbl.o %t-soft.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=DOUBLE-SOFT-WARN %s
|
||||
|
||||
# DOUBLE-SOFT-WARN: FP ABI {{-mdouble-float|-msoft-float}} is incompatible with {{-msoft-float|-mdouble-float}}
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t5 %t-dbl.o %t-64.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t5 %t-dbl.o %t-64.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=DOUBLE-64-WARN %s
|
||||
|
||||
# DOUBLE-64-WARN: FP ABI {{-mdouble-float|-mgp32 -mfp64}} is incompatible with {{-mgp32 -mfp64|-mdouble-float}}
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t6 %t-dbl.o %t-64a.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t6 %t-dbl.o %t-64a.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=DOUBLE-64A-WARN %s
|
||||
|
||||
# DOUBLE-64A-WARN: FP ABI {{-mdouble-float|-mgp32 -mfp64 -mno-odd-spreg}} is incompatible with {{-mgp32 -mfp64 -mno-odd-spreg|-mdouble-float}}
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t7 %t-sgl.o %t-soft.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t7 %t-sgl.o %t-soft.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=SINGLE-SOFT-WARN %s
|
||||
|
||||
# SINGLE-SOFT-WARN: FP ABI {{-msingle-float|-msoft-float}} is incompatible with {{-msoft-float|-msingle-float}}
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t8 %t-sgl.o %t-64.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t8 %t-sgl.o %t-64.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=SINGLE-64-WARN %s
|
||||
|
||||
# SINGLE-64-WARN: FP ABI {{-msingle-float|-mgp32 -mfp64}} is incompatible with {{-mgp32 -mfp64|-msingle-float}}
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t9 %t-sgl.o %t-64a.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t9 %t-sgl.o %t-64a.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=SINGLE-64A-WARN %s
|
||||
|
||||
# SINGLE-64A-WARN: FP ABI {{-msingle-float|-mgp32 -mfp64 -mno-odd-spreg}} is incompatible with {{-mgp32 -mfp64 -mno-odd-spreg|-msingle-float}}
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t10 %t-soft.o %t-64.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t10 %t-soft.o %t-64.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=SOFT-64-WARN %s
|
||||
|
||||
# SOFT-64-WARN: FP ABI {{-msoft-float|-mgp32 -mfp64}} is incompatible with {{-mgp32 -mfp64|-msoft-float}}
|
||||
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t11 %t-soft.o %t-64a.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t11 %t-soft.o %t-64a.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=SOFT-64A-WARN %s
|
||||
|
||||
# SOFT-64A-WARN: FP ABI {{-msoft-float|-mgp32 -mfp64 -mno-odd-spreg}} is incompatible with {{-mgp32 -mfp64 -mno-odd-spreg|-msoft-float}}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-abi.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-elf.o
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-abi.o %t-elf.o
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t-abi.o %t-elf.o
|
||||
# RUN: llvm-readobj -mips-abi-flags %t.so | FileCheck %s
|
||||
|
||||
# CHECK: MIPS ABI Flags {
|
||||
|
||||
@@ -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 -shared -o %t.so %t1.o %t2.o
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t1.o %t2.o
|
||||
# RUN: llvm-readobj -mips-abi-flags %t.so | FileCheck %s
|
||||
|
||||
# CHECK: There is no .MIPS.abiflags section in the file.
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-isa.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-ext.o
|
||||
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-ases.o
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t1.so %t-isa.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t1.so %t-isa.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ISA-ERR %s
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t2.so %t-ext.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t2.so %t-ext.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=EXT-ERR %s
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t3.so %t-ases.o 2>&1 \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t3.so %t-ases.o 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ASE-ERR %s
|
||||
# RUN: llvm-readobj -mips-abi-flags %t1.so %t2.so %t3.so \
|
||||
# RUN: | FileCheck -check-prefix=SEC %s
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# It should go right after the PT_INTERP segment.
|
||||
|
||||
# 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-readobj -program-headers %t.exe | FileCheck %s
|
||||
|
||||
# CHECK: ProgramHeader {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# if there is a SHT_MIPS_ABIFLAGS section.
|
||||
|
||||
# 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-readobj -program-headers %t.exe | FileCheck %s
|
||||
|
||||
# CHECK: ProgramHeaders [
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# It should go right after the PT_INTERP segment.
|
||||
|
||||
# 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-readobj -program-headers %t.exe | FileCheck %s
|
||||
|
||||
# CHECK: ProgramHeader {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# equal to 0x400000 and the MIPS_BASE_ADDRESS dynamic tag's value should
|
||||
# be the same.
|
||||
# RUN: yaml2obj -format=elf %s > %t.o
|
||||
# RUN: lld -flavor gnu -target mips64el --noinhibit-exec -o %t.exe %t.o
|
||||
# RUN: lld -flavor old-gnu -target mips64el --noinhibit-exec -o %t.exe %t.o
|
||||
# RUN: llvm-readobj -dynamic-table -program-headers %t.exe | FileCheck %s
|
||||
|
||||
# CHECK: DynamicSection [ (15 entries)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# equal to 0x400000 and the MIPS_BASE_ADDRESS dynamic tag's value should
|
||||
# be the same.
|
||||
# RUN: yaml2obj -format=elf %s > %t.o
|
||||
# RUN: lld -flavor gnu -target mipsel --noinhibit-exec -o %t.exe %t.o
|
||||
# RUN: lld -flavor old-gnu -target mipsel --noinhibit-exec -o %t.exe %t.o
|
||||
# RUN: llvm-readobj -dynamic-table -program-headers %t.exe | FileCheck %s
|
||||
|
||||
# CHECK: DynamicSection [ (15 entries)
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-crtbeginS.o
|
||||
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-crtendS.o
|
||||
# RUN: yaml2obj -format=elf -docnum 3 %s > %t-obj.o
|
||||
# RUN: lld -flavor gnu -target mipsel -shared --output-filetype=yaml \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared --output-filetype=yaml \
|
||||
# RUN: %t-crtbeginS.o %t-obj.o %t-crtendS.o | FileCheck %s
|
||||
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so \
|
||||
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so \
|
||||
# RUN: %t-crtbeginS.o %t-obj.o %t-crtendS.o
|
||||
# RUN: llvm-objdump -s %t.so | FileCheck -check-prefix=RAW %s
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
# because it is the only style supported by MIPS ABI.
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
|
||||
# RUN: not lld -flavor gnu -target mips --hash-style=both %t.o -o %t.exe 2>&1 \
|
||||
# RUN: not lld -flavor old-gnu -target mips --hash-style=both %t.o -o %t.exe 2>&1 \
|
||||
# RUN: | FileCheck %s
|
||||
# RUN: not lld -flavor gnu -target mips --hash-style=gnu %t.o -o %t.exe 2>&1 \
|
||||
# RUN: not lld -flavor old-gnu -target mips --hash-style=gnu %t.o -o %t.exe 2>&1 \
|
||||
# RUN: | FileCheck %s
|
||||
|
||||
# CHECK: error: .gnu.hash is incompatible with the MIPS ABI
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user