diff options
| author | Joerg Sonnenberger <joerg@bec.de> | 2013-09-13 18:32:34 +0000 |
|---|---|---|
| committer | Joerg Sonnenberger <joerg@bec.de> | 2013-09-13 18:32:34 +0000 |
| commit | 3c6b0561860f46d4de5416dbaae096c95da9753f (patch) | |
| tree | caaf3e2ec890fcdde9a48b3277caa1a3f73aad0c | |
| parent | cf71c6320b2ccac219a5ccf770ad63066bbd7028 (diff) | |
| download | bcm5719-llvm-3c6b0561860f46d4de5416dbaae096c95da9753f.tar.gz bcm5719-llvm-3c6b0561860f46d4de5416dbaae096c95da9753f.zip | |
Add test case for the not-yet implemented copy relocations.
llvm-svn: 190714
| -rw-r--r-- | lld/test/missing/undef-from-main-dso.test | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lld/test/missing/undef-from-main-dso.test b/lld/test/missing/undef-from-main-dso.test new file mode 100644 index 00000000000..5683739b7d9 --- /dev/null +++ b/lld/test/missing/undef-from-main-dso.test @@ -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 |

