aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-scripts/phdrs2.t
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-06-06 10:03:38 +0000
committerNick Clifton <nickc@redhat.com>2002-06-06 10:03:38 +0000
commit1ed89aa92ed7b3fc5a12f8d670392e5ce67c31b4 (patch)
tree6083d580dacb1504fcaa3539065d2495f987b82b /ld/testsuite/ld-scripts/phdrs2.t
parentdf3513d4be3a102ad1d7cd73fa15f4bff5434562 (diff)
downloadgdb-1ed89aa92ed7b3fc5a12f8d670392e5ce67c31b4.zip
gdb-1ed89aa92ed7b3fc5a12f8d670392e5ce67c31b4.tar.gz
gdb-1ed89aa92ed7b3fc5a12f8d670392e5ce67c31b4.tar.bz2
Do not include empty sections in loadable segments.
Diffstat (limited to 'ld/testsuite/ld-scripts/phdrs2.t')
-rw-r--r--ld/testsuite/ld-scripts/phdrs2.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/ld/testsuite/ld-scripts/phdrs2.t b/ld/testsuite/ld-scripts/phdrs2.t
new file mode 100644
index 0000000..0d32b39
--- /dev/null
+++ b/ld/testsuite/ld-scripts/phdrs2.t
@@ -0,0 +1,23 @@
+PHDRS
+{
+ text PT_LOAD ;
+ data PT_LOAD ;
+}
+
+SECTIONS
+{
+ . = 0x800000 - 1;
+ /* The PHDRS generated should start at the aligned .text section
+ address, not the unaligned .empty section address */
+ .empty : {
+ EMPTY_START = ABSOLUTE(.) ;
+ *(.empty)
+ EMPTY_END = ABSOLUTE(.) ;
+ } : text
+ .text : { *(.text) } :text
+ .data : { *(.data)
+ LONG(EMPTY_START) ;
+ } :data
+
+ /DISCARD/ : { *(.*) }
+}