binutils-gdb/gas/config
Richard Sandiford 55e6e39790 bfd/
2006-08-02  Richard Sandiford  <richard@codesourcery.com>
	    Kazu Hirata  <kazu@codesourcery.com>
	    Phil Edwards  <phil@codesourcery.com>
	    Nathan Sidwell  <nathan@codesourcery.com>

	* config.bfd (sh-*-vxworks): Use bfd_elf32_shvxworks_vec and
	bfd_elf32_shlvxworks_vec.
	* configure.in (bfd_elf32_sh64_vec): Add elf-vxworks.lo.
	(bfd_elf32_sh64l_vec, bfd_elf32_sh64lin_vec): Likewise.
	(bfd_elf32_sh64blin_vec, bfd_elf32_sh64lnbsd_vec): Likewise.
	(bfd_elf32_sh64nbsd_vec, bfd_elf32_sh_vec): Likewise.
	(bfd_elf32_shblin_vec, bfd_elf32_shl_vec): Likewise.
	(bfd_elf32_shl_symbian_vec, bfd_elf32_shlin_vec): Likewise.
	(bfd_elf32_shlnbsd_vec, bfd_elf32_shnbsd_vec): Likewise.
	(bfd_elf32_shlvxworks_vec, bfd_elf32_shvxworks_vec): New stanzas.
	* configure: Regenerate.
	* Makefile.am: Regenerate dependencies.
	* Makefile.in: Regenerate.
	* elf-vxworks.c (elf_vxworks_gott_symbol_p): New function.
	(elf_vxworks_add_symbol_hook): Use it.
	(elf_vxworks_link_output_symbol_hook): Likewise.  Use the hash
	table entry to check for weak undefined symbols and to obtain
	the original bfd.
	(elf_vxworks_emit_relocs): Use target_index instead of this_idx.
	* elf32-sh-relocs.h: New file, split from elf32-sh.c.
	(R_SH_DIR32): Use SH_PARTIAL32 for the partial_inplace field,
	SH_SRC_MASK32 for the src_mask field, and SH_ELF_RELOC for the
	special_function field.
	(R_SH_REL32): Use SH_PARTIAL32 and SH_SRC_MASK32 here too.
	(R_SH_REL32, R_SH_TLS_GD_32, R_SH_TLS_LD_32): Likewise.
	(R_SH_TLS_LDO_32, R_SH_TLS_IE_32, R_SH_TLS_LE_32): Likewise.
	(R_SH_TLS_DTPMOD32, R_SH_TLS_DTPOFF32, R_SH_TLS_TPOFF32): Likewise.
	(R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT): Likewise.
	(R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): Likewise.
	(SH_PARTIAL32, SH_SRC_MASK32, SH_ELF_RELOC): Undefine at end of file.
	* elf32-sh.c: Include elf32-vxworks.h.
	(MINUS_ONE): Define.
	(sh_elf_howto_table): Include elf32-sh-relocs.h with SH_PARTIAL32
	set to TRUE, SH_SRC_MASK32 set to 0xffffffff, and SH_ELF_RELOC set
	to sh_elf_reloc.
	(sh_vxworks_howto_table): New variable.  Include elf32-sh-relocs.h
	with SH_PARTIAL32 set to FALSE, SH_SRC_MASK32 set to 0, and
	SH_ELF_RELOC set to bfd_elf_generic_reloc.
	(vxworks_object_p, get_howto_table): New functions.
	(sh_elf_reloc_type_lookup): Fix typo.  Use get_howto_table.
	(sh_elf_info_to_howto): Use get_howto_table.
	(sh_elf_relax_section): Honor the partial_inplace field of the
	R_SH_DIR32 howto.
	(sh_elf_relax_delete_bytes): Likewise.
	(elf_sh_plt_info): New structure.
	(PLT_ENTRY_SIZE): Replace both definitions with...
	(ELF_PLT_ENTRY_SIZE): ...this new macro, with separate definitions for
	INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
	(elf_sh_plt0_entry_be): Update sizes of both definitions accordingly.
	(elf_sh_plt0_entry_le): Likewise.
	(elf_sh_plt_entry_be, elf_sh_plt_entry_le): Likewise.
	(elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le): Likewise.
	(elf_sh_plts): New structure, with separate definitions for
	INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
	(elf_sh_plt0_entry): Delete both definitions.
	(elf_sh_plt_entry, elf_sh_pic_plt_entry): Likewise.
	(elf_sh_sizeof_plt, elf_sh_plt_plt0_offset): Likewise.
	(elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset): Likewise.
	(elf_sh_plt_reloc_offset): Likewise.
	(movi_shori_putval): Delete in favor of...
	(install_plt_field): ...this new function, with separate definitions
	for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
	(get_plt_info): New function, with separate definitions
	for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
	(elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset): Delete.
	(VXWORKS_PLT_HEADER_SIZE, VXWORKS_PLT_ENTRY_SIZE): New macros.
	(vxworks_sh_plt0_entry_be, vxworks_sh_plt0_entry_le): New constants.
	(vxworks_sh_plt_entry_be, vxworks_sh_plt_entry_le): Likewise.
	(vxworks_sh_pic_plt_entry_be, vxworks_sh_pic_plt_entry_le): Likewise.
	(get_plt_index, get_plt_offset): New functions.
	(elf_sh_link_hash_table): Add srelplt2, plt_info and vxworks_p fields.
	(sh_elf_link_hash_table_create): Initialize them.
	(sh_elf_create_dynamic_sections): Call
	elf_vxworks_create_dynamic_sections for VxWorks.
	(allocate_dynrelocs): Use htab->plt_info to get the size of PLT
	entries.  Allocate relocation entries in .rela.plt.unloaded if
	generating a VxWorks executable.
	(sh_elf_always_size_sections): New function.
	(sh_elf_size_dynamic_sections): Extend .rela.plt handling to
	.rela.plt.unloaded.
	(sh_elf_relocate_section): Use get_howto_table.  Honor
	partial_inplace when calculating the addend for dynamic
	relocations.  Use get_plt_index.
	(sh_elf_finish_dynamic_symbol): Use get_plt_index, install_plt_field
	and htab->plt_info.  Fill in the bra .plt offset for VxWorks
	executables.  Populate .rela.plt.unloaded.  Do not make
	_GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
	(sh_elf_finish_dynamic_sections): Use install_plt_field and
	htab->plt_info.  Handle cases where there is no special PLT header.
	Populate the first relocation in .rela.plt.unloaded and fix up
	the remaining entries.
	(sh_elf_plt_sym_val): Use get_plt_info.
	(elf_backend_always_size_sections): Define.
	(TARGET_BIG_SYM, TARGET_BIG_NAME): Override for VxWorks.
	(TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
	(elf32_bed, elf_backend_want_plt_sym): Likewise.
	(elf_symbol_leading_char, elf_backend_want_got_underscore): Likewise.
	(elf_backend_grok_prstatus, elf_backend_grok_psinfo): Likewise.
	(elf_backend_add_symbol_hook): Likewise.
	(elf_backend_link_output_symbol_hook): Likewise.
	(elf_backend_emit_relocs): Likewise.
	(elf_backend_final_write_processing): Likewise.
	(ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Likewise.
	* targets.c (bfd_elf32_shlvxworks_vec): Declare.
	(bfd_elf32_shvxworks_vec): Likewise.
	(_bfd_target_vector): Include bfd_elf32_shlvxworks_vec and
	bfd_elf32_shvxworks_vec.

gas/
	* config/tc-sh.c (apply_full_field_fix): New function.
	(md_apply_fix): Use it instead of md_number_to_chars.  Do not fill
	in fx_addnumber for BFD_RELOC_32_PLT_PCREL.
	(tc_gen_reloc): Use fx_addnumber rather than 0 as the default case.
	* config/tc-sh.h (TARGET_FORMAT): Override for TE_VXWORKS.

ld/
2006-08-02  Richard Sandiford  <richard@codesourcery.com>
	    Kazu Hirata  <kazu@codesourcery.com>
	    Phil Edwards  <phil@codesourcery.com>

	* Makefile.am (ALL_EMULATIONS): Add eshelf_vxworks.o and
	eshlelf_vxworks.o.
	(eshelf_vxworks.c, eshlelf_vxworks.c): New rules.
	* Makefile.in: Regenerate.
	* configure.tgt (sh-*-vxworks): Use shelf_vxworks and
	shlelf_vxworks.
	* emulparams/shelf_vxworks.sh: New file.
	* emulparams/shlelf_vxworks.sh: Likewise.
	* emulparams/vxworks.sh (FINI): Prefix _etext with ${SYMPREFIX}.
	(OTHER_END_SYMBOLS): Likewise _ehdr.
	(DATA_END_SYMBOLS): Likewise _edata.
	* emultempl/vxworks.em (vxworks_after_open): Check whether output_bfd
	is indeed an ELF file before dealing with --force-dynamic.

ld/testsuite/
	* ld-sh/rd-sh.exp: Treat vxworks1-static.d specially.
	* ld-sh/sh-vxworks.exp: New file.
	* ld-sh/sh.exp: Extend sh-linux SIZEOF_HEADERS handling to
	sh-*-vxworks.
	* ld-sh/vxworks1-le.dd, ld-sh/vxworks1-lib-le.dd,
	* ld-sh/vxworks1-lib.dd, ld-sh/vxworks1-lib.nd,
	* ld-sh/vxworks1-lib.rd, ld-sh/vxworks1-lib.s,
	* ld-sh/vxworks1-static.d, ld-sh/vxworks1.dd,
	* ld-sh/vxworks1.ld, ld-sh/vxworks1.rd, ld-sh/vxworks1.s,
	* ld-sh/vxworks2-static.sd, ld-sh/vxworks2.s,
	* ld-sh/vxworks2.sd, ld-sh/vxworks3-le.dd,
	* ld-sh/vxworks3-lib-le.dd, ld-sh/vxworks3-lib.dd,
	* ld-sh/vxworks3-lib.s, ld-sh/vxworks3.dd, ld-sh/vxworks3.s,
	* ld-sh/vxworks4.d, ld-sh/vxworks4a.s, ld-sh/vxworks4b.s,
	* ld-sh/reloc1.s, ld-sh/reloc1.d: New tests.
2006-08-04 13:13:56 +00:00
..
aout_gnu.h
atof-ieee.c
atof-vax.c
bfin-aux.h
bfin-defs.h remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
bfin-lex.l remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
bfin-parse.y remove some duplicate #include's. 2006-06-07 11:27:58 +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 * config/obj-coff.c, config/tc-arm.c, config/tc-bfin.c, 2006-04-23 22:12:43 +00:00
obj-coff.h remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
obj-ecoff.c
obj-ecoff.h
obj-elf.c 2006-05-05 H.J. Lu <hongjiu.lu@intel.com> 2006-05-05 18:24:45 +00:00
obj-elf.h remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
obj-evax.c
obj-evax.h
obj-multi.c
obj-multi.h
obj-som.c
obj-som.h remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-alpha.c
tc-alpha.h
tc-arc.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-arc.h
tc-arm.c gas: 2006-08-03 15:59:00 +00:00
tc-arm.h * config/tc-arm.c, config/tc-arm.h (tc_arm_regname_to_dw2regnum): 2006-05-19 11:26:11 +00:00
tc-avr.c * config/tc-avr.c (mcu_types): Add support for atmega165p, atmega169p 2006-06-19 16:58:29 +00:00
tc-avr.h Add support for AVR6 family 2006-05-24 07:36:12 +00:00
tc-bfin.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-bfin.h Commit the missing bits of my last patch. 2006-05-23 04:56:56 +00:00
tc-cris.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-cris.h
tc-crx.c * config/obj-coff.c, config/tc-arm.c, config/tc-bfin.c, 2006-04-23 22:12:43 +00:00
tc-crx.h
tc-d10v.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-d10v.h
tc-d30v.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-d30v.h
tc-dlx.c
tc-dlx.h remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-fr30.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-fr30.h
tc-frv.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-frv.h
tc-generic.c
tc-generic.h
tc-h8300.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-h8300.h
tc-hppa.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-hppa.h Add TLS support for hppa-linux 2006-05-24 11:05:42 +00:00
tc-i370.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-i370.h
tc-i386.c PR binutils/2983 2006-08-02 16:25:14 +00:00
tc-i386.h PR binutils/2983 2006-08-02 16:25:14 +00:00
tc-i860.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-i860.h
tc-i960.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-i960.h
tc-ia64.c 2006-05-02 H.J. Lu <hongjiu.lu@intel.com> 2006-05-02 13:34:26 +00:00
tc-ia64.h
tc-ip2k.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-ip2k.h
tc-iq2000.c * config/tc-iq2000.c: Include sb.h. 2006-06-09 03:42:25 +00:00
tc-iq2000.h
tc-m32c.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-m32c.h [include/elf] 2006-02-24 22:10:36 +00:00
tc-m32r.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-m32r.h
tc-m68hc11.c PR binutils/2877 2006-07-06 10:34:02 +00:00
tc-m68hc11.h
tc-m68k.c * config/tc-arm.c, config/tc-arm.h (tc_arm_regname_to_dw2regnum): 2006-05-19 11:26:11 +00:00
tc-m68k.h * config/tc-arm.c, config/tc-arm.h (tc_arm_regname_to_dw2regnum): 2006-05-19 11:26:11 +00:00
tc-m68851.h
tc-maxq.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-maxq.h * config/obj-coff.c, config/tc-arm.c, config/tc-bfin.c, 2006-04-23 22:12:43 +00:00
tc-mcore.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-mcore.h
tc-mips.c * config/tc-mips.c (md_section_align): Check ELF-ness at runtime. 2006-08-01 07:58:22 +00:00
tc-mips.h * config/tc-mips.h (TC_SEGMENT_INFO_TYPE): Declare per-segment 2006-06-23 16:26:13 +00:00
tc-mmix.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-mmix.h
tc-mn10200.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-mn10200.h
tc-mn10300.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-mn10300.h
tc-msp430.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-msp430.h
tc-mt.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-mt.h
tc-ns32k.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-ns32k.h
tc-openrisc.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-openrisc.h
tc-or32.c
tc-or32.h
tc-pdp11.c
tc-pdp11.h
tc-pj.c
tc-pj.h
tc-ppc.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-ppc.h * config/tc-arm.c, config/tc-arm.h (tc_arm_regname_to_dw2regnum): 2006-05-19 11:26:11 +00:00
tc-s390.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-s390.h * config/tc-arm.c, config/tc-arm.h (tc_arm_regname_to_dw2regnum): 2006-05-19 11:26:11 +00:00
tc-sh64.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-sh64.h
tc-sh.c bfd/ 2006-08-04 13:13:56 +00:00
tc-sh.h bfd/ 2006-08-04 13:13:56 +00:00
tc-sparc.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-sparc.h * config/tc-arm.c, config/tc-arm.h (tc_arm_regname_to_dw2regnum): 2006-05-19 11:26:11 +00:00
tc-tic4x.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-tic4x.h
tc-tic30.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-tic30.h
tc-tic54x.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-tic54x.h
tc-v850.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-v850.h
tc-vax.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-vax.h * config/tc-vax.c: Update copyright year. 2006-03-18 11:23:38 +00:00
tc-xc16x.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-xc16x.h * config/tc-xc16x.h (TC_LINKRELAX_FIXUP): Delete. 2006-04-18 09:50:08 +00:00
tc-xstormy16.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-xstormy16.h
tc-xtensa.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-xtensa.h * config/xtensa-istack.h (TInsn): Remove record_fix and sub_symbol 2006-01-31 19:36:57 +00:00
tc-z8k.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-z8k.h
tc-z80.c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
tc-z80.h removed z80_optimize_expr; redundant since 2006-04-04 2006-04-09 18:08:08 +00:00
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-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 * config/xtensa-istack.h (TInsn): Remove record_fix and sub_symbol 2006-01-31 19:36:57 +00:00
xtensa-relax.c * config/xtensa-relax.c (widen_spec_list): Use new "WIDE.<opcode>" 2006-04-25 17:11:10 +00:00
xtensa-relax.h