1# REQUIRES: x86 2# 3# RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-head.s -filetype=obj -o %t-dabcdh.o 4# RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-func.s -filetype=obj -o %t-dabcds00000.o 5# RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-tail.s -filetype=obj -o %t-dabcdt.o 6# RUN: rm -f %t-implib.a 7# RUN: llvm-ar rcs %t-implib.a %t-dabcdh.o %t-dabcds00000.o %t-dabcdt.o 8# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj 9# RUN: lld-link -out:%t.exe -entry:main -subsystem:console \ 10# RUN: %t.obj %t-implib.a 11# RUN: llvm-objdump -s %t.exe | FileCheck --check-prefix=DATA %s 12 13 .text 14 .global main 15main: 16 call func 17 ret 18 19# Check that the linker inserted the null terminating import descriptor, 20# even if there were no normal import libraries, only gnu ones. 21 22# DATA: Contents of section .rdata: 23# First import descriptor 24# DATA: 140002000 28200000 00000000 00000000 53200000 25# Last word from first import descriptor, null terminator descriptor 26# DATA: 140002010 38200000 00000000 00000000 00000000 27# Null terminator descriptor and import lookup table. 28# DATA: 140002020 00000000 00000000 48200000 00000000 29