1# RUN: rm -rf %t && mkdir -p %t 2# RUN: llvm-mc -triple=x86_64-pc-win32 -filetype=obj -o %t/COFF_x86_64_IMGREL.o %s 3# RUN: llvm-rtdyld -triple=x86_64-pc-win32 -verify -target-addr-start=40960000000000 -check=%s %t/COFF_x86_64_IMGREL.o 4.text 5 .def F; 6 .scl 2; 7 .type 32; 8 .endef 9 .globl __constdata 10 11.section .rdata, "dr", discard, __constdata 12 .align 8 13 __constdata: 14 .quad 0 15 16.text 17 .globl F 18 .align 16, 0x90 19 20F: # @F 21# rtdyld-check: decode_operand(inst1, 3) = section_addr(COFF_x86_64_IMGREL.o, .text)+0-40960000000000 22inst1: 23 mov %ebx, F@IMGREL 24# rtdyld-check: decode_operand(inst2, 3) = section_addr(COFF_x86_64_IMGREL.o, .rdata)+5-40960000000000 25inst2: 26 mov %ebx, (__constdata@imgrel+5) 27 .data 28 .space 375 29rel1: 30# rtdyld-check: *{4}rel1 = string - section_addr(COFF_x86_64_IMGREL.o, .data) 31 .secrel32 string 32 33# We explicitly add padding to put string outside of the 16bit address space 34# (absolute and as an offset from .data), so that relocations involving 35# 32bit addresses / offsets are not accidentally truncated to 16 bits. 36 .space 65536 37 .global string 38 .align 1 39string: 40 .asciz "Hello World\n" 41