Move the logic to decide with which symbol we produce a relocation (if any) to
[oota-llvm.git] / test / MC / ELF / alias-reloc.s
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump  | FileCheck %s
2
3 // Test that this produces a R_X86_64_PLT32 with bar.
4
5         .globl foo
6 foo:
7 bar = foo
8         .section zed, "", @progbits
9         call bar@PLT
10
11 // CHECK:       # Symbol 0x00000001
12 // CHECK-NEXT:  (('st_name', 0x00000005) # 'bar'
13 // CHECK-NEXT:   ('st_bind', 0x00000000)
14 // CHECK-NEXT:   ('st_type', 0x00000000)
15 // CHECK-NEXT:   ('st_other', 0x00000000)
16 // CHECK-NEXT:   ('st_shndx', 0x00000001)
17 // CHECK-NEXT:   ('st_value', 0x00000000)
18 // CHECK-NEXT:   ('st_size', 0x00000000)
19 // CHECK-NEXT:  ),
20
21 // CHECK:       # Relocation 0x00000000
22 // CHECK-NEXT:  (('r_offset', 0x00000001)
23 // CHECK-NEXT:   ('r_sym', 0x00000001)
24 // CHECK-NEXT:   ('r_type', 0x00000004)
25 // CHECK-NEXT:   ('r_addend', 0xfffffffc)
26 // CHECK-NEXT:  ),