brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 1f31a2b Raw
44 lines · plain
1# REQUIRES: x862# RUN: split-file %s %t.dir3 4## We've got references to variable both in a .refptr and in .debug_info.5## The .debug_info section should be discardable, so no pseudo relocations6## need to be created in it. The .refptr section should be elimiated7## and redirected to __imp_variable instead, so we shouldn't need to8## create any runtime pseudo relocations. Thus, test that we can link9## successfully with -runtime-pseudo-reloc:no, while keeping the10## debug info.11 12# RUN: llvm-mc -triple=x86_64-windows-gnu %t.dir/lib.s -filetype=obj -o %t.dir/lib.obj13# RUN: lld-link -out:%t.dir/lib.dll -dll -entry:DllMainCRTStartup %t.dir/lib.obj -lldmingw -implib:%t.dir/lib.lib14 15# RUN: llvm-mc -triple=x86_64-windows-gnu %t.dir/main.s -filetype=obj -o %t.dir/main.obj16# RUN: lld-link -lldmingw -out:%t.dir/main.exe -entry:main %t.dir/main.obj %t.dir/lib.lib -opt:noref -debug:dwarf -runtime-pseudo-reloc:no17 18#--- main.s19    .global main20    .text21main:22    movq .refptr.variable(%rip), %rax23    ret24 25    .section .rdata$.refptr.variable,"dr",discard,.refptr.variable26    .global .refptr.variable27.refptr.variable:28    .quad   variable29 30    .section .debug_info31    .long 132    .quad variable33    .long 234 35#--- lib.s36    .global variable37    .global DllMainCRTStartup38    .text39DllMainCRTStartup:40    ret41    .data42variable:43    .long 4244