Commit Graph

181 Commits

Author SHA1 Message Date
Nick Clifton
7d6d10f9b3 Arm specific code changed to conform to BFD coding conventions. 1998-04-21 17:07:25 +00:00
Ian Lance Taylor
aed5701ba3 fix tipo in ifdef 1998-03-26 16:00:26 +00:00
Nick Clifton
38c574bbd3 Support interworking for thumb-pe and arm-pe targets. 1998-03-25 23:48:55 +00:00
Ian Lance Taylor
d04efb80db * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
plain numbers.
	(sunos_write_object_contents): Likewise.
	* aoutx.h (NAME(aout,machine_type)): Likewise.
	* coffcode.h (coff_set_arch_mach_hook): Likewise.
1998-03-25 20:21:20 +00:00
Ian Lance Taylor
e8f2efef4d * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
make to reexamine the file timestamp.
	($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.

Mon Feb  2 17:39:39 1998  Steve Haworth  <steve@pm.cse.rmit.EDU.AU>

	Add tms320c30 support:
	* cpu-tic30.c: New file.
	* aout-tic30.c: New file.
	* coff-tic30.c: New file.
	* archures.c (bfd_arch_tic30): Define.
	(bfd_tic30_arch): Declare.
	(bfd_archures_list): Add bfd_tic30_arch.
	* targets.c (bfd_target_vector): Add tic30_aout_vec and
	tic30_coff_vec.
	* reloc.c (BFD_RELOC_TIC30_LDP): Define.
	* coffcode.h (coff_set_arch_mach_hook): Add tic30 case.
	(coff_set_flags): Likewise.
	* config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets.
	* configure.in (tic30_aout_vec, tic30_coff_vec): New vectors.
	* Makefile.am: Rebuild dependencies.
	(ALL_MACHINES): Add cpu-tic30.lo.
	(ALL_MACHINES_CFILES): Add cpu-tic30.c.
	(BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo.
	(BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c.
	* configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
1998-02-02 22:49:54 +00:00
Ian Lance Taylor
86274b9b5c * coffcode.h (_coff_link_output_has_begun): Make static.
(_coff_final_link_postscript): Likewise.
1997-12-11 06:04:39 +00:00
Nick Clifton
0fa555ea62 Add C_THUMBEXT etc. 1997-11-26 22:14:52 +00:00
Nick Clifton
803fea795a Do no set private flags if building a PE port. 1997-11-26 17:31:53 +00:00
Fred Fish
c4188c2a6a * coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
(GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define.
	* coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define.
	* coffcode.h (coff_set_alignment_hook): Conditionally compile in if
	COFF_ALIGN_IN_SECTION_HEADER is defined.  Convert alignment to power
	of two for I960 only.
	* coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO,
	PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide
	default definitions.
	(coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC,
	GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN.
	(coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN.
start-sanitize-tic80
	* Makefile.in (coff-tic80.o): Depends upon coffswap.h.
	* coff-tic80.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
	(GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Define
	*coffcode.h (coff_write_object_contents): Set alignment field in
 	section header for TIC80COFF files.
end-sanitize-tic80
PR 12215 and PR 13061
1997-08-19 16:44:00 +00:00
Ian Lance Taylor
20a9631ae3 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE or
COFF_IMAGE_WITH_PE, don't subtract the section VMA from the symbol
	value.
	* coffgen.c (fixup_symbol_value): Add abfd parameter.  Change all
	callers.  If PE file, don't add section VMA.
	(coff_write_alien_symbol): If PE file, don't add section VMA.
	* cofflink.c (_bfd_coff_link_input_bfd): Likewise.
	(_bfd_coff_write_global_sym): Likewise.
	(_bfd_coff_generic_relocate_section): Likewise.
1997-05-21 21:42:38 +00:00
Nick Clifton
4c4badea81 Added support to LD to select the architecture of an ARM COFF output file
based on the architecture of the first input file.
1997-05-15 21:32:35 +00:00
Nick Clifton
46686c7839 Added support for storing ARM Procedure Calling Standard variant, and ARM
architecture variant in the BFD and COFF structures.  This goes towards
fixing PRs 11709 and 11326 and will integrate with future updates to LD and
GCC.
1997-05-14 17:00:43 +00:00
Ian Lance Taylor
508539ab8b * bfd-in.h: Don't include obstack.h.
(struct bfd_hash_table): Change memory field to PTR.
	* bfd.c (struct _bfd): Change memory field to PTR.
	* bfd-in2.h: Rebuild.
	* libbfd-in.h (bfd_release): Declare as function, don't define as
	macro.
	* libbfd.h: Rebuild.
	* opncls.c: Include "objalloc.h" rather than "obstack.h".  Use
	objalloc routines rather than obstack routines.
	(obstack_chunk_alloc, obstack_chunk_free): Don't define.
	(getpagesize): Don't define.
	(_bfd_new_bfd): Don't set _bfd_chunksize.
	(bfd_openr): Free new bfd and objalloc on failure.
	(bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
	(bfd_alloc_size): Remove.
	(bfd_release): New function.
	* hash.c: Include "objalloc.h" rather than "obstack.h".  Use
	objalloc routines rather than obstack routines.
	(obstack_chunk_alloc, obstack_chunk_free): Don't define.
	* ecofflink.c: Include "objalloc.h" rather than "obstack.h".  Use
	objalloc routines rather than obstack routines.
	(obstack_chunk_alloc, obstack_chunk_free): Don't define.
	(struct accumulate): Change memory to struct objalloc *.
	* liboasys.h (oasys_data_type): Remove oasys_obstack field.
	* dep-in.sed: Don't remove obstack.h from dependency list.
	* Makefile.in: Rebuild dependencies.
	(BFD_H_DEPS): Remove obstack.h.
	(install): Don't install obstack.h.
	* Many files: Don't include "obstack.h".
	* VERSION: Bump.
1997-03-18 00:47:04 +00:00
Ian Lance Taylor
50ede03d76 * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t. Remove
old version of bfd_alloc.
	* libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
	* libbfd.h: Rebuild.
	* Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
1997-03-17 16:36:08 +00:00
Fred Fish
13b58694fb start-sanitize-tic80
* coff-tic80.c (rtype2howto): If passed a relocation type we don't
	understand, just set the howto field to NULL, and the caller will
	print an appropriate error message.
end-sanitize-tic80
	* coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
	code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
	block.  Use NULL for initializations of "ptr" rather than bare 0.
	* coff-h8300.c: Fix typo in comment.
	* coff-h8500.c: Ditto.
	* coff-w65.c: Ditto
	* coff-z8k.c: Ditto.
1997-03-06 19:53:29 +00:00
Ian Lance Taylor
551f302cc8 * coffcode.h (coff_bfd_is_local_label_name): Define as
_bfd_coff_is_local_label_name if not already defined.
	* coffgen.c (_bfd_coff_is_local_label_name): New function.
	* libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
	* libcoff.h: Rebuild.
1997-02-28 04:10:14 +00:00
Ian Lance Taylor
35a3e78edb * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
to _bfd_is_local_label_name.
	(bfd_target): Likewise.
	* syms.c (bfd_is_local_label): Define as function, not macro.
	(bfd_is_local_name): Define.
	* libbfd.c (bfd_generic_is_local_label_name): Rename from
	bfd_generic_is_local_label, and take a string rather than a
	symbol.
	* libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define.
	(_bfd_nosymbols_bfd_is_local_label_name): Define.
 	(bfd_generic_is_local_label): Don't declare.
	(bfd_generic_is_local_label_name): Declare.
	* bfd-in2.h, libbfd.h: Rebuild.
	* All backends: Change local_label to local_label_name.
1997-02-28 02:07:54 +00:00
Fred Fish
28eb95aa33 * Makefile.in (coff-tic80.o): Add coffcode.h to dependency list.
* coff-tic80.c (tic80coff_vec): Data byte order is big endian and
	header byte order is little endian.  Use correct bfd_get and
	bfd_put routines for little endian headers.
	* coffcode.h (coff_set_arch_mach_hook): Set arch to
	bfd_arch_tic80 for TIC80_ARCH_MAGIC number.
1997-01-04 01:24:50 +00:00
Fred Fish
5a608f5bf1 * Makefile.in (BFD32_BACKENDS): Add coff-tic80.o
(ALL_MACHINES): Add cpu-tic80.o
	(cpu-tic80.o, coff-tic80.o): Add dependencies.
	* coff-tic80.c: Add skeleton, cloned from another coff config.
	* coffcode.h (coff_write_object_contents): Set magic to TIC80MAGIC
 	for TIc80.
1996-12-29 17:56:24 +00:00
Ian Lance Taylor
6270adfb59 Fri Dec 13 13:18:49 1996 Dan Wilder <dan@gasboy.com>
* coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
	if NAMES_HAVE_UNDERSCORE is defined.
1996-12-13 18:21:03 +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
Jeff Law
34255b708c No longer need to sanitize away h8/s stuff. 1996-07-05 18:30:03 +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
9aac8e83a0 * coffcode.h (styp_to_sec_flags): Handle long symbol names
when looking for the section symbol.
1996-05-02 02:56:14 +00:00
David Edelsohn
9c7a574803 * coffcode.h (coff_write_object_contents): In comdat section lookup,
stop looking when section is found.
1996-05-02 02:41:20 +00:00
Ian Lance Taylor
e8f3bb64b5 * coffcode.h (STRING_SIZE_SIZE): Define.
(bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
	(bfd_coff_long_section_names): Define.
	(coff_write_object_contents): Handle long section names.
	(bfd_coff_std_swap_table): Initialize new field.
	* libcoff.h: Rebuild.
	* coffgen.c (make_a_section_from_file): Handle long section
	names.
	(coff_write_symbols): Handle long section names.
	* coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
	* coff-mips.c (mips_ecoff_backend_data): Likewise.
	* pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
	* pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
	* pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
	* pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
	* pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
	* pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1996-05-02 02:27:55 +00:00
Michael Meissner
221d1e19de Update for Solaris 1996-04-17 19:05:20 +00:00
Steve Chamberlain
323b430fc4 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
* coffcode.h (coff_compute_section_file_positions): Likewise.
	(coff_write_object_contents): Likewise.
1996-03-31 10:01:29 +00:00
Ian Lance Taylor
5a28331f6d * section.c (SEC_LINK_ONCE): Define.
(SEC_LINK_DUPLICATES): Define.
	(SEC_LINK_DUPLICATES_DISCARD): Define.
	(SEC_LINK_DUPLICATES_ONE_ONLY): Define.
	(SEC_LINK_DUPLICATES_SAME_SIZE): Define.
	(SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
	* bfd-in2.h: Rebuild.
	* coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
	SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
	(styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
	into SEC_EXCLUDE.  If IMAGE_SCN_LNK_COMDAT is set, set
	SEC_LINK_ONCE, and look through the symbol table for the setting
	for SEC_LINK_DUPLICATES.
	(coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
	set for a section, find the section symbol in the symbol table,
	and set the aux entry based on SEC_LINK_DUPLICATES.
	* coffgen.c (coff_print_symbol): Add a space before "checksum".
	* coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
	SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
	* coff-i386.c (i386coff_vec): Likewise.
	* coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
1996-03-29 21:33:59 +00:00
Jeff Law
39f2796643 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
* libbfd.h: Rebuilt.
        * linker.c (generic_link_hash_newfunc): No longer static.
        * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
        to override.
        * coff-h8300.c: Add two derived hash tables and their associated
        funtions and #defines for use by the h8300 linker.
        (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
        the function vector as needed.  Place the address of the function
        vector entry in the location specified by the R_MEM_INDIRECT reloc.
        Rewrite the vectors section contents as necessary.
        (h8300_bfd_link_add_symbols): New function for the h8300 linker.
        (coff_bfd_link_add_symbols): Define to use h8300 specific version.
        (coff_bfd_link_hash_table_create): Likewise.

Linker changes for function vectors.  HMSE.
1996-03-29 06:56:02 +00:00
David Edelsohn
1d8eda7ab4 * coffgen.c (coff_bfd_make_debug_symbol): Improve comment.
* coffcode.h (coff_new_section_hook): Ditto.
1996-03-28 03:34:05 +00:00
Steve Chamberlain
51776a11a6 * coffcode.h (coff_write_object_contents): Allocate
buffers large enough for any FILEHDR or AOUTHDR.
1996-03-22 00:32:05 +00:00
Jeff Law
57289b5c5d * coffcode.h: Allow specific backends to override the
bfd_link_add_symbols routine.
Not used yet, but it will be soon for hmse.
1996-03-14 23:17:50 +00:00
Ian Lance Taylor
cbe75cb664 * archures.c (bfd_mach_i960_hx): Define.
* bfd-in2.h: Rebuild.
	* cpu-i960.c (scan_960_mach): Accept machine "hx".
	(MATRIX): Expand entries for HX.
	(arch_info_struct): Add i960:hx entry.
	* bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
	* coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
	(coff_set_flags): Handle bfd_mach_i960_hx.
1996-02-05 23:57:39 +00:00
Ian Lance Taylor
d19df9b51f Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
* coff-aux.c: New file.
	* hosts/m68kaux.h: New file.
	* config.bfd (m68*-apple-aux*): New target.
	* configure.in (m68*-apple-aux*): New native host.
	(m68kaux_coff_vec): New vector.
	* configure: Rebuild.
	* targets.c (m68kaux_coff_vec): Declare.
	* coffcode.h (bfd_coff_backend_data): Add field
	_bfd_coff_link_add_one_symbol.
	(bfd_coff_link_add_one_symbol): Define.
	(compare_arelent_ptr): New static function if TARG_AUX.
	(coff_write_relocs): If TARG_AUX, sort the relocs.
	(coff_write_object_contents): Set A/UX aouthdr magic number.
	(coff_link_add_one_symbol): Define if not defined.
	(bfd_coff_std_swap_table): Initialize new field.
	* libcoff.h: Rebuild.
	* cofflink.c (coff_link_add_symbols): Call
	bfd_coff_link_add_one_symbol rather than
	_bfd_generic_link_add_one_symbol.
	* coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
	* coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
	* coff-mips.c (mips_ecoff_backend_data): Likewise.
	* Makefile.in: Rebuild dependencies.
	(BFD32_BACKENDS): Add coff-aux.o.
	(BFD32_BACKENDS_CFILES): Add coff-aux.c.
1996-01-31 18:17:12 +00:00
Ian Lance Taylor
c703f5399e remove incorrect BFD_ASSERT from last patch 1996-01-24 22:01:29 +00:00
Ian Lance Taylor
4a3d3b42bd * coffcode.h (coff_new_section_hook): Don't try to align the
.stabstr section.
1996-01-23 22:27:47 +00:00
Ian Lance Taylor
5a4d8c4070 tipo 1996-01-23 20:53:31 +00:00
Ian Lance Taylor
5eb83edeab * coffcode.h (coff_set_section_contents): Fix the handling of the
.lib section to work even if the entire section contents are
	written at once.  From Gvran Uddeborg <gvran@uddeborg.pp.se> and
	Robert Lipe <robertl@arnet.com>.
1996-01-23 19:26:01 +00:00
Kim Knuttila
e7894f6b5d Numerous PowerPC PE fixes 1996-01-19 00:16:31 +00:00
Ian Lance Taylor
d812945a9a * coffcode.h (coff_write_object_contents): If we don't know the
section of the entry point for an XCOFF executable, always set the
	entry address to -1.
1996-01-03 20:07:39 +00:00
Ian Lance Taylor
010a405a94 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
s_vaddr.
	* coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
	vma.
	* ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
1995-12-15 17:07:00 +00:00
Kim Knuttila
caa740beb8 Fixes for .reloc 1995-12-12 23:47:05 +00:00
Kim Knuttila
545bf026d5 Removed some debugging prints. duh 1995-12-04 21:47:37 +00:00
Kim Knuttila
590662481c PowerPC DLL Support 1995-12-01 01:01:42 +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
31a52a5145 * coffcode.h (coff_compute_section_file_positions): Only pad the
previous section to force file alignment when creating an
	executable.
PR 8325.
1995-11-21 18:04:42 +00:00
Ian Lance Taylor
a418e05d6d * coffcode.h (coff_compute_section_file_positions): If
RS6000COFF_C, set up the .debug section.
1995-11-20 22:23:30 +00:00
Stan Shebs
c769947b4a * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
* coff-rs6000.c (rs6000coff_vec): Add conditional defines
	TARGET_SYM and TARGET_NAME for vector and BFD name.
	* coff-pmac.c (pmac_xcoff_vec): Remove.
	(TARGET_SYM, TARGET_NAME): Define.
	* coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
	machine to 0, not all PowerMacs are 601s.
1995-11-12 20:39:38 +00:00
Ian Lance Taylor
7906bf87b9 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
if RS6000COFF_C.
1995-11-09 18:26:10 +00:00