summaryrefslogtreecommitdiff
path: root/test/MC
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2013-04-10 16:52:15 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2013-04-10 16:52:15 +0000
commit01a7b5c43e113513a3165a60e85372f89f7eaaff (patch)
tree16d4752356bf08dcbd7c6621059be725ae153192 /test/MC
parentb08c6df6787971502bd51e30b0f1038c1ea0dc2c (diff)
downloadllvm-01a7b5c43e113513a3165a60e85372f89f7eaaff.tar.gz
llvm-01a7b5c43e113513a3165a60e85372f89f7eaaff.tar.bz2
llvm-01a7b5c43e113513a3165a60e85372f89f7eaaff.tar.xz
Use a scheme closer to that of GNU as when deciding the type of a
symbol with multiple .type declarations. Differential Revision: http://llvm-reviews.chandlerc.com/D607 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179184 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/ELF/type.s53
1 files changed, 44 insertions, 9 deletions
diff --git a/test/MC/ELF/type.s b/test/MC/ELF/type.s
index ec53e4ffa5..00277ce9c4 100644
--- a/test/MC/ELF/type.s
+++ b/test/MC/ELF/type.s
@@ -12,35 +12,70 @@ bar:
// Test that gnu_unique_object is accepted.
.type zed,@gnu_unique_object
+obj:
+ .global obj
+ .type obj,@object
+ .type obj,@notype
+
+func:
+ .global func
+ .type func,@function
+ .type func,@object
+
ifunc:
.global ifunc
.type ifunc,@gnu_indirect_function
+ .type ifunc,@function
+
+tls:
+ .global tls
+ .type tls,@tls_object
+ .type tls,@gnu_indirect_function
-// CHECK: # Symbol 4
-// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
+// CHECK: (('st_name', {{.*}}) # 'bar'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x1)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 5
-// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
+
+// CHECK: (('st_name', {{.*}}) # 'foo'
+// CHECK-NEXT: ('st_bind', 0x1)
+// CHECK-NEXT: ('st_type', 0x2)
+// CHECK-NEXT: ('st_other', 0x00)
+// CHECK-NEXT: ('st_shndx', 0x0001)
+// CHECK-NEXT: ('st_value', 0x0000000000000000)
+// CHECK-NEXT: ('st_size', 0x0000000000000000)
+
+// CHECK: (('st_name', {{.*}}) # 'func'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x2)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 6
-// CHECK-NEXT: (('st_name', 0x00000009) # 'ifunc'
+
+// CHECK: (('st_name', {{.*}}) # 'ifunc'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0xa)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: (('st_name', {{.*}}) # 'obj'
+// CHECK-NEXT: ('st_bind', 0x1)
+// CHECK-NEXT: ('st_type', 0x1)
+// CHECK-NEXT: ('st_other', 0x00)
+// CHECK-NEXT: ('st_shndx', 0x0001)
+// CHECK-NEXT: ('st_value', 0x0000000000000000)
+// CHECK-NEXT: ('st_size', 0x0000000000000000)
+
+// CHECK: (('st_name', {{.*}}) # 'tls'
+// CHECK-NEXT: ('st_bind', 0x1)
+// CHECK-NEXT: ('st_type', 0x6)
+// CHECK-NEXT: ('st_other', 0x00)
+// CHECK-NEXT: ('st_shndx', 0x0001)
+// CHECK-NEXT: ('st_value', 0x0000000000000000)
+// CHECK-NEXT: ('st_size', 0x0000000000000000)