aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-discard
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-discard')
-rw-r--r--ld/testsuite/ld-discard/zero-rel.d8
-rw-r--r--ld/testsuite/ld-discard/zero-rel.s11
2 files changed, 19 insertions, 0 deletions
diff --git a/ld/testsuite/ld-discard/zero-rel.d b/ld/testsuite/ld-discard/zero-rel.d
new file mode 100644
index 0000000..1f73775
--- /dev/null
+++ b/ld/testsuite/ld-discard/zero-rel.d
@@ -0,0 +1,8 @@
+#source: zero-rel.s
+#ld: -T discard.ld
+#objdump: -s -j .debug_info
+
+.*: file format .*elf.*
+
+Contents of section .debug_info:
+ 0000 0+( 0+)? +(\.+) .*
diff --git a/ld/testsuite/ld-discard/zero-rel.s b/ld/testsuite/ld-discard/zero-rel.s
new file mode 100644
index 0000000..f3f0b3c
--- /dev/null
+++ b/ld/testsuite/ld-discard/zero-rel.s
@@ -0,0 +1,11 @@
+ .text
+ .globl _start
+_start:
+
+ .section .debug_info
+ .long .Ltext
+ .long .Ltext + 2
+
+ .section .text.exit,"ax"
+.Ltext:
+ .long 0