[RuntimeDyld] Skip relocations for external symbols with 64-bit address ~0ULL.
[oota-llvm.git] / test / ExecutionEngine / RuntimeDyld / X86 / MachO_x86-64_PIC_relocations.s
index f28e4d2..2ef8cc4 100644 (file)
@@ -1,5 +1,5 @@
 # RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -relocation-model=pic -filetype=obj -o %T/test_x86-64.o %s
-# RUN: llvm-rtdyld -triple=x86_64-apple-macosx10.9 -verify -check=%s %/T/test_x86-64.o
+# RUN: llvm-rtdyld -triple=x86_64-apple-macosx10.9 -dummy-extern ds1=0xfffffffffffffffe -dummy-extern ds2=0xffffffffffffffff -verify -check=%s %/T/test_x86-64.o
 
         .section       __TEXT,__text,regular,pure_instructions
        .globl  foo
@@ -46,4 +46,15 @@ eh_frame_test:
 x:
         .long   5
 
+# Test dummy-extern relocation.
+# rtdyld-check: *{8}z1 = ds1
+z1:
+        .quad   ds1
+
+# Test external-symbol relocation bypass: symbols with addr 0xffffffffffffffff
+# don't have their relocations applied.
+# rtdyld-check: *{8}z2 = 0
+z2:
+        .quad   ds2
+
 .subsections_via_symbols