Commit Graph

3101 Commits

Author SHA1 Message Date
Nick Clifton 32a3339c51 (MKDOC rule): Add $(CFLAGS) in case it contains CC_FOR_BUILD specific switches. 2003-07-04 14:46:14 +00:00
Jakub Jelinek 3368a7fb7a * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
true even if -pie.
2003-07-04 13:57:14 +00:00
Jakub Jelinek 9203ba999f bfd/
* elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
	(elfNN_ia64_dynamic_symbol_p): Change info->shared into
	!info->executable.
	(get_fptr): For -pie create .opd as writable section and create
	.rela.opd as well.
	(elfNN_ia64_check_relocs): Change info->shared into
	!info->executable.
	(allocate_fptr): Likewise.
	(allocate_dynrel_entries): Account for a relative reloc for -pie
	@fptr().  Don't account for a relative reloc if -pie want_ltoff_fptr
	for undefweak symbol.  Account for an IPLT reloc in .rela.opd
	section if -pie.
	(set_got_entry): Don't create a relative reloc if -pie
	want_ltoff_fptr for undefweak symbol.
	(set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
	(elfNN_ia64_relocate_section): Emit a relative reloc for -pie
	@fptr().

	* elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
	even if -pie.
	* elf32-i386.c (elf_i386_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
ld/
	* emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't include
	.opd if -pie.
	(OTHER_READWRITE_SECTIONS): Include .opd if -pie.
	* scripttempl/elf.sc: Use SHLIB_DATA_ADDR instead of DATA_ADDR
	if -pie.
2003-07-04 13:53:38 +00:00
Nick Clifton 8c17da6e59 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
(elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
<R_H8_DIR32A16>: Fix type of relocation.

* ld-h8300/h8300.exp: Replace loop with explicit list.  Run relax.d
unconditionally.  Run relax-2.d for *-elf targets.
* ld-h8300/relax.d: Fix typo.
* ld-h8300/relax.s: Add 0x prefixes.
* ld-h8300/relad-2.[sd]: New test.
2003-07-04 10:25:14 +00:00
Kaz Kojima 35cad4c475 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
sections were created already.  Remove unnecessary tests of
	the previous change.
2003-07-04 08:41:57 +00:00
Kaz Kojima 03151a5a11 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
bfd_make_section for existing sections.
2003-07-04 07:38:33 +00:00
Alan Modra 2293c4998c * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
create_got_section if we already have done so.
	* elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
	(sh_elf_check_relocs): Likewise.
	(sh_elf_adjust_dynamic_symbol): Delete "dynobj" var.  Use
	htab->root.dynobj instead.
	(sh_elf_check_relocs): Likewise.
	(sh_elf_finish_dynamic_sections): Likewise.
2003-07-04 04:58:03 +00:00
Alan Modra 003d627e6e * section.c (bfd_make_section): Return NULL for existing section. 2003-07-04 04:14:56 +00:00
Alan Modra fa681e5d43 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
ppc_elf_create_got if we've already done so.
2003-07-04 01:57:26 +00:00
Alan Modra 3dab13f62b * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
(_bfd_elf_find_pointer_linker_section): Likewise.
	(bfd_elf32_create_pointer_linker_section): Likewise.
	(bfd_elf32_finish_pointer_linker_section): Likewise.
	(bfd_elf64_create_pointer_linker_section): Likewise.
	(bfd_elf64_finish_pointer_linker_section): Likewise.
	(_bfd_elf_make_linker_section_rela): Likewise.
	* elfcode.h (elf_create_pointer_linker_section): Don't define.
	(elf_finish_pointer_linker_section): Likewise.
	* elflink.c (_bfd_elf_make_linker_section_rela): Delete.
	(_bfd_elf_create_linker_section): Move this function..
	(_bfd_elf_find_pointer_linker_section): ..and this..
	* elflink.h (elf_create_pointer_linker_section): ..and this..
	(elf_finish_pointer_linker_section): ..and this..
	* elf32-ppc.c: ..to here, renaming to the following, and adjusting
	calls.
	(elf_create_linker_section): Convert to C90, tidy.
	(elf_find_pointer_linker_section): Likewise.
	(elf_create_pointer_linker_section): Likewise.
	(elf_finish_pointer_linker_section): Likewise.
	* elf32-i370.c: Delete #if 0 code.
2003-07-04 01:50:12 +00:00
Alan Modra b214fcbec0 daily update 2003-07-04 00:00:05 +00:00
Alan Modra 3c5c592957 daily update 2003-07-03 00:00:05 +00:00
Alan Modra 772119ce53 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
_restf* to be satisfied by shared libs, and always force them local.
	(toc_adjusting_stub_needed): Avoid scanning linker created sections.
	Correct test for "bl".
	(ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
	primary opcode 31.
2003-07-02 07:41:51 +00:00
Alan Modra 70f25c551c daily update 2003-07-02 00:00:05 +00:00
Martin Schwidefsky bd1ea41b84 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
(s390_tls_reloc): New function.
        (elf_howto_table): Add long displacement relocations R_390_20,
        R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
        (elf_s390_reloc_type_lookup): Likewise.
        (elf_s390_check_relocs): Likewise.
        (elf_s390_gc_sweep_hook): Likewise.
        (elf_s390_relocate_section): Likewise.
        * elf64-s390.c: Same changes as for elf32-s390.c.
        * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
        BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
        BFD_RELOC_390_TLS_GOTIE20.
        * bfd-in2.h: Regenerate.
        * libbfd.h: Likewise.
2003-07-01 14:44:59 +00:00
Alan Modra 34fef7f4d8 daily update 2003-07-01 00:00:05 +00:00
Alan Modra 113202d6bc * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
(ins_imms, ins_immsm1u4): Likewise.  Warning fix.
2003-06-30 04:09:27 +00:00
Alan Modra f1f18543ca daily update 2003-06-30 00:00:05 +00:00
Alan Modra c58b95236c Convert to C90 and a few tweaks. 2003-06-29 10:06:40 +00:00
Andreas Jaeger 58611256d8 Add forgotten ChangeLog snippet for last elf64-x86-64.c patch. 2003-06-29 10:02:24 +00:00
Andreas Jaeger 27482721cf * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
unnecessary prototypes.  Replace PTR with void *.
2003-06-29 05:57:36 +00:00
Alan Modra 7cfbef4774 daily update 2003-06-29 00:00:37 +00:00
Thiemo Seufer 2b86c02e74 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR. 2003-06-28 22:13:37 +00:00
Alan Modra 0d5b97c55d daily update 2003-06-28 00:00:06 +00:00
Nick Clifton e7c81c254c Fix --add-gnu-debuglink 2003-06-27 08:01:28 +00:00
Thiemo Seufer 72b4917c07 * elfxx-mips.c: Revert .got alignment to 2**4. 2003-06-27 07:32:33 +00:00
Thiemo Seufer 917090909e * elf32-mips.c: Fix addend for _gp_disp special symbol. 2003-06-27 07:31:27 +00:00
Thiemo Seufer 7a79a000c1 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
relocation header setup.
	* binutils-all/readelf.ss-tmips: Adjust symbol indices.
2003-06-27 01:16:30 +00:00
Alan Modra 4be5b94a41 daily update 2003-06-27 00:00:05 +00:00
Alan Modra f6b91f13b5 daily update 2003-06-26 00:00:05 +00:00
Alan Modra 51b1e980ba Missed copyright update in last commit. 2003-06-25 11:07:05 +00:00
Alan Modra e47cd12545 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
(ppc_elf_reloc_type_lookup): Modify comment.
	(ppc_elf_info_to_howto): Ditto.
	(ppc_elf_relocate_section): Ditto.
	(ppc_elf_check_relocs): Call ppc_elf_howto_init.
2003-06-25 11:05:58 +00:00
Alan Modra 1049f94e8e Correct spelling of "relocatable". 2003-06-25 06:40:27 +00:00
Alan Modra 59861b363a daily update 2003-06-25 00:00:05 +00:00
Alan Modra d85f2c7d1f * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
local sym errors.
2003-06-24 14:17:22 +00:00
Alan Modra 55fd94b056 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
prototypes and casts.  Replace PTR with void *.  Formatting.
	* elf32-ppc.c: Likewise.  Break long strings too.
	(ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
	(ppc_elf_unhandled_reloc): Internationalize error message.
	* elf32-ppc.h: Remove PARAMS.
2003-06-24 14:03:53 +00:00
Mark Mitchell 88810f8cd1 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
APUinfo slots.
	(ppc_elf_final_write_processing): Likewise.
2003-06-24 06:41:36 +00:00
Alan Modra 8ee95d47b6 daily update 2003-06-24 00:00:05 +00:00
H.J. Lu 6e35c4dafc 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
* elflink.h (elf_link_input_bfd): Check raw size when using
	kept_section to preserve debug information discarded by
	linkonce.
2003-06-23 23:39:39 +00:00
Alan Modra fbe56916cf daily update 2003-06-23 00:09:44 +00:00
Alan Modra cdff990c2f daily update 2003-06-21 00:00:06 +00:00
Alan Modra 8f3bab5775 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
(ppc64_elf_setup_section_lists): Set it.
	(ppc64_elf_relocate_section): Check sym section id against top_id.
	(ppc_build_one_stub): Comment on top_id.
2003-06-20 12:35:30 +00:00
Nick Clifton efbc813eb3 Add tic4x-*-rtems*. 2003-06-20 08:36:19 +00:00
Alan Modra 4ce794b729 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
prototypes and casts.  Replace PTR with void *.  Format copyright.
	Mention ABI links.
	(struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
	sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
	(ppc_type_of_stub): Make r_type an enum.
	(ppc64_elf_size_stubs): Likewise.
	* elf64-ppc.h: Remove PARAMS macro.
2003-06-20 05:30:46 +00:00
Alan Modra 1698d123e2 daily update 2003-06-20 00:00:05 +00:00
Alan Modra 3254fd24bd * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
elf hash tab fields.
2003-06-19 15:11:26 +00:00
Alan Modra d2a300cfe3 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
(ppc64_elf_info_to_howto): Likewise.
	(ppc64_elf_build_stubs): Add "stats" param, and print statistics.
	* elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2003-06-19 13:50:35 +00:00
Alan Modra 83615de03f * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
reloc overflow on discarded eh_frame entries.
2003-06-19 13:21:53 +00:00
Alan Modra 9b5ecbd0c6 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
(ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
	Return error condition.
	(ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
	that have has_gp_reloc set.
	(struct ppc_link_hash_table): Add stub_count.
	(ppc_build_one_stub): Increment it.
	(ppc64_elf_link_hash_table_create): zmalloc rather than clearing
	individual fields.
	* elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2003-06-19 11:49:02 +00:00
Alan Modra c8b5eb5f85 daily update 2003-06-19 00:00:06 +00:00
Alan Modra 64c456e1a1 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
size calculation from addend.  Round size up.
2003-06-18 05:18:06 +00:00
Hans-Peter Nilsson 3dab95d324 * elf32-cris.c (cris_elf_relocate_section) <case
R_CRIS_32_GOTREL>: When linking a program, don't complain about a
	symbol from a normal object or an undefined weak symbol.
2003-06-18 04:14:14 +00:00
Alan Modra 0b13192e9f * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
R_PPC64_TOC relocs.
2003-06-18 03:26:22 +00:00
H.J. Lu f97b9cb853 bfd/
2003-06-17  H.J. Lu <hongjiu.lu@intel.com>

	* section.c (struct sec): Put back kept_section.
	(STD_SECTION): Put back kept_section initialization.
	* bfd-in2.h: Regenerate.

	* elflink.h (elf_link_input_bfd): Also check discarded linkonce
	sections for relocateable output. Use kept_section to preserve
	debug information discarded by linkonce.

ld/

2003-06-17  H.J. Lu <hongjiu.lu@intel.com>

	* ldlang.c (section_already_linked): Put back assignment of
	kept_section.
2003-06-18 00:30:04 +00:00
Alan Modra e6300d0dc6 daily update 2003-06-18 00:00:05 +00:00
H.J. Lu 9f1c3a0af7 2003-06-17 Roland McGrath <roland@redhat.com>
* elfxx-ia64.c (elfNN_ia64_relocate_section): Support
	segment-relative relocation between different segments.
2003-06-17 23:43:18 +00:00
Alan Modra 1cf1f67042 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
optimizations earlier.
2003-06-17 14:22:46 +00:00
Alan Modra 734b6cf9ae * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
Restore previous input_list type.
	(ppc64_elf_link_hash_table_create): Undo last change.
	(ppc64_elf_setup_section_lists): Reinstate code setting up input lists
	per output section, but don't bother with bfd_abs_section marker.
	(ppc64_elf_next_input_section): Adjust for multiple input section
	lists.
	(group_sections): Likewise.
2003-06-17 13:43:02 +00:00
Jakub Jelinek 23fbd6fa70 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
*r_offset == r_addend for RELATIVE relocs against .got.
2003-06-17 12:39:41 +00:00
Alan Modra dad27d18ac * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs. 2003-06-17 12:37:26 +00:00
Nick Clifton b613960add (elf_gc_record_vtentry): Allocate an extra element in the vtable_entries_used
array to allow for the accessing the largest element.
2003-06-17 09:57:18 +00:00
Alan Modra 3d6f9012bb * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
input_list.
	(ppc64_elf_link_hash_table_create): Init input_list here.
	(ppc64_elf_setup_section_lists): Remove code setting up input lists
	per output section.  Set toc_off for abs and other standard sections.
	(ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
	(ppc64_elf_next_input_section): Adjust for single input section list.
	Don't set toc_curr from input bfds that haven't set elf_gp.
	(group_sections): Adjust for single input section list.
2003-06-17 09:10:41 +00:00
Alan Modra 000732f753 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero. 2003-06-17 00:25:45 +00:00
Alan Modra 6a3b19105f daily update 2003-06-17 00:00:04 +00:00
Alan Modra 81407a69a5 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
	dtprel entry.  Ensure TLS_LD DTPMOD reloc has a zero addend.  Write
	got section for RELATIVE relocs.  Fix wrong comment.  Change condition
	under which dynamic relocs update the section contents.
2003-06-16 10:50:22 +00:00
Alan Modra 0e6b25ec0e daily update 2003-06-16 00:00:05 +00:00
Alan Modra 3f8b8186e9 daily update 2003-06-15 00:00:04 +00:00
Alan Modra 54da0153dd daily update 2003-06-14 00:00:06 +00:00
Nick Clifton a06a29f25f Add i386-netbsd-gnu target. 2003-06-13 13:17:58 +00:00
Alan Modra 3732bf5de3 daily update 2003-06-13 00:00:06 +00:00
Nick Clifton 2593f09acc Add new switch to objcopy: --add-gnu-debuglink=<file>
Allows packages to be shipped in two forms, a stripped executable and debug
info file.
2003-06-12 07:23:31 +00:00
Nick Clifton 7d1ebfb2ed (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]): New target (was i[3-7]86-*-openbsd* before).
(i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
(vax-*-openbsd*): New target.
2003-06-12 07:21:50 +00:00
Alan Modra 7282305265 daily update 2003-06-12 00:00:06 +00:00
Thiemo Seufer d80dcc6af4 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
for n32, too.
	(MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
	(mips_elf_rel_dyn_section): Use appropriate section alignment.
	(mips_elf_create_got_section): Likewise.
	(_bfd_mips_elf_create_dynamic_sections): Likewise.
	* ld-mips-elf/multi-got-1.d: Adjust addresses.
	* ld-mips-elf/rel32-n32.d: Likewise.
2003-06-11 21:01:50 +00:00
Thiemo Seufer a7ebbfdf67 * elf32-mips.c (mips_elf_generic_reloc): New Function.
(elf_mips_howto_table_rel): Use it.
	(gprel32_with_gp): Move prototype.
	(mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
	Use mips_elf_generic_reloc.
	(mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
	Code cleanup.
	(_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
	zero addend.
	(mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
	as in the other *_gprel*_reloc functions.
	(gprel32_with_gp): Handle partial_inplace properly.
	(mips32_64bit_reloc): Use mips_elf_generic_reloc.
	(mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
	Do addend handling directly instead of calling
	_bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
	* elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
	of zero addend. Handle partial_inplace properly.
	(mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
	addend.
	(mips_elf64_gprel16_reloc): Likewise.
	(mips_elf64_literal_reloc): Likewise.
	(mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
	logic as in the other *_gprel*_reloc functions. Handle
	partial_inplace properly.
	(mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
	addend. Handle partial_inplace properly.
	(mips16_gprel_reloc): Likewise. Do addend handling directly instead
	of calling _bfd_mips_elf_gprel16_with_gp.
	* elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
	(mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
	of zero addend.
	(mips_elf_shift6_reloc): Handle partial_inplace properly.
	(mips16_gprel_reloc): Likewise. Do addend handling directly instead
	of calling _bfd_mips_elf_gprel16_with_gp.
	* elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
	partial_inplace properly. Fix wrong addend handling. Fix overflow
	check.
	(_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
	exported.
	(mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
	(_bfd_mips_elf_relocate_section): Likewise.
	(mips_elf_create_dynamic_relocation): Update sec_info_type access.
	* elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
	(_bfd_mips_elf_sign_extend): New prototype.
	* config/tc-mips.c (md_pcrel_from): Return actual pcrel address.
	(md_apply_fix3): Ignore non-special relocations. Remove superfluous
	exceptions from size assert. Remove most of the addend fixup
	specialcasing. Remove value, use valP directly. simplify fx_addnumber
	handling. Remove zero addend specialcases.
	(tc_gen_reloc): Use appropriate value for reloc2 addend. Remove
	the addend fixup specialcase.
	* config/tc-mips.h (MD_APPLY_SYM_VALUE): Define as 0.
2003-06-11 16:22:26 +00:00
Nick Clifton de6e5e1a72 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
* configure: Regenerate.
2003-06-11 13:38:07 +00:00
Nick Clifton 49ba19a457 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]): New target
(was sparc-*-openbsd* before).
  (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2003-06-11 13:34:50 +00:00
H.J. Lu 3b4433739c bfd/
2003-06-06  H.J. Lu <hongjiu.lu@intel.com>

	* po/Make-in (DESTDIR): New.
	(install-data-yes): Support $(DESTDIR).
	(uninstall): Likewise.

binutils/

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

	* po/Make-in (DESTDIR): New.
	(install-data-yes): Support $(DESTDIR).
	(uninstall): Likewise.

gas/

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

	* po/Make-in (DESTDIR): New.
	(install-data-yes): Support $(DESTDIR).
	(uninstall): Likewise.

gprof/

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

	* po/Make-in (DESTDIR): New.
	(install-data-yes): Support $(DESTDIR).
	(uninstall): Likewise.

ld/

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

	* po/Make-in (DESTDIR): New.
	(install-data-yes): Support $(DESTDIR).
	(uninstall): Likewise.

opcodes/

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

	* po/Make-in (DESTDIR): New.
	(install-data-yes): Support $(DESTDIR).
	(uninstall): Likewise.
2003-06-11 01:32:08 +00:00
Alan Modra dacb1b5920 daily update 2003-06-11 00:00:05 +00:00
Alan Modra 795bb480ca * bfd/Makefile.am (config.status): Depend on version.h.
Run "make dep-am" in bfd/ and elsewhere, and regen files.
2003-06-10 23:44:42 +00:00
Alan Modra adadcc0cc9 Add "attn", "lq" and "stq" power4 insns. 2003-06-10 07:44:11 +00:00
Richard Sandiford f4984206d8 include/elf/
* h8.h (E_H8_MACH_H8300SXN): New flag.

bfd/
	* archures.c (bfd_mach_h8300sxn): New architecture.
	* bfd-in2.h: Regenerate.
	* cpu-h8300.c (h8300_scan): Check for 'sxn'.
	(h8300sxn_info_struct): New.
	(h8300sx_info_struct): Link to it.
	* elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
	(elf32_h8_final_write_processing): Likewise.

gas/
	* config/tc-h8300.c (h8300sxnmode): New.
	(md_pseudo_table): Add .h8300sxn entry.  Sync others with FSF version.

ld/
	* configure.tgt (h8300*): Add h8300sxn emulations.
	* Makefile.am (ALL_EMULATIONS): Add eh8300sxn.o and eh8300sxnelf.o.
	(eh8300sxn.c, eh8300sxnelf.c): New rules.
	* Makefile.in: Regenerate.
	* emulparams/h8300sxnelf.sh, emulparams/h8300sxn.sh: New files.
2003-06-10 07:09:31 +00:00
Alan Modra ea1eda6a1f daily update 2003-06-10 00:00:05 +00:00
Alan Modra 2596047a51 daily update 2003-06-09 00:00:05 +00:00
Alan Modra ad8e1ba599 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
elfxx-target.h so that we can use elf_backend_got_header_size.
	(ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
	(GLINK_CALL_STUB_SIZE): Modify.  Define new glink call stub and
	associated macros.
	(ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
	dst_mask.
	(enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
	ppc_stub_plt_branch_r2off.
	(struct ppc_stub_hash_entry): Reorganize.
	(struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
	toc_curr, toc_off and emit_stub_syms.
	(ppc64_elf_link_hash_table_create): Init them.
	(ppc_stub_name): Correct string size.
	(ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
	(ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
	used.
	(ppc_type_of_stub): Tweak root.type test.
	(build_plt_stub): Remove glink code.  Adjust for insn macro changes.
	(ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
	ppc_stub_plt_branch_r2off.
	(ppc_build_one_stub): Likewise.  Fix var shadowing.  Correct addis,addi
	range test.  Use toc_off to calculte r2 values.  Handle emit_stub_syms.
	(ppc64_elf_setup_section_lists): Remove htab creator flavour test.
	Initialize elf_gp and toc_curr.
	(ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
	(ppc64_elf_next_input_section): Set toc_off.
	(group_sections): Ensure groups have the same TOC.
	(ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
	(ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
	Build new glink stub.
	(ppc64_elf_relocate_section): Handle multiple TOCs.  Fix comments.
	(ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
	* elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
	(ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
	* section.c (struct sec): Rename flag12 to has_gp_reloc.
	(STD_SECTION): Update.
	* ecoff.c (bfd_debug_section): Update comment.
	* bfd-in2.h: Regenerate.
2003-06-08 14:06:38 +00:00
Alan Modra 5f7adbf064 daily update 2003-06-08 00:00:06 +00:00
Alan Modra 789b97bf70 daily update 2003-06-07 00:00:05 +00:00
Daniel Jacobowitz 90fff0d44f * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
NULL function pointers.
2003-06-06 02:12:04 +00:00
Alan Modra 3dc08f3180 daily update 2003-06-06 00:00:05 +00:00
Daniel Jacobowitz c82b20e457 * simple.c (bfd_simple_get_relocated_section_contents): Call
_bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2003-06-05 14:07:52 +00:00
Svein Seldal 5a5b96513f Moved the ticoff0/1 swaptables and coff0/1 bad format hooks to coffcode.h 2003-06-04 11:38:30 +00:00
Svein Seldal 53d4437ac6 Altered the CREATE_xxx_COFF_TARGET_VEC macro arguments -- changelog dropped out 2003-06-04 11:15:09 +00:00
Svein Seldal 3fa785190a Altered the CREATE_xxx_COFF_TARGET_VEC macro arguments 2003-06-04 10:47:33 +00:00
Svein Seldal 736694c89e Fixed initialization bug 2003-06-04 10:11:02 +00:00
Jakub Jelinek 9ee5e4996f binutils/
* readelf.c (get_segment_type): Handle PT_GNU_STACK.
bfd/
	* elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
	(bfd_section_from_phdr): Likewise.
	(map_sections_to_segments): Create PT_GNU_STACK segment header.
	(get_program_header_size): Count with PT_GNU_STACK.
	* elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
	* elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
include/
	* bfdlink.h (struct bfd_link_info): Add execstack and noexecstack.
	* elf/common.h (PT_GNU_STACK): Define.
ld/
	* ldgram.y (phdr_type): Grok PT_GNU_STACK.
	* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
	-z execstack and -z noexecstack.
	(gld${EMULATION_NAME}_list_options): Likewise.
	* scripttempl/elf.sc: If not -r, discard .note.GNU-stack section.
2003-06-03 22:27:24 +00:00
H.J. Lu 6f6f27f842 bfd/
2003-06-03  H.J. Lu <hongjiu.lu@intel.com>

	* elflink.h (elf_link_input_bfd): Call linker error_handler
	for discarded definitions.

include/

2003-06-03  H.J. Lu <hongjiu.lu@intel.com>

	* bfdlink.h (LD_DEFINITION_IN_DISCARDED_SECTION): New.

ld/

2003-06-03  H.J. Lu <hongjiu.lu@intel.com>

	* ldmisc.c: Include "bfdlink.h".
	(error_handler): Handle LD_DEFINITION_IN_DISCARDED_SECTION
	and -LD_DEFINITION_IN_DISCARDED_SECTION.

	* Makefile.am: Rebuild dependency.
	* Makefile.in: Regenerated.

ld/testsuite/

2003-06-03  H.J. Lu <hongjiu.lu@intel.com>

	* ld-discard/extern.d: Updated.
	* ld-discard/start.d: Likewise.
	* ld-discard/static.d: Likewise.
2003-06-03 18:15:05 +00:00
Nick Clifton a3b6428fe7 Return 'n' if section flags are SEC_HAS_CONTENTS && SEC_READONLY. 2003-06-03 17:45:49 +00:00
Nick Clifton e30ddb24b3 Add pc-relative 32-bit reloc to v850 port. Fixes ld-elf/merge test failure. 2003-06-03 16:24:06 +00:00
Kaz Kojima 2558b9a9f0 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
and DT_DEBUG dynamic tag even for position independent executables.
	* elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2003-06-03 04:50:20 +00:00
Daniel Jacobowitz f15398ef83 * config.bfd: Move obsolete entries out of the range of the
targmatch sed script.
2003-06-02 19:25:51 +00:00
Daniel Jacobowitz cad2898553 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete. 2003-06-02 18:59:49 +00:00
Alan Modra 12be538b0b daily update 2003-06-02 00:00:05 +00:00
Alan Modra e8898e69f1 daily update 2003-06-01 00:00:05 +00:00
Jakub Jelinek f2c822e386 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
plt entries, not just 8191.
2003-05-31 07:55:10 +00:00
Alan Modra 081933c009 daily update 2003-05-31 00:57:55 +00:00
Daniel Jacobowitz c9c27aad54 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2003-05-30 19:13:36 +00:00
Jakub Jelinek 36af4a4e51 bfd/
* elflink.h (elf_link_add_object_symbols): Use !info->executable
	instead of info->shared where appropriate.
	(bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
	* elflink.c (_bfd_elf_create_got_section): Likewise.
	(_bfd_elf_link_create_dynamic_sections): Likewise.
	(_bfd_elf_link_assign_sym_version): Likewise.
	* elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
	and DT_DEBUG dynamic tag even for position independent executables.
	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
	* elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
	* elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
	* elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
	* elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
	* elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
	* elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
	* elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
	* elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
include/
	* bfdlink.h (struct bfd_link_info): Add pie and executable
	bits.
ld/
	* lexsup.c (OPTION_PIE): Define.
	(ld_options): Add -pie and --pic-executable options.
	(parse_args): Handle OPTION_PIE.
	* ldmain.c (main): Initialize link_info.pie and
	link_info.executable.
	* genscripts.sh: Generate PIE scripts.
	* ld.texinfo: Document -pie and --pic-executable options.
	* emultempl/elf32.em (gld${EMULATION_NAME}_after_open):
	(gld${EMULATION_NAME}_place_orphan): Likewise.
	(gld${EMULATION_NAME}_get_script): Include PIE scripts.
	* scripttempl/elf.sc: In PIE scripts set . the same way as in
	shared scripts.
	* emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Set to yes.
	* emulparams/elf64_ia64.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf32ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf64ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf_x86_64.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf32_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf64_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf64alpha.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf64_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
	* emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Likewise.
2003-05-30 15:50:12 +00:00
Alan Modra 027e4eea9c daily update 2003-05-30 00:00:04 +00:00
Alan Modra f8843e8713 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
signalled thread.
	(elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2003-05-29 23:50:04 +00:00
Nick Clifton 29e1a6e4ca Replace <ctype.h> with "safe-ctype.h" 2003-05-29 15:05:41 +00:00
Thiemo Seufer 4b55507088 * elfxx-mips.c: Don't force symbols local unconditionally. 2003-05-29 02:28:32 +00:00
Alan Modra 7bd7a2abff daily update 2003-05-29 00:00:05 +00:00
H.J. Lu 0236e03ee7 2003-05-28 Alan Modra <amodra@bigpond.net.au>
* elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
	undefined_symbol call.
2003-05-28 20:27:51 +00:00
Richard Sandiford 9e4aeb9307 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
(mips_elf_link_hash_table): Likewise.
2003-05-27 08:04:12 +00:00
Alan Modra 0b4ffb6c40 daily update 2003-05-23 00:00:06 +00:00
Thiemo Seufer d0c728db63 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
R_MIPS_GNU_REL16_S2 support.
	(bfd_elf64_bfd_reloc_type_lookup): Use it.
	(mips_elf64_rtype_to_howto): Use it.
	* elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
	R_MIPS_GNU_REL16_S2 support.
	(bfd_elf32_bfd_reloc_type_lookup): Use it.
	(mips_elf_n32_rtype_to_howto): Use it.
2003-05-22 09:27:52 +00:00
Dave Anglin 759ebd765d * som.h: Define PA_2_0 before including a.out.h 2003-05-22 03:34:52 +00:00
Alan Modra 2e7b6c08fd daily update 2003-05-22 00:00:06 +00:00
Eric Christopher 143d77c5e9 2003-05-07 Eric Christopher <echristo@redhat.com>
Alexandre Oliva   <aoliva@redhat.com>

	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
	pic tests, change to warning.
	(_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.

2003-05-07  Eric Christopher  <echristo@redhat.com>

        * config/tc-mips.c (mips_abicalls): New variable.
        (md_parse_option): Use.
        (s_option): Ditto.
        (s_abicalls): Ditto.
        (mips_elf_final_processing): Set EF_MIPS_PIC and
        EF_MIPS_CPIC dependent on above.
2003-05-21 21:53:33 +00:00
Nick Clifton cea3d58d02 Check for a target triplet of shl-...-netbsdelf as well as shle-...-netbsdelf. 2003-05-21 13:06:30 +00:00
Nick Clifton 60e424089f Fix dst_mask for X_STORMY16_REL_12 reloc. 2003-05-21 12:36:46 +00:00
Nick Clifton 385a4c14f3 USe is_elf_hash_table() to check for the presence of an elf_link_hash_table 2003-05-21 09:23:07 +00:00
Roland McGrath 129b8c20a8 . 2003-05-21 00:57:35 +00:00
Roland McGrath a05758dd2d 2003-05-19 Roland McGrath <roland@redhat.com>
* elf.c (bfd_elf_bfd_from_remote_memory): New function.
	* bfd-in.h: Declare it.
	* bfd-in2.h: Regenerated.
	* elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
	* elf-bfd.h (struct elf_backend_data): New function pointer member
	elf_backend_bfd_from_remote_memory.
	(_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
	Declare them.
	* elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
	(elfNN_bed): Add that to the initializer.
2003-05-21 00:57:20 +00:00
Roland McGrath 8d6337feeb 2003-05-19 Roland McGrath <roland@redhat.com>
* elf.c (bfd_elf_bfd_from_remote_memory): New function.
	* bfd-in.h: Declare it.
	* elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
	* elf-bfd.h (struct elf_backend_data): New function pointer member
	elf_backend_bfd_from_remote_memory.
	(_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
	Declare them.
	* elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
	(elfNN_bed): Add that to the initializer.
2003-05-21 00:56:05 +00:00
Roland McGrath 3333a7c339 2003-05-19 Roland McGrath <roland@redhat.com>
* elf.c (bfd_elf_bfd_from_remote_memory): New function.
	* bfd-in.h: Declare it.
	* elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
	* elf-bfd.h (struct elf_backend_data): New function pointer member
	elf_backend_bfd_from_remote_memory.
	(_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
	Declare them.
	* elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
	(elfNN_bed): Add that to the initializer.
2003-05-15  Roland McGrath  <roland@redhat.com>

	* elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2003-05-21 00:56:00 +00:00
Alan Modra 758949787c daily update 2003-05-21 00:00:06 +00:00
H.J. Lu 22d5e33918 bfd/
2003-05-20  Jakub Jelinek  <jakub@redhat.com>

	* elflink.h (elf_link_output_extsym): Only issue error about !=
	STV_DEFAULT symbols if they are bfd_link_hash_undefined.

2003-05-20  H.J. Lu <hongjiu.lu@intel.com>

	* elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
	when removing the old definition for symbols with non-default
	visibility.

ld/testsuite/

2003-05-20  Jakub Jelinek  <jakub@redhat.com>

	* ld-elfvsb/common.c: New file.
	* ld-elfvsb/elfvsb.exp: Add common.

2003-05-20  H.J. Lu <hongjiu.lu@intel.com>

	* ld-elfvsb/sh3.c: New file.
	* ld-elfvsb/test.c: Likewise.

	* ld-elfvsb/elfvsb.exp: Add new weak hidden symbol tests.
2003-05-20 14:35:01 +00:00
Alan Modra 56fdfaa153 daily update 2003-05-20 00:00:37 +00:00
Jason Eckhardt b645cb1726 2003-05-18 Jason Eckhardt <jle@rice.edu>
gas:
        * config/tc-i860.c (i860_process_insn): Initialize fc after
        each opcode mismatch.

include/opcode:
        * i860.h (form, pform): Add missing .dd suffix.

opcodes:
        * i860-dis.c (print_insn_i860): Instruction shrd has a dual bit,
        print it.

bfd:
        * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2003-05-18 21:24:33 +00:00
Andreas Schwab d2ff124f90 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
elf_section_data during processing of pc-relative and absolute
	relocations.
	(elf_m68k_relocate_section): Use the cached reloc section instead
	of computing it again.  Fix handling of visibility.  Don't modify
	addend when copying over a relocation into the output.
2003-05-17 19:40:36 +00:00
Alan Modra 9c7a29a32e * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
to trim plt entries.  Move undefweak non-default visibility test..
	(allocate_dynrelocs): ..from here.
	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
	dynamic_sections_created here.  Update comment.  Move undefweak
	non-default visibility test..
	(allocate_dynrelocs): ..from here.  Fix comment.
	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
	to trim plt entries.  Move undefweak non-default visibility test..
	(allocate_dynrelocs): ..from here.  Fix comment.
	* elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
	STV_DEFAULT rather than comparing with zero.
	* elflink.c (_bfd_elf_merge_symbol): Likewise.
	(_bfd_elf_fix_symbol_flags): Likewise.  Format comment.
2003-05-17 06:16:03 +00:00
Thiemo Seufer 9bcf4de0de * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
pointers.
	(_bfd_set_gp_value): Likewise.
2003-05-17 00:41:45 +00:00
Alan Modra c580a37263 daily update 2003-05-17 00:00:06 +00:00
Michael Snyder 5d1db417ca 2003-05-16 Michael Snyder <msnyder@redhat.com>
From Bernd Schmidt  <bernds@redhat.com>
	* archures.c (bfd_mach_h8300sx): New.
	* bfd-in2.h: Regenerate.
	* cpu-h8300.c (h8300_scan)): Add support for h8300sx.
	(h8300sx_info_struct): New.
	(h8300s_info_struct): Link to it.
	* elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
	(elf32_h8_final_write_processing): Likewise.
	(elf32_h8_relax_section): Likewise.
2003-05-16 23:39:24 +00:00
Nick Clifton 80c7c40aef Replace i[3456]86 with i[3-7]86 2003-05-16 16:30:27 +00:00
Alan Modra 73e7296b30 daily update 2003-05-16 00:00:06 +00:00
H.J. Lu c1be741f92 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
	symbol.
2003-05-15 14:54:47 +00:00
H.J. Lu a15d9d3a98 2003-05-14 H.J. Lu <hongjiu.lu@intel.com>
* elflink.h (elf_link_check_versioned_symbol): Also allow
	the base version.
2003-05-15 13:48:53 +00:00
Alan Modra 09695f5689 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
(elf_i386_relocate_section): Likewise.
	* elf32-ppc.c (allocate_dynrelocs): Likewise.
	(ppc_elf_relocate_section): Likewise.
	* elf64-ppc.c (allocate_dynrelocs): Likewise.
	(ppc64_elf_relocate_section): Likewise.
2003-05-15 06:35:43 +00:00
Thiemo Seufer 40f62fa0b5 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case. 2003-05-15 00:04:34 +00:00
Alan Modra 7f44fa07f0 daily update 2003-05-15 00:00:14 +00:00
Stephane Carrez 47247ced96 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
processor capability, allow merge of HC12 and HCS12 in some cases.
	(m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
	* cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
	(bfd_m68hc12_arch): Link it.
	(scan_mach): New function.
2003-05-13 18:54:25 +00:00
Andrew Haley 32dfa85d90 2003-05-13 Andrew Haley <aph@redhat.com>
* elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2003-05-13 15:32:19 +00:00
Alan Modra 586119b38f * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
elf32-ppc.c.  Add ELF_LINK_FORCED_LOCAL check.
	* elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
	(allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
	(ppc_elf_relocate_section): Likewise.
	* elf64-ppc.c (allocate_dynrelocs): Likewise.
	(ppc64_elf_relocate_section): Likewise.  Use for .got relocs too.
	(ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
	relocs need no other types.
	* elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
	dynreloc check.
	(elf_i386_relocate_section): Likewise.  Use for .got relocs too.
	(elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
	.got relocs.
2003-05-13 14:09:51 +00:00
Kaz Kojima 04e534c39a * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
copy ELF_LINK_NON_GOT_REF from weakdef.
	(allocate_dynrelocs):  For undef weak syms with non-default
	visibility, a) don't allocate plt entries, b) don't allocate
	.got relocs, c) discard dyn rel space
        (sh_elf_relocate_section): d) don't generate .got relocs, e)
        don't generate dynamic relocs.
	(sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
	for weakdefs when symbol already adjusted.
2003-05-13 12:13:37 +00:00
Alan Modra 03e2bd2f1f daily update 2003-05-13 00:00:06 +00:00
Nick Clifton 0afb2dc078 Use "bitfield" overflow detection for R_XSTORMY16_16 reloc. 2003-05-12 09:12:48 +00:00
Nick Clifton 9d29900bf7 Fix typo in spelling of name of R_H8_DIR8 reloc 2003-05-12 08:50:19 +00:00
Jason Eckhardt a48c6a54fc 2003-05-11 Jason Eckhardt <jle@rice.edu>
* bfd/elf32-i860.c (elf32_i860_relocate_highadj): Properly
	adjust upper bits.
	(elf32_i860_relocate_splitn): Obtain upper 5 bits from the
	proper place.
	(elf32_i860_relocate_pc16): Obtain upper 5 bits from the
	proper place.
2003-05-12 03:08:02 +00:00
Alan Modra 18d09ed4b1 daily update 2003-05-12 00:00:05 +00:00
Andreas Schwab 44f745a6a2 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
complicated tests for unresolvable relocs with a simple direct
	scheme using "unresolved_reloc" var.  Report some detail on
	bfd_reloc_outofrange and similar errors.
2003-05-11 16:19:12 +00:00
Alan Modra bfa50b54ea daily update 2003-05-11 00:00:06 +00:00
Alan Modra b424635c49 daily update 2003-05-10 00:00:06 +00:00
Martin Schwidefsky 4ec72bdef8 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
	(WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
	* elf64-s390.c: Likewise.
2003-05-09 16:41:42 +00:00
Martin Schwidefsky 64285810f5 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
(elf_s390_adjust_dynamic_symbol): For weak symbols, copy
	ELF_LINK_NON_GOT_REF from weakdef.
	(elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
	already been adjusted before treating it specially.
	* el64-s390.c: Likwise.
2003-05-09 15:29:47 +00:00
Martin Schwidefsky 82058a735b * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
non-default visibility, a) don't make them dynamic, b) discard
	space for dynamic relocs.
	(elf_s390_relocate_section): Initialize the GOT entries and skip
	R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
	symbols with non-default visibility.
	* elf64-s390.c: Likewise.
2003-05-09 15:17:54 +00:00
Alan Modra 60d8b5244d * cpu-arm.c (arm_check_note): Warning fix.
* elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes.  Arrange
	to keep relocs if edited.
	(iq2000_elf_print_private_bfd_data): Return TRUE.
	* elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
	ELF64_R_SYM.
	(elfNN_ia64_relax_ldxmov): Warning fix.
	* xtensa-isa.c (xtensa_add_isa): Warning fix.
	* xtensa-modules.c (get_num_opcodes): Warning fix.
2003-05-09 11:35:35 +00:00
Alan Modra e57b535673 * elf.c (elf_fake_sections): Use correct cast for sh_name. 2003-05-09 10:58:12 +00:00
Alan Modra 45d6a902ae * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
elflink.h.  Replace LOG_FILE_ALIGN with bed->s->log_file_align.
	(_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
	(bfd_elf_record_link_assignment): Move from elflink.h.
	(_bfd_elf_merge_symbol): Likewise.
	(_bfd_elf_add_default_symbol): Likewise.
	(_bfd_elf_export_symbol): Likewise.
	(_bfd_elf_link_find_version_dependencies): Likewise.
	(_bfd_elf_link_assign_sym_version): Likewise.
	(_bfd_elf_link_read_relocs): Likewise.
	(_bfd_elf_link_size_reloc_section): Likewise.
	(_bfd_elf_fix_symbol_flags): Likewise.
	(_bfd_elf_adjust_dynamic_symbol): Likewise.
	(_bfd_elf_link_sec_merge_syms): Likewise.
	(elf_link_read_relocs_from_section): Likewise.  Use bed->s->sizeof_rel
	and bed->s->sizeof_rela.
	(_bfd_elf_link_output_relocs): Likewise.
	* elf-bfd.h (struct elf_size_info): Rename file_align to
	log_file_align.
	(struct elf_info_failed): Move from elflink.h.
	(struct elf_assign_sym_version_info): Likewise.
	(struct elf_find_verdep_info): Likewise.
	(_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
	(_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
	_bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
	_bfd_elf_link_assign_sym_version,
	_bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
	_bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
	_bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
	_bfd_elf_link_sec_merge_syms): Declare.
	(bfd_elf32_link_create_dynamic_sections): Don't declare.
	(_bfd_elf32_link_read_relocs): Likewise.
	(bfd_elf64_link_create_dynamic_sections): Likewise.
	(_bfd_elf64_link_read_relocs): Likewise.
	* elflink.h: Move lots o' stuff elsewhere.
	* bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
	(bfd_elf64_record_link_assignment): Likewise.
	(bfd_elf_record_link_assignment): Declare.
	* bfd-in2.h: Regenerate.
	* elfcode.h (elf_link_create_dynamic_sections): Don't declare.
	(NAME(_bfd_elf,size_info)): Adjust for log_file_align.
	* elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
	(assign_file_positions_for_segments): Likewise.
	(assign_file_positions_except_relocs): Likewise.
	(swap_out_syms, elfcore_write_note): Likewise.
	* elf-m10200.c: Adjust for changed function names.
	* elf-m10300.c: Likewise.
	* elf32-arm.h: Likewise.
	* elf32-h8300.c: Likewise.
	* elf32-hppa.c: Likewise.
	* elf32-ip2k.c: Likewise.
	* elf32-m32r.c: Likewise.
	* elf32-m68hc11.c: Likewise.
	* elf32-m68hc1x.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-mips.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-sh.c: Likewise.
	* elf32-v850.c: Likewise.
	* elf32-xtensa.c: Likewise.
	* elf64-alpha.c: Likewise.
	* elf64-hppa.c: Likewise.
	* elf64-mmix.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf64-sh64.c: Likewise.
	* elfxx-ia64.c: Likewise.
	* elfxx-mips.c: Likewise.
	(MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
	* elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
	* elf64-hppa.c (hppa64_elf_size_info): Likewise.
	* elf64-mips.c (mips_elf64_size_info): Likewise.
	* elf64-s390.c (s390_elf64_size_info): Likewise.
	* elf64-sparc.c (sparc64_elf_size_info): Likewise.
2003-05-09 02:27:11 +00:00
Alan Modra d32ad6f7ad daily update 2003-05-09 00:46:00 +00:00
H.J. Lu bf1e742e90 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
* elflink.h (elf_add_default_symbol): After skipping the
	unversioned symbol, go to non-default one.
2003-05-08 19:54:33 +00:00
H.J. Lu 6a32c71069 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
	want_plt field.
	(elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
	for symbols with non-default visibility.
2003-05-08 13:55:27 +00:00
H.J. Lu 715529421b 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
* elflink.h (elf_link_check_versioned_symbol): Also handle the
	case that a DSO references a hidden symbol which may be
	satisfied by a versioned symbol in another DSO.
	(elf_link_output_extsym): Check versioned definition for hidden
	symbol referenced by a DSO.
2003-05-08 05:11:57 +00:00
Alan Modra 6455f31d1f daily update 2003-05-08 00:00:07 +00:00
Nick Clifton 208c2cd6cb Reset R_XSTORMY16_16 reloc to ignore overflows. 2003-05-07 15:16:35 +00:00
Alexandre Oliva aa701218b7 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
error message for mixing different-endian files.  Check for ABI
compatibility of input files with the selected emulation.
2003-05-07 05:09:25 +00:00
Alan Modra a5d63722ab daily update 2003-05-07 00:00:07 +00:00
Nick Clifton fae6b76867 Revert update of version number 2003-05-06 18:27:41 +00:00
Nick Clifton c2967539ef Bump version number 2003-05-06 16:46:30 +00:00
Alan Modra c665dbb373 daily update 2003-05-06 00:00:06 +00:00
Alan Modra 4e795f50c1 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
non-default visibility, a) don't make them dynamic, b) discard
	space for dynamic relocs.
	* elf64-x86-64.c (allocate_dynrelocs): Likewise.

	* elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
	non-default visibility, a) don't allocate plt entries, b) don't
	allocate .got relocs, c) discard dyn rel space,
	(ppc_elf_relocate_section): d) don't generate .got relocs, e)
	don't generate dynamic relocs.
	* elf64-ppc.c (allocate_dynrelocs): As above.
	(ppc64_elf_relocate_section): As above.
2003-05-05 14:12:05 +00:00
Andreas Jaeger 4bc6e03a51 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
relocation entries for weak undefined symbols with non-default
	visibility.
	(elf64_x86_64_relocate_section): Initialize the GOT entries and
	skip R_386_32/R_386_PC32 for weak undefined symbols with
	non-default visibility.
2003-05-05 08:50:43 +00:00
H.J. Lu ef5aade5ac bfd/
2003-05-04  H.J. Lu <hjl@gnu.org>

	* elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
	relocation entries for weak undefined symbols with non-default
	visibility.
	(elf_i386_relocate_section): Initialize the GOT entries and
	skip R_386_32/R_386_PC32 for weak undefined symbols with
	non-default visibility.

	* elfxx-ia64.c (allocate_fptr): Don't allocate function
	descriptors for weak undefined symbols with non-default
	visibility.
	(allocate_dynrel_entries): Don't allocate relocation entries
	for symbols resolved to 0.
	(set_got_entry): Don't install dynamic relocation for weak
	undefined symbols with non-default visibility.
	(set_pltoff_entry): Likewise.

	* elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
	with non-default visibility.
	(elf_link_output_extsym): Don't make weak undefined symbols
	with non-default visibility dynamic.

ld/testsuite/

2003-05-04  H.J. Lu <hjl@gnu.org>

	* ld-elfvsb/main.c: Updated.
	* ld-elfvsb/sh1.c: Likewise.
2003-05-05 05:46:53 +00:00
H.J. Lu c424e0e973 bfd/
2003-05-04  H.J. Lu <hjl@gnu.org>

	* elflink.h (elf_merge_symbol): Correctly handle weak definiton.

ld/testsuite/

2003-05-04  H.J. Lu <hjl@gnu.org>

	* ld-elfvers/vers18.dsym: Updated for weak definiton change.
	* ld-elfvers/vers18.ver: Likewise.
	* ld-elfvers/vers19.ver: Likewise.

	* ld-elfweak/elfweak.exp: Remove xfail.
2003-05-05 03:33:09 +00:00
H.J. Lu d31e3dfee9 2003-05-04 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_merge_symbol): Don't record a hidden/internal
	symbol dynamic. Check indirection when removing the old
	definition for symbols with non-default visibility.
	(elf_add_default_symbol): Skip when told by elf_merge_symbol.
2003-05-05 00:37:02 +00:00
Alan Modra 9dc0b7c704 daily update 2003-05-05 00:00:04 +00:00
Alan Modra 1fffbe2fa5 daily update 2003-05-04 00:00:06 +00:00
Alan Modra ad4543cfba daily update 2003-05-03 00:00:05 +00:00
Nick Clifton 4d2e1ff0a6 Make the R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
unsigned overflow.
2003-05-02 14:41:08 +00:00
Andreas Jaeger d40d037cac * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
	(ELIMINATE_COPY_RELOCS): Define as one.  Use throughout.
	(elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
	ELF_LINK_NON_GOT_REF from weakdef.
2003-05-02 08:19:12 +00:00
Nick Clifton c5d1701eae Fix name of --enable-install-libbfd switch. 2003-05-02 08:14:52 +00:00
Alan Modra 3a4d45ef7a daily update 2003-05-02 00:00:05 +00:00
Alan Modra 81848ca0c8 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
weakdef sym has already been adjusted before treating it specially.
	* elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
	ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
	(ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
2003-05-01 10:22:46 +00:00
Alan Modra f1b7746eb0 daily update 2003-05-01 00:00:07 +00:00
Nick Clifton 03d14457a6 Do not crash when encountering relocs against the *ABS* section. 2003-04-30 12:03:58 +00:00
Alan Modra fc5b4209b2 daily update 2003-04-30 00:00:06 +00:00
H.J. Lu c7996ad628 bfd/
2003-04-28  H.J. Lu <hjl@gnu.org>

	* elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
	the relax finalize pass.

	* section.c (struct sec): Add need_finalize_relax and remove
	flag11.
	(STD_SECTION): Update struct sec initializer.
	* bfd-in2.h: Regenerated.

include/

2003-04-28  H.J. Lu <hjl@gnu.org>

	* bfdlink.h (bfd_link_info): Add relax_finalizing.

ld/

2003-04-28  H.J. Lu <hjl@gnu.org>

	* ldlang.c (lang_process): Add the relax finalize pass.

	* ldmain.c (main): Initialize link_info.relax_finalizing to
	FALSE.
2003-04-29 01:53:46 +00:00
Alan Modra 3c9dc02ab9 daily update 2003-04-29 00:00:05 +00:00
H.J. Lu f006af20ee bfd/
2003-04-28  H.J. Lu <hjl@gnu.org>

	* elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
	to copy any information related to dynamic linking when we flip
	the indirection.

ld/testsuite/

2003-04-28  H.J. Lu <hjl@gnu.org>

	* ld-elfvers/vers.exp (picflag): Set PIC flag for compiler.
	(build_vers_lib): Support PIC.
	(build_vers_lib_no_pic): New. Change all calls to build_vers_lib
	to build_vers_lib_no_pic.
	(build_vers_lib_pic): New.
	Add tests vers26a, vers26b1, vers26b2 and vers26b3 for versioned
	definition vs. normal definition in different files.

	* ld-elfvers/vers26a.c: New file.
	* ld-elfvers/vers26a.dsym: Likewise.
	* ld-elfvers/vers26a.map: Likewise.
	* ld-elfvers/vers26a.ver: Likewise.
	* ld-elfvers/vers26b.c: Likewise.

	* ld-elfvers/vers26b.dsym: New empty file.
	* ld-elfvers/vers26b.ver: Likewise.
2003-04-28 16:58:01 +00:00
H.J. Lu 1b1fe8feb3 bfd/
2003-04-27  H.J. Lu <hjl@gnu.org>

	* elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
	(ELF_LINK_DYNAMIC_WEAK): New.

	* elflink.h (elf_merge_symbol): Add one argument to indicate if
	a symbol should be skipped. Ignore definitions in dynamic
	objects for symbols with non-default visibility.
	(elf_add_default_symbol): Adjusted.
	(elf_link_add_object_symbols): Check if a symbol should be
	skipped. Don't merge the visibility field with the one from
	a dynamic object.
	(elf_link_check_versioned_symbol): Use undef_bfd.
	(elf_link_output_extsym): Warn if a forced local symbol is
	referenced from dynamic objects. Make non-weak undefined symbol
	with non-default visibility a fatal error.

ld/testsuite/

2003-04-27  H.J. Lu <hjl@gnu.org>

	* ld-elfvsb/elfvsb.dat: Updated.
	* ld-elfvsb/elfvsb.exp: Likewise.
	* ld-elfvsb/main.c: Likewise.
	* ld-elfvsb/sh1.c: Likewise.
	* ld-elfvsb/sh2.c: Likewise.
2003-04-28 03:31:36 +00:00
Alan Modra a81a272ddb daily update 2003-04-28 00:00:05 +00:00
Daniel Jacobowitz 052a450c47 * configure.in: Bump version on HEAD to 2.14.90.
* configure: Regenerated.
2003-04-27 19:59:10 +00:00
Stephane Carrez d204f4c0f9 PR savannah/3331:
* elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
	when we couldn't relax something.
	* ld-m68hc11/bug-3331.d: New test.
	* ld-m68hc11/bug-3331.s: New file.
2003-04-26 11:53:36 +00:00
Alan Modra 80d32f10a9 daily update 2003-04-26 00:00:07 +00:00
H.J. Lu 3c0a515daa 2003-04-25 Alan Modra <amodra@bigpond.net.au>
* elflink.h (elf_merge_symbol): When we find a regular definition
	for an indirect symbol, flip the indirection so that the old
	direct symbol now points to the new definition.
2003-04-25 15:17:51 +00:00
Alan Modra ce759df267 daily update 2003-04-25 00:00:06 +00:00
Roland McGrath d145330dd9 . 2003-04-24 17:19:55 +00:00
Roland McGrath 811072d851 2003-04-24 Roland McGrath <roland@redhat.com>
* elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2003-04-24 17:19:37 +00:00
Alan Modra fc0bffd6e9 * elf32-ppc.c: Formatting and comment fixes.
(ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
	(ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2003-04-24 13:44:10 +00:00
Nick Clifton 8d9cd6b19b Add support for h8300hn and h8300sn 2003-04-24 12:36:08 +00:00
Kaz Kojima 267fb3c1ce * elf32-sh.c (tpoff): New.
(struct elf_sh_dyn_relocs): Remove tls_tpoff32.
	(WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
        (allocate_dynrelocs): Don't make unnecessary dynamic TLS
	relocations.  Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
        (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
	(dtpoff_base): Fix wrong indentation.
	(sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
	relocations.  Don't set tls_tpoff32 flag.  Don't make unnecessary
	R_SH_TLS_TPOFF32 relocations.

	* ld-sh/tlsbin-1.d, ld-sh/tlsbin-2.d, ld-sh/tlsbin-3.d,
	ld-sh/tlstpoff-1.d, ld-sh/tlstpoff-2.d: Update for removing
	unnecessary TLS relocs.
2003-04-24 05:19:09 +00:00
Alan Modra 0dc1c47bf6 daily update 2003-04-24 00:00:06 +00:00
Joern Rennecke ef23021837 bfd:
* archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
        * cpu-sh.c: Likewise.
        * elf32-sh.c: Likewise.
        * reloc.c (bfd_reloc_code_real): Likewise.
        * elf32-sh64-com.c: Change comment to refer to SuperH.
        * elf32-sh64.c: Likewise.
        * elf64-sh64.c: Likewise.
        * bfd-in2.h (enum bfd_architecture): Regenerate.
binutils:
        * readelf.c (get_machine_name) <EM_SH>: Amend return value
        to refer to SuperH.
gas:
        * config/tc-sh.c: Amend comment to refer to SuperH.
        * config/tc-sh.h: Likewise.
        (LISTING_HEADER): Amend to refer to SuperH.
        * config/tc-sh64.c: Change comment to refer to SuperH.
        * config/tc-sh64.h (LISTING_HEADER): Change to refer to SuperH.
        * doc/as.texinfo [SH, GENERIC]: Amend / Change to refer to SuperH.
        * doc/c-sh.texi: Amend to refer to SuperH.
        Add SuperH architecture documentation references.
        * doc/c-sh64.texi: Change to refer to SuperH.
include/elf:
        * common.h (EM_SH): Amend comment to refer to SuperH.
ld/testsuite:
        * ld-sh/sh64/crange3-cmpct.rd (Machine): Change to refer to SuperH.
        * ld-sh/sh64/crange3-media.rd (Machine): Likewise.
2003-04-23 21:09:04 +00:00
Alan Modra 8c29f035d9 * elf32-i386.c (elf_i386_info_to_howto): Delete.
(elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2003-04-23 05:21:29 +00:00
Alan Modra c8977542c6 daily update 2003-04-23 00:00:06 +00:00
Nick Clifton 26597c8633 Replace references to Mitsubishi M32R with references to Renesas M32R. 2003-04-22 16:22:26 +00:00
Alan Modra 57e3e8655c daily update 2003-04-22 00:00:06 +00:00
Richard Henderson cc13e3efe3 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
executable when a symbol is defined both regular and dynamic.
2003-04-21 22:17:12 +00:00
Stephane Carrez f5a6f91565 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
(elf32-m68hc1x.lo): Update dependencies
	* configure.in: Add elf32-m68hc1x.lo.
	* configure: Rebuild.
	* Makefile.in: Rebuild.
2003-04-21 13:24:19 +00:00
Stephane Carrez 3a65329d1f * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
(m68hc11_elf_hash_table_create): New function.
	(elf32_m68hc11_link_hash_table_free): New function.
	(stub_hash_newfunc): New function.
	(m68hc11_add_stub): New function.
	(elf32_m68hc11_add_symbol_hook): New function.
	(elf32_m68hc11_setup_section_lists): New function.
	(elf32_m68hc11_next_input_section): New function.
	(elf32_m68hc11_size_stubs): New function.
	(elf32_m68hc11_build_stubs): New function.
	(m68hc11_get_relocation_value): New function.
	(elf32_m68hc11_relocate_section): Call the above to redirect
	some relocations to the trampoline code.
	(m68hc11_elf_export_one_stub): New function.
	(m68hc11_elf_set_symbol): New function.
	(elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
	(m68hc11_elf_get_bank_parameters): Get parameters only when the info
	is not yet initialized.

	* elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
	(elf32_m68hc11_stub_hash_entry): New struct.
	(m68hc11_page_info): Add trampoline handler address.
	(m68hc11_elf_link_hash_table): Add stubs generation members.
	(elf32_m68hc11_add_symbol_hook): Declare.
	(elf32_m68hc11_setup_section_lists): Declare.
	(elf32_m68hc11_size_stubs): Declare.
	(elf32_m68hc11_build_stubs): Declare.

	* elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
	(elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
	(elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
	(_bfd_m68hc11_elf_set_private_flags): Ditto.
	(_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
	(_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
	(bfd_elf32_bfd_link_hash_table_create): Define.
	(elf_backend_add_symbol_hook): Define.
	(m68hc11_elf_bfd_link_hash_table_create): New function.
	(m68hc11_elf_build_one_stub): New function.
	(m68hc11_elf_size_one_stub): New function.
	(m68hc11_elf_bfd_link_hash_table_create): Install the above.
	(bfd_elf32_bfd_link_hash_table_create): Define.

	* elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
	(m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
	(m68hc12_phys_addr): Ditto.
	(m68hc12_phys_page): Ditto.
	(m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
	(elf32_m68hc11_gc_mark_hook): Likewise.
	(elf32_m68hc11_gc_sweep_hook): Likewise.
	(elf32_m68hc11_check_relocs): Likewise.
	(elf32_m68hc11_relocate_section): Likewise.
	(_bfd_m68hc12_elf_set_private_flags): Likewise.
	(_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
	(_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
	(m68hc12_elf_build_one_stub): New function.
	(m68hc12_elf_size_one_stub): New function.
	(m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
	(elf_backend_add_symbol_hook): Define.
	(elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 13:22:14 +00:00
Alan Modra 81eca1a78a daily update 2003-04-21 00:00:05 +00:00
Alan Modra 042a96132e daily update 2003-04-20 00:00:07 +00:00
Alan Modra e136427c23 daily update 2003-04-19 00:00:06 +00:00
Nick Clifton 4081944fd1 Only check associated vector if the matching_vector has been created. 2003-04-18 08:06:01 +00:00
Alan Modra ef574fb1a5 daily update 2003-04-18 00:00:06 +00:00
Alan Modra 4a2c63e9d1 daily update 2003-04-17 00:00:05 +00:00
Alexandre Oliva 060dc71d21 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2003-04-09's change.
2003-04-16 00:30:24 +00:00
Alan Modra 9ba3f0f225 daily update 2003-04-16 00:00:05 +00:00
Nick Clifton a3476bef94 If a section holds uninitialized data and is from an object file or from an
executable image that has not initialized the s_size field, or if the physical
size is padded, use the virtual size (stored in s_paddr) instead.
2003-04-15 14:26:06 +00:00
Nick Clifton ca4fa240d6 Properly report filename for alignment reduction.
Add test for alignment reduction.
2003-04-15 09:38:11 +00:00
Nick Clifton c2dcd04ec8 Replace occurrances of 'Hitachi' with 'Renesas'. 2003-04-15 08:51:55 +00:00
Alan Modra 047822a581 daily update 2003-04-15 00:00:06 +00:00
Nick Clifton f7661995e8 Maintain maximum alignment for common symbols. Warn reducing alignment for
common symbols. Report old filename when symbol size changes.
2003-04-14 11:06:25 +00:00
Alan Modra 151123adc8 daily update 2003-04-14 00:00:06 +00:00
Alan Modra 003fbf3f0f daily update 2003-04-13 00:00:04 +00:00
Alexandre Oliva 93a2b7ae81 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
occurrences of the same test changed in the previous patch.
Optimize.
2003-04-12 08:50:28 +00:00
Alexandre Oliva 0176c794f8 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
(mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
GOT_DISP/addend only if the symbol got a global GOT entry.
2003-04-12 00:31:42 +00:00
Alan Modra 2a8e99b308 daily update 2003-04-12 00:00:07 +00:00
Alexandre Oliva 0fdc1bf125 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
GOT_PAGE/GOT_OFST referencing overridable symbol to
GOT_DISP/addend.
(_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
global symbol as GOT_DISP.
2003-04-11 01:56:49 +00:00
Alan Modra 9f34b04bdf daily update 2003-04-11 00:00:05 +00:00
Bob Wilson 9b8c98a411 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
next relocation on an undefined symbol.
2003-04-10 19:19:02 +00:00
Alan Modra ac299f1784 daily update 2003-04-10 00:00:06 +00:00
Richard Henderson ec1659c846 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
Ignore relocations against r_symndx == 0.
2003-04-09 20:08:14 +00:00
H.J. Lu 7dfb07f7c2 2003-04-09 H.J. Lu <hjl@gnu.org>
* elf64-alpha.c (elf64_alpha_relocate_section): Don't return
	FALSE for undefined symbols.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2003-04-09 16:19:53 +00:00
Alexandre Oliva a3805e4e10 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
and IRIX-specific shift-to-64-bit 4-byte lengths before following
addr_size.
2003-04-09 09:56:17 +00:00
Alexandre Oliva 69931e6013 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
pointer size from ABI, not arch_bits_per_address.
2003-04-09 02:55:40 +00:00
Alan Modra 7a3d2ef920 daily update 2003-04-09 00:00:05 +00:00
Alan Modra 07d5e0b978 daily update 2003-04-08 00:00:06 +00:00
Kevin Buettner 59a8c196af * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
constants for n32 ABI.
2003-04-07 20:08:10 +00:00
Alan Modra 53b063522f daily update 2003-04-07 00:00:05 +00:00
Nick Clifton 8e16317ca5 (bfd_simple_get_relocated_section_contents): Disable free that leads to GDB
vs BFD memory corruption.
2003-04-06 08:15:58 +00:00
Alan Modra d1c6921f66 daily update 2003-04-06 00:00:06 +00:00
Alan Modra 1ec9c9cf1f daily update 2003-04-05 00:00:05 +00:00
Stephane Carrez 196486bed9 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
symbols that mark the end of the section.
	(m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
	converting to a relative branch so that the offset is computed after
	the relaxation; also relocate a jsr into a bsr if possible but don't
	relax them if they are to a far symbol as we need to call the
	trampoline code.
	(elf_m68hc11_howto_table): Set pcrel_offset to true.
2003-04-04 21:17:06 +00:00
Svein Seldal be33c5dd4d Namespace cleanup for the tic4x target. Replace s/c4x/tic4x/ and s/c3x/tic3x/. 2003 copyright update 2003-04-04 08:15:15 +00:00
Alan Modra 8bacb1607c daily update 2003-04-04 00:00:06 +00:00
Nick Clifton ff0c9faf3b (_bfd_XXi_swap_scnhdr_out): Compute ps and ss differently for object files and
executables.
(coff_swap_scnhdr_in): Only set the s_size field for object files or for
  executables who have not already initialised the field.
(bfd_pe_executable_p): New macro.  Return true if the PE format bfd is an
  executable.
2003-04-03 11:13:27 +00:00
Alan Modra c8b21ee577 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): Expand comment. 2003-04-03 04:02:02 +00:00
Alan Modra 2b98e6c032 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
here as it's too early to reliably determine locality.
	(ppc_elf_gc_sweep_hook): Likewise.
2003-04-03 02:54:52 +00:00