[llvm] r225235 - Add a testcase that would have found the problem in r225048.

Rafael Espindola rafael.espindola at gmail.com
Mon Jan 5 17:41:25 PST 2015


Author: rafael
Date: Mon Jan  5 19:41:24 2015
New Revision: 225235

URL: http://llvm.org/viewvc/llvm-project?rev=225235&view=rev
Log:
Add a testcase that would have found the problem in r225048.

Added:
    llvm/trunk/test/MC/MachO/AArch64/reloc-crash.s

Added: llvm/trunk/test/MC/MachO/AArch64/reloc-crash.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/AArch64/reloc-crash.s?rev=225235&view=auto
==============================================================================
--- llvm/trunk/test/MC/MachO/AArch64/reloc-crash.s (added)
+++ llvm/trunk/test/MC/MachO/AArch64/reloc-crash.s Mon Jan  5 19:41:24 2015
@@ -0,0 +1,27 @@
+; RUN: llvm-mc -triple arm64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s
+
+; Test tha we produce an external relocation. There is no apparent need for it, but
+; ld64 (241.9) crashes if we don't.
+
+; CHECK:      Relocations [
+; CHECK-NEXT:   Section __bar {
+; CHECK-NEXT:     Relocation {
+; CHECK-NEXT:       Offset: 0x0
+; CHECK-NEXT:       PCRel: 0
+; CHECK-NEXT:       Length: 3
+; CHECK-NEXT:       Extern: 1
+; CHECK-NEXT:       Type: ARM64_RELOC_UNSIGNED (0)
+; CHECK-NEXT:       Symbol: Lbar
+; CHECK-NEXT:       Scattered: 0
+; CHECK-NEXT:     }
+; CHECK-NEXT:   }
+; CHECK-NEXT: ]
+
+        .section        __TEXT,__cstring
+Lfoo:
+        .asciz  "Hello World!"
+Lbar:
+        .asciz  "cString"
+
+        .section        __foo,__bar,literal_pointers
+        .quad   Lbar





More information about the llvm-commits mailing list