2010-11-01 14:28:48 +00:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
|
|
|
|
|
|
|
|
// This is a long test that checks that the aliases created by weakref are
|
|
|
|
// never in the symbol table and that the only case it causes a symbol to
|
|
|
|
// be output as a weak undefined symbol is if that variable is not defined
|
|
|
|
// in this file and all the references to it are done via the alias.
|
|
|
|
|
|
|
|
.weakref foo1, bar1
|
|
|
|
|
|
|
|
.weakref foo2, bar2
|
|
|
|
.long bar2
|
|
|
|
|
|
|
|
.weakref foo3, bar3
|
|
|
|
.long foo3
|
|
|
|
|
|
|
|
.weakref foo4, bar4
|
|
|
|
.long foo4
|
|
|
|
.long bar4
|
|
|
|
|
|
|
|
.weakref foo5, bar5
|
|
|
|
.long bar5
|
|
|
|
.long foo5
|
|
|
|
|
|
|
|
bar6:
|
|
|
|
.weakref foo6, bar6
|
|
|
|
|
|
|
|
bar7:
|
|
|
|
.weakref foo7, bar7
|
|
|
|
.long bar7
|
|
|
|
|
|
|
|
bar8:
|
|
|
|
.weakref foo8, bar8
|
|
|
|
.long foo8
|
|
|
|
|
|
|
|
bar9:
|
|
|
|
.weakref foo9, bar9
|
|
|
|
.long foo9
|
|
|
|
.long bar9
|
|
|
|
|
|
|
|
bar10:
|
|
|
|
.global bar10
|
|
|
|
.weakref foo10, bar10
|
|
|
|
.long bar10
|
|
|
|
.long foo10
|
|
|
|
|
|
|
|
bar11:
|
|
|
|
.global bar11
|
|
|
|
.weakref foo11, bar11
|
|
|
|
|
|
|
|
bar12:
|
|
|
|
.global bar12
|
|
|
|
.weakref foo12, bar12
|
|
|
|
.long bar12
|
|
|
|
|
|
|
|
bar13:
|
|
|
|
.global bar13
|
|
|
|
.weakref foo13, bar13
|
|
|
|
.long foo13
|
|
|
|
|
|
|
|
bar14:
|
|
|
|
.global bar14
|
|
|
|
.weakref foo14, bar14
|
|
|
|
.long foo14
|
|
|
|
.long bar14
|
|
|
|
|
|
|
|
bar15:
|
|
|
|
.global bar15
|
|
|
|
.weakref foo15, bar15
|
|
|
|
.long bar15
|
|
|
|
.long foo15
|
|
|
|
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK: # Symbol 0
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000000) # ''
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x0)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0000)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000000)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 1
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000015) # 'bar6'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x0)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000018)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 2
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x0000001a) # 'bar7'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x0)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000018)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 3
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x0000001f) # 'bar8'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x0)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x000000000000001c)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 4
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000024) # 'bar9'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x0)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000020)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 5
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000000) # ''
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x0)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x3)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000000)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 6
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000000) # ''
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x0)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x3)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0003)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000000)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 7
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000000) # ''
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x0)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x3)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0004)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000000)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 8
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000029) # 'bar10'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x1)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000028)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 9
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x0000002f) # 'bar11'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x1)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000030)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 10
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000035) # 'bar12'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x1)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000030)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 11
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x0000003b) # 'bar13'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x1)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000034)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 12
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000041) # 'bar14'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x1)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000038)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 13
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000047) # 'bar15'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x1)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0001)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000040)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 14
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000001) # 'bar2'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x1)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0000)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000000)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 15
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000006) # 'bar3'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x2)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0000)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000000)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 16
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x0000000b) # 'bar4'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x1)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0000)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000000)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
2011-08-04 14:27:46 +00:00
|
|
|
// CHECK-NEXT: # Symbol 17
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: (('st_name', 0x00000010) # 'bar5'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK-NEXT: ('st_bind', 0x1)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|
2011-08-04 15:38:19 +00:00
|
|
|
// CHECK-NEXT: ('st_other', 0x00)
|
2011-08-04 15:50:13 +00:00
|
|
|
// CHECK-NEXT: ('st_shndx', 0x0000)
|
2010-12-20 20:49:43 +00:00
|
|
|
// CHECK-NEXT: ('st_value', 0x0000000000000000)
|
|
|
|
// CHECK-NEXT: ('st_size', 0x0000000000000000)
|
2010-11-01 14:28:48 +00:00
|
|
|
// CHECK-NEXT: ),
|
|
|
|
// CHECK-NEXT: ])
|