Commit Graph

9252 Commits

Author SHA1 Message Date
Alan Modra 05aecedb60 include/
* bfdlink.h (struct bfd_link_info): Use ENUM_BITFIELD for strip,
	discard, common_skip_ar_symbols, unresolved_syms_in_objects, and
	unresolved_syms_in_shared_libs fields.  Move emit_note_gnu_build_id
	out of bitfields.  Reorder bitfields.
bfd/
	* configure.in: Bump version.
	* configure: Regenerate.
2011-07-15 02:36:36 +00:00
Alan Modra cbde55ab5d * linker.c (_bfd_generic_section_already_linked): Set l_flags.
* elf-bfd.h (struct already_linked): Forward declare.
2011-07-14 06:22:57 +00:00
Alan Modra 2dddba2e0e whitespace regen 2011-07-14 04:02:32 +00:00
Alan Modra ec24dc8809 * elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
(_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
2011-07-14 03:57:18 +00:00
Alan Modra 9df0ef5fe7 bfd/
* elf64-ppc.c (struct ppc_link_hash_table): Add plt_static_chain.
	(build_plt_stub): Add plt_static_chain param, don't load r11 if false.
	(build_tls_get_addr_stub): Likewise.
	(ppc_build_one_stub): Update calls to above.
	(ppc_size_one_stub): Adjust stub size.
	(ppc64_elf_size_stubs): Add plt_static_chain param, save to htab.
	* elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
ld/
	* emultempl/ppc64elf.em (plt_static_chain): New var.
	(gld${EMULATION_NAME}_after_allocation): Pass to ppc64_elf_size_stubs.
	(PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
	PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Handle
	--plt-static-chain and --no-plt-static-chain.
ld/testsuite/
	* ld-powerpc/tlsexe.d, * ld-powerpc/tlsexe.g. *ld-powerpc/tlsexe.r,
	* ld-powerpc/tlsexetoc.d, * ld-powerpc/tlsexetoc.g,
	* ld-powerpc/tlsexetoc.r, * ld-powerpc/tlsso.d,
	* ld-powerpc/tlstocso.d: Update for plt stub change.
2011-07-14 03:28:22 +00:00
Alan Modra aac9acd6a9 daily update 2011-07-14 00:00:05 +00:00
Alan Modra ea76d6da53 daily update 2011-07-13 00:00:08 +00:00
Nick Clifton 8de863a55d * elf32-arm.c (elf32_arm_section_flags): Delete.
(elf_backend_section_flags): Remove.
2011-07-12 15:17:43 +00:00
Alan Modra d48b3b9acc daily update 2011-07-12 00:00:06 +00:00
H.J. Lu a92c088a0d Also skip BFD_PLUGIN when setting stack_flags.
2011-07-11  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12982
	* elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN
	when setting stack_flags.
2011-07-11 18:39:13 +00:00
Catherine Moore ae17ab41b7 include/ChangeLog
2011-07-11  Catherine Moore  <clm@codesourcery.com>

	* bfdlink.h (flag_type): New enumeration.
	(flag_info_list): New structure.
	(flag_info): New structure.

bfd/ChangeLog
2011-07-11  Catherine Moore  <clm@codesourcery.com>

	* aout-adobe.c (aout_32_bfd_lookup_section_flags): New definition.
	* aout-target.h (MY_bfd_lookup_section_flags): New definition.
	* aout-tic30.c (MY_bfd_lookup_section_flags): New definition.
        * bfd-in2.h: Regenerated.
	* bfd.c (bfd_lookup_section_flags): New definition.
	* binary.c (binary_bfd_lookup_section_flags): New definition.
	* bout.c (b_out_bfd_lookup_section_flags): New definition.
	* coff-alpha.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
	* coff-mips.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
	* coff-rs6000.c (rs6000coff_vec): Include
	bfd_generic_lookup_section_flags.
	(pmac_xcoff_vec): Likewise.
	* coffcode.h (coff_bfd_lookup_section_flags): New definition.
	* coff64-rs6000.c (rs6000coff64_vec): Include
	bfd_generic_lookup_section_flags.
	(aix5coff64_vec): Likewise.
	* ecoff.c (bfd_debug_section): Initialize flag_info field.
	* elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare.
	(bfd_elf_lookup_section_flags): Declare.
	* elflink.c (bfd_elf_lookup_section_flags): New function.
	* elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define.
	(elf_backend_lookup_section_flags_hook): Define.
	(elf_backend_data): Add elf_backend_lookup_section_flags_hook.
	* i386msdos.c (msdos_bfd_lookup_section_flags): New define.
	* i386os9k.c (os9k_bfd_lookup_section_flags): New define.
	* ieee.c (ieee_bfd_lookup_section_flags): New define.
	* ihex.c (ihex_bfd_lookup_section_flags): New define.
	* libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare.
	(bfd_generic_lookup_section_flags): Declare.
	* libbfd.h: Regenerated.
	* mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New.
	* mmo.c (mmo_bfd_lookup_section_flags): New definition.
	* nlm-target.h (nlm_bfd_lookup_section_flags): New definition.
	* oasys.c (oasys_bfd_lookup_section_flags): New definition.
	* pef.c (bfd_pef_bfd_lookup_section_flags): New definition.
	* plugin.c (bfd_plugin_bfd_lookup_section_flags): New definition.
	* ppcboot.c (ppcboot_bfd_lookup_section_flags): New definition.
	* reloc.c (bfd_generic_lookup_section_flags): New function.
	* som.c (som_bfd_lookup_section_flags): New definition.
	* srec.c (srec_bfd_lookup_section_flags): New definition.
	* targets.c (flag_info): Declare.
	(NAME##_bfd_lookup_section_flags): Add to LINK jump table.
	(_bfd_lookup_section_flags): New.
	* tekhex.c (tekhex_bfd_lookup_section_flags): New definition.
	* versados.c (versados_bfd_lookup_section_flags): New definition.
	* vms-alpha.c (alpha_vms_bfd_lookup_section_flag): New definition.
	* xsym.c (bfd_sym_bfd_lookup_section_flags): New definition.

ld/ChangeLog
2011-07-11  Catherine Moore  <clm@codesourcery.com>

	* ld.h (section_flag_list): Add field to struct wildcard_spec.
	* ld.texinfo (INPUT_SECTION_FLAGS): Document.
	* ldgram.y (flag_info_list, flag_info): Add to union.
	(INPUT_SECTION_FLAGS): New token.
	(wildcard_spec): Initialize section_flag_list to NULL for
	each alternative.
	(sect_flag_list, sect_flags): New rules.
	(input_section_spec_no_keep): Add alternatives to recognize
	sect_flags.
	* ldlang.c (walk_wild_consider_section): Initialize
	section_flag_info field of the section struct.
	(lang_add_section): Check input section flags.
	(lang_add_wild): Initialize section_flag_list field of
	the statement struct.
	* ldlang.h (lang_input_statement_struct): Add section_flag_list field.
	(lang_wild_statement_struct): Likewise.
	* ldlex.l (INPUT_SECTION_FLAGS): New token.
	* mri.c (mri_draw_tree): Initialize section_flag_list to NULL.
	* NEWS: Announce INPUT_SECTION_FLAGS enhancement.

ld/testsuite/ChangeLog
2011-07-11 Catherine Moore  <clm@cm00re.com>

	* ld-scripts/section-flags-1.s: New.
	* ld-scripts/section-flags-1.t: New.
	* ld-scripts/section-flags-2.s: New.
	* ld-scripts/section-flags-2.t: New.
	* ld-scripts/section-flags.exp: New.
2011-07-11 15:03:09 +00:00
H.J. Lu 23ebcd3032 Fix a typo in elfnn-ia64.c (count_dyn_reloc).
2011-07-11  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12978
	* elfnn-ia64.c (count_dyn_reloc): Fix a typo.
2011-07-11 13:54:52 +00:00
Alan Modra 8c5eb9cdcf daily update 2011-07-11 00:00:05 +00:00
Alan Modra 5ffa94835c daily update 2011-07-10 00:00:05 +00:00
Alan Modra 0c51100021 PR ld/12942
bfd/
	* elflink.c (elf_link_add_object_symbols): Use elf_discarded_section
	rather than kept_section to determine whether a symbol is from
	a discarded section.
	* cofflink.c (coff_link_add_symbols): Make symbols from discarded
	sections appear undefined.

	* elf-bfd.h (_bfd_elf_section_already_linked): Replace
	"asection *" with "struct already_linked *".
	* libbfd-in.h (_bfd_nolink_section_already_linked): Likewise.
	(_bfd_generic_section_already_linked): Likewise.
	(bfd_section_already_linked_table_insert): Likewise.
	(struct already_linked): New.
	(struct bfd_section_already_linked): Use it.
	* elflink.c (_bfd_elf_section_already_linked): Replace.
	"asection *" with "struct already_linked *".  Replace the plugin
	dummy with the LTO output.
	* linker.c (_bfd_generic_section_already_linked): Likewise.
	* targets.c (struct already_linked): Add forward declaration.
	(bfd_target): Replace "struct bfd_section *" with
	"struct already_linked *" in _section_already_linked.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

include/
	* bfdlink.h (bfd_link_info): Add loading_lto_outputs.

ld/
	* ldlang.c (section_already_linked): Pass "struct already_linked *"
	to bfd_section_already_linked.
	(lang_process): Set link_info.loading_lto_outputs before
	loading LTO outputs.
	* plugin.c: Include "libbfd.h".
	(add_symbols): Call bfd_section_already_linked with comdat_key.
2011-07-09 06:20:52 +00:00
Alan Modra 2fbb75826a daily update 2011-07-09 00:00:06 +00:00
Alan Modra b42a2922cf daily update 2011-07-08 00:00:05 +00:00
Alan Modra 6c857ee27e daily update 2011-07-07 00:00:06 +00:00
Tristan Gingold 74f2665384 bfd/
2011-07-06  Tristan Gingold  <gingold@adacore.com>

	* mach-o.h: Move loader related definitions to
	include/mach-o/loader.h.  Include it.


include/mach-o/
2011-07-06  Tristan Gingold  <gingold@adacore.com>

	* loader.h: New file.
2011-07-06 07:22:20 +00:00
Alan Modra e983944d2d daily update 2011-07-06 00:00:05 +00:00
H.J. Lu 52cb9dfed0 Always elf_backend_post_process_headers to _bfd_elf_set_osabi.
2011-07-05  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_backend_post_process_headers): Always
	define to _bfd_elf_set_osabi.
2011-07-05 19:04:41 +00:00
Alan Modra 4035a145a4 daily update 2011-07-05 00:00:05 +00:00
Alan Modra a04f20bdeb daily update 2011-07-04 00:00:05 +00:00
Thomas Schwinge 2bb70ae0f4 ELFOSABI_GNU
bfd/
	* elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of
	ELFOSABI_LINUX alias.
	* elf32-hppa.c: Likewise.
	* elf32-i370.c: Likewise.
	* elf64-hppa.c: Likewise.

	binutils/
	* elfedit.c (osabis): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX
	alias and ELFOSABI_HURD.  Add GNU alias.
	* readelf.c (get_osabi_name, get_symbol_binding, get_symbol_type):
	Likewise.
	* doc/binutils.texi <elfedit>: Update accordingly.

	elfcpp/
	* elfcpp.h (ELFOSABI): Add ELFOSABI_GNU with value of ELFOSABI_LINUX,
	keep ELFOSABI_LINUX as an alias.  Remove ELFOSABI_HURD.

	gas/
	* config/obj-elf.c (obj_elf_type): Use ELFOSABI_GNU name instead of
	ELFOSABI_LINUX alias.
	* config/tc-ia64.c: Likewise.

	include/elf/
	* common.h (ELFOSABI_GNU): Define, replaces...
	(ELFOSABI_LINUX): ... this, kept as an alias.
	(ELFOSABI_HURD): Remove.

	ld/testsuite/
	* ld-ifunc/ifunc.exp: Update for changed output.
	* ld-unique/unique.exp: Likewise.
2011-07-03 13:45:32 +00:00
Thomas Schwinge 9c55345c8c ELFOSABI_GNU
bfd/
	* elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of
	ELFOSABI_LINUX alias.
	* elf32-hppa.c: Likewise.
	* elf32-i370.c: Likewise.
	* elf64-hppa.c: Likewise.

	binutils/
	* elfedit.c (osabis): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX
	alias and ELFOSABI_HURD.  Add GNU alias.
	* readelf.c (get_osabi_name, get_symbol_binding, get_symbol_type):
	Likewise.
	* doc/binutils.texi <elfedit>: Update accordingly.

	elfcpp/
	* elfcpp.h (ELFOSABI): Add ELFOSABI_GNU with value of ELFOSABI_LINUX,
	keep ELFOSABI_LINUX as an alias.  Remove ELFOSABI_HURD.

	gas/
	* config/obj-elf.c (obj_elf_type): Use ELFOSABI_GNU name instead of
	ELFOSABI_LINUX alias.
	* config/tc-ia64.c: Likewise.

	include/elf/
	* common.h (ELFOSABI_GNU): Define, replaces...
	(ELFOSABI_LINUX): ... this, kept as an alias.
	(ELFOSABI_HURD): Remove.

	ld/testsuite/
	* ld-ifunc/ifunc.exp: Update for changed output.
	* ld-unique/unique.exp: Likewise.
2011-07-03 13:37:09 +00:00
Alan Modra 85deb06ad2 daily update 2011-07-03 00:00:05 +00:00
Alan Modra 3f26b7e8cb daily update 2011-07-02 00:00:06 +00:00
Ian Lance Taylor 28ede8be33 * elf32-i386.c (elf_i386_eh_frame_plt): Correct expression: change
DW_OP_lit3 to DW_OP_lit2.
2011-07-01 22:14:56 +00:00
Alan Modra c79d668557 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't look at
dyn relocs when called to copy flags for a weak sym.
	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
	(ppc64_elf_merge_private_bfd_data): Delete.
	(bfd_elf64_bfd_merge_private_bfd_data): Define as
	_bfd_generic_verify_endian_match.
2011-07-01 07:49:08 +00:00
Alan Modra 2101fd161d daily update 2011-07-01 00:00:05 +00:00
Bernd Schmidt dc076558e2 * bfd/elf32-tic6x.c (elf32_tic6x_set_osabi): Also set it if
link_info is NULL.
2011-06-30 21:36:09 +00:00
Alan Modra 5d1467ac08 daily update 2011-06-30 00:00:05 +00:00
Alan Modra 4cc0d02fc3 daily update 2011-06-29 00:00:05 +00:00
Tristan Gingold 25d41743dc 2011-06-28 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (vms_private_data_struct): Make vms_linkage_index
	unsigned int.
	(_bfd_vms_write_etir): Write linkage index from reloc.
2011-06-28 08:39:39 +00:00
Tristan Gingold 9b02d21241 2011-06-28 Fawzi Mohamed <fawzi.mohamed@nokia.com>
* mach-o.c (bfd_mach_o_read_command): Also ignore
	BFD_MACH_O_LC_ROUTINES_64.
2011-06-28 07:45:53 +00:00
Alan Modra 0f4e53222c daily update 2011-06-28 00:00:06 +00:00
Tristan Gingold a8efca921f 2011-06-27 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (_bfd_vms_write_etir): Use 'section' to get current
	section target index.
2011-06-27 13:03:15 +00:00
Nick Clifton 20ee8bc9af * cisco-core.c (cisco_core_little_vec): Add initialization of
match_priority field.
2011-06-27 10:09:00 +00:00
Tristan Gingold 4c95ab762c 2011-06-27 Tristan Gingold <gingold@adacore.com>
* cache.c: Include bfd_stdint.h.
	(cache_bmmap): Change profile.  Return region start and size.
	* bfdio.c (struct bfd_iovec): Change bmmap profile.
	(bfd_mmap): Change profile and adjust.   Update comment.
	(memory_bmmap): Change profile.
	* opncls.c (opncls_bmmap): Change profile.
	* vms-lib.c (vms_lib_bmmap): Likewise.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.
2011-06-27 08:41:00 +00:00
Tristan Gingold 62a35308be 2011-06-27 Tristan Gingold <gingold@adacore.com>
* vms-misc.c (vms_time_to_time_t): Adjust overflow detection.
	Add comment.
2011-06-27 08:24:21 +00:00
Alan Modra 6cfcc7789b daily update 2011-06-27 00:00:05 +00:00
Alan Modra 2a089aedef daily update 2011-06-26 00:00:05 +00:00
H.J. Lu 5d43039962 Properly define elf_backend_post_process_headers.
2011-06-25  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_backend_post_process_headers): Don't
	define for FreeBSD/x86-64 nor FreeBSD/L1OM.  Define for L1OM.
2011-06-25 18:03:03 +00:00
Jan Kratochvil 332ce62bf3 bfd/
* elf64-x86-64.c (elf_x86_64_link_hash_table_create): Initialize
	PLT_EH_FRAME.
	* elf32-i386.c (elf_i386_link_hash_table): Likewise.
2011-06-25 00:43:15 +00:00
Alan Modra 79763091fb daily update 2011-06-25 00:00:05 +00:00
Richard Henderson 7dbf3b76a2 PR ld/12928
* elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Recover the
        tlsgd insn before swapping adjacent insns.
2011-06-24 17:38:17 +00:00
Tristan Gingold d120eec295 2011-06-24 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the
	absolute section.
2011-06-24 15:22:40 +00:00
Alan Modra 1e951488fd PR ld/12921
* elf.c (assign_file_positions_for_load_sections): Don't align
	sh_offset for all SHT_NOBITS sections here, just .tbss sections
	that don't get a PT_LOAD.
2011-06-24 03:36:40 +00:00
Alan Modra a1d509b32e daily update 2011-06-24 00:00:05 +00:00
Alan Modra cccbdc7098 daily update 2011-06-23 00:00:06 +00:00
Kaz Kojima b68593b98e * elf32-sh.c (sh_elf_relocate_section): Allow R_SH_TLS_LE_32 for PIE.
(sh_elf_check_relocs): Likewise.
2011-06-22 22:02:16 +00:00
Richard Henderson e366eeae12 * elf64-alpha.c (elf64_alpha_check_relocs): No dynamic reloc for
TPREL in a PIE image.
        (alpha_dynamic_entries_for_reloc): Likewise.
        (elf64_alpha_relocate_section): Allow TPREL in PIE images.
        (elf64_alpha_relax_got_load): Likewise.
2011-06-22 16:18:24 +00:00
Ramana Radhakrishnan 9ec0c93690 2011-06-22 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
* elf32-arm.c (elf32_arm_final_link_relocate): Allow R_ARM_TLS_LE32
       for PIE.
2011-06-22 16:06:00 +00:00
Alan Modra 3a5dbfb250 * elflink.c (_bfd_elf_merge_symbol): Allow type changes for
plugin symbols.  Fix segfault on linker scrip defined syms.
2011-06-21 14:55:26 +00:00
Alan Modra 7529d48023 daily update 2011-06-21 00:00:06 +00:00
Jakub Jelinek e41b3a1379 PR ld/12570
include/
	* bfdlink.h (struct bfd_link_info): Add no_ld_generated_unwind_info
	option.
ld/
	* emultempl/elf32.em (OPTION_LD_GENERATED_UNWIND_INFO,
	OPTION_NO_LD_GENERATED_UNWIND_INFO): Define.
	(gld${EMULATION_NAME}_handle_option): Handle
	--ld-generated-unwind-info and --no-ld-generated-unwind-info.
	* ld.texinfo (--ld-generated-unwind-info,
	--no-ld-generated-unwind-info): Document.
bfd/
	* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
	at all for linker created .eh_frame sections.
	(_bfd_elf_discard_section_eh_frame): Handle linker created
	.eh_frame sections with no relocations.
	* elf64-x86-64.c: Include dwarf2.h.
	(elf_x86_64_eh_frame_plt): New variable.
	(PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
	PLT_FDE_LEN_OFFSET): Define.
	(struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
	(elf_x86_64_create_dynamic_sections): Create and fill in
	.eh_frame section for .plt section.
	(elf_x86_64_size_dynamic_sections): Write .plt section size
	into .eh_frame FDE covering .plt section.
	(elf_x86_64_finish_dynamic_sections): Write .plt section
	start into .eh_frame FDE covering .plt section.  Call
	_bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
	(elf_backend_plt_alignment): Define to 4.
	* elf32-i386.c: Include dwarf2.h.
	(elf_i386_eh_frame_plt): New variable.
	(PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
	PLT_FDE_LEN_OFFSET): Define.
	(struct elf_i386_link_hash_table): Add plt_eh_frame field.
	(elf_i386_create_dynamic_sections): Create and fill in
	.eh_frame section for .plt section.
	(elf_i386_size_dynamic_sections): Write .plt section size
	into .eh_frame FDE covering .plt section.
	(elf_i386_finish_dynamic_sections): Write .plt section
	start into .eh_frame FDE covering .plt section.  Call
	_bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
	(elf_backend_plt_alignment): Define to 4.
ld/testsuite/
	* ld-x86-64/x86-64.exp: Link some testcases with
	--no-ld-generated-unwind-info.
	* ld-x86-64/tlsbin.rd: Add --no-ld-generated-unwind-info to ld
	comment.
	* ld-x86-64/tlsdesc.dd: Likewise.
	* ld-x86-64/tlspic.dd: Likewise.
	* ld-x86-64/tlsdesc.sd: Likewise.
	* ld-x86-64/tlspic.rd: Likewise.
	* ld-x86-64/tlsbindesc.rd: Likewise.
	* ld-x86-64/tlsbindesc.sd: Likewise.
	* ld-x86-64/tlsbin.td: Likewise.
	* ld-x86-64/tlsdesc.pd: Likewise.
	* ld-x86-64/tlsdesc.td: Likewise.
	* ld-x86-64/tlsbindesc.dd: Likewise.
	* ld-x86-64/tlsbin.dd: Likewise.
	* ld-x86-64/tlsgdesc.rd: Likewise.
	* ld-x86-64/tlspic.sd: Likewise.
	* ld-x86-64/tlsbindesc.td: Likewise.
	* ld-x86-64/tlspic.td: Likewise.
	* ld-x86-64/tlsbin.sd: Likewise.
	* ld-x86-64/ilp32-4.d: Likewise.
	* ld-x86-64/tlsgdesc.dd: Add --no-ld-generated-unwind-info to ld
	comment.  Adjust.
	* ld-x86-64/tlsdesc.rd: Likewise.
	* ld-x86-64/tlsgd6.dd: Adjust.
	* ld-x86-64/tlsgd5.dd: Likewise.
	* ld-i386/i386.exp: Link some testcases with
	--no-ld-generated-unwind-info.
	* ld-i386/tlsbin.rd: Add --no-ld-generated-unwind-info to ld
	comment..
	* ld-i386/tlsdesc.dd: Likewise.
	* ld-i386/tlspic.dd: Likewise.
	* ld-i386/tlsdesc.sd: Likewise.
	* ld-i386/tlsgdesc.dd: Likewise.
	* ld-i386/tlsnopic.sd: Likewise.
	* ld-i386/tlspic.rd: Likewise.
	* ld-i386/tlsdesc.rd: Likewise.
	* ld-i386/tlsbindesc.rd: Likewise.
	* ld-i386/tlsbindesc.sd: Likewise.
	* ld-i386/tlsbin.td: Likewise.
	* ld-i386/tlsdesc.td: Likewise.
	* ld-i386/tlsnopic.dd: Likewise.
	* ld-i386/tlsbindesc.dd: Likewise.
	* ld-i386/tlsbin.dd: Likewise.
	* ld-i386/tlsgdesc.rd: Likewise.
	* ld-i386/tlspic.sd: Likewise.
	* ld-i386/tlsnopic.rd: Likewise.
	* ld-i386/tlsbindesc.td: Likewise.
	* ld-i386/tlspic.td: Likewise.
	* ld-i386/tlsbin.sd: Likewise.
2011-06-20 13:18:52 +00:00
Alan Modra 135aeafb66 daily update 2011-06-20 00:00:05 +00:00
H.J. Lu 8b7789423c Fix misc x32 bugs.
bfd/

2011-06-19  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_backend_post_process_headers): Defined
	for x32.

binutils/testsuite/

2011-06-19  H.J. Lu  <hongjiu.lu@intel.com>

	* binutils-all/elfedit-1.d: Updated for x32.

gas/

2011-06-19  H.J. Lu  <hongjiu.lu@intel.com>

	* configure.tgt: Support x32.

ld/

2011-06-19  H.J. Lu  <hongjiu.lu@intel.com>

	* configure.tgt: Support x32.

ld/testsuite/

2011-06-19  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elf/eh1.d: Skip x32.
	* ld-elf/eh2.d: Likewise.
	* ld-elf/eh3.d: Likewise.
	* ld-elf/eh4.d: Likewise.

	* ld-elfvsb/elfvsb.exp: Only xfail 64bit x86_64-*-linux*.
	* ld-shared/shared.exp: Likewise.

	* ld-ifunc/ifunc-1-local-x86.d: Support x32.
	* ld-ifunc/ifunc-1-x86.d: Likewise.
	* ld-ifunc/ifunc-3a-x86.d: Likewise.
	* ld-x86-64/pcrel16.d: Likewise.

	* ld-x86-64/x86-64.exp (x86_64tests): Add missing -melf_x86_64.
2011-06-19 21:22:16 +00:00
Alan Modra 10a1902637 daily update 2011-06-18 00:00:05 +00:00
Alan Modra d7ec8fe0c3 daily update 2011-06-17 00:00:05 +00:00
H.J. Lu 8fd79e71a1 Suport x32 gcore.
2011-06-16  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c: Include <stdarg.h> and CORE_HEADER if
	CORE_HEADER is defined.
	(elf_x86_64_write_core_note): New.
	(elf_backend_write_core_note): Likewise.

	* hosts/x86-64linux.h (uint64_t): New.
	(user_regsx32_struct): Likewise.
	(elf_gregx32_t): Likewise.
	(ELF_NGREGX32): Likewise.
	(elf_gregsetx32_t): Likewise.
	(elf_prstatusx32): Likewise.
	(prstatusx32_t): Likewise.
	(user_fpregs32_struct): Removed.
	(user_fpxregs32_struct): Likewise.
	(user32): Likewise.
	(elf_fpregset32_t): Likewise.
	(elf_fpxregset32_t): Likewise.
	(prgregset32_t): Likewise.
	(prfpregset32_t): Likewise.
2011-06-16 22:08:12 +00:00
H.J. Lu bcd823f19e Support x32 core dump.
2011-06-16  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_x86_64_grok_prstatus): Support x32.
	(elf_x86_64_grok_psinfo): Likewise.
2011-06-16 17:42:59 +00:00
Nick Clifton a06c7d5acb * elf.c (elf_find_function): Fail if not provided with a symbol
table.
2011-06-16 12:34:19 +00:00
Alan Modra 3e30db96c0 daily update 2011-06-16 00:00:06 +00:00
Ulrich Weigand faa9a424ea include/elf/
* common.h (NT_ARM_VFP): Define.

bfd/
	* elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
	* elf.c (elfcore_grok_arm_vfp): New function.
	(elfcore_grok_note): Call it to handle NT_ARM_VFP notes.
	(elfcore_write_arm_vfp): New function.
	(elfcore_write_register_note): Call it to handle .reg-arm-vfp.

binutils/
	* readelf.c (get_note_type): Handle NT_ARM_VFP.
2011-06-15 16:36:58 +00:00
Richard Henderson 48f4b4f592 * elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
elf64_alpha_merge_ind_symbols; adjust for the generic interface.
	(elf64_alpha_always_size_sections): Don't call
	elf64_alpha_merge_ind_symbols.
	(elf_backend_copy_indirect_symbol): New.
2011-06-15 15:04:12 +00:00
Alan Modra 8f661a5e0e daily update 2011-06-15 00:00:05 +00:00
Alan Modra 4d16d5754e PR ld/12887
* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Check sec_info_type
	before doing anything.
	(_bfd_elf_discard_section_eh_frame): Likewise.
2011-06-14 12:57:18 +00:00
Alan Modra 1e24d83cc0 * Makefile.am: Formatting.
* Makefile.in: Regenerate.
	* configure.in (bfd_elf64_tilegx_vec): Add elfxx-tilegx.lo.
	* po/SRC-POTFILES.in: Regnerate.
2011-06-14 05:09:52 +00:00
Alan Modra e4d34ace7c * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Don't use PTR.
(allocate_dynrelocs, readonly_dynrelocs): Replace PTR with void *.
	Don't handle warning symbols here.
	* elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): As above.
	(allocate_dynrelocs, readonly_dynrelocs): As above.
2011-06-14 04:03:23 +00:00
Alan Modra 7f6ab9f8b9 PR ld/12851
* elflink.c (_bfd_elf_gc_mark_extra_sections): New function.
	(elf_gc_sweep): Don't treat debug and sections like .comment
	specially here.
	(bfd_elf_gc_sections): Treat note sections as gc roots only when
	not part of a group.  Always call gc_mark_extra_sections.
	* elf-bfd.h (_bfd_elf_gc_mark_extra_sections): Declare.
	* elfxx-target.h (elf_backend_gc_mark_extra_sections): Default to
	_bfd_elf_gc_mark_extra_sections.
	* elf32-arm.c (elf32_arm_gc_mark_extra_sections): Call
	_bfd_elf_gc_mark_extra_sections.
	* elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): Likewise.
2011-06-14 02:45:12 +00:00
Alan Modra 077aeb2e3e daily update 2011-06-14 00:00:05 +00:00
Nick Clifton 09d9a62aaf * elf32-tilepro.c (tilepro_elf_check_relocs): Delete unused local
variable 'local_got_offsets'.
	* elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
	(tilegx_finish_dyn): Delete unused local variable 'abi_64_p'.
2011-06-13 15:57:19 +00:00
Nick Clifton aa137e4d51 * Makefile.am (ALL_MACHINES): Add cpu-tilegx.lo and cpu-tilepro.lo.
(ALL_MACHINE_CFILES): Add cpu-tilegx.c and cpu-tilepro.c.
    (BFD32_BACKENDS): Add elf32-tilegx.lo, elf32-tilepro.lo,
    and elfxx-tilegx.lo.
    (BFD32_BACKENDS_CFILES): Add elf32-tilegx.c elf32-tilepro.c, and
    elfxx-tilegx.c.
    (BFD64_BACKENDS): Add elf64-tilegx.lo.
    (BFD64_BACKENDS_CFILES): Add elf64-tilegx.c.
    * Makefile.in: Regenerate.
    * arctures.c (bfd_architecture): Define bfd_arch_tilepro,
    bfd_arch_tilegx, bfd_mach_tilepro, bfd_mach_tilegx.
    (bfd_arch_info): Add bfd_tilegx_arch, bfd_tilepro_arch.
    (bfd_archures_list): Add bfd_tilegx_arch, bfd_tilepro_arch.
    bfd-in2.h: Regenerate.
    * config.bfd: Handle tilegx-*-* and tilepro-*-*.
    * configure.in: Handle bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
    and bfd_elf64_tilegx_vec.
    * configure: Regenerate.
    * elf-bfd.h (enum elf_target_id): Define TILEGX_ELF_DATA and
    TILEPRO_ELF_DATA.
    * libbfd.h: Regenerate.
    * reloc.c: Add BFD_RELOC_TILEPRO_{COPY, GLOB_DAT, JMP_SLOT,
    RELATIVE, BROFF_X1, JOFFLONG_X1, JOFFLONG_X1_PLT, IMM8_X0,
    IMM8_Y0, IMM8_X1, IMM8_Y1, DEST_IMM8_X1, MT_IMM15_X1, MF_IMM15_X1,
    IMM16_X0, IMM16_X1, IMM16_X0_LO, IMM16_X1_LO, IMM16_X0_HI,
    IMM16_X1_HI, IMM16_X0_HA, IMM16_X1_HA, IMM16_X0_PCREL,
    IMM16_X1_PCREL, IMM16_X0_LO_PCREL, IMM16_X1_LO_PCREL,
    IMM16_X0_HI_PCREL, IMM16_X1_HI_PCREL, IMM16_X0_HA_PCREL,
    IMM16_X1_HA_PCREL, IMM16_X0_GOT, IMM16_X1_GOT, IMM16_X0_GOT_LO,
    IMM16_X1_GOT_LO, IMM16_X0_GOT_HI, IMM16_X1_GOT_HI,
    IMM16_X0_GOT_HA, IMM16_X1_GOT_HA, MMSTART_X0, MMEND_X0,
    MMSTART_X1, MMEND_X1, SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1,
    IMM16_X0_TLS_GD, IMM16_X1_TLS_GD, IMM16_X0_TLS_GD_LO,
    IMM16_X1_TLS_GD_LO, IMM16_X0_TLS_GD_HI, IMM16_X1_TLS_GD_HI,
    IMM16_X0_TLS_GD_HA, IMM16_X1_TLS_GD_HA, IMM16_X0_TLS_IE,
    IMM16_X1_TLS_IE, IMM16_X0_TLS_IE_LO, IMM16_X1_TLS_IE_LO,
    IMM16_X0_TLS_IE_HI, IMM16_X1_TLS_IE_HI, IMM16_X0_TLS_IE_HA,
    IMM16_X1_TLS_IE_HA, TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
    Add BFD_RELOC_TILEGX_{HW0, HW1, HW2, HW3, HW0_LAST, HW1_LAST,
    HW2_LAST, COPY, GLOB_DAT, JMP_SLOT, RELATIVE, BROFF_X1,
    JUMPOFF_X1, JUMPOFF_X1_PLT, IMM8_X0, IMM8_Y0, IMM8_X1, IMM8_Y1,
    DEST_IMM8_X1, MT_IMM14_X1, MF_IMM14_X1, MMSTART_X0, MMEND_X0,
    SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1, IMM16_X0_HW0,
    IMM16_X1_HW0, IMM16_X0_HW1, IMM16_X1_HW1, IMM16_X0_HW2,
    IMM16_X1_HW2, IMM16_X0_HW3, IMM16_X1_HW3, IMM16_X0_HW0_LAST,
    IMM16_X1_HW0_LAST, IMM16_X0_HW1_LAST, IMM16_X1_HW1_LAST,
    IMM16_X0_HW2_LAST, IMM16_X1_HW2_LAST, IMM16_X0_HW0_PCREL,
    IMM16_X1_HW0_PCREL, IMM16_X0_HW1_PCREL, IMM16_X1_HW1_PCREL,
    IMM16_X0_HW2_PCREL, IMM16_X1_HW2_PCREL, IMM16_X0_HW3_PCREL,
    IMM16_X1_HW3_PCREL, IMM16_X0_HW0_LAST_PCREL,
    IMM16_X1_HW0_LAST_PCREL, IMM16_X0_HW1_LAST_PCREL,
    IMM16_X1_HW1_LAST_PCREL, IMM16_X0_HW2_LAST_PCREL,
    IMM16_X1_HW2_LAST_PCREL, IMM16_X0_HW0_GOT, IMM16_X1_HW0_GOT,
    IMM16_X0_HW1_GOT, IMM16_X1_HW1_GOT, IMM16_X0_HW2_GOT,
    IMM16_X1_HW2_GOT, IMM16_X0_HW3_GOT, IMM16_X1_HW3_GOT,
    IMM16_X0_HW0_LAST_GOT, IMM16_X1_HW0_LAST_GOT,
    IMM16_X0_HW1_LAST_GOT, IMM16_X1_HW1_LAST_GOT,
    IMM16_X0_HW2_LAST_GOT, IMM16_X1_HW2_LAST_GOT, IMM16_X0_HW0_TLS_GD,
    IMM16_X1_HW0_TLS_GD, IMM16_X0_HW1_TLS_GD, IMM16_X1_HW1_TLS_GD,
    IMM16_X0_HW2_TLS_GD, IMM16_X1_HW2_TLS_GD, IMM16_X0_HW3_TLS_GD,
    IMM16_X1_HW3_TLS_GD, IMM16_X0_HW0_LAST_TLS_GD,
    IMM16_X1_HW0_LAST_TLS_GD, IMM16_X0_HW1_LAST_TLS_GD,
    IMM16_X1_HW1_LAST_TLS_GD, IMM16_X0_HW2_LAST_TLS_GD,
    IMM16_X1_HW2_LAST_TLS_GD, IMM16_X0_HW0_TLS_IE,
    IMM16_X1_HW0_TLS_IE, IMM16_X0_HW1_TLS_IE, IMM16_X1_HW1_TLS_IE,
    IMM16_X0_HW2_TLS_IE, IMM16_X1_HW2_TLS_IE, IMM16_X0_HW3_TLS_IE,
    IMM16_X1_HW3_TLS_IE, IMM16_X0_HW0_LAST_TLS_IE,
    IMM16_X1_HW0_LAST_TLS_IE, IMM16_X0_HW1_LAST_TLS_IE,
    IMM16_X1_HW1_LAST_TLS_IE, IMM16_X0_HW2_LAST_TLS_IE,
    IMM16_X1_HW2_LAST_TLS_IE, TLS_DTPMOD64, TLS_DTPOFF64, TLS_TPOFF64,
    TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
    * targets.c (bfd_elf32_tilegx_vec): Declare.
    (bfd_elf32_tilepro_vec): Declare.
    (bfd_elf64_tilegx_vec): Declare.
    (bfd_target_vector): Add bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
    and bfd_elf64_tilegx_vec.
    * cpu-tilegx.c: New file.
    * cpu-tilepro.c: New file.
    * elf32-tilepro.h: New file.
    * elf32-tilepro.c: New file.
    * elf32-tilegx.c: New file.
    * elf32-tilegx.h: New file.
    * elf64-tilegx.c: New file.
    * elf64-tilegx.h: New file.
    * elfxx-tilegx.c: New file.
    * elfxx-tilegx.h: New file.

	* Makefile.am (TARGET_CPU_CFILES): Add config/tc-tilegx.c and
	config/tc-tilepro.c.
	(TARGET_CPU_HFILES): Add config/tc-tilegx.h and
	config/tc-tilepro.h.
	* Makefile.in: Regenerate.
	* configure.tgt (tilepro-*-*): New.
	(tilegx-*-*): Likewise.
	* config/tc-tilegx.c: New file.
	* config/tc-tilegx.h: Likewise.
	* config/tc-tilepro.h: Likewise.
	* config/tc-tilepro.c: Likewise.
	* doc/Makefile.am (CPU_DOCS): Add c-tilegx.texi and
	c-tilepro.texi.
	* doc/Makefile.in: Regenerate.
	* doc/all.texi (TILEGX): Define.
	(TILEPRO): Define.
	* doc/as.texinfo: Add Tile-Gx and TILEPro documentation.  Include
	c-tilegx.texi and c-tilepro.texi.
	* doc/c-tilegx.texi: New.
	* doc/c-tilepro.texi: New.

        * gas/tilepro/t_constants.s: New file.
	* gas/tilepro/t_constants.d: Likewise.
	* gas/tilepro/t_insns.s: Likewise.
	* gas/tilepro/tilepro.exp: Likewise.
	* gas/tilepro/t_insns.d: Likewise.
	* gas/tilegx/tilegx.exp: Likewise.
	* gas/tilegx/t_insns.d: Likewise.
	* gas/tilegx/t_insns.s: Likewise.

	* dis-asm.h (print_insn_tilegx): Declare.
	(print_insn_tilepro): Likewise.

	* tilegx.h: New file.
	* tilepro.h: New file.

	* common.h: Add EM_TILEGX.
	* tilegx.h: New file.
	* tilepro.h: New file.

	* Makefile.am (ALL_EMULATION_SOURCES): Add eelf32tilegx.c and
	eelf32tilepro.c.
	(ALL_64_EMULATION_SOURCES): Add eelf64tilegx.c.
	(eelf32tilegx.c): New target.
	(eelf32tilepro.c): Likewise.
	(eelf64tilegx.c): Likewise.
	* Makefile.in: Regenerate.
	* configure.tgt: Handle tilegx-*-* and tilepro-*-*.
	* emulparams/elf32tilegx.sh: New file.
	* emulparams/elf64tilegx.sh: New file.
	* emulparams/elf32tilepro.sh: New file.

	* ld-elf/eh5.d: Don't run on tile*.
	* ld-srec/srec.exp: xfail on tile*.
	* ld-tilegx/external.s: New file.
	* ld-tilegx/reloc.d: New file.
	* ld-tilegx/reloc.s: New file.
	* ld-tilegx/tilegx.exp: New file.
	* ld-tilepro/external.s: New file.
	* ld-tilepro/reloc.d: New file.
	* ld-tilepro/reloc.s: New file.
	* ld-tilepro/tilepro.exp: New file.

	* Makefile.am (TARGET_LIBOPCODES_CFILES): Add tilegx-dis.c,
	tilegx-opc.c, tilepro-dis.c, and tilepro-opc.c.
	* Makefile.in: Regenerate.
	* configure.in: Handle bfd_tilegx_arch and bfd_tilepro_arch.
	* configure: Regenerate.
	* disassemble.c (disassembler): Add ARCH_tilegx and ARCH_tilepro.
	* po/POTFILES.in: Regenerate.
	* tilegx-dis.c: New file.
	* tilegx-opc.c: New file.
	* tilepro-dis.c: New file.
	* tilepro-opc.c: New file.
2011-06-13 15:18:54 +00:00
Alan Modra 7686d77de3 * linker.c (bfd_link_hash_traverse): Follow warning symbol link.
(_bfd_generic_link_write_global_symbol, fix_syms): Don't handle
	warning symbols here.
	* elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
	* elf32-arm.c (allocate_dynrelocs_for_symbol,
	elf32_arm_readonly_dynrelocs): Likewise.
	* elf32-bfin.c (bfin_discard_copies): Likewise.
	* elf32-cris.c (elf_cris_adjust_gotplt_to_got,
	elf_cris_discard_excess_dso_dynamics,
	elf_cris_discard_excess_program_dynamics): Likewise.
	* elf32-hppa.c (allocate_plt_static, allocate_dynrelocs,
	clobber_millicode_symbols, readonly_dynrelocs): Likewise.
	* elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
	* elf32-i386.c (elf_i386_allocate_dynrelocs,
	elf_i386_readonly_dynrelocs): Likewise.
	* elf32-lm32.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
	* elf32-m32c.c (m32c_relax_plt_check, m32c_relax_plt_realloc): Likewise.
	* elf32-m32r.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
	* elf32-m68k.c (elf_m68k_discard_copies): Likewise.
	* elf32-microblaze.c (allocate_dynrelocs): Likewise.
	* elf32-ppc.c (allocate_dynrelocs, maybe_set_textrel): Likewise.
	* elf32-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
	* elf32-score.c (score_elf_sort_hash_table_f): Likewise.
	* elf32-score7.c (score_elf_sort_hash_table_f): Likewise.
	* elf32-sh.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
	* elf32-tic6x.c (elf32_tic6x_allocate_dynrelocs,
	elf32_tic6x_readonly_dynrelocs): Likewise.
	* elf32-vax.c (elf_vax_discard_copies): Likewise.
	* elf32-xstormy16.c (xstormy16_relax_plt_check,
	xstormy16_relax_plt_realloc): Likewise.
	* elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Likewise.
	* elf64-alpha.c (elf64_alpha_output_extsym,
	elf64_alpha_calc_got_offsets_for_symbol,
	elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_1): Likewise.
	* elf64-hppa.c (elf64_hppa_mark_exported_functions,
	allocate_global_data_opd, elf64_hppa_mark_milli_and_exported_functions,
	elf_hppa_unmark_useless_dynamic_symbols,
	elf_hppa_remark_useless_dynamic_symbols): Likewise.
	* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref, func_desc_adjust,
	adjust_opd_syms, adjust_toc_syms, allocate_dynrelocs,
	readonly_dynrelocs, merge_global_got, reallocate_got,
	undo_symbol_twiddle): Likewise.
	* elf64-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
	* elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs,
	elf_x86_64_readonly_dynrelocs): Likewise.
	* elflink.c (elf_link_renumber_hash_table_dynsyms,
	elf_link_renumber_local_hash_table_dynsyms, _bfd_elf_export_symbol,
	_bfd_elf_link_find_version_dependencies,
	_bfd_elf_link_assign_sym_version, _bfd_elf_adjust_dynamic_symbol,
	_bfd_elf_link_sec_merge_syms, elf_adjust_dynstr_offsets,
	elf_collect_hash_codes, elf_collect_gnu_hash_codes,
	elf_renumber_gnu_hash_syms, elf_gc_sweep_symbol,
	elf_gc_propagate_vtable_entries_used,
	elf_gc_smash_unused_vtentry_relocs, bfd_elf_gc_mark_dynamic_ref_symbol,
	elf_gc_allocate_got_offsets): Likewise.
	* elfnn-ia64.c (elfNN_ia64_global_dyn_info_free,
	elfNN_ia64_global_dyn_sym_thunk): Likewise.
	* elfxx-mips.c (mips_elf_check_symbols, mips_elf_output_extsym,
	mips_elf_sort_hash_table_f, allocate_dynrelocs): Likewise.
	* elfxx-sparc.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
	* i386linux.c (linux_tally_symbols): Likewise.
	* m68klinux.c (linux_tally_symbols): Likewise.
	* sparclinux.c (linux_tally_symbols): Likewise.
	* sunos.c (sunos_scan_dynamic_symbol): Likewise.
	* xcofflink.c (xcoff_post_gc_symbol): Likewise.

	* elflink.c (elf_link_output_extsym): Make it a bfd_hash_traverse
	function.  Update all callers.
	* aoutx.h (aout_link_write_other_symbol): Likewise.
	* pdp11.c (aout_link_write_other_symbol): Likewise.
	* cofflink.c (_bfd_coff_write_global_sym): Likewise.
	* ecoff.c (ecoff_link_write_external): Likewise.
	* xcofflink.c (xcoff_write_global_symbol): Likewise.
	* vms-alpha.c (alpha_vms_link_output_symbol): Likewise.  Handle
	warning symbols.
	* ecoff.c (ecoff_link_hash_traverse): Delete.
	* coff-ppc.c (ppc_bfd_coff_final_link): Use bfd_hash_traverse for
	_bfd_coff_write_global_sym.
	* libcoff-in.h (_bfd_coff_write_global_sym): Update prototype.
	* libcoff.h: Regenerate.
2011-06-13 00:59:15 +00:00
Alan Modra 953f2bca5d daily update 2011-06-13 00:00:05 +00:00
Alan Modra 0222e8baa6 daily update 2011-06-12 00:00:05 +00:00
Alan Modra 42f641811d daily update 2011-06-11 00:00:05 +00:00
Nick Clifton 894891db7f * elflink.c (_bfd_elf_link_create_dynamic_sections): If the
backend does not provide a function for creating dynamic sections
	then fail.
	(bfd_elf_final_link): Issue a warning message if a dynamic section
	has the SHT_NOTE type.
	(bfd_elf_final_link): Do not look for dynamic strings in a section
	that does not have the SHT_STRTAB type or the name .dynstr.
	* elf32-arm.c (elf32_arm_finish_dynamic_sections): Fail if the got
	section is not in the output binary.
	* elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Likewise.

	* ld-elf/elf.exp: Add test for linking a shared library with a
	broken linker script that marks dynamic sections as being notes.
	* ld-elf/note-3.s: New test source file.
	* ld-elf/note-3.t: New test linker script.
	* ld-elf/note-3.l: Expected output from the linker.
	* lib/ld-lib.exp (run_ld_link_tests): Improve description.
2011-06-10 14:04:25 +00:00
Alan Modra 12af614e24 daily update 2011-06-10 00:00:06 +00:00
Tristan Gingold d17fe7b7f6 2011-06-09 Tristan Gingold <gingold@adacore.com>
* elfnn-ia64.c (elfNN_ia64_relax_section, elfNN_ia64_choose_gp)
	(elfNN_ia64_relocate_section, elfNN_vms_object_p): Remove trailing
	spaces.
2011-06-09 15:35:30 +00:00
Tristan Gingold 8076289ed5 2011-06-09 Tristan Gingold <gingold@adacore.com>
* bfd.c (bfd_get_sign_extend_vma): Handle aixcoff.
2011-06-09 15:31:41 +00:00
Nick Clifton ba85c43e2c PR ld/12845
* elf.c (_bfd_elf_init_private_section_data): Add an assertion
	that the output section has an allocated bfd_elf_section_data
	structure.
	* elfxx-mips.c (mips_elf_check_symbols): Do not create a stub for
	symbols in sections that have been removed by garbage collection.

	* emultempl/mipself.em (mips_add_stub_section): Do not add stubs
	for sections that have been removed by garbage collection.
2011-06-09 10:36:20 +00:00
H.J. Lu adc7571d31 Allow building x32 DSO from x86-64 object file.
bfd/

2011-06-08  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_x86_64_check_relocs): Allow R_X86_64_64
	relocations in SEC_DEBUGGING sections when building shared
	libraries.

ld/testsuite/

2011-06-08  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-x86-64/simple.c: New.
	* ld-x86-64/x86-64-x32.rd: Likewise.

	* ld-x86-64/x86-64.exp: Check building x32 DSO from x86-64
	object file.
2011-06-09 05:51:11 +00:00
H.J. Lu 2400775011 Check relocations in note sections for --gc-sections.
bfd/

2011-06-08  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12851
	* elflink.c (elf_gc_sweep): Don't check SHT_NOTE sections here.
	(bfd_elf_gc_sections): Also check SHT_NOTE sections.

ld/testsuite/

2011-06-08  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12851
	* ld-elf/pr12851.d: New.
	* ld-elf/pr12851.s: Likewise.
2011-06-09 04:52:15 +00:00
Alan Modra 75c7320d74 daily update 2011-06-09 00:00:06 +00:00
Tristan Gingold e79064fe71 2011-06-08 Tristan Gingold <gingold@adacore.com>
* makefile.vms (OBJS): Add elfxx-ia64.obj
	Remove vax case.
2011-06-08 12:33:46 +00:00
Alan Modra d3aeb6ee26 * aix386-core.c, * cisco-core.c, * hpux-core.c, * osf-core.c,
* sco5-core.c: Init match_priority field.
2011-06-08 00:16:55 +00:00
Alan Modra 45da9a2454 daily update 2011-06-08 00:00:04 +00:00
Alan Modra 2a41f39647 * elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
indirect links here.
2011-06-07 23:57:50 +00:00
Joel Brobecker 1d859532c2 Fix build error on mips-irix (missing match_priority)
A new field was recently added to struct bfd_target, and irix-core.c
needs an update...

bfd/ChangeLog:

        * irix-core.c (irix_core_vec): Add match_priority field.
2011-06-07 19:50:08 +00:00
Alan Modra ee6404d34e daily update 2011-06-07 00:00:05 +00:00
Alan Modra 0aabe54e62 * targets.c (bfd_target): Make ar_max_namelen an unsigned char.
Add match_priority.
	* configure.in: Bump bfd version.
	* elfcode.h (elf_object_p): Delete hacks preventing match of
	EM_NONE and ELFOSABI_NONE targets when a better match exists.
	* elfxx-target.h (elf_match_priority): Define and use.
	* format.c (bfd_check_format_matches): Use target match_priority
	to choose best of multiple matching targets.  In cases with multiple
	matches rerun _bfd_check_format if we don't choose the last match.
	* aout-adobe.c, * aout-arm.c, * aout-target.h, * aout-tic30.c,
	* binary.c, * bout.c, * coff-alpha.c, * coff-i386.c, * coff-i860.c,
	* coff-i960.c, * coff-ia64.c, * coff-mips.c, * coff-or32.c,
	* coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c,
	* coff-tic54x.c, * coff-x86_64.c, * coff64-rs6000.c, * coffcode.h,
	* i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c, * mach-o-target.c,
	* mipsbsd.c, * mmo.c, * nlm-target.h, * oasys.c, * pdp11.c,
	* pe-mips.c, * pef.c, * plugin.c, * ppcboot.c, * som.c, * srec.c,
	* tekhex.c, * trad-core.c, * verilog.c, * versados.c, * vms-alpha.c,
	* vms-lib.c, * xsym.c: Init match_priority field.
	* configure: Regenerate.
	* bfd-in2.h: Regenerate.
2011-06-06 01:26:05 +00:00
Alan Modra 1cba6f012d daily update 2011-06-06 00:00:05 +00:00
Alan Modra 841fd89ddb daily update 2011-06-05 00:00:05 +00:00
H.J. Lu 70b554c98b Revert the last change on elf_object_p.
2011-06-04  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12842
	* elfcode.h (elf_object_p): Revert the last change.
2011-06-04 18:16:17 +00:00
Alan Modra d50ec8a7e1 * archures.c (bfd_arch_get_compatible): If one arch is unknown,
return the other arch.
	* elfcode.h (elf_object_p): Allow explicit match to generic ELF
	target.
2011-06-04 04:07:54 +00:00
Alan Modra f973cbf1c6 daily update 2011-06-04 00:00:05 +00:00
Nick Clifton 164a5cb7bd PR ld/12682
* hash.c (higher_primer_number): Add more, small, prime numbers.
	(bfd_hash_set_default_size): Likewise.
2011-06-03 16:16:32 +00:00
Nick Clifton 582386937d oops - spelling fixes accidentally omitted from previous delta. 2011-06-03 10:11:06 +00:00
Alan Modra 366e5998a8 daily update 2011-06-03 00:00:06 +00:00
Nick Clifton cc643b88f1 Fix spelling mistakes. 2011-06-02 13:43:24 +00:00
DJ Delorie 4c422395e6 * config.bfd: Add bfd_elf32_rx_be_ns_vec.
* target.c: Likewise.
* configure.in: Likewise.
* configure.in: Regenerate.
* elf32-rx.c: Add elf32-rx-be-ns target.
(rx_elf_object_p): Never allow the be-ns target by default,
only allow it if the user requests it.
2011-06-02 00:51:19 +00:00
Alan Modra a39ef33120 daily update 2011-06-02 00:00:05 +00:00
H.J. Lu 4b819e1f6e Properly warn relocation in readonly section in a shared object.
2011-06-01  H.J. Lu  <hongjiu.lu@intel.com>

	* elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
	relocation in readonly section in a shared object.
	* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
2011-06-01 19:42:01 +00:00
Nick Clifton 74ce8de7ca * archive.c (adjust_relative_path): Fix comment to prevent it
corrupting the auto-generated bfd.h.
2011-05-31 14:27:39 +00:00
Paul Brook 63e1a0fcba 2011-05-31 Paul Brook <paul@codesourcery.com>
bfd/
	* elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion
	for known functions.
	(elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function
	symbols.

	include/elf/
	* arm.h (arm_st_branch_type): Add ST_BRANCH_UNKNOWN.

	ld/testsuite/
	* ld-arm/cortex-a8-far.d: Adjust expected output.
	* ld-arm/arm-call1.s: Give function symbol correct type.
	* ld-arm/arm-call2.s: Ditto.
	* ld-arm/farcall-group4.s: Ditto.
	* ld-arm/arm-elf.exp (cortex-a8-far): Define far symbols with correct
	type via assembly file.
	* ld-arm/cortex-a8-far-3.s: New file.
	* ld-arm/abs-call-1.s: Add Thumb tests
2011-05-31 14:07:58 +00:00
Paul Brook 12352d3f85 2011-05-31 Paul Brook <paul@codesourcery.com>
bfd/
	* elf32-arm.c (arm_stub_is_thumb): Add
	arm_stub_long_branch_v4t_thumb_tls_pic.
	(elf32_arm_final_link_relocate): TLS stubs are always ARM.
	Handle Thumb stubs.

	ld/testsuite/
	* ld-arm/tls-longplt.d: Update expected output.
	* ld-arm/tls-thumb1.d: Ditto.
2011-05-31 13:37:27 +00:00
Alan Modra 3ccc0f8234 daily update 2011-05-31 00:00:05 +00:00
Alan Modra 2b082e984c daily update 2011-05-30 00:00:05 +00:00
Alan Modra fed8168ad7 daily update 2011-05-29 00:00:06 +00:00
Alan Modra 03216b8c87 daily update 2011-05-28 00:00:05 +00:00
Nick Clifton c49486096b PR binutils/12710
* archive.c (_bfd_get_elt_at_filepos): Set correct error value if
	unable to read a file pointed to by an entry in a thin archive.
	(adjust_relative_path): Use lrealpath to canonicalize paths.
	Handle the case where the reference path is above the current
	path in the directory tree.
2011-05-27 10:52:30 +00:00
Alan Modra 98f6bd576e daily update 2011-05-27 00:00:35 +00:00
H.J. Lu 6769d5017f Handle R_X86_64_TPOFF64 in executable.
bfd/

2011-05-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12809
	* elf64-x86-64.c (elf_x86_64_relocate_section): Handle
	R_X86_64_TPOFF64 in executable.

ld/testsuite/

2011-05-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12809
	* ld-x86-64/tlsbin.s: Add a test for LE with large model.

	* ld-x86-64/tlsbin.dd: Updated.
	* ld-x86-64/tlsbin.rd: Likewise.
	* ld-x86-64/tlsbin.sd: Likewise.
	* ld-x86-64/tlsbin.td: Likewise.
	* ld-x86-64/tlsbindesc.dd: Likewise.
	* ld-x86-64/tlsbindesc.rd: Likewise.
	* ld-x86-64/tlsbindesc.sd: Likewise.
	* ld-x86-64/tlsbindesc.td: Likewise.
2011-05-26 13:22:04 +00:00
Alan Modra 2676a7d991 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.
* elflink.c (_bfd_elf_symbol_refs_local_p): Expand
	local_protected comment.
2011-05-26 04:28:20 +00:00
Alan Modra 9d13b431c0 daily update 2011-05-26 00:00:05 +00:00
Tristan Gingold cbe79dfe9a 2011-05-25 Tristan Gingold <gingold@adacore.com>
* configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec)
	(bfd_elf64_ia64_big_vec, bfd_elf64_ia64_hpux_big_vec)
	(bfd_elf64_ia64_little_vec, bfd_elf64_ia64_vms_vec): Add elfxx-ia64.lo
	* Makefile.am (BFD64_BACKENDS): Add elfxx-ia64.lo
	(BFD64_BACKENDS_CFILES): Add elfxx-ia64.c
	(elf32-ia64.c): Created from elfnn-ia64.c
	(elf64-ia64.c): Likewise.
	* elfxx-ia64.h: New file.
	* elfxx-ia64.c: Split with elfnn-ia64.c.  Keep only the following
	functions.Includes elfxx-ia64.h.
	(elfNN_ia64_reloc): Renames to ia64_elf_reloc.  Adjust error message.
	(IA64_HOWTO): Adjust.
	(lookup_howto): Renames to ia64_elf_lookup_howto.  Make it public.
	(elfNN_ia64_reloc_type_lookup): Renames to
	ia64_elf_reloc_type_lookup. Make it public. Adjust calls.
	(elfNN_ia64_reloc_name_lookup): Renames to
	ia64_elf_reloc_name_lookup. Make it public.
	(elfNN_ia64_relax_br): Renames to ia64_elf_relax_br.  Make it public.
	(elfNN_ia64_relax_brl): Renames to ia64_elf_relax_brl. Make it
	public.
	(elfNN_ia64_relax_ldxmov): Renames to ia64_elf_relax_ldxmov.
	Move it and make it public.  Move prototype to elfxx-ia64.h
	(elfNN_ia64_install_value): Renames to ia64_elf_install_value.
	Move prototype to elfxx-ia64.h
	* elfnn-ia64.c: New file, split from elfxx-ia64.c.
	(elfNN_ia64_info_to_howto): Adjust calls.
	(elfNN_ia64_relax_section): Adjust calls.
	(count_dyn_reloc): Fix typo.
	(elfNN_ia64_relocate_section): Adjust calls.
	(elfNN_ia64_finish_dynamic_symbol): Likewise.
	(bfd_elfNN_bfd_reloc_type_lookup)
	(bfd_elfNN_bfd_reloc_name_lookup): Adjust macros.
2011-05-25 12:02:16 +00:00
Alan Modra 54ab600e64 daily update 2011-05-25 00:00:06 +00:00
Alan Modra 01b5515e06 daily update 2011-05-24 00:00:05 +00:00
DJ Delorie 1ce749055f * elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo
the vma/lma swapping done in elf32_rx_modify_program_headers.
2011-05-23 19:50:19 +00:00
Nick Clifton 997fbe3655 * elf-m10300.c (mn10300_elf_mkobject): New function.
(bfd_elf32_mkobject): Define.
2011-05-23 14:55:39 +00:00
Alan Modra 6061a67d14 * elf-bfd.h: Comment typo fix.
* elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete.  Replace with
	struct elf_dyn_relocs throughout.
	* elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
2011-05-23 06:22:51 +00:00
Alan Modra 25f53a85d7 * elf32-frv.c: Use info->callbacks->einfo throughout file in linker
functions rather than warning callback or _bfd_error_handler.
	* elf32-ppc.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
	arg error.
	* elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
2011-05-23 06:14:21 +00:00
Alan Modra 6de6a7fe35 PR 12763
bfd/
	* elf.c (assign_file_positions_for_load_sections): Set sh_offset for
	.tbss, and page align same for all SHT_NOBITS sections.
ld/
	* ldlang.c (lang_output_section_find_by_flags): Match orphan .sdata2
	like sections to existing .sdata2, and similarly for orphan TLS
	sections.
	* emultempl/elf32.em (place_orphan): Exclude .tbss from orphan_bss.
2011-05-23 05:41:01 +00:00
Alan Modra 0ecfa2d9f0 daily update 2011-05-23 00:00:05 +00:00
Alan Modra 51c151bade daily update 2011-05-22 00:00:06 +00:00
Alan Modra d1cc6957ef daily update 2011-05-21 00:00:06 +00:00
Alan Modra 86b2281fde PR 12763
* elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
	from PT_TLS header.
	(_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
	segment if just for .tbss.
	(assign_file_positions_for_load_sections): Don't report "can't
	allocate in segment" errors for .tbss.
	(assign_file_positions_for_non_load_sections): Don't set p_filesz
	from SHT_NOBITS section filepos.
2011-05-20 15:32:24 +00:00
Bernd Schmidt 4a73203297 ld/testsuite/
* ld-tic6x/pcr-reloc.d: New test.
	* ld-tic6x/pcr-reloc.s: New test.

	gas/testsuite/
	* gas/tic6x/pcr-relocs.d: New test.
	* gas/tic6x/pcr-relocs.s: New test.
	* gas/tic6x/pcr-relocs-undef.d: New test.
	* gas/tic6x/pcr-relocs-undef.s: New test.
	* gas/tic6x/reloc-bad-2.s: Update for pcr_offset.
	* gas/tic6x/reloc-bad-2.l: Update for pcr_offset.

	bfd/
	* elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for
	R_C6000_PCR_H16 and R_C6000_PCR_L16.
	(elf32_tic6x_relocate_section): Handle them.

	gas/
	* config/tc-tic6x.c (tic6x_operators): Add "pcr_offset".
	(tic6x_parse_name): Handle it.
	(tic6x_fix_new_exp): Handle O_pcr_offset.
	(tic6x_fix_adjustable): Return 0 for the new relocs.
	(md_apply_fix): Handle them.
	(tc_gen_reloc): Likewise.
	* config/tc-tic6x.h (tic6x_fix_info): Add a fix_subsy member.
2011-05-20 10:10:00 +00:00
Alan Modra a09079ef68 daily update 2011-05-20 00:00:07 +00:00
Nick Clifton dd98f8d276 PR ld/12761
* elflink.c (elf_link_add_object_symbols): Process .gnu.warning
	sections when building shared libraries.

	* lib/ld-lib.exp (run_cc_link_tests): Add an optional 8th
	parameter - an expected warning message from the linker.
	* ld-elf/shared.exp (build_tests): Expect a warning message when
	building the libbarw.so library.

	* ld-elf/shared.exp: Run library building tests even when not
	building a native toolchain.
2011-05-18 14:04:32 +00:00
Nick Clifton 9c489990bb PR ld/12778
* elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic
	reloc pointer.
2011-05-18 13:36:11 +00:00
Tristan Gingold 5ccfed9b76 2011-05-18 Tristan Gingold <gingold@adacore.com>
* xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols.
	(xcoff_sweep): Always keep dwarf sections.
	(xcoff_link_input_bfd): Handle dwarf symbols and sections.
2011-05-18 08:00:08 +00:00
Tristan Gingold 85645aed85 bfd
2011-05-18  Tristan Gingold  <gingold@adacore.com>

	* libxcoff.h (struct xcoff_dwsect_name): New type.
	(XCOFF_DWSECT_NBR_NAMES): New macro.
	(xcoff_dwsect_names): Declare.
	* coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections.
	(styp_to_sec_flags): Ditto.
	(coff_new_section_hook): Ditto.
	(coff_slurp_symbol_table): Handle C_DWARF and C_INFO.
	* coff-rs6000.c (xcoff_dwsect_name): New variable.

gas
2011-05-18  Tristan Gingold  <gingold@adacore.com>

	* config/tc-ppc.h (ppc_tc_sy): Reorder fields.
	Put size into an union with dw.
	(OBJ_COPY_SYMBOL_ATTRIBUTES): Adjust.
	(ppc_xcoff_end): Declare.
	(md_end): Define.
	* config/tc-ppc.c: Add includes for xcoff.
	(ppc_dwsect): New function.
	(md_pseudo_table): Add dwsect.
	(struct dw_subsection): New.
	(dw_sections): New.
	(ppc_change_debug_section): New function.
	(ppc_xcoff_end): Ditto.
	(ppc_function): Adjust for ppc_tc_sy.
	(ppc_symbol_new_hook): Ditto.
	(ppc_frob_symbol): Ditto.
	(ppc_frob_section): Do not set vma for debug sections.
	(ppc_fix_adjustable): Return true for debug sections.
	* config/obj-coff.c: Add includes for xcoff.
	(coff_frob_section): Handle dwarf section.

gas/testsuite
2011-05-18  Tristan Gingold  <gingold@adacore.com>

	* gas/ppc/xcoff-dwsect-1-32.d: New test.
	* gas/ppc/xcoff-dwsect-1-64.d: Ditto.
	* gas/ppc/xcoff-dwsect-1.s: New file.
	* gas/ppc/aix.exp (do_align_test): Add tests.
2011-05-18 07:58:36 +00:00
Alan Modra 91f514c02f daily update 2011-05-18 00:00:04 +00:00
Nick Clifton 84bff83f79 PR ld/12759
* emultempl/rxelf.em (ignore_lma): New variable.
	(rx_elf_create_output_section_statements): Pass the setiing of
	ignore_lma to bfd_elf32_rx_set_target_flags.
	(OPTION_IGNORE_LMA): Define.
	(OPTION_NO_IGNORE_LMA): Define.
	(PARSE_AND_LIST_LONGOPTS): Add ignore lma.
	(PARSE_AND_LIST_OPTIONS): Add ignore lma.
	(PARSE_AND_LIST_ARGS_CASES): Add ignore lma.

	* elf32-rx.c (ignore_lma): New variable.
	(bfd_elf32_rx_set_target_flags): Add ignore_lma parameter.
	(rx_modify_program_headers): Only copy the LMA into the VMA if
	ignore_lma is true.
2011-05-17 16:02:31 +00:00
Alan Modra 16d96b5b8f PR ld/12760
include/
	* bfdlink.h (struct bfd_link_callbacks <notice>): Add "flags" and
	"string" param.
bfd/
	* coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
	* elflink.c (elf_link_add_object_symbols): Likewise.
	* linker.c (_bfd_generic_link_add_one_symbol): Likewise.
ld/
	* ldmain.c (notice): Add "flags" and "string" param.
	* plugin.c (plugin_notice): Likewise.  Handle indirect, warning
	and constructor syms.
2011-05-17 13:02:18 +00:00
Alan Modra b14cbb11cc daily update 2011-05-17 00:00:06 +00:00
Alan Modra dcf374b4fd daily update 2011-05-16 00:00:04 +00:00
Alan Modra 41e04eaa32 include/
* bfdlink.h (struct bfd_link_hash_entry): Remove u.undef.weak field.
bfd/
	* linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
2011-05-15 23:44:07 +00:00
Richard Sandiford 77c56f443d bfd/
* elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
	global GOT entries for GOT_PAGE relocations against global symbols.

ld/testsuite/
	* lib/ld-lib.exp (run_ld_link_tests): Simplify pass/fail logic.
	Fail if the link command fails and if no test rules are defined.
	* ld-mips-elf/reloc-6a.s, ld-mips-elf/reloc-6b.s: New tests.
	* ld-mips-elf/mips-elf.exp: Run them.
2011-05-15 18:52:01 +00:00
Alan Modra cf284ff77f daily update 2011-05-15 00:00:07 +00:00
Alan Modra 9433e6ae51 daily update 2011-05-14 00:00:06 +00:00
Bernd Schmidt 2a6163793f ld/
(eelf32_tic6x_linux_be.c, eelf32_tic6x_linux_le.c,
	eelf32_tic6x_elf_be.c, eelf32_tic6x_elf_le.c): New rules.
	* Makefile.am (ALL_EMULATIONS): Add these files.
	(eelf32_tic6x_be.c, eelf32_tic6x_le.c): Depend on tic6xdsbt.em.
	* Makefile.in: Regenerated.
	* emultempl/tic6xdsbt.em (is_tic6x_target): Allow more tic6x target
	vectors.
	* emulparams/elf32_tic6x_elf_be.sh: New file.
	* emulparams/elf32_tic6x_elf_le.sh: New file.
	* emulparams/elf32_tic6x_linux_be.sh: New file.
	* emulparams/elf32_tic6x_linux_le.sh: New file.
	* configure.tgt (tic6x-*-elf, tic6x-*-uclinux): New.
	(tic6x-*-*): Replaced by these.

	ld/testsuite/
	* ld-tic6x/dsbt.ld (OUTPUT_FORMAT): Add.
	* ld-tic6x/tic6x.exp: Add OSABI tests.

	bfd/
	* config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
	(tic6x-*-*): Replaced by these.
	* elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
	(elf32_tic6x_check_relocs): Create dynamic sections if -shared.
	(elf_backend_relocs_compatible, elf_backend_post_process_headers):
	Define.
	(elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
	TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
	"elf32-target.h" two more times.
	* configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
	bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
	bfd_elf32_tic6x_elf_le_vec.
	* configure: Regenerate.
2011-05-13 18:15:33 +00:00
Jan Beulich 3ac5406bdb bfd/
2011-05-13  Jan Beulich  <jbeulich@novell.com>

	* config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.

ld/
2011-05-13  Jan Beulich  <jbeulich@novell.com>

	* configure.tgt: Add targets x86_64-*-pe and x86_64-*-pep.
2011-05-13 06:43:13 +00:00
Alan Modra fa7ca593be daily update 2011-05-13 00:00:04 +00:00
Jan Kratochvil 335e41d4eb bfd/
* config.in: Regenerated.
	* configure: Regenerated.
	* configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
	HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
	HAVE_PSINFO32_T_PR_PID.
	* elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
	HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
	and HAVE_PSINFO32_T_PR_PID.
	* hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
2011-05-12 07:41:43 +00:00
Alan Modra db1d9305a5 daily update 2011-05-12 00:00:04 +00:00
Alan Modra 7402efbaab daily update 2011-05-11 00:00:06 +00:00