definitions for N_SET[ATDB].
(ecoff_howto_table): Moved near top of file.
(ecoff_set_symbol_info): If a STABS symbol of type N_SET[ATDB] is
seen, cook up a constructor section of the same name and put in a
reloc pointing to the symbol. This lets the GNU linker build
global constructors and destructors without using collect.
* hppa.c (hppa_core_file_p): Provide a temporary dummy routine
for HOST_HPPABSD.
* bfd/hosts/hppabsd.h: Fix declarations of malloc and free.
* bfd/libhppa.h: Include sysdep here. Conditionalize
includes based on HOST_HPPAHPUX or HOST_HPPABSD.
Provide definitions for MAXCOMLEN and _PA_RISC_ID suitable
for BSD.
* hppa.c: Use this for both HPUX & BSD.
* targets.c: Enable hppa_vec for both HPUX & BSD.
* config/hppabsd.mt: TDEFINES => TDEFAULTS.
* hosts/hppabsd.h: #define HOST_HPPABSD.
check for the case where the user sets the address of the BSS
section (and the file header can't specify this). Let the user
set it wherever they want, regardless of what goes in the header.
Fixes #ld/1826 (the fix was never checked in by Steve or Ken).
TRAD_UNIX_CORE_FILE_FAILING_SIGNAL to allow host files to specify
the core file failing signal.
* hosts/decstation.h (TRAD_UNIX_CORE_FILE_FAILING_SIGNAL): Define
to supply the core file failing signal.
systems.
* coffcode.h (styp_to_sec_flags): Set SEC_SHARED_LIBRARY for a
STYP_NOLOAD | STYP_BSS section. Don't set SEC_NEVER_LOAD for a
STYP_INFO section.
(coff_compute_section_file_positions): Force vma and lma of _LIB
section to be zero.
(coff_set_section_contents): Count number of entries in new lma
field, not in vma.
* coffgen.c (make_a_section_from_file): Force lineno_count of
SEC_SHARED_LIBRARY section to be zero, since it is non-zero on the
SCO 3.2v4 shared library.
* seclet.c (rel): Copy over any section with contents, not just
loadable sections.
* coff-mips.c (ecoff_make_empty_symbol): Zero out newly allocated
symbol.
* coff-i386.c (coff_i386_reloc): New function, to generate
relocateable output correctly.
(howto_table): Use coff_i386_reloc for all reloc types.
(CALC_ADDEND): Use a more efficient hack to get the correct addend
for a common symbol.
(i386comm_value): Removed; no longer needed.
symbols in a better way. (translate_to_native_sym_flag): Set the
N_INDR bit when necessary. (aout<>slurp_symbol_table): Maintain
indirect state.
* section.c: Added BFD_IND_SECTION_NAME and bfd_ind_section.
(bfd_make_section): Cope with new builtin section.
* syms.c (bfd_decode_symclass): Can now print indirect section
info.
defined, and yields false.
* aout-mipsbsd.c, i386bsd.c: Define MACHTYPE_OK appropriately.
* archive.c (snarf_ar_hdr): Add support for reading (only,
so far) BSD-4.4-style extended headers.
* archive.c: Some more comments.
in use. If FILE_OFFSET_IS_CHAR_INDEX, assume arithmetic can be done on it,
and ignore SEEK_SET requests that move to the current position.
hosts/sparc.h: Define FILE_OFFSET_IS_CHAR_INDEX.
against machine architecture stored in the ELF header, to resolve
ambiguities.
* elf32.c (bfd_section_from_shdr): Bfd_make_section can return
NULL, so only use results when non-NULL.
* targets.c (elf32_m68k_vec, elf32_i860_vec): Add extern decls
and add to vector of targets.
(ecoff_write_object_contents): Added BFD_ASSERT calls to ensure
relocs are reasonable.
* coff-msym.c: Eliminated uses of DEFUN.
(ecoff_swap_tir_out): New function.
type SHT_STRTAB. Don't alter file offset for section 0.
(reloc_type_names): Now an array instead of a macro. Still inside
"#if 0", since it's used only in debugging code also in "#if 0".
(struct elf_reloc_map_elt, struct elf_reloc_map): New types.
(sort_reloc_map): New function.
(sparc_reloc_map): New variable.
(elf_bfd_reloc_type_lookup): New function.
Now bfd-gas can create valid empty object files for sun4sol2.
bfd_make_debug_symbol; they were already in the target structure.
* Adjusted all uses of JUMP_TABLE.
* coffgen.c, libcoff-in.h (coff_bfd_make_debug_symbol): Renamed
from coff_make_debug_symbol.
* libcoff.h: Updated accordingly.
debugging symbols.
(ecoff_get_debug): Offset the fdr adr by the adr of the first pdr,
for compatibility with tools from MIPS.
* config/bigmips.mt: New file; default vector is ecoff_big_vec.
* config/irix3.mt, config/irix4.mt: Removed.
* configure.in (mips-*-ecoff): New target; uses bigmips.mt.
(mips-sgi-*, mips-big-*): Use bigmips rather than irix3.
* libecoff.h: New file. Defines ECOFF backend data for gdb.
* coff-mips.c: Now includes libecoff.h.
(ecoff_data_type): Moved to libecoff.h.
(ecoff_slurp_symbolic_info): Made globally visible so that gdb can
call it. If there is ever another ECOFF target, this and the
swapping functions should be accessed via an ECOFF specific target
vector.
Makefile.in (coff-mips.o): Depends on libecoff.h.
* coff-msym.c (ecoff_swap_fdr_in, ecoff_swap_ext_in): Set reserved
bits to 0 to make comparison test useful.
* config/irix3.mh, config/irix4.mh (HDEFINES): Set to -G 4 to
avoid overflowing GP accessible sections in binutils/objdump.
something to attach small common symbols to. Then avoid writing out
the (empty) .scommon section for the output BFD.
Tue Feb 2 11:41:06 1993 Ian Lance Taylor (ian@cygnus.com)
* coff-mips.c: Completed support for linker and binutils.
* section.c (SEC_IS_COMMON): New section flag, needed for MIPS
ECOFF which has two common sections.
(bfd_com_section): Set SEC_IS_COMMON flag.
* bfd-in.h (bfd_is_com_section): New macro to test SEC_IS_COMMON.
* aoutx.h, archive.c, bout.c, coff-a29k.c, coff-m88k.c,
coff-mips.c, coffgen.c, ieee.c, oasys.c, reloc.c, syms.: Use
bfd_is_com_section macro rather than checking for equality to
bfd_com_section.
* coffcode.h (_bfd_coff_mkobject_hook): Pass aouthdr argument.
(coff_mkobject_hook): Accept aouthdr argument.
* coffgen.c (coff_real_object_p): Pass aouthdr to mkobject_hook.
Handle NULL aouthdr argument.
(coff_object_p): If there is no aouthdr, pass it as NULL to
coff_real_object_p.
* libcoff.h: Rebuilt for mkobject_hook changes.
Fri Jan 15 18:13:17 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* coff-msym.c (ecoff_swap_hdr_out, ecoff_swap_fdr_out,
ecoff_swap_pdr_out, ecoff_swap_sym_out, ecoff_swap_ext_out,
ecoff_swap_rndx_out, ecoff_swap_rfd_out, ecoff_swap_opt_in,
ecoff_swap_opt_out, ecoff_swap_dnr_in, ecoff_swap_dnr_out): New
functions.
* coffswap.h: If NO_COFF_RELOCS is defined, don't define
bfd_swap_reloc_in or coff_swap_reloc_out.
* coff-mips.c: Added code to link and write out symbolic debugging
information, and to swap relocs in and out.
(coff_write_object_contents): coff_count_linenumbers returns the
number of line number records it found.
* coffgen.c (coff_write_linenumbers): only write out line numbers
in the section they belong to.
debug info. Setup info about linker symbols only, and use
standard bfd fields to hold the info.
* (hppa_object_p): Remove unneeded decls.
* (hppa_new_section_hook): Get rid of most of this.
* libhppa.h (struct hppadata): Remove ten pounds of useless ugly
fat. Remove all knowledge of stabs, remove redundant knowledge of
linker symbols.
* Remove macros for accessing fields which are now gone.
Fri Jan 8 15:47:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* bfd.c (struct _bfd): Added ecoff_tdata to tdata union.
* targets.c (enum target_flavour): Added bfd_target_ecoff_flavour.
* coff-msym.c: Use DEFUN for function definitons.
* coff-mips.c: Added code to read and print symbols, and to find
line numbers.
Somewhat more could be done.
Fri Jan 8 15:47:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* coffcode.h: Moved many generic functions into coffgen.c. Moved
swapping functions into coffswap.h for ECOFF use. Moved
relocation functions, only used by h8300 and z8k, into reloc16.c.
Added hooks for coffgen.c functions to backend data structure, and
added hook functions. Still more could be done.
* coffswap.h: New file to hold COFF swapping routines.
* coffgen.c: New file to hold generic COFF functions.
* reloc16.c: New file to hold h8300 and z8k specific relocation
functions.
* libcoff-in.h: Added declarations for functions in coffgen.c.
* libcoff.h: Rebuilt to incorporate changes.
* coff-h8300.c: Function name changes.
* coff-z8k.c: Function name changes. Use coff_reloc16_extra_cases
hook rather than defining EXTRA_CASES.
* Makefile.in: Build new files coffgen and reloc16. Added
dependencies of coff-*.o on coffswap.h and seclet.h.
* coffcode.h (coff_real_object_p): use name I386AIXMAGIC rather
than I386SVMAGIC.
(coff_pointerize_aux): don't pointerize a negative tagndx
(sometimes generated by SCO 3.2v4 cc).
* bout.c (calljx_callback, callj_callback,
b_out_get_relocated_section_contents): warn if relocating against
an undefined symbol.
Make a bunch more routines be static.
* hppa.c (fill_spaces): Get rid of this, replace with much better
written setup_sections().
* (setup_sections): New routine to create BFD sections for each
space and subspace in SOM files.
* (hppa_object_setup): Use BFD sections created by
setup_sections() to locate GDB symbol table info.
* (make_unique_section): New routine to create a BFD section. It
ensures that the given name is unique, and will generate a unique
one if necessary.
* (hppa_object_p): Become much more paranoid about file header.
* (make_bfd_asection): Call bfd_make_section to do the dirty
work. Simplify code somewhat.
* (hppa_core_file_p): Use proper name for stack section.
* libhppa.h: Remove millicode_start, millicode_end decls.
on the possible size of any object in a bfd.
* elf.c (bfd_elf_find_section, elf_get_str_section,
elf_get_symtab_upper_bound): Rewrite to avoid NULL pointer
dereferences.
* elf.c (elf_big_vec, elf_little_vec): Document last three
members initialized to NULL.
perhaps we can later remove the the_bfd field from each symbol.
* syms.c (struct symbol_cache_entry): Remove unused field
app_data. Add comment noting that the_bfd is almost redundant,
but not quite.
* aoutx.h, coff-a29k.c, coff-i386.c, coff-i960.c, coffcode.h:
Use new macros bfd_asymbol_bfd and bfd_asymbol_flavour.
* hppa.c (fill_spaces): Make slightly more rebust.
* configure.in: Allow std-host as the "default" host.
Get rid of HPPA/BSD specific code. That will go somewhere else
someday.
* (fill_spaces): Don't spin forever and die if you don't find
$MILLICODE$ subspace.
* (hppa_object_p): Make sure that we have a real honest-to-cthulu
exec file!
* (hppa_core_file_failing_signal, hppa_core_file_failing_command):
Make these work for HPUX.
* (make_bfd_asection): New routine to make section creation a
little easier.
* (hppa_core_file_p): Completely rewrite, leave out bugs.
* libhppa.h: #include the right system files. Redefine all of
the structs/macros for hacking core files to use more sensible
HPUX core file structures.
* targets.c (target_vector): Conditionalize hppa_vec on
HOST_HPPAHPUX, not hp9000s800.
* hosts/hppahpux.h: #include stdlib.h to get correct decls for
malloc and realloc. #define HOST_HPPAHPUX.
Get rid of HPPA/BSD specific code. That will go somewhere else
someday.
* (fill_spaces): Don't spin forever and die if you don't find
$MILLICODE$ subspace.
* (hppa_object_p): Make sure that we have a real honest-to-cthulu
exec file!
* (hppa_core_file_failing_signal, hppa_core_file_failing_command):
Make these work for HPUX.
* (make_bfd_asection): New routine to make section creation a
little easier.
* (hppa_core_file_p): Completely rewrite, leave out bugs.
* libhppa.h: #include the right system files. Redefine all of
the structs/macros for hacking core files to use more sensible
HPUX core file structures.
* targets.c (target_vector): Conditionalize hppa_vec on
HOST_HPPAHPUX, not hp9000s800.
* hosts/hppahpux.h: #include stdlib.h to get correct decls for
malloc and realloc. #define HOST_HPPAHPUX.
* Patches from Minh Tran-le <mtranle@paris.intellicorp.com>.
* configure.in (i386-*-isc*, i386-*-aix*): New targets.
* configure.host (i386-*-isc*, i386-*-aix*): New hosts.
* hosts/i386isc.h, config/i386isc.mh: New files for Interactive
Unix.
* hosts/i386aix.h, config/i386aix.mh: New files for AIX on PS/2.
* aix386-core.c: New file for handling core files on AIX on PS/2.
* targets.c: if AIX386_CORE, use aix386_core_vec.
* coffcode.h (coff_real_object_p): check for I386SVMAGIC as well
as I386MAGIC.
* tekhex.c: Insert leading_char (0) into bfd_target struct. Style.
* libcoff.h: Updated to get spacing change from coffcode.h.
* trad-core.c: leading_char is 0 (no symbols!), not '_'.