binutils-gdb/gas/config
Richard Sandiford 738e53487d 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
..
aout_gnu.h
atof-ieee.c
atof-vax.c
bfin-aux.h
bfin-defs.h
bfin-lex.l
bfin-parse.y * config/bfin-parse.y (asm_1): Error if plain symbol is used 2008-07-24 07:25:13 +00:00
e-crisaout.c
e-criself.c
e-i386aout.c
e-i386coff.c
e-i386elf.c
e-mipsecoff.c
e-mipself.c
itbl-mips.h
m68k-parse.h
m68k-parse.y
obj-aout.c
obj-aout.h
obj-coff.c
obj-coff.h
obj-ecoff.c
obj-ecoff.h
obj-elf.c * config/obj-elf.c (obj_elf_section_type): Add prototype 2008-04-23 13:54:56 +00:00
obj-elf.h
obj-evax.c
obj-evax.h
obj-fdpicelf.c 2008-04-23 Mike Frysinger <vapier@gentoo.org> 2008-04-23 18:40:34 +00:00
obj-fdpicelf.h 2008-04-23 Mike Frysinger <vapier@gentoo.org> 2008-04-23 18:40:34 +00:00
obj-multi.c
obj-multi.h
obj-som.c
obj-som.h
tc-alpha.c
tc-alpha.h
tc-arc.c
tc-arc.h
tc-arm.c gas/ 2008-07-07 19:12:58 +00:00
tc-arm.h
tc-avr.c /gas: 2008-06-25 16:19:11 +00:00
tc-avr.h
tc-bfin.c * config/tc-bfin.c (bfin_gen_loop): Remove loop symbol. 2008-07-22 08:34:16 +00:00
tc-bfin.h
tc-cr16.c
tc-cr16.h
tc-cris.c
tc-cris.h
tc-crx.c
tc-crx.h
tc-d10v.c
tc-d10v.h
tc-d30v.c
tc-d30v.h
tc-dlx.c
tc-dlx.h
tc-fr30.c
tc-fr30.h
tc-frv.c
tc-frv.h
tc-generic.c
tc-generic.h
tc-h8300.c * NEWS: Mention these changes. 2008-08-06 15:42:15 +00:00
tc-h8300.h * NEWS: Mention these changes. 2008-08-06 15:42:15 +00:00
tc-hppa.c
tc-hppa.h
tc-i370.c
tc-i370.h
tc-i386.c warning fix 2008-07-28 06:48:00 +00:00
tc-i386.h
tc-i860.c
tc-i860.h
tc-i960.c
tc-i960.h
tc-ia64.c
tc-ia64.h
tc-ip2k.c
tc-ip2k.h
tc-iq2000.c
tc-iq2000.h
tc-m32c.c * config/tc-m32c.h (H_TICK_HEX): Define. 2008-07-18 22:25:07 +00:00
tc-m32c.h * config/tc-m32c.h (H_TICK_HEX): Define. 2008-07-18 22:25:07 +00:00
tc-m32r.c
tc-m32r.h
tc-m68hc11.c
tc-m68hc11.h
tc-m68k.c * config/tc-m68k.c (m68k_set_cpu, m68k_set_arch): Don't complain 2008-07-08 06:33:41 +00:00
tc-m68k.h
tc-m68851.h
tc-maxq.c
tc-maxq.h
tc-mcore.c
tc-mcore.h
tc-mep.c
tc-mep.h
tc-mips.c bfd/ 2008-08-06 19:44:47 +00:00
tc-mips.h * dwarf2dbg.c: Remove superfluous forward function declarations. 2008-08-04 10:55:48 +00:00
tc-mmix.c PR gas/6607 2008-06-16 15:04:41 +00:00
tc-mmix.h
tc-mn10200.c
tc-mn10200.h
tc-mn10300.c
tc-mn10300.h
tc-msp430.c
tc-msp430.h
tc-mt.c
tc-mt.h
tc-ns32k.c
tc-ns32k.h
tc-openrisc.c
tc-openrisc.h
tc-or32.c
tc-or32.h
tc-pdp11.c
tc-pdp11.h
tc-pj.c
tc-pj.h
tc-ppc.c gas/ 2008-08-02 04:38:51 +00:00
tc-ppc.h include/opcode/ 2008-06-13 20:16:00 +00:00
tc-s390.c
tc-s390.h
tc-score.c
tc-score.h
tc-sh64.c PR gas/6043 2008-04-07 02:55:08 +00:00
tc-sh64.h
tc-sh.c * NEWS: Mention these changes. 2008-08-06 15:42:15 +00:00
tc-sh.h * NEWS: Mention these changes. 2008-08-06 15:42:15 +00:00
tc-sparc.c * config/tc-sparc.c (v9a_asr_table): Fix order of softint entries. 2008-04-30 03:50:39 +00:00
tc-sparc.h
tc-spu.c * config/tc-spu.c (md_apply_fix): Handle fully resolved 2008-07-04 13:04:04 +00:00
tc-spu.h
tc-tic4x.c
tc-tic4x.h
tc-tic30.c
tc-tic30.h
tc-tic54x.c
tc-tic54x.h
tc-v850.c
tc-v850.h
tc-vax.c
tc-vax.h
tc-xc16x.c
tc-xc16x.h
tc-xstormy16.c
tc-xstormy16.h
tc-xtensa.c bfd/ 2008-05-07 23:13:09 +00:00
tc-xtensa.h
tc-z8k.c
tc-z8k.h
tc-z80.c
tc-z80.h
te-386bsd.h
te-aix5.h
te-armeabi.h
te-armlinuxeabi.h
te-dynix.h
te-epoc-pe.h
te-freebsd.h
te-generic.h
te-gnu.h
te-go32.h
te-hppa64.h
te-hppa.h
te-hppalinux64.h
te-hpux.h
te-i386aix.h
te-ia64aix.h
te-interix.h
te-irix.h
te-linux.h
te-lnews.h
te-lynx.h
te-mach.h
te-macos.h
te-nbsd532.h
te-nbsd.h
te-netware.h
te-pc532mach.h
te-pe.h
te-pep.h
te-psos.h
te-riscix.h
te-sparcaout.h
te-sun3.h
te-svr4.h
te-symbian.h
te-tmips.h
te-vxworks.h
te-wince-pe.h
vax-inst.h
xtensa-istack.h
xtensa-relax.c
xtensa-relax.h