blob: 14828d2ec2ac0d860ba0958c0377275bd143c504 [file] [log] [blame]
Rafael Espindola75d65b92010-09-25 05:42:19 +00001// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
2
3// Test that relocations with local symbols in a mergeable section are done
4// with a reference to the symbol. Not sure if this is a linker limitation,
5// but this matches the behavior of gas.
6
7 .section .sec1,"aM",@progbits,16
8.Lfoo:
9 .text
10 movsd .Lfoo(%rip), %xmm1
11
Rafael Espindola96bfb502010-09-27 22:04:54 +000012// Symbol number 1 is .Lfoo
13
14// CHECK: # Symbol 1
15// CHECK-NEXT: (('st_name', 1) # '.Lfoo'
16
Rafael Espindola75d65b92010-09-25 05:42:19 +000017// Relocation refers to symbol 1
18
19// CHECK: ('_relocations', [
20// CHECK-NEXT: # Relocation 0
21// CHECK-NEXT: (('r_offset',
22// CHECK-NEXT: ('r_sym', 1)
23// CHECK-NEXT: ('r_type',
24// CHECK-NEXT: ('r_addend',
25// CHECK-NEXT: ),
26// CHECK-NEXT: ])