aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2005-03-05 00:01:44 +0000
committerThiemo Seufer <ths@networkno.de>2005-03-05 00:01:44 +0000
commitbbe506e8ba9444fb4a00ba66762a2c498443e1b6 (patch)
tree4989bcc748cfc73d2cfb45f9321ee5247cde59ec /ld
parent92862f42b561a218a220939cd8a1bef7c9756d06 (diff)
downloadgdb-bbe506e8ba9444fb4a00ba66762a2c498443e1b6.zip
gdb-bbe506e8ba9444fb4a00ba66762a2c498443e1b6.tar.gz
gdb-bbe506e8ba9444fb4a00ba66762a2c498443e1b6.tar.bz2
bfd/ChangeLog
* elfxx-mips.c (mips_elf_calculate_relocation): Handle special '__gnu_local_gp' symbol used by gas -mno-shared. gas/ChangeLog * config/tc-mips.c (macro_build_lui): Use '__gnu_local_gp' instead of '_gp' for -mno-shared optimization. (s_cpload): Ditto. (s_abicalls): Document it in the comment. (md_show_usage): Document the -mno-shared option. gas/testsuite/ChangeLog * gas/mips/elf-rel23b.d: Use '__gnu_local_gp' instead of '_gp' for -mno-shared optimization. * gas/mips/elf-rel25a.d: Ditto. ld/testsuite/ChangeLog * ld-mips-elf/multi-got-no-shared-1.s, ld-mips-elf/multi-got-no-shared-2.s, ld-mips-elf/multi-got-no-shared.d: New tests. * ld-mips-elf/mips-elf.exp: Run them.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp1
-rw-r--r--ld/testsuite/ld-mips-elf/multi-got-no-shared-1.s29
-rw-r--r--ld/testsuite/ld-mips-elf/multi-got-no-shared-2.s27
-rw-r--r--ld/testsuite/ld-mips-elf/multi-got-no-shared.d18
5 files changed, 82 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index e49ff3e..92530c8 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-04 David Daney <ddaney@avtrex.com>
+
+ * ld-mips-elf/multi-got-no-shared-1.s,
+ ld-mips-elf/multi-got-no-shared-2.s,
+ ld-mips-elf/multi-got-no-shared.d: New tests.
+ * ld-mips-elf/mips-elf.exp: Run them.
+
2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
* ld-mips-elf/tlsbin-o32.s, ld-mips-elf/mips-dyn.ld,
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 6cc7d9a..5413a72 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -35,6 +35,7 @@ run_dump_test "branch-misc-1"
# the "traditional" emulations.
if { $linux_gnu } {
run_dump_test "multi-got-1"
+ run_dump_test "multi-got-no-shared"
}
if $has_newabi {
diff --git a/ld/testsuite/ld-mips-elf/multi-got-no-shared-1.s b/ld/testsuite/ld-mips-elf/multi-got-no-shared-1.s
new file mode 100644
index 0000000..a2eee84
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/multi-got-no-shared-1.s
@@ -0,0 +1,29 @@
+ .macro one_sym count
+ .globl sym_1_\count
+sym_1_\count:
+ la $2, sym_1_\count
+ .endm
+
+
+ .text
+ .globl func1
+ .ent func1
+func1:
+ .frame $sp,0,$31
+ .set noreorder
+ .cpload $25
+ .set reorder
+ .cprestore 8
+ .set noreorder
+
+ .irp thou,0,1,2,3,4,5,6,7,8
+ .irp hund,0,1,2,3,4,5,6,7,8,9
+ .irp tens,0,1,2,3,4,5,6,7,8,9
+ .irp ones,0,1,2,3,4,5,6,7,8,9
+ one_sym \thou\hund\tens\ones
+ .endr
+ .endr
+ .endr
+ .endr
+
+ .end func1
diff --git a/ld/testsuite/ld-mips-elf/multi-got-no-shared-2.s b/ld/testsuite/ld-mips-elf/multi-got-no-shared-2.s
new file mode 100644
index 0000000..1de7a14
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/multi-got-no-shared-2.s
@@ -0,0 +1,27 @@
+ .macro one_sym count
+ .globl sym_2_\count
+sym_2_\count:
+ la $2, sym_2_\count
+ .endm
+
+ .text
+ .ent func2
+func2:
+ .frame $sp,0,$31
+ .set noreorder
+ .cpload $25
+ .set reorder
+ .cprestore 8
+ .set noreorder
+
+ .irp thou,0,1,2,3,4,5,6,7,8
+ .irp hund,0,1,2,3,4,5,6,7,8,9
+ .irp tens,0,1,2,3,4,5,6,7,8,9
+ .irp ones,0,1,2,3,4,5,6,7,8,9
+ one_sym \thou\hund\tens\ones
+ .endr
+ .endr
+ .endr
+ .endr
+
+ .end func2
diff --git a/ld/testsuite/ld-mips-elf/multi-got-no-shared.d b/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
new file mode 100644
index 0000000..d072864
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
@@ -0,0 +1,18 @@
+#name: MIPS multi-got-no-shared
+#as: -EB -32 -KPIC -mno-shared
+#source: multi-got-no-shared-1.s
+#source: multi-got-no-shared-2.s
+#ld: -melf32btsmip --entry func1
+#objdump: -D -j .text --prefix-addresses --show-raw-insn
+
+.*: +file format.*
+
+Disassembly of section \.text:
+004000b0 <[^>]*> 3c1c1000 lui gp,0x1000
+004000b4 <[^>]*> 279c7ff0 addiu gp,gp,32752
+004000b8 <[^>]*> afbc0008 sw gp,8\(sp\)
+#...
+00408d60 <[^>]*> 3c1c1002 lui gp,0x1002
+00408d64 <[^>]*> 279c9960 addiu gp,gp,-26272
+00408d68 <[^>]*> afbc0008 sw gp,8\(sp\)
+#pass