Commit Graph

1406 Commits

Author SHA1 Message Date
Stu Grossman 9e6f24986a * nlmcode.h: Fixes to avoid compiler warnings... 1993-12-07 23:49:32 +00:00
Ian Lance Taylor 900e6d96f3 * libnlm.h (nlm_backend_data): Removed macro definition.
(nlm_alpha_backend_data): Adjusted accordingly.
1993-12-07 23:13:43 +00:00
Jeff Law f6c2300b0a * som.c (som_begin_writing): Flesh out code for handling simple
auxiliary headers.
        (bfd_som_attach_aux_hdr): New function.

        * som.h (struct somdata): Add fields for attaching version and
        copyright headers.  Add accessor macros.
1993-12-06 08:53:53 +00:00
Jeff Law 744069b8ab * som.c (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Add protected
definitions for old versions of HPUX which fail to define them.
        (som_hppa_howto_talbe): Add R_DLT_REL, R_AUX_UNWIND, and R_SEC_STMT
        now that they're safe.  Delete bogus R_STATEMENT relocations.
1993-12-06 06:55:48 +00:00
Jeff Law 017a52d7a9 * som.c (som_hppa_howto_table): Add missing R_END_TRY. Delete
extra R_DATA_OVERRIDE.
        (hppa_som_gen_reloc_type): Generate a relocation for the rounding
        mode selector if needed.
        (som_write_fixups): Handle requests for a change in the default
        rounding mode.  Rounding modes do not consume input bytes, but
        are just markers much like R_ENTRY and R_EXIT.
1993-12-06 03:33:06 +00:00
Jeff Law 4861ac76c7 * elf32-hppa.c: (elf_hppa_howto_table): PLABEL and DLT
relocations are not pc-relative.
1993-12-05 03:46:12 +00:00
Jeff Law 48eb5281b5 Fri Dec 3 09:55:17 1993 Pete Hoogenboom (hoogen@cs.utah.edu)
* hppa_stubs.h: (BLE_N_XXX_0_31):  New instruction used in
        linker stub code.
        (COPY_2_31):  Likewise.
1993-12-05 03:41:25 +00:00
Ian Lance Taylor ecb2d88791 * config/solaris2.mh (HDEFINES): Remove -Dconst=
* hosts/solaris.h: If not __GNUC__, define const as empty.
1993-12-03 23:42:59 +00:00
Ian Lance Taylor 4919d3ab70 * ecoff.c: Added various casts for 32/64 bit cross targeting.
(ecoff_mkobject_hook): Set SEC_SHARED_LIBRARY for the .reginfo
	section so that the linker ignores it.
	* ecofflink.c: Added various casts for 32/64 bit cross targeting.
	(ecoff_add_bytes): Changed need argument to size_t.
	(bfd_ecoff_debug_link_other): Check return value of
	ecoff_add_string.
1993-12-02 23:27:15 +00:00
Ian Lance Taylor 800748cdfc * libnlm.h (struct nlm_obj_tdata): New field backend_data.
(nlm_backend_data, nlm_alpha_backend_data): New accessor macros.
	(struct nlm_backend_data): New field no_uninitialized_data.
	(nlm_no_uninitialized_data): New accessor macro.
	* nlmcode.h (nlm_compute_section_file_positions): Handle
	no_uninitialized_data.
	(nlm_external_reloc_compare): Sort relocs by address for a
	particular symbol, to make the sort more stable.
	(nlm_write_object_contents): Cast the arguments to qsort.  Get the
	value of a debugging symbol the same way we get the value of a
	normal symbol.
	* nlm32-alpha.c: Various changes.  Write out GP and .lita relocs.
	Set no_uninitialized_data to true.
	* nlm32-i386.c (nlm32_i386_backend), nlm32-sparc.c
	(nlm32_sparc_backend): Set no_uninitialized_data field false.
	* nlmswap.h (nlm_swap_fixed_header_out): Zero out destination
	before filling it in.
1993-12-02 20:52:25 +00:00
Jeff Law a7f6a456c8 * som.c (som_section_type, som_decode_symcalss): New functions.
(som_get_symbol_info): Use them.
        (som_slurp_symbol_table): Set the section of common and undefined
        symbols correctly.
1993-12-02 05:48:46 +00:00
Ian Lance Taylor 68eaffda25 Various entries. 1993-12-02 02:22:59 +00:00
Ian Lance Taylor cdbfad1cd7 * libnlm.h (struct nlm_backend_data): New fields
optional_prefix_size, nlm_backend_object_p, nlm_write_prefix,
	nlm_set_public_section, nlm_get_public_offset.  Removed unused
	nlm_write_reloc field.  Changed nlm_write_import to remove
	unnecessary symbol argument.  Renamed nlm_write_externals to
	nlm_write_external, and changed cound argument from bfd_vma to
	bfd_size_type.
	(nlm_optional_prefix_size, nlm_backend_object_p_func,
	nlm_write_prefix_func, nlm_set_public_section_func,
	nlm_get_public_offset_func): New accessor macros.
	(nlm_write_reloc_func): Removed.
	(nlm_write_external_func): Adjusted for field renaming.
	* nlm32-i386.c (nlm_i386_write_import): Renamed from
	nlm_i386_write_reloc.  Removed old nlm_i386_write_import which
	just called old nlm_i386_write_reloc.
	(nlm_i386_write_external): Renamed from nlm_i386_write_externals.
	Declared.  Changed second argument from bfd_vma to bfd_size_type.
	(nlm32_i386_backend): Adjusted for changes to fields and names.
	* nlm32-sparc.c (nlm_sparc_mangle_relocs): Removed unused,
	ifdeffed out code.
	(nlm_sparc_write_import): Removed second argument.
	(nlm_sparc_write_external): Renamed from
	nlm_sparc_write_externals.  Changed second argument from bfd_vma
	to bfd_size_type.
	(nlm32_sparc_backend): Adjusted for changes to fields and names.
	* nlmcode.h: Removed some unused code.
	(nlm_object_p): Don't destroy tdata pointer.  Call
	backend_object_p function if it exists.
	(nlm_slurp_symbol_table): Removed unused variable rcount.  Call
	set_public_section_func if it exists instead of checking
	NLM_HIBIT.
	(nlm_compute_section_file_positions): Account for
	optional_prefix_size.
	(nlm_write_object_contents): Account for optional_prefix_size.
	Removed useless variable write_reloc_func.  Changed declaration
	and call of write_import_func.  Call write_prefix_func if it
	exists.  Removed unused variables len and temp.  Call
	get_public_offset_func if it exists rather than setting NLM_HIBIT.
1993-12-02 02:22:35 +00:00
Ian Lance Taylor f7912fb476 * nlmswap.h: Declare functions. 1993-12-02 02:19:25 +00:00
Ian Lance Taylor 1bbabdad48 New files for preliminary Alpha NetWare support. 1993-12-02 01:46:53 +00:00
Ken Raeburn 848ace961e various 1993-12-01 22:37:57 +00:00
Ken Raeburn 6a6676fbcc handle sparccoff_vec 1993-12-01 22:27:03 +00:00
Ken Raeburn 5984f609d0 declare sparccoff_vec 1993-12-01 22:26:33 +00:00
Ken Raeburn fff9ad371a handle sparc*-*-coff* 1993-12-01 22:26:06 +00:00
Ian Lance Taylor 2f555d79cd Various entries. Added entries for NetWare changes made by Sean a
couple of weeks ago.
1993-12-01 20:06:43 +00:00
Ian Lance Taylor 074c4a12b1 Added copyright notice and comments. 1993-12-01 20:01:08 +00:00
Ian Lance Taylor e92512bb28 * hosts/alphaosf.h (uint64_typeLOW, uint64_typeHIGH): Cast results
to unsigned long.
1993-12-01 19:51:19 +00:00
Ian Lance Taylor 5dac2dd5a4 * config.bfd: Don't set target64 here, as the setting is ignored.
* configure.in (ecoffalpha_little_vec): Set target64.
1993-12-01 19:47:15 +00:00
Ian Lance Taylor 4aed7f2496 * bfd-in.h (uint64_typeLOW, uint64_typeHIGH): Fully parenthesize
for clarity.
	(fprintf_vma, sprintf_vma): Use %lx, not %x.
	* bfd-in2.h: Rebuilt.
1993-12-01 19:41:16 +00:00
Ian Lance Taylor 7cd39d6914 Irix 4 core support entries. 1993-11-30 21:58:09 +00:00
Ian Lance Taylor dabfe2f665 * irix-core.c: New file for Irix 4 and Irix 5 core support.
Functions taken out of coff-mips.c.  Handle vmap type VMAPFILE.
	* coff-mips.c: Irix 4 core file support moved to irix-core.c.
	* targets.c: If IRIX_CORE defined, include irix_core_vec in
	target_vector.
	* config/irix4.mh (HDEFINES): Add -DIRIX_CORE.
	(HDEPFILES): Define to be irix-core.o.
	* config/irix5.mh (HDEFINES): Define to be -DIRIX_CORE.
	(HDEPFILES): Define to be irix-core.o.
	* Makefile.in (OPTIONAL_BACKENDS): Added irix-core.o.  Removed
	sco-core.o, which no longer exists.
	(CFILES): Added all *-core.c files.
	Rebuilt dependencies.
1993-11-30 21:56:40 +00:00
Ian Lance Taylor 7ce1a44680 New file for Irix 4 and Irix 5 core file support. Split out of
coff-mips.c.
1993-11-30 21:45:15 +00:00
Ian Lance Taylor 6c35a16d6a * elfcode.h (map_program_segments): Restore check of file_size !=
mem_size, but only if SHT_PROGBITS.
1993-11-24 07:31:02 +00:00
Ian Lance Taylor 8d12f138ea * ecofflink.c: New file to hold ECOFF debug information linking
routines.
	* ecoff.c (ecoff_clear_output_flags, ecoff_rel, ecoff_dump_seclet,
	ecoff_add_string, ecoff_get_debug): Removed.  Functionality now in
	ecofflink.c.
	(ecoff_get_extr, ecoff_set_index): New functions.
	(ecoff_slurp_symbolic_info): Don't save raw_size.
	(ecoff_bfd_seclet_link): Rewrote to use ecofflink.c functions.
	(ecoff_compute_section_file_positions): Don't set EXEC_P just
	because there is a start address.
	(ecoff_write_object_contents): Handle external symbols here.  Use
	ecofflink.c functions to write out debugging information.
	* elf32-mips.c (mips_elf_read_ecoff_info, mips_elf_get_extr,
	mips_elf_set_index): New functions.
	(mips_elf_seclet_link): Discard empty sections, the .options
	section and .gptab sections.  Handle linking .mdebug section.
	* libecoff.h (ecoff_data_type): Removed raw_size and ifdbase.
	* libelf.h (elf_symbol_type): Added mips_extr to tc_data union.
	* bfd-in.h: Added prototypes for routines in ecofflink.c (some are
	called by gas, so they are public).
	* bfd-in2.h: Rebuilt.
	* Makefile.in (BFD_LIBS): Added ecofflink.o.
	(CFILES): Added ecofflink.c.
	(ecofflink.o): New target.  Rebuilt dependencies.
1993-11-24 07:21:28 +00:00
Ian Lance Taylor 71efdf833f New file to hold ECOFF linking routines used by both ECOFF and MIPS ELF. 1993-11-24 07:18:44 +00:00
Steve Chamberlain ceeca31c76 Split ChangeLog into two. 1993-11-23 08:06:20 +00:00
Jeff Law abb324b2c9 * som.c (hppa_object_p): Also recognize SHARED_MAGIC_CNX as
a valid magic number if it's been defined.
1993-11-23 06:27:45 +00:00
Ian Lance Taylor 8f45f60421 * ecoff.c (ecoff_mkobject): Don't create .scommon section; linker
no longer requires it.
	(ecoff_bfd_seclet_link, ecoff_sizeof_headers,
	ecoff_write_object_contents): Don't treat .scommon section
	specially
1993-11-22 19:22:23 +00:00
Fred Fish c236d8b3a5 * bfd/config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.
* bfd/config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o.
	* bfd/ptrace-core.c:  New file for dealing with core files with
	start with the ptrace_user structure found on BCS compliant systems.
	* bfd/targets.c (ptrace_core_vec):  New vector.
1993-11-22 19:01:55 +00:00
Jeff Law 36456a67f8 * Minimal support for reading SOM fixup streams. Allows
objdump -r to do something reasonable.
        * som.c (som_get_reloc_upper_bound): Implement.
        (som_canonicalize_reloc): Implement.
        (som_set_reloc_info, som_slurp_reloc_table): New functions.
1993-11-22 10:37:02 +00:00
Ken Raeburn c60af619fb Modified to be based on lynx.h, like i386 and m68k versions. 1993-11-21 21:29:46 +00:00
Ken Raeburn 196f097043 define FPRINTF_ALREADY_DECLARED 1993-11-21 21:28:01 +00:00
Ian Lance Taylor 533af0314f * coff-a29k.c (a29k_reloc): For R_IREL, don't left shift
signed_value before sign extending it.  Don't subtract out
	reloc_entry->address.  This makes it compatible with what gas is
	generating.

Fixes PR 3790.
1993-11-19 19:51:52 +00:00
Ian Lance Taylor a1bff336ec * elfcode.h (elf_fake_sections): Accept .sbss as the name for a
SHT_NOBITS sections.
	(map_program_segments): Don't leave the loop after the first
	SHT_NOBITS section.
	(assign_file_positions_except_relocs): Only force sh_offset and
	sh_addr to match modulo maxpagesize for a section which is not
	SHT_NOBITS.  Changed the method used to force page alignment after
	a SHT_NOBITS section to only do it for the last such consecutive
	section, and to really force page alignment.
1993-11-19 19:41:49 +00:00
Ken Raeburn 4c01d9b5be * coffcode.h (coff_slurp_symbol_table): Print more verbose message
in the case of an unknown (or unhandled) storage class.
1993-11-19 19:17:14 +00:00
Ken Raeburn 96be1f522f recent coff/lynx changes 1993-11-19 17:00:07 +00:00
Ken Raeburn ab31ae5384 (coff_bfd_reloc_type_lookup): Don't define if already defined.
(coff_slurp_line_table): Reformatted.
1993-11-19 16:30:08 +00:00
Ian Lance Taylor f8944f8414 Various entries. 1993-11-18 17:24:53 +00:00
Ian Lance Taylor 062189c6ea * elfcode.h (bfd_section_from_shdr): Don't dump core if target
section has no ELF section data.
	(elf_make_sections): Set addralign of reloc section to 4.
	(elf_fake_sections): Likewise.
	(map_program_segments):	Don't consider section 0.
	(assign_file_positions_except_relocs): Don't consider section 0.
	In the main loop, skip the symtab and strtab sections, since their
	positions are set elsewhere.
	(swap_out_syms): Set addralign of symtab section to 4.  Set
	addralign of strtab sections to 1.
	(assign_file_positions_for_relocs): Don't consider section 0.
	(write_object_contents): Don't write out section 0.
	(sym_is_global): Take abfd argument.  Call
	elf_backend_sym_is_global if it is not NULL.
	(elf_map_symbols): Pass abfd to sym_is_global.
	(write_object_contents): Call elf_backend_final_write_processing
	if it is defined.
1993-11-18 17:12:47 +00:00
Ian Lance Taylor 643e9fc768 * libelf.h (struct elf_backend_data): Added fields
elf_backend_sym_is_global and elf_backend_final_write_processing.
	* elf32-target.h (elf32_bed): Added corresponding initializers.
	* elf64-target.h (elf64_bed): Likewise.
1993-11-18 17:10:42 +00:00
Ian Lance Taylor c9668c588a * libecoff.h: Include coff/ecoff.h.
(struct ecoff_backend_data): Move external debugging information
	fields into a single field pointing to an ecoff_debug_swap
	structure.
	(ecoff_data_type): Move debugging information fields into a single
	field pointing to an ecoff_debug_info structure.
	* coff-alpha.c, coff-mips.c, ecoff.c: Corresponding changes.
1993-11-18 00:07:33 +00:00
Stan Shebs 55ff7aef7e Wed Nov 17 13:56:10 1993 Stan Shebs (shebs@rtl.cygnus.com)
* i386lynx.c (swap_std_reloc_in, swap_ext_reloc_in): Ignore
	garbage bits appearing in the upper end of symbolnums.

	* config/sparc-lynx.mt (TDEFINES): Add -DFPRINTF_ALREADY_DECLARED.
1993-11-17 23:25:23 +00:00
Sean Eric Fagan c96451db27 Need to declare nlm32_sparc_vec; oopsie. 1993-11-17 20:31:32 +00:00
Sean Eric Fagan 38f422db00 Don't want the new files to disappear unexpectedly! 1993-11-17 19:54:51 +00:00
Sean Eric Fagan 4a703e0610 Two more files in BFD updated for NetWARE/SPARC. 1993-11-17 19:54:02 +00:00