Commit Graph

4454 Commits

Author SHA1 Message Date
Jerome Guitton d34a2b1dc9 * configure.in: Replace BFD_NEED_DECLARATION checks by the
corresponding AC_CHECK_DECLS.
	* sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
	HAVE_DECL_*.
	* bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
	* configure: Regenerate.
	* config.in: Ditto.
2005-04-22 13:58:14 +00:00
H.J. Lu 34f3e815d1 2005-04-21 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (INCLUDES): New. Add -D_GNU_SOURCE.
	(chew.o): Use it.
	* Makefile.in: Regenerate.
2005-04-22 05:21:49 +00:00
Alan Modra 533edbe2ca daily update 2005-04-22 00:00:05 +00:00
Andreas Schwab c2e70a82ce * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
unsigned from type of dynamic_interpreter.
	* elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
	casts again.
2005-04-21 12:19:55 +00:00
Andreas Schwab ff01938b1a * elf.c (assign_section_numbers): Fix comment. 2005-04-21 12:13:37 +00:00
Jerome Guitton 0858d3ec47 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
for struct som_exec_auxhdr fields.
2005-04-21 10:47:49 +00:00
Nick Clifton 7920ce38c3 Update to ISO-C90 and fix formatting 2005-04-21 07:45:39 +00:00
Alan Modra 20b26460df daily update 2005-04-21 00:00:07 +00:00
David S. Miller e8be8da4fb * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
(_bfd_sparc_elf_link_hash_table_create): Likewise.
	(allocate_dynrelocs): Likewise.
2005-04-20 18:39:26 +00:00
Jerome Guitton ec7b76fec3 * configure.in: Fix the check for basename declaration. Add check
for declarations of ftello, ftello64, fseeko, fseeko64.
	* configure: Regenerate.
	* config.in: Ditto.
	* sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
2005-04-20 15:00:15 +00:00
Alan Modra 06897b50b3 daily update 2005-04-20 00:00:06 +00:00
David S. Miller 22b75d0ae6 * elfxx-sparc.c: New file.
* elfxx-sparc.h: New file.
	* Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
	(BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
	(elfxx-sparc.lo): New rule.
	(elf32-sparc.lo): Add elfxx-sparc.h dependency.
	(elf64-sparc.lo): Likewise.
	* configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
	(bfd_elf64_sparc_vec): Likewise.
	* configure: Regenerate.
	* elf32-sparc.c: Remove common code now in elfxx-sparc.c
	* elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
	which is more consistent with elf32-sparc.c
2005-04-19 21:26:30 +00:00
Daniel Jacobowitz a008ac0314 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
(mips_elf_create_local_got_entry): Check h->root.forced_local.
2005-04-19 18:33:20 +00:00
Alan Modra c87b5a93b2 bfd/
* elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
	dynamic relocs in non-SEC_ALLOC sections.
	(ppc_elf_gc_sweep_hook): Likewise.
	(ppc_elf_relax_section): Likewise.
	(ppc_elf_relocate_section): Likewise.
ld/testsuite/
	* ld-powerpc/reloc.d: Update to suit removal of non-alloc relocs.
2005-04-19 05:44:55 +00:00
Alan Modra d959e1a193 daily update 2005-04-19 00:00:06 +00:00
Nick Clifton 7cefacd397 (xcoff64_core_p): Fix compile time warning assigning a value to return_value. 2005-04-18 12:10:57 +00:00
H.J. Lu 278d8f3760 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
PR 855
	* elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
	created group data.
2005-04-18 03:13:49 +00:00
H.J. Lu 20dbb49d3c 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
PR 855
	* elf.c (setup_group): Properly handle zero group count.
2005-04-18 03:12:51 +00:00
Alan Modra a3b8c86ce6 daily update 2005-04-18 00:00:04 +00:00
Mark Kettenis 6a808a40ca * som.c (hppa_som_reloc, som_mkobject, som_is_space)
(som_is_subspace, compare_subspaces, som_compute_checksum)
(som_build_and_write_symbol_table, som_slurp_symbol_table): New
protoypes.
(hppa_som_reloc, compare_syms, compare_subspaces)
(som_print_symbol, som_get_section_contents)
(som_set_section_contents): Remove space after 'void *'.
(som_bfd_print_private_bfd_data): Use %lx to print longs.
(som_bfd_merge_private_bfd_data)
(som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
defines.
2005-04-17 12:45:30 +00:00
Alan Modra 62310a091f daily update 2005-04-17 00:00:05 +00:00
Alan Modra cae4cddaa3 daily update 2005-04-16 00:00:06 +00:00
Julian Brown 33bfe77466 * bfd/bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
* bfd/bfd-in2.h: Regenerate.
	* bfd/elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
	(elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
	(bfd_elf32_arm_set_target_relocs): Handle use_blx.
	(elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
	relocations if requested to.
	(allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
	use_blx rather than symbian_p.
	(elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
	use_blx is in effect.
	(elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
	for SymbianOS.
	* ld/ld.texinfo: Document --use-blx.
	* ld/emultempl/armelf.em (use_blx): New variable.
	(arm_elf_create_output_section_statements): Communicate value of
	use_blx to bfd.
	(PARSE_AND_LIST_PROLOGUE): Add OPTION_USE_BLX.
	(PARSE_AND_LIST_OPTIONS): Add --use-blx option.
	(PARSE_AND_LIST_ARGS_CASES): Add OPTION_USE_BLX case.
2005-04-15 16:37:47 +00:00
Nick Clifton 745c12f87d Use fprintf_vma to print vma values. 2005-04-15 11:47:47 +00:00
Alan Modra 2e8b3a6111 PR ld/815
* elflink.c (elf_smash_syms): Clear undef.next if it's not being
	used as a list pointer.
2005-04-15 03:42:46 +00:00
Alan Modra 813ec89bc0 daily update 2005-04-15 00:00:05 +00:00
Alan Modra 9e9b66a956 bfd/
* Makefile.am (NO_WERROR): Define.
	* warning.m4: New file
	* acinclude.m4: Include warning.m4.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
bfd/doc/
	* Makefile.in: Regenerate.
binutils/
	* Makefile.am (NO_WERROR): Define.  Use instead of -Wno-error.
	* configure.in: Include ../bfd/warning.m4 contents.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
gas/
	* Makefile.am (NO_WERROR): Define.  Use instead of -Wno-error.
	* acinclude.m4: Include ../bfd/warning.m4.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
gprof/
	* Makefile.am (NO_WERROR): Define.
	* acinclude.m4: Include ../bfd/warning.m4.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
ld/
	* Makefile.am (NO_WERROR): Define.  Use instead of -Wno-error.
	* configure.in: Include ../bfd/warning.m4 contents.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
opcodes/
	* Makefile.am (NO_WERROR): Define.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2005-04-14 05:26:44 +00:00
Alan Modra 92ceba1e4f * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
Write trailing padding.
2005-04-14 02:27:56 +00:00
Alan Modra 8699aa54a2 * merge.c (merge_strings): Round up section size for alignment. 2005-04-14 00:27:20 +00:00
Alan Modra ee9d5ee534 daily update 2005-04-14 00:00:04 +00:00
Jakub Jelinek 40937810e1 2005-04-14 David S. Miller <davem@davemloft.net>
bfd/
	Add TLS support for 64-bit Sparc ELF.
	*  elf64-sparc.c (sparc64_elf_dyn_relocs,
	sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
	(GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
	sparc64_elf_hash_entry, sparc64_elf_tdata,
	sparc64_elf_local_got_tls_type): New defines.
	(sparc64_elf_mkobject): New function.
	(sparc64_elf_link_hash_table): Add members for dynamic linker
	sections PLT, RELPLT, DYNBSS, and RELBSS.  Add tls_ldm_got
	uion to track TLS GOT references.  Add sym_sec to cache
	mappings from local sym to section.
	(link_hash_newfunc): New function.
	(sparc64_elf_bfd_link_hash_table_create): Rename to
	sparc64_elf_link_hash_table_create for consistency.
	Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
	(sparc64_elf_create_dynamic_sections): Initialize new section
	members of sparc64_elf_link_hash_table.  Only init srelbss
	if not-shared.
	(sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
	New functions.
	(SPARC_NOP): Define.
	(sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
	sparc64_elf_plt_ptr_offset): Delete.
	(sparc64_plt_entry_build): New function to build PLT entries
	gradually instread of all at once at the end of linking.
	(sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
	local vars.  Get them from sparc64_elf_hash_table instead.
	Check early on if r_symndx is in bounds.  Handle TLS transitions.
	Account for TLS GOT references and DF_STATIC_TLS, as needed.
	For TLS relocs, record the tls_type in either
	sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
	appropriate.  For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
	to the __tls_get_addr symbol.  For PLT relocs, track references
	via h->plt.refcount.  When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
	PC_LM22} and h not-NULL, set h->non_got_ref.  For global data
	symbol references, count the number of relocations needed for
	that symbol.  For default switch case, don't error, this lets
	the TLS relocs not explicitly handled by this function get
	accepted.
	(sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
	(sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
	it from sparc64_elf_hash_table.  Store the real PLT offset
	in h->plt.offset, and build PLT entries one at a time.  Also
	get .dynbss section pointer from htab.
	(allocate_dynrelocs, readonly_dynrelocs,
	sparc64_omit_section_dynsym): New functions.
	(sparc64_elf_omit_section_dynsym): Use these new functions as
	helpers.
	(dtpoff_base, tpoff): New functions.
	(sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
	locals, get them from sparc64_elf_hash_table.  Handle TLS
	relocations and refcounting in main relocation loop.
	(sparc64_elf_finish_dynamic_symbol): Use
	sparc64_elf_link_hash_table.  Build PLT entries as we see
	them.  Handle TLS GOT relocations.
	(sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
	from sparc64_elf_hash_table.  Initialize only PLT header
	not all entries since we not build PLT entries one by one.
	(elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
	elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
	elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
ld/testsuite/
	* ld-selective/sel-dump.exp: Do not exclude sparc64-*.
	* ld-selective/selective.exp: Likewise.
	* ld-sparc/sparc.exp: Add {32,64}-bit prefix to test
	names so we know which one is failing.  Run sparc64 TLS
	tests on multi-arch sparc platforms.
	* ld-sparc/tls64.sd, ld-sparc/tlssunbin64.dd,
	ld-sparc/tlssunbin64.rd, ld/testsuite/ld-sparc/tlssunbin64.sd,
	ld-sparc/tlssunbin64.td, ld-sparc/tlssunnopic64.dd,
	ld-sparc/tlssunnopic64.rd, ld-sparc/tlssunnopic64.sd,
	ld-sparc/tlssunpic64.dd, ld-sparc/tlssunpic64.rd,
	ld-sparc/tlssunpic64.sd, ld-sparc/tlssunpic64.td): Update now
	that sparc64 ELF does support TLS.
2005-04-13 22:29:36 +00:00
H.J. Lu e75a280b02 bfd/
2005-04-13  Daniel Jacobowitz  <dan@codesourcery.com>

	* elflink.c (elf_link_input_bfd): Update check for removed
	sections.

ld/testsuite/

2005-04-13  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elf/empty.d: New file.
	* ld-elf/empty.s: Likewise.
2005-04-13 16:44:08 +00:00
Alan Modra 85f347f77d daily update 2005-04-13 00:00:07 +00:00
Alan Modra ceae3e339f bfd/
* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* libcoff.h: Regenerate.
bfd/doc/
	* Makefile.in: Regenerate.
binutils/
	* Makefile.am: Run "make dep-am".
	(syslex.o, sysinfo.o, arparse.o, arlex.o): Add -Wno-error to command.
	(sysroff.o, defparse.o, deflex.o): Likewise.
	(nlmheader.o, rcparse.o, rclex.o): Likewise.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
gas/
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
ld/
	* Makefile.am: Run "make dep-am".
	(ldgram.o, ldlex.o, deffilep.o): Add -Wno-error to command.
	* Makefile.in: Regenerate.
	* config.in: Regenerate.
2005-04-12 02:50:28 +00:00
Alan Modra 8e29614e7e daily update 2005-04-12 00:00:05 +00:00
H.J. Lu ab82c5b97f 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
* linker.c (_bfd_generic_link_output_symbols): Also check if
	the output section of an input section has been removed from
	the output file.

	* section.c (bfd_section_list_remove): Clear the next field
	of the removed section.
	(bfd_section_removed_from_list): New.
	* bfd-in2.h: Regenerated.
2005-04-11 22:21:23 +00:00
Jakub Jelinek bd695bcc90 2005-04-11 David S. Miller <davem@davemloft.net>
* elf32-sparc.c (elf32_sparc_relocate_section,
	R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
	R_SPARC_TLS_LE_{HIX22,LOX10}.
	(elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
	xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
	(elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
	or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.

	* ld-sparc/tlssunbin32.dd: Update for TLS relocation fixes.
	* ld-sparc/tlssunbin32.rd: Likewise.
	* ld-sparc/tlssunbin32.sd: Likewise.
	* ld-sparc/tlssunpic32.dd: Likewise.
2005-04-11 22:13:28 +00:00
H.J. Lu b5b2699cd6 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
* coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
2005-04-11 16:55:48 +00:00
Nick Clifton 116c20d240 Convert to ISO C90 formatting 2005-04-11 08:23:05 +00:00
Alan Modra c84d9728ba daily update 2005-04-11 00:00:10 +00:00
Alan Modra f65a6fe0b4 daily update 2005-04-10 00:00:04 +00:00
Alan Modra a5fb67e34a daily update 2005-04-09 00:00:09 +00:00
Paul Brook 8f6277f5c0 2005-04-08 Paul Brook <paul@codesourcery.com>
* elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
	(ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
	(ARM2THUMB_PIC_GLUE_SIZE): Define.
	(a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
	(elf32_arm_to_thumb_stub): Create PIC stubs.
	(record_arm_to_thumb_glue): Use different stub size for relocatable
	images.
2005-04-08 11:47:59 +00:00
Alan Modra f8569bd74f daily update 2005-04-08 00:00:06 +00:00
Alan Modra 23a64347c9 daily update 2005-04-07 00:00:06 +00:00
Alan Modra 7a481748b8 daily update 2005-04-06 00:00:08 +00:00
Alan Modra 8c1d1bb8a2 * elf64-ppc.c (dec_dynrel_count): New function split out from
ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
	(ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
	(ppc64_elf_tls_optimize): Likewise.
2005-04-05 12:16:38 +00:00
Nick Clifton 8c1017202f Provide .wcookie section for OpenBSD/sparc64. 2005-04-05 08:01:18 +00:00
Nick Clifton 429cc0ae05 New translation: Kinyarwanda 2005-04-05 07:58:41 +00:00
Richard Sandiford cc2e31b90b * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
(_bfd_mips_elf_section_from_shdr): Use it to check for recognized
	SHT_MIPS_OPTIONS names.  Allow all sections with unrecognised
	section flags.
	(_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
	to check for SHT_MIPS_OPTIONS sections.
	(_bfd_mips_elf_set_section_contents): Likewise.
2005-04-05 07:35:12 +00:00