llvm-6502/test/MC/ELF/merge.s
Rafael Espindola c3c413f631 Write relocations in the end of the file. This matches what gas does and
makes files easier to diff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114898 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 22:04:54 +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
// Symbol number 1 is .Lfoo
// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 1) # '.Lfoo'
// 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: ])