aboutsummaryrefslogtreecommitdiff
path: root/test/MC/ELF
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-11-02 17:22:24 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-11-02 17:22:24 +0000
commit3ff57094a7d176a759ddb1e1668489d89064f56c (patch)
tree27726bf327a50d838d365cc73ff14d45192d0661 /test/MC/ELF
parent8bc9ef77b7e9910fbeb40725dfa49d793158db51 (diff)
Add support for expressions in .sleb/.uleb directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ELF')
-rw-r--r--test/MC/ELF/leb128.s19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/MC/ELF/leb128.s b/test/MC/ELF/leb128.s
new file mode 100644
index 0000000000..e5f31f4834
--- /dev/null
+++ b/test/MC/ELF/leb128.s
@@ -0,0 +1,19 @@
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+
+ .sleb128 .Lfoo - .Lbar
+.Lfoo:
+ .uleb128 .Lbar - .Lfoo
+ .fill 126, 1, 0x90
+.Lbar:
+
+// CHECK: (('sh_name', 0x00000001) # '.text'
+// CHECK-NEXT: ('sh_type', 0x00000001)
+// CHECK-NEXT: ('sh_flags', 0x00000006)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
+// CHECK-NEXT: ('sh_offset', 0x00000040)
+// CHECK-NEXT: ('sh_size', 0x00000081)
+// CHECK-NEXT: ('sh_link', 0x00000000)
+// CHECK-NEXT: ('sh_info', 0x00000000)
+// CHECK-NEXT: ('sh_addralign', 0x00000004)
+// CHECK-NEXT: ('sh_entsize', 0x00000000)
+// CHECK-NEXT: ('_section_data', '817f7f90 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90')