summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/mips-elf-flags-err.test
blob: 12fd418274ce77d2aeefa5de4972132628e8d3c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# REQUIRES: mips
#
# Check warning and errors in case of input
# files with incompatible ELF header flags.

# RUN: yaml2obj -docnum 1 %s -o %t-n64.o
# RUN: yaml2obj -docnum 2 %s -o %t-o64.o
# RUN: yaml2obj -docnum 3 %s -o %t-n32.o
# RUN: yaml2obj -docnum 4 %s -o %t-o32.o
# RUN: yaml2obj -docnum 5 %s -o %t-eabi64.o
# RUN: yaml2obj -docnum 6 %s -o %t-eabi32.o

# RUN: not ld.lld %t-n64.o %t-eabi64.o -shared -o /dev/null 2>&1 \
# RUN:   | FileCheck -check-prefixes=MM64,N64EABI64 %s
#
# RUN: not ld.lld %t-n64.o %t-o64.o -shared -o /dev/null 2>&1 \
# RUN:   | FileCheck -check-prefixes=MM64,N64O64 %s

# RUN: not ld.lld %t-o32.o %t-eabi32.o -shared -o /dev/null 2>&1 \
# RUN:   | FileCheck -check-prefixes=O32EABI32,FP64,CPIC1 %s

# RUN: not ld.lld %t-eabi32.o %t-o32.o -shared -o /dev/null 2>&1 \
# RUN:   | FileCheck -check-prefix=CPIC2 %s

# MM64: {{.*}}n64.o: microMIPS 64-bit is not supported

# N64EABI64: {{.*}}eabi64.o: ABI 'eabi64' is incompatible with target ABI 'n64'
# N64O64: {{.*}}o64.o: ABI 'o64' is incompatible with target ABI 'n64'
# O32EABI32: {{.*}}eabi32.o: ABI 'eabi32' is incompatible with target ABI 'o32'

# NAN: {{.*}}o32.o: -mnan=legacy is incompatible with target -mnan=2008
# FP64: {{.*}}eabi32.o: -mfp64 is incompatible with target -mfp32

# CPIC1: {{.*}}tmp-eabi32.o: linking non-abicalls code with abicalls code {{.*}}o32.o
# CPIC2: {{.*}}tmp-o32.o: linking abicalls code with non-abicalls code {{.*}}eabi32.o

# n64.o
--- !ELF
FileHeader:
  Class:    ELFCLASS64
  Data:     ELFDATA2MSB
  Type:     ET_REL
  Machine:  EM_MIPS
  Flags:    [ EF_MIPS_ARCH_64, EF_MIPS_MICROMIPS ]

# o64.o
--- !ELF
FileHeader:
  Class:    ELFCLASS64
  Data:     ELFDATA2MSB
  Type:     ET_REL
  Machine:  EM_MIPS
  Flags:    [ EF_MIPS_ABI_O64, EF_MIPS_ARCH_64 ]

# n32.o
--- !ELF
FileHeader:
  Class:    ELFCLASS32
  Data:     ELFDATA2MSB
  Type:     ET_REL
  Machine:  EM_MIPS
  Flags:    [ EF_MIPS_ARCH_64, EF_MIPS_ABI2, EF_MIPS_NAN2008 ]

# o32.o
--- !ELF
FileHeader:
  Class:    ELFCLASS32
  Data:     ELFDATA2MSB
  Type:     ET_REL
  Machine:  EM_MIPS
  Flags:    [ EF_MIPS_ARCH_32, EF_MIPS_ABI_O32, EF_MIPS_CPIC ]

# eabi64.o
--- !ELF
FileHeader:
  Class:    ELFCLASS64
  Data:     ELFDATA2MSB
  Type:     ET_REL
  Machine:  EM_MIPS
  Flags:    [ EF_MIPS_ARCH_64, EF_MIPS_ABI_EABI64 ]

# eabi32.o
--- !ELF
FileHeader:
  Class:    ELFCLASS32
  Data:     ELFDATA2MSB
  Type:     ET_REL
  Machine:  EM_MIPS
  Flags:    [ EF_MIPS_ARCH_32, EF_MIPS_ABI_EABI32, EF_MIPS_FP64 ]
OpenPOWER on IntegriCloud