Commit Graph

2298 Commits

Author SHA1 Message Date
Ian Lance Taylor 27b1ec9478 * archive.c (_bfd_construct_extended_name_table): If
BFD_TRADITIONAL_FORMAT is set, limit the length of all file names
	to ar_max_namelen.
	(bfd_dont_truncate_arname): If BFD_TRADITIONAL_FORMAT is set, call
	bfd_bsd_truncate_arname.
PR 6888.
1995-07-04 20:22:43 +00:00
Ian Lance Taylor e510074320 * archive.c (_bfd_write_archive_contents): Revert June 1 change. 1995-07-04 18:07:47 +00:00
Ian Lance Taylor b5279eb6a9 * elfcode.h (NAME(bfd_elf,record_link_assignment)): Add provide
argument.
	* bfd-in.h (bfd_elf32_record_link_assignment): Update prototype.
	(bfd_elf64_record_link_assignment): Likewise.
	* bfd-in2.h: Rebuild.
PR 7164.
1995-07-04 17:43:05 +00:00
Ian Lance Taylor b176e1e92a * libelf.h (struct elf_link_hash_table): Add needed field. Remove
saw_needed field.
	* elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
	is an empty string, don't make a DT_NEEDED entry in the output
	file.  Record all DT_NEEDED entries found in input dynamic
	objects.
	(elf_link_output_extsym): Don't check saw_needed when issuing
	warnings.
	* elf.c (_bfd_elf_link_hash_table_init): Initialize needed, not
	saw_needed.
	(bfd_elf_get_needed_list): New function.
	* bfd-in.h (struct bfd_elf_link_needed_list): Define.
	(bfd_elf_get_needed_list): Define.
	* bfd-in2.h: Rebuild.
PR 7083.
1995-07-04 16:54:49 +00:00
Ian Lance Taylor 194fc93542 * ecoff.c (_bfd_ecoff_find_nearest_line): Also initialize
find_buffer and fdrtab_len fields of newly allocated
	find_line_info structure.
1995-07-04 16:23:58 +00:00
Jeff Law c40439a219 * som.c (hppa_som_gen_reloc_type): New argument "sym_diff",
nonzero when we're generating relocations for an expression
	using the difference of two symbols.  All callers changed.
	Handle difference of symbols for both R_HPPA and R_COMPLEX
	cases.
	(som_write_fixups): Handle R_COMP1, R_COMP2 and R_CODE_EXPR
	fixups.
1995-07-03 23:27:25 +00:00
Ian Lance Taylor 3a6eecd42f * ecoff.c (_bfd_ecoff_find_nearest_line): If we allocate
find_line_info, clear the fdrtab field.
1995-07-03 22:41:51 +00:00
Ian Lance Taylor 9fd10c34d0 x 1995-07-03 22:19:02 +00:00
Ian Lance Taylor 9675c281af * bfd.c (enum bfd_error): Define bfd_error_no_armap.
(bfd_errmsgs): Add string for bfd_error_no_armap.
	* bfd-in2.h: Rebuild.
	* ecoff.c (ecoff_link_add_archive_symbols): If an archive has no
	armap, set bfd_error_no_armap rather than bfd_error_no_symbols.
	* elfcode.h (elf_link_add_archive_symbols): Likewise.
	* linker.c (_bfd_generic_link_add_archive_symbols): Likewise.
1995-07-03 22:16:40 +00:00
Ian Lance Taylor d07445c310 * targets.c (enum bfd_flavour): Add bfd_target_msdos_flavour here,
rather than in bfd-in2.h.
1995-07-03 22:15:10 +00:00
Steve Chamberlain bd676d26ea Mon Jul 3 13:55:18 1995 Steve Chamberlain <sac@slash.cygnus.com>
* config.bfd (win32): New configuration.
	* configure.host (pe): Changed to i386win32.
	* config/i386pe.mh: Deleted.
	* config/i386win32.mh: New file.
1995-07-03 21:11:15 +00:00
Ian Lance Taylor 3004a68c46 * elfcode.h (elf_link_add_object_symbols): Permit common and
indirect symbols in weakdefs BFD_ASSERT.
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Simplify
	BFD_ASSERT to permit some legal, but odd, cases.
	* elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
	* elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1995-07-03 17:57:25 +00:00
Ian Lance Taylor 6ff9c0519c Correct erroneous checkin, with no ChangeLog entry, of 13 May. 1995-07-03 17:28:14 +00:00
Ian Lance Taylor 30dc85f1b8 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Correct
BFD_ASSERT to handle __start_SECNAME symbols automatically defined
	by the linker.
	* elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
	* elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1995-07-03 17:05:56 +00:00
Ian Lance Taylor 8809320bb9 * Makefile.in: Rebuild dependencies.
(BFD32_BACKENDS): Add versados.o.
	(CFILES): Add pe-i386.c, pei-i386.c, and versados.c.
start-sanitize-arc
	(elf32-arc.o): New target.  This should be removed when
	elf32-arc.c can be added to CFILES.
end-sanitize-arc
1995-07-03 15:41:52 +00:00
Ian Lance Taylor be89267cfc * cofflink.c (_bfd_coff_generic_relocate_section): Cast base_file
to FILE * before using it.
	* stab-syms.c: Revert yesterday's patch.
1995-07-02 21:51:36 +00:00
Ian Lance Taylor 4b18dd1ec2 Remove elf32-targetd.h and elf64-targets.h. Add elfxx-target.h. 1995-07-02 19:23:29 +00:00
Fred Fish 033d545b29 * stab-syms.c (stdio.h): Include prior to libaout.h, which
includes bfdlink.h, which now uses FILE.
1995-07-01 19:14:29 +00:00
Ken Raeburn 5cab016b72 removed unused elf_64_p field 1995-07-01 04:20:05 +00:00
Ken Raeburn b968e4f491 generate elf*-target.h from common elfxx-target.h source 1995-07-01 04:16:03 +00:00
Steve Chamberlain ece22cd04c Fri Jun 30 16:07:18 1995 Steve Chamberlain <sac@slash.cygnus.com>
* cofflink.c (_bfd_coff_generic_relocate_section): Compare
	the full text of .reloc or .edata section names.
1995-06-30 23:19:57 +00:00
Fred Fish d84d840f18 * cofflink.c (_bfd_coff_generic_relocate_section):
Remove extra '+'.
1995-06-30 22:53:13 +00:00
Steve Chamberlain 69b799dfd7 * coff-h8300.c (COFF_LONG_FILENAMES): Define. 1995-06-30 00:26:53 +00:00
Steve Chamberlain 89665c8562 Wed Jun 28 18:04:42 1995 Steve Chamberlain <sac@slash.cygnus.com>
* Makefile.in: versados.o is now conditionally built.
	* coffcode.h (add_data_entry): New function.
	(coff_write_object_contents): Clean up. Calculate
	data entries.
	* cofflink.c (_bfd_coff_generic_relocate_section):
	.reloc and .edata sections are IMAGE_BASED too.
	If there's a base_file then write out base information.
	* configure.host (i386-*-pe): New.
	* syms.c (coff_section_type): Only scan prefixes.
	* targets.c (bfd_target_vector): Versados is now conditionally
	built.
	* config/m68k-coff.mt: Build versados.o
	* hosts/i386pe.h: New file.
1995-06-29 01:17:58 +00:00
Jeff Law 6cb964d4ef * elf32-hpa.c (elf32_hppa_relocate_section): Close comment before
R_PARISC_DPREL21L handling.
1995-06-26 19:55:27 +00:00
Steve Chamberlain f4761bb244 * reloc.c (bfd_perform_relocation): Add case for -ve words. 1995-06-22 15:59:14 +00:00
Jeff Law 775d12552e * elf32-hppa.c (elf32_hppa_relocate_section): Don't try to apply a
relocation against an undefined symbols.
1995-06-21 19:14:39 +00:00
Steve Chamberlain 9eacc5c494 * versados.c: Second pass/rewrite. 1995-06-21 17:19:25 +00:00
Jeff Law c2730ba305 Fix typo in last change. 1995-06-18 05:39:52 +00:00
Jeff Law 9fe4fade31 * elf32-hppa.c (elf32_hppa_size_stubs): Set the size of the stub
section if we get an error.
1995-06-18 03:39:23 +00:00
Jeff Law 9a6880571c * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Don't mess
with the operands of an R_PARISC_DPREL21L relocation if the insn
        is not "addil <symbol>,%r27".
1995-06-17 15:43:06 +00:00
Stan Shebs 018dafca8a * bfd-in.h (NT_subsystem, NT_stack_heap): Declare but don't
define.
	* bfd-in2.h: Rebuilt.
	* bfd.c (NT_subsystem, NT_stack_heap): Define.
1995-06-16 22:08:26 +00:00
Jeff Law 31dabb6cc9 * elf32-hppa.c (elf32_hppa_bfd_link_link_relocate): Use the right
type field (there are two!) when checking to see if $global$ is
	defined.
1995-06-16 06:09:07 +00:00
Stan Shebs e0151f38e1 * bfd-in.h, bfd-in2.h (bfd_boolean): Rename bfd_true, bfd_false
to bfd_tttrue, bfd_fffalse so as not to conflict with functions.
	* coffswap.h (coff_swap_scnhdr_out): Remove version that was
	hacked for MPW C.
	* mpw-config.in: Set shell vars instead of pasting to makefile
	for each configuration, edit coffswap.h to make MPW C not choke.
	(i386-unknown-coff, sh-hitachi-hms): Recognize.
	* mpw-make.in (BFD_LIBS): Add versados.c.o.

	* versados.c (versados_scan): Properly cast results from bfd_alloc.
1995-06-15 21:18:17 +00:00
Steve Chamberlain d25079a096 * cofflink.c (process_embedded_commands): New function
reads and handles .drectve sections for PE.
	(coff_link_input_bfd): Call new function if PE.
1995-06-14 22:29:47 +00:00
Jeff Law 080f1fcb8b * bfd-in.h (bfd_set_section_vma): Case true to a boolean.
(bfd_set_cacheable): Likewise.
	* bfd-in2.h: Rebuilt.
1995-06-12 18:12:00 +00:00
Jeff Law 6167a840e5 * targets.c: Add copy_private_symbol_data and link_split_section
to the target vector.
	* libbfd-in.h (_bfd_generic_bfd_copy_private_symbol_data): Define.
	(_bfd_nolink_bfd_link_split_section): Likewise.
	(bfd_generic_link_split_section): Declare.
	* syms.c (bfd_copy_private_symbol_data): Define.
	* linker.c (bf_link_split_section): Likewise.
	* som.c (som_bfd_copy_private_symbol_data): New function
	(som_bfd_link_split_section): Likewise.
	* All other targets updated with default versions of new routines.

	* Take out my braindamaged bfd_true/bfd_false changes from earlier
	today.  Replace with just:
	* bfd-in.h: (TRUE_FALSE_ALREADY_DEFINED): Define this if
	compiling with g++-2.6 or later.
	* bfd-in2.h: Rebuilt.
1995-06-10 00:05:51 +00:00
Jeff Law 9f28686c2b * bfd-in.h (bfd_true, bfd_false): Define these to true and false
if TRUE_FALSE_ALREADY_DEFINED is not defined.
        * bfd-in2.h: Rebuilt.
1995-06-09 19:40:00 +00:00
Steve Chamberlain d1ec549d7b * elfcode.h (elf_sort_hdrs): Rewrite to be symmetrical. 1995-06-09 19:21:47 +00:00
Jeff Law 3b1f83adad * bfd-in.h: (TRUE_FALSE_ALREADY_DEFINED): Define this if
compiling with g++-2.6 or later.
        (bfd_set_section_vma): Use bfd_true and bfd_false rather than
        true and false.
        (bfd_set_section_alignment): Likewise.
        (bfd_set_section_userdata): Likewise.
        (bfd_set_cacheable): Likewise.
        * bfd-in2.h: Rebuilt.
1995-06-09 19:16:33 +00:00
Steve Chamberlain e6304bc755 * versados.c (struct esd, get_4): Lint; use unsigned chars. 1995-06-09 15:24:09 +00:00
Steve Chamberlain 9ff2fb3d25 * coff-i960.c (coff_i960_relocate): Compare output section names
when converting for vxworks.
1995-06-09 14:57:17 +00:00
Ken Raeburn 0ef449dfad * elfcode.h (elf_fake_sections): Permit .scommon or COMMON sections as random
SHT_NOBITS sections, in case a linker script is strange.
1995-06-08 20:12:25 +00:00
Steve Chamberlain dc1f8593d0 * coff-a29k.c (coff_a29k_adjust_symndx): Completely parenthesize
macro. (pr ld/7127)
1995-06-05 16:11:26 +00:00
Ken Raeburn 9e1b4d5750 Linker support for m68k-elf from Andreas Schwab
<schwab@issan.informatik.uni-dortmund.de>:

* elfcode.h (elf_link_add_object_symbols): Check for NULL when looping through
the symbol hashes.
(elf_bfd_final_link): When looking for _init and _fini don't use the symbol if
it is imported from another object.

* elf32-m68k.c: Relocation type changed from REL to RELA.  Regular and dynamic
linking support functions added, similar to other elf targets.
1995-06-05 07:04:51 +00:00
Ken Raeburn 1be0c30e50 change i386-gnu to elf 1995-06-05 06:36:11 +00:00
Steve Chamberlain c3c112fc84 *** empty log message *** 1995-06-03 02:26:19 +00:00
Steve Chamberlain fa29f969c1 Thu Jun 1 13:51:49 1995 Steve Chamberlain <sac@slash.cygnus.com>
* coffcode.h (sec_to_styp_flags, styp_to_sec_flags,
	coff_new_section_hook):  Any section that starts ".stab"
	is now marked as debugging.
1995-06-01 22:20:30 +00:00
Ken Raeburn db88e79a6a * archive.c (_bfd_write_archive_contents): Disable extended name table until it
can be made optional, so that native AR has half a chance on SunOS and HP/UX.
[PR binutils/6888]
1995-06-01 20:22:53 +00:00
Ken Raeburn 45fb9cd1ee * linker.c (_bfd_generic_link_output_symbols, case bfd_link_hash_indirect): Add
cast to correct pointer types.
1995-06-01 20:17:12 +00:00