Land the long talked about "type system rewrite" patch. This
[llvm/stm8.git] / test / MC / ELF / alias-reloc.s
blob67266d65206460a1f90dc2fdf8a15ca720d0b2cd
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
3 // Test that this produces a R_X86_64_PLT32 with bar.
5 .globl foo
6 foo:
7 bar = foo
8 .section zed, "", @progbits
9 call bar@PLT
12 // Test that this produres a relocation with bar2
14 .weak foo2
15 foo2:
16 .weak bar2
17 .set bar2,foo2
18 .quad bar2
20 // CHECK: # Relocation 0x00000000
21 // CHECK-NEXT: (('r_offset', 0x00000001)
22 // CHECK-NEXT: ('r_sym', 0x00000001)
23 // CHECK-NEXT: ('r_type', 0x00000004)
24 // CHECK-NEXT: ('r_addend', 0xfffffffc)
25 // CHECK-NEXT: ),
27 // CHECK: # Relocation 0x00000001
28 // CHECK-NEXT: (('r_offset', 0x00000005)
29 // CHECK-NEXT: ('r_sym', 0x00000006)
30 // CHECK-NEXT: ('r_type', 0x00000001)
31 // CHECK-NEXT: ('r_addend', 0x00000000)
32 // CHECK-NEXT: ),
34 // CHECK: # Symbol 0x00000001
35 // CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
36 // CHECK-NEXT: ('st_bind', 0x00000000)
37 // CHECK-NEXT: ('st_type', 0x00000000)
38 // CHECK-NEXT: ('st_other', 0x00000000)
39 // CHECK-NEXT: ('st_shndx', 0x00000001)
40 // CHECK-NEXT: ('st_value', 0x0000000000000000)
41 // CHECK-NEXT: ('st_size', 0x0000000000000000)
42 // CHECK-NEXT: ),
44 // CHECK: # Symbol 0x00000006
45 // CHECK-NEXT: (('st_name', 0x0000000e) # 'bar2'
46 // CHECK-NEXT: ('st_bind', 0x00000002)
47 // CHECK-NEXT: ('st_type', 0x00000000)
48 // CHECK-NEXT: ('st_other', 0x00000000)
49 // CHECK-NEXT: ('st_shndx', 0x00000004)
50 // CHECK-NEXT: ('st_value', 0x0000000000000005)
51 // CHECK-NEXT: ('st_size', 0x0000000000000000)
52 // CHECK-NEXT: ),