aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-07-16 21:00:09 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-07-16 21:00:09 +0000
commit36f8f14aad6416e1f702cf73ab41bfb456979d9b (patch)
tree53b6bb969a99bc5cce4ab305803bb20515a1a46e /binutils
parent099cb4fb6ed86f09a068c7c2e42cc4d35a5103e7 (diff)
downloadgdb-36f8f14aad6416e1f702cf73ab41bfb456979d9b.zip
gdb-36f8f14aad6416e1f702cf73ab41bfb456979d9b.tar.gz
gdb-36f8f14aad6416e1f702cf73ab41bfb456979d9b.tar.bz2
2009-07-16 H.J. Lu <hongjiu.lu@intel.com>
* binutils-all/objcopy.exp; Run testranges-ia64. * binutils-all/testranges.d: Don't run for ia64. * binutils-all/testranges-ia64.d: New. * binutils-all/testranges-ia64.s: Likewise.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/testsuite/ChangeLog9
-rw-r--r--binutils/testsuite/binutils-all/objcopy.exp1
-rw-r--r--binutils/testsuite/binutils-all/testranges-ia64.d15
-rw-r--r--binutils/testsuite/binutils-all/testranges-ia64.s57
-rw-r--r--binutils/testsuite/binutils-all/testranges.d1
5 files changed, 83 insertions, 0 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index cf8d81f..103255d 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2009-07-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * binutils-all/objcopy.exp; Run testranges-ia64.
+
+ * binutils-all/testranges.d: Don't run for ia64.
+
+ * binutils-all/testranges-ia64.d: New.
+ * binutils-all/testranges-ia64.s: Likewise.
+
2009-07-14 Jan Kratochvil <jan.kratochvil@redhat.com>
* binutils-all/objcopy.exp (testranges): New test.
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index aa1da72..68f0909 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -875,3 +875,4 @@ if [is_elf_format] {
}
run_dump_test "localize-hidden-2"
run_dump_test "testranges"
+run_dump_test "testranges-ia64"
diff --git a/binutils/testsuite/binutils-all/testranges-ia64.d b/binutils/testsuite/binutils-all/testranges-ia64.d
new file mode 100644
index 0000000..9713236
--- /dev/null
+++ b/binutils/testsuite/binutils-all/testranges-ia64.d
@@ -0,0 +1,15 @@
+#PROG: objcopy
+#source: testranges-ia64.s
+#readelf: -wR --wide
+#name: unordered .debug_info references to .debug_ranges
+#target: ia64-*-*
+
+Contents of the .debug_ranges section:
+
+ Offset Begin End
+ 00000000 00000001 00000002
+ 00000000 <End of list>
+ 00000010 00000000 00000002
+ 00000010 <End of list>
+
+#pass
diff --git a/binutils/testsuite/binutils-all/testranges-ia64.s b/binutils/testsuite/binutils-all/testranges-ia64.s
new file mode 100644
index 0000000..9af6b63
--- /dev/null
+++ b/binutils/testsuite/binutils-all/testranges-ia64.s
@@ -0,0 +1,57 @@
+# Test .debug_info can reference .debug_ranges entries without ordering the
+# offsets strictly as increasing.
+
+ .text
+start:
+ .byte 1
+sub:
+ .byte 2
+end:
+
+ .section .debug_ranges,"",@progbits
+range:
+
+range_sub:
+ data4.ua @secrel(sub), @secrel(end)
+ data4.ua 0, 0 /* range terminator */
+
+range_cu:
+ data4.ua @secrel(start), @secrel(end)
+ data4.ua 0, 0 /* range terminator */
+
+ .section .debug_info,"",@progbits
+ data4.ua debugE - debugS /* Length of Compilation Unit Info */
+debugS:
+ .short 0x2 /* DWARF version number */
+ data4.ua @secrel(abbrev0) /* Offset Into Abbrev. Section */
+ .byte 0x4 /* Pointer Size (in bytes) */
+
+ .uleb128 0x1 /* (DIE (0xb) DW_TAG_compile_unit) */
+ data4.ua range_cu - range /* DW_AT_ranges */
+
+ .uleb128 0x2 /* (DIE (0x6d) DW_TAG_subprogram) */
+ .ascii "A\0" /* DW_AT_name */
+ data4.ua range_sub - range /* DW_AT_ranges */
+debugE:
+
+ .section .debug_abbrev,"",@progbits
+abbrev0:
+ .uleb128 0x1 /* (abbrev code) */
+ .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0x55 /* (DW_AT_ranges) */
+ .uleb128 0x6 /* (DW_FORM_data4) */
+ .byte 0x0
+ .byte 0x0
+
+ .uleb128 0x2 /* (abbrev code) */
+ .uleb128 0x2e /* (TAG: DW_TAG_subprogram) */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x55 /* (DW_AT_ranges) */
+ .uleb128 0x6 /* (DW_FORM_data4) */
+ .byte 0x0
+ .byte 0x0
+
+ .byte 0x0 /* abbrevs terminator */
diff --git a/binutils/testsuite/binutils-all/testranges.d b/binutils/testsuite/binutils-all/testranges.d
index 5aa7912..c074a35 100644
--- a/binutils/testsuite/binutils-all/testranges.d
+++ b/binutils/testsuite/binutils-all/testranges.d
@@ -2,6 +2,7 @@
#source: testranges.s
#readelf: -wR --wide
#name: unordered .debug_info references to .debug_ranges
+#not-target: ia64-*-*
Contents of the .debug_ranges section: