2 // RUN
: rm
-rf
%t && split-file
%s
%t && cd
%t
3 // RUN
: llvm-mc
-filetype
=obj
-triple
=i386
--defsym X86_32
=1 asm
-o
a.o
4 // RUN
: ld.lld
-T lds
a.o
-o
a 2>&1 | FileCheck
%s
--implicit-check-
not=warning
:
5 // CHECK
: warning
: {{.*}}.o:(.nonalloc1+0x1): has non-ABS relocation R_386_PC32 against symbol '_start'
6 // CHECK-NEXT
: warning
: {{.*}}.o:(.nonalloc1+0x6): has non-ABS relocation R_386_PC32 against symbol 'ifunc'
7 // CHECK-NEXT
: warning
: {{.*}}.o:(.nonalloc1+0xa): has non-ABS relocation R_386_PC32 against symbol ''
9 // RUN
: llvm-objdump
-D
--no-show-raw-insn
a | FileCheck
--check-prefix
=DISASM
%s
10 // DISASM
: Disassembly of section
.nonalloc:
12 // DISASM-NEXT
: <.nonalloc>:
13 // DISASM-NEXT
: 0: nop
14 // DISASM-NEXT
: 1: call
{{.}} 0x0
15 // DISASM-NEXT
: 6: call
{{.}} 0x5
17 /// There is currently no error for
-r. See also https
://github.com
/ClangBuiltLinux
/linux
/issues
/1937
18 // RUN
: ld.lld
-T lds
-r
a.o
-o
/dev
/null
2>&1 | FileCheck
%s
--check-prefix
=REL-R
--implicit-check-
not=warning
:
19 // REL-R
: warning
: {{.*}}:(.nonalloc1+0xa): has non-ABS relocation R_386_PC32 against symbol ''
21 // RUN
: llvm-mc
-filetype
=obj
-triple
=x86_64 asm
-o b.o
22 // RUN
: ld.lld
-T lds b.o
-o
b 2>&1 | FileCheck
%s
--check-prefix
=CHECK2
--implicit-check-
not=warning
:
23 // RUN
: llvm-objdump
-D
--no-show-raw-insn
b | FileCheck
--check-prefix
=DISASM
%s
24 // RUN
: ld.lld
-T lds
-r b.o
-o
/dev
/null
--fatal-warnings
25 // CHECK2
: warning
: {{.*}}.o:(.nonalloc1+0x1): has non-ABS relocation R_X86_64_PC32 against symbol '_start'
26 // CHECK2-NEXT
: warning
: {{.*}}.o:(.nonalloc1+0x6): has non-ABS relocation R_X86_64_PC32 against symbol 'ifunc'
27 // CHECK2-NEXT
: warning
: {{.*}}.o:(.nonalloc1+0xa): has non-ABS relocation R_X86_64_PC32 against symbol ''
31 .nonalloc 0 : { *(.nonalloc*) }
40 .type ifunc, @gnu_indirect_function
53 // GCC may relocate DW_AT_GNU_call_site_value with R_386_GOTOFF.
54 // https
://gcc.gnu.org
/bugzilla
/show_bug.cgi?id
=98946
56 .section .debug_random