aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/ELF
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2013-09-21 05:25:12 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2013-09-21 05:25:12 +0000
commit60c81c939755601931bea8dbde174ff52cd904dd (patch)
treef5db513a0c21a3f6786d4fb092c90e331bf6e309 /test/MC/ELF
parent7cdc37064116f8688bb695fc9f30f128c25dcd84 (diff)
downloadexternal_llvm-60c81c939755601931bea8dbde174ff52cd904dd.zip
external_llvm-60c81c939755601931bea8dbde174ff52cd904dd.tar.gz
external_llvm-60c81c939755601931bea8dbde174ff52cd904dd.tar.bz2
ELF: Parse types in directives like binutils gas
Allow binutils .type and .section directives to take the following forms: - @<type> - %<type> - "<type>" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ELF')
-rw-r--r--test/MC/ELF/section.s2
-rw-r--r--test/MC/ELF/type.s28
2 files changed, 29 insertions, 1 deletions
diff --git a/test/MC/ELF/section.s b/test/MC/ELF/section.s
index b3246e0..7dc23c2 100644
--- a/test/MC/ELF/section.s
+++ b/test/MC/ELF/section.s
@@ -5,7 +5,7 @@
.section .note.GNU-stack,"",@progbits
.section .note.GNU-stack2,"",%progbits
.section .note.GNU-,"",@progbits
-.section -.note.GNU,"",@progbits
+.section -.note.GNU,"","progbits"
// CHECK: Name: .note.GNU-stack (56)
// CHECK: Name: .note.GNU-stack2 (153)
diff --git a/test/MC/ELF/type.s b/test/MC/ELF/type.s
index a5b9812..c2f3631 100644
--- a/test/MC/ELF/type.s
+++ b/test/MC/ELF/type.s
@@ -31,6 +31,16 @@ tls:
.type tls,@tls_object
.type tls,@gnu_indirect_function
+// Test that "<type>" is accepted.
+tls_quoted:
+ .global tls_quoted
+ .type tls_quoted,"tls_object"
+
+// Test that "<type>" is accepted.
+tls_upper_case:
+ .global tls_upper_case
+ .type tls_upper_case,STT_TLS
+
// CHECK: Symbol {
// CHECK: Name: bar
// CHECK-NEXT: Value: 0x0
@@ -85,3 +95,21 @@ tls:
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .text (0x1)
// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: tls_quoted
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: tls_upper_case
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }