[lld] r190714 - Add test case for the not-yet implemented copy relocations.

Joerg Sonnenberger joerg at bec.de
Fri Sep 13 11:32:34 PDT 2013


Author: joerg
Date: Fri Sep 13 13:32:34 2013
New Revision: 190714

URL: http://llvm.org/viewvc/llvm-project?rev=190714&view=rev
Log:
Add test case for the not-yet implemented copy relocations.

Added:
    lld/trunk/test/missing/
    lld/trunk/test/missing/Inputs/
    lld/trunk/test/missing/undef-from-main-dso.test

Added: lld/trunk/test/missing/undef-from-main-dso.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/missing/undef-from-main-dso.test?rev=190714&view=auto
==============================================================================
--- lld/trunk/test/missing/undef-from-main-dso.test (added)
+++ lld/trunk/test/missing/undef-from-main-dso.test Fri Sep 13 13:32:34 2013
@@ -0,0 +1,31 @@
+RUN: lld -flavor gnu -e main -o %t -L%p/Inputs -ltest %p/Inputs/undef-from-main.o
+RUN: llvm-readobj -relocations -symbols %t | FileCheck %s
+
+XFAIL: *
+
+# DSO source code:
+# int x[2] = { 1, 2 };
+#
+# Main binary source code:
+#
+# extern int x[2];
+#
+# int main(void)
+# {
+#    x[0] = 2;
+# }
+#
+
+CHECK:       Relocations [
+CHECK-NEXT:    Section ({{[0-9]+}}) .rela.dyn {
+CHECK-NEXT:      0x{{[1-9A-F][0-9A-F]*}} R_X86_64_COPY x 0x0
+CHECK-NEXT:    }
+CHECK-NEXT:  ]
+
+CHECK:         Name: x ({{[0-9]+}}
+CHECK-NEXT:    Value: 0x{{[1-9A-F][0-9A-F]*}}
+CHECK-NEXT:    Size: 8
+CHECK-NEXT:    Binding: Global (0x1)
+CHECK-NEXT:    Type: Object (0x1)
+CHECK-NEXT:    Other: 0
+CHECK-NEXT:    Section: .bss





More information about the llvm-commits mailing list