annotate lld/test/ELF/incompatible.s @ 192:d7606dcf6fce

Added tag llvm10 for changeset 0572611fdcc8
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 14 Dec 2020 18:01:34 +0900
parents 0572611fdcc8
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // REQUIRES: x86,aarch64
anatofuz
parents:
diff changeset
2 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %ta.o
anatofuz
parents:
diff changeset
3 // RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %s -o %tb.o
anatofuz
parents:
diff changeset
4 // RUN: ld.lld -shared %tb.o -o %ti686.so
anatofuz
parents:
diff changeset
5 // RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %tc.o
anatofuz
parents:
diff changeset
6
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
7 // RUN: not ld.lld %ta.o %tb.o -o /dev/null 2>&1 | \
150
anatofuz
parents:
diff changeset
8 // RUN: FileCheck --check-prefix=A-AND-B %s
anatofuz
parents:
diff changeset
9 // A-AND-B: b.o is incompatible with {{.*}}a.o
anatofuz
parents:
diff changeset
10
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
11 // RUN: not ld.lld %tb.o %tc.o -o /dev/null 2>&1 | \
150
anatofuz
parents:
diff changeset
12 // RUN: FileCheck --check-prefix=B-AND-C %s
anatofuz
parents:
diff changeset
13 // B-AND-C: c.o is incompatible with {{.*}}b.o
anatofuz
parents:
diff changeset
14
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
15 // RUN: not ld.lld %ta.o %ti686.so -o /dev/null 2>&1 | \
150
anatofuz
parents:
diff changeset
16 // RUN: FileCheck --check-prefix=A-AND-SO %s
anatofuz
parents:
diff changeset
17 // A-AND-SO: i686.so is incompatible with {{.*}}a.o
anatofuz
parents:
diff changeset
18
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
19 // RUN: not ld.lld %tc.o %ti686.so -o /dev/null 2>&1 | \
150
anatofuz
parents:
diff changeset
20 // RUN: FileCheck --check-prefix=C-AND-SO %s
anatofuz
parents:
diff changeset
21 // C-AND-SO: i686.so is incompatible with {{.*}}c.o
anatofuz
parents:
diff changeset
22
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
23 // RUN: not ld.lld %ti686.so %tc.o -o /dev/null 2>&1 | \
150
anatofuz
parents:
diff changeset
24 // RUN: FileCheck --check-prefix=SO-AND-C %s
anatofuz
parents:
diff changeset
25 // SO-AND-C: c.o is incompatible with {{.*}}i686.so
anatofuz
parents:
diff changeset
26
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
27 // RUN: not ld.lld -m elf64ppc %ta.o -o /dev/null 2>&1 | \
150
anatofuz
parents:
diff changeset
28 // RUN: FileCheck --check-prefix=A-ONLY %s
anatofuz
parents:
diff changeset
29 // A-ONLY: a.o is incompatible with elf64ppc
anatofuz
parents:
diff changeset
30
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
31 // RUN: not ld.lld -m elf64ppc %tb.o -o /dev/null 2>&1 | \
150
anatofuz
parents:
diff changeset
32 // RUN: FileCheck --check-prefix=B-ONLY %s
anatofuz
parents:
diff changeset
33 // B-ONLY: b.o is incompatible with elf64ppc
anatofuz
parents:
diff changeset
34
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
35 // RUN: not ld.lld -m elf64ppc %tc.o -o /dev/null 2>&1 | \
150
anatofuz
parents:
diff changeset
36 // RUN: FileCheck --check-prefix=C-ONLY %s
anatofuz
parents:
diff changeset
37 // C-ONLY: c.o is incompatible with elf64ppc
anatofuz
parents:
diff changeset
38
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
39 // RUN: not ld.lld -m elf_i386 %tc.o %ti686.so -o /dev/null 2>&1 | \
150
anatofuz
parents:
diff changeset
40 // RUN: FileCheck --check-prefix=C-AND-SO-I386 %s
anatofuz
parents:
diff changeset
41 // C-AND-SO-I386: c.o is incompatible with elf_i386
anatofuz
parents:
diff changeset
42
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
43 // RUN: not ld.lld -m elf_i386 %ti686.so %tc.o -o /dev/null 2>&1 | \
150
anatofuz
parents:
diff changeset
44 // RUN: FileCheck --check-prefix=SO-AND-C-I386 %s
anatofuz
parents:
diff changeset
45 // SO-AND-C-I386: c.o is incompatible with elf_i386
anatofuz
parents:
diff changeset
46
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
47 // RUN: echo 'OUTPUT_FORMAT(elf32-i386)' > %t.script
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
48 // RUN: not ld.lld %t.script %ta.o -o /dev/null 2>&1 | \
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
49 // RUN: FileCheck --check-prefix=A-AND-SCRIPT %s
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
50 // RUN: not ld.lld %ta.o %t.script -o /dev/null 2>&1 | \
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
51 // RUN: FileCheck --check-prefix=A-AND-SCRIPT %s
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
52 // RUN: not ld.lld -m elf_x86_64 %ta.o %t.script -o /dev/null 2>&1 | \
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
53 // RUN: FileCheck --check-prefix=A-AND-SCRIPT %s
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
54 // A-AND-SCRIPT: a.o is incompatible with elf32-i386
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
55
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
56 // RUN: echo 'OUTPUT_FORMAT(elf32-i386-freebsd)' > %t-freebsd.script
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
57 // RUN: not ld.lld %t-freebsd.script %ta.o -o /dev/null 2>&1 | \
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
58 // RUN: FileCheck --check-prefix=A-AND-FREEBSD-SCRIPT %s
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
59 // A-AND-FREEBSD-SCRIPT: a.o is incompatible with elf32-i386-freebsd
150
anatofuz
parents:
diff changeset
60
anatofuz
parents:
diff changeset
61 // We used to fail to identify this incompatibility and crash trying to
anatofuz
parents:
diff changeset
62 // read a 64 bit file as a 32 bit one.
anatofuz
parents:
diff changeset
63 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/archive2.s -o %ta.o
anatofuz
parents:
diff changeset
64 // RUN: rm -f %t.a
anatofuz
parents:
diff changeset
65 // RUN: llvm-ar rc %t.a %ta.o
anatofuz
parents:
diff changeset
66 // RUN: llvm-mc -filetype=obj -triple=i686-linux %s -o %tb.o
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
67 // RUN: not ld.lld %t.a %tb.o 2>&1 -o /dev/null | FileCheck --check-prefix=ARCHIVE %s
150
anatofuz
parents:
diff changeset
68 // ARCHIVE: .a({{.*}}a.o) is incompatible with {{.*}}b.o
anatofuz
parents:
diff changeset
69 .global _start
anatofuz
parents:
diff changeset
70 _start:
anatofuz
parents:
diff changeset
71 .data
anatofuz
parents:
diff changeset
72 .long foo
anatofuz
parents:
diff changeset
73