old-cross-binutils/ld/testsuite/ld-mips-elf/mips16-intermix.d

127 lines
5.1 KiB
D
Raw Normal View History

bfd/ 2010-12-23 Robert Millan <rmh@gnu.org> * config.bfd: Recognize mips-freebsd and mips-kfreebsd-gnu. * configure.host: Likewise. * configure.in: Support for `bfd_elf32_ntradbigmips_freebsd_vec', `bfd_elf32_ntradlittlemips_freebsd_vec', `bfd_elf32_tradbigmips_freebsd_vec', `bfd_elf32_tradlittlemips_freebsd_vec', `bfd_elf64_tradbigmips_freebsd_vec' and `bfd_elf64_tradlittlemips_freebsd_vec'. * configure: Regenerate. * elf32-mips.c: New target for FreeBSD support (same as traditional MIPS but overrides ELF_OSABI with ELFOSABI_FREEBSD). * elf64-mips.c: Likewise. * elfn32-mips.c: Likewise. * targets.c (_bfd_target_vector): Add `bfd_elf32_ntradbigmips_freebsd_vec', `bfd_elf32_ntradlittlemips_freebsd_vec', `bfd_elf32_tradbigmips_freebsd_vec', `bfd_elf32_tradlittlemips_freebsd_vec', `bfd_elf64_tradbigmips_freebsd_vec' and `bfd_elf64_tradlittlemips_freebsd_vec'. ld/ 2010-12-14 Robert Millan <rmh@gnu.org> * configure.tgt: Recognize mips-freebsd and mips-kfreebsd-gnu. * emulparams/elf32btsmip_fbsd.sh: New file. * emulparams/elf32btsmipn32_fbsd.sh: Likewise. * emulparams/elf32ltsmip_fbsd.sh: Likewise. * emulparams/elf32ltsmipn32_fbsd.sh: Likewise. * emulparams/elf64btsmip_fbsd.sh: Likewise. * emulparams/elf64ltsmip_fbsd.sh: Likewise. * Makefile.am: Add build rules for `eelf32btsmip_fbsd.c', `eelf32btsmipn32_fbsd.c', `eelf32ltsmip_fbsd.c', `eelf32ltsmipn32_fbsd.c', `eelf64btsmip_fbsd.c' and `eelf64ltsmip_fbsd.c'. * Makefile.in: Regenerate. gas/ 2010-12-19 Robert Millan <rmh@gnu.org> Richard Sandiford <rdsandiford@googlemail.com> * config/tc-mips.c (ELF_TARGET): New macro. Generates target names accordingly to whether TE_FreeBSD and whether TE_TMIPS are defined. (mips_target_format): Refactor code using ELF_TARGET(). (support_64bit_objects): Likewise. * configure.in: Recognize mips-freebsd and mips-kfreebsd-gnu. * configure.tgt: Likewise. * configure: Regenerate. binutils/testsuite/ * binutils-all/readelf.exp: Handle MIPS FreeBSD targets. gas/testsuite/ * gas/mips/e32el-rel2.d: Accept any file format. * gas/mips/elf-rel.d: Likewise. * gas/mips/elf-rel2.d: Likewise. * gas/mips/elf-rel3.d: Likewise. * gas/mips/elfel-rel.d: Likewise. * gas/mips/elfel-rel2.d: Likewise. * gas/mips/elfel-rel3.d: Likewise. * gas/mips/ldstla-32-mips3-shared.d: Likewise. * gas/mips/ldstla-32-mips3.d: Likewise. * gas/mips/ldstla-32-shared.d: Likewise. * gas/mips/ldstla-32.d: Likewise. * gas/mips/ldstla-n64-shared.d: Likewise. * gas/mips/ldstla-n64.d: Likewise. * gas/mips/noat-1.d: Likewise. * gas/mips/set-arch.d: Likewise. * gas/mips/tls-o32.d: Likewise. ld/testsuite/ * ld-mips-elf/mips-elf-flags.exp: Handle FreeBSD targets. * ld-mips-elf/mips-elf.exp: Likewise. * ld-mips-elf/mips16-call-global.d: Accept any file format. * ld-mips-elf/mips16-intermix.d: Likewise.
2010-12-31 11:01:00 +00:00
.*: +file format .*
SYMBOL TABLE:
#...
.* l F .text 0+[0-9a-f]+ m32_static_l
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static_l
.* l F .text 0+[0-9a-f]+ m32_static1_l
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static1_l
.* l F .text 0+[0-9a-f]+ m32_static32_l
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static32_l
.* l F .text 0+[0-9a-f]+ m32_static16_l
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static16_l
.* l F .text 0+[0-9a-f]+ __fn_stub_m16_d
.* l F .text 0+[0-9a-f]+ m32_static_d
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static_d
.* l F .text 0+[0-9a-f]+ m32_static1_d
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static1_d
.* l F .text 0+[0-9a-f]+ __fn_stub_m16_static1_d
.* l F .text 0+[0-9a-f]+ m32_static32_d
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static32_d
.* l F .text 0+[0-9a-f]+ __fn_stub_m16_static32_d
.* l F .text 0+[0-9a-f]+ m32_static16_d
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static16_d
.* l F .text 0+[0-9a-f]+ m32_static_ld
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static_ld
.* l F .text 0+[0-9a-f]+ m32_static1_ld
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static1_ld
.* l F .text 0+[0-9a-f]+ m32_static32_ld
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static32_ld
.* l F .text 0+[0-9a-f]+ m32_static16_ld
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static16_ld
.* l F .text 0+[0-9a-f]+ __fn_stub_m16_dl
.* l F .text 0+[0-9a-f]+ m32_static_dl
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static_dl
.* l F .text 0+[0-9a-f]+ m32_static1_dl
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static1_dl
.* l F .text 0+[0-9a-f]+ __fn_stub_m16_static1_dl
.* l F .text 0+[0-9a-f]+ m32_static32_dl
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static32_dl
.* l F .text 0+[0-9a-f]+ __fn_stub_m16_static32_dl
.* l F .text 0+[0-9a-f]+ m32_static16_dl
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static16_dl
.* l F .text 0+[0-9a-f]+ __fn_stub_m16_dlld
.* l F .text 0+[0-9a-f]+ m32_static_dlld
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static_dlld
.* l F .text 0+[0-9a-f]+ m32_static1_dlld
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static1_dlld
.* l F .text 0+[0-9a-f]+ __fn_stub_m16_static1_dlld
.* l F .text 0+[0-9a-f]+ m32_static32_dlld
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static32_dlld
.* l F .text 0+[0-9a-f]+ __fn_stub_m16_static32_dlld
.* l F .text 0+[0-9a-f]+ m32_static16_dlld
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static16_dlld
.* l F .text 0+[0-9a-f]+ m32_static_d_l
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static_d_l
.* l F .text 0+[0-9a-f]+ m32_static1_d_l
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static1_d_l
.* l F .text 0+[0-9a-f]+ m32_static32_d_l
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static32_d_l
.* l F .text 0+[0-9a-f]+ m32_static16_d_l
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static16_d_l
bfd/ * reloc.c (BFD_RELOC_MIPS16_GOT16, BFD_RELOC_MIPS16_CALL16): Declare. * libbfd.h, bfd-in2.h: Regenerate. * elf32-mips.c (elf_mips16_howto_table_rel): Fill in reserved R_MIPS16_GOT16 and R_MIPS16_CALL16 entries. (mips16_reloc_map): Add mappings. * elf64-mips.c (mips16_elf64_howto_table_rel): Fill in reserved R_MIPS16_GOT16 and R_MIPS16_CALL16 entries. (mips16_elf64_howto_table_rela): Likewise. (mips16_reloc_map): Add mappings. * elfn32-mips.c (elf_mips16_howto_table_rel): Fill in reserved R_MIPS16_GOT16 and R_MIPS16_CALL16 entries. (elf_mips16_howto_table_rela): Likewise. (mips16_reloc_map): Add mappings. * elfxx-mips.c (mips_elf_create_shadow_symbol): New function. (section_allows_mips16_refs_p): Likewise. (mips16_stub_symndx): Likewise. (mips_elf_check_mips16_stubs): Treat the data argument as a bfd_link_info. Mark every dynamic symbol as needing MIPS16 stubs and create a "shadow" symbol for the original MIPS16 definition. (mips16_reloc_p, got16_reloc_p, call16_reloc_p, hi16_reloc_p) (lo16_reloc_p, mips16_call_reloc_p): New functions. (_bfd_mips16_elf_reloc_unshuffle): Use mips16_reloc_p to generalize relocation checks. (_bfd_mips16_elf_reloc_shuffle): Likewise. (_bfd_mips_elf_lo16_reloc): Handle R_MIPS16_GOT16. (mips_elf_got16_entry): Add comment. (mips_elf_calculate_relocation): Use hi16_reloc_p, lo16_reloc_p, mips16_call_reloc_p, call16_reloc_p and got16_reloc_p to generalize relocation checks. Use section_allows_mips16_refs_p instead of mips16_stub_section_p. Handle R_MIPS16_CALL16 and R_MIPS16_GOT16, allowing the former to refer directly to a MIPS16 function if its stub is not needed. (mips16_stub_section_p): Delete. (_bfd_mips_elf_symbol_processing): Convert odd-valued function symbols into even MIPS16 symbols. (mips_elf_add_lo16_rel_addend): Use mips16_reloc_p to generalize a relocation check. (_bfd_mips_elf_check_relocs): Calculate "bed" and "rel_end" earlier in the function. Use mips16_stub_symndx to identify the target function. Avoid out-of-bounds accesses when the stub has no relocations; report an error instead. Use section_allows_mips16_refs_p instead of mips16_stub_section_p. Use mips16_call_reloc_p and got16_reloc_p to generalize relocation checks. Handle R_MIPS16_CALL16 and R_MIPS16_GOT16. Don't create dynamic relocations for absolute references to __gnu_local_gp. (_bfd_mips_elf_always_size_sections): Pass a bfd_link_info as the argument to mips_elf_check_mips16_stubs. Generalize comment. (_bfd_mips_elf_relocate_section): Use hi16_reloc_p and got16_reloc_p to generalize relocation checks. (_bfd_mips_elf_finish_dynamic_symbol): If a dynamic MIPS16 function symbol has a non-MIPS16 stub, redirect the symbol to the stub. Fix an overly long line. Don't give dynamic symbols type STO_MIPS16. (_bfd_mips_elf_gc_sweep_hook): Handle R_MIPS16_CALL16 and R_MIPS16_GOT16. gas/ * config/tc-mips.c (mips16_reloc_p, got16_reloc_p, hi16_reloc_p) (lo16_reloc_p): New functions. (reloc_needs_lo_p): Use hi16_reloc_p and got16_reloc_p to generalize relocation checks. (matching_lo_reloc): New function. (fixup_has_matching_lo_p): Use it. (mips16_mark_labels): Don't clobber a symbol's visibility. (append_insn): Use hi16_reloc_p and lo16_reloc_p. (mips16_ip): Handle BFD_RELOC_MIPS16_GOT16 and BFD_RELOC_MIPS16_CALL16. (md_apply_fix): Likewise. (mips16_percent_op): Add %got and %call16. (mips_frob_file): Use got16_reloc_p to generalize relocation checks. Use matching_lo_reloc. (mips_force_relocation): Use hi16_reloc_p and lo16_reloc_p to generalize relocation checks. (mips_fix_adjustable): Use lo16_reloc_p to generalize relocation checks. gas/testsuite/ * gas/mips/elf-rel8-mips16.d, gas/mips/elf-rel8-mips16.s, * gas/mips/elf-rel9-mips16.d, gas/mips/elf-rel9-mips16.s, * gas/mips/elf-rel13-mips16.d, gas/mips/elf-rel13-mips16.s: New tests. * gas/mips/mips.exp: Run them. ld/testsuite/ * ld-mips-elf/mips16-local-stubs-1.d: Remove stub_for_h3, which was only referenced by the .pdr section, and was not actually needed by code. * ld-mips-elf/mips16-intermix.d: Remove unused static function stubs. * ld-mips-elf/mips16-pic-1a.s, ld-mips-elf/mips16-pic-1b.s, ld-mips-elf/mips16-pic-1-dummy.s, ld-mips-elf/mips16-pic-1.dd, ld-mips-elf/mips16-pic-1.gd, ld-mips-elf/mips16-pic-1.inc, ld-mips-elf/mips16-pic-1.ld, ld-mips-elf/mips16-pic-2a.s, ld-mips-elf/mips16-pic-2b.s, ld-mips-elf/mips16-pic-2.ad, ld-mips-elf/mips16-pic-2.dd, ld-mips-elf/mips16-pic-2.gd, ld-mips-elf/mips16-pic-2.nd, ld-mips-elf/mips16-pic-2.rd: New tests. * ld-mips-elf/mips-elf.exp: Run them.
2008-08-06 19:44:47 +00:00
# ??? We aren't yet able to get rid of the symbol table entry for
# __fn_stub_m16_d_d, or its .pdr entry.
.* l F .text 0+[0-9a-f]+ *
.* l F .text 0+[0-9a-f]+ m32_static_d_d
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static_d_d
.* l F .text 0+[0-9a-f]+ m32_static1_d_d
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static1_d_d
.* l F .text 0+[0-9a-f]+ __fn_stub_m16_static1_d_d
.* l F .text 0+[0-9a-f]+ m32_static32_d_d
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static32_d_d
.* l F .text 0+[0-9a-f]+ __fn_stub_m16_static32_d_d
.* l F .text 0+[0-9a-f]+ m32_static16_d_d
.* l F .text 0+[0-9a-f]+ 0xf0 m16_static16_d_d
#...
.* l F .text 0+[0-9a-f]+ __call_stub_m32_static1_d
.* l F .text 0+[0-9a-f]+ __call_stub_m16_static1_d
.* l F .text 0+[0-9a-f]+ __call_stub_m32_static1_dl
.* l F .text 0+[0-9a-f]+ __call_stub_m16_static1_dl
.* l F .text 0+[0-9a-f]+ __call_stub_m32_static1_dlld
.* l F .text 0+[0-9a-f]+ __call_stub_m16_static1_dlld
.* l F .text 0+[0-9a-f]+ __call_stub_fp_m32_static1_d_l
.* l F .text 0+[0-9a-f]+ __call_stub_fp_m16_static1_d_l
.* l F .text 0+[0-9a-f]+ __call_stub_fp_m32_static1_d_d
.* l F .text 0+[0-9a-f]+ __call_stub_fp_m16_static1_d_d
.* l F .text 0+[0-9a-f]+ __call_stub_m32_static16_d
.* l F .text 0+[0-9a-f]+ __call_stub_m16_static16_d
.* l F .text 0+[0-9a-f]+ __call_stub_m32_static16_dl
.* l F .text 0+[0-9a-f]+ __call_stub_m16_static16_dl
.* l F .text 0+[0-9a-f]+ __call_stub_m32_static16_dlld
.* l F .text 0+[0-9a-f]+ __call_stub_m16_static16_dlld
.* l F .text 0+[0-9a-f]+ __call_stub_fp_m32_static16_d_l
.* l F .text 0+[0-9a-f]+ __call_stub_fp_m16_static16_d_l
.* l F .text 0+[0-9a-f]+ __call_stub_fp_m32_static16_d_d
.* l F .text 0+[0-9a-f]+ __call_stub_fp_m16_static16_d_d
#...
.* g F .text 0+[0-9a-f]+ m32_ld
#...
.* g F .text 0+[0-9a-f]+ m32_d_l
.* g F .text 0+[0-9a-f]+ 0xf0 m16_d_d
.* g F .text 0+[0-9a-f]+ 0xf0 m16_d
#...
.* g F .text 0+[0-9a-f]+ 0xf0 f16
#...
.* g F .text 0+[0-9a-f]+ m32_d
#...
.* g F .text 0+[0-9a-f]+ 0xf0 m16_dl
#...
.* g F .text 0+[0-9a-f]+ f32
#...
.* g F .text 0+[0-9a-f]+ 0xf0 m16_l
#...
.* g F .text 0+[0-9a-f]+ 0xf0 m16_ld
#...
.* g F .text 0+[0-9a-f]+ 0xf0 m16_dlld
.* g F .text 0+[0-9a-f]+ m32_d_d
#...
.* g F .text 0+[0-9a-f]+ m32_dl
#...
.* g F .text 0+[0-9a-f]+ m32_dlld
#...
.* g F .text 0+[0-9a-f]+ 0xf0 m16_d_l
#...
.* g F .text 0+[0-9a-f]+ m32_l
#pass