Commit Graph

2325 Commits

Author SHA1 Message Date
Ian Lance Taylor
6f904fce87 Tue Jul 11 12:29:49 1995 Rick Sladkey <jrs@world.std.com>
* elf.c (_bfd_elf_find_nearest_line): Handle the simple case where
	there is no debugging information.
1995-07-11 16:31:39 +00:00
Ian Lance Taylor
9ab8a0e87b * coff-arm.c (PCRELOFFSET): Define if not already defined.
* Makefile.in: Rebuild dependencies.
	(BFD32_BACKENDS): Add coff-arm.o
	(CFILES): Add coff-arm.c, pe-arm.c, pei-arm.c.
1995-07-10 18:24:39 +00:00
Ian Lance Taylor
56fd39e800 * cofflink.c (_bfd_coff_generic_relocate_section): Remove unused
local i.
	* coff-arm.c (coff_arm_rtype_to_howto): Don't declare.
1995-07-10 18:16:25 +00:00
Ian Lance Taylor
921fc2819c * coff-i960.c (coff_i960_relocate): Correct typo: use ! on strcmp,
not on string.
1995-07-10 18:11:13 +00:00
Ian Lance Taylor
e336470145 * aoutx.h (NAME(aout,link_hash_table_create)): Allocate hash table
using bfd_alloc, not malloc.
	* cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
	* ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
	* i386linux.c (linux_link_hash_table_create): Likewise.
	* linker.c (_bfd_generic_link_hash_table_create): Likewise.
	* sunos.c (sunos_link_hash_table_create): Likewise.
1995-07-10 18:07:17 +00:00
Ian Lance Taylor
951fe66d62 Based on patches from Eric Youngdale <eric@aib.com>:
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): If -Bsymbolic,
	output a DT_SYMBOLIC dynamic entry.
	(elf_adjust_dynamic_symbol): If -Bsymbolic, don't require a PLT
	entry for a locally defined symbol.
	* elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, do warn
	about undefined symbols, and fill in the GOT entry for a symbol
	defined in a regular object file.
	(elf_i386_finish_dynamic_symbol): If -Bsymbolic, output a RELATIVE
	reloc rather than a GLOB_DAT reloc for a symbol defined in a
	regular object file.
	* elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, do warn
	about undefined symbols, and fill in the GOT entry for a symbol
	defined in a regular object file.
	(elf_m68k_finish_dynamic_symbol): If -Bsymbolic, output a RELATIVE
	reloc rather than a GLOB_DAT reloc for a symbol defined in a
	regular object file.
	* elf32-sparc.c (elf32_sparc_relocate_section): If -Bsymbolic, do
	warn about undefined symbols, and fill in the GOT entry for a
	symbol defined in a regular object file.
	(elf32_sparc_finish_dynamic_symbol): If -Bsymbolic, output a
	RELATIVE reloc rather than a GLOB_DAT reloc for a symbol defined
	in a regular object file.
1995-07-10 17:31:31 +00:00
Ken Raeburn
5b2c2b363d add binary.o, tekhex.o 1995-07-10 15:48:58 +00:00
Ian Lance Taylor
d11d1fb673 * config/m68k-coff.mt (SELECT_VECS): Rename from SELECT_VECTORS.
Correct elements to be actual BFD vector names.
1995-07-10 15:12:33 +00:00
Ian Lance Taylor
65d3ae6b72 * Makefile.in (Makefile): Don't depend upon @frags@.
(config.status): Depend upon @frags@.
1995-07-10 15:11:15 +00:00
Ken Raeburn
943fbd5bd5 fsf address update, but not in COPYING files 1995-07-07 22:49:42 +00:00
Ian Lance Taylor
c7e76b5eea * coffgen.c (coff_renumber_symbols): Sort defined symbols that are
neither BSF_FUNCTION not BSF_NOT_AT_END just before undefined
	symbols.
	* coffcode.h (coff_slurp_symbol_table): Set BSF_FUNCTION as well
	as BSF_NOT_AT_END.
PR 5491.
1995-07-07 21:40:56 +00:00
Ken Raeburn
5375150754 clean up new config stuff for mostlyclean, distclean 1995-07-07 21:34:08 +00:00
Ken Raeburn
60fa79065a clean up new config stuff for mostlyclean, distclean 1995-07-07 21:20:34 +00:00
Ian Lance Taylor
1d5d75e90a * elf32-i386.c (elf_i386_relocate_section): Revert May 24 patch.
Don't copy PC32 reloc against section into shared object.
PR 6997, 7381.
1995-07-06 19:40:51 +00:00
Ian Lance Taylor
b10e9afbfd * Makefile.in: Rebuild dependencies.
(CFILES): Added elflink.c.
	(Makefile): Depend upon config.status, not configure.in.
	(config.status): New target; depend upon configure configure.host
	and config.bfd.
1995-07-06 18:39:19 +00:00
Ken Raeburn
8afe83bed7 copyright notices 1995-07-06 17:12:22 +00:00
Ken Raeburn
d04bc9d6f1 no more configure.in 1995-07-06 17:03:40 +00:00
Ken Raeburn
7c1a9ec39d keep configure; clean elf.c not elfcode.h for arc 1995-07-06 17:03:06 +00:00
Ken Raeburn
5cb0993caf clean configure when cleaning configure.in 1995-07-06 02:59:06 +00:00
Ken Raeburn
0a8310aca8 * Makefile.in (BFD_LIBS): No, don't put elflink.o here.
* configure.in: Include it here whenever elf.o is specified.
1995-07-06 02:28:46 +00:00
Ken Raeburn
ede4eed483 Added new files elflink.c, elflink.h, elfcore.h.
Moved some mostly size-independent stuff from elfcode.h to elf.c, adding a data
structure to elfcode.h with some misc data and callback functions.  Added a
pointer to that structure to the target back end data.  More work can be done
here.

Renamed generic elf routines (not cpu-specific stuff) to start with bfd_elf or
_bfd_elf.  Updated most call sites, sometimes defined some macros.

Moved some dynamic linking support code from m68k, sparc, i386 to common files,
using target back end flags to control behavior.  More work can probably be
done here too.

Moved core- and linker-support code out of elfcode.h to elf.c, elfcore.h,
elflink.h, or elflink.c.  Now elfcode.h contains only .o and executable
support, plus #includes of elfcore.h and elflink.h.  Much of the contents of
these other header files can probably still be moved from the .h files to the
.c files, to get compiled only once.

Cleaned up some "gcc -Wall" warnings regarding unused or uninitialized
variables, in generic and cpu-specific code.
1995-07-06 02:22:00 +00:00
Ian Lance Taylor
6c495350ae * elf32-mips.c (mips_elf_object_p): Unconditionally set
elf_bad_symtab, since sometimes the symbol table is messed up and
	the last symbol is global.
PR 6921.
1995-07-05 20:54:57 +00:00
Ian Lance Taylor
a2546fcef7 * ecoff.c (_bfd_ecoff_bfd_is_local_label): New function.
* libecoff.h (_bfd_ecoff_bfd_is_local_label): Declare.
	* elf32-mips.c (mips_elf_is_local_label): New static function.
	(bfd_elf32_bfd_is_local_label): Define.
PR 6978.
1995-07-05 16:31:07 +00:00
Ian Lance Taylor
9525b61b1b * configure.in: Use $ac_config_sub, not $configsub.
* configure: Likewise.
1995-07-05 14:34:12 +00:00
Ken Raeburn
b6113657eb don't define FASCIST_FDOPEN for i386aix host 1995-07-05 09:47:20 +00:00
Ken Raeburn
e818c22e1b fix usage message on --enable options 1995-07-05 09:38:09 +00:00
Ken Raeburn
8c69366021 autoconfiscation 1995-07-05 09:32:47 +00:00
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