brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 404f797 Raw
37 lines · plain
1# REQUIRES: x862# RUN: printf '.section .bss,"bw",discard,main_global\n.global main_global\n main_global:\n .long 0' | \3# RUN:     llvm-mc - -filetype=obj -o %t1.obj -triple x86_64-windows-msvc4# RUN: llvm-mc %s -filetype=obj -o %t2.obj -triple x86_64-windows-msvc5 6# LLD should report an error and not assert regardless of whether we are doing7# GC.8 9# RUN: not lld-link -entry:main -nodefaultlib %t1.obj %t2.obj -out:%t.exe -opt:ref   2>&1 | FileCheck %s10# RUN: not lld-link -entry:main -nodefaultlib %t1.obj %t2.obj -out:%t.exe -opt:noref 2>&1 | FileCheck %s11# RUN: not lld-link -entry:main -nodefaultlib %t1.obj %t2.obj -out:%t.exe -demangle:no   2>&1 \12# RUN:     | FileCheck --check-prefix=NODEMANGLE %s13 14# CHECK: error: relocation against symbol in discarded section: int __cdecl assoc_global(void)15# CHECK: >>> referenced by {{.*}}reloc-discarded{{.*}}.obj:(main)16 17# NODEMANGLE: error: relocation against symbol in discarded section: ?assoc_global@@YAHXZ18# NODEMANGLE: >>> referenced by {{.*}}reloc-discarded{{.*}}.obj:(main)19 20	.section	.bss,"bw",discard,main_global21	.globl	main_global22	.p2align	223main_global:24	.long	025 26	.section	.CRT$XCU,"dr",associative,main_global27	.p2align	328"?assoc_global@@YAHXZ":29	.quad	main_global30 31	.text32	.globl main33main:34	movq "?assoc_global@@YAHXZ"(%rip), %rax35	movl (%rax), %eax36	retq37