diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-09-25 05:42:19 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-09-25 05:42:19 +0000 |
commit | 73ffea47d20bc9f559b4ce0c60166ee504073832 (patch) | |
tree | e87577519219fb1ad03bd11f9a15521e65cc5777 /test/MC/ELF/merge.s | |
parent | b0ba0f4170dcfe1dbce17680c16cffce311e3ad8 (diff) | |
download | external_llvm-73ffea47d20bc9f559b4ce0c60166ee504073832.zip external_llvm-73ffea47d20bc9f559b4ce0c60166ee504073832.tar.gz external_llvm-73ffea47d20bc9f559b4ce0c60166ee504073832.tar.bz2 |
Move ELF to HasReliableSymbolDifference=true. Also take the opportunity to put
symbols defined in merge sections in independent atoms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ELF/merge.s')
-rw-r--r-- | test/MC/ELF/merge.s | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/MC/ELF/merge.s b/test/MC/ELF/merge.s new file mode 100644 index 0000000..82e1d88 --- /dev/null +++ b/test/MC/ELF/merge.s @@ -0,0 +1,26 @@ +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s + +// Test that relocations with local symbols in a mergeable section are done +// with a reference to the symbol. Not sure if this is a linker limitation, +// but this matches the behavior of gas. + + .section .sec1,"aM",@progbits,16 +.Lfoo: + .text + movsd .Lfoo(%rip), %xmm1 + +// Relocation refers to symbol 1 + +// CHECK: ('_relocations', [ +// CHECK-NEXT: # Relocation 0 +// CHECK-NEXT: (('r_offset', +// CHECK-NEXT: ('r_sym', 1) +// CHECK-NEXT: ('r_type', +// CHECK-NEXT: ('r_addend', +// CHECK-NEXT: ), +// CHECK-NEXT: ]) + +// Symbol number 1 is .Lfoo + +// CHECK: # Symbol 1 +// CHECK-NEXT: (('st_name', 1) # '.Lfoo' |