2010-10-21 20:00:20 +02:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
|
|
|
|
|
2010-11-15 00:53:26 +01:00
|
|
|
// Test that this produces a R_X86_64_PLT32 with bar.
|
|
|
|
|
2010-10-21 20:00:20 +02:00
|
|
|
.globl foo
|
|
|
|
foo:
|
|
|
|
bar = foo
|
2010-11-15 00:53:26 +01:00
|
|
|
.section zed, "", @progbits
|
2010-10-21 20:00:20 +02:00
|
|
|
call bar@PLT
|
|
|
|
|
2010-11-15 17:33:49 +01:00
|
|
|
|
|
|
|
// Test that this produres a relocation with bar2
|
|
|
|
|
|
|
|
.weak foo2
|
|
|
|
foo2:
|
|
|
|
.weak bar2
|
|
|
|
.set bar2,foo2
|
|
|
|
.quad bar2
|
|
|
|
|
2011-08-04 16:01:03 +02:00
|
|
|
// CHECK: # Relocation 0
|
2011-08-04 19:00:11 +02:00
|
|
|
// CHECK-NEXT: (('r_offset', 0x0000000000000001)
|
2011-03-20 19:44:20 +01:00
|
|
|
// CHECK-NEXT: ('r_sym', 0x00000001)
|
|
|
|
// CHECK-NEXT: ('r_type', 0x00000004)
|
2011-08-04 15:00:24 +02:00
|
|
|
// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc)
|
2011-03-20 19:44:20 +01:00
|
|
|
// CHECK-NEXT: ),
|
|
|
|
|
2011-08-04 16:01:03 +02:00
|
|
|
// CHECK: # Relocation 1
|
2011-08-04 19:00:11 +02:00
|
|
|
// CHECK-NEXT: (('r_offset', 0x0000000000000005)
|
2011-03-20 19:44:20 +01:00
|
|
|
// CHECK-NEXT: ('r_sym', 0x00000006)
|
|
|
|
// CHECK-NEXT: ('r_type', 0x00000001)
|
2011-08-04 15:00:24 +02:00
|
|
|
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
|
2011-03-20 19:44:20 +01:00
|
|
|
// CHECK-NEXT: ),
|
|
|
|
|
2011-08-04 16:27:46 +02:00
|
|
|
// CHECK: # Symbol 1
|
2010-11-15 00:53:26 +01:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
|
2011-08-04 17:10:35 +02:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x0)
|
2011-08-04 17:24:00 +02:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 17:38:19 +02:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 17:50:13 +02:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 21:49:43 +01:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000000)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-15 00:53:26 +01:00
|
|
|
// CHECK-NEXT: ),
|
|
|
|
|
2011-08-04 16:27:46 +02:00
|
|
|
// CHECK: # Symbol 6
|
2010-11-15 17:33:49 +01:00
|
|
|
// CHECK-NEXT: (('st_name', 0x0000000e) # 'bar2'
|
2011-08-04 17:10:35 +02:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x2)
|
2011-08-04 17:24:00 +02:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 17:38:19 +02:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 17:50:13 +02:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0004)
|
2010-12-20 21:49:43 +01:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000005)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-15 17:33:49 +01:00
|
|
|
// CHECK-NEXT: ),
|