summaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-06-24 23:55:44 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-06-24 23:55:44 +0000
commit0d04d84428769de3c8c3bdb7be4be7ff9c805cbf (patch)
treee6c9dfaf727a8b35e254a17b81b80de353d6a1ec /ld/testsuite
parent0d83103daa9d9519bfabd1ce994c5b7d716bd439 (diff)
downloadbinutils-redhat-0d04d84428769de3c8c3bdb7be4be7ff9c805cbf.tar.gz
bfd/
* elfxx-mips.h (_bfd_mips_elf_get_synthetic_symtab): New prototype. * elf32-mips.c (elf_backend_plt_sym_val): Remove macro. (bfd_elf32_get_synthetic_symtab): New macro. * elfxx-mips.c (plt_entry): New structure. (mips_elf_link_hash_entry): Add use_plt_entry member. (mips_elf_link_hash_table): Rename plt_entry_size member to plt_mips_entry_size. Add plt_comp_entry_size, plt_mips_offset, plt_comp_offset, plt_got_index entries and plt_header_is_comp members. (STUB_LW_MICROMIPS, STUB_MOVE_MICROMIPS): New macros. (STUB_LUI_MICROMIPS, STUB_JALR_MICROMIPS): Likewise. (STUB_ORI_MICROMIPS, STUB_LI16U_MICROMIPS): Likewise. (STUB_LI16S_MICROMIPS): Likewise. (MICROMIPS_FUNCTION_STUB_NORMAL_SIZE): Likewise. (MICROMIPS_FUNCTION_STUB_BIG_SIZE): Likewise. (micromips_o32_exec_plt0_entry): New variable. (mips16_o32_exec_plt_entry): Likewise. (micromips_o32_exec_plt_entry): Likewise. (mips_elf_link_hash_newfunc): Initialize use_plt_entry. (mips_elf_output_extsym): Update to use gotplt_union's plist member rather than offset. (mips_elf_gotplt_index): Likewise. Remove the VxWorks restriction. Use MIPS_ELF_GOT_SIZE to calculate GOT address. (mips_elf_count_got_symbols): Update to use gotplt_union's plist member rather than offset. (mips_elf_calculate_relocation): Handle MIPS16/microMIPS PLT entries. (_bfd_mips_elf_create_dynamic_sections): Don't set PLT sizes here. (mips_elf_make_plt_record): New function. (_bfd_mips_elf_check_relocs): Update comment. Record occurences of JAL relocations that might need a PLT entry. (_bfd_mips_elf_adjust_dynamic_symbol): Update to use gotplt_union's plist member rather than offset. Set individual PLT entry sizes here. Handle MIPS16/microMIPS PLT entries. Don't set the symbol's value in the symbol table for PLT references here. Don't set the PLT or PLT GOT section sizes here. (mips_elf_estimate_stub_size): Handle microMIPS stubs. (mips_elf_allocate_lazy_stub): Likewise. (mips_elf_lay_out_lazy_stubs): Likewise. Define a _MIPS_STUBS_ magic symbol. (mips_elf_set_plt_sym_value): New function. (_bfd_mips_elf_size_dynamic_sections): Set PLT header size and PLT and PLT GOT section sizes here. Set the symbol values in the symbol table for PLT references here. Handle microMIPS annotation of the _PROCEDURE_LINKAGE_TABLE_ magic symbol. (_bfd_mips_elf_finish_dynamic_symbol): Update to use gotplt_union's plist member rather than offset. Handle MIPS16/microMIPS PLT entries. Handle microMIPS stubs. (_bfd_mips_vxworks_finish_dynamic_symbol): Update to use gotplt_union's plist member rather than offset. Use MIPS_ELF_GOT_SIZE to calculate GOT address. (mips_finish_exec_plt): Handle microMIPS PLT. Return status. (_bfd_mips_elf_finish_dynamic_sections): Handle result from mips_finish_exec_plt. (_bfd_mips_elf_link_hash_table_create): Update to use gotplt_union's plist member rather than offset. (_bfd_mips_elf_get_synthetic_symtab): New function. include/elf/ * mips.h (ELF_ST_IS_MIPS_PLT): Respect STO_MIPS16 setting. (ELF_ST_SET_MIPS_PLT): Likewise. gdb/ * mips-tdep.c (mips_elf_make_msymbol_special): Handle MIPS16 and microMIPS synthetic symbols. ld/ * emulparams/elf32btsmip.sh: Arrange for .got.plt to be placed as close to .plt as possible. * scripttempl/elf.sc: Handle $INITIAL_READWRITE_SECTIONS and $PLT_NEXT_DATA variables. ld/testsuite/ * ld-mips-elf/jalx-2.dd: Update for microMIPS PLT support. * ld-mips-elf/pic-and-nonpic-3a.dd: Update for the _MIPS_STUBS_ magic symbol. * ld-mips-elf/pic-and-nonpic-3b.dd: Likewise. * ld-mips-elf/pic-and-nonpic-6-n32.dd: Likewise. * ld-mips-elf/pic-and-nonpic-6-n64.dd: Likewise. * ld-mips-elf/pic-and-nonpic-6-o32.dd: Likewise. * ld-mips-elf/stub-dynsym-1-10000.d: Likewise. * ld-mips-elf/stub-dynsym-1-2fe80.d: Likewise. * ld-mips-elf/stub-dynsym-1-7fff.d: Likewise. * ld-mips-elf/stub-dynsym-1-8000.d: Likewise. * ld-mips-elf/stub-dynsym-1-fff0.d: Likewise. * ld-mips-elf/tlslib-o32.d: Likewise. opcodes/ * mips-dis.c (is_mips16_plt_tail): New function. (print_insn_mips16): Handle MIPS16 PLT entry's GOT slot address word. (is_compressed_mode_p): Handle MIPS16/microMIPS PLT entries.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog16
-rw-r--r--ld/testsuite/ld-mips-elf/jalx-2.dd31
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.dd2
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.dd5
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.dd3
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.dd3
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.dd3
-rw-r--r--ld/testsuite/ld-mips-elf/stub-dynsym-1-10000.d2
-rw-r--r--ld/testsuite/ld-mips-elf/stub-dynsym-1-2fe80.d2
-rw-r--r--ld/testsuite/ld-mips-elf/stub-dynsym-1-7fff.d2
-rw-r--r--ld/testsuite/ld-mips-elf/stub-dynsym-1-8000.d2
-rw-r--r--ld/testsuite/ld-mips-elf/stub-dynsym-1-fff0.d2
-rw-r--r--ld/testsuite/ld-mips-elf/tlslib-o32.d3
13 files changed, 49 insertions, 27 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index f205bf539b..dce58ad2b1 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,19 @@
+2013-06-24 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * ld-mips-elf/jalx-2.dd: Update for microMIPS PLT support.
+ * ld-mips-elf/pic-and-nonpic-3a.dd: Update for the _MIPS_STUBS_
+ magic symbol.
+ * ld-mips-elf/pic-and-nonpic-3b.dd: Likewise.
+ * ld-mips-elf/pic-and-nonpic-6-n32.dd: Likewise.
+ * ld-mips-elf/pic-and-nonpic-6-n64.dd: Likewise.
+ * ld-mips-elf/pic-and-nonpic-6-o32.dd: Likewise.
+ * ld-mips-elf/stub-dynsym-1-10000.d: Likewise.
+ * ld-mips-elf/stub-dynsym-1-2fe80.d: Likewise.
+ * ld-mips-elf/stub-dynsym-1-7fff.d: Likewise.
+ * ld-mips-elf/stub-dynsym-1-8000.d: Likewise.
+ * ld-mips-elf/stub-dynsym-1-fff0.d: Likewise.
+ * ld-mips-elf/tlslib-o32.d: Likewise.
+
2013-06-19 Will Newton <will.newton@linaro.org>
* ld-aarch64/aarch64-elf.exp: Remove ifunc tests.
diff --git a/ld/testsuite/ld-mips-elf/jalx-2.dd b/ld/testsuite/ld-mips-elf/jalx-2.dd
index abbae8bb9b..8119ab443b 100644
--- a/ld/testsuite/ld-mips-elf/jalx-2.dd
+++ b/ld/testsuite/ld-mips-elf/jalx-2.dd
@@ -28,8 +28,8 @@ Disassembly of section \.text:
4400034: f89e 0020 sw a0,32\(s8\)
4400038: f8be 0024 sw a1,36\(s8\)
440003c: 41a2 0440 lui v0,0x440
- 4400040: 3082 02a0 addiu a0,v0,672
- 4400044: f110 0028 jalx 44000a0 <printf@plt>
+ 4400040: 3082 0290 addiu a0,v0,656
+ 4400044: f620 004c jal 4400098 <printf@micromipsplt>
4400048: 0000 0000 nop
440004c: f620 0010 jal 4400020 <internal_function>
4400050: 0000 0000 nop
@@ -44,17 +44,18 @@ Disassembly of section \.text:
Disassembly of section \.plt:
04400080 <_PROCEDURE_LINKAGE_TABLE_>:
- 4400080: 3c1c0440 lui gp,0x440
- 4400084: 8f9900d8 lw t9,216\(gp\)
- 4400088: 279c00d8 addiu gp,gp,216
- 440008c: 031cc023 subu t8,t8,gp
- 4400090: 03e07821 move t7,ra
- 4400094: 0018c082 srl t8,t8,0x2
- 4400098: 0320f809 jalr t9
- 440009c: 2718fffe addiu t8,t8,-2
+ 4400080: 7980 0012 addiu v1,\$pc,72
+ 4400084: ff23 0000 lw t9,0\(v1\)
+ 4400088: 0535 subu v0,v0,v1
+ 440008a: 2525 srl v0,v0,2
+ 440008c: 3302 fffe addiu t8,v0,-2
+ 4400090: 0dff move t7,ra
+ 4400092: 45f9 jalrs t9
+ 4400094: 0f83 move gp,v1
+ 4400096: 0c00 nop
-044000a0 <printf@plt>:
- 44000a0: 3c0f0440 lui t7,0x440
- 44000a4: 8df900e0 lw t9,224\(t7\)
- 44000a8: 03200008 jr t9
- 44000ac: 25f800e0 addiu t8,t7,224
+04400098 <printf@micromipsplt>:
+ 4400098: 7900 000e addiu v0,\$pc,56
+ 440009c: ff22 0000 lw t9,0\(v0\)
+ 44000a0: 4599 jr t9
+ 44000a2: 0f02 move t8,v0
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.dd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.dd
index cb72980b97..b37a59327a 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.dd
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.dd
@@ -31,7 +31,7 @@ Disassembly of section \.text:
#...
Disassembly of section \.MIPS\.stubs:
-00000c00 <.MIPS.stubs>:
+00000c00 <_MIPS_STUBS_>:
c00: 8f998010 lw t9,-32752\(gp\)
c04: 03e07821 move t7,ra
c08: 0320f809 jalr t9
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.dd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.dd
index dd1d1b0bed..da79012541 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.dd
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.dd
@@ -42,9 +42,10 @@ Disassembly of section \.text:
.*: 03200008 jr t9
.*: 00000000 nop
.*: 00000000 nop
-Disassembly of section .MIPS.stubs:
-00044030 <\.MIPS\.stubs>:
+Disassembly of section \.MIPS\.stubs:
+
+00044030 <_MIPS_STUBS_>:
.*: 8f998010 lw t9,-32752\(gp\)
.*: 03e07821 move t7,ra
.*: 0320f809 jalr t9
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.dd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.dd
index fd76d86557..dfab46c04b 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.dd
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.dd
@@ -91,9 +91,10 @@ Disassembly of section \.text:
44090: 3c02000a lui v0,0xa
44094: 24422018 addiu v0,v0,8216
\.\.\.
+
Disassembly of section \.MIPS\.stubs:
-000440a0 <\.MIPS\.stubs>:
+000440a0 <_MIPS_STUBS_>:
440a0: 8f998010 lw t9,-32752\(gp\)
440a4: 03e07821 move t3,ra
440a8: 0320f809 jalr t9
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.dd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.dd
index 864fbbbad1..287e558188 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.dd
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.dd
@@ -91,9 +91,10 @@ Disassembly of section \.text:
44090: 3c02000a lui v0,0xa
44094: 24422018 addiu v0,v0,8216
\.\.\.
+
Disassembly of section \.MIPS\.stubs:
-0+440a0 <\.MIPS\.stubs>:
+0+440a0 <_MIPS_STUBS_>:
440a0: df998010 ld t9,-32752\(gp\)
440a4: 03e0782d move t3,ra
440a8: 0320f809 jalr t9
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.dd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.dd
index ba6ab0fb9b..5002d52d3e 100644
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.dd
+++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.dd
@@ -91,9 +91,10 @@ Disassembly of section \.text:
44090: 3c02000a lui v0,0xa
44094: 24422018 addiu v0,v0,8216
\.\.\.
+
Disassembly of section \.MIPS\.stubs:
-000440a0 <\.MIPS\.stubs>:
+000440a0 <_MIPS_STUBS_>:
440a0: 8f998010 lw t9,-32752\(gp\)
440a4: 03e07821 move t7,ra
440a8: 0320f809 jalr t9
diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1-10000.d b/ld/testsuite/ld-mips-elf/stub-dynsym-1-10000.d
index b59bb5fb9c..e2d375bf06 100644
--- a/ld/testsuite/ld-mips-elf/stub-dynsym-1-10000.d
+++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1-10000.d
@@ -3,7 +3,7 @@
Disassembly of section \.MIPS\.stubs:
-.* <\.MIPS.stubs>:
+.* <_MIPS_STUBS_>:
.*: 8f998010 lw t9,-32752\(gp\)
.*: 03e07821 move t7,ra
.*: 3c180001 lui t8,0x1
diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1-2fe80.d b/ld/testsuite/ld-mips-elf/stub-dynsym-1-2fe80.d
index 07ca1a2ba5..d428f3d519 100644
--- a/ld/testsuite/ld-mips-elf/stub-dynsym-1-2fe80.d
+++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1-2fe80.d
@@ -3,7 +3,7 @@
Disassembly of section \.MIPS\.stubs:
-.* <\.MIPS.stubs>:
+.* <_MIPS_STUBS_>:
.*: 8f998010 lw t9,-32752\(gp\)
.*: 03e07821 move t7,ra
.*: 3c180002 lui t8,0x2
diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1-7fff.d b/ld/testsuite/ld-mips-elf/stub-dynsym-1-7fff.d
index bfc94c5a6d..e2b961f665 100644
--- a/ld/testsuite/ld-mips-elf/stub-dynsym-1-7fff.d
+++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1-7fff.d
@@ -3,7 +3,7 @@
Disassembly of section \.MIPS\.stubs:
-.* <\.MIPS.stubs>:
+.* <_MIPS_STUBS_>:
.*: 8f998010 lw t9,-32752\(gp\)
.*: 03e07821 move t7,ra
.*: 0320f809 jalr t9
diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1-8000.d b/ld/testsuite/ld-mips-elf/stub-dynsym-1-8000.d
index 2861ac222a..b1b19803c3 100644
--- a/ld/testsuite/ld-mips-elf/stub-dynsym-1-8000.d
+++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1-8000.d
@@ -3,7 +3,7 @@
Disassembly of section \.MIPS\.stubs:
-.* <\.MIPS.stubs>:
+.* <_MIPS_STUBS_>:
.*: 8f998010 lw t9,-32752\(gp\)
.*: 03e07821 move t7,ra
.*: 0320f809 jalr t9
diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1-fff0.d b/ld/testsuite/ld-mips-elf/stub-dynsym-1-fff0.d
index 440d32a9da..99ca9b236a 100644
--- a/ld/testsuite/ld-mips-elf/stub-dynsym-1-fff0.d
+++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1-fff0.d
@@ -3,7 +3,7 @@
Disassembly of section \.MIPS\.stubs:
-.* <\.MIPS.stubs>:
+.* <_MIPS_STUBS_>:
.*: 8f998010 lw t9,-32752\(gp\)
.*: 03e07821 move t7,ra
.*: 0320f809 jalr t9
diff --git a/ld/testsuite/ld-mips-elf/tlslib-o32.d b/ld/testsuite/ld-mips-elf/tlslib-o32.d
index e0b3fe3ea9..066f284c58 100644
--- a/ld/testsuite/ld-mips-elf/tlslib-o32.d
+++ b/ld/testsuite/ld-mips-elf/tlslib-o32.d
@@ -35,9 +35,10 @@ Disassembly of section .text:
.*: 03e00008 jr ra
.*: 27bd0010 addiu sp,sp,16
...
+
Disassembly of section .MIPS.stubs:
-.* <.MIPS.stubs>:
+.* <_MIPS_STUBS_>:
.*: 8f998010 lw t9,-32752\(gp\)
.*: 03e07821 move t7,ra
.*: 0320f809 jalr t9