Mercurial > hg > CbC > CbC_llvm
view lld/test/COFF/reloc-discarded.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 | 1d019706d866 |
children |
line wrap: on
line source
# REQUIRES: x86 # RUN: echo -e '.section .bss,"bw",discard,main_global\n.global main_global\n main_global:\n .long 0' | \ # RUN: llvm-mc - -filetype=obj -o %t1.obj -triple x86_64-windows-msvc # RUN: llvm-mc %s -filetype=obj -o %t2.obj -triple x86_64-windows-msvc # LLD should report an error and not assert regardless of whether we are doing # GC. # RUN: not lld-link -entry:main -nodefaultlib %t1.obj %t2.obj -out:%t.exe -opt:ref 2>&1 | FileCheck %s # RUN: not lld-link -entry:main -nodefaultlib %t1.obj %t2.obj -out:%t.exe -opt:noref 2>&1 | FileCheck %s # CHECK: error: relocation against symbol in discarded section: assoc_global # CHECK: >>> referenced by {{.*}}reloc-discarded{{.*}}.obj:(main) .section .bss,"bw",discard,main_global .globl main_global .p2align 2 main_global: .long 0 .section .CRT$XCU,"dr",associative,main_global .p2align 3 assoc_global: .quad main_global .text .globl main main: movq assoc_global(%rip), %rax movl (%rax), %eax retq