Commit Graph

1433 Commits

Author SHA1 Message Date
Andreas Jaeger 5a65713f64 * coff-sparc.c: Add missing prototypes.
* elf32-s390.c: Likewise.
	* elf32-i960.c: Likewise.
	* aout-target.h: Likewise.
2001-08-21 08:40:23 +00:00
H.J. Lu 4e89ac30f3 2001-08-20 H.J. Lu <hjl@gnu.org>
* elf-bfd.h (elf_obj_tdata): Add num_section_syms.
	(elf_num_section_syms): New for num_section_syms.

	* elf.c (elf_map_symbols): Set num_section_syms.
	(_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
	the section symbol index.
2001-08-21 01:02:41 +00:00
Nick Clifton 28db233b6c Never select the generic has table creator. All elf backends need elf specific
fields in the hash table.
2001-08-20 14:28:46 +00:00
Alan Modra ba3ef70e78 * archive.c (offsetof): Remove define.
* elf.c: Likewise.
	* oasys.c: Likewise
	* sysdep.h (offsetof): Define.
2001-08-19 23:42:47 +00:00
Alan Modra c0846b2397 * bfd.c (bfd_get_gp_size): Return an unsigned int.
(bfd_set_gp_size): Make param unsigned.
	* bfd-in2.h: Regenerate.
	* elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
	than calling bfd_get_gp_size.
	* elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
	* elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2001-08-17 15:56:58 +00:00
Alan Modra 0ac450b689 * linker.c (default_fill_link_order): Handle four byte fill value. 2001-08-17 09:50:05 +00:00
Alan Modra 5d964dfa3e * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
prototype.
	* nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2001-08-17 09:44:19 +00:00
Alan Modra 5e57284986 * elf64-mips.c (UNUSED_RELOC): Define.
(mips_elf64_howto_table_rel): Use it.
	(mips_elf64_howto_table_rela): Here too.
	(mips_elf64_write_relocs): Fix signed/unsigned warning.
2001-08-17 09:21:34 +00:00
Alan Modra 52b9d21349 Oops missed from last commit 2001-08-17 09:19:10 +00:00
Alan Modra cea4409c0f * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
silence warning.
	* coffgen.c (coff_print_symbol): Fix warnings.
	(coff_find_nearest_line): Likewise.
	* cofflink.c (_bfd_coff_link_input_bfd): Likewise.
	* coff-alpha.c (alpha_convert_external_reloc): Likewise.
	* format.c (bfd_check_format_matches): Likewise.
	(bfd_set_format): Likewise.
	* coff-ia64.c: Add missing prototypes.
	* elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
	signed to silence warnings.
	(elf64_alpha_relocate_section): Likewise.
	(elf64_alpha_find_reloc_at_ofs): Fix warnings.
	(elf64_alpha_add_symbol_hook): Likewise.
	(elf64_alpha_final_link): Likewise.
	(elf64_alpha_relax_section): Remove redundant assign to info.gotent.
	(elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
	(elf64_alpha_size_got_sections): Likewise.
	* elfxx-ia64.c: Add missing prototypes.
	(elfNN_ia64_relocate_section): Fix warning.
	(elfNN_ia64_unwind_entry_compare): Make params const.
2001-08-17 08:57:42 +00:00
Alan Modra e9e69f5a09 * config.bfd (targ64_selvecs): New.
<powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2001-08-17 04:17:18 +00:00
Alan Modra 69263e9083 * bfd-in.h (BFD_VERSION): Remove wrong comment.
(BFD_DEFAULT_TARGET_SIZE): New.
	(BFD_ARCH_SIZE): Comment.
	* configure.in (target_size): New.  Set instead of target64 in
	selvecs case statement.  Set target64 from it.
	(bfd_default_target_size): New.  Set from taget_size. AC_SUBST.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
2001-08-17 03:54:53 +00:00
Alan Modra 3619ad0439 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
(bfd_errmsgs): Add corresponding message.
	* archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
	finding an archive that contains different format object files.
	Return bfd_error_wrong_object_format for this case.
	* format.c: Formatting fixes.  s/CONST/const/.
	(bfd_check_format_matches): Accept archives that give
	bfd_error_wrong_object_format if no full match is found.  Tidy
	code handling matching_vector.  Don't return a pointer to freed
	memory in `matching'.  Handle ambiguous matches as for partial
	archive matches.
	* bfd-in2.h: Regenerate.
2001-08-17 03:19:01 +00:00
Alan Modra 47fda0d3d9 * libieee.h (common_header_type): Add last_byte field.
* ieee.c: Add missing prototypes.  Some format fixes.
	(struct output_buffer_struct): Move for availability to prototypes.
	(ieee_part_after): New function.
	(ieee_slurp_debug): Use it here.
	(ieee_seek): Pass in ieee_data_struct rather than bfd.  Use
	ieee_part_after to set last_byte to one past end of current part.
	Update callers.
	(ieee_pos): Pass in ieee_data_struct rather than bfd.
	Update callers.
	(parse_expression): Don't go beyond the end of the current part.
	(ieee_slurp_external_symbols): Correct type passed to read_2bytes.
	(ieee_get_symtab_upper_bound, ieee_get_symtab,
	ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
	ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
	ieee_set_section_contents, ieee_write_object_contents,
	ieee_make_empty_symbol): Make static.
	(ieee_archive_p): Correct comments regarding bfd_read.
	(ieee_object_p): Similarly.
	(ieee_mkobject): Move it.  Clear output_ptr_start, output_ptr,
	output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
	input_bfd, output_bfd, output_buffer.
	(do_as_repeat): Write out ieee_set_current_pc_enum value as for
	do_with_relocs, ie. as a symbol for relocatable files.
	(ieee_vec): Add comments showing functions referenced by macros.
2001-08-15 14:44:40 +00:00
Nick Clifton 1725a96ea6 Add missing protypes 2001-08-14 10:01:29 +00:00
Nick Clifton fbad9a25db Fix bug in previous delta 2001-08-13 10:43:29 +00:00
Nick Clifton fa645acb92 oops - omitted from previous delta! 2001-08-13 10:06:53 +00:00
Nick Clifton e12dd2eac6 Add missing prototypes. Fix formatting. 2001-08-13 10:06:11 +00:00
Nick Clifton 4e771d61a3 replace direct invocation og elf vma print functions with indirect invocation 2001-08-11 16:48:15 +00:00
Andreas Jaeger 99c79b2e5d 2001-08-10 Andreas Jaeger <aj@suse.de>
* elf64-sparc.c: Add missing prototypes.
	* elf32-cris.c: Likewise.
	* elf32-i370.c: Likewise.
	* elf64-hppa.c: Likewise.
	* elf64-s390.c: Likewise.
2001-08-11 07:59:54 +00:00
Andreas Jaeger 1e1b3bc252 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
Add prototypes where needed.
2001-08-10 19:29:59 +00:00
H.J. Lu ef071f2471 2001-08-10 H.J. Lu <hjl@gnu.org>
* bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
	(bfd_fprintf_vma): Likewise.
2001-08-10 18:43:44 +00:00
H.J. Lu 5c36c02b3b 2001-08-10 H.J. Lu <hjl@gnu.org>
* bfd.c (bfd_sprintf_vma): Don't return void.
	(bfd_fprintf_vma): Likewise.
2001-08-10 16:32:03 +00:00
Andreas Jaeger 0218d1e4c2 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
to build warnings.
	* configure: Regenerate.
2001-08-10 10:56:47 +00:00
Alan Modra cc55aec9b7 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
warning if not BFD64.  Add braces so emacs auto format works.
	(bfd_elf_fprintf_vma): Likewise.
2001-08-10 08:06:23 +00:00
Alan Modra 814fa6ab15 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
of _xcoff_swap_ld*.
	* coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
	param to agree with libxcoff.h.
	(xcoff_swap_ldhdr_out): Likewise.
	(xcoff_swap_ldsym_in): Likewise.
	(xcoff_swap_ldsym_out): Likewise.
	(xcoff_swap_ldrel_in): Likewise.
	(xcoff_swap_ldrel_out): Likewise.
	(xcoff_create_csect_from_smclas): Likewise.
	* coff64-rs6000.c: Add missing prototypes.
	(xcoff64_swap_ldhdr_in): Modify type of external param to agree
	with libxcoff.h.
	(xcoff64_swap_ldhdr_out): Likewise.
	(xcoff64_swap_ldsym_in): Likewise.
	(xcoff64_swap_ldsym_out): Likewise.
	(xcoff64_swap_ldrel_in): Likewise.
	(xcoff64_swap_ldrel_out): Likewise.
	(xcoff64_ppc_relocate_section): Make static.
	(xcoff64_slurp_armap): Likewise.
	(xcoff64_archive_p): Likewise.
	(xcoff64_openr_next_archived_file): Likewise.
	(xcoff64_sizeof_headers): Likewise.
	(xcoff64_is_lineno_count_overflow): Likewise.
	(xcoff64_is_reloc_count_overflow): Likewise.
	(xcoff64_loader_symbol_offset): Likewise.
	(xcoff64_loader_reloc_offset): Likewise.
	* elf64-gen.c: Add missing prototypes.
2001-08-10 06:00:53 +00:00
H.J. Lu d3b05f8d41 2001-08-09 H.J. Lu <hjl@gnu.org>
* elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
	(bfd_elf_fprintf_vma): Likewise.
2001-08-09 21:10:25 +00:00
H.J. Lu d69bb69b89 2001-08-09 H.J. Lu <hjl@gnu.org>
* bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
	to ...
	* elf-bfd.h: Here.
	* bfd-in2.h: Regenerated.
2001-08-09 16:46:02 +00:00
H.J. Lu ae4221d7c2 2001-08-09 H.J. Lu <hjl@gnu.org>
* bfd-in.h (bfd_sprintf_vma): New prototype.
	(bfd_fprintf_vma): Likewise.
	(bfd_elf_sprintf_vma): Likewise.
	(bfd_elf_fprintf_vma): Likewise.
	(bfd_printf_vma): New. Defined with bfd_fprintf_vma.
	* bfd-in2.h: Regenerated.

	* bfd.c (bfd_sprintf_vma): New. Defined.
	(bfd_fprintf_vma): Likewise.

	* elf.c (bfd_elf_sprintf_vma): New. Defined.
	(bfd_elf_fprintf_vma): Likewise.
2001-08-09 16:00:21 +00:00
Alan Modra a7b97311da * coff-rs6000.c: Add missing prototypes.
(xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
	xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
	xcoff_loader_reloc_offset): Make static.
	* dwarf1.c: Add missing prototypes.
	* dwarf2.c: Add missing prototypes.
	(struct abbrev_info): Move definition.
	(struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
	* elf.c: Add missing prototypes.
	* elf32-gen.c: Likewise.
	* elf32-i386.c: Likewise.
	* elf32-ppc.c: Likewise.
	(ppc_elf_sort_rela): Use PTR instead of "void *".
	* elflink.h: Add missing prototypes.  Formatting fixes.
	* merge.c: Add missing prototypes.
	(last4_eq): Use PTR instead of "void *".
	(last_eq): Likewise.
	* syms.c: Add missing prototypes.
2001-08-09 14:38:04 +00:00
Nick Clifton 55ab10f0ee Fix formatting 2001-08-09 09:09:03 +00:00
Nick Clifton 1c26dc27b5 Change 'partial_inplace' to true (this target uses REL relocations) and
'pcrel_offset' to false (the PC is implied, not stored in the offset).
2001-08-09 09:00:58 +00:00
Alan Modra 2517a57fdf * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
* elfxx-target.h (elf_backend_want_got_sym): Define.
	(elfNN_bed): Add elf_backend_want_got_sym.
	* elflink.c (_bfd_elf_create_got_section): Define
	_GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2001-08-08 13:09:33 +00:00
Alexandre Oliva f2363ce55b * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
(find_rela_addend): New function.
(parse_comp_unit): Call it to find the abbrev offset addend.
(_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
members of dwarf2_debug as debugging information is read.
2001-08-08 11:17:34 +00:00
Nick Clifton 993e9275d7 Support relocs for sh-coff targets as well as sh-pe. 2001-08-07 18:32:07 +00:00
Nick Clifton 62efb34674 Include offset of reloc from start of section when computing value for
R_ARM_REL32 reloc.
2001-08-03 11:14:42 +00:00
Alan Modra 8e1d4bbbc0 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
keep relocs for undefined syms if there are no dynamic sections in
	executable.
	* elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2001-08-03 05:10:39 +00:00
Charles Wilson 8ceb7a1b8e 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
* cofflink.c (coff_link_check_ar_symbols): also search for
        __imp__symbol as well as _symbol.
        * linker.c (_bfd_generic_link_add_archive_symbols): also
        search for __imp__symbol as well as _symbol.
2001-08-02 23:05:54 +00:00
Nick Clifton 00a7cdc55a Return zero only as the last step of qsort function. 2001-08-01 16:10:42 +00:00
Nick Clifton d8adc60f05 Replace VXWORKS with ARM_COFF_BUGFIX. 2001-08-01 15:18:32 +00:00
Nick Clifton 407c2b92ba Fix prototype of _bfd_ecoff_styp_to_sec_flags 2001-07-30 18:38:35 +00:00
Alan Modra 8a5cc6beb1 Update dependencies with "make dep-am". 2001-07-24 10:02:00 +00:00
H.J. Lu 01467f2afb 2001-07-15 H.J. Lu <hjl@gnu.org>
* Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
	(po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
	* Makefile.in: Regenerate.
2001-07-15 19:33:11 +00:00
H.J. Lu 824e2cb428 2001-07-11 H.J. Lu <hjl@gnu.org>
* elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
	flags when creating the reloc section if the ALLOC flag in the
	source section is set.
2001-07-12 04:24:44 +00:00
Jim Wilson a4bd839069 sje patch for 32-bit IA-64 ELF relocs for HPUX
* reloc.c (bfd_reloc_code_type): Add IA64 relocs
	BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
	* elfxx-ia64.c (ia64_howto_table): Define how to handle
	new relocations.
	(elfNN_ia64_reloc_type_lookup): Handle new relocations.
	(elfNN_ia64_check_relocs): Likewise.
	(elfNN_ia64_install_value): Likewise.
	(elfNN_ia64_relocate_section): Likewise.
2001-07-12 01:24:14 +00:00
Jakub Jelinek 20278fa326 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
R_SPARC_UA64.
	(elf32_sparc_check_relocs): Likewise.
	Only create .rela section for alloced sections in shared libraries.
	(elf32_sparc_relocate_section): Likewise.
	Remove redundant check.
	Optimize unaligned reloc usage.
	* elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
	check.

	* testsuite/gas/sparc/unalign.s: Remove .uaxword test.
	* testsuite/gas/sparc/unalign.d: Adjust accordingly.
2001-07-11 19:40:32 +00:00
H.J. Lu 067a7d17c4 2001-07-11 H.J. Lu <hjl@gnu.org>
* elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
	ALLOC|LOAD flags as the source section for debugging sections
	when creating the reloc section.
2001-07-11 19:03:10 +00:00
Jim Wilson 0a2afbc13a Fix ia64-linux fortran common linking problem.
* linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
	the section of the bigger symbol.
2001-07-05 22:40:16 +00:00
Jim Wilson a78f18dc3a Fix ia64-linux binutils readelf -s testsuite failure.
* syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
2001-07-05 18:27:55 +00:00
Nick Clifton 0515494aac For sections containing uninitialised data, only set their size to s_paddr
if this does not reset their size to zero.  MS's latest compilers will set
s_paddr to zero.
2001-07-05 10:52:25 +00:00
H.J. Lu 5e7079af51 2001-07-04 H.J. Lu <hjl@gnu.org>
* bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
	Handle bfd_mach_mips4400, bfd_mach_mips4600 and
	bfd_mach_mips5000.
2001-07-04 07:15:20 +00:00
Nick Clifton f47e50716b Support DJGPP COFF targets in bfd_get_sign_extend_vma() 2001-07-03 16:27:45 +00:00
Nick Clifton 440c46077c Skip section symbols from sections being discarded 2001-07-03 15:49:46 +00:00
Alan Modra 936e320bf4 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
instead of _bfd_elfcore_section_from_phdr.
	* elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
	* elf.c (_bfd_elfcore_section_from_phdr): Remove.
	(_bfd_elfcore_make_pseudosection): Expedite tail-call.
	(elfcore_grok_prstatus): Likewise.
	(elfcore_grok_lwpstatus): Likewise.
	(bfd_get_elf_phdr_upper_bound): Likewise.
	(elfcore_make_note_pseudosection): Formatting.
	(_bfd_elfcore_strndup): Formatting.
	* elf32-mips.c (mips_elf_sym_is_global): Formatting.
	(_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
2001-06-30 04:05:13 +00:00
Alan Modra bb0082d686 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
and _bfd_elfcore_strndup.
	(struct elf_backend_data): Add elf_backend_grok_prstatus
	and elf_backend_grok_psinfo.
	* elf.c (_bfd_elfcore_make_pseudosection): New function.
	(elfcore_grok_prstatus): Use it.
	(elfcore_make_note_pseudosection): Likewise.
	(elfcore_strndup):  Rename to...
	(_bfd_elfcore_strndup): Here, and make global.
	(elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
	(elfcore_grok_note): Call elf_backend_grok_prstatus
	and elf_backend_grok_psinfo if available.
	* elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
	(_bfd_elf32_mips_grok_psinfo): New function.
	(elf_backend_grok_prstatus): Define.
	(elf_backend_grok_psinfo): Define.
	* elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
	(elf_backend_grok_psinfo): Likewise.
	(elfNN_bed): Include elf_backend_grok_prstatus and
	elf_backend_grok_psinfo.
2001-06-30 03:15:46 +00:00
H.J. Lu b64977c5ff 2001-06-29 H.J. Lu <hjl@gnu.org>
* elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
	hplink->sgot is NULL before filling GOT. Checck if hplink->splt
	is NULL before filling PLT.
2001-06-30 00:34:10 +00:00
Alan Modra e45bf86378 * elflink.h (elf_link_output_extsym): Revert 1999-04-10. 2001-06-29 07:00:33 +00:00
Alan Modra 446f286313 Avoid creating COPY relocs.
* elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
	here..
	(elf32_hppa_adjust_dynamic_symbol): ..nor here..
	(allocate_plt_and_got_and_discard_relocs): .. instead do so here
	after gc has run.
	* elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
	(IS_ABSOLUTE_RELOC): Define.
	(elf32_hppa_link_hash_entry): Always include reloc_entries field.
	(hppa_link_hash_newfunc): Always init it.
	(elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
	create COPY relocs only when the reloc is in a read-only section.
	Instead, allocate space for a dynamic reloc to reference the
	library symbol directly.  Keep track of space we allocate using
	relocs_entries.
	(hppa_discard_copies): Delete, and move code to..
	(allocate_plt_and_got): ..here.  Rename to
	allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
	relocs for non-shared link.
	(elf32_hppa_size_dynamic_sections): Update calls to above.
	(elf32_hppa_relocate_section): Write out the dynamic relocs used
	in lieu of COPY relocs.
2001-06-27 02:42:09 +00:00
Alan Modra 5a15f56fea * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
here..
	(elf_i386_adjust_dynamic_symbol): ..nor here..
	(allocate_plt_and_got_and_discard_relocs): .. instead do so here
	after gc has run.
	(elf_i386_size_dynamic_sections): Fix a comment.
	(elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
	involved in writing reloc out.
2001-06-27 01:46:17 +00:00
Alan Modra 28d0b90eb7 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
Ensure syms are dynamic if we might be emitting a reloc.
	(allocate_plt_and_got_and_discard_relocs): Don't discard relocs
	for undefweak or undefined syms..
	(elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
2001-06-25 08:16:44 +00:00
Alan Modra 866b34001a * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
	(elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
	redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
2001-06-25 02:40:47 +00:00
H.J. Lu 6cbac8b9dd 2001-06-24 H.J. Lu <hjl@gnu.org>
* cpu-i960.c (scan_960_mach): Don't modify const char *. Use
	strncasecmp/strcasecmp instead of strncmp/strcmp.
2001-06-24 16:06:38 +00:00
H.J. Lu 62b7d3f1f1 2001-06-23 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_relocate_section): Check the
	ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
	in the regular object file and treat the weak definition as
	the normal one.
2001-06-24 00:36:47 +00:00
Alan Modra 8c69491410 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
unresolved_reloc test to exclude cases where we use "relocation"
	before setting it to point into the .got.  Reinstate fudge for
	unresolved relocs in debugging sections.
2001-06-23 15:02:43 +00:00
Alan Modra 83be169b62 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
complicated tests for unresolvable relocs with a simple direct
	scheme using "unresolved_reloc" var.
2001-06-23 11:01:44 +00:00
Alan Modra ffb2e45bfb * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
elf_i386_dyn_relocs.  Update comment.
	(struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
	dyn_relocs.
	(elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
	others to aborts.
	(allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
	abort.
	(elf_i386_size_dynamic_sections): Likewise.
	(elf_i386_finish_dynamic_symbol): Likewise.
	(elf_i386_finish_dynamic_sections): Likewise.
	(elf_i386_relocate_section): Likewise.  Tidy R_386_GOT32 and error
	handling code.
2001-06-23 10:03:53 +00:00
Alan Modra 12d0ee4aca Avoid creating COPY relocs if possible.
* elf32-i386.c (elf_i386_check_relocs): Tweak condition under
	which .got created.  Mark symbols used by R_386_32 and R_386_PC32
	relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
	reloc is in a read-only section.  Instead, allocate space for a
	dynamic reloc to reference the library symbol directly.  Keep
	track of space we allocate using pcrel_relocs_copied.
	(discard_copies): Delete, and move code to ..
	(allocate_plt_and_got): ..here.  Rename to
	allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
	relocs for non-shared link.
	(elf_i386_size_dynamic_sections): Update calls to above functions.
	(elf_i386_relocate_section): Write out the dynamic relocs.  Add
	more ugly logic to avoid "unresolvable relocation" error.  Use
	htab shortcut in place of elf_hash_table macro.
	(elf_i386_finish_dynamic_sections): Allow that dynamic .got may
	not always be created now.
2001-06-23 05:54:15 +00:00
Andreas Jaeger f631948d0b * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
shared libraries.
2001-06-21 16:33:14 +00:00
Nick Clifton 89084430cd Fix typos 2001-06-21 07:44:32 +00:00
Alan Modra 68fb2e56a3 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
allocate local .got space.  Use shortcuts from hash table for .got
	and .plt rather than comparing section names.
	(elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
	adjusting index into local_got_refcounts to document what we are
	really doing.
	(elf32_hppa_relocate_section): Similarly for local_plt_offsets.
	Tidy .got and .plt error checking.
2001-06-21 05:47:12 +00:00
Hans-Peter Nilsson d1d013c334 * bfdint.texi (BFD relocation functions) <different formats>:
Mention that the GNU linker is aware of input-output format
	restrictions when generating relocatable output.  Make new
	paragraph for final-link case.
	(BFD target vector swap): Fix typo.
2001-06-20 22:23:23 +00:00
Catherine Moore 9317eaccac * elf-bfd.h (struct elf_backend_data):
elf_backend_emit_relocs: New field: Function for emitting
        relocs.
        elf_backend_count_relocs: New field: Function for determining
        the number of relocs to be emitted.
        * elfxx-target.h: Provide default (NULL) values for
        elf_backend_emit_relocs and elf_backend_count_relocs.
        * elflink.h (elf_link_size_reloc_section): Make the hash table
        big enough to hold the relocs counted by either reloc_count or
        o->reloc_count.
        (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
        should be emitted, either because of a command line option
        stored in the info structure or because the target provides a
        special reloc emitting function.
        If the target provides a reloc counting function use it,
        unless performing a relocatable link or emitting all relocs.
        Also set the SEC_RELOC flag on any output section which will
        contain relocs.
        (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
        should be emitted, either because of a command line option
        stored in the info structure or because the target provides a
        special reloc emitting function.
        If the target provides a reloc emitting function, use it,
        unless performing a relocatable link or emitting all relocs.
2001-06-20 20:34:10 +00:00
H.J. Lu 161d71a639 2001-06-20 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_size_dynamic_sections): Always
	allocate local .got space.
2001-06-20 18:54:52 +00:00
Andreas Jaeger fd8ab9e538 (elf64_x86_64_relocate_section): Fix creation of dynamic symbols. 2001-06-19 13:30:40 +00:00
Hans-Peter Nilsson 99293407a5 * elflink.h (struct elf_assign_sym_version_info): Remove member
export_dynamic.  All users changed to use info member.
	NAME(bfd_elf,size_dynamic_sections)): Remove parameter
	export_dynamic, instead use member in parameter info.
	* bfd-in.h (bfd_elf32_size_dynamic_sections,
	bfd_elf64_size_dynamic_sections): Update prototype.
	* bfd-in2.h: Regenerate.
2001-06-18 22:05:10 +00:00
H.J. Lu bc2b6df7ca 2001-06-18 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_info_failed): Add a new field, verdefs.
	(NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
	elf_export_symbol.
	(elf_export_symbol): Check eif->verdefs to decide if a symbol
	should be exported.
2001-06-18 18:57:06 +00:00
H.J. Lu 4391705434 2001-06-17 H.J. Lu <hjl@gnu.org>
* elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
	readonly_reloc, to record if a relocation in the .rel.dyn
	section is against a read-only section.
	(mips_elf_link_hash_newfunc): Initialize the readonly_reloc
	field to false.
	(_bfd_mips_elf_check_relocs): Record if there is a relocation
	in the .rel.dyn section against a read-only section by setting
	DF_TEXTREL or readonly_reloc.
	(_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
	it is true.
	(_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
	there is a relocation in the .rel.dyn section against a
	read-only section.
	(_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
	DF_TEXTREL is set.
2001-06-17 16:14:42 +00:00
Nick Clifton 7c8ca0e488 Chnage styp_flags_to_sec_flags() to a boolean function 2001-06-15 09:03:14 +00:00
Nick Clifton dee0a8f47f Only pad the tesxt section if the data section is going to follow it. 2001-06-13 07:58:05 +00:00
Catherine Moore 0d1ea5c088 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
with the file_align entry from elf_backend_data.
        (elf_gc_smash_unused_vtentry_relocs): Likewise.
        (elf_gc_record_vtentry): Likewise.
2001-06-12 17:44:38 +00:00
Alan Modra 4e8a9624b8 * elflink.h: Whitespace changes.
(elf_link_read_relocs_from_section): Use "unsigned int" iterator
	rather than "unsigned char".
	(elf_link_output_relocs): Likewise.
	(elf_link_input_bfd): Likewise.
	(elf_reloc_link_order): LIkewise.
	* elf.c: s/CONST/const/.  Whitespace changes.
	* elf32-mips.c: Formatting fix.

	* Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
	* Makefile.in: Regenerate.
	* po/Make-in: Remove trailing tab.
2001-06-10 05:21:00 +00:00
Phil Blundell 7a25cd3e1a 2001-06-09 Philip Blundell <philb@gnu.org>
* elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
	change.
	(elf32_arm_plt_entry): Likewise.
2001-06-09 20:19:29 +00:00
H.J. Lu 3f5a136d64 2001-06-08 H.J. Lu <hjl@gnu.org>
* elf.c (swap_out_syms): Keep names for global section symbols.
2001-06-08 15:30:52 +00:00
H.J. Lu d8fe1fed28 2001-06-07 H.J. Lu <hjl@gnu.org>
* config.bfd: Put back ecoff for Linux/mips. Firmwares on some
	MIPS-based machines need it.
2001-06-08 06:21:29 +00:00
H.J. Lu c36e006fbc 2001-06-07 H.J. Lu <hjl@gnu.org>
* elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
	for SGI only.

	* config.bfd: Remove ecoff from Linux/mips.
2001-06-07 17:31:22 +00:00
Andreas Jaeger cc78d0afbe 2001-06-07 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
	assertion.
	(elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
	alignment of 8 for .rela sections; handle further relocations.
2001-06-07 14:45:36 +00:00
Nick Clifton 879db8be1a Remove warnings building z8k port.
Fix ld -r behaviour
2001-06-06 17:01:35 +00:00
Nick Clifton cbb1fd5052 Add mips64*-*-linux host 2001-06-05 07:35:10 +00:00
Alan Modra 6725bdbfa9 * elf32-i386.c (elf_i386_discard_copies): Rename to
discard_copies, and use elf_link_hash_entry arg rather than
	elf_i386_link_hash_entry.
	(elf_i386_link_hash_traverse): Delete.
	(elf_i386_size_dynamic_sections): Adjust call to discard_copies.
	Tidy sizing of dynamic sections.
	(elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
	possible .plt entries.
	(elf_i386_gc_sweep_hook): Likewise.
	(elf_i386_adjust_dynamic_symbol): Discard .plt entries for
	everything with plt.refcount <= 0.

	* elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
	.relgot space here.
	(elf_i386_gc_sweep_hook): ..and no need to deallocate here..
	(elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
	.rel.plt here..
	(allocate_plt_and_got): ..instead do it all here.  New function.
	(elf_i386_size_dynamic_sections): Allocate local .got space and
	call allocate_plt_and_got.  No need to zap .relgot if not dynamic.
	(bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
	rather than gc variety).
	(WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
	(elf_i386_relocate_section): Use it here and correct handling of
	R_386_GOT32.  Provide section and offset for "unresolvable
	relocation" error message.
	(elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.

	* elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
	sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
	(elf_i386_link_hash_table_create): Init them.
	(create_got_section): New function.
	(elf_i386_create_dynamic_sections): New function.
	(elf_backend_create_dynamic_sections): Set to above.
	(elf_i386_check_relocs): Use shortcuts from hash table rather than
	calling bfd_get_section_by_name.
	(elf_i386_gc_sweep_hook): Likewise.
	(elf_i386_adjust_dynamic_symbol): Likewise.
	(elf_i386_size_dynamic_sections): Likewise.
	(elf_i386_relocate_section): Likewise.
	(elf_i386_finish_dynamic_sections): Likewise.
2001-06-05 05:51:55 +00:00
Alan Modra 73a74a624e * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms. 2001-06-05 04:39:31 +00:00
H.J. Lu 24a5e75166 2001-06-02 H.J. Lu <hjl@gnu.org>
* elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
	and ELFOSABI_HPUX.
	* elf64-hppa.c (elf64_hppa_object_p): Likewise.
2001-06-03 02:41:58 +00:00
H.J. Lu 1510318892 2001-06-02 H.J. Lu <hjl@gnu.org>
* aout-cris.c (MACHTYPE_OK): New. Defined.
2001-06-02 19:42:40 +00:00
Hans-Peter Nilsson 2f484710e6 * section.c (_bfd_strip_section_from_output): Handle NULL
output_section.
2001-06-02 19:05:34 +00:00
H.J. Lu a5ac692bb5 2001-06-02 H.J. Lu <hjl@gnu.org>
* config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
	rs6000coff64_vec only if BFD64 is defined.
	(powerpc64-*-aix*): Enable only if BFD64 is defined.
2001-06-02 17:32:09 +00:00
H.J. Lu 27e530993c 2001-06-02 H.J. Lu <hjl@gnu.org>
* coff-ia64.c (ia64coff_object_p): Rewrite with
	external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
2001-06-02 15:46:43 +00:00
Andreas Jaeger 80643fbcda * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
relocation, small reformatting.
2001-06-01 11:52:11 +00:00
Andreas Jaeger 6b3db54654 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
(elf64_x86_64_relocate_section): Likewise.
2001-05-30 18:44:46 +00:00
Alan Modra 4dc8668677 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
millicode.  Don't allocate .got and .rela.got space here..
	(elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
	(elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
	.rela.plt here..
	(hppa_handle_PIC_calls): ..nor here..
	(allocate_plt_and_got): ..instead do it all here.  New function.
	(elf32_hppa_size_dynamic_sections): Allocate local .got space and
	call allocate_plt_and_got.  No need to zap .got if not dynamic.
	(elf32_hppa_final_link): Call regular bfd_final_link instead of
	gc_common_final_link.
	(WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
	(elf32_hppa_relocate_section): Use it here.
	(elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
	dynamic_sections_created.
	(hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
2001-05-30 14:30:33 +00:00
Andreas Jaeger de41dcd889 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
generic version since we want a hashsize of 4.
	(elf_backend_size_info): Likewise.
2001-05-28 15:45:47 +00:00
Nick Clifton 209f668ef2 Handle MIPS64 relocs which use a non-1 valued int_rels_per_ext_rel 2001-05-28 11:57:54 +00:00
Nick Clifton f7a74f8c82 Support big endian PLT entries. 2001-05-28 10:50:31 +00:00
Alan Modra 8dea12685e * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
for symbols forced local that need plabels.
	(elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
	.plt.rela for local syms if non-shared.
	(hppa_build_one_stub): Mask lsb of plt.offset.
	(elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
	(clobber_millicode_symbols): Correct comment.
	(elf32_hppa_relocate_section): Likewise.
	(elf32_hppa_finish_dynamic_symbol): Likewise.
2001-05-28 10:12:04 +00:00
Nick Clifton 0f2712edc9 Add support for .uahword, .uaword and .uaxword pseudo ops 2001-05-28 09:23:54 +00:00
H.J. Lu 6768c14a4f 2001-05-25 H.J. Lu <hjl@gnu.org>
* Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
	(BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
	(coff-rs6000.lo): Remove the old dependency.
	* Makefile.in: Rebuild.

	* configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
	coff-rs6000.lo.
2001-05-25 22:50:27 +00:00
H.J. Lu b55039f458 2001-05-25 H.J. Lu <hjl@gnu.org>
* coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
	rs6000coff_core_file_matches_executable_p,
	rs6000coff_core_file_failing_command and
	rs6000coff_core_file_failing_signal only if AIX_CORE is
	defined.
	(pmac_xcoff_vec): Likewise.
	* coff64-rs6000.c (rs6000coff64_vec): Likewise.
2001-05-25 21:23:48 +00:00
Timothy Wall 64e9ece0ca monterey updates 2001-05-25 12:42:28 +00:00
H.J. Lu f34d8777dd 2001-05-25 H.J. Lu <hjl@gnu.org>
* bfd-in2.h: Regenerated.
	* libcoff.h: Likewise.
2001-05-25 06:29:21 +00:00
Alan Modra 49e9d0d3b6 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
undefined millicode syms in shared libs.
	(hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
	(elf32_hppa_check_relocs): Likewise.
	(elf32_hppa_adjust_dynamic_symbol): Likewise.
	(elf32_hppa_size_dynamic_sections): Likewise.
	(elf32_hppa_relocate_section): Likewise.
	(elf32_hppa_finish_dynamic_symbol): Likewise.
	(elf32_hppa_finish_dynamic_sections): Likewise.
2001-05-25 03:46:49 +00:00
Tom Rix beb1bf64d0 Support for xcoff64 2001-05-24 20:50:50 +00:00
Alexandre Oliva e90fdc1abd * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
s/ENTIRES/ENTRIES/.
2001-05-23 23:56:22 +00:00
Nick Clifton c2feb66418 Add MIPS ELF64 relocs 2001-05-23 17:36:38 +00:00
Nick Clifton d1cf510e5e Add MIPS r12k support 2001-05-23 17:26:40 +00:00
Nick Clifton 6c426cf36e Change PLT code to avoid using r2 - it used by GCC to return large startures 2001-05-23 16:38:36 +00:00
Nick Clifton d9bc7a4499 Replace sh_size/sh_entsize with NUM_SHDR_ENTRIES 2001-05-23 08:23:27 +00:00
Andreas Jaeger f5198f610d * dwarf2.c (decode_line_info): Fix error message.
(read_abbrevs): Fix test for offset as suggested by Alan Modra and
	adjust error message.
2001-05-21 11:52:42 +00:00
Alexandre Oliva 6be7c12c05 * ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh,
ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.254.  Rebuilt a number
of subdir/configure scripts to use the new libtool.m4.
2001-05-20 19:02:56 +00:00
H.J. Lu 7913c838b3 2001-05-18 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_add_object_symbols): Revert the last
	change.
2001-05-18 16:06:43 +00:00
Alan Modra e0522e891a * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
	(hppa_build_one_stub): Add an assert to check plt.offset.
2001-05-18 03:11:13 +00:00
H.J. Lu 96fd004e0e 2001-05-17 H.J. Lu <hjl@gnu.org>
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
	version definition to basename of the output filename.
2001-05-18 01:20:02 +00:00
H.J. Lu f3876d8bc6 2001-05-17 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
	basename of the bfd filename.
2001-05-17 19:08:46 +00:00
Alan Modra d1778b88f8 Add a flag to asection, linker_has_input, and use it to reliably
determine whether an input section is the first one assigned to
an output section.
2001-05-17 03:58:45 +00:00
Alexandre Oliva 2a0fa9433c * elf-m10300.c (mn10300_elf_relax_section): Don't relax
negative 32-bit operands to 16 operands when the operand is
going to be zero-extended by the modified opcode.
2001-05-16 01:48:13 +00:00
Alan Modra bcee8eb8ca Peter Targett's backwards compatibility and other arc fixes. 2001-05-12 15:14:53 +00:00
Jakub Jelinek 579f31ac74 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
sections as well.
	(elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
	to .gnu.linkonce.t.FOO text section.

	* readelf.c (process_unwind): Print all unwind sections, not just
	one.

	* config/tc-ia64.c (special_linkonce_name): New.
	(make_unw_section): Map .gnu.linkonce.t.FOO text section into
	.gnu.linkonce.ia64unw{,i}.FOO.
	(ia64_elf_section_type): Handle .gnu.linkonce.ia64unw{,i}.FOO.
	(dot_endp): Add comment about it.

	* elf/ia64.h (ELF_STRING_ia64_unwind_once): Define.
	(ELF_STRING_ia64_unwind_info_once): Define.

	* emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
	.gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
	output sections.
	* emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
2001-05-11 12:36:47 +00:00
Jakub Jelinek 8550eb6e64 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
fields, change sec into secinfo.
	(struct sec_merge_info): Add chain, remove last fields.
	(struct sec_merge_sec_info): Add next, sec, psecinfo fields.
	(sec_merge_hash_lookup): If lookup could not use a string only
	because it has bad alignment, mark the old string for deletion.
	(sec_merge_add): Add secinfo argument. Don't compute entry's
	position, instead record the section.
	(sec_merge_emit): Update for the sec into secinfo change in
	struct sec_merge_hash_entry.
	(_bfd_merge_section): Only record the section for merging, defer
	putting strings into the hash table.
	(cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
	_bfd_merge_sections): New functions.
	(_bfd_merged_section_offset): Update for the sec_merge_hash_entry
	changes.
	* libbfd-in.h (_bfd_merge_sections): Add prototype.
	(_bfd_nolink_bfd_merge_sections): Define.
	* libbfd.h: Likewise.
	(bfd_generic_merge_sections): Add prototype.
	* targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
	(struct bfd_target): Likewise.
	* bfd.c (bfd_merge_sections): Define.
	* bfd-in2.h: Rebuilt.
	* elf.c (_bfd_elf_merge_sections): New function.
	* elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
	* elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
	* reloc.c (bfd_generic_merge_sections): New function.
	* vms.c (vms_bfd_merge_sections): New function.
	* aout-adobe.c (aout_32_bfd_merge_sections): Define.
	* aout-target.h (MY_bfd_merge_sections): Define.
	* aout-tic30.c (MY_bfd_merge_sections): Define.
	* binary.c (binary_bfd_merge_sections): Define.
	* bout.c (b_out_bfd_merge_sections): Define.
	* coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
	* coffcode.c (coff_bfd_merge_sections): Define.
	* coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
	* i386msdos.c (msdos_bfd_merge_sections): Define.
	* i386os9k.c (os9k_bfd_merge_sections): Define.
	* ieee.c (ieee_bfd_merge_sections): Define.
	* ihex.c (ihex_bfd_merge_sections): Define.
	* nlm-target.h (nlm_bfd_merge_sections): Define.
	* oasys.c (oasys_bfd_merge_sections): Define.
	* ppcboot.c (ppcboot_bfd_merge_sections): Define.
	* som.c (som_bfd_merge_sections): Define.
	* srec.c (srec_bfd_merge_sections): Define.
	* tekhex.c (tekhex_bfd_merge_sections): Define.
	* versados.c (versados_bfd_merge_sections): Define.
	* xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.

	* ldlang.c (lang_process): Call bfd_merge_sections.
2001-05-11 12:23:48 +00:00
Nick Clifton 1548c54f2e Change type of 'addr' to be unsigned long, in order to match its use. 2001-05-11 09:55:02 +00:00
H.J. Lu 689effed70 2001-05-10 H.J. Lu <hjl@gnu.org>
* linker.c (_bfd_generic_link_add_one_symbol): Check loop on
	indirect symbols.
2001-05-10 22:59:29 +00:00
H.J. Lu 6e5222be78 2001-05-09 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
	versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
	Remove the unused veriable `dynver'.
2001-05-09 22:34:30 +00:00
Ian Lance Taylor 8e191bd38c * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
NULL or is not COFF.
	(coff_i386_rtype_to_howto): Don't dump core if output section
	owner is not COFF.
2001-05-08 17:44:00 +00:00
Ian Lance Taylor efcbd82c36 Remove extraneous character in first line. 2001-05-08 17:14:35 +00:00
Alan Modra 062e23589d * ecoff.c (bfd_debug_section): Fix initialization.
* elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
	is always a positive integer. Cast away sign mismatch.
	* elf32-mips.c: Fix misleading comment and typo.
	(_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
	correct data type.
	* elflink.c: Fix typo.
	(_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
	* ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
2001-05-07 09:15:26 +00:00
Richard Henderson 16b65e4ea2 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true. 2001-05-04 23:22:31 +00:00
Nick Clifton cac1532771 Set EF_ARM_HASENTRY if the start address is set. 2001-05-04 08:32:21 +00:00
Nick Clifton 966b3e0b90 Compute value of _bfd_target_vector_entries based on the size of
_bfd_target_vector and not bfd_target_vector.
2001-05-03 17:49:49 +00:00
H.J. Lu 210ba1e83d 2001-05-03 H.J. Lu <hjl@gnu.org>
* elfcode.h: Include "libiberty.h".

	* elflink.h (elf_link_add_object_symbols): Set
	elf_dt_name (abfd) to basename of the bfd filename.
	(NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
	of the bfd filename.
2001-05-03 06:18:09 +00:00
Andreas Jaeger b274749094 * coff-alpha.c (reloc_nil): Likewise.
(alpha_ecoff_bad_format_hook): Likewise.
        (alpha_adjust_reloc_out): Likewise.
        (alpha_bfd_reloc_type_lookup): Likewise.
        (alpha_convert_external_reloc): Likewise.
2001-05-03 05:08:17 +00:00
Andreas Jaeger 56fc028eb1 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
(elf_generic_info_to_howto_rel): Likewise.
	* coff-alpha.c (reloc_nil): Likewise.
	(alpha_ecoff_bad_format_hook): Likewise.
	(alpha_adjust_reloc_out): Likewise.
	(alpha_bfd_reloc_type_lookup): Likewise.
	(alpha_convert_external_reloc): Likewise.
	* elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
	(elf64_alpha_reloc_bad): Likewise.
	(elf64_alpha_reloc_gpdisp): Likewise.
	(elf64_alpha_bfd_reloc_type_lookup): Likewise.
	(elf64_alpha_info_to_howto): Likewise.
	(elf64_alpha_add_symbol_hook): Likewise.
	(elf64_alpha_create_got_section): Likewise.
	(elf64_alpha_is_local_label_name): Likewise.
	(elf64_alpha_merge_ind_symbols): Likewise.
	* elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
	(mips_elf64_get_reloc_upper_bound): Likewise.
	* nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
	(nlm_alpha_get_public_offset): Likewise.
2001-05-03 04:46:27 +00:00
Nick Clifton c7e4034828 Add gas and ld support for openrisc 2001-05-02 18:14:31 +00:00
H.J. Lu 5fba655aed 2000-04-27 H.J. Lu <hjl@gnu.org>
* elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
	only for ELF_LINK_FORCED_LOCAL.
	* elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
	* elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
	* elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.

	* elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
	if the symbol has hidden or internal visibility.
2001-04-30 16:13:26 +00:00
Alan Modra db20fd7654 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
calls to undefined weak symbols.
2001-04-30 13:34:41 +00:00
Andreas Jaeger 6a2bda3fa0 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
2001-04-30 10:30:05 +00:00
Andreas Jaeger 053579d754 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
out handled entries.
	(elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
	(elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
	(elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
	GOT32.
2001-04-29 13:42:45 +00:00
H.J. Lu 37c9e45c89 Revert the last change on aclocal.m4. 2001-04-27 21:25:04 +00:00
Nick Clifton 87748b3227 Add support for arm-vxworks target 2001-04-27 17:12:18 +00:00
H.J. Lu f5f31454c5 2001-04-26 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
	valid.
2001-04-26 19:09:20 +00:00
Frank Ch. Eigler d436a9b307 * externalize a function
2001-04-25  Frank Ch. Eigler  <fche@redhat.com>

	* bfd-in.h (bfd_cache_close): Declare newly exported function.
	* bfd-in2.h: Regenerated.
2001-04-25 21:08:02 +00:00
Nick Clifton 5a0a214415 Fix autoconf breakage + commit target.c, omitted in previous delta 2001-04-25 19:09:30 +00:00
Jakub Jelinek a531bbd206 * merge.c (struct sec_merge_hash_entry): Add alignment field.
(struct sec_merge_hash): Remove alignment_power.
	(sec_merge_hash_newfunc): Clear alignment.
	(sec_merge_hash_lookup): Pass alignment as argument.
	Use hashp->root.next, not hashp->next to walk the hash chain.
	If a string already in the hashtable does not have required
	alignment, create a new hashtable entry.
	(sec_merge_init): Remove alignment_power argument.
	(sec_merge_add): Add alignment argument.
	(sec_merge_emit): Alignment is now a per-entity thing, not per
	section.
	(_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
	for proper alignment.
	Pass alignment information to sec_merge_add.
2001-04-24 17:55:57 +00:00
Nick Clifton 6840198f93 z8k fixes 2001-04-24 15:22:25 +00:00
Nick Clifton b3baf5d0a8 Add OpenRISC support 2001-04-24 15:08:16 +00:00
Andreas Jaeger fe4770f478 2001-04-23 Bo Thorsen <bo@suse.de>
* x86-64.h: Add vtable support.

2001-04-23  Bo Thorsen  <bo@suse.de>

	* elf64-x86-64.c: Add c++ vtable hack.
	Small whitespace and comment changes.
2001-04-23 08:00:14 +00:00
Andreas Jaeger 653165cc0d 2001-04-19 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
	(elf64_x86_64_plt_entry): Likewise.
	(elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
	(elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
2001-04-19 09:39:28 +00:00
Hans-Peter Nilsson 4d96d12825 * elf32-cris.c: Tweak comments related to dynamic linking.
(cris_elf_relocate_section): When not creating shared object, fill
	in the .got table for any symbol not in the dynamic symbol table.
	(elf_cris_finish_dynamic_symbol): When not creating shared object,
	only emit a .got.rela reloc if the symbol is in the dynamic symbol
	table.
	(cris_elf_check_relocs): Use variable r_type in all places rather
	than the original expression.  Add default case in switch for
	reloc types.
	(elf_cris_size_dynamic_sections): Iterate over
	elf_cris_discard_excess_program_dynamics when not creating shared
	library.
 	(elf_cris_discard_excess_dso_dynamics): Renamed from
	elf_cris_discard_copies.  Correct typo, s/Rel/Rela/.
	(elf_cris_discard_excess_program_dynamics): New.
2001-04-17 12:32:30 +00:00
DJ Delorie 3ed30d29c6 * coffcode.h (coff_write_object_contents): Use
bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
2001-04-15 04:23:46 +00:00
H.J. Lu a80f694198 2001-04-14 H.J. Lu <hjl@gnu.org>
* bfd-in2.h: Regenerate.
2001-04-15 01:02:54 +00:00
Jakub Jelinek 767e4b0d59 * section.c (STD_SECTION): Add entsize. 2001-04-14 14:23:31 +00:00
H.J. Lu 2dd439c54e 2001-04-13 H.J. Lu <hjl@gnu.org>
* section.c (SEC_MERGE): Define new flag for merging.
	(SEC_STRINGS): Likewise.
	(entsize): New field.
2001-04-14 04:13:00 +00:00
DJ Delorie baf80c32ae * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
flag on pe-i386 targets.
2001-04-13 22:42:48 +00:00
Jakub Jelinek f5fa8ca231 bfd/
* libbfd-in.h (_bfd_merge_section): New.
	(_bfd_write_merged_section): New.
	(_bfd_merged_section_offset): New.
	* libbfd.h: Rebuilt.
	* linker.c (_bfd_generic_link_output_symbols): Handle
	discard_sec_merge.
	* aoutx.h (aout_link_write_symbols): Likewise.
	* pdp11.c (aout_link_write_symbols): Likewise.
	* elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
	(elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
	sections.
	(elf_link_sec_merge_syms): New.
	(elf_link_input_bfd): Call _bfd_merged_section_offset
	and _bfd_write_merged_section.
	Handle discard_sec_merge.
	* elf-bfd.h (struct elf_link_hash_table): Add merge_info
	field.
	(struct bfd_elf_section_data): Likewise.
	* elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
	SEC_STRINGS section flags and entsize from their ELF counterparts.
	(_bfd_elf_link_hash_table_init): Initialize merge_info.
	(elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
	from their BFD counterparts.
	* merge.c: New file.
	* Makefile.am: Add strtab.lo.
	* Makefile.in: Rebuilt.
include/
	* bfdlink.h (bfd_link_discard): Add discard_sec_merge.
gas/
	* config/obj-elf.c (obj_elf_change_section): Add entsize argument,
	handle SHF_MERGE and SHF_STRINGS.
	(obj_elf_parse_section_letters): Set SHF_MERGE and SHF_STRINGS.
	(obj_elf_section): Allow additional argument specifying entity size.
	* write.c (adjust_reloc_syms): Keep relocations against local symbols
	in SEC_MERGE sections.
ld/
	* ldmain.c (main): Default to discard_sec_merge.
	* lexsup.c (OPTION_DISCARD_NONE): Define.
	(ld_options): Add --discard-none.
	(parse_args): Handle OPTION_DISCARD_NONE.
	* ldlang.c (wild_doit): SEC_MERGE should be set in the output
	section only if SEC_MERGE and SEC_STRINGS flags and entsize of
	all its input sections match.
2001-04-13 00:34:36 +00:00
Hans-Peter Nilsson d954b04094 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
only hide symbols marked STV_INTERNAL or STV_HIDDEN.
2001-04-09 03:24:32 +00:00
H.J. Lu fdbafa100f 2001-04-05 Steven J. Hill <sjhill@cotw.com>
* config.bfd (mips*el*-*-linux-gnu*): Use traditional little
	endian MIPS ELF target.
	* config.bfd (mips*-*-linux-gnu*): Use traditional big endian
	MIPS ELF target.

	* configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
	64bit big endian MIPS ELF target.
	(bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
	endian MIPS ELF target.
	* configure: Regenerated.

	* elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
	little endian targets.
	(mips_elf_sym_is_global): Handle traditional targets.

	* elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
	64bit big endian MIPS ELF target.
	(bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
	endian MIPS ELF target.

	* targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
	and bfd_elf64_tradlittlemips_vec.
2001-04-08 05:11:49 +00:00
H.J. Lu dd484e5c56 2001-04-05 David Mosberger <davidm@hpl.hp.com>
* elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
	ordinary "progbits" section.
2001-04-06 00:37:30 +00:00
Alan Modra 391a809a0a * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
when -Bsymbolic causes a symbol to no longer need a .plt entry.
2001-04-04 00:31:37 +00:00
H.J. Lu 5854c6337e 2001-04-03 David Mosberger <davidm@hpl.hp.com>
* efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
2001-04-03 14:45:43 +00:00
H.J. Lu 8b4b0fac4b 2001-03-30 H.J. Lu <hjl@gnu.org>
* efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
	(PEI_DEFAULT_TARGET_SUBSYSTEM): This.
2001-03-30 16:08:34 +00:00
H.J. Lu b9d8899626 Remove ATTRIBUTE_UNUSED in the last patch. 2001-03-27 02:05:18 +00:00
H.J. Lu eb4a6e4f4b 2001-03-26 H.J. Lu <hjl@gnu.org>
* elf32-gen.c (elf32_generic_link_add_symbols): New. Check
	if there are any relocations for generic ELF.
	(bfd_elf32_bfd_link_add_symbols): Defined to
	elf32_generic_link_add_symbols.
	* elf64-gen.c (elf64_generic_link_add_symbols): New. Check
	if there are any relocations for generic ELF.
	(bfd_elf64_bfd_link_add_symbols): Defined to
	elf64_generic_link_add_symbols.
2001-03-27 02:00:34 +00:00
Nick Clifton 55c80943b8 Fix building bfd.pot in maintainer mode 2001-03-23 18:05:30 +00:00
Hans-Peter Nilsson 915e51468a * elf32-cris.c: Shlib and PIC support. PCREL tweaks. 2001-03-22 14:56:06 +00:00
Hans-Peter Nilsson 58d29fc398 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
	BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
	BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
	BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
	BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
	* bfd-in2.h, libbfd.h: Regenerate.
2001-03-22 11:17:16 +00:00
Diego Novillo 7a65545dc5 2001-03-21 Diego Novillo <dnovillo@redhat.com>
(_bfd_mips_elf_relocate_section): Give a better error message when
	a relocation is not recognized.
2001-03-22 00:29:15 +00:00
Alan Modra b32b5d6e64 Prevent NULL pointer dereference. 2001-03-21 08:09:25 +00:00
H.J. Lu f4fbb4a3d1 2001-03-20 H.J. Lu <hjl@gnu.org>
* configure.in: Remove the redundent AC_ARG_PROGRAM.
	* configure: Rebuild.
2001-03-20 18:24:30 +00:00
Andreas Schwab 95fc45e66f * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
relocation value when resolving a reference from a debugging
	section.
2001-03-20 10:11:07 +00:00
Nick Clifton 03d411a927 Fix syntax errors. 2001-03-16 18:49:32 +00:00
Nick Clifton d165939296 Fix warning message 2001-03-16 17:34:31 +00:00
Hans-Peter Nilsson 0dc1fa070b Fix accidental loss of bit 7 in peoples names 2001-03-16 03:00:24 +00:00
Alan Modra 12cca0d293 Don't assume non-PIC to PIC call stubs are unneeded just because
the function happens to have a plabel.
2001-03-15 13:47:56 +00:00
DJ Delorie cd6ec716b6 * elf32-sh.c (sh_elf_relocate_section): Only relocation
R_SH_DIR8WP* relocs if they're against external symbols, else
they're just for relaxing.  Validate the reloc values.
2001-03-13 04:43:40 +00:00
Nick Clifton 43a0748c78 Add --binary-architecture switch to objcopy to allow the output architecture
to be set when the input file type is binary.
2001-03-13 00:08:35 +00:00
Phil Blundell d982ba7301 2001-03-11 Philip Blundell <philb@gnu.org>
* elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
	entries that could serve as a definition for a weak symbol.
2001-03-11 13:10:51 +00:00
Nick Clifton 7898dedac0 Update copyright notices 2001-03-08 21:04:02 +00:00
Nick Clifton df425bc0dd Conditionalize prevbious pathc on ! defined OLD_ARM_ABI. 2001-03-07 23:52:58 +00:00
Andreas Jaeger bcdd92f3e0 2001-03-07 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
	some relocation values.
2001-03-07 13:49:11 +00:00
Nick Clifton 4f3c3dbb37 Fix BLX(1) for Thumb 2001-03-06 22:33:47 +00:00
Nick Clifton f8f3c6cc37 Add BFD_RELOC_THUMB_PCREL_BLX. 2001-03-06 20:27:50 +00:00
Nick Clifton 3cac17aec8 Rest of the changes for Coldfire V4. 2001-03-06 20:15:27 +00:00
Nick Clifton d1b17ab0f3 Add s390 target 2001-03-01 18:48:14 +00:00
Andreas Jaeger 5608e05bb4 2001-02-28 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
	to addend.
2001-02-28 12:32:10 +00:00
Phil Blundell fd2ec33034 2001-02-28 Philip Blundell <pb@futuretv.com>
* elf32-arm.h: Update mentions of renamed EF_xx constants.
 	(elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
2001-02-28 10:13:20 +00:00
H.J. Lu 920581c57e 2001-02-27 H.J. Lu <hjl@gnu.org>
* aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
	abfd->tdata.aout_data == NULL.
2001-02-27 18:45:45 +00:00
Alan Modra 3ee1d8549f Fix some comments, and a formatting error. 2001-02-27 07:11:41 +00:00
Alan Modra 27b7e12d2d Bump version to 2.11.90, fix missing dependencies in bfd/,
and run "make dep-am".
2001-02-27 06:43:56 +00:00
Timothy Wall 10d1e03a7a Update elf64 aix5 comments. 2001-02-27 03:26:47 +00:00
Nick Clifton 1276aefac0 BFD: Catch & report unhandled PE section flags.
LD: Catch BFD errors whilst loading symbols and do not produce an executable.
2001-02-27 01:38:06 +00:00
Andreas Jaeger 4a73f21b0c 2001-02-26 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
2001-02-26 07:50:22 +00:00
Timothy Wall 7b6dab7f4b ia64-*-aix* support. 2001-02-22 16:38:46 +00:00
Jim Wilson 87f8eb977e Improve gas error messages for invalid instructions.
* cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
	C8 said "1" instead of "8".  Clarify error string for IMM22:
	"signed integer" instead of just "integer".
	* config/tc-ia64.c (enum operand_match_result): New type.
	(operand_match): Change return type to operand_match_result.
	Fix all returns appropriately, adding support for returning the
	out-of-range result.
	(parse_operands): New locals result, error_pos, out_of_range_pos,
	curr_out_of_range_pos.  Rewrite operand matching loop to give better
	error messages.
	* ia64-opc-d.c (ia64_opcodes_d): Break the "add" pattern into two
	separate variants: one for IMM22 and the other for IMM14.
	* ia64-asmtab.c: Regenerate.
2001-02-22 03:16:21 +00:00
Andreas Jaeger 05aa1441bb 2001-02-20 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
	PLT entries that could serve as a definition for a weak symbol.
2001-02-20 08:01:32 +00:00
Jakub Jelinek 8701c1bc04 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
entries that could serve as a definition for a weak symbol.
	* elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
2001-02-19 22:35:47 +00:00
David O'Brien d4af977521 2001-02-18 David O'Brien <obrien@FreeBSD>
* configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
	FreeBSD/i386-CURRENT differently until I can figure out the needed
	corefile changes.
	* configure: Regenerate.
	* config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
	FreeBSD/PowerPC, and FreeBSD/sparc64.

Approved by:  Philip Blundell <philb@gnu.org>
              Message-Id: <E14URxF-00023n-00@kings-cross.london.uk.eu.org>
2001-02-19 06:33:41 +00:00
Nick Clifton e135f41bc2 Add PDP-11 support 2001-02-18 23:33:11 +00:00
Nick Clifton dc3febfa6e Set the architecture (GDB multiarch needs it). 2001-02-18 22:29:52 +00:00
H.J. Lu ea412e04e5 2001-02-18 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_input_bfd): Ignore invalid section symbol
	index.
2001-02-18 22:04:08 +00:00
Kazu Hirata 47eee8a91c 2001-02-18 Kazu Hirata <kazu@hxi.com>
* vms-misc.c: Fix formatting.
2001-02-18 21:35:55 +00:00
Kazu Hirata 8a0c27cda9 2001-02-16 Kazu Hirata <kazu@hxi.com>
* vms.c: Fix formatting.
2001-02-16 19:22:12 +00:00
Nick Clifton d1fad7c69e fixes for elf_find_nearest_line 2001-02-14 19:58:45 +00:00
Nick Clifton 51d7ee16bb Fix initialisation of asection structure 2001-02-14 19:37:05 +00:00
Nick Clifton 825b47db31 Apply changes to Makefile.in to Makefile.am 2001-02-14 19:18:53 +00:00
H.J. Lu ea36a178b2 2001-02-14 H.J. Lu <hjl@gnu.org>
* libcoff-in.h (pe_tdata): Add members target_subsystem and
	force_minimum_alignment.
2001-02-14 17:29:47 +00:00
Andreas Jaeger 407443a31c 2001-02-14 Bo Thorsen <bo@suse.de>
* elf64-x86-64.c: Small formatting fixes and rearrangements of code.
	(elf64_86_64_size_info): Struct added to fix a problem
	with the hashtable string entries.
	(elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
	(elf64_x86_64_size_dynamic_sections): A FIXME removed.
	(elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
	remove the FIXME for this.
	(elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
	section. Also removed the FIXME for it.
	(x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
	(ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
	(elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
2001-02-14 10:57:47 +00:00
H.J. Lu 6757257fb5 It is SYMTAB, not STMTAB. 2001-02-13 23:58:35 +00:00
Richard Henderson b4adccfd55 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
and not user provided.
2001-02-13 23:08:09 +00:00
Kazu Hirata 6a125b16c8 2001-02-13 Kazu Hirata <kazu@hxi.com>
* rs6000-core.c: Fix formatting.
2001-02-13 22:41:23 +00:00
Kazu Hirata 9635981ad3 2001-02-13 Kazu Hirata <kazu@hxi.com>
* vms.c (vms_print_symbol): Remove unreachable code.
2001-02-13 22:39:17 +00:00
DJ Delorie 6433dece0a Regenerate 2001-02-13 21:05:09 +00:00
DJ Delorie cbff5e0d66 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
as _bfd_XXi_only_swap_filehdr_out.
(pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
pe->force_minimum_alignment to TRUE.
(pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
PEI_TARGET_SUBSYSTEM.
(pe_print_private_bfd_data): Call
_bfd_XX_print_private_bfd_data_common() instead of
_bfd_pe_print_private_bfd_data_common().
(pe_bfd_copy_private_bfd_data): Call
_bfd_XX_bfd_copy_private_bfd_data_common() instead of
_bfd_pe_bfd_copy_private_bfd_data_common().
(coff_bfd_copy_private_section_data): Define as
_bfd_XX_bfd_copy_private_section_data instead of
_bfd_pe_bfd_copy_private_section_data.
(coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
of a _bfd_pe_get_symbol_info.

* peigen.c: Delete.

* peXXigen.c: Renamed from peigen.c.
(COFF_WITH_XX): Define this macro (will get expanded into
COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
compiled as peigen.c or pepigen.c.
[COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
define the canonical PEP structures and definitions.
(_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
effect, enforce minimum file and section alignments.  If
extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
so, by default, this is a no-op).

* libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
(_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
_bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
_bfd_pefoo if it's not defined.  Use these macros to define
coff swap macros.

* libcoff.h (pe_tdata): Add members target_subsystem and
force_minimum_alignment.

* efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
COFF_WITH_pep.
(PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.

* configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
peigen.lo.

* coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
(AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
PEPAOUTHDR.

* Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
(BFD64_BACKENDS_CFILES): Mention pepigen.c
(peigen.c): Add rule to generate from peXXigen.c.
(pepigen.c): Ditto.
(pepigen.lo): List dependencies for pepigen.lo.

* unwind-ia64.c (unw_decode_x1): Declare code arg with
ATTRIBUTE_UNUSED.
(unw_decode_x2): Ditto.
(unw_decode_x3): Ditto.
(unw_decode_x4): Ditto.

* pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ.
Rename from PEPAOUTHDR.
2001-02-13 19:23:08 +00:00
Alan Modra df8634e34b (elf32_hppa_set_gp): Handle weak $global$.
If $global$ referenced but not defined, set its value here.
2001-02-13 10:14:14 +00:00
Jan Hubicka 51e0a107ce 2001-02-09 Bo Thorsen <bo@suse.de>
* elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
	alignment to 3.
	(elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
	and relocation.
	(elf64_x86_64_relocate_section): Fix formatting.
	(elf64_x86_64_relocate_section): Fix addend for relocation of
	R_X86_64_(8|16|32|PC8|PC16|PC32).
2001-02-12 16:54:08 +00:00
Jan Hubicka 23df107806 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
* tc-i386.c (i386_displacement): Fix handling of
	BFD_RELOC_X86_64_GOTPCREL.
	(i386_validate_fix): Likewise.
2001-02-12 16:47:15 +00:00
H.J. Lu f0e1d18ad3 2001-02-11 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_bfd_final_link): Use file_align for STMTAB
	alignment.
2001-02-12 00:23:37 +00:00
Nick Clifton 708b82c780 fix formatting 2001-02-11 23:22:25 +00:00
Nick Clifton b401d8e517 oops - omitted from previous delta 2001-02-11 23:21:01 +00:00
Nick Clifton 9117d2197e Apply several patches from Maciej W. Rozycki 2001-02-11 23:11:41 +00:00
Michael Sokolov 9f93bca5c7 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
* Makefile.in: Regenerate.
2001-02-11 22:53:28 +00:00
Richard Henderson 81545d45ad * elfxx-ia64.c (is_unwind_section_name): New function. Returns
true if section name is an unwind table section name.
        (elfNN_ia64_additional_program_headers): Count each unwind section
        separately.
        (elfNN_ia64_modify_segment_map): Install one unwind program header
        for each unwind separate section.  Note: normally the linker
        script merges the unwind sections that go into a single segment,
        so this still generates at most one unwind program header per
        segment.

        * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
        name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
        (elfNN_ia64_fake_sections): Mark sections with names that start
        with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
        unwind section.

        * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
        Use it to make sh_info in unwind section point to the text section
        it applies to.
2001-02-10 01:41:06 +00:00
Nick Clifton a85d7ed0f0 Add s390 support 2001-02-10 00:58:38 +00:00
Nick Clifton 356d255deb Suppress extra addition of ImageBase. 2001-02-09 18:38:58 +00:00
Jakub Jelinek 069f40e56f * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function. 2001-02-09 17:53:16 +00:00
Jakub Jelinek eadfa8abf1 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
(sparc64_elf_relocate_section): Likewise.
2001-02-09 17:31:11 +00:00
Mark Kettenis 9fc54e1950 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
similar to R_SPARC_32.
* elf64-sparc.c	(sparc64_elf_howto_table): Likewise.
2001-02-09 16:19:25 +00:00
H.J. Lu 1f655a0986 2001-02-08 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
	relocation entries for weak definitions when building DSO with
	-Bsymbolic.
2001-02-09 06:58:59 +00:00
Richard Henderson ca88208ac8 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
before visibility.  Locally defined protected symbols are not
        dynamic.
2001-02-09 00:29:58 +00:00
Geoffrey Keating 4603e845c0 * config.bfd: Enable coff64 for rs6000-*. Patch from
<hzoli@austin.ibm.com>.
2001-02-09 00:11:24 +00:00
Nick Clifton 4ca29a6acf If stabs info is successfully found, do not attempt to find dwarf2 info
before returning.
2001-02-07 23:50:04 +00:00
Nick Clifton 7da9d88fe4 ignore common definitions of function symbols in unlinked archives 2001-02-07 23:42:15 +00:00
Nick Clifton 7340082dc8 Change bfd_target_vector from an array to a pointer 2001-02-07 23:16:22 +00:00
H.J. Lu 2719f88070 2001-02-06 H.J. Lu <hjl@gnu.org>
* elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
	internal symbols are not dynamic.
	* elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
2001-02-07 06:19:58 +00:00
Nick Clifton 175aa013d9 Remove elf64-ia64.c from list of backend C files - it is auto-generated. 2001-02-07 01:58:26 +00:00
H.J. Lu 15e0ecd9c7 2001-02-06 H.J. Lu <hjl@gnu.org>
* bfd/peicode.h (coff_swap_filehdr_in): Remove the e_magic
	checking.
	(pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
	external_PEI_IMAGE_hdr.
2001-02-06 19:43:19 +00:00
Kazu Hirata 27def10f96 2001-02-06 Kazu Hirata <kazu@hxi.com>
* elf-m10200.c: Fix formatting.
2001-02-06 19:04:20 +00:00
Nick Clifton a0f2e916a7 Do not convert reloc addend to PC rel, it will be handled later on. 2001-02-04 22:14:19 +00:00
Nick Clifton d96031fbcc Fix typo 2001-02-03 00:53:10 +00:00
Kazu Hirata 010ac81f2a 2001-02-01 Kazu Hirata <kazu@hxi.com>
* elf-m10300.c: Fix formatting.
2001-02-01 19:35:29 +00:00
Alan Modra d9634ba1ff (elf64_hppa_object_p): Set architecture and machine from elf header flags. 2001-01-31 13:28:50 +00:00
Alan Modra 3fab46d0e9 Write out millicode functions with the right elf symbol type. 2001-01-30 13:40:08 +00:00
Richard Henderson 9540464302 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
before mdebug.
2001-01-30 09:52:27 +00:00
Richard Henderson 8fb35fedd5 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
for non-default visibility.
        * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
        delete ugly macro and replace with pretty function.
2001-01-27 00:04:09 +00:00
Nick Clifton a4f685449e DJGPP config tweaks 2001-01-25 21:08:10 +00:00
Kazu Hirata c02e7c3eff 2001-01-25 Kazu Hirata <kazu@hxi.com>
* bfd-in2.h: Fix formatting.
	* libbfd.h: Likewise.
2001-01-25 20:17:45 +00:00
Kazu Hirata 10bfd974d4 2001-01-25 Kazu Hirata <kazu@hxi.com>
* chew.c: Do not output trailing whitespaces in type and
	functionname.  Update copyright.
2001-01-25 20:12:49 +00:00
Kazu Hirata 05c6581e28 2001-01-24 Kazu Hirata <kazu@hxi.com>
* chew.c: Do not output a trailing whitespace.
2001-01-24 22:38:31 +00:00
H.J. Lu 541389e202 2001-01-23 H.J. Lu <hjl@gnu.org>
* bfd-in2.h: Rebuild.
2001-01-24 04:56:29 +00:00
H.J. Lu 0007625f8f 2001-01-23 H.J. Lu <hjl@gnu.org>
* vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
	is NULL or PRIV(vms_rec) is outside of the buffer.
2001-01-23 21:50:36 +00:00
Kazu Hirata 3fde5a36df 2001-01-23 Kazu Hirata <kazu@hxi.com>
* aoutx.h: Fix formatting.
	* bfd.c: Likewise.
	* bfd-in2.h: Likewise.
	* bfd-in.h: Likewise.
	* cpu-i386.c: Likewise.
	* cpu-m68hc11.c: Likewise.
	* dwarf2.c: Likewise.
	* elf64-x86-64.c: Likewise.
	* format.c: Likewise.
	* freebsd.h: Likewise.
	* hash.c: Likewise.
	* hp300hpux.c: Likewise.
	* hppabsd-core.c: Likewise.
	* hpux-core.c: Likewise.
2001-01-23 20:27:54 +00:00
Kazu Hirata b653e1b152 2001-01-23 Kazu Hirata <kazu@hxi.com>
* coff64-rs6000.c: Fix formatting.
	* coff-arm.c: Likewise.
	* coffgen.c: Likewise.
	* cofflink.c: Likewise.
	* coff-mcore.c: Likewise.
	* coff-mips.c: Likewise.
	* coff-pmac.c: Likewise.
	* coff-ppc.c: Likewise.
	* coff-rs6000.c: Likewise.
	* elf32.c: Likewise.
	* elf32-fr30.c: Likewise.
	* elf32-i370.c: Likewise.
	* elf32-i860.c: Likewise.
	* elf32-m32r.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-mcore.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-sh.c: Likewise.
	* elf32-v850.c: Likewise.
	* elf64-alpha.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elflink.c: Likewise.
	* elflink.h: Likewise.
	* elf-m10200.c: Likewise.
	* elf-m10300.c: Likewise.
	* elfxx-ia64.c: Likewise.
2001-01-23 11:45:53 +00:00
Andreas Jaeger 70256ad8ae 2001-01-22 Bo Thorsen <bo@suse.de>
* elf64-x86-64.c: Added PIC support for X86-64.
        (elf64_x86_64_link_hash_newfunc): Function added.
        (elf64_x86_64_link_hash_table_create): Likewise.
        (elf64_x86_64_check_relocs): Likewise.
        (elf64_x86_64_gc_mark_hook): Likewise.
        (elf64_x86_64_gc_sweep_hook): Likewise.
        (elf64_x86_64_adjust_dynamic_symbol): Likewise.
        (elf64_x86_64_size_dynamic_sections): Likewise.
        (elf64_x86_64_discard_copies): Likewise.
        (elf64_x86_64_finish_dynamic_symbol): Likewise.
        (elf64_x86_64_finish_dynamic_sections): Likewise.
        (elf64_x86_64_relocate_section): Add relocation of PIC sections.
2001-01-23 10:49:50 +00:00
Andreas Jaeger ee0bebb8ef 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* Makefile.am (install-data-local): Make use of $(DESTDIR).
	* Makefile.in: Regenerate.
2001-01-22 09:41:40 +00:00
Kazu Hirata 2a38f751b6 2001-01-21 Kazu Hirata <kazu@hxi.com>
* coff-a29k.c: Fix formatting.
2001-01-21 19:19:59 +00:00
H.J. Lu c849217624 2001-01-19 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_check_relocs): Report files with bad
	relocation section names.
	(elf_i386_relocate_section): Report files with bad relocation
	section names and return false.
2001-01-20 06:08:35 +00:00
Andreas Jaeger a5377ec020 * targets.c: Alphabetize list of xvecs. 2001-01-18 07:47:51 +00:00
Alan Modra d952f17a9d Linux target variants for elfxx-hppa. 2001-01-14 11:12:53 +00:00
Alan Modra c46b75158b Use SEGREL32 relocs for elf32-hppa unwind. 2001-01-14 07:03:49 +00:00
Alan Modra d768008d61 Add parens like the comment says. 2001-01-14 06:12:07 +00:00
Alan Modra 150ccafb7a Correct DT_INIT/DT_FINI ABI violation 2001-01-14 05:58:15 +00:00
Alan Modra b352eebf39 Wide mode .plt offsets for elf64-hppa 2001-01-14 05:22:51 +00:00
Nick Clifton b7ed8fad53 formatting fix 2001-01-13 19:45:52 +00:00
Nick Clifton b3b9a0622f formatting fix 2001-01-13 19:42:21 +00:00
Alan Modra 6e0b89ee6c Cure recent x86 warts. 2001-01-12 03:34:49 +00:00
Nick Clifton 0d2bcfafbf Updated ARC assembler from arccores.com 2001-01-11 21:20:20 +00:00
Nick Clifton 2f6d2f8520 Rotate ChangeLogs 2001-01-11 19:01:42 +00:00
Nick Clifton 2758140ba5 fix spelling typo 2001-01-11 01:43:44 +00:00
Nick Clifton c31c1f70c0 Change defn of LOCAL_LABEL_PREFIX to "" 2001-01-11 01:43:20 +00:00
Phil Blundell 5ad083e32d Update address for bug reports. 2001-01-07 14:53:57 +00:00
Kazu Hirata 7eae7d229a 2001-01-04 Kazu Hirata <kazu@hxi.com>
* som.c: Fix formatting.
2001-01-04 23:27:08 +00:00
Kazu Hirata 3e932841da 2001-01-03 Kazu Hirata <kazu@hxi.com>
* ecoffswap.h: Fix formatting.
	* elf-bfd.h: Likewise.
	* elfarm-nabi.c: Likewise.
	* elfarm-oabi.c: Likewise.
	* elfcode.h: Likewise.
	* elfcore.h: Likewise.
	* elflink.c: Likewise.
	* elflink.h: Likewise.
	* elfxx-ia64.c: Likewise.
	* elfxx-target.h: Likewise.
2001-01-03 22:53:39 +00:00
Kazu Hirata 509945ae4b 2001-01-03 Kazu Hirata <kazu@hxi.com>
* libbfd.c: Fix formatting.
	* linker.c: Likewise.
	* lynx-core.c: Likewise.
2001-01-03 19:26:07 +00:00
Kazu Hirata ee91ed7972 2001-01-02 Kazu Hirata <kazu@hxi.com>
* peicode.h: Fix formatting.
2001-01-02 19:22:56 +00:00
Kazu Hirata 892339eeeb 2001-01-02 Kazu Hirata <kazu@hxi.com>
* pc532-mach.c: Fix formatting.
	* pe-arm.c: Likewise.
	* pe-i386.c: Likewise.
	* pe-mips.c: Likewise.
	* pe-ppc.c: Likewise.
	* pe-sh.c: Likewise.
	* pei-mips.c: Likewise.
	* pei-sh.c: Likewise.
	* ppcboot.c: Likewise.
	* ptrace-core.c: Likewise.
2001-01-02 18:58:44 +00:00
Kazu Hirata 3d85563291 2001-01-01 Kazu Hirata <kazu@hxi.com>
* reloc.c: Fix formatting.
	* riscix.c: Likewise.
	* rs6000-core.c: Likewise.
	* xcoff-target.h: Likewise.
2001-01-01 21:37:35 +00:00
Hans-Peter Nilsson a77a9fefcf * elfcode.h (elf_object_p): Also restore the bfd mach field on
error, by calling bfd_default_set_arch_mach with incoming
	values.
2000-12-29 05:44:51 +00:00
Kazu Hirata 558e161f24 2000-12-26 Kazu Hirata <kazu@hxi.com>
* vaxnetbsd.c: Fix formatting.
	* versados.c: Likewise.
	* vms-gsd.c: Likewise.
	* vms-hdr.c: Likewise.
	* vms-misc.c: Likewise.
2000-12-26 19:50:50 +00:00
Alexandre Oliva 3c5798123f * archive.c (coff_write_armap): Don't write more than symbol_count
`archive_member_file_ptr's.
2000-12-25 21:41:20 +00:00
Kazu Hirata 672579e99b 2000-12-25 Kazu Hirata <kazu@hxi.com>
* vms-tir.c: Fix formatting.
2000-12-25 14:42:42 +00:00
Kazu Hirata 55f2d5ed30 2000-12-23 Kazu Hirata <kazu@hxi.com>
* vms.c: Fix formatting.
	* vms.h: Likewise.
2000-12-23 16:48:10 +00:00
Nick Clifton 23ccc829e2 Fixes to allow sources to compile under Solaris 2.8 2000-12-21 18:40:21 +00:00
Nick Clifton 8c603c85a1 Add bfd_get_bits() and bfd_put_bits(). 2000-12-21 18:20:04 +00:00
Kazu Hirata 5bff4f5642 2000-12-20 Kazu Hirata <kazu@hxi.com>
* targets.c: Fix formatting.
	* tekhex.c: Likewise.
	* trad-core.c: Likewise.
2000-12-20 19:53:11 +00:00
Kazu Hirata 7b82c249fa 2000-12-19 Kazu Hirata <kazu@hxi.com>
* sco5-core.c: Fix formatting.
	* section.c: Likewise.
	* sparclinux.c: Likewise.
	* sparclynx.c: Likewise.
	* sparcnetbsd.c: Likewise.
	* srec.c: Likewise.
	* stabs.c: Likewise.
	* stab-syms.c: Likewise.
	* sunos.c: Likewise.
	* syms.c: Likewise.
	* sysdep.h: Likewise.
2000-12-20 00:21:57 +00:00
Nick Clifton f78c52818f Definbe extra allowable COFF section flags for ARM_PE target/ 2000-12-18 20:50:41 +00:00
Nick Clifton 02b89dcefc Add default case to file_format switch. 2000-12-18 19:03:30 +00:00
Nick Clifton d20966a734 Move to the start of the program headers before attempting to read them. 2000-12-15 18:53:04 +00:00
Kazu Hirata 6fa957a9b9 2000-12-14 Kazu Hirata <kazu@hxi.com>
* peigen.c: Fix formatting.
	* som.c: Likewise.
	* som.h: Likewise.
2000-12-14 21:38:31 +00:00
Kazu Hirata 9602af5112 2000-12-13 Kazu Hirata <kazu@hxi.com>
* peigen.c: Fix formatting.
2000-12-13 21:43:57 +00:00
Jim Wilson 514829c3af Eliminate ia64 compiler warnings. Fix ia64 gas testsuite again.
*  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
	* config/tc-ia64.h (ia64_init): Add prototype.
	* gas/ia64/dv-imply.d, gas/ia64/dv-mutex.d, gas/ia64/dv-safe.d,
	gas/ia64/dv-srlz.d, gas/ia64/opc-m.d: Update.
	* ia64-dis.c (print_insn_ia64): Cast away const on ia64_free_opcode
	argument.
	* ia64_gen.c (insert_deplist): Cast sizeof result to int.
	(print_dependency_table): Print NULL if semantics field not set.
	(insert_opcode_dependencies): Mark cmp parameter as unused.
	(print_main_table): Use fprintf_vma to print long long fields.
	(main): Mark argv paramter as unused.  Convert to old style definition.
	* ia64-opc.c (ia64_find_dependency): Cast sizeof result to int.
	* ia64-asmtab.c: Regnerate.
2000-12-12 22:56:36 +00:00
Nick Clifton 3a71aec8b4 Ignore sections with zero size. 2000-12-12 22:54:39 +00:00
Kazu Hirata 1518639ec4 2000-12-12 Kazu Hirata <kazu@hxi.com>
* m68klinux.c: Fix formatting.
	* m68knetbsd.c: Likewise.
	* mipsbsd.c: Likewise.
	* netbsd-core.c: Likewise.
	* netbsd.h: Likewise.
	* newsos3.c: Likewise.
	* nlm32-alpha.c: Likewise.
	* nlm32-i386.c: Likewise.
	* nlm32-ppc.c: Likewise.
	* nlm32-sparc.c: Likewise.
	* nlmcode.h: Likewise.
	* nlmswap.h: Likewise.
	* nlm-target.h: Likewise.
	* ns32knetbsd.c: Likewise.
2000-12-12 21:25:54 +00:00
Nick Clifton b79e8c7865 Add link option to allow undefiedn symbols in shared libraries 2000-12-12 20:53:02 +00:00
Nick Clifton 38b1a46ca2 Fix formatting. 2000-12-12 19:23:16 +00:00
Nick Clifton 857ec808bb Pass dwarf2_find_line_info as last parameter to invocation of
_bfd_dwarf2_find_nearest_line.
2000-12-09 20:12:57 +00:00
Kazu Hirata fe8bc63d5e 2000-12-08 Kazu Hirata <kazu@hxi.com>
* elf64-alpha.c: Fix formatting.
	* elf64-hppa.c: Likewise.
	* elf64-mips.c: Likewise.
2000-12-09 01:54:51 +00:00
Nick Clifton 51db370890 Generalize DWARF2 and COFF support. 2000-12-08 22:50:07 +00:00
Kazu Hirata 435b1e90b1 2000-12-08 Kazu Hirata <kazu@hxi.com>
* coffgen.c: Fix formatting.
	* elf32-i386.c: Likewise.
	* elf32-i960.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-mcore.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-sh.c: Likewise.
	* elf32-sparc.c: Likewise.
	* elf32-v850.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elf-m10300.c: Likewise.
2000-12-08 18:34:32 +00:00
Kazu Hirata 8da6118f7b 2000-12-07 Kazu Hirata <kazu@hxi.com>
* elf32-ppc.c: Fix formatting.
	* elf64-x86-64.c: Likewise.
2000-12-07 19:31:48 +00:00
Ulf Carlsson a9922e52c7 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
From  Ralf Baechle  <ralf@gnu.org>

	* elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
	BFDs containing no sections or empty .text, .data or .bss sections
	to be merged, regardless of their flags.
2000-12-07 01:05:04 +00:00
Kazu Hirata c3668558c9 2000-12-06 Kazu Hirata <kazu@hxi.com>
* elf32-m32r.c: Fix formatting.
	* elf32-m68hc11.c: Likewise.
	* elf32-m68hc12.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-mcore.c: Likewise.
	* elf32-pj.c: Likewise.
	* elf32-ppc.c: Likewise.
2000-12-06 18:59:48 +00:00
Kazu Hirata 6609fa7475 2000-12-05 Kazu Hirata <kazu@hxi.com>
* elf32-fr30.c: Fix formatting.
	* elf32-hppa.c: Likewise.
	* elf32-i370.c: Likewise.
	* elf32-i386.c: Likewise.
	* elf32-i860.c: Likewise.
	* elf32-i960.c: Likewise.
2000-12-05 13:20:10 +00:00
Kazu Hirata a7c108501a 2000-12-03 Kazu Hirata <kazu@hxi.com>
* elf32-arm.h: Fix formatting.
	* elf32-avr.c: Likewise.
	* elf32-cris.c: Likewise.
	* elf32-d10v.c: Likewise.
	* elf32-d30v.c: Likewise.
	* elf-hppa.h: Likewise.
	* elf-m10200.c: Likewise.
	* elf-m10300.c: Likewise.
2000-12-03 20:44:04 +00:00
Nick Clifton c6c98b3833 Add MIPS SB1 machine 2000-12-02 01:10:33 +00:00
Nick Clifton 84ea6cf2c5 Add MIPS V and MIPS 64 machine numbers 2000-12-02 00:55:22 +00:00
Nick Clifton e7af610e14 Add MIPS32 as a seperate MIPS architecture 2000-12-01 21:35:38 +00:00
Nick Clifton ddcfc5fc2c Update RTEMS targets 2000-12-01 18:37:16 +00:00
Nick Clifton 2c9f0eb1fc Really delete elf64-ia64.c this time. 2000-12-01 18:15:22 +00:00
Nick Clifton 8d88c4ca53 Add support for x86_64-*-linux-gnu* target 2000-11-30 19:16:54 +00:00
Kazu Hirata fbc4fff4c6 2000-11-30 Kazu Hirata <kazu@hxi.com>
* xcofflink.c: Fix formatting.
2000-11-30 08:04:42 +00:00
Kazu Hirata be3ccd9c2b 2000-11-28 Kazu Hirata <kazu@hxi.com>
* elf32-mips.c: Fix formatting.
2000-11-29 04:56:32 +00:00
Kazu Hirata e60b52c622 2000-11-28 Kazu Hirata <kazu@hxi.com>
* aoutx.h: Fix formatting.
	* bfd-in.h: Likewise.
	* bfd-in2.h: Likewise.
	* cache.c: Likewise.
	* cisco-core.c: Likewise.
	* coff64-rs6000.c: Likewise.
	* coffcode.h: Likewise.
	* coffswap.h: Likewise.
	* corefile.c: Likewise.
2000-11-28 21:42:16 +00:00
Kazu Hirata 244148ad5c 2000-11-27 Kazu Hirata <kazu@hxi.com>
* coff64-rs6000.c: Fix formatting.
	* coffgen.c: Likewise.
	* cofflink.c: Likewise.
2000-11-28 01:33:15 +00:00
Kazu Hirata 336eced2fe 2000-11-27 Kazu Hirata <kazu@hxi.com>
* aout-adobe.c: Fix formatting.
2000-11-28 01:27:10 +00:00
Phil Blundell d71f672e69 2000-11-27 Philip Blundell <pb@futuretv.com>
* libcoff-in.h (coff_tdata): Add `strings_written' flag.
	(obj_coff_strings_written): New accessor macro for above.
	* libcoff.h: Regenerate.
	* cofflink.c (_bfd_coff_final_link): Say that we wrote the
	strings.
	* coffcode.h (coff_write_object_contents): No need to write out
	the string table if it's already been done.
2000-11-27 12:45:17 +00:00
Phil Blundell bc7a577dc7 2000-11-22 Philip Blundell <pb@futuretv.com>
* cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
	weak undefined symbols.
2000-11-27 11:08:15 +00:00
Nick Clifton 077b8428ab Add ARM v5t, v5te and XScale support 2000-11-25 00:21:40 +00:00
Kazu Hirata e9e41bd976 2000-11-23 Kazu Hirata <kazu@hxi.com>
* aix386-core.c: Fix formatting.
2000-11-23 07:33:24 +00:00
Jim Wilson 64bf6ae67d Eliminate compiler warnings from IA-64 port.
* coff-ia64.c (howto_table): Use EMPTY_HOWTO.
	(in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
	* cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
	(ins_imms_scaled): Initialize sign_bit at function entry.
	(elf64_ia64_operands): Add missing initializers.
	* elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
	elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
	elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
	elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
	elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
	parameters.
	(elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
	and free_extsyms at function entry.
	(elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
	(elfNN_ia64_create_dynamic_sections): Delete unused local h.
	(get_got): Delete unused local srel.
	(elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
	(elfNN_ia64_relocate_section): Delete unused local dynindx.
2000-11-22 21:25:36 +00:00
Kazu Hirata 6e301b2bf2 2000-11-21 Kazu Hirata <kazu@hxi.com>
* coff-a29k.c: Fix formatting.
	* coff-h8500.c: Likewise.
	* coff-i960.c: Likewise.
	* coff-ppc.c: Likewise.
	* coff-rs6000.c: Likewise.
	* coff-stgo32.c: Likewise.
	* coff-tic54x.c: Likewise.
	* coff-w65.c: Likewise.
	* cpu-h8500.c: Likewise.
	* cpu-hppa.c: Likewise.
	* cpu-ns32k.c: Likewise.
2000-11-22 01:08:53 +00:00
Kazu Hirata 1abaf97602 2000-11-21 Kazu Hirata <kazu@hxi.com>
* ecoff.c: Fix formatting.
	* ecofflink.c: Likewise.
2000-11-22 00:56:55 +00:00
Nick Clifton a0fc8ba1d8 Fix compile time warning, and remove possibility of infinite loop. 2000-11-21 19:47:10 +00:00
Kazu Hirata eb6e10cb73 2000-11-20 Kazu Hirata <kazu@hxi.com>
* bfd-in.h: Fix formatting.
	* bfd-in2.h: Likewise.
	* bfd.c: Likewise.
	* bout.c: Likewise.
2000-11-21 02:24:32 +00:00
Kazu Hirata beb0d161cd 2000-11-20 Kazu Hirata <kazu@hxi.com>
* aix386-core.c: Fix formatting.
	* aout-adobe.c: Likewise.
	* aout-arm.c: Likewise.
	* aout-encap.c: Likewise.
	* aout-ns32k.c: Likewise.
	* aout-target.h: Likewise.
	* aout-tic30.c: Likewise.
	* aoutf1.h: Likewise.
	* aoutx.h: Likewise.
	* archive.c: Likewise.
2000-11-20 19:05:12 +00:00
Jim Wilson 2c2475db4a Fix DT_INIT ABI violation, it is an offset not a function pointer.
* elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
	pltoff entries for DT_INIT and DT_FINI.
	(elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
	(elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
	entries.
2000-11-18 00:41:35 +00:00
Richard Henderson 18b27f179e * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
(allocate_dynrel_entries): Likewise.
        (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
        (set_pltoff_entry): Likewise.
        (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
        (elfNN_ia64_reloc_type_lookup): Likewise.
        (elfNN_ia64_install_value): Likewise.
        (elfNN_ia64_relocate_section): Likewise.
        * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
        (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
2000-11-16 22:44:07 +00:00
Kazu Hirata 71f6b58639 2000-11-16 Kazu Hirata <kazu@hxi.com>
* cpu-a29k.c: Fix formatting.
	* cpu-alpha.c: Likewise.
	* cpu-arm.c: Likewise.
	* cpu-avr.c: Likewise.
	* cpu-d10v.c: Likewise.
	* cpu-h8500.c: Likewise.
	* cpu-hppa.c: Likewise.
	* cpu-i370.c: Likewise.
	* cpu-i386.c: Likewise.
	* cpu-i960.c: Likewise.
	* cpu-ia64-opc.c: Likewise.
	* cpu-ia64.c: Likewise.
	* cpu-m32r.c: Likewise.
	* cpu-m68hc11.c: Likewise.
	* cpu-m68hc12.c: Likewise.
	* cpu-m68k.c: Likewise.
	* cpu-m88k.c: Likewise.
	* cpu-mips.c: Likewise.
	* cpu-ns32k.c: Likewise.
	* cpu-pj.c: Likewise.
	* cpu-powerpc.c: Likewise.
	* cpu-sh.c: Likewise.
	* cpu-sparc.c: Likewise.
	* cpu-tic54x.c: Likewise.
	* cpu-v850.c: Likewise.
	* cpu-vax.c: Likewise.
	* cpu-w65.c: Likewise.
	* cpu-we32k.c: Likewise.
	* cpu-z8k.c: Likewise.
2000-11-16 20:48:09 +00:00
Kazu Hirata 98591c73cf 2000-11-16 Kazu Hirata <kazu@hxi.com>
* dwarf1.c: Fix formatting.
	* dwarf2.c: Likewise.
2000-11-16 19:29:48 +00:00
Kazu Hirata cbfe05c4c6 2000-11-15 Kazu Hirata <kazu@hxi.com>
* coff-rs6000.c: Fix formatting.
	* coff-sh.c: Likewise.
	* coff-sparc.c: Likewise.
	* coff-tic30.c: Likewise.
	* coff-tic54x.c: Likewise.
	* coff-tic80.c: Likewise.
	* coff-w65.c: Likewise.
	* coff-we32k.c: Likewise.
	* coff-z8k.c: Likewise.
2000-11-16 00:54:12 +00:00
Kazu Hirata c5930ee6b4 2000-11-15 Kazu Hirata <kazu@hxi.com>
* coff-arm.c: Fix formatting.
	* coff-ppc.c: Likewise.
	* coff-rs6000.c: Likewise.
2000-11-15 20:20:52 +00:00
Richard Henderson dac544a817 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
section with the same ALLOC|LOAD flags as the source section.
2000-11-15 19:22:28 +00:00
Nick Clifton 4a8e467a7a ops - omited from previous delta
Add GFPL to bfd.texinfo
2000-11-15 18:24:49 +00:00
Jakub Jelinek c810873da1 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
by STO_ALPHA constants.

	* config/tc-alpha.c (s_alpha_prologue): Preserve visibility bits.
2000-11-14 20:46:25 +00:00
Kazu Hirata 43646c9de2 2000-11-14 Kazu Hirata <kazu@hxi.com>
* coff-pmac.c: Fix formatting.
	* coff-ppc.c: Likewise.
2000-11-14 19:23:49 +00:00
H.J. Lu 051b857701 2000-11-08 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_add_object_symbols): Also add indirect
	symbols for common symbols with the default version.
2000-11-13 22:49:54 +00:00
Phil Blundell 90460d9725 2000-11-09 Philip Blundell <pb@futuretv.com>
* section.c (STD_SECTION): Set gc_mark flag.
2000-11-13 10:01:13 +00:00
Kazu Hirata b48499ecc0 2000-11-11 Kazu Hirata <kazu@hxi.com>
* coff-i960.c: Likewise.
	* coff-m68k.c: Likewise.
	* coff-m88k.c: Likewise.
	* coff-mcore.c: Likewise.
	* coff-mips.c: Likewise.
2000-11-11 19:03:23 +00:00
Alexandre Oliva c5aeb40fc6 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs. 2000-11-11 06:43:42 +00:00
Kazu Hirata 5fcfd273c3 2000-11-10 Kazu Hirata <kazu@hxi.com>
* coff-h8300.c: Fix formatting.
	* coff-h8500.c: Likewise.
	* coff-i386.c: Likewise.
	* coff-i860.c: Likewise.
	* coff-i960.c: Likewise.
	* coff-ia64.c: Likewise.
2000-11-10 20:55:44 +00:00
Kazu Hirata 047066e166 2000-11-09 Kazu Hirata <kazu@hxi.com>
* archive.c: Fix formatting.
	* archures.c: Likewise.
2000-11-10 04:28:20 +00:00
Kazu Hirata 346ceb11ed 2000-11-08 Kazu Hirata <kazu@hxi.com>
* coff-a29k.c: Fix formatting.
	* coff-alpha.c: Likewise.
	* coff-apollo.c: Likewise.
	* coff-aux.c: Likewise.
2000-11-09 01:37:44 +00:00
Kazu Hirata 8546af7422 2000-11-08 Kazu Hirata <kazu@hxi.com>
* bfd-in.h: Fix formatting.
	* bfd-in2.h: Likewise.
2000-11-08 23:57:04 +00:00
Richard Henderson 9a951beb03 * elf64-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
        * section.c (bfd_set_section_contents): Call memcpy if
        section->contents set and location not equal to contents plus offset.
2000-11-08 07:54:31 +00:00
Kazu Hirata aebad5fe2c 2000-11-08 Kazu Hirata <kazu@hxi.com>
* bfd.c: Fix formatting.
	* binary.c: Likewise.
	* bout.c: Likewise.
2000-11-08 06:38:10 +00:00
Kazu Hirata 0ef5a5bdcb 2000-11-07 Kazu Hirata <kazu@hxi.com>
* aix386-core.c: Fix formatting.
	* aoutf1.h: Likewise.
	* aoutx.h: Likewise.
	* archures.c: Likewise.
	* armnetbsd.c: Likewise.
2000-11-07 19:11:31 +00:00
Alan Modra d562d2fbf0 Fix for H8 ld problem. 2000-11-07 05:04:04 +00:00
Jim Wilson 4efc3e0524 Fix a few minor Changlog formatting problems. 2000-11-07 01:16:25 +00:00
Jim Wilson bbe66d0820 ia64-hpux patches from Steve Ellcey.
* archures.c: (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32) Add defines
	to differentiate elf32 and elf64 on ia64.
	* bfd-in2.h: Regenerate.
	* config.bfd: Add target for "ia64*-*-hpux*".
	* configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
	* configure: Regenerate.
	* cpu-ia64.c (bfd_ia64_elf32_arch) Add elf32 arch info structure.
	* targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
	* Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
	from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
	* Makefile.in: Regnerate.
	* elf64-ia64.c: Deleted
	* elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
2000-11-07 00:43:26 +00:00
Kazu Hirata c4dfa77f43 2000-11-06 Kazu Hirata <kazu@hxi.com>
* aout-adobe.c: Fix formatting.
	* aout-arm.c: Likewise.
	* aout-cris.c: Likewise.
	* aout-encap.c: Likewise.
	* aout-ns32k.c: Likewise.
	* aout-target.h: Likewise.
	* aout-tic30.c: Likewise.
2000-11-06 22:56:13 +00:00
Phil Blundell cf919dfdd7 2000-11-05 Philip Blundell <philb@gnu.org>
* elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
	BFDs containing no sections to be merged, regardless of their flags.

2000-11-04  Philip Blundell  <philb@gnu.org>

	* elf32-arm.h (elf32_arm_relocate_section): Suppress error message
	if a relocation for an undefined symbol also results in an
	overflow.
2000-11-06 19:38:10 +00:00
Christopher Faylor 8848a8d0a4 * config.bfd: Add support for Sun Chorus. 2000-11-06 18:47:14 +00:00
David O'Brien 46d59bfa43 2000-11-05 David O'Brien <obrien@FreeBSD.org>
* configure.in: Recognize alpha-*-freebsd*.
* configure: Regenerate.

I had this in my local tree for along time and had gotten approval for this
on Mon, 22 May 2000 15:45:01 -0700 but somehow managed to never commit it.

Approved by:  Nick Clifton <nickc@cygnus.com>
              Message-Id: <200005222245.PAA14600@elmo.cygnus.com>
2000-11-05 23:31:45 +00:00
Nick Clifton 420496c13a Add --srec-len and --srec-forceS3 switches to objcopy 2000-11-03 01:47:13 +00:00
Nick Clifton 59ff2774bb Add support for *-storm-chaos target 2000-11-02 23:03:24 +00:00
Phil Blundell ee43f35ef7 2000-10-31 Philip Blundell <philb@gnu.org>
* elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
	EF_SOFT_FLOAT if it is defined.
2000-11-01 07:20:04 +00:00
Phil Blundell 1006ba1936 2000-10-27 Philip Blundell <philb@gnu.org>
* elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
	attempts to mix PIC code with non-PIC, just mark the output as
	being position dependent.
	(elf32_arm_merge_private_bfd_data): Likewise.  Print an error
	message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
	all mismatches, not just the first one.
2000-10-27 22:24:52 +00:00
Nick Clifton c4920b9772 Plug one of many possible memory leaks in error handling. 2000-10-25 21:53:44 +00:00
Jakub Jelinek 19f7b01094 gas/
* config/tc-sparc.c (sparc_ip): Fix a bug which caused v9_arg_p
	instructions to loose any special insn->architecture mask.

	* config/tc-sparc.c (v9a_asr_table): Add v9b ASRs.
	(sparc_md_end, sparc_arch_types, sparc_arch,
	sparc_elf_final_processing): Handle v8plusb and v9b architectures.
	(sparc_ip): Handle siam mode operands. Support v9b ASRs (and
	request v9b architecture if they are used).

bfd/
	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
	elf32_sparc_object_p, elf32_sparc_final_write_processing):
	Support v8plusb.
	* elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
	sparc64_elf_object_p): Support v9b.
	* archures.c: Declare v8plusb and v9b machines.
	* bfd-in2.h: Ditto.
	* cpu-sparc.c: Ditto.

include/opcode/
	* sparc.h (enum sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_V9B.
	Note that '3' is used for siam operand.

opcodes/
	* sparc-dis.c (v9a_asr_reg_names): Add v9b ASRs.
	(compute_arch_mask): Add v8plusb and v9b machines.
	(print_insn_sparc): siam mode decoding, accept ASRs up to 25.
	* opcodes/sparc-opc.c: Support for Cheetah instruction set.
	(prefetch_table): Add #invalidate.
2000-10-20 10:38:47 +00:00
Geoffrey Keating ea5fbc6753 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
of a GOT reloc.
2000-10-16 20:49:53 +00:00
Geoffrey Keating e1e0340bc8 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
(SYMBOL_CALLS_LOCAL): New macro.
	(ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
	(ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
	(ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
	(ppc_elf_relocate_section): Use flag variable to determine
	whether the relocation refers to a local symbol.
	Test whether a PLTREL24 reloc will produce a reloc by looking
	to see whether a PLT entry was made.
2000-10-16 19:52:26 +00:00
Geoffrey Keating a4b120e1db * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
entries that could serve as a definition for a weak symbol.
2000-10-14 23:30:12 +00:00
Ulf Carlsson 5af5b85bc3 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
From  Ralf Baechle  <ralf@gnu.org>

	* elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
	local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
	against local symbols.
	(_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
2000-10-14 04:05:23 +00:00
Alan Modra 24376d1b58 Another try at correcting relocations against discarded
link-once section symbols.
2000-10-12 03:44:51 +00:00
Alan Modra 3ef20aaa54 Include alloca-conf.h 2000-10-12 01:28:06 +00:00
Alan Modra d01e2a23a3 Revert 2000-10-07 link-once section symbol changes. 2000-10-11 07:05:02 +00:00
Alan Modra c0e219ccea Fix my last change to actually compile. 2000-10-10 23:38:27 +00:00
Alan Modra fe268b663f (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc. 2000-10-10 15:50:35 +00:00
Alan Modra 4d7ce4dd48 * section.c (bfd_make_section_anyway): Release newsect ptr when
newsect->symbol fails to alloc.  Use bfd_release instead of free.
2000-10-10 15:23:38 +00:00
Richard Henderson f3b6f7c34d * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
(elf64_ia64_unwind_entry_compare): New.
        (elf64_ia64_final_link): Sort the .IA_64.unwind section.
2000-10-09 23:16:30 +00:00
Alan Modra fc8c40a057 Cure a number of segfaults caused by /DISCARD/ of dynamic sections. 2000-10-07 13:40:33 +00:00
Alan Modra 44852b190c Make elf section symbols global for link-once sections. 2000-10-07 12:52:15 +00:00
DJ Delorie 3e4554a206 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
* coffcode.h (coff_set_alignment_hook): read extended reloc count
(coff_write_relocs): write extended reloc count
(coff_write_object_contents): account for extended relocs
2000-10-06 19:47:51 +00:00
Jim Wilson fa152c4930 Preserve machine dependent section header flags when reading ELF object file.
* elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
	field.
	* elf.c (_bfd_elf_make_section_from_shdr): Call the
	elf_backend_section_flags function.
	* elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
	code.
	(elf64_ia64_section_flags): New function containing flag conversion
	code.
	(elf_backend_section_flags): Define to elf64_ia64_section_flags.
	* elfxx-target.h (elf_backend_section_flags): Define.
	(elfNN_bed): Initialize elf_backend_section_flags field.
2000-10-05 22:22:27 +00:00
Alan Modra 36605136d4 Correct call to _bfd_elf32_gc_record_vtable. 2000-10-02 09:09:27 +00:00
Ulf Carlsson 4b6609a057 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
From  Ralf Baechle  <ralf@gnu.org>

	* elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
	produces binaries with got[1] = 0x80000001 to differenciate them
	for the dynamic linker from the broken binaries produced by old
	versions.
2000-10-02 06:04:16 +00:00
Alexandre Oliva d64552c589 * ltconfig, ltmain.sh, libtool.m4: Updated from libtool
multi-language branch, to work around Solaris' /bin/sh bug.  Rebuilt
all affected `configure' scripts.
2000-09-30 06:07:00 +00:00
Alan Modra f572a39d15 Support for Unixware 7.1.x pxstatus_t and lwpxstatus_t. 2000-09-30 00:44:49 +00:00
Hans-Peter Nilsson 4da816844a Define two bfd_targets for absence and presence of leading
underscore on symbols.  Make sure to only link same kind.
	* elf32-cris.c (cris_elf_object_p,
	cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
	cris_elf_merge_private_bfd_data): New.
	(elf_backend_object_p, elf_backend_final_write_processing,
	bfd_elf32_bfd_print_private_bfd_data,
	bfd_elf32_bfd_merge_private_bfd_data): Define.
	<Target vector definition>: Include elf32-target.h twice with
	different macro settings:
	(TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
	bfd_elf32_us_cris_vec.
	(TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
	(elf_symbol_leading_char): First as 0, then '_'.
	(INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
	* config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
	* configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
	* configure: Regenerate.
	* targets.c: Declare bfd_elf32_us_cris_vec.
	* po/bfd.pot: Regenerate.
2000-09-29 17:05:22 +00:00
Alan Modra 9a5aca8c9c (arm_add_to_rel): Fix R_ARM_THM_PC22 relocations. 2000-09-29 13:51:49 +00:00
Alan Modra 512a2384fe * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath. 2000-09-29 13:15:03 +00:00
Alan Modra ef6acf5b5f That'll teach me not to type little patches in by hand. Get
the parentheses right.
2000-09-29 07:14:05 +00:00
Alan Modra 6c99a5c30b (elf_fake_sections): Do not mark the section SHT_NOBITS if
is has the SEC_HAS_CONTENTS flag set.
2000-09-29 07:01:18 +00:00
Hans-Peter Nilsson b16885a132 * aout-cris.c (N_TXTADDR): Define. 2000-09-28 21:58:16 +00:00
Alan Modra 6204760d74 * som.c: Include alloca-conf.h 2000-09-28 08:08:16 +00:00
Alan Modra 47d89dba5e .plt stub for lazy linking, --stub-group-size=N ld switch,
import stub fix, extra DIR14F reloc to fix abort in tc_gen_reloc
2000-09-27 17:30:19 +00:00
Hans-Peter Nilsson a17cc40f09 * elfcode.h (elf_object_p): Preserve and clear abfd section
information.  Restore at error.
2000-09-27 07:52:24 +00:00
DJ Delorie 3028b4c011 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
is empty, make sure that its rva also 0. NT loader dislikes
having otherwise.
2000-09-26 20:42:29 +00:00
Alan Modra 409141842e Make weak symbols SS_UNIVERSAL (ie. global) 2000-09-26 01:45:26 +00:00
Alan Modra 1badb539a7 Correct comments. Don't check non-code output sections for stub
grouping.  (In the process, partly revert and fix bugs introduced
with the last change.  Oops.)
2000-09-21 13:40:00 +00:00
Alan Modra a017a7241d Fix a segfault caused by under-allocating an array. 2000-09-21 10:13:18 +00:00
Alan Modra b3ea35849f Handle out of memory situations. 2000-09-20 04:20:26 +00:00
Nick Clifton 6091b433d7 Change the PLT entry 0 instruction sequence to actually work. 2000-09-19 23:21:36 +00:00
Alexandre Oliva 8a3975e63b * elf32-sh.c (sh_elf_relocate_section): Use
_bfd_final_link_relocate to apply the relocation against a section
symbol, when doing relocatable links.
2000-09-18 16:19:15 +00:00
Alan Modra 25f7275229 Group stub sections. 2000-09-18 12:22:43 +00:00
Alexandre Oliva 4bb5e078a2 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
ld/emulparams/shelf.sh.
2000-09-16 23:09:35 +00:00