Skip to content

Commit

Permalink
Add a test for the offset of dynamic relocations.
Browse files Browse the repository at this point in the history
I found that a patch I am working on would have broken this and no
existing test found it.

llvm-svn: 265664
  • Loading branch information
espindola committed Apr 7, 2016
1 parent 06bbca9 commit 7231c33
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lld/test/ELF/rel-offset.s
@@ -0,0 +1,15 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
// RUN: ld.lld %t.o -o %t -shared
// RUN: llvm-readobj -r %t | FileCheck %s

.section .data.foo,"aw",@progbits
.quad foo

.section .data.zed,"aw",@progbits
.quad foo

// CHECK: Section ({{.*}}) .rela.dyn {
// CHECK-NEXT: 0x2000 R_X86_64_64 foo 0x0
// CHECK-NEXT: 0x2008 R_X86_64_64 foo 0x0
// CHECK-NEXT: }

0 comments on commit 7231c33

Please sign in to comment.