Commit Graph

1698 Commits

Author SHA1 Message Date
Alan Modra 010237a9c2 daily update 2002-01-24 23:00:04 +00:00
Nick Clifton 391154e9f7 fix typo 2002-01-24 17:08:42 +00:00
Alan Modra 86a3211297 daily update 2002-01-23 23:00:05 +00:00
Richard Henderson 8ba89f17ac * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
plt entries for undefweak symbols.
2002-01-23 21:51:53 +00:00
Nick Clifton c69539487b Add: bfd_elf32_ia64_hpux_big_vec, bfd_elf64_ia64_hpux_big_vec and
bfd_elf32_h8300_vec to DEFAULT_VECTOR.
2002-01-23 12:21:07 +00:00
Alan Modra 41bd81abfa * elf64-ppc.c: Remove stale part of ABI comment.
(NO_OPD_RELOCS): Define.
	(ppc64_elf_check_relocs): Use it.
	(ppc64_elf_relocate_section): Here too.
	(build_one_stub): Don't point function syms at the stub.  Instead,
	hijack plt.offset.
	(ppc64_elf_relocate_section): Check whether REL24 relocs should
	really go to the stub.  Make all dynamic relocs in opd against
	locals.
	(ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
	plt.offset.
2002-01-23 11:21:18 +00:00
Alan Modra 9d7c87e6b6 daily update 2002-01-22 23:00:05 +00:00
Richard Henderson f304919d26 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp. 2002-01-22 09:51:58 +00:00
Alan Modra 60ee0d4a8b * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
TOC_BASE_OFF adjustment.
2002-01-22 09:05:07 +00:00
Alan Modra c0ef99a773 run "make dep-am"; automake
regenerate po/POTFILES.in
2002-01-22 08:58:00 +00:00
Alan Modra 64328b468d * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
host defines.
2002-01-22 00:47:21 +00:00
Alan Modra 95cc1d377b daily update 2002-01-21 23:00:04 +00:00
Hans-Peter Nilsson 5995366531 Correct attribution 2002-01-21 22:00:00 +00:00
Hans-Peter Nilsson 58255df39c * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
Check for and emit error if sgot is NULL at this point.
2002-01-21 21:57:48 +00:00
Jason Thorpe 9596feeafe bfd:
* config.bfd (ia64*-*-netbsd*): New target.

gas:
* configure.in (ia64-*-netbsd*): New target.
* configure: Regenerate.

ld:
* configure.tgt (ia64-*-netbsd*): New target.
2002-01-21 18:17:28 +00:00
Alan Modra 7b45c6e1da comment typo fixes 2002-01-21 14:03:27 +00:00
Alan Modra e86ce104e2 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
is_func_descriptor fields.
	(link_hash_newfunc): Init them.
	(ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
	dot are candidates for plt entries.  When processing .opd relocs,
	set function descriptor strings to point inside function code
	string, and set new ppc_link_hash_entry fields.
	(ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
	(ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
	function descriptors.  It's now done in..
	(func_desc_adjust): New.
	(ppc64_elf_func_desc_adjust): New.
	(define elf_backend_always_size_sections): Define.
	(ppc64_elf_hide_symbol): New.
	(define elf_backend_hide_symbol): Define.
	(allocate_dynrelocs): Remove code looking up function descriptors
	as that has been done earlier.
	(ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
	table.
	(ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
	up function descriptor.
	(build_one_stub): Look up the function code sym.  Check for
	invalid plt offsets.
	(ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
	Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
2002-01-21 12:15:07 +00:00
Alan Modra e5094212df * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
boolean param.
	(_bfd_elf_link_hash_hide_symbol): Likewise.
	* elflink.h (elf_link_add_object_symbols): Adjust call to
	elf_backend_hide_symbol.
	(elf_fix_symbol_flags): Likewise.
	(elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
	than bfd_alloc.
	* elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
	Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
	* elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
	(clobber_millicode_symbols): Adjust to suit new hide_symbol.
	* elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
	and adjust to suit.
	* elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
	_bfd_elf_link_hash_hide_symbol rather than duplicating code.
	* elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
2002-01-21 10:29:09 +00:00
Alan Modra 291d2e20bf daily update 2002-01-20 23:00:05 +00:00
Alan Modra 0009e18231 daily update 2002-01-19 23:00:05 +00:00
Alan Modra d7d8e1284b daily update 2002-01-18 23:00:04 +00:00
Alan Modra 40b8271bdd * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
dynamic function descriptor symbol, not the associated function
	symbol.
2002-01-18 01:22:02 +00:00
Alan Modra c2408ccfbb daily update 2002-01-17 23:00:04 +00:00
Eric Christopher 55baa95bb2 2002-01-17 Eric Christopher <echristo@redhat.com>
* elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
2002-01-17 20:06:48 +00:00
Nick Clifton 328577adeb Regenerate .pot and .po files 2002-01-17 14:12:08 +00:00
Alan Modra af746e92cb * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
Remove "Elf_Internal_Shdr *" param.
	(_bfd_mips_elf_section_from_bfd_section): Ditto.
	* elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
	* elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
	* elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
	* elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
	* elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
	* elf.c (_bfd_elf_section_from_bfd_section): Allow backend
	function to override special sections.  Remove hdr arg from
	backend call, and don't loop.
2002-01-17 13:02:40 +00:00
Andreas Schwab ce5fe2c658 Remove leftover conflict marker. 2002-01-17 11:01:39 +00:00
Eric Christopher 175e996239 2002-01-16 Eric Christopher <echristo@redhat.com>
* elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
	on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
	relocations requiring gp0 and gp.
2002-01-17 08:19:08 +00:00
Alan Modra 4c2ef66dbb daily update 2002-01-16 23:00:04 +00:00
Richard Earnshaw 96a846ea23 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
EF_ARM_VFP_FLOAT.
(elf32_arm_print_private_bfd_data): Likewise.
2002-01-16 13:01:54 +00:00
Nick Clifton af3ae48ddd Import new Turkish translations. 2002-01-16 10:17:48 +00:00
Alan Modra 10ed1bba5b * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
(ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
	(ORI_R0_R0_0): Correct.
2002-01-16 07:32:04 +00:00
Alan Modra 5d1634d792 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
when plt_not_loaded.
	* elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
	clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
	(PLT_INITIAL_ENTRY_SIZE): Set to 24.
	(ppc64_elf_glink_code): Delete.
	(PPC64_ELF_GLINK_SIZE): Delete.
	(ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
	BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
	ORI_R0_R0_0): Define.
	(PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
	(struct ppc_link_hash_table): Add sstub and plt_overflow.
	(ppc64_elf_link_hash_table_create): Init them.
	(ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
	Don't copy to shared lib.
	(ppc64_elf_check_relocs): Call bfd_set_error on errors.
	(ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
	(allocate_dynrelocs <plt>): Don't change function sym here.  Make
	room for .stub and .glink code.
	(ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
	DT_PPC64_GLINK.
	(ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
	bfd_elf64_bfd_final_link.
	(bfd_elf64_bfd_final_link): Don't define.
	(ppc64_elf_size_stubs): New.
	(build_plt_stub): New.
	(build_one_stub): New.
	(ppc64_elf_build_stubs): New.
	(ppc64_elf_relocate_section <toc relocs>): Remove assert.
	(ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
	(ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
	DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
	case output sections not separate.  Adjust DT_RELASZ to not
	include plt relocs.  Set reserved got entry.  Set got and plt
	entry size.
	(elf_backend_got_header_size): Set to 8.
	* elf64-ppc.h: New file.
2002-01-16 05:50:03 +00:00
Alan Modra c601ffdbb0 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
sections, use bfd_section_list_remove.
	* elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
	* elflink.h (elf_link_add_object_symbols): When removing all
	sections, use bfd_section_list_clear.
2002-01-16 05:37:10 +00:00
Alan Modra 69add918a1 daily update 2002-01-15 23:00:05 +00:00
Nick Clifton 8fb4cb7f7c Add Swedish translation 2002-01-15 13:58:25 +00:00
Jakub Jelinek d3c456e950 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
* elf.c (merge_sections_remove_hook): New function.
	(_bfd_elf_merge_sections): Pass it as 3rd argument to
	_bfd_merge_sections.
	* libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
	* libbfd.h: Rebuilt.
	* merge.c (_bfd_merge_sections): Add remove_hook argument.
	Call remove_hook if a SEC_EXCLUDE section is encountered.
2002-01-15 12:52:15 +00:00
Nick Clifton 1f7fd47891 Fix up generation of VTINHERIT relocs 2002-01-15 11:58:45 +00:00
Alan Modra 77ab017d24 daily update 2002-01-14 23:00:05 +00:00
Alan Modra 30d304de8b daily update 2002-01-13 23:00:04 +00:00
Alan Modra 35c04bf5fd daily update 2002-01-12 23:00:09 +00:00
Alan Modra ce17a66bc7 daily update 2002-01-11 23:00:15 +00:00
Michael Snyder b87011e952 2002-01-10 Michael Snyder <msnyder@redhat.com>
* elf.c (elfcore_write_prstatus): Use long instead of pid_t;
	(elfcore_write_pstatus): Use long instead of pid_t;
	* elf-bfd.h: Change prototypes to use long instead of pid_t;
2002-01-10 23:05:21 +00:00
Alan Modra a873495b95 daily update 2002-01-10 23:00:05 +00:00
Alan Modra 09a6cfe9bf daily update 2002-01-09 23:00:07 +00:00
Jason Thorpe b4db1224b7 include/elf:
* common.h: Update copyright years.
(NT_NETBSDCORE_PROCINFO): Define.
(NT_NETBSDCORE_FIRSTMACH): Define.

bfd:
* elf.c: Update copyright years.
(elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.

bintuils:
* readelf.c (get_netbsd_elfcore_note_type): Use
NT_NETBSDCORE_PROCINFO and NT_NETBSDCORE_FIRSTMACH.
2002-01-09 18:59:11 +00:00
Alan Modra f4d68ea590 daily update 2002-01-08 23:00:07 +00:00
Michael Snyder 97996af6f2 Fix typo. 2002-01-08 21:33:23 +00:00
Michael Snyder 7c76fa91ad 2002-01-08 Michael Snyder <msnyder@redhat.com>
Add capability to write corefile note sections, for gdb.
	* elf.c (elfcore_write_note): New function.
	(elfcore_write_prpsinfo): New function.
	(elfcore_write_prstatus): New function.
	(elfcore_write_pstatus): New function.
	(elfcore_write_prfpreg): New function.
	(elfcore_write_prxfpreg): New function.
	* elf-bfd.h: Add prototypes for above functions.
2002-01-08 21:31:36 +00:00
Alexandre Oliva e1fddb6bac * elf.c (elf_fake_sections): Propagate errors from
elf_backend_fake_section.
2002-01-08 16:42:57 +00:00
Jason Thorpe 8d05742ff6 bfd:
* Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
(BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
(elf32-sh-nbsd.lo): New rule.
* Makefile.in: Regenerate.
* config.bfd (sh*le-*-netbsdelf*): New target.
(sh*-*-netbsdelf*): New target.
* configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
(bfd_elf32_shnbsd_vec): New vector.
(bfd_elf32_shlnbsd_vec): New vector.
* configure: Regenerate.
* elf32-sh-nbsd.c: New file.
* targets.c: Update copyright years.
(_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
bfd_elf32_shnbsd_vec.

gas:
* configure.in (sh*le): Set cpu_type=sh and endian=little.
(sh*-*-netbsdelf*): New target.
* configure: Regenerate.
* tc-sh.h: Update copyright years.
(TARGET_FORMAT): Add version for TE_NetBSD.

ld:
* Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
(eshelf_nbsd.c): New rule.
(eshlelf_nbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (sh*le-*-netbsdelf*): New target.
(sh*-*-netbsdelf*): New target.
* emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
* ld/emulparams/shelf_nbsd.sh: New emulation.
* ld/emulparams/shlelf_nbsd.sh: New emulation.
2002-01-08 04:23:02 +00:00
Aldy Hernandez 1dba4cb4ba * bfd/coff-rs6000.c (READ20): Use bfd_scan_vma. 2002-01-08 00:28:36 +00:00
Alan Modra a4f0e458f6 daily update 2002-01-07 23:00:05 +00:00
Geoffrey Keating 47b22aef48 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
of a symbol in a section that will be deleted.
2002-01-07 17:55:37 +00:00
Nick Clifton be2d1673e4 Add spanish translation files 2002-01-07 17:37:59 +00:00
Nick Clifton 39e90f101a Rotated ChangeLog 2002-01-07 12:10:15 +00:00
Alan Modra 09f0f265aa daily update 2002-01-06 23:00:04 +00:00
Alan Modra d9cf1b54c5 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
argument so we can handle HP-UX specially.
	(elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
	(elfNN_hpux_backend_section_from_bfd_section): New for support
	of SHN_IA_64_ANSI_COMMON.
	(elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
	(is_unwind_section_name): Add special HP-UX support.
	(elfNN_ia64_section_from_shdr): Add support for more sections.
	(elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
	add support for more sections.
	(elfNN_ia64_additional_program_headers): Modify
	is_unwind_section_name call.
	(elfNN_ia64_modify_segment_map): Remove assumption that there is
	only one unwind section in segment.
2002-01-06 11:14:19 +00:00
Alan Modra 3f3c5c3404 * syms.c (_bfd_generic_make_empty_symbol): New function.
* libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
	_bfd_generic_make_empty_symbol.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.
	* hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
	(hppabsd_core_get_symtab_upper_bound): Don't define.
	(hppabsd_core_get_symtab): Likewise.
	(hppabsd_core_print_symbol): Likewise.
	(hppabsd_core_get_symbol_info): Likewise.
	(hppabsd_core_bfd_is_local_label_name): Likewise.
	(hppabsd_core_get_lineno): Likewise.
	(hppabsd_core_find_nearest_line): Likewise.
	(hppabsd_core_bfd_make_debug_symbol): Likewise.
	(hppabsd_core_read_minisymbols): Likewise.
	(hppabsd_core_minisymbol_to_symbol): Likewise.
	(hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
	Formatting fixes.
	* hpux-core.c: Similarly.
	* irix-core.c: Similarly.
	* osf-core.c: Similarly.
	* sco5-core.c: Similarly.
	* binary.c (binary_make_empty_symbol): Remove function, define as
	_bfd_generic_make_empty_symbol.
	* ihex.c (ihex_make_empty_symbol): Likewise.
	* mmo.c (mmo_make_empty_symbol): Likewise.
	* ppcboot.c (ppcboot_make_empty_symbol): Likewise.
	* srec.c (srec_make_empty_symbol): Likewise.
	* versados.c (versados_make_empty_symbol): Likewise.
	* vms.c (_bfd_vms_make_empty_symbol): Remove.
	(vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
	* vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
	rather than _bfd_vms_make_empty_symbol.
	* vms-misc.c (new_symbol): Likewise.
2002-01-06 07:30:35 +00:00
Alan Modra 44d212dcbf daily update 2002-01-05 23:00:06 +00:00
Alan Modra 9e7b37b31f * section.c (bfd_section_init): Remove unnecessary initialisations.
(bfd_section_list_clear): New function.
	(bfd_section_list_remove, bfd_section_list_insert): New macros.
	(_bfd_strip_section_from_output): Use them.
	* coffcode.h (coff_set_alignment_hook): Likewise.
	* elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
	* elf64-mips.c (mips_elf64_final_link): Likewise.
	* elf64-mmix.c (mmix_elf_final_link): Likewise.
	* sunos.c (sunos_add_dynamic_symbols): Likewise.
	* xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
	* bfd-in2.h: Regenerate.

	* netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
	rather than doing our own section handling.  Clean up after errors
	with bfd_release and bfd_section_list_clear.  Handle unexpected
	flags.
	* aoutf1.h (sunos4_core_file_p): Likewise.
	* aix386-core.c (aix386_core_file_p): Likewise.
	* cisco-core.c (cisco_core_file_validate): Likewise.
	* ptrace-core.c (ptrace_unix_core_file_p): Likewise.
	* trad-core.c (trad_unix_core_file_p): Likewise.

	* hppabsd-core.c (hppabsd_core_core_file_p):  Clean up after errors
	with bfd_release and bfd_section_list_clear.
	* hpux-core.c (hpux_core_core_file_p): Likewise.
	* irix-core.c (irix_core_core_file_p): Likewise.
	* lynx-core.c (lynx_core_file_p): Likewise.
	* osf-core.c (osf_core_core_file_p): Likewise.
	* rs6000-core.c (rs6000coff_core_p): Likewise.
	* sco5-core.c (sco5_core_file_p): Likewise.
2002-01-05 13:11:33 +00:00
Alan Modra 3f0a7f7f73 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
sign extension adjustments without conditionals.
2002-01-05 12:36:18 +00:00
Alan Modra e355ef1be4 daily update 2002-01-04 23:00:04 +00:00
Jakub Jelinek a3aa38ee6c * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
CIE at .eh_frame start is removed due to no FDEs referencing it.
2002-01-04 17:02:30 +00:00
Andreas Jaeger 8a8b2d4b4a bfd:
* config.bfd (x86_64-*-netbsd*): New target.
	* configure.in (x86_64-*-netbsd*): Set COREFILE
	to netbsd-core.lo.
	* configure: Regenerated.

gas:
	* configure.in (i386-*-netbsdelf*): Collapse target into...
	(i386-*-netbsd*): ...this.  Add support for x86-64.
	* configure: Regenerated.

ld:
	* configure.tgt (x86_64-*-netbsd*): New target.
2002-01-04 14:49:06 +00:00
Tom Rix 04b5af89ea Fix xcoff linker's ordering of pad sections 2002-01-03 22:06:38 +00:00
Nick Clifton 51c5503ba7 Handle R_ARM_THM_PC11 2002-01-03 14:23:01 +00:00
Nick Clifton 07f7c046a8 Add japanese translation 2002-01-02 16:15:32 +00:00
Nick Clifton 5eefb65fea Reformat error messages to ease translation into other languages. 2002-01-02 15:36:27 +00:00
Jakub Jelinek 57a7219709 * elflink.h (elf_bfd_final_link): Check if dynobj is not NULL
before looking for .eh_frame_hdr section.
	* elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): If
	.eh_frame_hdr section is being stripped from output, don't do
	anything.
2001-12-31 11:49:10 +00:00
Tom Rix 330693f5ab Fix for xcoff <bigaf> big archive format support. 2001-12-31 04:08:23 +00:00
Alan Modra f6bcd34059 daily update 2001-12-23 23:00:06 +00:00
Alan Modra 831f85b186 daily update 2001-12-22 23:00:07 +00:00
Tom Rix 9a4c7f1669 -binitfini emulation, put __rtinit symbol generation into linker. 2001-12-22 17:18:34 +00:00
Alan Modra db80907b3b daily update 2001-12-21 23:00:07 +00:00
Jakub Jelinek bd5e6e7e3a * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix dst_mask for
R_SPARC_DISP32.  Support R_SPARC_PLT32.
	(sparc_reloc_map): Add BFD_RELOC_16_PCREL and BFD_RELOC_SPARC_PLT32.
	(elf32_sparc_check_relocs): Handle R_SPARC_PLT32.
	(elf32_sparc_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_howto_table): Fix dst_mask for
	R_SPARC_DISP32.  Support R_SPARC_PLT32 and R_SPARC_PLT64.
	(sparc_reloc_map): Add BFD_RELOC_16_PCREL, BFD_RELOC_64_PCREL
	and BFD_RELOC_SPARC_PLT32.
	(sparc64_elf_check_relocs): Handle R_SPARC_PLT32 and R_SPARC_PLT64.
	(sparc64_elf_relocate_section): Likewise.
	* reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SPARC_PLT32.
	* bfd-in2.h, libbfd.h: Rebuilt.

	* config/tc-sparc.h (TC_PARSE_CONS_EXPRESSION): Define.
	(sparc_cons): Provide prototype.
	* config/tc-sparc.c (tc_gen_reloc): Handle BFD_RELOC_*_PCREL and
	BFD_RELOC_SPARC_PLT{32,64}.  Enumerate for which relocs
	reloc->addend = fixp->fx_addnumber shouldn't be done instead of
	enumarating for which pc relative ones it should be done.
	(sparc_cons_special_reloc): New variable.
	(sparc_cons): New function.
	(cons_fix_new_sparc): Use sparc_cons_special_reloc.
	* testsuite/gas/sparc/pcrel.s: New test.
	* testsuite/gas/sparc/pcrel.d: Expected output.
	* testsuite/gas/sparc/pcrel64.s: New test.
	* testsuite/gas/sparc/pcrel64.d: Expected output.
	* testsuite/gas/sparc/plt.s: New test.
	* testsuite/gas/sparc/plt.d: Expected output.
	* testsuite/gas/sparc/plt64.s: New test.
	* testsuite/gas/sparc/plt64.d: Expected output.
	* testsuite/gas/sparc/sparc.exp: Add pcrel, pcrel64, plt and plt64
	tests.
2001-12-21 22:35:24 +00:00
Alan Modra a790644d3c daily update 2001-12-20 23:00:05 +00:00
Tom Rix 47ede03a41 Special handling of AIX xcoff text alignment fix. 2001-12-20 21:29:21 +00:00
Michael Snyder fd29389c60 2001-12-19 Michael Snyder <msnyder@redhat.com>
* elf32-i386.c (elf_i386_grok_psinfo): Fix probable copy-and-paste
	error: target is i386 (not mips), and size of descdata is 124
	(not 128).
2001-12-20 20:22:17 +00:00
Alan Modra 3cb60568f1 * config.bfd (mips-dec-netbsd*): Delete alias for mips*el-*-netbsd*. 2001-12-20 05:38:52 +00:00
Alan Modra 61d0bc3328 * config.bfd (arm-*-netbsdelf*): Add target.
* configure.in: Include netbsd-core.lo for native arm-*-netbsd*.
	* configure: Regenerate.
2001-12-20 03:18:23 +00:00
Alan Modra 47a7090184 * elfcode.h (elf_slurp_symbol_table): Test elf_elfsections for NULL,
as can happen with a core file, before dereferencing.
2001-12-19 23:54:26 +00:00
Alan Modra 59aec90c27 daily update 2001-12-19 23:00:04 +00:00
Jakub Jelinek a5eb27e6ff * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): If new_size
is 0, temporarily grow it to minimal CIE size.
	(_bfd_elf_write_section_eh_frame): If input .eh_frame section would
	end up empty, build a fake minimal CIE.
2001-12-19 11:48:15 +00:00
Michael Snyder 52e9b6196a 2001-12-18 Michael Snyder <msnyder@redhat.com>
* elf.c (assign_file_positions_for_segments): Don't sort PT_NOTE
        sections of corefiles.  Also it makes no sense to sort if count == 1.
2001-12-19 05:16:47 +00:00
Alan Modra ee94eb9bc8 * config.bfd (bfd_elf32_ia64_hpux_big_vec): New vector for
ia64*-*-hpux* target.
	(bfd_elf64_ia64_hpux_big_vec): Likewise.
	* targets.c: Ditto.
	* configure.in: Ditto.
	* configure: Regenerate
	* elfxx-ia64.c (elfNN_ia64_final_write_processing): Replace use of
	alloca with bfd_malloc.
	(get_local_sym_hash): Likewise.
	(elfNN_hpux_post_process_headers): New function.
	#include elfNN-target.h again with values for IA64 HP-UX vector.
2001-12-19 02:18:20 +00:00
Alan Modra fcf12726be *** empty log message *** 2001-12-19 02:14:37 +00:00
Alan Modra 535b9defcc daily update 2001-12-18 23:00:05 +00:00
H.J. Lu 0ac4564efc 2001-12-18 H.J. Lu <hjl@gnu.org>
* elf.c (_bfd_elf_copy_private_bfd_data): Also copy GP.
2001-12-18 19:03:23 +00:00
H.J. Lu f0b79d91cb 2001-12-18 H.J. Lu <hjl@gnu.org>
* elf.c (_bfd_elf_copy_private_bfd_data): Update comments.
2001-12-18 18:11:52 +00:00
H.J. Lu 2d502050c8 2001-12-18 H.J. Lu <hjl@gnu.org>
* elf-bfd.h (_bfd_elf_copy_private_bfd_data): New. Prototype.
	(_bfd_mips_elf_copy_private_bfd_data): Removed.

	* elf.c (_bfd_elf_copy_private_bfd_data): New. Copy e_flags in
	the ELF header.

	* elf32-i370.c (??_elf_copy_private_bfd_data): Removed.
	(bfd_elf??_bfd_copy_private_bfd_data): Removed.
	* elf32-m32r.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-mcore.c: Likewise.
	* elf32-mips.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-v850.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elfxx-ia64.c: Likewise.

	* elf64-mips.c (bfd_elf64_bfd_copy_private_bfd_data): Removed.

	* elfxx-target.h (bfd_elfNN_bfd_copy_private_bfd_data): Defined
	to _bfd_elf_copy_private_bfd_data.
2001-12-18 17:59:59 +00:00
Martin Schwidefsky db72780896 * elf32-s390 (elf_s390_check_relocs): Pass addend to
gc_record_vtentry.
        * elf64-s390 (elf_s390_check_relocs): Likewise.
        Fix by Andreas Jaeger <aj@suse.de>.
2001-12-18 16:21:38 +00:00
Nick Clifton 3dc70b578d Correctly match all NetBSD/mips hosts. 2001-12-18 14:42:03 +00:00
Matthew Green 0b69cd08e0 * config.bfd (m68*-*-netbsdelf*): New target.
(m68*-*-netbsd): Also include bfd_elf32_m68k_vec.
(m68*-*-netbsdaout*): New alias for m68*-*-netbsd.

* configure.in (m68k-*-netbsdelf*): New target.
(m68k-*-netbsd*): Also include ELF support.
(m68k-*-netbsdaout*): New alias for m68*-*-netbsd*.
* configure: Regenerate.

* Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
(m68kelfnbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (m68*-hp-netbsd*): Renamed to ..
(m68*-*-netbsd*4k*): .. this.
(m68*-*-netbsdelf*): New target.
(m68*-*-netbsd*): Also include ELF support.
(m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
* emulparams/m68kelfnbsd.sh: New emulation.
2001-12-18 13:26:26 +00:00
Jakub Jelinek 6b9b879a02 * ldgram.y (vers_node): Support anonymous version tags.
* ldlang.c (lang_register_vers_node): Ensure anonymous version
	tag is not defined together with non-anonymous versions.
	* ld.texinfo: Document it.

	* elflink.h (size_dynamic_sections): Skip anonymous version tag.
	(elf_link_assign_sym_version): Don't count anonymous version tag.
2001-12-18 12:15:35 +00:00
Jakub Jelinek 9e2a48988a * elf-eh-frame.c (struct cie): Add make_lsda_relative.
(struct eh_cie_fde): Add lsda_encoding, lsda_offset,
	make_lsda_relative.
	(read_value, write_value): New.
	(_bfd_elf_discard_section_eh_frame): Inicialize
	lsda_encoding, lsda_offset and make_lsda_relative.
	(_bfd_elf_eh_frame_section_offset): If make_lsda_relative,
	request no dynamic reloc for LSDA field of FDE.
	(_bfd_elf_write_section_eh_frame): Handle make_lsda_relative.
	If a non-DW_EH_PE_absptr value is 0, don't adjust it by base
	or pcrel.  Fix address computation for DW_EH_PE_pcrel relocs.
	Update LSDA field if LSDA encoding is DW_EH_PE_pcrel, because
	. might have changed due to deleted FDE or CIEs.
2001-12-18 11:49:52 +00:00
Jakub Jelinek 53c3f2bec7 * elf-strtab.c (struct elf_strtab_hash_entry): Add u.next.
(last_eq): Remove.
	(_bfd_elf_strtab_finalize): Don't use a hash table for last
	character chains, instead use an array.
2001-12-18 11:47:59 +00:00
Alan Modra 50b2bdb780 * elf.c (elfcore_netbsd_get_lwpid): New function.
(elfcore_grok_netbsd_procinfo): New function.
	(elfcore_grok_netbsd_note): New function.
	(elfcore_read_notes): Call elfcore_grok_netbsd_note to process
	NetBSD ELF core file notes.
2001-12-18 07:53:11 +00:00
Alan Modra ed59115573 * elfcode.h (struct bfd_preserve): New.
(elf_object_p): Replace preserved_* vars with instance of above.
	Save and restore arch_info pointer rather than arch, mach so that
	more cases can be restored.  Save and restore new section_tail,
	section_htab structure, and init appropriately.  Move "rest of
	section header" code so that i_shdrp needs no NULL initialisation.
	Free old section_htab on success.
	* elfcore.h (elf_core_file_p): Likewise.
2001-12-18 07:12:19 +00:00
Tom Rix ff4d2c954c Fix email address. 2001-12-18 00:55:39 +00:00
Tom Rix 67fdeebeb2 Minimal handle .typchk and .except section. 2001-12-18 00:32:32 +00:00
Alan Modra d34f383a19 daily update 2001-12-17 23:00:05 +00:00
Jakub Jelinek ed4de5e2e0 * elf-bfd.h (elf_discarded_section): Define.
* elflink.h (elf_link_input_bfd): Use it.
	(elf_reloc_symbol_deleted_p): Likewise.

	* elf64-alpha.c (elf64_alpha_relocate_section): Don't warn about
	overflows for pc relative relocs against discarded sections.
2001-12-17 22:44:12 +00:00
Hans-Peter Nilsson e5a9fb49af Fix formatting in next-to-last entry 2001-12-17 22:20:23 +00:00
Thiemo Seufer a17aee54dd * elf32-mips.c (_bfd_mips_elf_relocate_section): Formatting.
* elf64-mips.c: Add most of the fixes and tweaks done in elf32-mips.c
	over the last months. Add some code for mips16 handling.
	(mips_elf64_check_mips16_stubs): New function.
	(mips_elf64_stub_section_p): Likewise.
	(mips_elf64_calculate_relocation): Change interface to support mips16.
	(mips_elf64_perform_relocation): Likewise.
2001-12-17 20:14:48 +00:00
Alan Modra 9ad5cbcfb2 Support for more than 64k ELF sections.
include/elf/ChangeLog
	* external.h (Elf_External_Sym_Shndx): Declare.
	* internal.h (struct elf_internal_sym <st_shndx>): Make it an
	unsigned int.
	* common.h (SHN_BAD): Define.

bfd/ChangeLog
	* configure.in: Bump bfd version.
	* configure: Regenerate.
	* elf-bfd.h (elf_size_info <swap_symbol_out>): Add shndx param.
	(bfd_elf32_swap_symbol_in): Likewise.
	(bfd_elf32_swap_symbol_out): Likewise.
	(bfd_elf64_swap_symbol_in): Likewise.
	(bfd_elf64_swap_symbol_out): Likewise.
	(elf_reloc_cookie): Add locsym_shndx field.  Make locsyms a PTR.
	(elf_obj_tdata): Add num_elf_sections, symtab_shndx_hdr and
	symtab_shndx_section.
	(elf_numsections): Define.
	(elf_symtab_shndx): Define.
	* elf.c (setup_group): Use elf_numsections rather than header e_shnum.
	(bfd_elf_find_section): Likewise.
	(bfd_section_from_elf_index): Likewise.
	(bfd_section_from_shdr): Likewise.  Handle SHT_SYMTAB_SHNDX.
	(bfd_section_from_r_symndx): Read symbol shndx extension, and
	translate st_shndx for > SHN_HIRESERVE.
	(assign_section_numbers): Skip reserved sections.  Assign
	symtab_shndx_section and elf_numsections.  Exclude reserved
	sections from e_shnum.  Set up symtab_shndx_hdr.
	(_bfd_elf_compute_section_file_positions): Handle symtab_shndx_hdr.
	(map_sections_to_segments): Don't map eh_frame_hdr unless required.
	(assign_file_positions_except_relocs): Use elf_numsections rather
	than header e_shnum.  Skip reserved sections and symtab_shndx_section.
	(prep_headers): Set name for symtab_shndx_hdr.
	(_bfd_elf_assign_file_positions_for_relocs): Use elf_numsections.
	(_bfd_elf_write_object_contents): Likewise.  Skip reserved sections.
	(_bfd_elf_section_from_bfd_section): Check bfd_{abs,com,und}_section
	first.  Use elf_section_data if available.  Use elf_numsections.
	Start scan at index 1.
	(copy_private_bfd_data ): Comment fixes.
	(MAP_ONESYMTAB): Define above SHN_HIOS.
	(MAP_DYNSYMTAB): Likewise.
	(MAP_STRTAB): Likewise.
	(MAP_SHSTRTAB): Likewise.
	(MAP_SYM_SHNDX): New define.
	(_bfd_elf_copy_private_symbol_data): Handle symtab_shndx_section.
	(swap_out_syms): Swap out SHT_SYMTAB_SHNDX section too.
	* elfcode.h (elf_swap_symbol_in): Add shndx param, and handle shndx
	extension.
	(elf_swap_symbol_out): Likewise.
	(elf_object_p): Set elf_numsections, and use instead of e_shnum.
	Initialialise reserved elf_elfsections to point at shdr[0].  Remove
	redundant bfd_release calls.
	(elf_slurp_symbol_table): Read symbol shndx extension, and use with
	elf_swap_symbol_in.  Translate st_shndx for > SHN_HIRESERVE too.
	* elflink.h (elf_link_is_defined_archive_symbol): Read symbol shndx
	extension, and use with elf_swap_symbol_in.
	(elf_link_record_local_dynamic_symbol): Likewise.
	(elf_link_add_object_symbols): Likewise.  Also translate st_shndx
	for elf sections > SHN_HIRESERVE.
	(NAME(bfd_elf,size_dynamic_sections)): Adjust elf_swap_symbol_out
	call.
	(struct elf_final_link_info): Add locsym_shndx and symshndxbuf.
	(elf_bfd_final_link): Allocate the above, and tidy code allocating
	other buffers.  Use elf_numsections instead of e_shnum.  Adjust
	elf_swap_symbol_out calls.
	(elf_link_output_sym): Swap out symbol shndx extension too.
	(elf_link_flush_output_syms): And flush them to disk.
	(elf_link_output_extsym): Use SHN_BAD.  Adjust elf_swap_symbol_out
	calls.
	(elf_gc_mark): Read symbol shndx extension, and use with
	elf_swap_symbol_in.
	(elf_link_input_bfd): Likewise,  Translate st_shndx for elf sections
	> SHN_HIRESERVE too.  Use SHN_BAD.
	(elf_reloc_symbol_deleted_p): Use symbol shndx extensions with
	elf_swap_symbol_in.  Translate st_shndx > SHN_HIRESERVE too.
	(elf_bfd_discard_info): Read symbol shndx extension.  Don't attempt
	to continue after a bfd error.
	* elf-m10200.c (mn10200_elf_relax_section): Only read local syms.
	Stash them immediately to symtab_hdr->contents rather than later
	in multiple places.  Clean up afterwards.  Read symbol shndx
	extension, and use with swap_symbol_in.  Translate SHN_UNDEF,
	SHN_ABS, SHN_COMMON and elf sections > SHN_HIRESERVE to bfd
	sections too.  Remove dead code.
	(mn10200_elf_relax_delete_bytes): Use symbol shndx extension
	when swapping in symbols.  Tidy code adjusting global syms.
	Don't swap in global syms.
	(mn10200_elf_symbol_address_p): Likewise.  Remove extsyms param.
	(mn10200_elf_get_relocated_section_contents): Read symbol shndx
	extension, and use with swap_symbol_in.  Rename "size" -> "amt"
	to maximize code in common with other files.  Translate st_shndx
	for > SHN_HIRESERVE too.  Remove dead code.
	* elf-m10300.c (mn10300_elf_relax_section): Only read local syms.
	Stash them immediately to symtab_hdr->contents rather than later
	in multiple places.  Clean up afterwards.  Read symbol shndx
	extension, and use with swap_symbol_in.  Remove dead code.
	(mn10300_elf_relax_delete_bytes): As for elf-m10200.c.
	(mn10300_elf_symbol_address_p): Likewise.
	(mn10300_elf_get_relocated_section_contents): Likewise.
	* elf32-h8300.c (elf32_h8_relax_section): As for elf-m10300.c.
	(elf32_h8_relax_delete_bytes): Likewise.
	(elf32_h8_symbol_address_p): Likewise.
	(elf32_h8_get_relocated_section_contents): Likewise.
	* elf32-hppa.c (elf32_hppa_size_stubs): Read symbol shndx
	extension, and use with swap_symbol_in.
	* elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
	* elf32-i370.c (i370_elf_finish_dynamic_sections): Adjust call to
	bfd_elf32_swap_symbol_out.
	* elf32-m32r.c (m32r_elf_get_relocated_section_contents): Translate
	elf sections > SHN_HIRESERVE too.
	* elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Only read
	local syms.  Read symbol shndx extension, and use with swap_symbol_in.
	* elf32-mips.c (_bfd_mips_elf_final_write_processing): Use
	elf_numsections rather than header e_shnum.
	* elf32-sh.c (sh_elf_relax_section): As for elf-m10300.c.
	(sh_elf_relax_delete_bytes): Likewise.
	(sh_elf_get_relocated_section_contents): Likewise.  Only read local
	symbols.
	* elf32-v850.c (v850_elf_symbol_processing): Use an unsigned int to
	hold section index.  Use elf_numsections rather than e_shnum.
	Rename "index" -> "indx" to avoid shadowing warning.
	(v850_elf_add_symbol_hook): Likewise.
	* elf64-alpha.c (elf64_alpha_relax_section): Only read local syms.
	Read symbol shndx extension, and use with swap_symbol_in.
	* elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
	Translate SHN_COMMON and elf sections > SHN_HIRESERVE too.
	* elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
	(elfNN_ia64_aix_add_symbol_hook): Use elf_numsections.

	* elf-m10300.c (mn10300_elf_gc_mark_hook): Remove unnecessary checks
	before calling bfd_section_from_elf_index on local syms.
	* elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
	* elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
	* elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
	* elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
	* elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
	* elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
	* elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
	* elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
	* elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
	* elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
	* elf32-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
	* elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
	* elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
	* elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
	* elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
	* elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
	* elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
	* elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
	* elf64-mips.c (mips_elf64_gc_mark_hook): Likewise.
	* elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
	* elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
	* elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
	* elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.

binutils/ChangeLog
	* readelf.c (symtab_shndx_hdr): New global.
	(SECTION_HEADER_INDEX): Define.
	(SECTION_HEADER_NUM): Define.
	(SECTION_HEADER): Define.
	(GET_ELF_SYMBOLS): Pass two params rather than three.
	(get_32bit_elf_symbols): Take file and section args.  Read and
	use SHT_SYMTAB_SHNDX.
	(get_64bit_elf_symbols): Likewise.
	(dump_relocations): Use SECTION_HEADER to index "section_headers".
	(process_section_headers): Likewise.  Use SECTION_HEADER_NUM too.
	Remember symtab_shdx_hdr.
	(process_program_headers): Scan from index 1 for segment map.
	(slurp_ia64_unwind_table): Use SECTION_HEADER to index
	"section_headers".
	(process_relocs): Likewise.  Also adjust call to GET_ELF_SYMBOLS.
	(process_unwind): Likewise.
	(process_version_sections): Likewise.
	(process_symbol_table): Likewise.
	(display_debug_info): Likewise.
	(process_dynamic_segment): Fake up a symtab section for changed
	GET_ELF_SYMBOLS.
	(get_symbol_index_type): Check SHN_LOOS before SHN_LORESERVE.
	(process_program_headers): Kill signed/unsigned warning.
	(load_debug_str): Likewise.
	(display_debug_info): Likewise.
2001-12-17 00:52:35 +00:00
Alan Modra 76f63e9126 Oops, changelog for last patch. 2001-12-17 00:43:17 +00:00
Alan Modra 73e87d7038 hash bfd sections for fast lookup and create.
bfd/ChangeLog
	* bfd.c (struct _bfd): Add section_htab, section_tail.
	* libbfd-in.h (_bfd_delete_bfd): Declare.
	(bfd_section_hash_newfunc): Declare.
	* opncls.c (_bfd_new_bfd): Free memory on failure.  Init
	section_htab and section_tail.
	(_bfd_delete_bfd): New function.
	(bfd_openr): Use it.
	(bfd_fdopenr): Likewise.
	(bfd_openstreamr): Likewise.
	(bfd_openw): Likewise.
	(bfd_close): Likewise.
	(bfd_close_all_done): Likewise.
	(bfd_release): Comment.
	* section.c (struct section_hash_entry): New.
	(bfd_section_hash_newfunc): New function.
	(section_hash_lookup): Define.
	(bfd_section_init): New function, split out from
	bfd_make_section_anyway.
	(bfd_get_section_by_name): Lookup via hash table.
	(bfd_get_unique_section_name): Likewise.
	(bfd_make_section_old_way): Rewrite to use hash table.
	(bfd_make_section_anyway): Likewise.
	(bfd_make_section): Likewise.  Return NULL for attempts to make
	BFD_{ABS,COM,UND,IND}_SECTION_NAME.
	(_bfd_strip_section_from_output): Adjust section_tail if needed.
	* configure.in: Bump bfd version.
	* configure: Regenerate.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.

ld/ChangeLog
	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust
	section_tail when fiddling with section list.
	(gld${EMULATION_NAME}_list_options): Ensure sentences aren't
	broken into separate strings to make translation easier.
	* emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when
	fiddling with section list.
	* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
2001-12-17 00:40:53 +00:00
Alan Modra 96f356322f daily update 2001-12-16 23:00:06 +00:00
Alan Modra 237b791887 daily update 2001-12-15 23:00:04 +00:00
Thiemo Seufer 5b6a02bcf4 * elf64-mips.c (mips_elf64_link_hash_entry): New link hash.
(mips_elf64_high): New Function.
	(mips_elf64_higher): Likewise.
	(mips_elf64_highest): Likewise.
	(mips_elf64_info_to_howto_rel): Likewise.
	(mips_elf64_info_to_howto_rela): Likewise.
	(mips_elf64_write_rel): Likewise.
	(mips_elf64_write_rela): Likewise.
	(mips_elf64_link_hash_newfunc): Likewise.
	(mips_elf64_hi16_reloc): Likewise.
	(mips_elf64_higher_reloc): Likewise.
	(mips_elf64_highest_reloc): Likewise.
	(mips_elf64_gprel16_reloc): Likewise.
	(mips_elf64_gprel16_reloca): Likewise.
	(mips_elf64_literal_reloc): Likewise.
	(mips_elf64_gprel32_reloc): Likewise.
	(mips_elf64_shift6_reloc): Likewise.
	(mips_elf64_got16_reloc): Likewise.
	(mips_elf64_assign_gp): Likewise.
	(mips_elf64_final_gp): Likewise.
	(gprel16_with_gp): Likewise.
	(mips_elf64_additional_program_headers): Likewise.
	(mips_elf64_link_hash_table_create): Likewise.
	(mips_elf64_got_offset_from_index): Likewise.
	(_mips_elf64_got_info): Likewise.
	(mips_elf64_sign_extend): Likewise.
	(mips_elf64_overflow_p): Likewise.
	(mips_elf64_global_got_index): Likewise.
	(mips_elf64_sort_hash_table_f): Likewise.
	(mips_elf64_sort_hash_table): Likewise.
	(mips_elf64_swap_msym_out): Likewise.
	(mips_elf64_create_local_got_entry): Likewise.
	(mips_elf64_local_got_index): Likewise.
	(mips_elf64_got_page): Likewise.
	(mips_elf64_got16_entry): Likewise.
	(mips_elf64_local_relocation_p): Likewise.
	(mips_elf64_next_relocation): Likewise.
	(mips_elf64_create_dynamic_relocation): Likewise.
	(mips_elf64_calculate_relocation): Likewise.
	(mips_elf64_obtain_contents): Likewise.
	(mips_elf64_perform_relocation): Likewise.
	(mips_elf64_relocate_section): Likewise.
	(mips_elf64_create_dynamic_sections): Likewise.
	(mips_elf64_adjust_dynamic_symbol): Likewise.
	(mips_elf64_always_size_sections): Likewise.
	(mips_elf64_size_dynamic_sections): Likewise.
	(mips_elf64_finish_dynamic_symbol): Likewise.
	(mips_elf64_finish_dynamic_sections): Likewise.
	(mips_elf64_gc_mark_hook): Likewise.
	(mips_elf64_gc_sweep_hook): Likewise.
	(mips_elf64_create_got_section): Likewise.
	(mips_elf64_record_global_got_symbol): Likewise.
	(mips_elf64_create_msym_section): Likewise.
	(mips_elf64_allocate_dynamic_relocations): Likewise.
	(mips_elf64_check_relocs): Likewise.
	(mips_elf64_output_extsym): Likewise.
	(mips_elf64_swap_gptab_in): Likewise.
	(mips_elf64_swap_gptab_out): Likewise.
	(gptab_compare): Likewise.
	(mips_elf64_final_link): Likewise.
	(prev_reloc_addend): Remenber addend of previous parts of a combined
	reloc.
	(ELF_MIPS_GP_OFFSET): New define.
	(STUB_LW,STUB_MOVE,STUB_JALR,STUB_LI16): Likewise.
	(MIPS_FUNCTION_STUB_SIZE): Likewise.
	(mips_elf64_howto_rel): Fix HOWTO defines.
	(mips_elf64_howto_rela): Likewise.
	(mips_elf64_swap_reloca_out): Fix signedness.
	(mips_elf64_be_swap_reloc_in): Use ELF64* instead of ELF32*.
	(mips_elf64_be_swap_reloca_in): Likewise.
	(mips_elf64_be_swap_reloc_out): Likewise. Preserve extended type info.
	(mips_elf64_be_swap_reloca_out): Likewise.
2001-12-15 09:56:19 +00:00
Jakub Jelinek 68f691521a * elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
* elf-eh-frame.c (struct eh_frame_hdr_info): Add strip.
	(_bfd_elf_discard_section_eh_frame): Don't create .eh_frame_hdr
	sec_info here.  Free ehbuf.
	(_bfd_elf_discard_section_eh_frame_hdr): Don't size the section
	if hdr_info->strip.
	(_bfd_elf_maybe_strip_eh_frame_hdr): New.
	* elflink.h (size_dynamic_sections): Call it.
2001-12-15 08:54:13 +00:00
Alan Modra d3a04f13a1 daily update 2001-12-14 23:00:35 +00:00
Alan Modra 72dd63313e * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL. 2001-12-14 01:52:27 +00:00
Alan Modra 095978813d daily update 2001-12-13 23:00:14 +00:00
Jakub Jelinek 6576570080 * elf-bfd.h (enum elf_link_info_type): New.
(struct bfd_elf_section_data): Remove stab_info and merge_info
	fields, add sec_info and sec_info_type.
	(struct elf_obj_tdata): Add eh_frame_hdr field.
	(_bfd_elf_discard_section_eh_frame): New prototype.
	(_bfd_elf_discard_section_eh_frame_hdr): Likewise.
	(_bfd_elf_eh_frame_section_offset): Likewise.
	(_bfd_elf_write_section_eh_frame): Likewise.
	(_bfd_elf_write_section_eh_frame_hdr): Likewise.
	* Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
	(BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
	(elf-eh-frame.lo): New.
	* Makefile.in: Rebuilt.
	* configure.in (elf): Add elf-eh-frame.lo.
	* configure: Rebuilt.
	* elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
	(map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
	(get_program_header_size): Take into account PT_GNU_EH_FRAME
	segment.
	(_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
	(_bfd_elf_rel_local_sym): Likewise.
	(_bfd_elf_section_offset): Likewise.  Call
	_bfd_elf_eh_frame_section_offset too.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
	sec_info.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf-eh-frame.c: New file.
	* elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
	.stab sections.  Set sec_info_type, use sec_info instead
	of merge_info and stab_info.
	(elf_link_create_dynamic_sections): Create .eh_frame_hdr section
	if --eh-frame-hdr.
	(elf_bfd_final_link): Write .eh_frame_hdr section.
	(elf_link_sec_merge_syms): Use sec_info_type and sec_info.
	(elf_link_input_bfd): Likewise.
	Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
	(elf_bfd_discard_info): Add output_bfd argument.
	Call _bfd_elf_discard_section_eh_frame and
	_bfd_elf_discard_section_eh_frame_hdr.
	(elf_section_ignore_discarded_relocs): Use sec_info_type, not section
	names.
	* bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
	prototypes.
	* bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.

	* elf/common.h (PT_GNU_EH_FRAME): Define.
	* bfdlink.h (struct bfd_link_info): Add eh_frame_hdr field.

	* emultempl/elf32.em (finish): Supply output_bfd
	to bfd_elf*_discard_info.
	(OPTION_EH_FRAME_HDR): Define.
	(longopts): Add --eh-frame-hdr.
	(parse_args): Handle it.
	(list_options): Add --eh-frame-hdr to help.
	* emultempl/hppaelf.em (finish): Supply output_bfd
	to bfd_elf*_discard_info.
	* scripttempl/elf.sc (.eh_frame_hdr): Add.

	* readelf.c (get_segment_type): Support PT_GNU_EH_FRAME.
2001-12-13 11:09:34 +00:00
Alan Modra d8c18723e1 daily update 2001-12-12 23:00:04 +00:00
Richard Henderson ce9c7f501f * syms.c (_bfd_generic_read_minisymbols): Early return for
no symbols.  Patch from FreeBSD folk; exact origin unknown.
2001-12-12 19:05:26 +00:00
Alan Modra d2c9b9cdd0 daily update 2001-12-11 23:00:05 +00:00
Alan Modra 5732c11485 * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
and e_shstrndx if out of range.
	(elf_object_p): Read extended values for e_shnum and e_shstrndx
	from the first section header.  Allocate space in elf_elfsections
	for reserved sections and set to NULLs.
	(elf_write_shdrs_and_ehdr): Set overflow fields in first section
	header.  Skip reserved sections in elf_elfsections.  Remove
	duplicate size calculation.
2001-12-11 05:38:18 +00:00
Alan Modra 709ec538af daily update 2001-12-10 23:00:05 +00:00
Alan Modra 6251c3aa9e daily update 2001-12-09 23:00:05 +00:00
Alan Modra 7a4a943a9f daily update 2001-12-08 23:00:05 +00:00
Geoffrey Keating 93fbbb04b8 Index: bfd/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>
	    Corinna Vinschen  <vinschen@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* archures.c: Add support for xstormy16.
	* config.bfd: Add support for xstormy16.
	* configure.in: Add support for xstormy16.
	* reloc.c: Add support for xstormy16.
	* targets.c: Add support for xstormy16.
	* cpu-xstormy16.c: New file.
	* elf32-xstormy16.c: New file.
	* Makefile.in: Regenerated.
	* bfd-in2.h: Regenerated.
	* configure: Regenerated.
	* libbfd.h: Regenerated.

Index: binutils/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* readelf.c (guess_is_rela): Add support for stormy16.
	(dump_relocations): Likewise.
	(get_machine_name): Likewise.

Index: gas/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* configure.in: Add support for xstormy16.
	* configure: Regenerated.
	* Makefile.am: Add support for xstormy16.
	* Makefile.in: Regenerated.
	* config/tc-xstormy16.c: New file.
	* config/tc-xstormy16.h: New file.

Index: gas/testsuite/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    matthew green  <mrg@redhat.com>

	* gas/xstormy16/allinsn.d: New file.
	* gas/xstormy16/allinsn.exp: New file.
	* gas/xstormy16/allinsn.s: New file.
	* gas/xstormy16/allinsn.sh: New file.
	* gas/xstormy16/gcc.d: New file.
	* gas/xstormy16/gcc.s: New file.
	* gas/xstormy16/gcc.sh: New file.
	* gas/xstormy16/reloc-1.d: New file.
	* gas/xstormy16/reloc-1.s: New file.
	* gas/xstormy16/reloc-2.d: New file.
	* gas/xstormy16/reloc-2.s: New file.

Index: ld/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* configure.tgt: Add support for xstormy16.
	* Makefile.in: Regenerate.
	* emulparams/elf32xstormy16.sh: New file.
	* scripttempl/xstormy16.sc: New file.

Index: opcodes/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* Makefile.in: Regenerate.
	* configure.in: Add support for xstormy16.
	* configure: Regenerate.
	* disassemble.c: Add support for xstormy16.
	* xstormy16-asm.c: New generated file.
	* xstormy16-desc.c: New generated file.
	* xstormy16-desc.h: New generated file.
	* xstormy16-dis.c: New generated file.
	* xstormy16-ibld.c: New generated file.
	* xstormy16-opc.c: New generated file.
	* xstormy16-opc.h: New generated file.

Index: include/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* dis-asm.h (print_insn_xstormy16): Declare.

Index: include/elf/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* common.h (EM_XSTORMY16): Define.
	* xstormy16.h: New file.
2001-12-08 03:46:03 +00:00
Alan Modra 82c7b87461 daily update 2001-12-07 23:00:04 +00:00
Nick Clifton cdc7c09f2e Combine sentance fragments into a single sentance in order to permit better
translation into foreign languages.
2001-12-07 12:32:42 +00:00
Nick Clifton 979f4a38ff Allow GDB to read general-purpose registers from Linux S/390 core files. 2001-12-07 12:23:26 +00:00
Jakub Jelinek 1fbc4a84a3 * elf32-sparc.c (elf32_sparc_relocate_section): Revert
2001-09-14 change.
2001-12-07 11:14:12 +00:00
Jakub Jelinek c629eae01a * elf.c (_bfd_elf_rela_local_sym): Only call
_bfd_merged_section_offset if merge_info is non-NULL.
	(_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
	* elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
	prototypes.
	* elf32-arm.h (elf32_arm_final_link_relocate): Use
	_bfd_elf_section_offset.
	(elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
	* elf32-i386.c (elf_i386_relocate_section): Use
	_bfd_elf_section_offset and _bfd_elf_rel_local_sym.
	* elf32-sh.c (sh_elf_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Use
	_bfd_elf_section_offset.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
2001-12-07 11:12:18 +00:00
Alan Modra 142f8c94be * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
already forced local.
2001-12-07 02:00:57 +00:00
Alan Modra 491a027ebd daily update 2001-12-06 23:00:04 +00:00
Nick Clifton e3c8793a40 Fixes to improve the ability to translate messages in the binutils tools 2001-12-06 10:22:36 +00:00
Hans-Peter Nilsson 2858ef35b4 * configure: Regenerate.
* Makefile.in: Regenerate.
2001-12-06 07:17:31 +00:00
Alan Modra e8eabb9d9a daily update 2001-12-05 23:00:05 +00:00
Thiemo Seufer 36b4548250 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
BFD64_LIBS, make the latter depending on the availability of BFD64.
	Add archive64.c source file.
	* archive64.c: New file implementing bfd_elf64_archive_slurp_armap
	and bfd_elf64_archive_write_armap, code from elf64-mips.c
	* archive.c (bfd_slurp_armap): Add ELF64 archive support.
	* config.bfd (mips*-*-irix6*): Allow with BFD64 only.
	(mips64*el-*-linux*): Likewise.
	(mips*el-*-linux*): Likewise. Reorder entries.
	* configure.in (bfd_libs): Define in dependency of BFD64 and
	AC_SUBST it.
	* elf64-mips.c (mips_elf64_slurp_armap): Remove, use
	bfd_elf64_archive_slurp_armap instead.
	(mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
	instead.
2001-12-05 22:46:21 +00:00
Alan Modra bafae9c48d daily update 2001-12-04 23:00:05 +00:00
Thiemo Seufer 956cd1d64d * config.bfd: Remove trailing blanks.
* elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
	* strings.c (get_char): Initialize value.
	* config/tc-mips.c (mips_cpreturn_offset): Better comment.
	(load_register): Better error message. Cast away signedness
	mismatches. Add casts needed for varargs.
	(load_address): Replace checks of HAVE_64BIT_ADDRESS with dbl.
	Remove superfluous casts.
	(macro): Cast away signedness mismatches. Remove superfluous casts.
	(s_cpload): Fix wrong comment.
	(s_mips_weakext): Standardize output message.
	(get_number): Likewise.
2001-12-04 14:38:48 +00:00
Alexandre Oliva 2888ec1545 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
R_D10V_18_PCREL.  Check 10_PCREL relocations as signed.
Disable pointless overflow checking of NONE and 32.
2001-12-04 10:48:58 +00:00
Nick Clifton a9ef678ded fix typo 2001-12-04 09:46:41 +00:00
Alan Modra e207c4fac5 * reloc.c (bfd_install_relocation): Correct reloc address test.
(bfd_perform_relocation): Formatting fix.
	* bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
2001-12-03 23:16:20 +00:00
Alan Modra b61fdd7ef5 daily update 2001-12-03 23:00:04 +00:00
Nick Clifton 2299ff437b Import new turkish translations from Translation Project's website. 2001-12-03 10:46:36 +00:00
Alan Modra f09ebc7d49 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
happens to trigger on undefined symbols.
	(final_link_relocate): Return bfd_reloc_undefined for undefined
	stubs.
	(elf32_hppa_relocate_section): Don't say we can't handle a reloc
	if we have already warned about an undefined symbol.
2001-12-03 08:42:38 +00:00
Thiemo Seufer d75bc93d66 * elf32-mips.c (NEWABI_P): New define.
(USE_REL): Remove, replaced by
	(elf_backend_may_use_rel_p): New define.
	(elf_backend_may_use_rela_p): Likewise.
	(elf_backend_default_use_rela_p): Likewise.
	(elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
	Fix some relocation definitions.
	(elf_mips_howto_table_rela): New RELA relocation definitions for
	NewABI support.
	(mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
	(bfd_elf32_bfd_reloc_type_lookup): Likewise.
	(mips_rtype_to_howto): Likewise.
	(_bfd_mips_elf_relocate_section): Likewise.
	(_bfd_mips_elf_object_p): Typo.
	(elf_backend_sign_extend_vma): Reordered together with many other
	defines nearby to resemble the order of declaration in the header
	file.
2001-12-02 13:27:45 +00:00
Thiemo Seufer cdf6fd85e6 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
	* pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
	* elf32-mips.c (mips_reloc_map): Likewise. Replace
	BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
	* elf64-mips.c (mips_reloc_map): Likewise.
	* reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
	(BFD_RELOC_MIPS_GPREL32): Remove.
	* config/tc-mips.c (macro_build): Replace BFD_RELOC_MIPS_GPREL
	by BFD_RELOC_GPREL16.
	(load_address): Likewise.
	(macro): Likewise.
	(md_apply_fix): Likewise. Replace BFD_RELOC_MIPS_GPREL32 by
	BFD_RELOC_GPREL32.
	(s_gpword): Replace BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
	(tc_gen_reloc): Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
	*config/tc-mips.h: Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
2001-12-02 13:14:48 +00:00
Alan Modra ed12fa11e3 daily update 2001-12-01 23:00:04 +00:00
Alan Modra 2d43aa5e5f daily update 2001-11-30 23:00:05 +00:00
H.J. Lu 215007a648 2001-11-30 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_add_default_symbol): New.
	(elf_link_add_object_symbols): Call elf_add_default_symbol ()
	to create an indirect symbol from the default for the symbol
	with the default version if needed.
2001-11-30 15:50:56 +00:00
Alan Modra 567eaf74ef daily update 2001-11-29 23:00:06 +00:00
Nick Clifton fa49d2248e Do not overwite the core signal if it has already been set by another thread. 2001-11-29 10:34:01 +00:00
Alan Modra 1f068d4adc daily update 2001-11-28 23:00:04 +00:00
Jakub Jelinek f7460f5f76 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
(elf64_alpha_relocate_section): Translate local_got_entries
	for STT_SECTION symbol to SHF_MERGE section the first time
	we see it.
	* elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
	sec_merge_done.
	(get_local_sym_hash): New, extracted from get_dyn_sym_info.
	(get_dyn_sym_info): Use it.
	(elfNN_ia64_relocate_section): Translate local dyn entries
	for STT_SECTION symbol to SHF_MERGE section the first time
	we see it.

        * write.c (adjust_reloc_syms): Mark SEC_MERGE symbols as used
        in reloc if it has non-zero addend.
        * config/tc-alpha.c (tc_gen_reloc): Reinstall SEC_MERGE check.
        * config/tc-sparc.c (md_apply_fix3): Likewise.
2001-11-28 19:15:14 +00:00
Nick Clifton 607334a109 Add .cvsignore files to skip .gmo files 2001-11-28 18:57:14 +00:00
Alan Modra ccf505facf daily update 2001-11-27 23:00:04 +00:00
H.J. Lu 163c1c309e 2001-11-27 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
	ELF.
2001-11-27 19:03:27 +00:00
Alan Modra 1588780944 daily update 2001-11-26 23:00:06 +00:00
Jeff Law fd0999e109 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
prototypes.
2001-11-26 19:31:27 +00:00
Alan Modra 9edf3ae12a daily update 2001-11-25 23:00:06 +00:00
Alan Modra 0fde5b57d5 daily update 2001-11-24 23:00:04 +00:00
Alan Modra a248e267b4 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
group sizes to accomodate c++.
2001-11-24 07:39:11 +00:00
Alan Modra c79d05084e daily update 2001-11-23 23:00:05 +00:00
Jakub Jelinek 2e549b45b8 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
relocations in non-alloced sections against global symbols
	defined in shared library being built.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2001-11-23 13:16:39 +00:00
Jakub Jelinek f8df10f4f5 * elf.c (_bfd_elf_rela_local_sym): New.
* elflink.h (elf_link_input_bfd): Don't consider empty
	merged sections as removed in relocation tests.
	* elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
	* elf32-i386.c (elf_i386_relocate_section): Handle relocs
	against STT_SECTION symbol of SHF_MERGE section.
	* elf32-arm.h (elf32_arm_relocate_section): Likewise.
	* elf32-avr.c (elf32_avr_relocate_section): Call
	_bfd_elf_rela_local_sym.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
	* elf32-fr30.c (fr30_final_link_relocate): Likewise.
	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elf-hppa.h (elf_hppa_relocate_section): Likewise.
	* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise for
	!partial_inplace relocs. Handle relocs against STT_SECTION
	symbol of SHF_MERGE for partial_inplace relocs.

	* config/tc-alpha.c (tc_gen_reloc): Remove SEC_MERGE test.
	* write.c (adjust_reloc_syms): Don't handle relocs against
	SEC_MERGE section symbols specially.
	(fixup_segment): Likewise.
2001-11-23 12:17:21 +00:00
Alan Modra 95a1f57169 daily update 2001-11-22 23:00:05 +00:00
Nick Clifton 313e863fa9 Move SRC-POTFILES.in and BLD-POTFILES.in to maintainer-clean target. 2001-11-22 16:21:01 +00:00
Alan Modra e614115148 daily update 2001-11-21 23:00:51 +00:00
Alan Modra d7458677f4 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
than sym_sec->output_section to detect relocs against discarded
	sections.
2001-11-21 14:58:26 +00:00
Alan Modra 7a47c3a29c daily update 2001-11-21 00:53:38 +00:00
H.J. Lu 45e9217a8f 2001-11-19 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
	discarding relocations.
2001-11-20 00:54:51 +00:00
Alan Modra b572d65c66 daily update 2001-11-19 23:00:05 +00:00
Nick Clifton 84c254c646 Define and use bfd_is_const_section(). 2001-11-19 15:35:38 +00:00
Alan Modra a0e94dc00c * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount. 2001-11-19 03:52:37 +00:00
Alan Modra 2a5aaecb4a * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
millicode syms as candidates for import stubs.
2001-11-19 03:01:43 +00:00
Alan Modra e5ee5df190 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
(allocate_PIC_calls): Rename to allocate_plt_static.
	(allocate_dynrelocs): Move most of code handling .plt entries to..
	(allocate_plt_static): ..here.  Don't drop plabel entries.
2001-11-19 01:25:00 +00:00
Hans-Peter Nilsson 6eeb40b2c0 * mmo.c: Adjust documentation tags to use texinfo 4 features. 2001-11-19 01:22:45 +00:00
Alan Modra 7138fabc3c daily update 2001-11-18 23:00:04 +00:00
Alan Modra b66167ff38 daily update 2001-11-17 23:00:06 +00:00
Alan Modra 773a0d1a66 daily update 2001-11-16 23:00:05 +00:00
Daniel Jacobowitz 44421011e3 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
local syms from discarded sections.  Update comment.
2001-11-16 02:56:08 +00:00
Alan Modra 949f8813f9 daily update 2001-11-15 23:00:05 +00:00
Alan Modra beb1d4ece2 * po/SRC-POTFILES.in: Regenerate. 2001-11-15 12:18:27 +00:00
Alan Modra f9f32305f7 * elflink.h (elf_link_input_bfd): Complain about all relocs
against local syms from discarded sections.
	(elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
2001-11-15 09:31:25 +00:00
Alexandre Oliva 6361c4c9bc * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
overflows in the .stab section.
2001-11-15 04:13:35 +00:00
Daniel Jacobowitz 73d074b4e2 2001-11-11 Daniel Jacobowitz <drow@mvista.com>
* bfd-in.h (bfd_elf32_discard_info): Add prototype.
	(bfd_elf64_discard_info): Likewise.
	* bfd-in2.h: Regenerate.
	* elf-bfd.h (struct elf_reloc_cookie): New.
	(struct elf_backend_data): Add elf_backend_discard_info,
	elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
	(_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
	(_bfd_elf64_reloc_symbol_deleted_p): Likewise.
	* elf32-mips.c (_bfd_elf32_mips_discard_info): New.
	(_bfd_elf32_mips_ignore_discarded_relocs): New.
	(_bfd_elf32_mips_write_section): New.
	(elf_backend_discard_info): Define.
	(elf_backend_ignore_discarded_relocs): Define.
	(elf_backend_write_section): Define.
	* elfcode.h (elf_bfd_discard_info): Define.
	(elf_reloc_symbol_deleted_p): Define.
	* elflink.h (elf_link_input_bfd): Check
	elf_section_ignore_discarded_relocs.  Call
	bed->elf_backend_write_section if available.
	(elf_reloc_symbol_deleted_p): New.
	(elf_bfd_discard_info): New.
	(elf_section_ignore_discarded_relocs): New.
	* elfxx-target.h (elf_backend_discard_info): Define.
	(elf_backend_ignore_discarded_relocs): Define.
	(elf_backend_write_section): Define.
	(elfNN_bed): Add elf_backend_discard_info,
	elf_backend_ignore_discarded_relocs, and
	elf_backend_write_section.
	* libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
	* libbfd.h: Regenerate.
	* stabs.c (_bfd_discard_section_stabs): New.

2001-11-11  Daniel Jacobowitz  <drow@mvista.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
	(struct ld_emulation_xfer_struct): Use it.
2001-11-15 01:34:12 +00:00
Alan Modra 883d69e653 daily update 2001-11-14 23:00:06 +00:00
Martin Schwidefsky 27018c3f68 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
scheme to get rid of an ugly complicated test.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
2001-11-14 18:48:26 +00:00
Andreas Jaeger 58a3581362 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
x86-64 for display.
2001-11-14 12:01:58 +00:00
Jakub Jelinek d03ba2a185 * dwarf2.c (struct line_head) [total_length]: Change type to
bfd_vma.
	(struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
	(struct comp_unit): Add stash and offset_size.
	(read_8_bytes): Return bfd_vma.
	(read_indirect_string): New.
	(read_attribute): Handle DW_FORM_strp.
	(decode_line_info): Support 64-bit DWARF format.
	(_bfd_dwarf2_find_nearest_line): Likewise.
	(parse_comp_unit): Set offset_size and stash.
2001-11-14 11:16:47 +00:00
Richard Henderson cf716c5663 * dwarf2.c (read_attribute_value): New function to handle
DW_FORM_indirect.
        (read_attribute): Use it.
2001-11-13 23:37:41 +00:00
Alan Modra 13d574884b daily update 2001-11-13 23:00:10 +00:00
Geoffrey Keating 1a509dcc12 Index: bfd/ChangeLog
2001-11-11  Geoffrey Keating  <geoffk@redhat.com>

	* dwarf2.c (decode_line_info): Properly deal with unknown standard
	opcodes.

Index: binutils/ChangeLog
2001-11-11  Geoffrey Keating  <geoffk@redhat.com>

	* readelf.c (display_debug_lines): Deal with unknown standard
	opcodes.  Handle DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin,
	DW_LNS_set_isa.

Index: include/elf/ChangeLog
2001-11-11  Geoffrey Keating  <geoffk@redhat.com>

	* dwarf2.h (dwarf_line_number_ops): Add DWARF 3 opcodes.
2001-11-13 20:13:30 +00:00
Alan Modra 4e6bfe8ada * section.c (bfd_make_section_anyway): Don't increment section_id
and the BFD's section_count if adding the section failed.
	* vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
	change.
2001-11-13 03:52:25 +00:00
Hans-Peter Nilsson bc0d28ee42 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
core dump format.
2001-11-12 23:47:02 +00:00
Alan Modra 968d5a056e daily update 2001-11-12 23:01:05 +00:00
H.J. Lu 350836e342 2001-11-11 H.J. Lu <hjl@gnu.org>
* elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
	_bfd_elf_strtab_size instead of _bfd_stringtab_size.

	* elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
	dynstr type to `struct elf_strtab_hash *'.
2001-11-11 23:51:36 +00:00
Alan Modra 50e480d974 daily update 2001-11-11 23:00:05 +00:00
Hans-Peter Nilsson b959dc73d0 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
size_t.  Rename second i to j.
2001-11-11 22:18:01 +00:00
Alan Modra 94753239c5 daily update 2001-11-10 23:00:05 +00:00
Jeff Law 7e250b6c31 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h. 2001-11-10 15:53:31 +00:00
Alan Modra ec33885937 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
relocs into shared libs.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mips.c (mips_elf_calculate_relocation): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
	* elf.c (bfd_section_from_r_symndx): New function.
	* elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
	(struct sym_sec_cache): New.
	(bfd_section_from_r_symndx): Declare.
	(struct bfd_elf_section_data): Change local_dynrel type to PTR.
	* elflink.h (elf_link_input_bfd): Don't test for removed linkonce
	relocs when relocatable.  Don't	zero entire reloc, just zero the
	addend and sym.
	* elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
	(elf_i386_link_hash_table_create): Init it.
	(elf_i386_check_relocs): Track dynamic relocs needed for local
	syms on a per-section basis as we do for globals.
	(elf_i386_gc_sweep_hook): Update for local_dynrel change.
	Remove dead code.
	(allocate_dynrelocs): Warning fix.
	(elf_i386_size_dynamic_sections): Don't allocate relocs when
	section has been discarded.
	(elf_i386_relocate_section): Don't copy STN_UNDEF relocs
	into shared libs.
	* elf32-hppa.c: Likewise.
	* elf32-s390.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf64-s390.c: Likewise.
2001-11-10 00:23:35 +00:00
Alan Modra 2972bad307 daily update 2001-11-09 23:00:05 +00:00
Alan Modra a525240841 daily update 2001-11-08 23:00:04 +00:00
Martin Schwidefsky 0451c93c40 * elf32-s390: Major rework that introduces all recent changes to
the s390 backends.  Get a closer match to elf32-i386.
(elf_s390_relocate_section): Make use of dynamic section short-cuts.
Localise vars, and delay setting.  Better error reporting, replace
BFD_ASSERT with abort.  Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
symbol is not defined in the regular object file and tread the weak
definition as the normal one.  Don't discard relocs for undefweak or
undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
test for avoided copy relocs.  Reinstate fudge for unresolved relocs
in debugging sections.
(elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc.  Don't do copy
reloc processing for weakdefs.  Remove redundant casts and aborts.
Delay setting of vars until needed.  Move creation of dynamic symbols
and allocation of .plt and .rela.plt to allocate_dynrelocs.  Replace
BFD_ASSERT with abort.  Discard .plt entries for everything with
plt.refcount <= 0.
(elf_s390_check_relocs):  Don't allocate space for dynamic relocs,
.got or .relgot here but do it in allocate_dynrelocs.  Reference count
possible .plt and .got entries.  Don't test input section SEC_READONLY
here to try to avoid copy relocs, and keep dyn_relocs regardless of
ELF_LINK_NON_GOT_REF.  Don't set DF_TEXTREL here.  Delay setting of
variables until needed.  Remove separate switch stmt for creating .got
section.  Initialise local_got_refcounts to 0.  Cache pointer to
"sreloc" section in elf_section_data. Tweak condition under which .got
created.  Report files with bad relocation section names.
(elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
have been forced local.  Use same test to decide if we can use a
relative reloc for got as elf_s390_relocate_section.  Expand SHN_UNDEF
comment.  Move expressions out of function calls.  Replace BFD_ASSERT
with abort.
(elf_s390_finish_dynamic_sections): Migrate common code out of switch
statement.  Replace BFD_ASSERT with abort.
(elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
to "ibfd".  Allocate space for local dyn relocs.  Use DF_TEXTREL flag
instead of looking up section names for DT_TEXTREL.  Replace
BFD_ASSERT with abort.  Zero out the dynamic allocated content space.
Add a comment to remind us that one day this ought to be fixed.
(struct elf_s390_link_hash_entry): Rename "root" to "elf".
(struct elf_s390_link_hash_table): Likewise.
(elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
rid of unnecessary casts.
(struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
Remove "section" field.
(elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
Reference count possible .plt entries.  Don't deallocate .got and
.relgot space here.
(struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
Update comment.
(struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
dyn_relocs.
(elf_s390_discard_copies):  Delete.
(elf_s390_link_hash_traverse): Delete.
(bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
rather than gc variety).
(struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
srelplt, sdynbss, srelbss fields.
(elf_s390_link_hash_table_create): Init them.
(WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
(allocate_dynrelocs): New function.
(create_got_section): New function.
(elf_backend_can_refcount): Define.
(elf_backend_copy_indirect_symbol): Define.
(elf_s390_copy_indirect_symbol): New function.
(elf_s390_create_dynamic_sections): New function.
(readonly_dynrelocs): New function.
* elf64-s390x: Likewise.
2001-11-08 18:45:46 +00:00
Alan Modra a65d482311 daily update 2001-11-07 23:00:06 +00:00
Jakub Jelinek 2b0f7ef92e * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
(BFD32_BACKENDS_CFILES): Add elf-strtab.c.
	(elf-strtab.lo): Add rule.
	* Makefile.in: Rebuilt.
	* configure.in (elf): Add elf-strtab.lo.
	* configure: Rebuilt.
	* elf-bfd.h (elf_strtab_hash): Forward declare.
	(struct elf_link_hash_table): Change dynstr type to
	struct elf_strtab_hash *.
	(struct elf_obj_tdata): Change strtab_ptr type to
	struct elf_strtab_hash *.
	(_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
	_bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
	_bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
	_bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
	_bfd_elf_strtab_finalize): New prototypes.
	* elf-strtab.c: New file.
	* elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
	and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
	Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
	when forcing dynamic symbol to local.
	(elf_link_create_dynamic_sections): Call
	_bfd_elf_strtab_init instead of elf_stringtab_init.
	(elf_link_record_local_dynamic_symbol): Likewise, change
	dynstr type.  Use _bfd_elf_strtab functions instead of
	_bfd_stringtab calls.
	(size_dynamic_sections): Use _bfd_elf_strtab functions instead of
	_bfd_stringtab calls.  For DT_RUNPATH and Verdaux vda_name fields,
	call _bfd_elf_strtab_addref.  Call elf_finalize_dynstr.
	(elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
	(elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
	dynamic symbol to local.
	(elf_link_assign_sym_version): Likewise.
	(elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
	_bfd_stringtab_emit.
	* elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
	type.  Call _bfd_elf_strtab functions instead of
	_bfd_stringtab functions.
	* elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
	* elf.c (_bfd_elf_init_reloc_shdr): Likewise.
	(elf_fake_sections): Likewise.
	(assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
	on shstrtab hash table, call _bfd_elf_strtab_addref on each section
	name in the output.  Call _bfd_elf_strtab_finalize and
	use _bfd_elf_strtab_offset to finalize sh_name section header fields.
	(_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
	instead of _bfd_stringtab_size.
	(prep_headers): Change shstrtab type.
	Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
2001-11-07 16:50:38 +00:00
Alan Modra 1d761fc593 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
bad symtab segfault.  Formatting and warning fixes.  Improve
	error message for internationalisation.
2001-11-07 04:07:09 +00:00
Alan Modra df05402949 daily update 2001-11-06 23:00:06 +00:00
H.J. Lu f8deed93c6 2001-11-06 H.J. Lu (hjl@gnu.org)
* elflink.h (elf_link_input_bfd): Complain relocs against
	discarded sections.
2001-11-06 17:49:38 +00:00
Alan Modra 0a2a5e0f3c daily update 2001-11-05 23:00:07 +00:00
Alan Modra 9a03cc54f7 daily update 2001-11-04 23:08:47 +00:00
Alan Modra 5a26231798 daily update 2001-11-03 23:00:04 +00:00
Alan Modra 7fda6dbc17 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order. 2001-11-03 03:18:34 +00:00
Alan Modra 49fd28c1db daily update 2001-11-02 23:00:06 +00:00
H.J. Lu d918dd357c 2001-11-02 H.J. Lu <hjl@gnu.org>
* elf32-mips.c (mips_elf_calculate_relocation): Don't create
	dynamic relocation for symbols defined in regular objects when
	creating executables.
2001-11-02 19:46:59 +00:00
Nick Clifton 3c62831e20 Add translations 2001-11-02 19:09:06 +00:00
Nick Clifton b8819ab2f8 Add comment 2001-11-02 16:29:15 +00:00
Nick Clifton 21da9f89f2 Initialize subspace_sections. 2001-11-02 16:19:54 +00:00
H.J. Lu 95f7d9f7b7 2001-11-02 H.J. Lu (hjl@gnu.org)
* coffgen.c (coff_object_p): Return 0 if the header is too big.
2001-11-02 15:47:24 +00:00
Hans-Peter Nilsson 12e1f53eb8 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
information.  Save bfd arch and mach values.  Restore on error.
2001-11-02 13:12:56 +00:00
Alan Modra a8d02d6673 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
(allocate_PIC_calls): New function.
	(allocate_dynrelocs): Don't allocate pic_call plt entries here.
	(elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
	(elf32_hppa_finish_dynamic_symbol): Remove dead code.
2001-11-02 10:37:04 +00:00
Hans-Peter Nilsson 4a15251e58 Fix cutnpasto in last entry 2001-11-02 07:22:37 +00:00
Hans-Peter Nilsson 72209a1fb6 * elf32-cris.c (cris_elf_grok_prstatus): New function.
(cris_elf_grok_prstatus): New function.
	(elf_backend_grok_prstatus): Define.
	(elf_backend_grok_psinfo): Define.
2001-11-02 07:20:24 +00:00
Alan Modra e90bf65af7 daily update 2001-11-01 23:00:04 +00:00
Alan Modra 86c76c7be0 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
prediction bits.
2001-11-01 05:35:10 +00:00
Chris Demetriou afdbd6d03b [ bfd/ChangeLog ]
2001-10-31  Chris Demetriou  <cgd@demetriou.com>

	* elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
	relocations properly.

[ gas/ChangeLog ]
2001-10-31  Chris Demetriou  <cgd@broadcom.com>

	* config/tc-mips.c (HAVE_32BIT_ADDRESSES): If compiling embedded
	PIC code, assume pointers the same size as GPRs.
	(macro): In M_LA_AB handling for embedded PIC code, support
	"la $treg,foo-bar($breg)".  In load/store handling
	(label ld_st) support "<op> $treg,<sym>-<local_sym>($breg)"
	which is used by the compiler for switch statements.
	In load/store double multi-instruction macro handling
	(label ldd_std) add a comment that no special handling
	is currently done for embedded PIC.
	(mips_ip): In 'o' (16-bit offset) case, only accept 16
	bit offsets.

[ gas/testsuite/ChangeLog ]
2001-10-31  Chris Demetriou  <cgd@broadcom.com>

	* gas/mips/empic.s: Undo damage inflicted on 2000-12-02.
	* gas/mips/empic.d: Likewise.
	* gas/mips/elempic.d: Likewise (it was copied into other files).
	* gas/mips/telempic.d: Likewise.
	* gas/mips/tempic.d: Likewise.

	* gas/mips/empic2.s: New test to check new 'la' and 'lw' (and
	related ops) syntax, test loads with large offsets.
	* gas/mips/emcic2.d: Likewise.
	* gas/mips/mips.exp: Run the new test on ELF platforms.
2001-11-01 01:33:47 +00:00
Alan Modra 0a299a95a8 daily update 2001-10-31 23:00:35 +00:00
H.J. Lu 2cd533b769 2001-10-31 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_output_extsym): Don't clear the visibility
	field for relocateable.
2001-10-31 16:42:48 +00:00
Alan Modra 4e12ff7fc2 Revert previous delta, instead do this.
* elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
	.plt relocs in DT_RELASZ.
2001-10-31 15:32:09 +00:00
Alan Modra 4578e0a726 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Set DT_RELASZ
whenever DT_PLTRELSZ.
2001-10-31 14:58:14 +00:00
Nick Clifton 7649aa5088 Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu targets 2001-10-31 09:50:09 +00:00
Nick Clifton a53ecf01a5 Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec. 2001-10-31 09:01:50 +00:00
Hans-Peter Nilsson ed73733d7d Remove #if 0 around bfd_mmo_mmix_vec 2001-10-31 03:08:59 +00:00
Hans-Peter Nilsson e06fcc8615 Split file by ^L:s as in original submitted patch 2001-10-31 03:07:48 +00:00
Alan Modra 6180d2b004 daily update 2001-10-30 23:01:01 +00:00
Nick Clifton 3c3bdf30e4 Add MMIX support 2001-10-30 15:20:14 +00:00
Nick Clifton f5ffc9190a If the LMA for a segment is known, use it for matching sections to segments.
Use the LMA when adjusting for inter-section alignment padding.
2001-10-30 11:40:28 +00:00
Nick Clifton e0e8c97fe9 Set the LMA based on the p_paddr of the segment that contains it. 2001-10-30 11:34:46 +00:00
Alan Modra 3109ff8fb4 daily update 2001-10-29 23:00:04 +00:00
Kazu Hirata 5b74f489cb * README: Fix a typo. 2001-10-29 22:29:59 +00:00
Kazu Hirata fe03258071 * bfdsumm.texi: Fix a typo. 2001-10-29 22:26:12 +00:00
Alan Modra cdf1fe3060 daily update, a bit late.. 2001-10-29 04:00:48 +00:00
Alan Modra 04820a4664 daily update 2001-10-27 23:00:06 +00:00
Nick Clifton 07d8a8910a Change footer to refer to FSF. Change subtitle to refer to original creation date. 2001-10-27 07:31:26 +00:00
Alan Modra a05798b13e daily update 2001-10-27 00:00:04 +00:00
Alan Modra aaaaf2ae5d daily update 2001-10-26 00:00:04 +00:00
Richard Henderson 0b6488e20b * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
timestamp to time_t for ctime.
2001-10-25 06:33:56 +00:00
Alan Modra cc7e8be27e daily update 2001-10-25 00:00:03 +00:00
Hans-Peter Nilsson 908d94bfcd * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
unsigned, increasing index.
2001-10-24 03:39:54 +00:00
Alan Modra db328227fa daily update 2001-10-24 00:00:35 +00:00
H.J. Lu 1b58be7e74 2001-10-23 H.J. Lu <hjl@gnu.org>
* elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
	m != NULL before accessing it.
2001-10-23 20:24:23 +00:00