aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-mips-elf
diff options
context:
space:
mode:
authorAdam Nemet <anemet@caviumnetworks.com>2008-03-21 16:29:26 +0000
committerAdam Nemet <anemet@caviumnetworks.com>2008-03-21 16:29:26 +0000
commit08b55522eabb6e9f0e83f5f657844842adfa8999 (patch)
treed8419b1f16fd7d9f7465357f6ae7b2dc5c3dd082 /ld/testsuite/ld-mips-elf
parenta1f3c56ef7a08724229380e1b9a6c0bac46e19bf (diff)
downloadgdb-08b55522eabb6e9f0e83f5f657844842adfa8999.zip
gdb-08b55522eabb6e9f0e83f5f657844842adfa8999.tar.gz
gdb-08b55522eabb6e9f0e83f5f657844842adfa8999.tar.bz2
* ld-mips-elf/dyn-sec64.d, ld-mips-elf/dyn-sec64.s,
ld-mips-elf/dyn-sec64.ld: New test. * ld-mips-elf/mips-elf.exp: Run it.
Diffstat (limited to 'ld/testsuite/ld-mips-elf')
-rw-r--r--ld/testsuite/ld-mips-elf/dyn-sec64.d30
-rw-r--r--ld/testsuite/ld-mips-elf/dyn-sec64.ld23
-rw-r--r--ld/testsuite/ld-mips-elf/dyn-sec64.s19
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp1
4 files changed, 73 insertions, 0 deletions
diff --git a/ld/testsuite/ld-mips-elf/dyn-sec64.d b/ld/testsuite/ld-mips-elf/dyn-sec64.d
new file mode 100644
index 0000000..9564c11
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/dyn-sec64.d
@@ -0,0 +1,30 @@
+#name: objdump -p print 64-bit values
+#source: dyn-sec64.s
+#as: -mips3 -EB -64
+#ld: -Tdyn-sec64.ld -shared -melf64btsmip
+#objdump: -p
+
+.*: .* file format .*
+
+Program Header:
+.* LOAD .*
+.*
+.* LOAD .*
+.*
+.* DYNAMIC .*
+.*
+.* NULL .*
+.*
+
+Dynamic Section:
+
+ INIT .* 0x0001234000003000
+ FINI .* 0x0001234000004000
+ HASH .* 0x0001234000001000
+ STRTAB .*
+ SYMTAB .*
+ STRSZ .*
+ SYMENT .*
+ PLTGOT .* 0x0001235000000000
+ REL .* 0x0001234000002000
+#pass
diff --git a/ld/testsuite/ld-mips-elf/dyn-sec64.ld b/ld/testsuite/ld-mips-elf/dyn-sec64.ld
new file mode 100644
index 0000000..bb75d73
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/dyn-sec64.ld
@@ -0,0 +1,23 @@
+SECTIONS
+{
+ . = 0x1234000000000;
+ .dynamic : { *(.dynamic) }
+ . = 0x1234000001000;
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+ . = 0x1234000002000;
+ .rel.dyn : { *(.rel.dyn) }
+
+ . = 0x1234000003000;
+ .init : { *(.init) }
+ . = 0x1234000004000;
+ .fini : { *(.fini) }
+ .text : { *(.text) }
+ .MIPS.stubs : { *(.MIPS.stubs) }
+
+ . = 0x1235000000000;
+ _gp = ALIGN (16) + 0x7ff0;
+ .got : { *(.got) }
+ .data : { *(.data) }
+}
diff --git a/ld/testsuite/ld-mips-elf/dyn-sec64.s b/ld/testsuite/ld-mips-elf/dyn-sec64.s
new file mode 100644
index 0000000..7d634ee
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/dyn-sec64.s
@@ -0,0 +1,19 @@
+ .section .init,"ax",@progbits
+ .globl _init
+ .ent _init
+ .type _init, @function
+_init:
+ ld $2,%call16(bar)
+ .end _init
+
+ .section .fini,"ax",@progbits
+ .globl _fini
+ .ent _fini
+ .type _fini, @function
+_fini:
+ .end _fini
+
+ .data
+foo:
+ .dword bar
+
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 96e42a9..86462f4 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -154,6 +154,7 @@ if { $linux_gnu } {
run_dump_test "got-page-1"
if $has_newabi {
run_dump_test "got-page-2"
+ run_dump_test "dyn-sec64"
}
run_dump_test "got-page-3"
run_dump_test "got-dump-1"