Commit Graph

1078 Commits

Author SHA1 Message Date
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