Commit Graph

25 Commits

Author SHA1 Message Date
Ian Lance Taylor 58142f101d * libbfd.c (bfd_malloc, bfd_realloc): New functions.
(bfd_zmalloc): Return PTR, not char *.  Take size_t, not
	bfd_size_type.
	* libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
	(bfd_zmalloc): Change declaration.
	* libbfd.h: Rebuild.
	* Many files: Use bfd_malloc and bfd_realloc rather than malloc
	and realloc.  Don't set bfd_error_no_memory if they fail.
1995-12-01 19:48:10 +00:00
Ian Lance Taylor a9713b91a7 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
obstack_alloc fails.
	(bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
	fails.
	* libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
	* Many files: don't set bfd_error_no_memory if one of the above
	routines fails.
1995-11-29 22:05:37 +00:00
Ian Lance Taylor a208a70f7a Convert i960 COFF to use COFF backend linker.
* coff-i960.c (coff_i960_relocate): Use a coff_section_data
	structure to store the symbol being used.
	(coff_i960_start_final_link): New static function.
	(coff_i960_relocate_section): New static function.
	(coff_i960_adjust_symndx): New static function.
	(coff_start_final_link): Define.
	(coff_relocate_section): Define.
	(coff_adjust_symndx): Define.
	* coffcode.h (bfd_coff_backend_data): Add new callback function
	_bfd_coff_start_final_link.
	(bfd_coff_start_final_link): Define.
	(coff_start_final_link): Define if not defined.
	(bfd_coff_std_swap_table): Add coff_start_final_link.
	* cofflink.c (_bfd_coff_internal_syment_name): Make globally
	visible.
	(_bfd_coff_final_link): Call bfd_coff_start_final_link if the
	function callback is not NULL.
	* libcoff-in.h (struct coff_section_tdata): Add tdata field.
	(_bfd_coff_internal_syment_name): Declare.
	* libcoff.h: Rebuild.
	* configure.in (icoff_big_vec): Add cofflink.o.
	(icoff_little_vec): Likewise.
	* configure: Rebuild.
1995-09-14 19:03:21 +00:00
Ken Raeburn 943fbd5bd5 fsf address update, but not in COPYING files 1995-07-07 22:49:42 +00:00
Jean Marie Diaz 1b8a11d430 * coff-i960.c (coff_i960_relocate): Rewrote to change relocs
against locally defined symbols into relocs against section
	symbols, for VxWorks 5.1.
1994-08-03 20:51:59 +00:00
Jean Marie Diaz 5e694c29a5 * coff-i960.c (coff_i960_relocate): New function.
(howto_rellong, howto_iprmed): Use it as special_function.
1994-08-02 15:26:26 +00:00
Ken Raeburn ffeef0bbcb (howto_rellong, howto_iprmed, howto_optcall): Use HOWTO macro. 1994-07-27 00:11:56 +00:00
Ian Lance Taylor 22aabad533 * coff-i960.c (coff_i960_reloc_type_lookup): Add BFD_RELOC_CTOR.
* linker.c (_bfd_generic_link_write_global_symbol): Don't assume
	the section of a common symbol is not NULL.
1994-06-10 17:27:22 +00:00
Ian Lance Taylor 6812b6077e * targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
	_bfd_debug_info_accumulate, which were never used.
	(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
	(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
	(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
	(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
	* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
	rather than the single JUMP_TABLE macro.  Removed many of the
	weird macro definitions needed to support the monolithic
	JUMP_TABLE.
	* bfd-in.h (JUMP_TABLE): Removed.
	* libbfd-in.h: Define a bunch of macros, and declare a few
	functions, for use with the new BFD_JUMP_TABLE_* macros.
	* libbfd.c (_bfd_dummy_new_section_hook): Removed.
	(bfd_false): Set bfd_error_invalid_operation.
	(bfd_nullvoidptr): Likewise.
	(bfd_n1): New function.
	(_bfd_nocore_core_file_matches_executable_p): Renamed from
	_bfd_dummy_core_file_matches_executable_p.
	(_bfd_nocore_core_file_failing_command): Similar rename.  Set
	bfd_error_invalid_operation.
	(_bfd_nocore_core_file_failing_signal): Likewise.
	(_bfd_generic_get_section_contents): Renamed from
	bfd_generic_get_section_contents.  Changed all callers.
	(_bfd_generic_set_section_contents): Similar rename.
	* ieee.c: #if 0 out ieee_bfd_debug_info_start,
	ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate.  They
	were never called.
	* bfd-in2.h: Rebuilt.
	* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
Steve Chamberlain 294eaca479 Some of these are guesses, if you know different, just yell.
Thu Oct  8 08:52:48 1992  Steve Chamberlain  (sac@thepub.cygnus.com)

	 Now a bfd knows whether underscores are normally prepended
	 to symbols in its file format. Helps with error messages.

	* aout-adobe.c, aout-target.h, bout.c, coff-a29k.c, coff-h8300.c,
	coff-z8k.c: targets set so they have leading underscore
	* coff-i386.c, coff-i960.c, coff-m68k.c, coff-mips.c, coff-m88k.c,
	coff-rs6000.c, coff-we32k.c, elf.c, ieee.c, srec.c: targets set
	without leading underscore flag
	* targets.c: add symbol leading char to xvec description
	* bfd-in.h (bfd_get_symbol_leading_char): new macro.
1992-10-08 16:02:09 +00:00
Ken Raeburn 8070f29df5 Lots of changes from gas-bfd work. Includes:
* working reloc lookup support
 * better support for creation of COFF files from scratch
 * misc doc changes, macro tweaks, "const" additions, typo fixes, etc.
 * one or two ugly kludges that should get cleaned up (but what's one
   or two more, in BFD?)
See ChangeLog for details.
1992-05-26 03:45:31 +00:00
Steve Chamberlain 3b4f1a5d05 * Makefile.in: added coff-h8300
* configure.in: now h8 is a coff target
	* cpu-h8300.c: fix various disassembly problems
	* libcoff.h: took out some code which has been #0ed for a long
	time.
	* targets.c: added h8 coff
	* coff-a29k.c, coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c
	added new macro RTYPE2HOWTO to take a load of #ifdefs out of
	coffcode.h
	* coffcode.h: Started to change the way machine dependencies are
	handled, from the nest of #ifdefs to macros defined in the
	including coff-<foo>.c
1991-11-27 16:56:08 +00:00
Steve Chamberlain 2700c3c75a *** empty log message *** 1991-05-30 22:33:01 +00:00
John Gilmore 924bbb3815 Remove coff-code.h in favor of coffcode.h. 1991-05-29 02:52:34 +00:00
Steve Chamberlain 7ed4093abc *** empty log message *** 1991-05-21 00:14:16 +00:00
Steve Chamberlain 19b03b7aa4 *** empty log message *** 1991-05-18 02:57:45 +00:00
Steve Chamberlain 8e3c8f4755 *** empty log message *** 1991-05-11 02:22:21 +00:00
John Gilmore 2b1d8a50a0 Cleanups of interface, including close_and_cleanup and write_contents
transfer vector changes.  See ChangeLog.
1991-05-11 00:38:47 +00:00
Steve Chamberlain e5b919b168 Fixed all the places where there were problems with the size and
alignments of structures on disk and structures in memory. #ifed out
all the code in coffswap.c, since it should be done using the target
swap routines now.
1991-05-10 19:33:37 +00:00
John Gilmore fc7233808a Merge devo/bfd with GDB's bfd.
Remove obstack.h to ../include and obstack.c to ../libiberty.
Move COFF symbol swapping code to coffswap.c where GDB can call it but it
won't be duplicated if we have N different COFF targets.
Add support for traditional Unix core files (with a upage).  This support
is from an Ultrix port, but is probably slightly broken now.
Improve bfd_release's of obstack'd items on error returns.
gcc -Wall fixes.
Handle section alignment slightly better in coff, and comment where it
needs more work (on page-aligning virtual vs file addresses for DPAGED).
Use set_tdata everywhere that tdata is set, to avoid "cast to the left
of assignment" problems with some compilers.
Move bfd_alloc, bfd_zalloc, bfd_realloc, and bfd_release into libbfd.h
(from bfd.h) since they are internal routines.
Remove the redundant suffix "_struct" from struct tags.
Set symbol count early in file reading, before slurping in the syms,
for GDB's use.
1991-05-02 04:11:40 +00:00
Steve Chamberlain 4cddd1c904 Changed the shape of the howto type yet again.
Now m88kbcs support can self host.
1991-04-24 20:51:27 +00:00
Steve Chamberlain 9872a49c27 *** empty log message *** 1991-04-23 16:02:09 +00:00
Steve Chamberlain b6fc45ca4c *** empty log message *** 1991-04-04 17:55:47 +00:00
Steve Chamberlain 4bf6219f87 Added ansidecl.h 1991-04-03 22:07:29 +00:00
David Henkel-Wallace 4a81b56152 Initial revision 1991-03-21 21:11:25 +00:00