Commit Graph

4335 Commits

Author SHA1 Message Date
Alan Modra 315adc8917 daily update 2005-03-17 23:00:05 +00:00
Nick Clifton 36868d45f8 (read_indirect_string): Fix apparent typo, check dwarf_str_buffer allocation,
not dwarf_abbrev_buffer.
2005-03-17 08:24:28 +00:00
Alan Modra 9050699f3f daily update 2005-03-16 23:00:06 +00:00
H.J. Lu 57316bff0a bfd/
2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>

	* elflink.c (elf_mark_used_section): New.
	(bfd_elf_gc_sections): Call elf_gc_mark_section for
	non-relocatable link if we don't do GC.

include/

2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>

	* bfdlink.h (bfd_link_info): Add gc_sections.

ld/

2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_finish): Remove
	unused empty output sections for non-relocatable link.

	* ld.h (args_type): Remove gc_sections.

	* ldlang.c (lang_mark_used_section): New.
	(lang_gc_sections): Use link_info.gc_sections instead of
	command_line.gc_sections.
	* ldmain.c (main): Likewise.
	* lexsup.c (parse_args): Likewise.
	* ldlang.c (lang_process): Call lang_mark_used_section.

	* ldmain.c (main): Initialize link_info.gc_sections to FALSE.

ld/testsuite/

2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-alpha/tlsbin.rd: Updated for empty section removal.
	* ld-alpha/tlsbinr.rd: Likewise.
	* ld-alpha/tlspic.rd: Likewise.
	* ld-arm/mixed-lib.sym: Likewise.
	* ld-i386/tlsbin.rd: Likewise.
	* ld-i386/tlsnopic.rd: Likewise.
	* ld-i386/tlspic.rd: Likewise.
	* ld-ia64/tlsbin.rd: Likewise.
	* ld-ia64/tlspic.rd: Likewise.
	* ld-powerpc/apuinfo.rd: Likewise.
	* ld-powerpc/powerpc.exp: Likewise.
	* ld-powerpc/tlsexe32.r: Likewise.
	* ld-s390/tlsbin.rd: Likewise.
	* ld-s390/tlsbin_64.rd: Likewise.
	* ld-s390/tlspic.rd: Likewise.
	* ld-s390/tlspic_64.rd: Likewise.
	* ld-sh/tlsbin-2.d: Likewise.
	* ld-sh/tlspic-2.d: Likewise.
	* ld-sparc/tlssunbin32.rd: Likewise.
	* ld-sparc/tlssunnopic32.rd: Likewise.
	* ld-sparc/tlssunpic32.rd: Likewise.
	* ld-x86-64/tlsbin.rd: Likewise.
	* ld-x86-64/tlspic.rd: Likewise.
2005-03-16 21:52:48 +00:00
Nick Clifton 569acd2ce2 Rename switch to enable/disable -Werror to --enable-werror/--disable-werror
for compatibility with gcc.
2005-03-16 17:18:17 +00:00
Nick Clifton 1ad12f975f Enable -Werror by default 2005-03-16 16:17:14 +00:00
Nick Clifton 3b5d3310ee Convert to ISO C90 formatting. 2005-03-16 14:37:15 +00:00
Alan Modra 25dbc73a85 * elf32-ppc.c: Divide file into general and linker specific
functions.  Sort linker functions into roughly the order in which
	they are called by the ELF linker code.
2005-03-16 06:11:51 +00:00
Alan Modra cb2d1ef2ae bfd/
* elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
	on section.  Correct comment, and add FIXME.
	(ppc_elf_additional_program_headers): Don't bump header count for
	interp.  Test SEC_ALLOC, not SEC_LOAD, and don't test size.
	(ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
	do allocate memory if they need it.
ld/
	* emulparams/elf32ppclinux.sh (OTHER_READWRITE_SECTION): Delete.
	(OTHER_RELRO_SECTIONS): Set this instead.
ld/testsuite/
	* ld-powerpc/tlsexe32.d: Update.
	* ld-powerpc/tlsexe32.g: Update.
	* ld-powerpc/tlsexe32.r: Update.
	* ld-powerpc/tlsexe32.t: Update.
	* ld-powerpc/tlsso32.d: Update.
	* ld-powerpc/tlsso32.g: Update.
	* ld-powerpc/tlsso32.r: Update.
	* ld-powerpc/tlsso32.t: Update.
2005-03-16 02:41:28 +00:00
Alan Modra ca07ff3495 daily update 2005-03-15 23:00:05 +00:00
Nick Clifton 34723071b5 Add support for an x86_64-elf target 2005-03-15 14:14:08 +00:00
Alan Modra 729ae8d20e Commit new Spanish translation. 2005-03-15 05:25:37 +00:00
Alan Modra 8e9c1e6d1c daily update 2005-03-14 23:00:05 +00:00
H.J. Lu f05819304c 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
	for global symbol when reporting overflow.
2005-03-14 18:55:44 +00:00
Alan Modra 114bfe309a daily update 2005-03-13 23:00:05 +00:00
Alan Modra 3d982b6f53 daily update 2005-03-12 23:00:07 +00:00
Alan Modra afea7a384b daily update 2005-03-11 23:00:06 +00:00
Jakub Jelinek 390c0e4288 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
* libbfd.h: Rebuilt.
	* archive.c (_bfd_ar_spacepad): New function.
	(_bfd_construct_extended_name_table, _bfd_write_archive_contents,
	bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
	coff_write_armap): Use it.
	(bfd_ar_hdr_from_filesystem): Likewise.  Fix HP-UX large
	uid/gid support.
	* archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
2005-03-11 16:37:17 +00:00
Alan Modra 41bc16b289 daily update 2005-03-10 23:00:05 +00:00
Mark Kettenis a2633f4e94 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
has_table to the start of the function.
2005-03-10 21:26:53 +00:00
Ben Elliston 109f709619 * archive.c: Include hashtab.h.
(struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
	(_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
	(hash_file_ptr): New function.
	(eq_file_ptr): Likewise.
	(_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
	* libbfd-in.h: Include hashtab.h.
	(struct artdata): Change `cache' member type to htab_t.
	* libbfd.h: Rebuild.
2005-03-10 00:29:35 +00:00
Alan Modra 291108ad01 daily update 2005-03-09 23:00:05 +00:00
Alan Modra e4362844bc daily update 2005-03-08 23:00:05 +00:00
Daniel Jacobowitz 664fe1be18 * configure.in: Bump version to 2.16.90.
* configure: Regenerated.
2005-03-08 15:09:23 +00:00
Alan Modra 048325cf9c daily update 2005-03-07 23:00:05 +00:00
Jakub Jelinek 0709bb2246 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
close is a function like macro in system headers.
2005-03-07 10:32:38 +00:00
Alan Modra b18e2ae59e PR ld/778
* elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
	_GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
2005-03-07 06:01:17 +00:00
Alan Modra 3ab8f84c9c daily update 2005-03-06 23:00:05 +00:00
Alan Modra 1f17067849 * elf.c (elfcore_grok_win32pstatus): Warning fixes. 2005-03-06 02:02:15 +00:00
Alan Modra 486d6afcde daily update 2005-03-05 23:00:05 +00:00
Alan Modra 06647dfdde Regenerate .pot files 2005-03-05 12:14:34 +00:00
Alan Modra 93f3fa9956 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
with is_func.
	(func_desc_adjust): Force dot-syms local in executables as well
	as shared libs.
2005-03-05 11:44:14 +00:00
Thiemo Seufer bbe506e8ba bfd/ChangeLog
* elfxx-mips.c (mips_elf_calculate_relocation): Handle special
	'__gnu_local_gp' symbol used by gas -mno-shared.

	gas/ChangeLog
	* config/tc-mips.c (macro_build_lui): Use '__gnu_local_gp'
	instead of '_gp' for -mno-shared optimization.
	(s_cpload): Ditto.
	(s_abicalls): Document it in the comment.
	(md_show_usage): Document the -mno-shared option.

	gas/testsuite/ChangeLog
	* gas/mips/elf-rel23b.d: Use '__gnu_local_gp' instead of '_gp'
	for -mno-shared optimization.
	* gas/mips/elf-rel25a.d: Ditto.

	ld/testsuite/ChangeLog
	* ld-mips-elf/multi-got-no-shared-1.s,
	ld-mips-elf/multi-got-no-shared-2.s,
	ld-mips-elf/multi-got-no-shared.d: New tests.
	* ld-mips-elf/mips-elf.exp: Run them.
2005-03-05 00:01:44 +00:00
Alan Modra f829048aac daily update 2005-03-04 23:00:06 +00:00
Alan Modra ed34f85a17 daily update 2005-03-03 23:00:06 +00:00
H.J. Lu d27f5fa16e 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (elf_backend_data): Add "const char *" to
	elf_backend_section_from_phdr.

	* elf.c (bfd_section_from_phdr): Pass "proc" to the
	elf_backend_section_from_phdr hook.
2005-03-03 20:52:31 +00:00
Alan Modra 9553c6388c update copyright dates 2005-03-03 11:41:03 +00:00
Alan Modra 965baacd2a daily update 2005-03-02 23:00:05 +00:00
Daniel Jacobowitz 0f20cc3522 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
(struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
	and tls_ldm_offset.
	(struct mips_elf_got_per_bfd_arg): Add global_count.
	(struct mips_elf_count_tls_arg): New.
	(struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
	(struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
	(GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
	(GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
	(TLS_RELOC_P): Define.
	(TP_OFFSET, DTP_OFFSET): Define.
	(dtprel_base, tprel_base): New functions.
	(mips_elf_link_hash_newfunc): Initialize tls_type.
	(mips_elf_got_entry_hash, mips_elf_got_entry_eq)
	(mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
	TLS entries.
	(mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
	(mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
	(mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
	(mips_tls_got_index): New functions.
	(mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
	arguments.  Pass them to mips_elf_create_local_got_entry.  Use
	mips_tls_got_index.
	(mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
	Handle TLS entries.
	(mips_elf_got_page, mips_elf_got16_entry): Update calls to
	mips_elf_create_local_got_entry.
	(mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
	arguments.  Handle TLS entries.
	(mips_elf_sort_hash_table_f): Add non-TLS assertions.
	(mips_elf_record_local_got_symbol): Add new TLS_FLAG argument.  Handle
	TLS entries.
	(mips_elf_record_global_got_symbol): Likewise.
	(mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
	Count TLS entries.
	(mips_elf_merge_gots): Handle TLS entries when merging.
	(mips_elf_initialize_tls_index): New function.
	(mips_elf_set_global_got_offset): Handle TLS entries.
	(mips_elf_adjust_gp): Handle TLS.
	(mips_elf_multi_got): Remove redundant call to
	mips_elf_resolve_final_got_entries.  Initialize global_count.
	Correct a comment.  Initialize new TLS members of mips_got_info.
	Assign TLS GOT indexes for new GOTs.
	(mips_elf_create_got_section): Initialize new TLS members of
	mips_got_info.
	(mips_elf_calculate_relocation): Handle TLS relocs.
	(_bfd_mips_elf_check_relocs): Likewise.  Update calls to changed
	functions.
	(_bfd_mips_elf_always_size_sections): Handle TLS.
	(_bfd_mips_elf_size_dynamic_sections): Likewise.
	(_bfd_mips_elf_finish_dynamic_symbol): Likewise.  Update calls to
	changed functions.
	(_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
	(_bfd_mips_elf_hide_symbol): Handle TLS.
	* elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
	(mips_reloc_map): Add TLS relocs.
	* elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
	* elf64-mips.c (mips_elf64_howto_table_rel)
	(mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
	* reloc.c: Define new MIPS TLS relocations.
	* libbfd.h, bfd-in2.h: Regenerated.
2005-03-02 21:23:21 +00:00
Jan Beulich bb14f52400 bfd/
2005-03-02  Jan Beulich  <jbeulich@novell.com>

	* Makefile.am: Add dependency of cache.o on libiberty.h.
	* cache.c: Include libiberty.h.
	(bfd_open_file): Use unlink_if_ordinary instead of unlink.

binutils/
2005-03-02  Jan Beulich  <jbeulich@novell.com>

	* ar.c (remove_output): Use unlink_if_ordinary instead of unlink.
	* objcopy.c (copy_file): Likewise.
	(strip_main): Likewise.

gas/
2005-03-02  Jan Beulich  <jbeulich@novell.com>

	* as.c (main): Use unlink_if_ordinary instead of unlink.
	* messages.c (as_fatal): Likewise.

ld/
2005-03-02  Jan Beulich  <jbeulich@novell.com>

	* ldmain.c (remove_output): Use unlink_if_ordinary instead of unlink.
	* pe-dll.c (pe_dll_generate_implib): Likewise.
2005-03-02 09:03:58 +00:00
Zack Weinberg 8c1acd095d * elf.c (bfd_section_from_shdr <default case>): Call
elf_backend_section_from_shdr hook unconditionally, and return
	what it returns.
	(bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
	* elfxx-target.h (elf_backend_section_from_shdr)
	(elf_backend_section_from_phdr): Default to
	_bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
	respectively.
2005-03-02 04:47:25 +00:00
Alan Modra b79b65f6d8 daily update 2005-03-01 23:00:05 +00:00
Alan Modra a67a7b8bf5 * targets.h: Typo fix.
* bfd-in2.h: Regenerate.
2005-03-01 01:56:27 +00:00
Alan Modra 70bfececf5 * bout.c (b_out_write_object_contents): Don't use sizeof on host
structs to size on-disk structures.
	(b_out_set_section_contents): Size the external struct, not the
	internal one for on-disk size.
	(b_out_sizeof_headers): Likewise.
2005-03-01 00:38:52 +00:00
Alan Modra ceb1f1eff4 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
entry points with the func descriptor as well as undefweak.
2005-02-28 23:00:40 +00:00
Alan Modra b00b912563 daily update 2005-02-28 23:00:05 +00:00
Nick Clifton f67e617a26 (pe_ILF_build_a_bfd): Do not assume that an @ will be present when
IMPORT_NAME_UNDOECRATE is used.
2005-02-28 16:07:33 +00:00
H.J. Lu af44c13841 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
PR 757
	* elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
	int.

	* elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
	to _bfd_elf_merge_symbol.

	* elflink.c (_bfd_elf_merge_symbol): Use the pointer to
	unsigned int to return the alignment of the old common symbol
	in the dynamic object.
	(_bfd_elf_add_default_symbol): Pass NULL to
	_bfd_elf_merge_symbol.
	(elf_link_add_object_symbols): Pass &old_alignment to
	_bfd_elf_merge_symbol. Get the alignment of the new common
	symbol in the dynamic object.
2005-02-28 15:57:13 +00:00
Alan Modra 0c10aee68f daily update 2005-02-27 23:00:05 +00:00
Alan Modra b413488773 daily update 2005-02-26 23:00:07 +00:00