llvm-6502/test/MC/ELF/merge.s
Rafael Espindola 73ffea47d2 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
2010-09-25 05:42:19 +00:00

27 lines
773 B
ArmAsm

// 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'