aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2023-06-02 11:54:21 -0700
committerH.J. Lu <hjl.tools@gmail.com>2023-06-05 08:21:21 -0700
commit3f60b98298fd77dec3a9182797c9dd6d7796bcaf (patch)
tree2f728ec231ede67c9fd4bd4d6e7acece00f64868 /ld/testsuite
parentbaab375361c365afee2577c94cbbd3fdd443d6da (diff)
downloadgdb-3f60b98298fd77dec3a9182797c9dd6d7796bcaf.zip
gdb-3f60b98298fd77dec3a9182797c9dd6d7796bcaf.tar.gz
gdb-3f60b98298fd77dec3a9182797c9dd6d7796bcaf.tar.bz2
ELF: Don't warn an empty PT_LOAD with the program headers
When rewriting the program headers, don't warn an empty PT_LOAD with the program headers. bfd/ PR binutils/30508 * elf.c (rewrite_elf_program_header): Don't warn if an empty PT_LOAD contains the program headers. ld/ PR binutils/30508 * testsuite/ld-elf/pr30508.d: New file. * testsuite/ld-elf/pr30508.s: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ld-elf/pr30508.d13
-rw-r--r--ld/testsuite/ld-elf/pr30508.s14
2 files changed, 27 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/pr30508.d b/ld/testsuite/ld-elf/pr30508.d
new file mode 100644
index 0000000..35f6615
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr30508.d
@@ -0,0 +1,13 @@
+#ld: -z separate-code
+#objcopy_linked_file: -R .foo
+#readelf: -lW
+#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
+#xfail: h8300-*-* mips*-*-* rx-*-linux*
+
+#...
+ Section to Segment mapping:
+ Segment Sections...
+#...
+ 0.
+#...
+ 0. .text
diff --git a/ld/testsuite/ld-elf/pr30508.s b/ld/testsuite/ld-elf/pr30508.s
new file mode 100644
index 0000000..5a2778c
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr30508.s
@@ -0,0 +1,14 @@
+ .text
+ .global start /* Used by SH targets. */
+start:
+ .global _start
+_start:
+ .global __start
+__start:
+ .global main /* Used by HPPA targets. */
+main:
+ .globl _main /* Used by LynxOS targets. */
+_main:
+ .dc.a 0
+ .section .foo,"ax",%progbits
+ .dc.a 0