Commit Graph

58909 Commits

Author SHA1 Message Date
Dave Anglin 7be6775552 * solib-pa64.c (pa64_solib_create_inferior_hook): Don't set
DT_HP_DEBUG_PRIVATE.  Add warning if DT_HP_DEBUG_PRIVATE is not set.
	Revise comment.
	(pa64_current_sos): Remove map private warning warning.
	* solib-som.c: Include string.h and sys/utsname.h.
	(get_hpux_major_release): New function.
	(som_solib_create_inferior_hook): Read dynamic linker header.  Warn
	about shared library private mapping on HP-UX 11 and later.  Only force
	private mapping of shared libraries on HP-UX 10 and earlier.
	(link_map_start): Delete warning.
2008-08-09 18:21:59 +00:00
H.J. Lu e0c6219855 2008-08-09 Xuepeng Guo <xuepeng.guo@intel.com>
H.J. Lu  <hongjiu.lu@intel.com>
	    Mark Kettenis <kettenis@gnu.org>

	* amd64-tdep.c (amd64_frame_cache): Add saved_sp_reg.
	(amd64_init_frame_cache): Initialize saved_sp_reg.
	(amd64_analyze_stack_align): New.
	(amd64_analyze_prologue): Call it.
	(amd64_frame_cache): Use saved_sp_reg if it is invalid.  Don't set
	%rip to 8 when halfway aligning the stack.

	* amd64-tdep.h (amd64_regnum): Add AMD64_R9_REGNUM to
	AMD64_R14_REGNUM.

	* i386-tdep.c (i386_frame_cache): Remove stack_align.  Add
	saved_sp_reg.
	(i386_alloc_frame_cache): Remove stack_align.  Initialize
	saved_sp_reg to -1.
	(i386_analyze_stack_align): Rewrite.
	(i386_frame_cache): Use saved_sp_reg if it is valid.
2008-08-09 16:27:39 +00:00
Alan Modra 216ff8b48e PR 6615
* rename.c (smart_rename): Punctuate error messages.
2008-08-09 13:05:11 +00:00
Ulrich Weigand b9db4cedff * target.c: Include "solib.h".
(target_pre_inferior): Call no_shared_libraries.
	* infcmd.c (run_command_1): Do not call objfile_purge_solibs
	or clear_solib.
	(attach_command): Do not call clear_solib.
2008-08-09 12:15:10 +00:00
Alan Modra a8caa2450b PR 6753
* ldmain.c (check_for_scripts_dir, set_scripts_dir): Delete.
	(main): Don't set_scripts_dir here.
	* ldfile.c (check_for_scripts_dir, find_scripts_dir): New functions,
	largely based on ldmain.c versions.
	(ldfile_find_command_file): Set up search in script dir here without
	affecting library search.
	* Makefile.am (ldmain.o): No need to define SCRIPTDIR.
	(ldfile.o): New rule.
	* Makefile.in: Regenerate.
2008-08-09 10:15:39 +00:00
Mark Kettenis 3979a37f37 * i386obsd-nat.c (i386obsd_supply_pcb): Supply the right bytes for
the %eip register.
2008-08-09 08:15:26 +00:00
Eric B. Weddington 7b21ac3f45 Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
	* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
	bfd_mach_avr51): New.
	* bfd-in2.h: Regenerate.
	* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
	architectures. Change comments to match architecture comments in GCC.
	(compatible): Add test for new AVR architectures.
	* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
	bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
	(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
	E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.

gas/
	* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
	architectures. Reorganize list to put mcu types in correct architectures
	and to order list same as in GCC. Use new ISA definitions in
	include/opcode/avr.h.
	* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
	descriptions. Reorganize descriptions to put mcu types in correct
	architectures and to order lists same as in GCC.

include/
	* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
	E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
	(EF_AVR_MACH): Redefine to 0x7F.
	* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
	(AVR_ISA_AVR3): Redefine.
	(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
	AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
	AVR_ISA_AVR6): Define.

ld/
	* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
	and eavr51.o.
	Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
	* Makefile.in: Regenerate.
	* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
	and avr51.
	* emulparams/avr25.sh: New file.
	* emulparams/avr31.sh: New file.
	* emulparams/avr35.sh: New file.
	* emulparams/avr51.sh: New file.
2008-08-09 05:35:13 +00:00
gdbadmin 4baacaa877 *** empty log message *** 2008-08-09 00:00:33 +00:00
Alan Modra 1838c6143a daily update 2008-08-09 00:00:05 +00:00
Daniel Jacobowitz 861fb55ab5 2008-08-08 Richard Sandiford <rdsandiford@googlemail.com>
Daniel Jacobowitz  <dan@codesourcery.com>
	    Catherine Moore  <clm@codesourcery.com>
	    Mark Shinwell  <shinwell@codesourcery.com>
	    Maxim Kuvyrkov  <maxim@codesourcery.com>

	* elf32-mips.c (mips_vxworks_copy_howto_rela): Replace with...
	(elf_mips_copy_howto): ...this howto.  Clear the size fields.
	(mips_vxworks_jump_slot_howto_rela): Replace with...
	(elf_mips_jump_slot_howto): ...this howto.
	(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
	and BFD_RELOC_MIPS_JUMP_SLOT.
	(bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
	"R_MIPS_JUMP_SLOT".
	(mips_elf32_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
	(elf_backend_plt_readonly): Define.
	(elf_backend_plt_sym_val): Define for non-VxWorks targets.
	(mips_vxworks_bfd_reloc_type_lookup): Delete.
	(mips_vxworks_bfd_reloc_name_lookup): Likewise.
	(mips_vxworks_rtype_to_howto): Likewise.
	(elf_backend_want_dynbss): Don't define for VxWorks.
	(elf_backend_plt_readonly): Likewise.
	(bfd_elf32_bfd_reloc_type_lookup): Likewise.
	(bfd_elf32_bfd_reloc_name_lookup): Likewise.
	(elf_backend_mips_rtype_to_howto): Likewise.
	(elf_backend_adjust_dynamic_symbol): Likewise.
	(elf_backend_got_symbol_offset): Don't define.
	* elfn32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
	(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
	and BFD_RELOC_MIPS_JUMP_SLOT.
	(bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
	"R_MIPS_JUMP_SLOT".
	(mips_elf32_n32_rtype_to_howto): Handle R_MIPS_COPY and
	R_MIPS_JUMP_SLOT.
	(elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
	(elf_backend_plt_sym_val): Define.
	* elf64-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
	(bfd_elf64_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
	and BFD_RELOC_MIPS_JUMP_SLOT.
	(bfd_elf64_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
	"R_MIPS_JUMP_SLOT".
	(mips_elf64_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
	(elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
	(elf_backend_plt_sym_val): Define.
	* elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Delete.
	(_bfd_mips_elf_use_plts_and_copy_relocs, _bfd_mips_elf_init_stubs)
	(_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): Declare.
	* elfxx-mips.c (mips_elf_la25_stub): New structure.
	(LA25_LUI, LA25_J, LA25_ADDIU): New macros.
	(mips_elf_link_hash_entry): Add "la25_stubs", "has_static_relocs"
	and "has_nonpic_branches" fields.  Remove "is_relocation_target" and
	"is_branch_target".
	(mips_elf_link_hash_table): Add blank lines.  Add
	"use_plts_and_copy_relocs", "reserved_gotno", "strampoline",
	"la25_stubs" and "add_stub_section" fields.
	(mips_htab_traverse_info): New structure.
	(PIC_OBJECT_P, MIPS_ELF_LOAD_WORD): New macros.
	(MIPS_RESERVED_GOTNO): Delete.
	(mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry)
	(mips_n64_exec_plt0_entry, mips_exec_plt_entry): New tables.
	(mips_elf_link_hash_newfunc): Update after the changes to
	mips_elf_link_hash_entry.
	(mips_elf_check_mips16_stubs): Replace the DATA parameter with
	an INFO parameter.  Don't look through warnings symbols here;
	do it in mips_elf_check_symbols instead.
	(mips_elf_create_stub_symbol): New function.
	(mips_elf_la25_stub_hash, mips_elf_la25_stub_eq): New functions.
	(_bfd_mips_elf_init_stubs, mips_elf_local_pic_function_p): Likewise.
	(mips_elf_add_la25_intro, mips_elf_add_la25_trampoline): Likewise.
	(mips_elf_add_la25_stub, mips_elf_check_symbols): New functions.
	(mips_elf_gotplt_index): Check for VxWorks.
	(mips_elf_output_dynamic_relocation): Take the relocation index
	as an extra parameter.  Do not increment reloc_count here.
	(mips_elf_initialize_tls_slots): Update the calls to
	mips_elf_output_dynamic_relocation accordingly.
	(mips_elf_multi_got): Use htab->reserved_gotno instead of
	MIPS_RESERVED_GOTNO.
	(mips_elf_create_got_section): Don't allocate reserved GOT
	entries here.  Unconditionally create .got.plt, but don't
	set its alignment here.
	(mips_elf_relocation_needs_la25_stub): New function.
	(mips_elf_calculate_relocation): Redirect branches and jumps to
	a non-PIC stub if one exists.  Check !h->has_static_relocs instead
	of !htab->is_vxworks when deciding whether to create dynamic
	relocations for R_MIPS_32, R_MIPS_REL32 and R_MIPS_64.
	(_bfd_mips_elf_create_dynamic_sections): Unconditionally call
	_bfd_elf_create_dynamic_sections.  Unconditionally set up
	htab->splt and htab->sdynbss.  Set htab->srelplt to ".rel.plt"
	if !htab->is_vxworks.  Add non-VxWorks values of
	htab->plt_header_size and htab->plt_entry_size.
	(_bfd_mips_elf_check_relocs): Set pointer_equality_needed for
	non-branch static relocations.  Set has_nonpic_branches when an la25
	stub might be required.  Set can_make_dynamic_p to TRUE if R_MIPS_32,
	R_MIPS_REL32 and R_MIPS_64 relocations can be made dynamic,
	rather than duplicating the condition.  Do not make them dynamic
	for read-only sections in non-PIC executable objects.
	Do not protect this code with dynobj == NULL || htab->sgot == NULL;
	handle each group of cases separately.  Add a default case that
	sets has_static_relocs for non-GOT relocations that cannot be
	made dynamic.  Don't set is_relocation_target and is_branch_target.
	Reject non-PIC static relocations in shared objects.
	(_bfd_mips_vxworks_adjust_dynamic_symbol): Fold into...
	(_bfd_mips_elf_adjust_dynamic_symbol): ...here, using
	htab->use_plts_and_copy_relocs instead of htab->is_vxworks
	to select PLT and copy-reloc handling.  Set the alignment of
	.plt and .got.plt when allocating the first entry.  Generalize
	code to handle REL as well as RELA sections and 64-bit as well as
	32-bit GOT entries.  Complain if we find a static-only reloc
	against an externally-defined symbol and if we cannot create
	dynamic relocations for it.  Allocate copy relocs using
	mips_elf_allocate_dynamic_relocations on non-VxWorks targets.
	Set possibly_dynamic_relocs to 0 when using PLTs or copy relocs.
	Skip reserved .got.plt entries.
	(_bfd_mips_elf_always_size_sections): Use mips_elf_check_symbols
	instead of mips_elf_check_mips16_stubs to process each symbol.
	Do the traversal for relocatable objects too.
	(mips_elf_lay_out_got): Use htab->reserved_gotno instead of
	MIPS_RESERVED_GOTNO.
	(_bfd_mips_elf_size_dynamic_sections): Exclude sdynbss if it
	is empty.  Extend the DT_PLTREL, DT_JMPREL and DT_PLTRELSZ handling
	to non-VxWorks targets.  Only add DT_REL{,A}, DT_REL{,A}SZ and
	DT_REL{,A}ENT if .rel.dyn is nonempty.  Create a symbol for the
	PLT.  Allocate a nop at the end of the PLT.  Allocate DT_MIPS_PLTGOT.
	(mips_elf_create_la25_stub_info): New function.
	(_bfd_mips_elf_finish_dynamic_symbol): Write out PLT entries
	and copy relocs where necessary.  Check pointer_equality_needed.
	(mips_finish_exec_plt): New function.
	(_bfd_mips_elf_finish_dynamic_sections): Always set DT_PLTGOT
	to the beginning of htab->sgot.  Use htab->reserved_gotno instead
	of MIPS_RESERVED_GOTNO.  Assert htab->use_plts_and_copy_relocs
	instead of htab->is_vxworks for DT_PLTREL, DT_PLTRELSZ and DT_JMPREL.
	Set DT_PLTREL to DT_REL instead of DT_RELA on non-VxWorks targets.
	Use mips_finish_exec_plt to create non-VxWorks PLT headers.  Set
	DT_MIPS_PLTGOT.
	(_bfd_mips_elf_copy_indirect_symbol): Copy has_static_relocs
	from the indirect symbol to the direct symbol.  Also copy
	has_nonpic_branches for indirect symbols.
	(_bfd_mips_elf_get_target_dtag): Handle DT_MIPS_PLTGOT and
	DT_MIPS_RWPLT.
	(_bfd_mips_elf_link_hash_table_create): Initialize the new
	mips_elf_link_hash_table fields.
	(_bfd_mips_vxworks_link_hash_table_create): Set
	use_plts_and_copy_relocs to TRUE.  Use TRUE rather than 1
	when setting is_vxworks.
	(_bfd_mips_elf_use_plts_and_copy_relocs): New function.
	(_bfd_mips_elf_final_link): Call mips_elf_create_la25_stub for
	each la25_stub.
	(_bfd_mips_elf_merge_private_bfd_data): Treat dynamic objects
	as PIC.  Generalize message about linking PIC and non-PIC.
	(_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): New
	functions.
	* reloc.c: Update comment near BFD_RELOC_MIPS_JUMP_SLOT.
	* bfd-in2.h: Regenerated.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>
	    Catherine Moore  <clm@codesourcery.com>
	    Mark Shinwell  <shinwell@codesourcery.com>

	* readelf.c (get_mips_symbol_other): Handle STO_MIPS_PLT and
	STO_MIPS_PIC.
	(slurp_rela_relocs, slurp_rel_relocs): Handle MIPS ELF64 here.
	(dump_relocations, debug_apply_relocations): Don't handle it here.
	(get_mips_dynamic_type): Handle DT_MIPS_PLTGOT and DT_MIPS_RWPLT.
	(print_mips_pltgot_entry): New function.
	(process_mips_specific): Dump the PLT GOT.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* config/tc-mips.c (OPTION_CALL_NONPIC): New macro.
	(OPTION_NON_SHARED, OPTION_XGOT, OPTION_MABI, OPTION_32)
	(OPTION_N32, OPTION_64, OPTION_MDEBUG, OPTION_NO_MDEBUG)
	(OPTION_PDR, OPTION_NO_PDR, OPTION_MVXWORKS_PIC): Bump by 1.
	(md_longopts): Add -call_nonpic.
	(md_parse_option): Handle OPTION_CALL_NONPIC.
	(md_show_usage): Add -call_nonpic.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>

	* gas/mips/call-nonpic-1.s, gas/mips/call-nonpic-1.d: New test.
	* gas/mips/mips.exp: Run it.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>
	    Catherine Moore  <clm@codesourcery.com>
	    Mark Shinwell  <shinwell@codesourcery.com>

	* mips.h (STO_MIPS_PLT, ELF_ST_IS_MIPS_PLT, ELF_ST_SET_MIPS_PLT)
	(STO_MIPS_PIC, DT_MIPS_PLTGOT, DT_MIPS_RWPLT): New macros.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* emulparams/elf32bmip.sh (GOT): Define, moving .got.plt to...
	(OTHER_RELRO_SECTIONS, OTHER_READWRITE_SECTIONS): ...one of these
	two variables.
	* emulparams/elf32bmipn32-defs.sh: Likewise.
	* emultempl/mipself.em: Include ldctor.h, elf/mips.h and elfxx-mips.h.
	(is_mips_elf): New macro.
	(stub_file, stub_bfd): New variables.
	(hook_stub_info): New structure.
	(hook_in_stub): New function.
	(mips_add_stub_section): Likewise.
	(mips_create_output_section_statements): Likewise.
	(mips_before_allocation): Likewise.
	(real_func): New variable.
	(mips_for_each_input_file_wrapper): New function.
	(mips_lang_for_each_input_file): Likewise.
	(lang_for_each_input_file): Define.
	(LDEMUL_BEFORE_ALLOCATION): Likewise.
	(LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Likewise.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* ld-mips-elf/mips16-pic-3a.s,
	ld-mips-elf/mips16-pic-3b.s,
	ld-mips-elf/mips16-pic-3.dd,
	ld-mips-elf/mips16-pic-3.gd,
	ld-mips-elf/mips16-pic-3.rd,
	ld-mips-elf/mips16-pic-3.inc,
	ld-mips-elf/pic-and-nonpic-1a.s,
	ld-mips-elf/pic-and-nonpic-1b.s,
	ld-mips-elf/pic-and-nonpic-1.ld,
	ld-mips-elf/pic-and-nonpic-1.dd,
	ld-mips-elf/pic-and-nonpic-1.nd,
	ld-mips-elf/pic-and-nonpic-1-rel.dd,
	ld-mips-elf/pic-and-nonpic-1-rel.nd,
	ld-mips-elf/pic-and-nonpic-2a.s,
	ld-mips-elf/pic-and-nonpic-2b.s,
	ld-mips-elf/pic-and-nonpic-2.d,
	ld-mips-elf/pic-and-nonpic-3a.s,
	ld-mips-elf/pic-and-nonpic-3a.ld,
	ld-mips-elf/pic-and-nonpic-3a.dd,
	ld-mips-elf/pic-and-nonpic-3a.gd,
	ld-mips-elf/pic-and-nonpic-3a.sd,
	ld-mips-elf/pic-and-nonpic-3b.s,
	ld-mips-elf/pic-and-nonpic-3b.ld,
	ld-mips-elf/pic-and-nonpic-3b.ad,
	ld-mips-elf/pic-and-nonpic-3b.dd,
	ld-mips-elf/pic-and-nonpic-3b.gd,
	ld-mips-elf/pic-and-nonpic-3b.nd,
	ld-mips-elf/pic-and-nonpic-3b.pd,
	ld-mips-elf/pic-and-nonpic-3b.rd,
	ld-mips-elf/pic-and-nonpic-3b.sd,
	ld-mips-elf/pic-and-nonpic-3-error.d,
	ld-mips-elf/pic-and-nonpic-4a.s,
	ld-mips-elf/pic-and-nonpic-4b.s,
	ld-mips-elf/pic-and-nonpic-4b.ld,
	ld-mips-elf/pic-and-nonpic-4b.ad,
	ld-mips-elf/pic-and-nonpic-4b.dd,
	ld-mips-elf/pic-and-nonpic-4b.gd,
	ld-mips-elf/pic-and-nonpic-4b.nd,
	ld-mips-elf/pic-and-nonpic-4b.rd,
	ld-mips-elf/pic-and-nonpic-4b.sd,
	ld-mips-elf/pic-and-nonpic-4-error.d,
	ld-mips-elf/pic-and-nonpic-5a.s,
	ld-mips-elf/pic-and-nonpic-5b.s,
	ld-mips-elf/pic-and-nonpic-5b.ld,
	ld-mips-elf/pic-and-nonpic-5b.ad,
	ld-mips-elf/pic-and-nonpic-5b.dd,
	ld-mips-elf/pic-and-nonpic-5b.gd,
	ld-mips-elf/pic-and-nonpic-5b.nd,
	ld-mips-elf/pic-and-nonpic-5b.rd,
	ld-mips-elf/pic-and-nonpic-5b.sd,
	ld-mips-elf/pic-and-nonpic-5b.pd,
	ld-mips-elf/pic-and-nonpic-6.ld,
	ld-mips-elf/pic-and-nonpic-6-o32a.s,
	ld-mips-elf/pic-and-nonpic-6-o32b.s,
	ld-mips-elf/pic-and-nonpic-6-o32c.s,
	ld-mips-elf/pic-and-nonpic-6-o32.ad,
	ld-mips-elf/pic-and-nonpic-6-o32.dd,
	ld-mips-elf/pic-and-nonpic-6-o32.gd,
	ld-mips-elf/pic-and-nonpic-6-o32.nd,
	ld-mips-elf/pic-and-nonpic-6-o32.pd,
	ld-mips-elf/pic-and-nonpic-6-o32.rd,
	ld-mips-elf/pic-and-nonpic-6-o32.sd,
	ld-mips-elf/pic-and-nonpic-6-n32a.s,
	ld-mips-elf/pic-and-nonpic-6-n32b.s,
	ld-mips-elf/pic-and-nonpic-6-n32c.s,
	ld-mips-elf/pic-and-nonpic-6-n32.ad,
	ld-mips-elf/pic-and-nonpic-6-n32.dd,
	ld-mips-elf/pic-and-nonpic-6-n32.gd,
	ld-mips-elf/pic-and-nonpic-6-n32.nd,
	ld-mips-elf/pic-and-nonpic-6-n32.pd,
	ld-mips-elf/pic-and-nonpic-6-n32.rd,
	ld-mips-elf/pic-and-nonpic-6-n32.sd,
	ld-mips-elf/pic-and-nonpic-6-n64a.s,
	ld-mips-elf/pic-and-nonpic-6-n64b.s,
	ld-mips-elf/pic-and-nonpic-6-n64c.s,
	ld-mips-elf/pic-and-nonpic-6-n64.ad,
	ld-mips-elf/pic-and-nonpic-6-n64.dd,
	ld-mips-elf/pic-and-nonpic-6-n64.gd,
	ld-mips-elf/pic-and-nonpic-6-n64.nd,
	ld-mips-elf/pic-and-nonpic-6-n64.pd,
	ld-mips-elf/pic-and-nonpic-6-n64.rd,
	ld-mips-elf/pic-and-nonpic-6-n64.sd: New tests.
	* ld-mips-elf/mips-elf.exp: Run them.
2008-08-08 19:24:49 +00:00
Bob Wilson 532f93bd8e 2008-08-08 Sterling Augustine <sterling@tensilica.com>
* config/tc-xtensa.c (exclude_section_from_property_tables): New.
	(xtensa_create_property_segments): Use it.
	(xtensa_create_xproperty_segments): Likewise.
2008-08-08 18:21:26 +00:00
Tom Tromey 2b26d9faa9 * Makefile.in (python.o): Remove dependencies. Use COMPILE and
POSTCOMPILE.
	(python-utils.o): Likewise.
2008-08-08 17:38:35 +00:00
Paul Pluzhnikov c814a4f300 gdb.base/args.exp: Prevent ~/.gdbinit from affecting test. 2008-08-08 17:17:02 +00:00
Andreas Schwab f164887602 (_initialize_core): Remove spurious paren from set
gnutarget doc string.
2008-08-08 16:47:02 +00:00
Luis Machado b7622095eb * ppc-linux-nat.c: Include "auxv.h" and "elf/common.h".
Define PPC_FEATURE_BOOKE.
	(ppc_linux_get_hwcap): New function.
	(ppc_linux_region_ok_for_hw_watchpoint): Handle PowerPC 440
	4-bytes alignment restrictions.
	(ppc_linux_insert_watchpoint): Handle PowerPC 440-specific
	positioning of the read/write flags.
	(ppc_linux_watchpoint_addr_within_range): Handle PowerPC 440
	4-bytes alignment.
2008-08-08 15:30:27 +00:00
Pedro Alves 2dc38344f4 Use ptid_t.tid to store thread ids instead of ptid_t.pid.
* win32-nat.c (win32_add_thread): Change thread argument type to
	ptid_t.  Adjust.
	(win32_add_thread): Adjust.
	(win32_delete_thread): Change thread argument type to ptid_t.
	Adjust.
	(win32_fetch_inferior_registers, win32_store_inferior_registers)
	(win32_resume, get_win32_debug_event, get_win32_debug_event)
	(win32_wait, win32_pid_to_exec_file, win32_pid_to_str): Adjust.
	(init_win32_ops): Put to_magic last.
	(win32_win32_thread_alive): Adjust.
2008-08-08 13:16:17 +00:00
Alan Modra 85a8226582 * readelf.c (is_64bit_abs_reloc): Return true for R_MIPS_64. 2008-08-08 08:08:33 +00:00
Alan Modra a26cc96746 * ldfile.c (ldfile_open_file_search): Use concat.
(try_open): Don't use a fixed size pathname buffer.
	(ldfile_find_command_file): Likewise.
	* emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): If
	using EXTRA_SHLIB_EXTENSION, don't open twice.
2008-08-08 08:06:16 +00:00
Alan Modra 4dd07732f2 * elf.c (bfd_elf_get_elf_syms): Don't leak memory on error.
* elflink.c (_bfd_elf_link_read_relocs): bfd_release on error.
	(elf_link_add_object_symbols): Don't leak memory on error.
	(bfd_elf_size_dynsym_hash_dynstr): Likewise.
	(elf_fixup_link_order): Free sections.
2008-08-08 08:00:14 +00:00
Alan Modra c3c3645668 * doc/internals.texi (DWARF2_FORMAT): Update for 2008-08-04 change. 2008-08-08 07:38:49 +00:00
Pedro Alves 4d6c6261a1 * remote-m32r-sdi.c (m32r_thread_alive, m32r_pid_to_str): New.
(init_m32r_ops): Register m32r_thread_alive and m32r_pid_to_str.
2008-08-08 02:45:11 +00:00
Pedro Alves e5ef4d7558 * remote-m32r-sdi.c: Include "gdbthread.h".
(remote_m32r_ptid): New.
	(m32r_close): Delete the main thread.
	(m32r_resume): Set inferior_ptid toA remote_m32r_ptid. Add the
	main thread.
	(m32r_kill, m32r_load, sdireset_command): Delete the main thread.
	(_initialize_remote_m32r): Initialize remote_m32r_ptid.
2008-08-08 02:34:10 +00:00
Alan Modra e052e70470 daily update 2008-08-08 00:00:06 +00:00
gdbadmin b45268f947 *** empty log message *** 2008-08-08 00:00:03 +00:00
Ralf Wildenhues a417dc5696 gdb/
* aclocal.m4, configure: Rebuild.
	* configure.in: Call ZW_CREATE_DEPDIR,
	ZW_PROG_COMPILER_DEPENDENCIES, AC_PROG_MAKE_SET.
	(MAKE, GMAKE): New substs.
	* acinclude.m4: Include depstand.m4.
	* Makefile.in (DEPMODE, DEPDIR, COMPILE.post, COMPILE.pre,
	COMPILE, POSTCOMPILE, depcomp): New variables.
	Remove all _h variables.
	Remove many .o targets.
	($(srcdir)/copying.c): avoid backslash-newline after comment
	sign (@maintainer_mode_true@).
	(HFILES_NO_SRCDIR): Regenerate.
	(generated_files): New variable.
	(all_gdbtk_cflags): Likewise.
	(.c.o): Rewrote.
	(init.o, version.o, copying.o): Remove.
	(distclean): Remove DEPDIR.
	(test-cp-name-parser.o, hpux-thread.o, main.o, monitor.o,
	printcmd.o, procfs.o, v850ice.o): Rewrite.
	(cli-cmds.o, cli-decode.o, cli-dump.o, cli-interp.o, cli-logging.o,
	cli-script.o, cli-setshow.o, cli-utils.o): Likewise.
	(gdbtk.o, gdbtk-bp.o, gdbtk-cmds.o, gdbtk-hooks.o, gdbtk-interp.o,
	gdbtk-main.o, gdbtk-register.o, gdbtk-stack.o, gdbtk-varobj.o,
	gdbtk-wrapper.o): Likewise.
	(mi-cmd-break.o, mi-cmd-disas.o, mi-cmd-env.o, mi-cmd-file.o,
	mi-cmds.o, mi-cmd-stack.o, mi-cmd-target.o, mi-cmd-var.o,
	mi-console.o, mi-getopt.o, mi-interp.o, mi-main.o, mi-out.o,
	mi-parse.o, mi-symbol-cmds.o, mi-common.o, signals.o, tui.o,
	tui-command.o, tui-data.o, tui-disasm.o, tui-file.o, tui-hooks.o,
	tui-interp.o, tui-io.o, tui-layout.o, tui-main.o, tui-out.o,
	tui-regs.o, tui-source.o, tui-stack.o, tui-win.o, tui-windata.o,
	tui-wingeneral.o, tui-winsource.o): Likewise.
	(all_object_files): New variable.
	($(all_object_files)): New target.
	Include dependency files, when using GNU Make.

gdb/gdbserver/
	* Makefile.in (GDBREPLAY_OBS): New variable.
	(gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2008-08-07 22:49:10 +00:00
Ulrich Weigand 12ab8a602f ChangeLog:
* spu-tdep.c (info_spu_dma_cmdlist): Only show entries with
	the valid bit set.  Ensure display order respects partial
	order defined by dependency bits.

testsuite/ChangeLog:

	* gdb.arch/spu-info.exp: Updated for "info spu dma" changes.
2008-08-07 21:25:28 +00:00
Richard Sandiford d35fd65983 bfd/
* elf-bfd.h (elf_backend_data): Add a "rela_plts_and_copies_p" field.
	* elfxx-target.h (elf_backend_rela_plts_and_copies_p): New macro.
	(elfNN_bed): Use it.
	* elf.c (_bfd_elf_get_synthetic_symtab): Use rela_plts_and_copies_p
	instead of default_use_rela_p to choose between ".rel.plt" and
	".rela.plt".
	* elflink.c (_bfd_elf_create_dynamic_sections): Use
	rela_plts_and_copies_p instead of default_use_rela_p to choose
	between ".rel.plt" and ".rela.plt", and between ".rel.bss" and
	".rela.bss".
2008-08-07 20:04:32 +00:00
Richard Sandiford d5eaccd71d bfd/
* elf-bfd.h (MIPS_ELF_TDATA): New elf_object_id.
	* elf32-mips.c (bfd_elf32_mkobject): Define.
	* elf64-mips.c (bfd_elf64_mkobject): Likewise.
	* elfn32-mips.c (bfd_elf32_mkobject): Likewise.
	* elfxx-mips.h (_bfd_mips_elf_mkobject): Declare.
	* elfxx-mips.c (is_mips_elf): New macro.
	(_bfd_mips_elf_mkobject): New function.
	(_bfd_mips_elf_final_link): Use is_mips_elf.
	(_bfd_mips_elf_merge_private_bfd_data): Likewise.
2008-08-07 20:03:25 +00:00
Richard Sandiford aff469fa8d bfd/
* elfxx-mips.c (mips_elf_record_relocs): Defer allocation of a
	global GOT entry when deferring allocation of dynamic relocations.
	(allocate_dynrelocs): When allocating deferred dynamic relocations,
	also do the deferred allocation of a GOT entry.
2008-08-07 20:01:38 +00:00
Richard Sandiford 23cc69b663 bfd/
* elfxx-mips.c (mips_got_info): Add a "reloc_only_gotno" field.
	(mips_elf_got_section): Delete.
	(mips_elf_sort_hash_table): Use g->reloc_only_gotno to decide
	how many reloc-only entries there are.
	(mips_elf_count_got_symbols): Adjust g->reloc_only_gotno as
	well as g->global_gotno.
	(mips_elf_make_got_per_bfd): Initialize reloc_only_gotno.
	(mips_elf_multi_got): Likewise.  Use gg->reloc_only_gotno
	rather than gg->assigned_gotno to store the number of
	reloc-only GOT entries.
	(mips_elf_create_got_section): Remove the MAYBE_EXCLUDE parameter.
	Initialize reloc_only_gotno.
	(mips_elf_calculate_relocation): Check htab->got_info instead of
	dynobj when deciding whether to call mips_elf_adjust_gp,
	(_bfd_mips_elf_create_dynamic_sections): Adjust the call
	to mips_elf_create_got_section.
	(mips_elf_record_relocs): Likewise.  Remove redundant
	"dynobj == NULL" code.  Do not use mips_elf_create_got_section
	or mips_elf_record_global_got_symbol for R_MIPS_32, R_MIPS_REL32
	and R_MIPS_64; limit global_got_area to GGA_RELOC_ONLY instead.
	(_bfd_mips_elf_finish_dynamic_symbol): Use htab->sgot instead
	of mips_elf_got_section.
	(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
	(_bfd_mips_elf_finish_dynamic_sections): Likewise.
	Move the initial assignment of G to the block that uses it;
	it is used for an unrelated purpose later.

ld/testsuite/
	* ld-mips-elf/tls-hidden4.got, ld-mips-elf/tls-hidden4.r: We have
	removed an unused GOT entry that was allocated for the R_MIPS_32
	relocation against "undef", so adjust addresses down by 4 bytes.
	* ld-mips-elf/got-dump-1.d, ld-mips-elf/got-dump-2.d: We have
	changed the order of the GOT entries so that reloc-only ones
	come last.  "undef" is only referred to by dynamic relocations,
	so it now comes after "glob".
	* 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: We have
	removed two unused local GOT entries that were originally created
	as global entries for the hidden symbols "used2" and "used3".
	"used4" and "used5" are only referred to by relocations, so they
	now come after "used6" and "used7".
2008-08-07 20:01:14 +00:00
DJ Delorie bd8aab1c29 merge from gcc 2008-08-07 20:00:53 +00:00
Richard Sandiford d4596a51eb bfd/
* elfxx-mips.c (count_section_dynsyms): Move before the new first use.
	(mips_elf_sort_hash_table): Take the output bfd as a parameter.
	Remove the MAX_LOCAL parameter.  Exit early if there are no
	dynamic symbols, if there is no dynobj, or if there is no
	GOT section.  Use count_section_dynsyms instead of MAX_LOCAL.
	Assert == rather than <= when checking hsd.max_unref_got_dynindx.
	Also assert that g->global_gotno is right.
	(mips_elf_count_forced_local_got_symbols): Rename to...
	(mips_elf_count_got_symbols): ...and count global GOT entries too.
	Set the global_got_area of a forced-local GGA_RELOC_ONLY symbol
	to GGA_NONE.
	(mips_elf_multi_got): Don't sort the symbol table.
	(mips_elf_lay_out_got): Likewise.  Use mips_elf_count_got_symbols
	to count the number of global GOT entries.
	(_bfd_mips_elf_final_link): Unconditionally call
	mips_elf_sort_hash_table.
2008-08-07 19:59:16 +00:00
Richard Sandiford 634835aefb bfd/
* elfxx-mips.c (GGA_NORMAL, GGA_RELOC_ONLY, GGA_NONE): New macros.
	(mips_elf_link_hash_entry): Add a "global_got_area" field.
	(mips_elf_link_hash_newfunc): Initialize it.
	(mips_elf_sort_hash_table_f): Use h->global_got_area instead of
	h->root.got.offset.  Do not handle forced_local symbols specially.
	(mips_elf_record_global_got_symbol): Set h->global_got_area
	instead of h->root.got.offset.
	(mips_elf_recreate_got): Assert that h->global_got_area == GGA_NONE
	for indirect and warning symbols.
	(mips_elf_count_forced_local_got_symbols): Change the argument
	from a "elf_link_hash_entry" to "mips_elf_link_hash_entry".
	Use and set h->global_got_area instead of h->root.got.offset.
	Set it to GGA_NONE for all forced-local symbols.
	(mips_elf_set_global_got_offset): Set h->global_got_area
	instead of h->root.got.offset.  Use g->global_got_area instead
	of a combination of dynindx, forced_local and tls_type.
	(mips_elf_multi_got): Remove disabled code.  Pass GGA_* values to
	mips_elf_set_global_got_offset.
	(mips_elf_lay_out_got): Use mips_elf_link_hash_traverse instead
	of elf_link_hash_traverse.
	(_bfd_mips_elf_copy_indirect_symbol): Copy the indirect symbol's
	global_got_area to the direct symbol if the latter's value is higher.
	Set the indirect symbol's area to GGA_NONE.

ld/testsuite/
	* ld-mips-elf/got-vers-1a.s, ld-mips-elf/got-vers-1b.s,
	ld-mips-elf/got-vers-1.ver, ld-mips-elf/got-vers-1.dd,
	ld-mips-elf/got-vers-1.sd, ld-mips-elf/got-vers-1.rd: New tests.
	* ld-mips-elf/mips-elf.exp: Run them.
2008-08-07 19:58:38 +00:00
Richard Sandiford 33bb52fb4e bfd/
* elf32-mips.c (elf_backend_hide_symbol): Delete.
	* elfn32-mips.c (elf_backend_hide_symbol): Likewise.
	* elf64-mips.c (elf_backend_hide_symbol): Likewise.
	* elfxx-mips.h (elf_backend_hide_symbol): Likewise.
	* elfxx-mips.c (mips_elf_link_hash_entry): Remove "forced_local"
	and add "needs_lazy_stub".
	(mips_elf_link_hash_newfunc): Update accordingly.
	(mips_elf_link_hash_table): Remove "computed_got_sizes" and
	add "lazy_stub_count".
	(_bfd_mips_elf_link_hash_table_create): Update accordingly.
	(mips_elf_output_extsym): Use hd->needs_lazy_stub to detect
	cases where a lazy stub is being used.
	(mips_elf_sort_hash_table_f): Use h->root.forced_local instead
	of h->forced_local.
	(mips_elf_record_global_got_symbol): Use _bfd_elf_link_hash_hide_symbol
	instead of _bfd_mips_elf_hide_symbol.  Do not increment local_gotno
	here.
	(mips_elf_allocate_dynamic_relocations): Move before new first use.
	(mips_elf_check_recreate_got, mips_elf_recreate_got): New functions.
	(mips_elf_resolve_final_got_entries): Move earlier in file.  Make at
	most two passes over the hash table.  Use mips_elf_check_recreate_got
	to see if there are any indirect or warning entries and
	mips_elf_recreate_got to create a new GOT without them.
	Return a boolean success value.
	(mips_elf_count_forced_local_got_entries): New function.
	(mips_elf_make_got_per_bfd): Check h->root.forced_local instead of
	h->forced_local.
	(mips_elf_set_global_got_offset): Likewise.
	(mips_elf_set_no_stub): Replace with...
	(mips_elf_forbid_lazy_stubs): ...this new function.
	(mips_elf_resolve_final_got_entry): Delete.
	(mips_elf_multi_got): Fix formatting.  Use mips_elf_forbid_lazy_stubs
	instead of mips_elf_set_no_stub.  Move the code that sets
	global offsets and allocates dynamic relocations from the main
	_bfd_mips_elf_size_dynamic_sections loop to here.
	(_bfd_mips_elf_adjust_dynamic_symbol): Do not allocate room in
	.MIPS.stubs here; just set hmips->needs_lazy_stub and increment
	htab->lazy_stub_count.
	(_bfd_mips_elf_always_size_sections): Move the stub-estimation
	code to mips_elf_estimate_stub_size and the GOT-sizing code to
	mips_elf_lay_out_got.  Do not call these functions here.
	(mips_elf_estimate_stub_size): New function, split
	out from _bfd_mips_elf_always_size_sections.  Call
	mips_elf_resolve_final_got_entries earlier.  Count the number
	of forced-local entries.  Do not add stub sizes to loadable_size;
	after this patch, the stub sizes are already included in the main
	estimate.  Allocate dynamic relocations here rather than in the
	main _bfd_mips_elf_size_dynamic_sections loop.
	(mips_elf_estimate_stub_size): New function, split out from
	_bfd_mips_elf_always_size_sections.
	(mips_elf_allocate_lazy_stub): New function.
	(mips_elf_lay_out_lazy_stubs): Likewise.
	(_bfd_mips_elf_size_dynamic_sections): Call mips_elf_estimate_stub_size,
	mips_elf_lay_out_got and mips_elf_lay_out_lazy_stubs.  Do not handle
	the allocation of sreldyn specially.
	(_bfd_mips_elf_hide_symbol): Delete.

ld/testsuite/
	* ld-mips-elf/tlsdyn-o32-2.got, ld-mips-elf/tlsdyn-o32-3.got,
	ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-3.d: Change the
	GOT layout as follows:

	         BEFORE                  AFTER
	   +0x08 %call16(__tls_get_addr) %call16(__tls_get_addr)
	   +0x0c %tlsldm(tlsbin_ld)      %gottprel(tlsvar_ie)
	   +0x10   "  "                  %tlsgd(tlsvar_gd)
	   +0x14 %tlsgd(tlsvar_gd)          "  "
	   +0x18   "  "                  %tlsgd(tlsbin_gd)
	   +0x1c %gottprel(tlsvar_ie)       "  "
	   +0x20 %tlsgd(tlsbin_gd)       %tlsldm(tlsbin_ld)
	   +0x24   "  "                     "  "
	   +0x28 %gottprel(tlsbin_ie)    %gottprel(tlsbin_ie)
2008-08-07 19:57:28 +00:00
Richard Sandiford 63897e2cf0 bfd/
* elfxx-mips.c (allocate_dynrelocs): Ignore indirect and warning
	symbols.

ld/testsuite/
	* ld-mips-elf/reloc-estimate-1.d, ld-mips-elf/reloc-estimate-1.ld,
	ld-mips-elf/reloc-estimate-1a.s, ld-mips-elf/reloc-estimate-1b.s:
	New test.
	* ld-mips-elf/mips-elf.exp: Run it.
2008-08-07 19:50:05 +00:00
Cary Coutant f827c9a9d7 2008-08-06 Cary Coutant <ccoutant@google.com>
* archive.cc (Archive::total_archives, Archive::total_members)
	(Archive::total_members_loaded): New variables.
	(Archive::setup): Add parameter.  Add option to preread
	archive symbols.
	(Archive::read_armap): Add counter.
	(Archive::get_file_and_offset): New function.
	(Archive::get_elf_object_for_member): New function.
	(Archive::read_all_symbols): New function.
	(Archive::read_symbols): New function.
	(Archive::add_symbols): Add counters.
	(Archive::include_all_members): Use armap to find members if it's
	already built.
	(Archive::include_member): Skip reading symbols if already read.
	Factored code into Archive::get_file_and_offset and
	Archive::get_elf_object_for_member.  Changed call to
	Mapfile::report_include_archive_member.
	(Archive::print_stats): New function.
	* archive.h: Declare Object and Read_symbols_data classes.
	(Archive::Archive): Add initializers for new members.
	(Archive::setup): Add parameter.
	(Archive::print_stats): New function.
	(Archive::total_archives, Archive::total_members)
	(Archive::total_members_loaded): New variables.
	(Archive::get_file_and_offset): New function.
	(Archive::get_elf_object_for_member): New function.
	(Archive::read_all_symbols): New function.
	(Archive::read_symbols): New function.
	(Archive::Archive_member): New class.
	(Archive::members_): New member.
	(Archive::num_members_): New member.
	* main.cc: Include archive.h.
	(main): Call Archive::print_stats.
	* mapfile.cc (Mapfile::report_include_archive_member): Delete
	archive parameter; member_name is now the fully-decorated name.
	* mapfile.h (Mapfile::report_include_archive_member): Likewise.
	* options.h: (General_options): Add --preread-archive-symbols option.
	* readsyms.cc (Read_symbols::do_read_symbols): Change call to
	Archive::setup.
2008-08-07 17:16:36 +00:00
Cary Coutant ac45a351cf 2008-08-06 Cary Coutant <ccoutant@google.com>
* archive.cc (Archive::total_archives, Archive::total_members)
	(Archive::total_members_loaded): New variables.
	(Archive::setup): Add parameter.  Add option to preread
	archive symbols.
	(Archive::read_armap): Add counter.
	(Archive::get_file_and_offset): New function.
	(Archive::get_elf_object_for_member): New function.
	(Archive::read_all_symbols): New function.
	(Archive::read_symbols): New function.
	(Archive::add_symbols): Add counters.
	(Archive::include_all_members): Use armap to find members if it's
	already built.
	(Archive::include_member): Skip reading symbols if already read.
	Factored code into Archive::get_file_and_offset and
	Archive::get_elf_object_for_member.  Changed call to
	Mapfile::report_include_archive_member.
	(Archive::print_stats): New function.
	* archive.h: Declare Object and Read_symbols_data classes.
	(Archive::Archive): Add initializers for new members.
	(Archive::setup): Add parameter.
	(Archive::print_stats): New function.
	(Archive::total_archives, Archive::total_members)
	(Archive::total_members_loaded): New variables.
	(Archive::get_file_and_offset): New function.
	(Archive::get_elf_object_for_member): New function.
	(Archive::read_all_symbols): New function.
	(Archive::read_symbols): New function.
	(Archive::Archive_member): New class.
	(Archive::members_): New member.
	(Archive::num_members_): New member.
	* main.cc: Include archive.h.
	(main): Call Archive::print_stats.
	* mapfile.cc (Mapfile::report_include_archive_member): Delete
	archive parameter; member_name is now the fully-decorated name.
	* mapfile.h (Mapfile::report_include_archive_member): Likewise.
	* options.h: (General_options): Add --preread-archive-symbols option.
	* readsyms.cc (Read_symbols::do_read_symbols): Change call to
	Archive::setup.
2008-08-07 17:02:11 +00:00
gdbadmin ac0cb9be4e *** empty log message *** 2008-08-07 00:00:33 +00:00
Alan Modra 30ad617ab2 daily update 2008-08-07 00:00:05 +00:00
Dave Anglin 6536cc32e2 * solib-pa64.c (read_dld_descriptor): Return zero if load map is not
setup.
2008-08-06 20:17:21 +00:00
Mark Kettenis f73a15e424 * i386obsd-nat.c (i386obsd_supply_pcb): Adjust for changes in
OpenBSD 4.3.
2008-08-06 19:56:20 +00:00
Richard Sandiford 71782a7597 bfd/
* elfxx-mips.c (mips_elf_link_hash_entry): Move bfd_boolean
	fields to the end of the structure and make them single-bit
	bitfields.
	(mips_elf_link_hash_newfunc): Make the initialization statements
	follow the new field order.
2008-08-06 19:53:30 +00:00
Richard Sandiford a8028dd09a bfd/
* elfxx-mips.c (_mips_elf_section_data): Remove the "u.got_info" field.
	(mips_elf_link_hash_table): Add "sgot" and "got_info" fields.
	(_bfd_mips_elf_link_hash_table_create): Initialize them.
	(mips_elf_got_section): Always apply the !maybe_excluded behavior.
	(mips_elf_got_info): Delete.
	(mips_elf_initialize_tls_slots): Remove the DYNOBJ local variable.
	Adjust the call to mips_elf_got_section.
	(mips_elf_local_got_index): Don't call mips_elf_got_info.
	Update the call to mips_elf_create_local_got_entry.
	Use htab->got_info.
	(mips_elf_global_got_index): Don't call mips_elf_got_info;
	use htab->got_info and htab->sgot instead.
	(mips_elf_got_page): Don't call mips_elf_got_info.  Update the
	call to mips_elf_create_local_got_entry.
	(mips_elf_got16_entry): Likewise.
	(mips_elf_got_offset_from_index): Replace with DYNOBJ parameter
	with an INFO parameter.  Don't call mips_elf_got_info; use htab->sgot
	and htab->got_info instead.
	(mips_elf_create_local_got_entry): Remove the GG and SGOT parameters.
	Use htab->sgot and htab->got_info.
	(mips_elf_sort_hash_table): Remove the DYNOBJ local variable.
	Don't call mips_elf_got_info; use htab->got_info instead.
	(mips_elf_record_global_got_symbol): Turn G from a paramter to
	a local variable and read it from htab->got_info.
	(mips_elf_record_local_got_symbol): Replace the G parameter with
	an INFO parameter.  Make G a local variable and read it from
	htab->got_info instead.
	(mips_elf_record_got_page_entry): Likewise.
	(mips_elf_multi_got): Remove the G parameter and make it a local
	variable instead.  Read it from htab->got_info.
	(mips_elf_create_got_section): Cache the GOT section in htab->sgot.
	Store the GOT information in htab->got_info.
	(mips_elf_calculate_relocation): Don't call mips_elf_got_section
	and mips_elf_got_info; use htab->sgot and htab->got_info instead.
	Adjust the calls to mips_elf_got_offset_from_index and
	mips_elf_adjust_gp.
	(_bfd_mips_elf_check_relocs): Remove the G and SGOT local variables.
	Adjust the calls to mips_elf_record_local_got_symbol,
	mips_elf_record_global_got_symbol and mips_elf_record_got_page_entry.
	Use htab->sgot.
	(_bfd_mips_elf_always_size_sections): Remove the DYNOBJ local variable.
	Don't call mips_elf_got_info; use htab->sgot and htab->got_info instead.
	Update the call to mips_elf_multi_got.
	(_bfd_mips_elf_size_dynamic_sections): Don't call mips_elf_got_info;
	use htab->got_info instead.
	(_bfd_mips_elf_finish_dynamic_symbol): Update the call to
	mips_elf_got_section.  Get the got_info from the hash table
	rather than the GOT section.
	(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
	(_bfd_mips_elf_finish_dynamic_sections): Likewise.
	(_bfd_mips_elf_hide_symbol): Don't call mips_elf_got_section;
	get the got_info from the hash table instead.  Remove the GOT
	local variable.
	(_bfd_mips_elf_final_link): Likewise.  Also remove the DYNOBJ
	local variable.
2008-08-06 19:51:29 +00:00
Richard Sandiford 4e41d0d7c3 bfd/
* elfxx-mips.c (mips_elf_link_hash_table): Add an "sstubs" field.
	(_bfd_mips_elf_create_dynamic_sections): Use it to cache the stubs
	section.  Don't check whether the section already exists.
	(_bfd_mips_elf_adjust_dynamic_symbol): Use htab->sstubs.
	(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
	(_bfd_mips_elf_finish_dynamic_sections): Likewise.
	(_bfd_mips_elf_size_dynamic_sections): Likewise.  Don't add the
	dummy stub to an empty section.
	(_bfd_mips_elf_link_hash_table_create): Initialize the "sstubs" field.

ld/testsuite/
	* ld-mips-elf/tls-hidden3.ld: Remove the unused .MIPS.stubs section.
	Keep the text start address the same.
	* ld-mips-elf/tls-multi-got-1.got: We have removed a .MIPS.stubs
	section that contained only a 16-byte dummy stub.  Subtract 16
	from addresses to account for the change.
	* ld-mips-elf/tls-multi-got-1.r: Likewise.  Adjust MIPS_UNREFEXTNO
	to account the removed section symbol.
	* ld-mips-elf/tlsdyn-o32-1.d: We have deleted a .MIPS.stubs
	section that contained only a 16-byte dummy stub.  Remove it
	from the disassembly.
	* ld-mips-elf/tlsdyn-o32-2.d: Likewise.
	* ld-mips-elf/tlsdyn-o32-3.d: Likewise.
	* ld-mips-elf/tlsdyn-o32.d: Likewise.
	* ld-mips-elf/relax-jalr-n32-shared.d: Likewise.
	* ld-mips-elf/relax-jalr-n64-shared.d: Likewise.
2008-08-06 19:49:06 +00:00
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
Thiago Jung Bauermann d57a3c85f6 Initial python support.
gdb/
2008-08-06  Vladimir Prus  <vladimir@codesourcery.com>
	    Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Doug Evans  <dje@google.com>

	* Makefile.in (SUBDIR_PYTHON_OBS, SUBDIR_PYTHON_SRCS,
	SUBDIR_PYTHON_DEPS, SUBDIR_PYTHON_LDFLAGS, SUBDIR_PYTHON_CFLAGS,
	PYTHON_CFLAGS): New.
	(python_h, python_internal_h): New.
	(cli-script.o): Depend on python.h
	(python.o, python-utils.o): New.
	* cli/cli-script.c (print_command_lines): Handle python_control.
	(execute_control_command): Handle python_control.
	(execute_control_command_untraced): New function.
	(while_command): Call execute_control_command_untraced.
	(if_command): Likewise.
	(get_command_line): Remove static attribute.
	(read_next_line): Handle "python".
	(recurse_read_control_structure): Handle python_control.
	(read_command_lines): Handle python_control.
	Include python.h.
	* cli/cli-script.h (get_command_line): Add prototype.
	(execute_control_command_untraced): Likewise.
	* configure.ac: Add --with-python.
	* defs.h (enum command_control_type) <python_control>: New
	constant.
	* python/python-internal.h: New file.
	* python/python.c: New file.
	* python/python.h: New file.
	* python/python-utils.c: New file.
	* NEWS: Mention Python scripting support and its new commands.

gdb/doc/
2008-08-06  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Extending GDB): New chapter.
	(Sequences): Demoted chapter, now a section under the new
	Extending GDB chapter.
	(Python): New section.

gdb/testsuite/
2008-08-06  Tom Tromey  <tromey@redhat.com>

	* gdb.python/python.exp: New file.
2008-08-06 19:41:33 +00:00
Ulrich Weigand 5141027dd0 * spu-tdep.c (spu_gdbarch_init): Call set_gdbarch_frame_red_zone_size. 2008-08-06 18:28:26 +00:00
DJ Delorie 6fd4f6ccfe * NEWS: Mention these changes.
* config/tc-h8300.h (H_TICK_HEX): Define.
* config/tc-h8300.c (OPTION_H_TICK_HEX): New.
(md_longopts): Add "-h-tick-hex".
(md_parse_option): Support it.
* doc/c-h8300.texi (H8/300 Options): Document it.
* doc/as.texinfo (Overview): Likewise.

* config/tc-sh.h (H_TICK_HEX): Define.
* config/tc-sh.c (OPTION_H_TICK_HEX): New.
(md_longopts): Add "-h-tick-hex".
(md_parse_option): Support it.
* doc/c-sh.texi (SH Options): Document it.
* doc/c-sh64.texi (SH64 Options): Document it.
* doc/as.texinfo (Overview): Likewise.
2008-08-06 15:42:15 +00:00
Phil Muldoon 353cfe88ae 2008-08-06 Phil Muldoon <pmuldoon@redhat.com>
* MAINTAINERS (Write After Approval): Add self.
2008-08-06 13:45:18 +00:00
Jan Kratochvil c7b778ff85 Fix for PR gdb/1543.
* gdb.base/sep.exp: `sep-proc.c' absolute line numbers replaced with
	$LOCATION.
	(location): New variable.
	* config/cfdbug.exp, config/d10v.exp, config/dve.exp, config/i960.exp,
	config/m32r.exp, config/mn10300-eval.exp, config/proelf.exp,
	config/rom68k.exp, config/sh.exp, config/unix.exp, config/vr4300.exp,
	config/vr5000.exp, config/vxworks.exp, gdb.arch/altivec-regs.exp,
	gdb.arch/e500-abi.exp, gdb.arch/e500-regs.exp, gdb.asm/asm-source.exp,
	gdb.base/a2-run.exp, gdb.base/advance.exp, gdb.base/all-bin.exp,
	gdb.base/args.exp, gdb.base/arithmet.exp, gdb.base/assign.exp,
	gdb.base/async.exp, gdb.base/auxv.exp, gdb.base/bigcore.c,
	gdb.base/bigcore.exp, gdb.base/bitfields.exp, gdb.base/bitops.exp,
	gdb.base/break.c, gdb.base/break.exp, gdb.base/break1.c,
	gdb.base/call-ar-st.exp, gdb.base/call-rt-st.exp,
	gdb.base/call-strs.exp, gdb.base/callfuncs.c, gdb.base/callfuncs.exp,
	gdb.base/checkpoint.exp, gdb.base/chng-syms.exp,
	gdb.base/code-expr.exp, gdb.base/commands.exp, gdb.base/completion.exp,
	gdb.base/complex.exp, gdb.base/cond-expr.exp, gdb.base/condbreak.exp,
	gdb.base/consecutive.exp, gdb.base/corefile.exp, gdb.base/cvexpr.c,
	gdb.base/cvexpr.exp, gdb.base/dbx.exp, gdb.base/default.exp,
	gdb.base/define.exp, gdb.base/del.c, gdb.base/detach.exp,
	gdb.base/display.exp, gdb.base/dump.exp, gdb.base/echo.exp,
	gdb.base/environ.exp, gdb.base/eval-skip.exp, gdb.base/exprs.exp,
	gdb.base/fileio.exp, gdb.base/find.exp, gdb.base/finish.exp,
	gdb.base/funcargs.exp, gdb.base/gcore-buffer-overflow.exp,
	gdb.base/gcore.exp, gdb.base/gdb1555.exp, gdb.base/gdbvars.exp,
	gdb.base/help.exp, gdb.base/huge.exp, gdb.base/info-proc.exp,
	gdb.base/interrupt.exp, gdb.base/jump.exp, gdb.base/langs.exp,
	gdb.base/lineinc.exp, gdb.base/list.exp, gdb.base/macscp.exp,
	gdb.base/maint.exp, gdb.base/mips_pro.exp, gdb.base/miscexprs.exp,
	gdb.base/nodebug.exp, gdb.base/nofield.c, gdb.base/opaque.exp,
	gdb.base/overlays.exp, gdb.base/page.exp, gdb.base/pc-fp.exp,
	gdb.base/pending.c, gdb.base/pendshr.c, gdb.base/pointers.exp,
	gdb.base/psymtab.exp, gdb.base/ptype.exp, gdb.base/randomize.c,
	gdb.base/readline.exp, gdb.base/recurse.exp, gdb.base/regs.exp,
	gdb.base/relational.exp, gdb.base/relocate.exp, gdb.base/remote.exp,
	gdb.base/reread.exp, gdb.base/return.exp, gdb.base/return2.exp,
	gdb.base/scope.exp, gdb.base/sect-cmd.exp, gdb.base/sep-proc.c,
	gdb.base/sep.c, gdb.base/sep.exp, gdb.base/sepdebug.c,
	gdb.base/sepdebug.exp, gdb.base/setshow.exp, gdb.base/shlib-call.exp,
	gdb.base/sigaltstack.c, gdb.base/so-indr-cl.exp, gdb.base/solib.exp,
	gdb.base/source.exp, gdb.base/start.c, gdb.base/step-bt.c,
	gdb.base/step-line.exp, gdb.base/structs.c, gdb.base/structs.exp,
	gdb.base/structs2.exp, gdb.base/term.exp, gdb.base/twice.exp,
	gdb.base/type-opaque.exp, gdb.base/until.exp,
	gdb.base/value-double-free.c, gdb.base/varargs.exp,
	gdb.base/watchpoint.exp, gdb.base/whatis-exp.exp, gdb.disasm/am33.exp,
	gdb.disasm/h8300s.exp, gdb.disasm/hppa.exp, gdb.disasm/mn10300.exp,
	gdb.disasm/sh3.exp, gdb.disasm/t01_mov.exp, gdb.disasm/t02_mova.exp,
	gdb.disasm/t03_add.exp, gdb.disasm/t04_sub.exp, gdb.disasm/t05_cmp.exp,
	gdb.disasm/t06_ari2.exp, gdb.disasm/t07_ari3.exp,
	gdb.disasm/t08_or.exp, gdb.disasm/t09_xor.exp, gdb.disasm/t10_and.exp,
	gdb.disasm/t11_logs.exp, gdb.disasm/t12_bit.exp,
	gdb.disasm/t13_otr.exp, gdb.fortran/exprs.exp, gdb.fortran/types.exp,
	gdb.hp/gdb.aCC/exception.exp, gdb.hp/gdb.aCC/optimize.exp,
	gdb.hp/gdb.aCC/watch-cmd.exp, gdb.hp/gdb.base-hp/callfwmall.exp,
	gdb.hp/gdb.base-hp/dollar.exp, gdb.hp/gdb.base-hp/hwwatchbus.exp,
	gdb.hp/gdb.base-hp/pxdb.exp, gdb.hp/gdb.base-hp/reg-pa64.exp,
	gdb.hp/gdb.base-hp/reg.exp, gdb.hp/gdb.base-hp/sized-enum.exp,
	gdb.hp/gdb.base-hp/so-thresh.exp, gdb.hp/gdb.compat/xdb1.exp,
	gdb.hp/gdb.compat/xdb2.exp, gdb.hp/gdb.compat/xdb3.exp,
	gdb.java/jmisc.exp, gdb.java/jv-exp.exp, gdb.java/jv-print.exp,
	gdb.mi/gdb669.exp, gdb.mi/gdb680.exp, gdb.mi/gdb701.exp,
	gdb.mi/gdb792.exp, gdb.mi/mi-basics.exp, gdb.mi/mi-console.exp,
	gdb.mi/mi-hack-cli.exp, gdb.mi/mi-pending.c, gdb.mi/mi-pendshr.c,
	gdb.mi/mi-pthreads.exp, gdb.mi/mi-read-memory.exp, gdb.mi/mi-regs.exp,
	gdb.mi/mi-syn-frame.exp, gdb.mi/mi-until.exp, gdb.mi/mi2-basics.exp,
	gdb.mi/mi2-console.exp, gdb.mi/mi2-hack-cli.exp,
	gdb.mi/mi2-pthreads.exp, gdb.mi/mi2-read-memory.exp,
	gdb.mi/mi2-regs.exp, gdb.mi/mi2-syn-frame.exp, gdb.mi/mi2-until.exp,
	gdb.pascal/types.exp, gdb.stabs/weird.exp,
	gdb.threads/gcore-thread.exp, gdb.threads/manythreads.exp,
	gdb.threads/print-threads.exp, gdb.threads/pthreads.exp,
	gdb.threads/schedlock.exp, gdb.threads/step.exp, gdb.threads/step2.exp,
	gdb.threads/switch-threads.exp, gdb.threads/thread-specific.exp,
	gdb.threads/thread_check.exp, gdb.threads/thread_events.exp,
	gdb.threads/tls-nodebug.exp, gdb.threads/tls-shared.exp,
	gdb.threads/tls.exp, gdb.trace/actions.exp, gdb.trace/backtrace.exp,
	gdb.trace/circ.exp, gdb.trace/collection.exp, gdb.trace/deltrace.exp,
	gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
	gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
	gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
	gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp,
	lib/mi-support.exp, lib/trace-support.exp: Remove reference
	to bug-gdb@prep.ai.mit.edu .
2008-08-06 12:52:08 +00:00