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 12 // Test that this produres a relocation with bar2 13 14 .weak foo2 15 foo2: 16 .weak bar2 17 .set bar2,foo2 18 .quad bar2 19 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: ), 26 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: ), 33 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: ), 43 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: ), 53