Commit graph

1657 commits

Author SHA1 Message Date
Jeff Law
517a6af632 * som.c (som_begin_writing): Fix braino (one call to align
space/subspace data was done unconditionally rather than
        just for executables.)
1994-03-20 19:22:04 +00:00
Jeff Law
142f59f4a9 * som.c (som_begin_writing): Align text in all executables to
make HPUX kernel happy.  Fixes strip/objcopy for shared
        executables.
1994-03-20 17:27:51 +00:00
Jim Kingdon
47dc9b52c2 * bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
* libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
	* cisco-core.c: New file.
	* Makefile.in: Change accordingly.
	* configure.in: Recognize cisco_core_vec.
	* config/m68k-aout.mt (SELECT_VECS): Add cisco_core_vec.
	* targets.c: Add cisco_core_vec.
	* bfd-in2.h: Rebuilt.
1994-03-19 21:13:58 +00:00
Jim Kingdon
1732fbd47a * cisco-core.c: New file. 1994-03-19 17:51:39 +00:00
Jeff Law
00806436cd * som.c (som_begin_writing): Account for alignment needs of
subspaces too when writing executables.  Never request a negative
        bss size.  Fixes some problems with demand paged executables,
        still having problems with pure executables and shared executables.
1994-03-19 15:08:12 +00:00
Jeff Law
1576691751 * som.h (som_copyable_section_data_struct): New structure
containing all the private section information which needs
	to be copied from input section to output section during
	objcopy or strip.
	(som_section_data_struct): Remove several fields now in
	som_copyable_section_data_struct.  Make the space and
	subspace dictionaries be pointers (to save space when
	only reading objects).

	* som.c (bfd_som_set_section_attributes): Now returns a boolean;
	some references changed.  Allocate a copyable data stucture if
	none exists.  Store info into the copyable data structure.
	(bfd_som_set_subsection_attributes): Likewise.
	(som_is_space, som_is_subspace, som_is_container): New functions.
	Use these instead of directly accessing private data.
	(som_prep_headers): Allocate space and subspace headers here.
	Fill in some fields in the space/subspace headers from the
	copyable data.
	(som_bfd_copy_private_section_data): Only copy the stuff
	that we really need to make objcopy and strip work.  Allocate
	the copy_data structure for the output bfd before copying.
1994-03-19 06:41:54 +00:00
Jim Kingdon
5d70e4d137 * bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
* libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
	* cisco-core.c: New file.
	* Makfile.in: Change accordingly.
	* bfd-in2.h: Rebuilt.
1994-03-19 06:36:47 +00:00
Jim Kingdon
f3f29240da * trad-core.c (trad_unix_core_file_p): Call bfd_zmalloc not
bfd_zalloc for rawptr, because later on we may call free, not
	bfd_release, on it.

	* bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
	* libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
	* cisco-core.c: New file.
	* Makfile.in: Change accordingly.
	* bfd-in2.h: Rebuilt.
1994-03-19 06:17:08 +00:00
Jeff Law
4359a7ef33 * som.h (struct som_exec_data): New structure to hold exec
info that must be preserved when running objcopy/strip.
	(struct somdata): Add new "exec_data" field and accessor
	macro.  Add some comments on how the various fields are used.
	(som_section_data_struct): Make is_space and is_subspace bitfields.
	Delete unused subspace_index.  All references now use the
	target_index field within the section structure itself.

	* som.c (make_unique_section): Delete unused declaration.
	(som_bfd_copy_private_bfd_data): New function.
	(som_object_setup): Allocate space for and save exec information
	that needs to be copied during objcopy/strip.
	(som_mkobject): Do not allocate space for a file header here.
	It is not used when only reading SOM objects.
	(som_prep_headers): Allocate space for and attach a file header
	to the output bfd.  For executables, use the saved system_id
	value rather than trying to guess the right value.  Do not abort
	wwhen setting file_hdr->entry* for executables.
	(som_begin_writing): For executables, set the exec_entry and
	exec_flags fields.
	(som_copy_private_backend_section_data): Always return a value.
1994-03-19 05:06:54 +00:00
Jeff Law
08b3c4f997 * libhppa.h (PA_PAGESIZE): Define.
* som.c (SOM_ALIGN): Define.
        (som_begin_writing): If writing an executable, initialize all
        fields in the exec header to zero.  Update fields in the exec
        header as sizes of loadable subspaces are computed.  Carefully
        preserve alignments when building executables.  Actually write the
        exec after all the fields are filled in.
1994-03-19 03:54:49 +00:00
Jeff Law
3b4994959e * Better long-filename handling. Reads SOM ABI compliant extended
names, but doesn't quite write compliant extended names yet.
        * som.c (som_slurp_extended_name_table): Delete function.  The
        generic code will handle things correctly.
        (som_slurp_armap): Seek to the beginning of the next member.
        (normalize): New function.
        (som_bfd_ar_write_symbol_stuff): Take the size of the extended
        name table into account when computing the file offsets in the
        SOM dictionary.  Make sure to align to an even boundary.
        (som_write_armap): Initialize the checksum to zero.
        (ar_maxchars): Fix.  Opps.
1994-03-19 02:17:15 +00:00
Jim Kingdon
4fe278b83a new for cisco crash dumps 1994-03-19 02:12:30 +00:00
Ken Raeburn
ff9785703d * aoutx.h (reloc_type_lookup): Handle BFD_RELOC_CTOR on a 64-bit
machine.  Handle BFD_RELOC_SPARC13 and BFD_RELOC_SPARC_BASE13.
1994-03-19 01:39:36 +00:00
Ken Raeburn
5a66538bcb * bfd-in.h (BFD_VERSION): Use @VERSION@.
* Makefile.in (bfd.h): Replace it with contents of VERSION file.
* bfd-in2.h: Regenerated.
1994-03-17 23:47:00 +00:00
Ken Raeburn
6f4aac6cb9 (trad_unix_bfd_is_local_label): Fixed typo where
this was also named trad_unix_bfd_copy_private_bfd_data.
1994-03-17 23:38:36 +00:00
Ian Lance Taylor
7838792b0c * osf-core.c (osf_core_bfd_copy_private_bfd_data): Remove
duplicate definition.
	(osf_core_bfd_is_local_label): Define.
1994-03-17 23:26:03 +00:00
Stan Shebs
8b0f1c2004 Don't need mpw-xconfig.in anymore. 1994-03-17 23:08:36 +00:00
Jim Kingdon
8eb5d4be69 * aoutx.h, elfcode.h, coff-alpha.c, bout.c, ecoff.c, ecofflink.c,
elf32-hppa.c, elf32-mips.c, linker.c, som.c, sunos.c: If malloc(0)
	returns NULL, it is not an error.  It's possible that some of
	these checks are not necessary (because the size can never be
	zero), but putting in the checks is the conservative thing to do
	in light of the fact that some of these malloc calls replaced
	unchecked alloca calls, in which a zero argument would work fine.
1994-03-17 18:54:48 +00:00
Ian Lance Taylor
4bbf7a4924 * reloc.c (bfd_generic_get_relocated_section_contents): Don't fail
if malloc (0) fails.  bfd_canonicalize_reloc returning 0 is not a
	failure indication, it merely means there are no relocs.
1994-03-17 17:29:15 +00:00
Ian Lance Taylor
1c6042ee10 * elfcode.h (NAME(bfd_elf,write_object_contents)): Don't use space
after NAME, since SunOS /bin/cc can't handle it.
1994-03-17 16:47:01 +00:00
David MacKenzie
ae6710bc98 * netbsd386.c (N_SET_FLAGS): Don't nuke the machine id field.
From sukes@glue.umd.edu (Tasuki Hirata).
1994-03-17 00:45:26 +00:00
Jeff Law
35ac8aacf9 * som.c (som_prep_for_fixups): Detect section symbols based
on either the lack of private data or the symbol flags.  Do not
        munge section symbol names anymore -- they no longer confuse GDB.
        (som_begin_writing): Leave space for an exec header if writing
        an executable.
        (som_slurp_symbol_table): Recognize both forms of section symbol
        names "L$0\002" and "$<FOO>$".  Change the name of "L$0\002"
        section symbols to be the name of the section they represent.
        Debugging  symbols begin with "L$0\001", not just "L$".
1994-03-16 08:03:46 +00:00
Jeff Law
5b3577cb7a * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
* bfd-in.h (JUMP_TABLE): Add new entries to the jump table
	for bfd_copy_private_section_data, bfd_copy_private_bfd_data,
	and bfd_is_local_label.

	* targets.c: Add new entries to the bfd_target structure.

	* bfd.c (bfd_copy_private_bfd_data): New definition.

	* section.c (bfd_copy_private_section_data): New definition.

	* syms.c (bfd_is_local_label): New definition.

	* libbfd-in.h (bfd_generic_is_local_label): Declare.

	* libbfd.c (bfd_generic_is_local_label): New function.

	* *-core.c: Provide default definitions for new functions in
	the target vector which all point to bfd_false.

	* aout-target.h, coffcode.h, elf32-target.h elf64-target.h, ieee.c
	libaout.h, libecoff.h, nlm-target.h, oasys.c, srec.c, tekhex.c
	Default new vectors for copying private backend data to bfd_true.
	Default new vector for determining if a symbol is a local label
	to bfd_generic_is_local_label.

	* som.c (som_bfd_copy_private_section_data): New function.
	(som_bfd_is_local_label): New function.
	(som_bfd_copy_private_bfd_data): For now default to bfd_true.

	* elf32-hppa.c (hppa_elf_is_local_label): New function.
1994-03-16 07:02:05 +00:00
Ian Lance Taylor
0069bd06b3 * cf-m68klynx.c (CALC_ADDEND): Use _bfd_m68klynx_howto_table. 1994-03-16 04:57:11 +00:00
Jim Kingdon
f8ffa54812 * i386os9k.c : new file to handle os9k format bfd. 1994-03-15 16:20:51 +00:00
David MacKenzie
57a1867e6c * Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
	Indent some of them to GNU standards.

	* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
	cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
	elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
	libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
	Update copyright years.
1994-03-15 15:13:13 +00:00
Jeff Law
baef2065d0 * som.c (som_prep_for_fixups): A relocation involving the section
symbol for the *ABS* section is really a relocation involving
        no symbol.
        (som_slurp_symbol_table): Do not set BSF_GLOBAL or BSF_EXPORT for
        undefined symbols.  Correctly distinguish between debugger symbols
        and section symbols.
1994-03-15 05:21:51 +00:00
Jeff Law
b486fb13be * som (setup_sections): Set SEC_DEBUGGING and the section attributes
for spaces and subspaces.
1994-03-15 04:40:51 +00:00
Jeff Law
4c9db344d2 * som.c (som_bfd_count_ar_symbols): Fix typo. 1994-03-14 21:53:29 +00:00
Jeff Law
ec743ceff2 * som.c (som_object_setup): Set EXEC_P, D_PAGED, WP_TEXT, and
HAS_RELOC based on the object's magic number.
        (make_unique_section): Delete function.  BFD and its users are
        prepared to handle multiple sections with the same name.
        (setup_sections): Allocate space on the BFD's obstack to hold
        section names.  Use bfd_make_setion_anyway rather than the
        obsolete make_unique_section.
        (som_prep_headers): Choose the correct SOM magic number based
        on the BFD's flags.
        (som_bfd_fill_in_ar_symbols): Return false, not NULL on error.
1994-03-14 19:43:01 +00:00
Ian Lance Taylor
45ccfd58d2 * elf32-ppc.c: Renamed from elf32-powerpc.c.
start-sanitize-powerpc-netware
	* nlm32-ppc.c: Renamed from nlm32-powerpc.c.
 	end-sanitize-powerpc-netware
	* Makefile.in, configure.in: Corresponding changes.
1994-03-12 17:48:16 +00:00
Mark Eichin
f71481ba84 Changes to 68k-lynx to make it handle symbols in common sections "properly",
ie. the way "real" 68k coff implementations seem to do it, rather than like
the way it's traditionally done. Fixes lifted from the i386-coff version.
1994-03-12 05:37:38 +00:00
Ian Lance Taylor
92177c5242 * elf32-powerpc.c: Extensive changes to update to preliminary ABI.
Many changes to nlm32-powerpc.c as well, but I'm not bothering to make
a ChangeLog entry to avoid sanitization headaches.
1994-03-12 03:30:52 +00:00
Peter Schauer
3e0b555420 * sunos.c (sunos_read_dynamic_info): Assume that dynamic info
is always located at the start of the data section to allow
	recovery of the dynamic info from a stripped executable.
	* ecoff.c (ecoff_styp_to_sec_flags):  Handle STYP_PDATA, STYP_XDATA
	and STYP_COMMENT.
1994-03-11 09:03:07 +00:00
Jim Kingdon
d7fb453182 * libbfd-in.h: Remove alloca cruft. It was missing some necessary
cruft (like the #pragma alloca for AIX).
	In addition to that problem, the C alloca calls xmalloc, which
	means checking for being out of memory can't work right.  The
	following changes remove all uses of alloca from BFD.
	* hosts/solaris2.h: Remove alloca cruft.
	* som.c: Replace alloca with a fixed size auto array.
	* aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c,
	ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c,
	sunos.c: Replace alloca with malloc and appropriate error checking and
	freeing.
	* linker.c: Replace alloca with obstack_alloc.
	* libbfd.h: Rebuilt.
1994-03-10 02:33:01 +00:00
Jim Kingdon
80425e6c82 * libbfd-in.h: Remove alloca cruft. It was missing some necessary
cruft (like the #pragma alloca for AIX).
	In addition to that problem, the C alloca calls xmalloc, which
	means checking for being out of memory can't work right.  The
	following changes remove all uses of alloca from BFD.
	* hosts/solaris2.h: Remove alloca cruft.
	* som.c: Replace alloca with a fixed size auto array.
	* aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c,
	ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c:
	Replace alloca with malloc and appropriate error checking and
	freeing.
	* linker.c: Replace alloca with obstack_alloc.
	* libbfd.h: Rebuilt.
1994-03-10 02:09:10 +00:00
Ian Lance Taylor
1404c3656d * coff-mips.c (mips_relocate_section): Handle MIPS_R_LITERAL like
MIPS_R_GPREL.
1994-03-08 20:11:44 +00:00
Peter Schauer
802f4fe2f7 Add lost lines to previous ChangeLog entry. 1994-03-07 21:38:41 +00:00
Peter Schauer
25677b5b30 * elf32-hppa.h, elfcode.h: Replace uses of Elf*_Half, Elf*_Word,
Elf*_Off typedefs by their expansion, the typedefs have been
	removed from include/elf/internal.h.
1994-03-05 22:41:41 +00:00
Jeff Law
7b5f6e48f1 * som.h (_PA_RISC_ID): Treat HOST_HPPAOSF just like HOST_HPPABSD. 1994-03-04 04:04:48 +00:00
Jim Kingdon
baf200d479 * configure.host: Recognize i[34]86-sequent-*.
* trad-core.c (trad_unix_core_file_p): A non-zero, not zero,
	return from bfd_seek indicates an error.
	New macro TRAD_CORE_DSIZE_INCLUDES_TSIZE to replace
	TRAD_CORE_STACK_OFFSET.
	* hosts/symmetry.h: Define TRAD_CORE_DSIZE_INCLUDES_TSIZE and
	TRAD_CORE_USER_OFFSET but not HOST_STACK_OFFSET.
1994-03-03 02:38:24 +00:00
Jeff Law
4e64845ca5 * som.[ch]: Do not include libhppa.h in som.c, instead include
it in som.h.

        * elf32-hppa.[ch]: Do not include libhppa.h in elf32-hppa.c, instead
        include it in elf32-hppa.h.
1994-03-02 23:04:29 +00:00
Jeff Law
98ecc94548 * som.c (log2): Return -1 on error rather than aborting.
(setup_sections): Bubble up an error from log2.
1994-03-02 20:32:10 +00:00
Jeff Law
44fd66228a * som.c (hppa_som_gen_reloc_type): Use correct enum type for
field parameter.
        (bfd_som_set_section_attributes): Use unsigned int rather than
        unsigned char to avoid GNU-C extensions.
        (bfd_som_attach_aux_hdr): Return a boolean to indicate success
        or failure rather than aborting on failure.

        * som.h (bfd_som_set_section_attributes): Fix prototype to match
        som.c changes.
        (bfd_som_attach_aux_hdr): Add prototype.
        (hppa_som-gen_reloc_type): Likewise.

        * elf32-hppa.c: Add a couple casts to make HP compiler happy.
        (hppa_look_for_stubs_in_section): Do not return false on failure
        until rest of code is ready to handle it.  Abort for now.
1994-03-02 19:59:03 +00:00
Jim Kingdon
d1f8b18147 * bfd-in2.h: Rebuilt. 1994-03-02 02:36:07 +00:00
Kung Hsu
bb37e7161e Modified Files:
ChangeLog i386os9k.c Makefile.in

        * i386os9k.c: use new functions bfd_set_error and bfd_get_error.
        * Makefile.in: delete an extra blank.
1994-03-01 21:39:28 +00:00
Kung Hsu
85cc33c754 Modified Files:
ChangeLog configure.in

       * configure.in : Add i396os9k_vec.
1994-03-01 21:09:17 +00:00
Stu Grossman
3622687b76 Remove trailing space at end of continuation line in def of CFILES. 1994-03-01 03:14:51 +00:00
Kung Hsu
5143c305dd Modified Files:
ChangeLog
1994-03-01 00:00:06 +00:00
Kung Hsu
2f88343dbe Modified Files:
ChangeLog targets.c Makefile.in cache.c
Added Files:
	i386os9k.c

        * i386os9k.c : new file to handle os9k format bfd.
        * Makefile.in : Handle new file i386os9k.c
        * bfd-in2.h : Add bfd_target_os9k_flavour.
        * targets.c : Add bfd_target_os9k_flavour and i386os9k_vec.
        * cache.c : Initialize cache_sentinel to 0.
1994-02-28 23:49:08 +00:00