aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2005-01-31 20:39:11 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2005-01-31 20:39:11 +0000
commit8c946ed5d5af555d95f39630fcb56bfc6b0ce93b (patch)
tree65cab0a41c020d51a982aef8b506199ec171ea51 /ld
parent89fac5e3c33745a93c9b90538048505d46ca365c (diff)
downloadgdb-8c946ed5d5af555d95f39630fcb56bfc6b0ce93b.zip
gdb-8c946ed5d5af555d95f39630fcb56bfc6b0ce93b.tar.gz
gdb-8c946ed5d5af555d95f39630fcb56bfc6b0ce93b.tar.bz2
* elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
(_bfd_elf_eh_frame_address_size): Declare. * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default. (elfNN_bed): Initialize elf_backend_eh_frame_address_size. * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare. (elf_backend_eh_frame_address_size): Define. * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address size from the new backend hook. (_bfd_elf_write_section_eh_frame): Likewise. (_bfd_elf_eh_frame_address_size): New function.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog8
-rw-r--r--ld/testsuite/ld-mips-elf/eh-frame1.ld1
-rw-r--r--ld/testsuite/ld-mips-elf/eh-frame1.s4
-rw-r--r--ld/testsuite/ld-mips-elf/eh-frame3.d280
-rw-r--r--ld/testsuite/ld-mips-elf/eh-frame4.d207
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp4
6 files changed, 504 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index e887580..f9ac33d 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2005-01-31 Richard Sandiford <rsandifo@redhat.com>
+
+ * ld-mips-elf/eh-frame1.s: Create a .gcc_compiled_long32 if using
+ 32-bit pointers.
+ * ld-mips-elf/eh-frame1.d: Link in .gcc_compiled_long32 sections.
+ * ld-mips-elf/eh-frame[34].d: New tests.
+ * ld-mips-elf/mips-elf.exp: Run them.
+
2005-01-28 Jan Beulich <jbeulich@novell.com>
* ld/ia64/tlsbin.[rt]d: Widen expected offset/size ranges.
diff --git a/ld/testsuite/ld-mips-elf/eh-frame1.ld b/ld/testsuite/ld-mips-elf/eh-frame1.ld
index 910a84e..93c4972 100644
--- a/ld/testsuite/ld-mips-elf/eh-frame1.ld
+++ b/ld/testsuite/ld-mips-elf/eh-frame1.ld
@@ -13,6 +13,7 @@ SECTIONS
. = 0x30000;
.eh_frame : { *(.eh_frame) }
.got : { *(.got) }
+ .gcc_compiled_long32 : { *(.gcc_compiled_long32) }
/DISCARD/ : { *(*) }
}
diff --git a/ld/testsuite/ld-mips-elf/eh-frame1.s b/ld/testsuite/ld-mips-elf/eh-frame1.s
index c8413db..94ed70d 100644
--- a/ld/testsuite/ld-mips-elf/eh-frame1.s
+++ b/ld/testsuite/ld-mips-elf/eh-frame1.s
@@ -146,3 +146,7 @@
cie_basic basic5
fde_basic basic5,.text,0x10
+
+ .if alignment == 2
+ .section .gcc_compiled_long32
+ .endif
diff --git a/ld/testsuite/ld-mips-elf/eh-frame3.d b/ld/testsuite/ld-mips-elf/eh-frame3.d
new file mode 100644
index 0000000..16a3bd4
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/eh-frame3.d
@@ -0,0 +1,280 @@
+# This test is for the official LP64 version of EABI64, which uses a
+# combination of 32-bit objects and 64-bit FDE addresses.
+#
+#name: MIPS eh-frame 3
+#source: eh-frame1.s
+#source: eh-frame1.s
+#as: -EB -mips3 -mabi=eabi --defsym alignment=3 --defsym fill=0 --defsym foo=0x1020304050607080
+#readelf: -wf
+#ld: -melf32ebmip -Teh-frame1.ld
+
+The section \.eh_frame contains:
+
+00000000 0000000c 00000000 CIE
+ Version: 1
+ Augmentation: ""
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000010 00000014 00000014 FDE cie=00000000 pc=00020000..00020010
+
+00000028 00000014 0000002c FDE cie=00000000 pc=00020010..00020030
+
+# basic2 removed
+00000040 00000014 00000044 FDE cie=00000000 pc=00020030..00020060
+
+# basic3 removed
+00000058 00000014 0000005c FDE cie=00000000 pc=00020060..000200a0
+
+# basic4 removed
+00000070 00000014 00000074 FDE cie=00000000 pc=000200a0..000200f0
+
+00000088 0000001c 00000000 CIE
+ Version: 1
+ Augmentation: "zP"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 00 10 20 30 40 50 60 70 80
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000000a8 0000001c 00000024 FDE cie=00000088 pc=000200f0..00020100
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000000c8 0000001c 00000044 FDE cie=00000088 pc=00020100..00020120
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000000e8 0000001c 00000000 CIE
+ Version: 1
+ Augmentation: "zP"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 50 00 00 00 00 00 00 00 10 20 30 40 50 60 70 80
+
+
+00000108 0000001c 00000024 FDE cie=000000e8 pc=00020120..00020130
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000128 0000001c 00000044 FDE cie=000000e8 pc=00020130..00020150
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000148 0000001c 00000000 CIE
+ Version: 1
+ Augmentation: "zPR"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 00 10 20 30 40 50 60 70 80 00
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000168 0000001c 00000024 FDE cie=00000148 pc=00020150..00020160
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+# FDE for .discard removed
+# zPR2 removed
+00000188 0000001c 00000044 FDE cie=00000148 pc=00020160..00020190
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000001a8 0000001c 00000064 FDE cie=00000148 pc=00020190..000201d0
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000001c8 0000000c 00000000 CIE
+ Version: 1
+ Augmentation: ""
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000001d8 00000014 00000014 FDE cie=000001c8 pc=000201d0..000201e0
+
+# basic1 removed, followed by repeat of above
+000001f0 00000014 0000002c FDE cie=000001c8 pc=000201e0..000201f0
+
+00000208 00000014 00000044 FDE cie=000001c8 pc=000201f0..00020210
+
+00000220 00000014 0000005c FDE cie=000001c8 pc=00020210..00020240
+
+00000238 00000014 00000074 FDE cie=000001c8 pc=00020240..00020280
+
+00000250 00000014 0000008c FDE cie=000001c8 pc=00020280..000202d0
+
+00000268 0000001c 00000000 CIE
+ Version: 1
+ Augmentation: "zP"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 00 10 20 30 40 50 60 70 80
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000288 0000001c 00000024 FDE cie=00000268 pc=000202d0..000202e0
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000002a8 0000001c 00000044 FDE cie=00000268 pc=000202e0..00020300
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000002c8 0000001c 00000000 CIE
+ Version: 1
+ Augmentation: "zP"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 50 00 00 00 00 00 00 00 10 20 30 40 50 60 70 80
+
+
+000002e8 0000001c 00000024 FDE cie=000002c8 pc=00020300..00020310
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000308 0000001c 00000044 FDE cie=000002c8 pc=00020310..00020330
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000328 0000001c 00000000 CIE
+ Version: 1
+ Augmentation: "zPR"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 00 10 20 30 40 50 60 70 80 00
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000348 0000001c 00000024 FDE cie=00000328 pc=00020330..00020340
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+# FDE for .discard removed
+# zPR2 removed
+00000368 0000001c 00000044 FDE cie=00000328 pc=00020340..00020370
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000388 0000001c 00000064 FDE cie=00000328 pc=00020370..000203b0
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000003a8 0000000c 00000000 CIE
+ Version: 1
+ Augmentation: ""
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000003b8 00000014 00000014 FDE cie=000003a8 pc=000203b0..000203c0
diff --git a/ld/testsuite/ld-mips-elf/eh-frame4.d b/ld/testsuite/ld-mips-elf/eh-frame4.d
new file mode 100644
index 0000000..0be85aa
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/eh-frame4.d
@@ -0,0 +1,207 @@
+# This test is for the semi-official ILP32 variation of EABI64.
+#
+#name: MIPS eh-frame 4
+#source: eh-frame1.s
+#source: eh-frame1.s
+#as: -EB -mips3 -mabi=eabi --defsym alignment=2 --defsym fill=0 --defsym foo=0x50607080
+#readelf: -wf
+#ld: -melf32ebmip -Teh-frame1.ld
+
+The section \.eh_frame contains:
+
+00000000 0000000c 00000000 CIE
+ Version: 1
+ Augmentation: ""
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000010 0000000c 00000014 FDE cie=00000000 pc=00020000..00020010
+
+00000020 0000000c 00000024 FDE cie=00000000 pc=00020010..00020030
+
+# basic2 removed
+00000030 0000000c 00000034 FDE cie=00000000 pc=00020030..00020060
+
+# basic3 removed
+00000040 0000000c 00000044 FDE cie=00000000 pc=00020060..000200a0
+
+# basic4 removed
+00000050 0000000c 00000054 FDE cie=00000000 pc=000200a0..000200f0
+
+00000060 00000014 00000000 CIE
+ Version: 1
+ Augmentation: "zP"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 00 50 60 70 80
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000078 00000010 0000001c FDE cie=00000060 pc=000200f0..00020100
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+0000008c 00000010 00000030 FDE cie=00000060 pc=00020100..00020120
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000000a0 00000014 00000000 CIE
+ Version: 1
+ Augmentation: "zP"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 50 00 00 00 50 60 70 80
+
+
+000000b8 00000010 0000001c FDE cie=000000a0 pc=00020120..00020130
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000000cc 00000010 00000030 FDE cie=000000a0 pc=00020130..00020150
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000000e0 00000014 00000000 CIE
+ Version: 1
+ Augmentation: "zPR"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 00 50 60 70 80 00
+
+ DW_CFA_nop
+
+000000f8 00000010 0000001c FDE cie=000000e0 pc=00020150..00020160
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+# FDE for .discard removed
+# zPR2 removed
+0000010c 00000010 00000030 FDE cie=000000e0 pc=00020160..00020190
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000120 00000010 00000044 FDE cie=000000e0 pc=00020190..000201d0
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000134 0000000c 00000000 CIE
+ Version: 1
+ Augmentation: ""
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000144 0000000c 00000014 FDE cie=00000134 pc=000201d0..000201e0
+
+# basic1 removed, followed by repeat of above
+00000154 0000000c 00000024 FDE cie=00000134 pc=000201e0..000201f0
+
+00000164 0000000c 00000034 FDE cie=00000134 pc=000201f0..00020210
+
+00000174 0000000c 00000044 FDE cie=00000134 pc=00020210..00020240
+
+00000184 0000000c 00000054 FDE cie=00000134 pc=00020240..00020280
+
+00000194 0000000c 00000064 FDE cie=00000134 pc=00020280..000202d0
+
+000001a4 00000014 00000000 CIE
+ Version: 1
+ Augmentation: "zP"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 00 50 60 70 80
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000001bc 00000010 0000001c FDE cie=000001a4 pc=000202d0..000202e0
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000001d0 00000010 00000030 FDE cie=000001a4 pc=000202e0..00020300
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+000001e4 00000014 00000000 CIE
+ Version: 1
+ Augmentation: "zP"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 50 00 00 00 50 60 70 80
+
+
+000001fc 00000010 0000001c FDE cie=000001e4 pc=00020300..00020310
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000210 00000010 00000030 FDE cie=000001e4 pc=00020310..00020330
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000224 00000014 00000000 CIE
+ Version: 1
+ Augmentation: "zPR"
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+ Augmentation data: 00 50 60 70 80 00
+
+ DW_CFA_nop
+
+0000023c 00000010 0000001c FDE cie=00000224 pc=00020330..00020340
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+# FDE for .discard removed
+# zPR2 removed
+00000250 00000010 00000030 FDE cie=00000224 pc=00020340..00020370
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000264 00000010 00000044 FDE cie=00000224 pc=00020370..000203b0
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000278 0000000c 00000000 CIE
+ Version: 1
+ Augmentation: ""
+ Code alignment factor: 1
+ Data alignment factor: 4
+ Return address column: 31
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000288 0000000c 00000014 FDE cie=00000278 pc=000203b0..000203c0
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index be70106..ed942b1 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -81,6 +81,10 @@ if {$has_newabi && $linux_gnu} {
run_dump_test "eh-frame2-n32"
run_dump_test "eh-frame2-n64"
}
+if {$embedded_elf} {
+ run_dump_test "eh-frame3"
+ run_dump_test "eh-frame4"
+}
run_dump_test "jaloverflow"
run_dump_test "jaloverflow-2"