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 6foo: 7bar = foo 8 .section zed, "", @progbits 9 call bar@PLT 10 11 12// Test that this produres a relocation with bar2 13 14 .weak foo2 15foo2: 16 .weak bar2 17 .set bar2,foo2 18 .quad bar2 19 20// CHECK: # Relocation 0 21// CHECK-NEXT: (('r_offset', 0x0000000000000001) 22// CHECK-NEXT: ('r_sym', 0x00000001) 23// CHECK-NEXT: ('r_type', 0x00000004) 24// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc) 25// CHECK-NEXT: ), 26 27// CHECK: # Relocation 1 28// CHECK-NEXT: (('r_offset', 0x0000000000000005) 29// CHECK-NEXT: ('r_sym', 0x00000006) 30// CHECK-NEXT: ('r_type', 0x00000001) 31// CHECK-NEXT: ('r_addend', 0x0000000000000000) 32// CHECK-NEXT: ), 33 34// CHECK: # Symbol 1 35// CHECK-NEXT: (('st_name', 0x00000005) # 'bar' 36// CHECK-NEXT: ('st_bind', 0x0) 37// CHECK-NEXT: ('st_type', 0x0) 38// CHECK-NEXT: ('st_other', 0x00) 39// CHECK-NEXT: ('st_shndx', 0x0001) 40// CHECK-NEXT: ('st_value', 0x0000000000000000) 41// CHECK-NEXT: ('st_size', 0x0000000000000000) 42// CHECK-NEXT: ), 43 44// CHECK: # Symbol 6 45// CHECK-NEXT: (('st_name', 0x0000000e) # 'bar2' 46// CHECK-NEXT: ('st_bind', 0x2) 47// CHECK-NEXT: ('st_type', 0x0) 48// CHECK-NEXT: ('st_other', 0x00) 49// CHECK-NEXT: ('st_shndx', 0x0004) 50// CHECK-NEXT: ('st_value', 0x0000000000000005) 51// CHECK-NEXT: ('st_size', 0x0000000000000000) 52// CHECK-NEXT: ), 53