Commit Graph

1528 Commits

Author SHA1 Message Date
Jeff Law ef07871c96 * som.c (som_bfd_print_private_bfd_data): Define to use the
generic version.
1995-09-03 17:33:44 +00:00
Steve Chamberlain 1613e0758e Split. 1995-09-02 00:24:04 +00:00
Ian Lance Taylor a21227ef2c * Makefile.in (OFILES): Remove $(TDEPFILES).
* config/apollo.mt (TDEPFILES): Remove.
	* config/README: Update.
1995-09-01 22:32:19 +00:00
Ian Lance Taylor a52a3ce8e0 * configure.in: For a native configuration, set COREFILE and
COREFLAG based on the canonical host name.
	* configure: Rebuild.
	* Makefile.in: Rebuild dependencies.
	(ALL_CFLAGS): Add @COREFLAG@.
	(OFILES): Replace $(HDEPFILES) with @COREFILE@.
	* coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
	support routines.  Check LYNX_CORE rather than HOST_LYNX.
	* lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
	* i386lynx.c: Likewise.
	* m68klynx.c: Likewise.
	* sparclynx.c: Likewise.
	* rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
	* *-core.c: Comment changes.
	* config/decstation.mh (HDEPFILES): Remove.
	(HDEFINES): Remove -DTRAD_CORE.
	* config/irix3.mh (RANLIB): Remove.
	* config/irix4.mh (HDEPFILES, RANLIB): Remove.
	(HDEFINES): Remove -DIRIX_CORE.
	* config/riscos.mh (RANLIB, HDEPFILES): Remove.
	(HDEFINES): Remove -DTRAD_CORE.
	* config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
	* config/ultra3.mh (RANLIB): Remove.
	* config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
	* config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
	* config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
	* config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
	* config/hppahpux.mh, config/hppaosf.mh: Remove.
	* config/i386aix.mh, config/i386bsd.mh: Remove.
	* config/i386linux.mh, config/i386mach3.mh: Remove.
	* config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
	* config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
	* config/mipsmach3.mh, config/news-mips.mh: Remove.
	* config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
	* config/rs600.mh, config/rs6000lynx.mh: Remove.
	* config/solaris2.mh, config/stratus.mh: Remove.
	* config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
	* config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
1995-09-01 22:23:04 +00:00
Ian Lance Taylor d6f672b881 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
* elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
	DT_FINI entry if the appropriate symbol is not in the hash table.

	* libelf.h (struct elf_backend_data): Add create_program_headers
	and want_hdr_in_seg fields.
	* elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
	defined.
	(elf_backend_create_program_headers): Likewise.
	(elfNN_bed): Initialize create_program_headers and
	want_hdr_in_seg.
	* elf.c (get_program_header_size): Call create_program_headers
	backend routine.
	(map_program_segments): Check want_hdr_in_seg backend field.  Call
	create_program_headers backend routine.

	* elf.c (assign_file_positions_except_relocs): Align non allocated
	sections when creating an executable.

	* elfcode.h (elf_swap_phdr_in): Make non static.
	(elf_swap_phdr_out): Make non static.
	* libelf.h (bfd_elf32_swap_phdr_in): Declare.
	(bfd_elf32_swap_phdr_out): Declare.
	(bfd_elf64_swap_phdr_in): Declare.
	(bfd_elf64_swap_phdr_out): Declare.
1995-09-01 19:29:43 +00:00
Ian Lance Taylor 0cb705689d * elflink.h (elf_link_add_object_symbols): Handle indirect and
warning symbols.  If any section is named .gnu.warning.XXX, treat
	the contents as a warning to be issued if the symbol XXX is
	referenced.
	(elf_link_output_extsym): For an indirect or warning symbol, just
	output the symbol it points to.
1995-09-01 18:08:28 +00:00
Jackie Smith Cashion f14db88017 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
* config.bfd: Add mips*vr4300-*-elf* target.
        * config/mipsbvr4300.mt: Added.
1995-09-01 15:15:57 +00:00
Steve Chamberlain 4e98461f60 Thu Aug 31 16:00:53 1995 steve chamberlain <sac@slash.cygnus.com>
* Makefile.in: Update dependencies.
	* aout-target.h (MY_bfd_print_private_bfd_data): New.
	* bfd-in.h (PE STUFF): Deleted.
	* bfd.c (tdata->pe_obj_data): New.
	(bfd_print_private_bfd_data): New.
	* coff-i386.c, coff-arm.c (coff_*-rtype_to_howto): Get image base from
	new place.
	* libcoff.h, libbfd.h, bfd-in2.h: Rebuilt.
	* coffcode.h (pe_value): Delete
	(coff_mkobject, coff_mkobject_hook): Conditionally build.
	(coff_compute_section_file_positions): Look in new place.
	(add_data_entry, fill_pe_header_info): Deleted.
	(coff_write_object_contents): Remove PE stuff.
	(coff_bfd_print_private_bfd_data): New.
	* coffswap.h: Remove PE stuff.
	* elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): New.
	* libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): New.
	* libcoff-in.h (pe_data_type): New.
	* libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): New.
	* targets.c (_bfd_print_private_bfd_data): New.
	* peicode.h: New file.
1995-08-31 23:33:37 +00:00
Ian Lance Taylor 815179af80 * bfd-in.h: Add extern "C" if __cplusplus.
* bfd-in2.h: Rebuild.
PR 7882.
1995-08-31 16:23:02 +00:00
Ian Lance Taylor 61228e36e8 * coff-mips.c (mips_relocate_section): Don't convert a reloc
against an absolute symbol into a reloc against a section.
PR 7880.
1995-08-31 15:54:27 +00:00
Steve Chamberlain da7afe3b8a Thu Aug 31 08:00:14 1995 steve chamberlain <sac@slash.cygnus.com>
* coff-arm.c (coff_arm_reloc): Fix common size problem.
	(i3coff_object_p): Delete.

Wed Aug 30 20:41:27 1995  steve chamberlain  <sac@slash.cygnus.com>

	* coff-arm.c (deletemeacoff_arm_reloc): Deleted.
	(arm26): Not partial inplace.
	* coffcode.h (coff_compute_section_file_positions): Don't
	do page aligning if COFF_PAGE_SIZE isn't defined.
	* coffswap.h (coff_swap_scnhdr_in): Update image base correctly.
1995-08-31 15:05:27 +00:00
Steve Chamberlain c7f6ebe2c3 * coffswap.h (coff_swap_scnhdr_in): Don't always add IMAGE_BASE.
Swap in PE header.
	* coffcode.h (coff_write_object_contents): Remove #if0ed code
	Only remove empty sections in PE inmage files.
1995-08-29 23:26:43 +00:00
Steve Chamberlain 3332ea9c4f * coff-arm.c (coff_rtype_to_howto): Deal with reloc 11.
* coffcode.h (coff_write_object_contents): Remove #if0ed code
	Only remove empty sections in PE inmage files.
1995-08-29 22:28:30 +00:00
Steve Chamberlain 3ea928f5a9 Tue Aug 29 13:50:21 1995 steve chamberlain <sac@slash.cygnus.com>
* libbfd.h, bfd-in2.h: regenerated.
	* coff-arm.c (aoutarm_std_relo): New entry at 11.
	(arm_reloc_type_lookup) : Understand type 11.
	* coff-i386.c (howto_table): fix name of rva type.
	(coff-i386_rtype_to_howto): Understand R_IMAGEBASE type.
	* coffcode.h (sec_to_styp_flags): .edata is data.
	(coff_compute_section_file_positions): Get page size right for PE.
	(fill_pe_header_info): Fix fields.
	(coff_write_object_contents): Remove end_of_image calc.
	(_bfd_coff_generate_reloc_section): Remove orphaned comment.
	* coffswap.h (coff_swap_scnhdr_in): Don't always add IMAGE_BASE.
	(coff_swap_scnhdr_out): Setup PE flags correctly.
	* reloc.c (BFD_RELOC_RVA): New field.
1995-08-29 21:05:59 +00:00
Ian Lance Taylor a48752a0a3 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Add parentheses to FIX
expression to avoid compiler bug on HP-UX 9.01.
1995-08-23 23:50:35 +00:00
Steve Chamberlain 2abfcdf3f5 * coffcode.h (pe_value): Unansify. 1995-08-23 16:51:07 +00:00
Steve Chamberlain 9162a94eff (coff_write_object_contents): Initialze link_data if not set. 1995-08-22 06:54:07 +00:00
Steve Chamberlain 7494201cbf * libcoff-in.h (coff_data_type.link_info): New field. 1995-08-22 01:21:52 +00:00
Steve Chamberlain e9614321da Mon Aug 21 17:49:28 1995 steve chamberlain <sac@slash.cygnus.com>
* bfd-in.h (bfd_link_subsystem): Turn enum into #defines.
	(bfd_link_pe_info_dval): New
	(bfd_link_stack_heap): Renamed and massaged into bfd_link_pe_info.
	* bfd-in2.h: rebuilt.
	* bfd.c (NT_subsystem, NT_stack_heap): Deleted.
	* coffcode.h (pe_value): New function.
	(fill_pe_header_info): New function.
	(coff_write_object_contents): Use new function.
	* cofflink.c (coff_final_link_info): Remove pe randomness.
	(dores_com): Update info in bfd_link_pe_info_dval.
	(process_embedded_commands): Use the bfd_link_pe_info_dval.
	(_bfd_coff_final_link): Remove PE stuff, initialize
	coff_data->link_info.
	* coffswap.h (coff_swap_[aout|filehdr]_out): Use indirect PE pointer.
	(coff_swap_scnhdr_out): Use real imagebase.
	* libcoff (coff_data_type.link_info): New field.
1995-08-22 01:02:23 +00:00
Ian Lance Taylor 68807a39e4 * linker.c (link_action): If an undefined reference follows an
undefined weak reference, change the type to undefined.
	* elflink.h (elf_link_add_archive_symbols): Don't record an
	undefined weak reference as defined, in case it turns into a real
	undefined reference later in the same archive.
1995-08-21 15:12:34 +00:00
Ken Raeburn ff31ebda50 * coff-sh.c (sh_relax_section): Cast value for used_by_bfd field to PTR, not
coff_section_tdata pointer, since PTR is the real type of the field.
* cofflink.c (_bfd_coff_read_internal_relocs): Ditto.
1995-08-17 21:00:14 +00:00
Ian Lance Taylor 92962c7188 Add support for linking SPARC SunOS PIC compiled code.
* sunos.c (SPARC_PLT_PIC_WORD0): Define.
	(SPARC_PLT_PIC_WORD1, SPARC_PLT_PIC_WORD2): Define.
	(struct sunos_link_hash_entry): Add got_offset and plt_offset
	fields.
	(struct sunos_link_hash_table): Add dynamic_sections_created and
	dynamic_sections_needed fields.
	(sunos_link_hash_newfunc): Initialize new fields.
	(sunos_link_hash_table_create): Initialize new fields.
	(sunos_create_dynamic_sections): New static function, broken out
	of sunos_add_dynamic_symbols.
	(sunos_add_dynamic_symbols): Call sunos_create_dynamic_sections.
	(sunos_add_one_symbol): Call sunos_create_dynamic_sections.
	(bfd_sunos_size_dynamic_sections): Call sunos_scan_relocs before
	checking whether we need to set up the dynamic link information.
	Define __GLOBAL_OFFSET_TABLE if anything referred to it.
	(sunos_scan_std_relocs): Call sunos_create_dynamic_sections.  Use
	plt_offset field; only put symbol in .plt if it is not defined by
	a regular object.
	(sunos_scan_ext_relocs): Likewise.  Handle base relative relocs.
	(sunos_scan_dynamic_symbol): Store dynobj in local variable.
	(sunos_write_dynamic_symbol): Check plt_offset rather than
	checking whether symbol is in .plt section.  If symbol is defined
	in a regular object file, use SPARC_PLT_PIC_WORD[012], and don't
	add a JMP_TBL reloc.
	(sunos_check_dynamic_reloc): Add contents and relocationp fields.
	If plt_offset is set, redirect relocation to PLT.  If this is a
	base relative reloc, redirect relocation to GOT.  Check
	dynamic_sections_needed field rather than whether dynobj is set.
	(sunos_finish_dynamic_link): Check dynamic_sections_needed field
	rather than whether dynobj is set.  Don't die if .need and .rules
	sections were not created.
	* aoutx.h (howto_table_ext): Mark PC10, PC22, and JMP_TBL entries
	PC relative.  Mark PC10 complain_overflow_dont.  Mark PC22 and
	JMP_TBL complain_overflow_signed.
	(NAME(aout,final_link)): If info->shared is set, set DYNAMIC.
	(aout_link_input_section_std): Call check_dynamic_reloc for all
	relocs.  Pass contents and &relocation.  Don't warn about an
	undefined symbol until check_dynamic_reloc has been called.  Don't
	warn about an undefined symbol for a base relative reloc.
	(aout_link_input_section_ext): Likewise.  For a base relative
	reloc, always treat r_index as an index into the symbol table.
	* libaout.h (struct aout_backend_data): Add contents and
	relocation argument to check_dynamic_reloc entry point.
	(struct aoutdata): Add local_got_offsets field.
1995-08-17 19:30:46 +00:00
Ian Lance Taylor 708fd841b6 * aoutx.h (NAME(aout,machine_type)): Handle a machine of
bfd_mach_sparc or bfd_mach_sparc64.
1995-08-14 16:43:17 +00:00
Ian Lance Taylor 452a5efbaf * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
definition, add it to the dynamic symbol table if any dynamic
	object mentions it.  If we do add it, make sure we add the
	corresponding real symbol.
	(elf_adjust_dynamic_symbol): Adjust a weak defined symbol which we
	put in the dynamic symbol table, even if no regular object refers
	to it.
	* elf32-i386.c (elf_i386_check_relocs): When creating a shared
	library, don't allocate space for a PC relative reloc against a
	local symbol.
	* elf32-m68k.c (elf_m68k_check_relocs): Likewise.
	* elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Change assertion
	to accept symbol with weakdef set.
	* elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
	* elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): When creating a shared
	libary, don't copy over a PC relative reloc against a local
	symbol.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
PR 7711.
1995-08-14 15:57:17 +00:00
Jeff Law e289647bf8 * som.h (R_HPPA_BEGIN_BRTAB): Define.
(R_HPPA_END_BRTAB): Likewise.
	* som.c (som_write_fixups): Handle R_BEGIN_BRTAB and R_END_BRTAB.

More PA optimization infrastructure.
1995-08-13 06:43:23 +00:00
Ian Lance Taylor baaffcefe2 * coffswap.h (coff_swap_aux_in): Swap the array dimensions
whenever x_fcnary is not being used for something else, rather
	than only for an array.
	(coff_swap_aux_out): Likewise.
PR 7373.
1995-08-10 19:58:56 +00:00
Steve Chamberlain b84d6efbcc Tue Aug 8 16:34:57 1995 steve chamberlain <sac@slash.cygnus.com>
* cofflink.c (_bfd_coff_generic_relocate_section): Remove most
	of special case stuff for PE.  Now handled by relocs.
	* coff-i386.c (coff_i386_reloc): Special case of PE type 7s.
	(howto_table): Type 7 is dir32-rva.
1995-08-08 23:54:27 +00:00
Jeff Law 0a552864e8 * configure.host: Recognize aix4 explicitly.
* rs6000-core.c (CORE_DATA_SIZE_FIELD): New macro to get a the size
        of a core dump's data section.  Provide alternate definition for aix4.
        (SAVE_FIELD): Similarly for save state field (register info).
        (STACK_END_ADDR): Provide definition suitable for aix4.
        * config/{aix4.mh,aix4.mt}: New configuration files.
        * hosts/aix4.h: Likewise.

Mike's aix4 changes, slightly modified.
1995-08-08 17:31:52 +00:00
Ian Lance Taylor f918d3ccc7 * som.c (som_bfd_copy_private_symbol_data): Cast initializations
to avoid warnings.
1995-08-08 03:05:16 +00:00
Jeff Law 515b81046b * som.c (som_decode_symclass): Handle absolute symbols by checking
the SOM type (since they will rarely if ever be in the absolute
	section).

Something Ian noticed.
1995-08-07 20:53:29 +00:00
Jeff Law 08683c8ae7 * som (som_get_reloc_upper_bound): Return -1 on error. Compute
return value with sizeof (arelent *), not sizeof (arelent).

Net bug and something I noticed while fixing it.
1995-08-05 06:07:33 +00:00
Ian Lance Taylor 981f444144 * ecofflink.c (_bfd_ecoff_locate_line): When handling stabs:
correct setting of sym_ptr_end to consider symbols skipped when
	setting sym_ptr; don't leave loop early unless an N_FUN is found
	with a larger value.
1995-07-24 21:42:41 +00:00
Ian Lance Taylor d06004cb3a * cofflink.c (coff_link_add_object_symbols): Call
_bfd_coff_get_external_symbols, not coff_link_get_symbols.  Call
	_bfd_coff_free_symbols, not coff_link_free_symbols.  Call
	_bfd_coff_read_string_table, not coff_read_string_table.
	(coff_link_check_archive_element): Likewise.
	(coff_link_input_bfd): Likewise.
	(coff_link_get_symbols): Move to coffgen.c.
	(coff_read_string_table): Likewise.
	(coff_link_free_symbols): Likewise.
	(_bfd_coff_internal_syment_name): New static function.
	(coff_link_check_ar_symbols): Use _bfd_coff_internal_syment_name.
	(coff_link_add_symbols): Likewise.
	(coff_link_input_bfd): Likewise.
	(_bfd_coff_generic_relocate_section): Likewise.
	(_bfd_coff_read_internal_relocs): New function.
	(coff_link_input_bfd): Use cached section contents if available.
	Use _bfd_coff_read_internal_relocs.
	* coffcode.h (coff_slurp_symbol_table): Don't call bfd_seek.
	(coff_bfd_get_relocated_section_contents): Only define if not
	already defined.
	(coff_bfd_relax_section): Likewise.
	* coffgen.c (build_string_table): Remove.
	(_bfd_coff_get_external_symbols): New function, moved in from old
	coff_link_get_symbols in cofflink.c.
	(_bfd_coff_read_string_table): New function, moved in from old
	coff_read_string_table in cofflink.c.
	(_bfd_coff_free_symbols): New function, moved in frmo old
	coff_link_free_symbols in cofflink.c.
	(coff_get_normalized_symtab): Use _bfd_coff_get_external_symbols
	rather than reading the symbols directly.  To free them, call
	_bfd_coff_free_symbols.  Use _bfd_coff_read_string_table rather
	than build_string_table.
	* libcoff-in.h (obj_coff_keep_syms): Define.
	(obj_coff_keep_strings): Define.
	(coff_data_type): Add fields keep_syms and keep_strings.
	(coff_section_tdata): Define new structure.
	(coff_section_data): Define.
	(_bfd_coff_get_external_symbols): Declare.
	(_bfd_coff_read_string_table): Declare.
	(_bfd_coff_free_symbols): Declare.
	(_bfd_coff_read_internal_relocs): Declare.
	* libcoff.h: Rebuild.
1995-07-24 19:23:53 +00:00
Jeff Law 297faf8cff * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new (ignored)
argument.
        * elf32-hppa.h: Corresponding change.
1995-07-21 04:49:23 +00:00
Ken Raeburn 883e2f510d fix some compilation problems 1995-07-20 23:11:44 +00:00
Fred Fish e365a606ed * hosts/i386v4.h (getgid, getuid): Change prototypes to be
compatible with Unixware 1.x and Unixware 2.x, and probably other
	i386 svr4 versions as well.
1995-07-20 19:57:07 +00:00
Ken Raeburn dfdcff13c0 * targets.c (bfd_target_vector): Since armpe and armpei have been split into
big- and little-endian variants, list all of them, instead of the
now-nonexistant armpe[i]_vec.
1995-07-20 17:56:18 +00:00
Ian Lance Taylor b5727da67b * elf.c (bfd_section_from_phdr): Set lma based on p_paddr.
(elf_fake_sections): Set sh_addr based on lma, not vma.
PR 7478.
1995-07-20 04:10:18 +00:00
David Edelsohn d6fc77df4d * coff-arm.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Replaces TARGET_SYM.
* configure.in (armpe_vec, armpei_vec): Add bi-endian support.
	* configure: "regenerated".
	* pe-arm.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Replaces TARGET_SYM.
	(TARGET_LITTLE_NAME, TARGET_BIG_NAME): Replaces TARGET_NAME.
	* pei-arm.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Replaces TARGET_SYM.
	(TARGET_LITTLE_NAME, TARGET_BIG_NAME): Replaces TARGET_NAME.
	* targets.c (armpe_vec, armpei_vec): Deleted.
	(armpe_little_vec, armpe_big_vec, armpei_little_vec, armpei_big_vec):
	Added.
	* config/arm-pe.mt (DEFAULT_VECTOR): Default is armpe_little_vec.
	(SELECT_VECS): Add bi-endian support.
1995-07-19 23:02:21 +00:00
Ian Lance Taylor d0d491b17e * aoutx.h (KEEPIT): Change definition to udata.i.
(KEEPITTYPE): Remove.
	(NAME(aout,reloc_type_lookup)): Add cases to the
	extended reloc type switch: SPARC_GOT10, SPARC_GOT13, SPARC_GOT22,
	SPARC_PC10, SPARC_PC22, SPARC_WPLT30.
	(NAME(aout,swap_std_reloc_out)): Don't bother to use stoi when
	retrieving KEEPIT value.
	(NAME(aout,swap_ext_reloc_out)): Likewise.  Also, only add in
	output section VMA for section symbols, and check BSF_SECTION_SYM
	to control whether to set r_extern to 1.
1995-07-14 23:52:34 +00:00
Ian Lance Taylor 80b44d8a2c * syms.c: Fix comments so that `make info' works. 1995-07-14 17:23:07 +00:00
Ian Lance Taylor 175b3c0f1e * elf32-mips.c (mips_elf_find_nearest_line): Set SEC_HAS_CONTENTS
in .mdebug section, in case backend linker has cleared it.
1995-07-14 17:15:07 +00:00
Michael Meissner 0c51f21a53 Fix PPC_ADDR16_HA relocations 1995-07-14 16:01:44 +00:00
Jeff Law d4654e380e * som.c (hppa_som_gen_reloc_type): Choose a reasonable field
selector relocation for the difference of two symbols.
1995-07-14 03:15:15 +00:00
Ian Lance Taylor 3fe22b980b * aoutx.h (NAME(aout,slurp_reloc_table)): Cast argument to size_t
for malloc.
	* coff-mips.c (mips_relocate_section): Likewise, for memmove.
	(mips_relax_section): Likewise, for malloc.
	* cofflink.c (process_embedded_commands): Likewise.
	(_bfd_coff_final_link): Likewise.
	* ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
	(ecoff_final_link_debug_accumulate): Likewise.
	(ecoff_indirect_link_order): Likewise, for memcpy and malloc.
	(ecoff_reloc_link_order): Likewise, for malloc.
	* ecofflink.c (ecoff_align_debug): Likewise, for memset.
	(ecoff_write_symhdr): Likewise, for malloc.
	* elf32-hppa.c (elf32_hppa_read_symext_info): Likewise.
	* elf.c (assign_file_positions_except_relocs): Likewise, for
	qsort.
	* elf32-mips.c (mips_elf_read_ecoff_info): Likewise, for malloc.
	* elfcode.h (elf_slurp_reloc_table): Likewise.
	* elfcore.h (elf_corefile_note): Likewise.
	* elflink.h (elf_link_add_object_symbols): Likewise.
	(elf_link_read_relocs): Likewise.
	(NAME(bfd_elf,size_dynamic_sections)): Likewise, for memset.
	* i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
	* ieee.c (do_with_relocs): Likewise.
	* linker.c (default_indirect_link_order): Likewise, for malloc.
	* nlmcode.h (nlm_object_p): Likewise.
	(nlm_write_object_contents): Likewise.
	* oasys.c (oasys_set_section_contents): Likewise, for memcpy.
	* reloc.c (bfd_generic_get_relocated_section_contents): Likewise,
	for malloc.
	* section.c (bfd_get_section_contents): Likewise, for memcpy.
	* srec.c (srec_get_section_contents): Likewise.
	(srec_set_section_contents): Likewise.
	* sunos.c (bfd_sunos_size_dynamic_sections): Likewise, for
	realloc and memset.
	(sunos_scan_relocs): Likewise, for malloc.
	(sunos_scan_dynamic_symbol): Likewise, for realloc.
	* syms.c (_bfd_generic_read_minisymbols): Likewise, for malloc.
	* versados.c (versados_get_section_contents): Likewise, for
	memcpy.
1995-07-13 18:14:45 +00:00
Ian Lance Taylor c3246d9b00 * targets.c (bfd_target): Add fields _read_minisymbols and
_minisymbol_to_symbol.
	(BFD_JUMP_TABLE_SYMBOLS): Add _read_minisymbols and
	_minisymbol_to_symbol.
	(bfd_read_minisymbols): Define.
	(bfd_minisymbol_to_symbol): Define.
	* syms.c (_bfd_generic_read_minisymbols): Define.
	(_bfd_generic_minisymbol_to_symbol): Define.
	* libbfd-in.h (_bfd_nosymbols_read_minisymbols): Define.
	(_bfd_nosymbols_minisymbol_to_symbol): Define.
	(_bfd_generic_read_minisymbols): Declare.
	(_bfd_generic_minisymbol_to_symbol): Declare.
	* bfd-in2.h: Rebuild.
	* libbfd.h: Rebuild.
	* aoutx.h (MINISYM_THRESHOLD): Define.
	(NAME(aout,read_minisymbols)): New function.
	(NAME(aout,minisymbol_to_symbol)): New function.
	* libaout.h (NAME(aout,read_minisymbols)): Declare.
	(NAME(aout,minisymbol_to_symbol)): Declare.
	* aout-target.h (MY_read_minisymbols): Define.
	(MY_minisymbol_to_symbol): Define.
	* All targets: Define read_minisymbols and minisymbol_to_symbol.
PR 5332.
1995-07-13 14:46:06 +00:00
Ken Raeburn b818a3257f fix some compilation warnings from sun cc 1995-07-12 22:00:57 +00:00
Ian Lance Taylor f55900af7f * elf.c (bfd_section_from_shdr): In case SHT_REL[A], only get the
BFD section for the sh_link section if it is a SYMTAB section.
PR 7392.
1995-07-12 01:23:10 +00:00
Ian Lance Taylor 6c481b58a6 * aoutx.h (NAME(aout,link_add_symbols)): Don't bother to check
that archives hold a.out objects.
	* cf-i386lynx.c (coff_bfd_link_add_symbols): Don't define.
	(lynx_link_add_symbols): Remove.
	* cf-m68klynx.c (coff_bfd_link_add_symbols): Don't define.
	(lynx_link_add_symbols): Remove.
	* elflink.h (elf_bfd_link_add_symbols): Don't bother to check that
	archives hold ELF objects.
1995-07-11 21:22:17 +00:00
Ian Lance Taylor 0e75a8d6da * archive.c (bfd_generic_archive_p): If the archive has a map, and
the target was defaulted, but the first object in the archive can
	not be matched with that target, then return a bad format error.
1995-07-11 21:12:41 +00:00