Commit Graph

1353 Commits

Author SHA1 Message Date
Jim Kingdon 6198b7a128 * config.bfd: Use m68k-elf for m68*-*-sysv4*. 1993-11-01 15:19:29 +00:00
Jim Kingdon 9e461dac71 * targets.c: Move enum target_flavour outside of struct and change
the name to enum bfd_flavour.  This means bfd clients can use it.
	* bfd-in.h: Add macro bfd_get_flavour.
	* bfd-in2.h: Rebuilt.
1993-10-31 18:59:59 +00:00
Jim Kingdon e6d739ebb5 * som.c: Add comment about how abort() on corrupt executable is evil. 1993-10-31 15:40:58 +00:00
David MacKenzie 66efa7af07 test 1993-10-29 19:05:11 +00:00
Ian Lance Taylor 9f9af845ab * bfd-in.h: Added commands for object file flag values.
* bfd-in2.h: Rebuilt.
	* elfcode.h (elf_object_p): If type is ET_DYN, set DYNAMIC flag,
	not EXEC_P.
	* bout.c, coff-h8300.c, coff-sh.c: Add BFD_IS_RELAXABLE to
	object_flags field for target vector.
	* aix386-core.c, aout-adobe.c, aout-target.h, bout.c, coff-a29k.c,
	coff-alpha.c, coff-apollo.c, coff-h8300.c, coff-h8500.c,
	coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c, coff-mips.c,
	coff-rs6000.c, coff-sh.c, coff-we32k.c, coff-z8k.c, hpux-core.c,
	ieee.c, mipsbsd.c, nlm-target.h, oasys.c, osf-core.c, som.c,
	srec.c, tekhex.c, trad-core.c:	Remove DYNAMIC from object_flags
	field for target vector.
1993-10-29 18:04:58 +00:00
David MacKenzie af8a2fda3f initial mach3 386 support (not working yet) 1993-10-29 15:28:30 +00:00
Stan Shebs 20f951757e Minor changes, plus definitions for Sparc Lynx host. 1993-10-29 02:03:32 +00:00
Stan Shebs c9368a3bc3 A number of minor Lynx-related changes, plus basic Sparc Lynx support. 1993-10-29 02:01:43 +00:00
Ian Lance Taylor 14aa9a78c3 gcc -Wall lint:
* coff-h8300.c (h8300_reloc16_estimate): Declare return type.
	Remove useless statement probably left by code copy.
	* cpu-i960.c (compatible): Fully bracket matrix initializer.
	* elf32-hppa.c (hppa_elf_build_arg_reloc_stub): Use bfd_xmalloc
	rather than xmalloc.  Use realloc and check the return value
	rather than xrealloc.
	(hppa_elf_get_section_contents): Add some casts.
	* elf32-i386.c (elf_i386_reloc_type_lookup): Remove unused
	variable.  Add default case to switch.
	* hp300hpux.c: Declare aout_32_write_syms.
	* i386bsd.c, i386linux.c, netbsd386.c (N_SHARED_LIB): Define as 0
	(definition from aout/aout64.h is always 0 anyhow).
	* i386lynx.c (swap_std_reloc_in): Remove unused variable.
	* ieee.c (ieee_write_id): length can never be negative.
	(read_id): Likewise.
	(ieee_archive_p): Remove unused variable.
	* libcoff-in.h (bfd_perform_slip): Declare.
	* libcoff.h: Rebuilt.
	* oasys.c (oasys_write_sections): Remove zero initialization of
	static structure.
	* reloc16.c: Indentation change.
1993-10-28 20:36:48 +00:00
Jim Kingdon 2487f88fdc * configure.in, config/i386-mach3.mt: Update for new configuration
(--with-targets	and so on).
	* hosts/i386mach3.h: Declare errno.
	* targets.c: Declare i386mach3_vec.
1993-10-28 04:05:28 +00:00
Ian Lance Taylor ce9416d8f4 * nlmcode.h (nlm_swap_auxiliary_headers_in,
nlm_swap_auxiliary_headers_out): Handle sharedDebugRecordOffset
	and sharedDebugRecordCount fields.
1993-10-27 16:21:30 +00:00
Jim Kingdon 56a2f3410f * targets.c (target_vector): Remove SCO_CORE. On Sep 11 1993,
we started using trad-core.c for SCO instead.

	* targets.c (target_vector): Re-enable generic ELF and NLM targets.
1993-10-26 21:36:00 +00:00
Ian Lance Taylor f035cc474f * elfcode.h (assign_file_position_for_section): Align sh_offset to
sh_addralign (this is what UnixWare does, and it shouldn't hurt).
1993-10-26 20:58:54 +00:00
Ken Raeburn 7218bb04b2 From Jeff Law and Pete Hoogenboom at Utah:
* elf32-hppa.h (hppa_elf_stub_finish): Add prototype.
(ELF32_HPPA_R_ARG_RELOC): Renamed without the ELF32 prefix
and moved into libhppa.h.  All references changed.
(ELF32_HPPA_R_CONSTANT, ELF32_HPPA_R_ADDEND): Likewise.
(get_opcode and opcode defines): Move into libhppa.h
* elf32-hppa.c (hppa_elf_insn2fmt): Rename and move info libhppa.h.
* libhppa.h (HPPA_R_*): Moved here.  Reformatted slightly to make for easier
reading.
(get_opcode): Moved here.  FIXME! this really should be a C function
inside the opcode library!
(bfd_hppa_insn2fmt): Likewise.

* targets.c (target_vector): Enable elf32-hppa vector.

* elf32-hppa.c (hppa_elf_get_section_contents): Add new comments and clarify
existing comments.  Do not use DEFUN to declare this function.  Fix numerous
indention problems.  Correctly handle cases where symbol extension section may
need to be read from disk, read from memory, or built then read from memory.

* elf32-hppa.h: Reformat with gnu-indent and hand fix numerous
formatting and indention problems gnu-indent can not handle.
Clarify some comments about relocation types.  Comment basic
relocation "classes".  Group PARAM declarations together.
(HPPA_SXT_{NULL, SYMNDX, RG_RELOC}): Make members of a new
enumerated type rather than #defines.
1993-10-26 17:22:20 +00:00
Stu Grossman 9e16fcf124 * som.c (hppa_object_setup): Set SEC_CODE for .text section so
that GDB can figure out text_start and text_end.
1993-10-26 09:42:15 +00:00
Ian Lance Taylor 56775366f3 Fix up warnings from gcc -Wall:
* coffgen.c (coff_print_symbol): Use %lx and cast n_value to
	unsigned long.  Use %ld for tagndx.  Use %lx for offset + vma and
	cast it to unsigned long.
	* ecoff.c (ecoff_emit_aggregate): Use %ld.
	(ecoff_print_symbol): Use %ld, and cast indx and sym_base to long.
	* coffcode.h (dummy_reloc16_estimate): Specify return type.
1993-10-25 21:22:33 +00:00
Ian Lance Taylor df34342bde * libbfd.c (bfd_write): If not everything is written out, set
bfd_error to system_call_error.  If the return value is
	non-negative, set errno to ENOSPC (if ENOSPC is defined).
	(bfd_seek): If the seek fails, set bfd_error to system_call_error.
	(bfd_generic_set_section_contents): For a bad offset + count, set
	bfd_error to bad_value.
	* seclet.c (rel): Don't abort.  Instead, return false.
1993-10-25 20:09:46 +00:00
Ken Raeburn 7956846326 aoutx.h (reloc_type_lookup): Handle BFD_RELOC_SPARC_WDISP22. 1993-10-25 17:01:57 +00:00
Mark Eichin dd8dd099b0 note TDEFINES setting of FPRINTF_ALREADY_DECLARED. 1993-10-22 18:14:21 +00:00
Ian Lance Taylor 609151bee8 * targets.c (target_vector): Enable MIPS ELF vectors. 1993-10-22 15:56:08 +00:00
Jim Kingdon 212b1b07fa * config.bfd: Use bigmips for mips-sony-bsd*. 1993-10-22 14:58:28 +00:00
Jim Kingdon ffa2b1dfe7 * configure.host, config.bfd: Add * to end of all OS names. 1993-10-22 13:36:28 +00:00
Ken Raeburn 3bca03362f elfcode.h (FILE_ALIGN_: Renamed from EALIGN, to avoid conflict with Ultrix
header files.

Also, lots of changes for PA elf and som support from Utah; see ChangeLog
for details.
1993-10-21 19:22:42 +00:00
Jim Kingdon 37e6f1d0e4 gcc -Wall lint:
* coff-h8300.c, coffcode.h: Change shrink parameter
	in *_reloc16_estimate to unsigned to match prototype.
	* archive.c: Avoid "/*" in comment.
1993-10-21 19:11:15 +00:00
Ian Lance Taylor 5280bd62ff * dep-in.sed: Create our own line breaks for a more aesthetic
Makefile.
	* Makefile.in: Rebuilt dependencies.
1993-10-21 18:30:12 +00:00
Ian Lance Taylor 632f2cc779 * elf32-mips.c: Include "seclet.h".
(mips_elf_fake_sections): Force size of .reginfo section to sizeof
	Elf32_External_RegInfo.
	(mips_elf_seclet_link): New function.  Link the .reginfo section
	specially, and pass everything else to the generic routine.
	(bfd_elf32_bfd_seclet_link): Define macro.
	* elf32-target.h: If bfd_elf32_bfd_seclet_link is already defined,
	don't override it.
1993-10-21 17:13:38 +00:00
Ian Lance Taylor 0186bcc6d5 * libnlm.h (nlm_backend_data): Added signature field.
(nlm_signature): New macro.
	* nlmcode.h (nlm_object_p, nlm_write_object_contents): Use the NLM
	signature from the backend rather than the constant NLM_SIGNATURE.
	* nlm32-i386.c (nlm32_i386_backend): Initialize signature field.
1993-10-20 20:37:40 +00:00
Ken Raeburn c6b399ceb8 (HFILES): New variable, for use in "make dep".
(.dep): Depend on $(CFILES) and $(HFILES).  Delete .dep1 and remake it, so that
"$?" is complete.
(.dep1): Don't need to remove .dep1 first.
(dep.sed): Depend on config.status, not Makefile.
(CFILES): Add nlm.c.
1993-10-20 20:04:17 +00:00
Ian Lance Taylor e61742338b * aoutf1.h (MACHTYPE_OK): Accept M_UNKNOWN.
(NAME(sunos,set_arch_mach)): Treat M_UNKNOWN as 68000, not 68020.
1993-10-20 16:26:50 +00:00
Jim Kingdon dc0d7d91da * hosts/i386bsd.h [__bsdi__]: Define HOST_DATA_START_ADDR. 1993-10-20 15:33:40 +00:00
Ian Lance Taylor 5fa2aaa241 * coff-alpha.c: Implemented reloc handling for the linker, made
various other related changes.
	* libecoff.h (ecoff_backend_data): Added rdata_in_text field.
	Renamed finish_reloc to adjust_reloc_in.  Added adjust_reloc_out
	field.
	(ecoff_bfd_get_relocated_section_contents): Don't define.
	* ecoff.c (ecoff_sec_to_styp_flags, ecoff_styp_to_sec_flags):
	Handle .lita section.
	(ecoff_slurp_reloc_table): Handle RELOC_SECTION_FINI.
	finish_reloc backend field renamed to adjust_reloc_in.
	(ecoff_bfd_seclet_link): Adjust number of aux entries to
	debug_align boundary.
	(ecoff_compute_section_file_positions): If rdata_in_text put
	.rdata section in text segment, not data segment.  Put .pdata
	section in text segment.
	(ecoff_write_object_contents): Likewise.  Also, call
	adjust_reloc_out, and handle .lita, .xdata, .pdata, .fini and
	absolute sections when writing out relocs.
	* coffswap.h (coff_swap_aouthdr_out): For ALPHAECOFF, output 2 for
	bldrev field, as on Alpha OSF/1.  Padding field is now 2 bytes.
	* coff-mips.c (mips_ecoff_swap_reloc_out): Added assertion.
	(mips_adjust_reloc_in): Renamed from mips_finish_reloc.
	(mips_adjust_reloc_out): New function (does nothing).
	(mips_ecoff_backend_data): Initialize new fields.
	(ecoff_bfd_get_relocation_section_contents): Define to be
	bfd_generic_get_relocated_section_contents.

	* reloc.c (bfd_perform_relocation): Added casts to avoid Alpha
	OSF/1 cc bug.
1993-10-19 19:41:44 +00:00
Stu Grossman 653dd82a60 * Makefile.in: Add dependancy for elf.o to make Sun make happy
when using VPATH.
1993-10-19 01:17:42 +00:00
Ian Lance Taylor 08243cb522 * coffcode.h (styp_to_sec_flags): Don't set SEC_DEBUGGING until it
is made to work.
	(coff_compute_section_file_positions): Remove check for
	USE_DISCARDED_SECTIONS_COUNT.
	* coff-i386.c: Don't define USE_DISCARDED_SECTIONS_COUNT.  Basing
	it on host defines is wrong.
1993-10-14 16:04:35 +00:00
Ian Lance Taylor fa1dccfb48 * ecoff.c (ecoff_bfd_seclet_link): Don't link a .reginfo section.
(ecoff_write_object_contents): Don't require the .reginfo section
	to be a particular size.
1993-10-14 05:13:43 +00:00
Ken Raeburn 97eb2f0cb6 More "make dep" fixups.
Apollo 68k support from Troy Rollo <troy@cbme.unsw.edu.au>.
1993-10-13 23:08:10 +00:00
Ken Raeburn 6327ba5dc7 Oopsie.
Use "[^ ]*", not ".*", in matching filename patterns.
Updated dependencies in Makefile.in.
1993-10-13 22:33:48 +00:00
Ken Raeburn 28f4c45f71 remove inclusion of strings.h 1993-10-13 21:42:42 +00:00
Ken Raeburn cbd8493e6c coff-i386.c (i3coff_object_p): Now static. 1993-10-13 19:17:05 +00:00
Ken Raeburn f3bb56f1c8 68kcoff, makedep changes 1993-10-13 19:04:43 +00:00
Ken Raeburn d684720f29 Make "make dep" easier to work with. Updated lots of dependencies.
Don't try "make dep" alone; use "make dep DEP=mymkdep", where "mymkdep" has
been hacked to use "gcc -MM"...
1993-10-13 19:04:08 +00:00
Ken Raeburn 3fd4fab335 Define ONLY_DECLARE_RELOCS, to avoid name conflicts when "--with-targets=all". 1993-10-13 18:57:21 +00:00
Ken Raeburn dd4edae4db for m68klynx_coff_vec, include coff-m68k.o for now 1993-10-13 18:56:39 +00:00
Ian Lance Taylor d5a30a0879 * elf32-mips.c: Extensive additions to do relocations and to
handle MIPS specific sections.
	* libelf.h (elf_backend_data): Pass fourth argument to
	elf_backend_section_from_bfd_section to permit it to control the
	section index to use.
	(elf_obj_tdata): Add gp and gp_size fields.
	(elf_gp, elf_gp_size): New accessor macros.
	* elfcode.h: Removed a number of unused local variables.
	(elf_fake_sections): Clear section header before calling
	elf_backend_fake_sections, not after.
	(prep_headers): Return true at end.
	(elf_section_from_bfd_section): Pass retval argument to
	elf_backend_section_from_bfd_section.
	* elf32-hppa.c (elf32_hppa_backend_section_from_bfd_section):
	Accept and ignore new retval argument.
	* bfd.c: Include libelf.h.
	(bfd_set_gp_size): Handle ELF targets.
	* Makefile.in (bfd.o): Depends upon libelf.h.
	(elf32-mips.o): Depends upon $(INCDIR)/elf/mips.h.
1993-10-12 21:16:14 +00:00
Fred Fish f7df1b2b26 Add elf64-sparc.c to lose_these_too if it is not added to keep_these_too. 1993-10-12 02:44:07 +00:00
Ian Lance Taylor a785321604 * ecoff.c (ecoff_mkobject): Check bfd_make_section return value.
(ecoff_mkobject_hook): New function.
	(ecoff_new_section_hook, ecoff_sizeof_headers,
	ecoff_compute_section_file_positions, ecoff_set_section_contents,
	ecoff_write_object_contents): Handle dummy REGINFO section.
	(ecoff_get_section_contents): New function to handle reading
	REGINFO section.
	* libecoff.h (ecoff_get_section_contents): Change from macro
	definition to function prototype.
	(ecoff_mkobject_hook): New prototype.
	* coff-alpha.c (alpha_ecoff_mkobject_hook): Removed.
	(alpha_ecoff_backend_data): Use ecoff_mkobject_hook.
	* coff-mips.c (mips_ecoff_mkobject_hook): Removed.
	(mips_ecoff_backend_data): Use ecoff_mkobject_hook.
1993-10-11 21:38:38 +00:00
Peter Schauer 22d33fb2f5 * libbfd.c (bfd_get*32, bfd_get*64): Prevent ANSI sign extension
by casting the most significant byte to bfd_vma.
1993-10-08 22:27:53 +00:00
Peter Schauer cede97315d * configure.in: Do not define SELECT_VECS, SELECT_ARCHITECTURES
if configuring --with-targets=all.
1993-10-08 09:42:42 +00:00
Ken Raeburn fb32909add * aoutx.h (howto_table_std): Correct the "size" field in some entries.
* reloc.c (reloc_howto_type): Change documentation to dispel any
notion that the "size" field is a power-of-two indicator.
1993-10-07 21:46:12 +00:00
Steve Chamberlain fbb61b5029 * coffswap.h: (bfd_swap_reloc_in): a symndx is signed. 1993-10-07 19:24:22 +00:00
Steve Chamberlain 5cfdedb902 Make support for relaxing more generic.
* reloc16.c: Add new target entry - bfd_coff_reloc16_estimate,
	fix bit rot.
	* libcoff.h, libcoff-in.h: declarations. Prototypes
	* coffcode.h (bfd_coff_std_swap_table): Add calls to
	coff_reloc_16_extra_cases and coff_reloc16_estimate.
	(dummy_reloc16_estimate): New function.
	* coff-h8300.c (h8300_reloc16_estimate): New function
1993-10-07 19:21:54 +00:00
Ken Raeburn 01383fb458 elfcode.h (EALIGN): Define, dependent on ARCH_SIZE.
(align_file_position): New function.
(elf_locate_sh): Disabled function deleted.
(assign_file_positions_for_symtab_and_strtabs): Align position, then place
symtab, then do other sections.
(map_program_segments): Align program header.
(assign_file_positions_except_relocs): Align section headers.
(assign_file_positions_for_relocs): Align relocation sections.

Fixes ld/3584.
1993-10-07 18:34:59 +00:00
Ken Raeburn fd201fc392 removed two deleted files (thanks Fred) 1993-10-07 18:22:21 +00:00
Jim Kingdon bdacad9c48 * configure.host: Recognize hppa*-*-hiux* (currently synonym for hpux).
Change other hppa entries to use -*- not -hp-.
	* config.bfd: Recognize hppa*-*-hiux* (currently synonym for hpux).
1993-10-05 17:46:28 +00:00
Jim Kingdon cf513c6e39 * coff-rs6000.c, cpu-rs6000.c, rs6000-core.c: Change non-ASCII
characters in comment to octal escapes.
1993-10-05 16:01:49 +00:00
Stan Shebs 3151f12f33 Another forgotten file. 1993-10-05 02:30:37 +00:00
Stan Shebs 47d2245116 Reflect changes in Lynx files. 1993-10-03 22:51:51 +00:00
Stan Shebs c4a423818e More additions and changes for Lynx. 1993-10-03 22:15:52 +00:00
Jim Kingdon 8a1f626075 * config/news-mips.mh, hosts/news-mips.h: New files. 1993-10-03 05:46:21 +00:00
Jim Kingdon bc991bc903 * config/news-mips.mh, hosts/news-mips.h: New files.
* configure.host: Use news-mips for mips-sony-bsd*.
1993-10-03 00:35:12 +00:00
Jim Kingdon 17dbd90993 new for mips corefiles 1993-10-02 23:55:34 +00:00
Stan Shebs 48ee075741 * configure.in: i386lynx_coff_vec requires coff-i386lynx.o.
* coff-i386lynx.c: New file, defines Lynx target vector and name,
	includes coff-i386.c.
	* coff-i386.c (i386coff_vec): Allow redefinition of target vector
	symbol and name, if TARGET_SYM and/or TARGET_NAME are defined.
	* i386lynx.c: Remove coff vector definition entirely.
	(lynx_32_swap_ext_reloc_in): Define.
	(lynx_32_swap_std_reloc_in): Define, get reloc bits in i386
	Lynx-specific way.
	(lynx_32_swap_ext_reloc_out): Define.
	(lynx_32_swap_std_reloc_out): Define.
	(lynx_32_slurp_reloc_table): Define, call Lynx swapping fns.
	(lynx_32_squirt_out_relocs): Define, call Lynx swapping fns.
	(lynx_32_canonicalize_reloc): Define, call Lynx swapping fns.
	(WRITE_HEADERS): Define, call Lynx swapping fns.

	* config/i386-lynx.mt (SELECT_VECS): Remove redundant vector.
1993-10-01 21:42:59 +00:00
Ken Raeburn 763cfca018 reloc.c (bfd_reloc_code_type): Add linkage-table relative reloc of size 8, 16,
32.  Sort generic relocs by type, not size.  Added a little documentation too.
1993-09-30 21:54:49 +00:00
Jim Kingdon a1b51eb3eb * section.c (bfd_make_section_anyway): New function.
* section.c: Change comments to say several sections can have
	the same name.
	* bfd-in2.h: Re-generate to reflect above change.
	* coffgen.c (make_a_section_from_file): Call bfd_make_section_anyway
	if still no section after the bfd_coff_make_section_hook.
	* coffcode.h: Add comment about TWO_DATA_SECS.
1993-09-28 21:47:15 +00:00
Jim Kingdon 9b3fa58950 * section.c (bfd_make_section_anyway): New function.
* section.c: Change comments to say several sections can have
	the same name.
	* bfd-in2.h: Re-generate to reflect above change.
	* coffgen.c (make_a_section_from_file): Call bfd_make_section_anyway
	if still no section after the bfd_coff_make_section_hook.
	* coffcode.h: Add comment about TWO_DATA_SECS.
1993-09-28 20:44:43 +00:00
Stan Shebs 4ac3ff671b Keep m68klynx.h 1993-09-28 20:27:21 +00:00
Stan Shebs eefe075d6a Keep m68klynx.c 1993-09-28 20:25:00 +00:00
Peter Schauer 2c24db3b2d * ecoff.c (ecoff_slurp_symbolic_info): Always determine raw_size
explicitly.
	* ecoff.c (ecoff_sec_to_styp_flags, ecoff_styp_to_sec_flags):  Handle
	.fini section.
1993-09-28 10:23:52 +00:00
Stan Shebs 32940b9fe3 Fix a typo 1993-09-28 01:57:25 +00:00
Stan Shebs 96e39d2aaa New and improved Lynx support. 1993-09-28 01:53:25 +00:00
Jim Kingdon 69bdf1a5da * archive.c: Define offsetof here.
* hosts/*.h: Don't define it here.
1993-09-27 23:27:46 +00:00
Ian Lance Taylor 8737c2f4e5 * elfcode.h (bfd_section_from_shdr): Set filepos for SHT_STRTAB
section.
1993-09-27 23:12:40 +00:00
Jim Kingdon eafdb69561 * hpux-core.c: Add comment about hpux version 7. 1993-09-26 18:47:53 +00:00
Stu Grossman 08ba2f95fe * lynx-core.c (lynx_core_file_p): Change per-thread register
section names from .regXXX to .reg/XXX to avoid parsing ambiguity
in gdb/corelow.c.  Create alias .reg section for the currently
running thread.
1993-09-24 23:54:32 +00:00
Peter Schauer 0a27542138 Fix typo in previous ChangeLog message. 1993-09-24 16:13:26 +00:00
Peter Schauer 4346ee0f97 * osf-core.c: New file for OSF/1 core file support.
* config/alphaosf.mh (HDEFINES):  Set to -DHPUX_CORE.
	(HDEPFILES):  Set to hpux-core.o.
	* bfd-in2.h (union tdata):  Add osf_core_data member.
	* targets.c:  If OSF_CORE is defined, add osf_core_vec to target list.
	* Makefile.in (OPTIONAL_BACKENDS):  Add osf-core.o.
	(osf-core.o):  New dependency.
1993-09-24 07:45:28 +00:00
Jim Kingdon 449fc5131c * ecoff.h (ecoff_set_arch_mach_hook): Accept MIPS_MAGIC_LITTLE2
and MIPS_MAGIC_BIG2.
1993-09-24 02:16:09 +00:00
Ian Lance Taylor 7437667486 * archive.c (compute_and_write_armap): Put weak symbols in the
armap.

	* elfcode.h (fix_up_strtabs): Set sh_entsize for the .stab
	section, not the .stabstr section.  Set the type of the .stabstr
	section to SHT_STRTAB.
	(elf_section_from_bfd_section): Handle SHT_STRTAB sections.

Also set SEC_DEBUGGING for appropriate SHT_STRTAB sections.
1993-09-23 21:59:07 +00:00
Ken Raeburn 869cbaae87 * gen-aout.c (main): Output newline after end of comment, not before.
(Reported by Jonathan Stone, jonathan@oscar.stanford.edu).
1993-09-23 16:51:30 +00:00
Ian Lance Taylor d6e5f95000 * section.c (SEC_DEBUGGING): New section flag.
* elfcode.h (bfd_section_from_shdr): If section is SHT_PROGBITS,
	and the name starts with .debug, .line or .stab, set
	SEC_DEBUGGING.
	* elf32-target.h (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Added
	SEC_DEBUGGING to section_flags.
	* elf64-target.h (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Added
	SEC_DEBUGGING and SEC_CODE to section_flags.
	* bfd-in2.h: Updated.
1993-09-23 15:14:12 +00:00
Ian Lance Taylor 01657c7aec * bfd.c (tdata): Add lynx_core_data. 1993-09-22 20:57:58 +00:00
Ian Lance Taylor e544ed4f3d * ecoff.c (ecoff_compute_section_file_positions): Set filepos for
sections with SEC_LOAD set, even if SEC_HAS_CONTENTS is clear.
	(ecoff_write_object_contents): Don't set scnptr to zero just
	because size of section is zero.  Needed for Irix 4.0.5F.
1993-09-22 20:49:57 +00:00
Jim Kingdon bdb45162af * config.bfd: Use i960-bout, not i960-coff for i960-*-nindy*. 1993-09-22 15:11:59 +00:00
Stu Grossman 6c08c1ef02 * Makefile.in (OPTIONAL_BACKENDS): Add lynx-core.o.
* bfd-in2.h (tdata):  Add lynx_core_data;
	* config.bfd configure.host:  Get rid of superfluous netbsd and
	lynxos entries.
	* configure.in:  Add lynx-core.o to Lynx config.
	* i386lynx.c:  Add defs for core file support.
	* lynx-core.c:  New file with Lynx core file support.
	* hosts/i386lynx.h:  Move lots of host specific includes to here.
	Add def of HOST_LYNX.  Remove unnecessary defs.
1993-09-22 14:58:31 +00:00
Stu Grossman 2b91cc453b * Makefile.in (OPTIONAL_BACKENDS): Add lynx-core.o.
* bfd-in2.h (tdata):  Add lynx_core_data;
* config.bfd configure.host:  Get rid of superfluous netbsd and
lynxos entries.
* configure.in:  Add lynx-core.o to Lynx config.
* i386lynx.c:  Add defs for core file support.
* lynx-core.c:  New file with Lynx core file support.
* hosts/i386lynx.h:  Move lots of host specific includes to here.
Add def of HOST_LYNX.  Remove unnecessary defs.
1993-09-22 14:54:50 +00:00
Ian Lance Taylor 36d541b1c7 * elfcode.h (bfd_section_from_shdr): Only set SEC_DATA for a
SHF_PROGBITS or SHT_STRTAB section if SEC_ALLOC is set.  Never set
	SEC_DATA for a SHF_NOBITS section.

	* nlm32-i386.c (nlm_i386_mangle_relocs): Check SEC_LOAD rather
	than SEC_CODE | SEC_DATA.  Add some casts to avoid warnings.
	* nlmcode.h: Add some casts to avoid warnings.
	(nlm_write_object_contents): Ignore relocs for sections that are
	neither code nor data.  Just use the symbol value for debugging
	symbols; don't offset by the section vma.
1993-09-20 23:25:52 +00:00
Ian Lance Taylor 4fe784bb8f * reloc.c (bfd_perform_relocation): Don't return an error when
performing a reloc against an undefined weak symbol.
	* syms.c (bfd_print_symbol_vandf): Show value of BSF_WEAK rather
	than obsolete BSF_EXPORT.
1993-09-17 22:13:33 +00:00
John Gilmore 9d6323bace * hosts/{alphaosf.h, amix.h, apollo68.h, apollov68.h,
decstation.h, delta88.h, dgux.h, dose.h, go32.h, harris.h,
hp300.h, hp300bsd.h, hppabsd.h, hppahpux.h, i386aix.h, i386bsd.h,
i386linux.h, i386lynx.h, i386v.h, i386v4.h, irix3.h, irix4.h,
mipsbsd.h, ncr3000.h, rs6000.h, rtbsd.h, solaris2.h, sparc-ll.h,
std-host.h, stratus.h, sun3.h, sysv4.h, tahoe.h, ultra3.h,
vaxult.h, vaxult2.h, we32k.h}:  Make sure that "offsetof" is
defined on all hosts, now that archive.c uses it.
1993-09-17 09:14:31 +00:00
John Gilmore c5652bffcb Make sure that "offsetof" is defined on all hosts, now that archive.c uses it. 1993-09-17 09:08:00 +00:00
Ian Lance Taylor e621c5cc37 * elfcode.h (elf_map_symbols): Create section symbols for all
sections, not just allocated sections; debugging sections can have
	relocs.
	(elf_symbol_from_bfd_symbol): If there is an output section, use
	the section index from that rather than the input section.
1993-09-16 22:24:33 +00:00
Ian Lance Taylor 0542a638d7 * libbfd.h (COERCExx): Cast x to bfd_signed_vma before doing the
xor and subtract.  Otherwise it will not sign extend if the type
	of bfd_vma is larger than int.
1993-09-15 20:57:47 +00:00
Ian Lance Taylor 2fbb0a713c * ecoffswap.h (ecoff_swap_pdr_in): Get regoffset, iopt, fregoffset
and frameoffset as signed numbers.  From Peter Schauer.
1993-09-15 15:58:11 +00:00
Ian Lance Taylor 207f85b54b * elf32-i386.c (elf_howto_table): Add bfd_elf_generic_reloc
special function for all reloc entries.
	* elf32-target.h (TARGET_LITTLE_SYM): Add SEC_CODE to
	section_flags.
	* libelf.h (elf_symbol_type): Remove desc, type and other fields.
	* Makefile.in (elf32-*.o): These depend upon elf32-target.h.
1993-09-14 22:29:26 +00:00
Steve Chamberlain a6f5fcd8c2 Tue Sep 14 14:34:45 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
* libbfd-in.h (struct artdata):  Add armap_timestamp and
 	armap_datepos here too.
1993-09-14 21:39:33 +00:00
John Gilmore cb4acadb8c Avoid minor warning in archive.c change. 1993-09-14 04:19:40 +00:00
John Gilmore f26a0e9bcf * hosts/std-host.h (offsetof): Define, if not already, for archive.c. 1993-09-14 04:15:23 +00:00
John Gilmore b5b4294e65 Improve timestamp support in BSD archive files to avoid linker
warnings.

* libbfd.h (struct artdata):  Add armap_timestamp and armap_datepos.
(bfd_flush, bfd_stat):  Add prototypes.
* libbfd.c (bfd_flush):  Add, does fflush on a BFD.
(bfd_stat):  Add, does fstat on a BFD.

* archive.c (_bfd_write_archive_contents): At end of file writing,
verify and possibly update the timestamp in the armap, if a BSD
archive.  FIXME!  Kludge recognizes BSD archive, rather than
vectoring properly.  Should add to xvec.
(compute_and_write_armap):  Move prototype to top, avoid PROTO.
(bsd_write_armap): Save timestamp and file location thereof, when
writing the armap in a BSD file.
(bsd_update_armap_timestamp):  New function to check and
rewrite the timestamp.
1993-09-14 04:13:43 +00:00
Jim Kingdon 66eca5ee10 add som.c and som.h 1993-09-13 22:51:51 +00:00
Jim Kingdon 4793011a34 * hosts/i386sco.h: Define a bunch of stuff for core files.
* sco-core.c: Remove, replace by trad-core.c.
	* trad-core.c: If HOST_STACK_START_ADDR is defined, use it.
	* config/i386sco.mh: Use trad-core not sco-core.
	* hosts/i386isc.h, config/i386isc.mh: Remove.
	* configure.host: Use i386sco for isc.
	* config/i386-sco.mt: Remove, identical to i386-coff.mt.
	* config.bfd: Use i386-coff not i386-sco.
1993-09-12 05:09:08 +00:00
Jim Kingdon d36bdf4005 * config.bfd: Recognize i[34]86-*-solaris2* specifically rather
than using *-*-solaris2* (i486-unknown-solaris2 is i386-elf, not
	i486-elf which doesn't exist).
1993-09-12 01:16:45 +00:00
Ian Lance Taylor bccf35217e * coffswap.h (coff_swap_aouthdr_out): For ALPHAECOFF, force
padding field to zero.
1993-09-10 21:54:32 +00:00