aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobody <>2004-03-05 11:26:06 +0000
committernobody <>2004-03-05 11:26:06 +0000
commitf796a8e93e21ed242db123322e45517c262677d7 (patch)
tree8318b36eb83f4ff6f326ca8e577db96fb25c3a84
parent4c95c4bba3a6004abfb6b9260c27ade018c2b297 (diff)
downloadgdb-f796a8e93e21ed242db123322e45517c262677d7.zip
gdb-f796a8e93e21ed242db123322e45517c262677d7.tar.gz
gdb-f796a8e93e21ed242db123322e45517c262677d7.tar.bz2
This commit was manufactured by cvs2svn to create branch 'binutils-
2_15-branch'. Cherrypick from master 2004-03-05 11:26:05 UTC Nathan Sidwell <nathan@codesourcery.com> ' * elf.c (map_sections_to_segments): Ignore .tbss sections for': ld/testsuite/ld-frv/fdpic-pie-6-fail.d ld/testsuite/ld-frv/fdpic-shared-6-fail.d ld/testsuite/ld-frv/fdpic6.ldv ld/testsuite/ld-scripts/size-1.d ld/testsuite/ld-scripts/size-1.s ld/testsuite/ld-scripts/size-1.t ld/testsuite/ld-scripts/size-2.d ld/testsuite/ld-scripts/size-2.s ld/testsuite/ld-scripts/size-2.t ld/testsuite/ld-scripts/size.exp
-rw-r--r--ld/testsuite/ld-frv/fdpic-pie-6-fail.d6
-rw-r--r--ld/testsuite/ld-frv/fdpic-shared-6-fail.d6
-rw-r--r--ld/testsuite/ld-frv/fdpic6.ldv1
-rw-r--r--ld/testsuite/ld-scripts/size-1.d16
-rw-r--r--ld/testsuite/ld-scripts/size-1.s15
-rw-r--r--ld/testsuite/ld-scripts/size-1.t15
-rw-r--r--ld/testsuite/ld-scripts/size-2.d20
-rw-r--r--ld/testsuite/ld-scripts/size-2.s9
-rw-r--r--ld/testsuite/ld-scripts/size-2.t21
-rw-r--r--ld/testsuite/ld-scripts/size.exp23
10 files changed, 132 insertions, 0 deletions
diff --git a/ld/testsuite/ld-frv/fdpic-pie-6-fail.d b/ld/testsuite/ld-frv/fdpic-pie-6-fail.d
new file mode 100644
index 0000000..eaca671
--- /dev/null
+++ b/ld/testsuite/ld-frv/fdpic-pie-6-fail.d
@@ -0,0 +1,6 @@
+#name: FRV uClinux PIC relocs to undefined symbols, pie linking
+#source: fdpic6.s
+#objdump: -DR -j .text -j .data -j .got -j .plt
+#as: -mfdpic
+#ld: -pie
+#error: different segments
diff --git a/ld/testsuite/ld-frv/fdpic-shared-6-fail.d b/ld/testsuite/ld-frv/fdpic-shared-6-fail.d
new file mode 100644
index 0000000..492fe1c
--- /dev/null
+++ b/ld/testsuite/ld-frv/fdpic-shared-6-fail.d
@@ -0,0 +1,6 @@
+#name: FRV uClinux PIC relocs to undefined symbols, shared linking
+#source: fdpic6.s
+#objdump: -DR -j .text -j .data -j .got -j .plt
+#as: -mfdpic
+#ld: -shared
+#error: different segments
diff --git a/ld/testsuite/ld-frv/fdpic6.ldv b/ld/testsuite/ld-frv/fdpic6.ldv
new file mode 100644
index 0000000..5e46c03
--- /dev/null
+++ b/ld/testsuite/ld-frv/fdpic6.ldv
@@ -0,0 +1 @@
+{ global: _start; F6; D6; WF*; local: *; };
diff --git a/ld/testsuite/ld-scripts/size-1.d b/ld/testsuite/ld-scripts/size-1.d
new file mode 100644
index 0000000..667f531
--- /dev/null
+++ b/ld/testsuite/ld-scripts/size-1.d
@@ -0,0 +1,16 @@
+#source: size-1.s
+#ld: -T size-1.t
+#objdump: -s
+
+.*: file format .*
+
+Contents of section \.text:
+ 0+00 (01)?000000(01)? (02)?000000(02)? ........
+Contents of section \.data:
+ 0+08 (03)?000000(03)? (04)?000000(04)? (05)?000000(05)? ............
+Contents of section \.tdata:
+ 0+24 (06)?000000 07000000 08000000 09000000 ................
+ 0+34 (0a)?000000 ....
+Contents of section \.map:
+ 0+38 (08)?000000(08)? (0c)?000000(0c)? (10)?000000(10)? (14)?000000(14)? ................
+ 0+48 (18)?000000(18)? ....
diff --git a/ld/testsuite/ld-scripts/size-1.s b/ld/testsuite/ld-scripts/size-1.s
new file mode 100644
index 0000000..53721fa
--- /dev/null
+++ b/ld/testsuite/ld-scripts/size-1.s
@@ -0,0 +1,15 @@
+ .section .text,"ax",@progbits
+ .long 1,2
+
+ .section .data,"aw",@progbits
+ .long 3,4,5
+
+ .section .bss,"aw",@nobits
+ .long 0,0,0,0
+
+ # thread local storage sections
+ .section .tdata,"awT",@progbits
+ .long 6,7,8,9,10
+
+ .section .tbss,"awT",@nobits
+ .long 0,0,0,0,0,0
diff --git a/ld/testsuite/ld-scripts/size-1.t b/ld/testsuite/ld-scripts/size-1.t
new file mode 100644
index 0000000..8582840
--- /dev/null
+++ b/ld/testsuite/ld-scripts/size-1.t
@@ -0,0 +1,15 @@
+SECTIONS
+{
+ .text : { *(.text) }
+ .data : { *(.data) }
+ .bss : { *(.bss) }
+ .tdata : { *(.tdata) }
+ .tbss : { *(.tbss) }
+ .map : {
+ LONG (SIZEOF (.text))
+ LONG (SIZEOF (.data))
+ LONG (SIZEOF (.bss))
+ LONG (SIZEOF (.tdata))
+ LONG (SIZEOF (.tbss))
+ }
+}
diff --git a/ld/testsuite/ld-scripts/size-2.d b/ld/testsuite/ld-scripts/size-2.d
new file mode 100644
index 0000000..3cbfb44
--- /dev/null
+++ b/ld/testsuite/ld-scripts/size-2.d
@@ -0,0 +1,20 @@
+#source: size-2.s
+#ld: -T size-2.t
+#readelf: -l
+
+#...
+Program Headers:
+ Type Offset VirtAddr PhysAddr
+ FileSiz MemSiz Flags Align
+ PHDR 0x[0-9a-f]+ 0x0+0000 0x0+0000
+ 0x[0-9a-f]+ 0x[0-9a-f]+ R .
+ LOAD 0x[0-9a-f]+ 0x0+0000 0x0+0000
+ 0x0+0030 0x0+0030 R [0-9a-f]+
+ TLS 0x[0-9a-f]+ 0x0+0008 0x0+0008
+ 0x0+0014 0x0+002c R [0-9a-f]+
+
+ Section to Segment mapping:
+ Segment Sections...
+ 00 \.text \.tdata \.tbss \.map
+ 01 \.text \.tdata \.map
+ 02 \.tdata \.tbss \.map
diff --git a/ld/testsuite/ld-scripts/size-2.s b/ld/testsuite/ld-scripts/size-2.s
new file mode 100644
index 0000000..eba3224
--- /dev/null
+++ b/ld/testsuite/ld-scripts/size-2.s
@@ -0,0 +1,9 @@
+ .section .text,"ax",@progbits
+ .long 1,2
+
+ # thread local storage sections
+ .section .tdata,"awT",@progbits
+ .long 6,7,8,9,10
+
+ .section .tbss,"awT",@nobits
+ .long 0,0,0,0,0,0
diff --git a/ld/testsuite/ld-scripts/size-2.t b/ld/testsuite/ld-scripts/size-2.t
new file mode 100644
index 0000000..3549321
--- /dev/null
+++ b/ld/testsuite/ld-scripts/size-2.t
@@ -0,0 +1,21 @@
+PHDRS
+{
+ header PT_PHDR FILEHDR PHDRS ;
+
+ image PT_LOAD FLAGS (4);
+ tls PT_TLS FLAGS (4);
+
+}
+SECTIONS
+{
+ .text : { *(.text) } :image
+ .tdata : { *(.tdata) } :image :tls
+ .tbss : { *(.tbss) } :image : tls
+ .map : {
+ LONG (SIZEOF (.text))
+ LONG (SIZEOF (.data))
+ LONG (SIZEOF (.bss))
+ LONG (SIZEOF (.tdata))
+ LONG (SIZEOF (.tbss))
+ } :image
+}
diff --git a/ld/testsuite/ld-scripts/size.exp b/ld/testsuite/ld-scripts/size.exp
new file mode 100644
index 0000000..5fff2bd
--- /dev/null
+++ b/ld/testsuite/ld-scripts/size.exp
@@ -0,0 +1,23 @@
+# Expect script for SIZEOF tests
+# Copyright (C) 2004 Free Software Foundation
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+run_dump_test size-1
+
+if { [istarget "*-*-elf*"] } {
+ run_dump_test size-2
+}