Commit graph

2231 commits

Author SHA1 Message Date
Jeff Law
c00ae065d4 * Makefile.in: Remove explicit dependencies for mn10200 and
mn10300 files.
        (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
        (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
        (dependencies): Rebuilt.
1996-10-04 17:44:55 +00:00
Ian Lance Taylor
1d871eb78f * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
during this function.
1996-10-03 23:17:36 +00:00
Ian Lance Taylor
6b5af55cea * elflink.c (_bfd_elf_create_linker_section): Only use an existing
section if the flags are compatible.
1996-10-03 22:48:20 +00:00
Ian Lance Taylor
dee9979493 * configure.in: Add havevecs, and put it in tdefaults.
* mpw-config.in: Likewise.
	* configure: Rebuild.
	* targmatch.sed: New file; a sed script to build targmatch.h from
	config.bfd.
	* config.bfd: Add #if, #endif, and comments for targmatch.h.
	* targets.c: Include "fnmatch.h".
	(struct targmatch): Define.
	(bfd_target_match): Define by including targmatch.h.
	(bfd_find_target): If the target is not found by name, search for
	it as a configuration triplet.
	* Makefile.in: Rebuild dependencies.
 	(BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
	i386dynix.o, m68k4knetbsd.o, and riscix.o.
	(BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
	hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
	(HFILES): Add targmatch.h.  Also, alphabetize and reindent.
	(CFILES): Remove i386dynix.c and hp300bsd.c.
	(targmatch.h): New target.
	(do_clean): Remove targmatch.h.

	* configure.in: Add BFD_NEED_DECLARATION(getenv).
	* acconfig.h: Add NEED_DECLARATION_GETENV.
	* configure, config.in: Rebuild.
	* sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
	* aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
1996-10-03 21:36:08 +00:00
Jeff Law
ae1b99e42d Grrr. The mn10200 and mn10300 are _not_ similar enough to easily support
with a single generic configuration.  So break them up into two different
configurations.  See the individual ChangeLogs for additional detail.
1996-10-03 16:42:22 +00:00
Jason Molenda
4c7f3fdef5 * Makefile.in (do_clean): Move config.log to do_distclean. 1996-10-03 06:37:32 +00:00
Jeff Law
efc2b06463 * cpu-mn10x00.c, elf32-mn10x00.c: New files.
* Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
        (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
        (elf32-mn10x00.o): Add dependencies.
        * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
        (bfd_mn10x00_arch): Declare.
        (bfd_archures_list): Add bfd_mn10x00_arch.
        * config.bfd: Add mn10x00-*-*.
        * configure.in: Add bfd_elf32_mn10x00_vec.
        * elf.c (prep_headers): Handle bfd_arch_mn10x00.
        * targets.c (bfd_elf32_mn10x00_vec): Declare.
        (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
        * bfd-in2.h, configure: Rebuilt.
Stubbing out Matsushita support.
1996-10-03 03:56:20 +00:00
Ian Lance Taylor
a0fe6c2dc6 * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
(N_GETMID_NET, N_GETFLAG_NET): Likewise.
	(NO_SWAP_MAGIC): Don't define.
	(SWAP_MAGIC): Define.
1996-10-02 20:41:36 +00:00
Ian Lance Taylor
bf53bd9faa Wed Oct 2 15:46:45 1996 Klaus Kaempf <kkaempf@progis.de>
openVMS/Alpha: Provide filename and case_hack flags via
	symbol table from gas.
	Add case_hack code for symbol output from vax/vms.
	* evax-alpha.c (evax_initialize): Remove filename handling,
	filename is provided via symbol table.
	(evax_get_symtab): Use local symbol count when setting up table.
	* evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
	debugging.
	(_bfd_evax_write_egsd): Skip file name symbol.
	* evax-emh.c (get_vms_time_string): Local function now.
	(_bfd_evax_write_emh): Extract source filename and case_hack flags
	from symbol table.
	* evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
	through _bfd_evax_case_hack_symbol.
	* evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
	functions.
	(_bfd_evax_basename): Removed.
	(_bfd_get_vms_time_string): Moved to evax-emh.c.
	* evax.h (evax_private_data_struct): Remove filename.
	(flag_hash_long_names, flag_show_after_trunc,
	flag_no_hash_mixed_case, vms_name_mapping): New flags for
	vms_case_hack.
1996-10-02 19:49:01 +00:00
Ian Lance Taylor
263d4a626b * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
no hash table entry for a global symbol.
1996-10-02 16:02:56 +00:00
Ian Lance Taylor
8dd53b5cc8 * cofflink.c (coff_link_add_symbols): Don't override a meaningful
symbol type with T_NULL.  Warn if symbol type changes.  Based on
	patch from Philippe De Muyter <phdm@labauto1.ulb.ac.be>.
1996-10-01 21:57:47 +00:00
Ian Lance Taylor
161ac690ee Tue Oct 1 16:14:22 1996 Joel Sherrill <joel@oarcorp.com>
* config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
1996-10-01 20:15:48 +00:00
Ian Lance Taylor
0db6249c77 * elflink.h (elf_link_add_object_symbols): Only put a symbol from
a dynamic object in the dynamic symbol table if it is referenced
	or defined by a regular object.
PR 10711.
1996-10-01 16:33:01 +00:00
David Edelsohn
80675684b7 * reloc.c: Rename m32r relocs.
* bfd-in2.h, libbfd.h: Rebuilt.
	* elf32-m32r.c: Update.
1996-09-23 16:24:46 +00:00
Ian Lance Taylor
e12ab364d2 * aoutx.h (aout_link_input_section_ext): When doing a relocateable
link, adjust the symbol index of a base relative reloc.  Don't
	change the addend of a PC relative reloc if pcrel_offset is set.
	* sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
	a relocateable link.
PR 10692.
1996-09-20 16:33:44 +00:00
Ian Lance Taylor
a5a43df165 * reloc.c (bfd_perform_relocation): Apply the relocation even if
it is zero, in case src_mask matters.
	(bfd_install_relocation): Likewise.
PR 10685.
1996-09-20 15:44:49 +00:00
Ian Lance Taylor
e425358ff1 * xcofflink.c (xcoff_link_add_symbols): Always initialize
keep_syms.
 	(_bfd_xcoff_bfd_final_link): Don't set target_index
	to an uninitialized value.
1996-09-19 15:08:58 +00:00
Ian Lance Taylor
8d784abe56 * coff-sh.c (sh_relocate_section): Check for an illegal symbol
index.
1996-09-17 20:10:59 +00:00
Ian Lance Taylor
7f21c97c44 * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
indices, rather than crashing.
	(coff_slurp_reloc_table): Likewise.  Check whether the howto field
	is NULL.
1996-09-17 18:20:06 +00:00
Ian Lance Taylor
1153e84b7b * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
reloc to 0.
	(coff_arm_adjust_symndx): New static function.
	(coff_adjust_symndx): Define.
Fix ld -r.
1996-09-16 22:31:16 +00:00
Ian Lance Taylor
9859bc3192 * srec.c (srec_scan): Accept multiple symbols on a single line.
From Pascal Martin <pmartin@alsys.com>.
1996-09-16 17:05:12 +00:00
David Edelsohn
f8b82e49d2 * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
(sunos_merge_private_bfd_data): New function.
1996-09-13 22:18:58 +00:00
Ian Lance Taylor
76d30c3f49 * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
than input BFD.
	(bfd_merge_private_bfd_data): Likewise.
	* section.c (bfd_copy_private_section_data): Likewise.
	* syms.c (bfd_copy_private_symbol_data): Likewise.
	* bfd-in2.h: Rebuild.
	* aout-target.h (MY_bfd_copy_private_section_data): Check that
	both BFD's are the right flavour.
	* ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
	* elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
	* elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
	(_bfd_mips_elf_merge_private_bfd_data): Likewise.
	* elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
	(ppc_elf_merge_private_bfd_data): Likewise.
	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
	* peicode.h (pe_bfd_copy_private_section_data): Likewise.
1996-09-13 21:01:43 +00:00
Ian Lance Taylor
0a7b87358f * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
	its sanity check.
1996-09-13 19:52:14 +00:00
David Edelsohn
6cb9c90330 * cpu-m32r.c,elf32-m32r.c: New files. 1996-09-12 18:58:36 +00:00
David Edelsohn
3ebefb0701 * reloc.c: Add m32r relocs.
* bfd-in2.h, libbfd.h: Rebuilt.
1996-09-12 18:56:14 +00:00
Ian Lance Taylor
cacfb845c8 * ieee.c (ieee_vec): Set symbol_leading_char field to '_'. 1996-09-12 15:15:06 +00:00
Ian Lance Taylor
e461da9b65 * tekhex.c (first_phase): Change type parameter from char to int.
(out): Likewise.
	(pass_over): Change func to expect int, not char.
1996-09-11 21:08:33 +00:00
Ian Lance Taylor
d7775b4355 * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
rather than SEC_LOAD when aligning the file offset for the first
	section in a segment.
Fixes the case in which . is set just before the .bss section in a
linker script.
1996-09-11 15:59:34 +00:00
Fred Fish
ea3f058549 * syms.c (coff_section_type): Make arg const.
* irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
	to make_bfd_asection().
	* elf-bfd.h (bfd_section_from_phdr): Add prototype.
	* elfcode.h (bfd_section_from_phdr): Remove prototype.
	(_bfd_elf_stringtab_init): Remove prototype.

	* netbsd-core.c (swap_abort): Add prototype.
	* aix386-core.c (swap_abort): Ditto & make static
	* hpux-core.c (swap_abort): Ditto & make static.
	* irix-core.c (swap_abort): Ditto & make static.
	* ptrace-core.c (swap_abort): Ditto & make static.
	* trad-core.c (swap_abort): Ditto & make static.
	* coffswap.h (coff_swap_reloc_in): Ditto.
	(coff_swap_reloc_out): Ditto.
	(coff_swap_filehdr_in): Ditto.
	(coff_swap_filehdr_out): Ditto.
	(coff_swap_sym_in): Ditto.
	(coff_swap_sym_out): Ditto.
	(coff_swap_aux_in): Ditto.
	(coff_swap_aux_out): Ditto.
	(coff_swap_lineno_in): Ditto.
	(coff_swap_lineno_out): Ditto.
	(coff_swap_aouthdr_in): Ditto.
	(coff_swap_aouthdr_out): Ditto.
	(coff_swap_scnhdr_in): Ditto.
	(coff_swap_scnhdr_out): Ditto.
	* ihex.c (ihex_sizeof_headers): Ditto.
	* tekhex.c (getsym): Ditto.
	(find_chunk): Ditto & make static.
	(insert_byte): Ditto.
	(first_phase): Ditto.
	(pass_over): Ditto.
	(tekhex_get_symtab): Ditto & make static.
	(tekhex_get_symtab_upper_bound): Ditto & make static.
	(tekhex_mkobject): Ditto.
	(tekhex_object_p): Ditto.
	(move_section_contents): Ditto.
	(tekhex_get_section_contents): Ditto.
	(tekhex_set_arch_mach): Ditto & make static.
	(tekhex_set_section_contents): Ditto.
	(writevalue): Ditto.
	(writesym): Ditto.
	(out): Ditto.
	(tekhex_write_object_contents): Ditto.
	(tekhex_sizeof_headers): Ditto.
	(tekhex_make_empty_symbol): Ditto.
	(tekhex_get_symbol_info): Ditto.
	(tekhex_print_symbol): Ditto.
	* irix-core.c (make_bfd_asection): Ditto.
	(irix_core_core_file_p): Ditto.
	(irix_core_core_file_failing_command): Ditto.
	(irix_core_core_file_failing_signal): Ditto.
	(irix_core_core_file_matches_executable_p): Ditto.
	(irix_core_make_empty_symbol): Ditto.
	* coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
	* srec.c (srec_new_symbol): Ditto.
	(srec_get_section_contents): Ditto.
	(srec_set_arch_mach): Ditto.
	(srec_set_section_contents): Ditto.
	(internal_srec_write_object_contents): Ditto.
	(srec_write_object_contents): Ditto.
	(symbolsrec_write_object_contents): Ditto.
	(srec_sizeof_headers): Ditto.
	(srec_make_empty_symbol): Ditto.
	(srec_get_symtab_upper_bound): Ditto.
	(srec_get_symtab): Ditto.
	(srec_print_symbol): Ditto and make static.
	* elf.c (elf_read): Ditto
	(assign_section_numbers): Ditto.
	(elf_fake_sections): Ditto.
	(sym_is_global): Ditto.
	(elf_map_symbols): Ditto.
	(get_program_header_size): Ditto.
	* coffgen.c (make_a_section_from_file): Ditto.
	(coff_real_object_p): Ditto.
	(fixup_symbol_value): Ditto.
	(build_debug_section): Ditto.
	(copy_name): Ditto.
	* syms.c (coff_section_type): Ditto.
1996-09-11 04:25:57 +00:00
Jeff Law
00d7a64b5f * bfd-in2.h: Rebuilt after m32r changes. 1996-09-10 04:35:48 +00:00
David Edelsohn
f0c12b7340 * config.bfd,configure.in,configure: Add m32r support.
* Makefile.in,archures.c,elf.c,targets.c: Likewise.
1996-09-09 22:59:40 +00:00
David Edelsohn
66e4c22978 * config.bfd,configure.in,configure: Add m32r support. 1996-09-09 19:37:47 +00:00
David Edelsohn
71d7d44f19 * config.bfd: Keep target list alphabetically sorted. 1996-09-09 19:32:40 +00:00
Jeff Law
629f776abf * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
to add in the constant part found in the instruction itself.
        (case R_V850_HI16_S): Likewise.
Fixes plumhall/lang.exp failures.
1996-09-09 17:49:30 +00:00
Martin Hunt
9c85b19ddf Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
	and R_D10V_18 to be 1 (word).
1996-09-07 00:06:53 +00:00
Ian Lance Taylor
4be2140e68 * stabs.c (_bfd_link_section_stabs): If the output_section field
of either section is bfd_abs_section, then the linker is
	discarding the section and we should not optimize it.
PR 10555.
1996-09-05 19:24:08 +00:00
Jeff Law
e73b6ae634 * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
low order sign bit propogationfor R_V850_HI16_S.
Fixes c-torture execute/950221-1.c, maybe others.
1996-09-04 03:03:53 +00:00
David Edelsohn
0cd98b92ab * Makefile.in (aout-sparcle.o): New target.
* aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
	* config.bfd (sparclet-*-aout*): Add case.
	* configure.in (sparcle_aout_vec): Add case.
	* configure: Regenerated.
	* libaout.h (machine_type): Add M_SPARCLET_LE.
	* targets.c (sparcle_aout_vec): Declare.
	(bfd_target_vector): Add sparcle_aout_vec.
	* aout-sparcle.c: New file.
1996-09-03 19:52:15 +00:00
Jeff Law
7b0af209eb * elf32-v850.c (bfd_elf3_v850_reloc): New function for
handling V850 specific relocs.
        (elf_v850_howto_table): Use the new function for some
        relocations.  Twiddle masks & shifts for some relocs.
        Set partial_inplace where needed.
Fixing more stuff.
1996-09-03 08:14:53 +00:00
Mark Alexander
b5ef63c4fc * .Sanitize: Remove reloc.c from v850_files. 1996-09-01 22:25:50 +00:00
Ian Lance Taylor
bde9d87544 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
Rewrite to use BFD file read routines and to avoid using a fixed
	length for the file name.
1996-09-01 19:44:40 +00:00
Jeff Law
237b5c4c9a * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
(elf_v850_howto_table): Add support for R_V850_{32,16,8}.
        (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
        to R_V850_{32,16,8}.
So we don't get "reloc XXX not supported" messages anymore.
1996-08-31 16:24:18 +00:00
J.T. Conklin
01b49cb35b * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
(elf_v850_howto_table): Add info for HI16_S reloc.
(v850_reloc_map): Add HI_16_S reloc.
* reloc.c: Define BFD_RELOC_V850_* relocs.
1996-08-31 01:32:13 +00:00
Ian Lance Taylor
c86158e591 Add SH ELF support.
* elf32-sh.c: New file.
	* elf.c (prep_headers): Handle bfd_arch_sh.
	* elfcode.h (write_relocs): Handle absolute symbol.
	* elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
	(_bfd_elf64_link_read_relocs): Declare.
	* elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
	elf_link_read_relocs.  Make globally visible.  Change all
	callers.
	(elf_link_input_bfd): Get external symbols from cache in
	symtab_hdr->contents.  Get contents from cache in
	elf_section_data.
	* elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
	already defined.
	* reloc.c: Define BFD_RELOC_SH_* relocs.
	* libbfd-in.h (_bfd_sh_align_load_span): Declare.
	* coff-sh.c (sh_insns_conflict): Fix a return value.
	(_bfd_sh_align_load_span): New globally visible function, broken
	out of sh_align_load.
	(sh_align_load): Call _bfd_sh_align_load_span.
	(sh_swap_insns): Change relocs parameter to PTR.
	* bfd-in2.h, libbfd.h: Rebuild.
	* targets.c (bfd_elf32_sh_vec): Declare.
	(bfd_elf32_shl_vec): Declare.
	* config.bfd (sh-*-elf*): New target.
	* configure.in (bfd_elf32_sh_vec): New target vector.
	(bfd_elf32_shl_vec): New target vector.
	* configure: Rebuild.
	* Makefile.in: Rebuild dependencies.
 	(BFD32_BACKENDS): Add elf32-sh.o.
	(BFD32_BACKENDS_CFILES): Add elf32-sh.c.

	* elf.c (map_sections_to_segments): Check that LMA does not skip a
	page before checking D_PAGED.
1996-08-30 22:09:51 +00:00
Ian Lance Taylor
492cfc71b8 * ihex.c (ihex_scan): Removed unnecessary extbase variable.
(ihex_write_object_contents): Remove extbase; always use segbase
	instead.
1996-08-30 15:52:40 +00:00
Michael Meissner
f7954d868f Recognize i686-*-* for pentium pro 1996-08-29 21:16:27 +00:00
Ian Lance Taylor
4da624ddb3 * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
R_MIPS_32 and R_MIPS_REL32.  Set sgot and g as soon as possible.
	(mips_elf_size_dynamic_sections): Don't require .got to exist.
	(mips_elf_finish_dynamic_sections): Likewise.
1996-08-27 04:14:13 +00:00
Ian Lance Taylor
1c952df609 * configure.host (HLDENV): New variable to set. Set it for
*-*-sysv4*, since those linkers may not support -R but they always
	support LD_RUN_PATH.
1996-08-23 00:07:59 +00:00
Ian Lance Taylor
9461513b04 * libieee.h (NSECTIONS): Don't define.
(ieee_data_struct): Change section_table to asection **.  Add
	section_table_size.
	* ieee.c (get_section_entry): If the table isn't big enough, make
	it bigger.
	(ieee_slurp_sections): Remove assertion about number of sections.
	(ieee_object_p): Adjust initialization of ieee to match changes to
	the structure.
PR 10377.
1996-08-23 00:02:55 +00:00
J.T. Conklin
0c1d95c791 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
(BFD32_BACKENDS) Add elf32-v850.o.
* archures.c: Add bfd_v850_arch.
* bfd-in2.h: Add bfd_v850_arch.
* config.bfd (v850-*-*): New target.
* configure: (bfd_elf32_v850_vec) New vector.
* configure.in: (bfd_elf32_v850_vec) New vector.
* cpu-v850.c: New file.
* elf.c (prep_headers): Added case bfd_arch_v850.
* elf32-v850.c: New file.
* targets.c (bfd_elf32_v850_vec): New vector.
1996-08-20 22:09:25 +00:00
Stan Shebs
22edd54732 * mpw-config.in: Update editing of autoconf vars to reflect
Jul 18 configure.in change.
	* mpw-make.sed: Update editing of include pathnames to be
	more general, add @DASH_C_FLAG@ to explicit compile rule edit.
1996-08-15 19:41:17 +00:00
Jackie Smith Cashion
53ef6e6076 Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
* reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
	BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
 	Added, for internal use by the ARM gas.
	* libbfd.h: Rebuilt
	* bfd-in2.h: Rebuilt
1996-08-15 15:58:35 +00:00
Ian Lance Taylor
37d7888d03 Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
	in section dynidx start.
1996-08-15 00:03:50 +00:00
Ian Lance Taylor
e38d6d362f * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
name begins with .gnu.linkonce as SEC_LINK_ONCE.  This is an
	optimization for g++.
1996-08-13 21:39:37 +00:00
Michael Meissner
ae20860e9d If one module has -mrelocatable-lib and the other doesn't, clear the -mrelocatable-lib bit 1996-08-13 21:09:06 +00:00
Ian Lance Taylor
4596421b67 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
symbol against a STT_FUNC symbol in a shared library.
1996-08-11 03:39:46 +00:00
Ian Lance Taylor
410bc61d0c * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
symbol is found, automatically define the corresponding function
 	code.
PR 10299.
1996-08-10 00:15:30 +00:00
Ian Lance Taylor
d92099f198 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
if sym.n_numaux is not zero.
	(_bfd_coff_link_input_bfd): Permit the symbol and the hash table
	entry to disagree about the number of aux entries if the symbol
	has zero.
1996-08-09 18:46:54 +00:00
Ian Lance Taylor
f11e3f6278 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
section if it might be needed, not just if info->shared.
	(mips_elf_adjust_dynamic_symbol): Make room for a null element at
	the start of .rel.dyn if we are going to use it.
	(mips_elf_finish_dynamic_sections): Only clear the first element
	of .rel.dyn if the size is greater than zero.
Fix this case from c-torture:
extern int abort();
typedef int (*frob)();
frob f[] = {abort};
main()
{
  exit(0);
}
1996-08-09 16:47:15 +00:00
Ian Lance Taylor
b2a05baf21 * xcofflink.c (xcoff_link_input_bfd): If we already called the
undefined_symbol callback for a symbol, then don't issue any more
	warnings about loader relocs.
	(_bfd_ppc_xcoff_relocate_section): Don't do any further processing
	after calling the undefined_symbol callback.
1996-08-08 21:15:32 +00:00
Ian Lance Taylor
fbc4ed7ded * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
(xcoff_link_add_symbols): Permit multiple definitions of a symbol
	as the AIX linker seems to do.
PR 10304.
1996-08-08 20:33:39 +00:00
Ian Lance Taylor
8612a388f7 Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
* evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
	(evax_initialize): Remove evax_reloc_table.
	(evax_close_and_cleanup): Ditto.
	(reloc_nil): Ditto.
	(alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
	entries.
	(evax_bfd_reloc_type_lookup): Ditto.
	* evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
	cooked_size == raw_size.
	* evax-emh.c (_bfd_evax_register_filename): Remove.
	* evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
	* evax-misc.c (add_new_contents): Malloc section at full size.
	(_bfd_save_evax_section): Memcpy section contents directly.
	* evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
	(evax_reloc_table): Remove.

	* hosts/alphavms.h (O_ACCMODE): Define if needed.

	* makefile.vms: Add better support for DEC C compilation
	Add evax.h dependencies

	* reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
	(BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
	(BFD_RELOC_ALPHA_BASEREG): Remove.
	* bfd-in2.h, libbfd.h: Rebuild.
1996-08-08 16:27:21 +00:00
Stu Grossman
320a5c6b18 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
getgid if _WIN32 is defined.
	* opncls.c (bfd_fdopenr):  Remove unnecessary WINGDB ifdef.
1996-08-08 15:23:01 +00:00
Stu Grossman
2055bf857d * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
	include file.
	* libbfd.c:  Create dummy getpagesize() macro if HAVE_GETPAGESIZE
	isn't defined.
1996-08-08 06:27:01 +00:00
Ian Lance Taylor
cc425b5558 * cpu-i386.c (i8086_arch): Architecture info for the i8086. 1996-08-07 20:10:14 +00:00
Ian Lance Taylor
85fe9d3e46 Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* configure.in: Call BFD_NEEDED_DECLARATION on strstr and
	realloc.
	* acconfig.h (NEED_DECLARATION_STRSTR): New macro.
	(NEED_DECLARATION_REALLOC): New macro.
	* configure, config.in: Rebuild.
	* sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
	(realloc): Declare if NEED_DECLARATION_REALLOC.
1996-08-07 18:17:22 +00:00
Ian Lance Taylor
9b3307b0a0 Based on patches from Eric Valette <valette@crf.canon.fr>:
* elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
	LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
	(elf_howto_table): Add entries for new relocs.
	(elf_i386_reloc_type_lookup): Handle new relocs.
	(elf_i386_info_to_howto): Just call abort.
	(elf_i386_info_to_howto_rel): Check that the reloc type is valid.
	(elf_i386_relocate_section): Likewise.
1996-08-07 16:14:09 +00:00
Martin Hunt
75e3a45a0d Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
1996-08-06 19:56:21 +00:00
Ian Lance Taylor
b944e7e855 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
only get the LMA from the phdr if they are in the same part of the
	file.
1996-08-05 20:45:55 +00:00
Ian Lance Taylor
191d910cb9 * elf.c (map_sections_to_segments): Rewrite tests for starting a
new segment to make them more comprehensible.  If the relationship
	between the LMA and the VMA changed, start a new segment.  Don't
	check dynsec when deciding whether to start a new segment for a
	writeable section; -N will now handle this.
1996-08-05 17:45:58 +00:00
Jeff Law
e751d5068f * libhppa.h: Remove "esel" changes. Not the right approach.
* som.c: Corresponding changes.
        (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
        which don't have a SOM symbol type associated with them.
        Reverses a 1994 change.
More PA EH tweakage (to get exception handling tables properly relocated
in shared libraries).
1996-08-02 04:50:08 +00:00
Ian Lance Taylor
cdb88e8764 Make ld -N more reasonable for ELF:
* elf.c (map_sections_to_segments): If D_PAGED is not set, set
	phdr_in_section to false, and always use a single load segment.
	(elf_sort_sections): Sort sections by LMA after VMA.
	(assign_file_positions_for_segments): If D_PAGED is not set, don't
	align to maxpagesize.
	(assign_file_positions_except_relocs): Likewise.
	* elfcode.h (elf_object_p): If a section is loaded but not page
	aligned, clear D_PAGED.
1996-07-31 19:58:05 +00:00
Jackie Smith Cashion
d1b40d8eeb Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
* reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
 	Added, for internal use by the ARM gas.
	* libbfd.h: Rebuilt
	* bfd-in2.h: Rebuilt
1996-07-31 14:34:21 +00:00
Jeff Law
ad240a8289 * libhppa.h (R_HPPA_ESEL): New field selector.
(e_esel): Similarly.
        * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
        then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
        (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
Making another stab at EH support on the PA.
1996-07-30 20:16:27 +00:00
Ian Lance Taylor
fb4dc1eb5f * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
archive search before looking for stripped dynamic objects.
PR 10187.
1996-07-30 17:39:33 +00:00
Ian Lance Taylor
b223f95038 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
symbol a warning rather than an error.
PR 10208.
1996-07-26 21:53:08 +00:00
Ian Lance Taylor
64f808f92b * elf.c (assign_file_positions_for_segments): Track the virtual
memory position separately from the file position, and use it to
	compute the alignment adjustment.
PR 10039.
1996-07-24 16:05:32 +00:00
Martin Hunt
11609502f0 start-sanitize-d10v
Tue Jul 23 10:43:31 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>

	* elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
 	and fixed mask on R_D10V_10_PCREL_L.

end-sanitize-d10v
1996-07-23 17:54:21 +00:00
Ian Lance Taylor
bf9884d41d * elf64-mips.c: Include "aout/ar.h".
(mips_elf64_slurp_armap): New static function.
	(mips_elf64_write_armap): New static function.
	(bfd_elf64_archive_*): Define.
	* elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
	Use instead of bfd_generic_archive_p.
	(bfd_elfNN_write_archive_contents): Define if not defined.  Use
	instead of _bfd_write_archive_contents.
	(bfd_elfNN_mkdarchive): Define if not defined.  Use instead of
	_bfd_generic_mkarchive.
	(TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
	bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
	_bfd_archive_coff.
	(TARGET_LITTLE_SYM): Likewise.
	* archive.c (bfd_slurp_armap): Check for and reject an archive map
	name of /SYM64/.
	* Makefile.in: Rebuild dependencies.
1996-07-22 23:02:35 +00:00
Ian Lance Taylor
9bd65136af * libecoff.h (ecoff_data_type): Add rdata_in_text field.
* ecoff.c (ecoff_compute_section_file_positions): Copy
	rdata_in_text from backend info to tdata.  Clear it if any data
	section comes before .rdata.
	(_bfd_ecoff_write_object_contents): Use rdata_in_text field in
	tdata rather than backend info.
1996-07-22 19:38:23 +00:00
Ian Lance Taylor
194141a9b8 * configure.in: Fix test for whether a compiler has a 64 bit
type.  From Jim Wilson <wilson@cygnus.com>.
VS: ----------------------------------------------------------------------
1996-07-19 22:16:50 +00:00
Ian Lance Taylor
f4e14cb901 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
(replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
	BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT.  Add bfd-in2.h:bfd-in2.h
	to AC_OUTPUT call.
	* configure: Rebuild.
	* bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
	(BFD_HOST_64_BIT): Define conditionally.
	(BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
	(bfd_vma): Typedef as BFD_HOST_U_64_BIT.
	(symvalue, bfd_size_type): Likewise.
	* bfd-in2.h: Rebuild.
	* Makefile.in (do_clean): Remove bfd-tmp.h.
	(do_distclean): Remove bfd-in3.h.
	(stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
	(bfd-in3.h): New target.
1996-07-19 00:48:20 +00:00
Ian Lance Taylor
74556b94ff * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
Andrew Gierth <ANDREWG@microlise.co.uk>.
1996-07-18 21:36:21 +00:00
Ian Lance Taylor
ab659fd6de * configure.host: Set INSTALL_SHLIB.
* configure.in: Call AC_SUBST (INSTALL_SHLIB).
	* configure: Rebuild.
	* Makefile.in (install): Use @INSTALL_SHLIB@.
1996-07-18 21:19:11 +00:00
Ian Lance Taylor
e8c249cb2c * config.bfd (mips*-*-irix6*): New target.
* configure.host: Handle Irix 6 shared library like Irix 5.
1996-07-18 20:33:22 +00:00
Ian Lance Taylor
a8a3d83af0 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
symbol for a magic name.
	(xcoff_link_input_bfd): Don't change the reloc symbol for an
	XMC_TD symbol.
	(_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
	XMC_TD symbol.
1996-07-18 19:41:35 +00:00
Stan Shebs
b576c7b3d2 * mpw-config.in: Add ELF support to mips config, create the
elf32-target.h file in the object dir.
	* mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
1996-07-18 18:42:06 +00:00
Kim Knuttila
2ba0d82d52 Removed debug, fixed diagnostics, etc 1996-07-18 01:04:14 +00:00
Martin Hunt
50bd50d48f start-sanitize-d10v
Wed Jul 17 14:51:52 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
        * Makefile.in (ALL_MACHINES): Add cpu-d10v.o
        (BFD32_BACKENDS) Add elf32-d10v.o
        * archures.c: Add bfd_d10v_arch.
        * bfd-in2.h: Add bfd_d10v_arch.
        * config.bfd (d10v-*-*): New target.
        * configure: (bfd_elf32_d10v_vec) New vector.
        * configure.in: (bfd_elf32_d10v_vec) New vector.
        * cpu-d10v.c: New file.
        * elf.c (prep_headers): Added case bfd_arch_d10v.
        * elf32-d10v.c: New file.
        * libbfd.h: Rebuild.
        * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L, BFD_RELOC_D10V_18,
          BFD_RELOC_D10V_18_PCREL): Define.
        * targets.c (bfd_elf32_d10v_vec): New vector.
end-sanitize-d10v
1996-07-18 00:47:05 +00:00
Kim Knuttila
2ce9802e14 Removed bogus printf 1996-07-17 18:10:20 +00:00
Stu Grossman
9676e4461a * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
bfd_mach_i386_i8086 machine types.
1996-07-17 06:51:21 +00:00
Stu Grossman
3cc21bf602 * bfd-in2.h: Add bfd_mach_i386_i386 and bfd_mach_i386_i8086
machine types.
1996-07-15 23:41:21 +00:00
Ian Lance Taylor
f71719789e * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
and _FINI sections.
1996-07-10 16:44:45 +00:00
Ian Lance Taylor
74e2ab383c Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
* coffcode.h (coff_set_section_contents): A/UX does not require
	special handling of the _LIB section.
1996-07-10 15:26:50 +00:00
Jeff Law
01cfaa6bf2 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
value for R_RELBYTE.
Something -Wall caught.

        * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
        array if one was allocated.
Something I ran into today.
1996-07-09 21:53:47 +00:00
Ian Lance Taylor
eb52b9dc1d From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
* elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
	use_rld_obj_head and rld_value.
	(mips_elf_link_hash_table_create): Initialize new fields.
	(mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
	dynamic.
	(mips_elf_create_dynamic_sections): Create .rld_map section.  If
	__rld_obj_head symbol not seen, create an __rld_map symbol.
	(mips_elf_size_dynamic_sections): Make space in .rld_map section.
	Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
	(mips_elf_finish_dynamic_symbol): Save value of __rld_map or
	__rld_obj_head symbol.
	(mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
1996-07-09 16:28:04 +00:00
Ian Lance Taylor
9b292d4c0e * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry. 1996-07-08 23:29:26 +00:00
Ian Lance Taylor
dab4573409 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
ppc_elf_addr16_ha_reloc.
	(ppc_elf_addr16_ha_reloc): New static function.
PR 10036.
1996-07-08 21:38:59 +00:00
Ian Lance Taylor
56b4cbaac3 * coff-mips.c (struct mips_hi): Define.
(mips_refhi_list): New static variable.
 	(mips_refhi_addr, mips_refhi_addend): Remove.
	(mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
	(mips_reflo_reloc): Process mips_refhi_list.
	(mips_relhi_list): New static variable.
	(mips_relhi_addr, mips_relhi_addend): Remove.
	(mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
	(mips_rello_reloc): Process mips_relhi_list.
	(mips_relocate_section): Permit an arbitrary number of REFHI or
	RELHI relocs before the associated REFLO or RELLO reloc.
PR 10050.
1996-07-08 20:25:54 +00:00
Ian Lance Taylor
b777c6a733 * aout-target.h (MY(callback)): Set reloc_count fields. 1996-07-05 23:30:05 +00:00
Jeff Law
34255b708c No longer need to sanitize away h8/s stuff. 1996-07-05 18:30:03 +00:00
Ian Lance Taylor
48f3aaf3ed * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
sections unless this is a SunOS link.
PR 10039.
1996-07-04 22:25:50 +00:00
Ian Lance Taylor
100b65dd23 * VERSION: Set to 2.7.1. 1996-07-04 19:35:51 +00:00
Ian Lance Taylor
4d3daf4fae * i386aout.c: Include "aout/aout64.h".
(i386aout_write_object_contents): New static function.
	(MY_write_object_contents): Define.
1996-07-03 20:50:56 +00:00
Ian Lance Taylor
a31e14f44c * netbsd.h (MY(write_object_contents)): Make sure that
adjust_sizes_and_vmas is called before fiddling with the magic
	number.
1996-07-03 19:01:14 +00:00
Ian Lance Taylor
d2d04f7a28 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo. 1996-07-03 03:32:48 +00:00
Ian Lance Taylor
4f6ee760ca * libbfd-in.h (itos, stoi): Don't define.
* libbfd.h: Rebuild.
	* i386lynx.c (KEEPIT): Define as udata.i.
	(NAME(lynx,swap_std_reloc_out)): Don't use stoi.
	(NAME(lynx,swap_ext_reloc_out)): Likewise.
	* riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
	flags.  Don't use stoi.
1996-06-30 17:42:02 +00:00
Kim Knuttila
dfb89b82d4 Fixed the ppc/nt strip bug. Missing D_PAGED. 1996-06-29 23:25:23 +00:00
Ian Lance Taylor
f93fb27543 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
with XCOFF_DEF_DYNAMIC set is really defined.
	(xcoff_link_check_dynamic_ar_symbols): Likewise.
The above is for PR 9997.
	(xcoff_link_add_symbols): Only create special sections if using an
	XCOFF hash table.
1996-06-28 22:19:46 +00:00
Ian Lance Taylor
8e80606fab * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
aixcoff-rs6000.
	(bfd_install_relocation): Likewise.
1996-06-28 17:50:36 +00:00
Ian Lance Taylor
eec2f824fb Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
* elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
	field.
	(ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
	(ALPHA_ELF_LINK_HASH_LU_MEM): Define.
	(ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
	(elf64_alpha_link_hash_newfunc): Initialize flags field.
	(elf64_alpha_check_relocs): Record types of LITUSE entries that
	are found for LITERAL relocs.
	(elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
	taken, we cannot generate a .plt entry for the symbol.
1996-06-28 15:24:18 +00:00
Ian Lance Taylor
5304aea938 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
sysconf functions (for gprof).
	* configure, config.in: Rebuild.
1996-06-27 15:29:21 +00:00
Ian Lance Taylor
f292bbe9cf * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
an archive if it has a map.  If the object file has the wrong
	xvec, reject it.
PR 9972.
1996-06-27 01:44:49 +00:00
Ian Lance Taylor
566e232559 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
BRADDR, SREL16, SREL32, or SREL64 reloc against an external
	symbol.
	(alpha_relocate_section): Likewise.
1996-06-26 21:27:09 +00:00
Ian Lance Taylor
017047d446 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
(coff_swap_filehdr_out): Use FILHSZ, not sizeof.
	(coff_swap_sym_out): Use SYMESZ, not sizeof.
	(coff_swap_aux_out): Use AUXESZ, not sizeof.
	(coff_swap_lineno_out): Use LINESZ, not sizeof.
	(coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
	(coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
	* peicode.h: Corresponding changes.
1996-06-26 20:32:22 +00:00
Michael Meissner
cb73f5d786 Comment out code to make GOT pointers negative of the GOT symbol for now 1996-06-25 19:45:17 +00:00
Ian Lance Taylor
297a4f1a3c Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
* elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
	increment the .rela.plt size until after we're done creating the
	.plt entry.
	(elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
	.rela.plt offset directly rather than calculating it.
1996-06-25 15:55:31 +00:00
Jason Molenda
01e58ff6e6 typeo 1996-06-25 12:00:18 +00:00
Jason Molenda
dbbfec0782 * Makefile.in, Makefile.in (bindir, libdir, datadir, mandir, infodir,
includedir): Use autoconf-set values.
        * doc/Makefile.in, Makefile.in (bindir, libdir, datadir, mandir,
        infodir, includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use
        autoconf-set values.
        (docdir): Deleted.
        * configure.in (AC_PREREQ): autoconf v2.5 or higher.
        * configure: Rebuilt.
1996-06-25 11:54:57 +00:00
Jeff Law
50004d8d12 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
handling code > 1k away.
PA exception handling crud.
1996-06-25 04:50:10 +00:00
Ian Lance Taylor
2e0567eb0d * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
section to 0 if user_set_vma is set.
	* elflink.h (elf_bfd_final_link): Likewise.
1996-06-24 22:00:22 +00:00
Ian Lance Taylor
bff4a49602 Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
* config.bfd: Add support for *-*-rtems* configurations.
1996-06-21 22:02:36 +00:00
Ian Lance Taylor
7ae6550fc5 * elf.c (prep_headers): Add bfd_arch_alpha case. 1996-06-21 19:23:36 +00:00
Ian Lance Taylor
e8f4671749 Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
* elf64-alpha.c: New file.
	* config.bfd (alpha-*-linuxecoff*): New target.
	(alpha-*-linux*, alpha-*-elf*): New targets.
	* configure.in (bfd_elf64_alpha_vec): New vector.
	* configure: Rebuild.
	* targets.c (bfd_elf64_alpha_vec): Declare.
	(bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
	* reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
	* bfd-in2.h, libbfd.h: Rebuild.
	* Makefile.in: Rebuild dependencies.
 	(BFD64_BACKENDS): Add elf64-alpha.o.
	(BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
1996-06-21 16:40:43 +00:00
David Edelsohn
b9110a3c4f * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
ifdef to COFF_WITH_PE.
	(coff_compute_section_file_positions): Likewise.
	(coff_write_object_contents): Likewise.  Delete COFF_OBJ_WITH_PE.
	* pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
	* peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
	COFF_IMAGE_WITH_PE, always include.
1996-06-20 23:59:08 +00:00
Ian Lance Taylor
bacecac849 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
than relying on a right shift of 32.
1996-06-20 22:23:22 +00:00
David Edelsohn
9ca108cdd0 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0. 1996-06-20 19:36:35 +00:00
Ian Lance Taylor
7fc6a16a7f * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
approximate the correct answer if SIZEOF_HEADERS was not used.
1996-06-19 16:30:27 +00:00
Ian Lance Taylor
c2073f05cf * binary.c (binary_set_section_contents): Set section file
position based on LMA rather than VMA.
1996-06-19 15:39:08 +00:00
Ian Lance Taylor
4838929ec7 Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
* linker.c (_bfd_generic_link_output_symbols): Don't output any
	symbols if info->strip == strip_all.
1996-06-19 15:23:21 +00:00
Ian Lance Taylor
c3d8e071bf Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
Added support for Alpha OpenVMS:
	* evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
	* evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
	* config.h-vms, makefile.vms: New files.
	* config.bfd (alpha-*-*vms*): New target.
	* configure.in (evax_alpha_vec): New target vector.
	* configure: Rebuild.
	* reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
	(BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
	* targets.c (bfd_target_evax_flavour): Define.
	(evax_alpha_vec): Declare.
	(bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
	if BFD64 is defined.
	* bfd-in2.h, libbfd.h: Rebuild.
	* Makefile.in: Rebuild dependencies.
	(BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
	evax-emh.o, and evax-misc.o.
	(BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
	evax-etir.c, evax-emh.c, and evax-misc.c.
	(HFILES): Add evax.h.
1996-06-18 19:07:51 +00:00
Ian Lance Taylor
142aa7d93a * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
pointer.
	(h8300_bfd_link_add_symbols): Likewise.
1996-06-18 17:56:53 +00:00
Jeff Law
b658d64d9e * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
* som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
gunk for EH on the PA.
1996-06-17 18:25:09 +00:00
Ian Lance Taylor
2df1e84b65 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
	created.
	(mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
	R_MIPS_32 relocs if creating a shared library.
1996-06-17 16:54:39 +00:00
Ian Lance Taylor
51bc9642d9 * cofflink.c (_bfd_coff_final_link): Handle long section names.
* coffcode.h (coff_write_object_contents): If there are long
	section names, always set the f_symptr field, even if there are no
	symbols.
	* peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
	if there are no symbols.
1996-06-13 18:07:39 +00:00
Ian Lance Taylor
8100e72c95 * coffgen.c (make_a_section_from_file): Check return value of
_bfd_coff_read_string_table.
	(coff_real_object_p): Check return value of
	make_a_section_from_file.
	(_bfd_coff_read_string_table): Check that there are some symbols
	before trying to read the string table size.
1996-06-13 17:40:58 +00:00
Ian Lance Taylor
ed675a0409 * xcofflink.c (xcoff_link_add_symbols): When considering whether
to replace a symbol in a dynamic object with a symbol from another
	dynamic object, do the replacement if the existing symbol is
	global linkage code.
PR 9860.
Also fix a couple of comment typos and indentation problems.
1996-06-13 00:16:39 +00:00
Ian Lance Taylor
4914478412 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
for _ptrgl, and treat it as global linkage code.
PR 9860.
1996-06-12 22:05:32 +00:00
Ian Lance Taylor
0e3bd85ee7 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
filename or N_SO symbol past the offset, and use it to indicate
	that there is no line number or function when appropriate.
1996-06-12 18:18:23 +00:00
Ian Lance Taylor
a5c7acea2f * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
common symbol defined by the linker.  Don't export function code
	even if export_defineds is set.
PR 9856.
1996-06-11 22:25:55 +00:00
Jeff Law
890f5b7f5a Opps. 1996-06-09 22:40:13 +00:00
Jim Wilson
4906b2a367 Kill r16/rce/acp stuff. 1996-06-08 03:45:18 +00:00
Ian Lance Taylor
bbf7c3352c * ieee.c (ieee_write_object_contents): Put a timestamp in the file
to keep the HP emulator database happy.
PR 9493.
1996-06-06 23:57:18 +00:00
Ian Lance Taylor
0593fc16c4 Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
* ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
 	alignment hack--we can get the lnnoptr info another way without
 	suddenly increasing the alignment requirements.  Set the flags for
	the _PDATA section.
	(ecoff_compute_section_file_positions): Do so.
1996-06-06 19:51:04 +00:00
Ian Lance Taylor
9b263b79b7 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
From Kevin Buettner <kev@primenet.com>.
1996-06-06 15:30:28 +00:00
Ian Lance Taylor
26145b159a * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
set, always call the notice callback.

	* VERSION: Increment for bfdlink.h change.
1996-06-04 23:11:00 +00:00
Ian Lance Taylor
9d17519894 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
(sh_relax_delete_bytes): Correct handling of differently sized
	trailing alignment reloc.
1996-06-03 21:13:41 +00:00
Ian Lance Taylor
5a04f1bd73 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
* bfd-in2.h: Rebuild.
	* configure.in: Warn if there is no known 64 bit type.
	* configure: Rebuild.
1996-06-03 20:20:11 +00:00
Ian Lance Taylor
60c8b04f7a * Makefile.in: Rebuild dependencies.
(BFD32_BACKENDS): Add ppcboot.o.
	(BFD32_BACKENDS_CFILES): Add ppcboot.c.
1996-06-03 15:17:34 +00:00