Commit Graph

611 Commits

Author SHA1 Message Date
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
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
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 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 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
Ian Lance Taylor 1964686f00 * config.bfd (i[34]86-*-netbsd*): New target; use i386-netbsd.
* configure.in: Remove bogus netbsd386 handling.
1993-09-10 17:10:13 +00:00
Ian Lance Taylor 5f9b59542f * coff-mips.c: Don't warn about overflow for MIPS_R_JMPADDR reloc.
Correct overflow detection requires matching the upper four bits
	of the destination against the PC.
1993-09-10 17:00:49 +00:00
Ken Raeburn ffe2639825 * configure.in: Make 64-bit stuff work with "--with-targets=all". 1993-09-09 21:03:20 +00:00
Ian Lance Taylor 23f44e6f1a * libbfd-in.h: Removed swapping routines declarations.
* bfd-in.h: Added swapping routine declarations, and renamed them
	from _do_* to bfd_*.
	* libbfd.c: Renamed swapping routines from _do_* to _bfd_*.
	* Changed all callers.
	* libbfd.h, bfd-in2.h: Rebuilt.
1993-09-07 18:32:33 +00:00
Ian Lance Taylor f3e8b15d8e * elf32-i386.c (elf_howto_table): Set pcrel_offset to true for
R_386_PC32.
1993-09-07 15:45:42 +00:00
Ken Raeburn c6d33b2ff2 configure.in, libbfd, elf, elf-hppa (utah) changes 1993-09-03 20:24:07 +00:00
Jim Kingdon e808f62943 * libhppa.h (hppa_field_adjust): Remove unused `init_value' variable. 1993-09-02 19:24:33 +00:00
Jim Kingdon aa93c577df * hosts/delta88v4.h: New for SVR4.
* configure.hosts: Use it.
1993-09-02 06:06:40 +00:00
Jim Kingdon f6fcc08262 * libaout.h, netbsd386.c: Change M_I386 to M_386_NETBSD. M_I386
is an SCO pre-define.
1993-09-01 19:28:53 +00:00
Ian Lance Taylor 45a78ebbfb * nlmcode.h (nlm_object_p): Set HAS_SYMS if there are external
references.
	(nlm_swap_auxiliary_headers_{in,out}): The copyright length is
	only one byte.
	(nlm_get_symtab_upper_bound): Include debugging symbols in symbol
	count.
	(nlm_slurp_symbol_table): Make symlength unsigned.  Read debugging
	symbols as BFD local symbols.
	(nlm_write_object_contents): Don't bother writing out exported
	symbols more than once; they now appear in the symbol table more
	than once (with and without a prefix) if necessary.  Set offset
	values to be non-zero as NLMLINK does.
1993-08-31 17:28:03 +00:00
Jim Kingdon aef3ae9a8f * libhppa.h: Restore #undefs of e_fsel and other e_* symbols. 1993-08-31 17:11:46 +00:00
Ken Raeburn 5f05dcd9ac section.c, hppa changes 1993-08-28 00:17:05 +00:00
Ken Raeburn e2a422b84c Merged in changes from Jeff Law and Pete Hoogenboom at Utah for PA ELF
support.  Compiles, not particularly well tested.  See ChangeLog for details.
1993-08-25 01:15:07 +00:00
Jim Kingdon ae33833d63 add ChangeLog entry for sef change to aoutx.h 1993-08-23 20:29:54 +00:00
Jim Kingdon c28096f36a Write (half-assed) ChangeLog entry for sef changes.
Change name of target from netbsd-386 to a.out-netbsd-386 so that GDB
can recognize it as an a.out variant.
1993-08-23 19:35:33 +00:00
Jim Kingdon 8d3ad2528f * config/m88k-elf.mt: New file.
* config.bfd: Use it for m88*-*-sysv4*.
1993-08-21 00:52:58 +00:00
Ken Raeburn d24928c05b * elfcode.h (elf_build_phdrs): Unused function deleted.
(bfd_shdr_from_section): Ditto.
(write_relocs): Don't change section contents for addend.
(elf_locate_sh): Return type is now always elf_internal_shdr, since the other
types were really aliases for this type anyways.  Don't compile this function,
since it is static and doesn't appear to be used in this file.
(sym_is_global): Return non-zero for weak symbols.  Abort if sec ptr is null.
(swap_out_syms): Reorder tests so function symbols can be weak.
(elf_slurp_symbol_table): Don't use BSF_EXPORT.
(elf_slurp_reloca_table): Make RELOC_PROCESSING section smaller by
extracting out some common code.  Abort if BFD section symbol has null name.
(elf_slurp_reloc_table): Translate ELF section symbols into BFD section
symbols.  Don't read section contents to fill in addend field.

* Merged from OSF:

Tue Jun 15 14:38:32 1993  Michael Meissner  (meissner@osf.org)

* libelf.h (struct Elf_Sym_Extra): New structure to contain ELF
specific information for a symbol.  Put in elf_sym_num, which
gives the external symbol number in the elf object file, since
local symbols must come before global symbols.
(elf_sym_extra): New macro.
(elf_symtab_map): Delete, in favor of using Elf_Sym_Extra.
* elfcode.h (elf_map_symbols): Use Elf_Sym_Extra to map internal
symbol number to external number.  Store the address of the
Elf_Sym_Extra field for the symbol in the udata field.
(elf_write_object_contents): Use Elf_Sym_Extra to map out symbols.

Sun Jun 20 16:30:11 1993  Michael Meissner  (meissner@osf.org)

* elfcode.h (elf_obj_tdata): Add field to count the size of the
array of pointers to section symbols.
(elf_map_symbols): Bump the max index of the section symbols so
that we don't overwrite memory.  Store the max index into the
elf_obj_tdata field.

Sat Jun 19 10:12:27 1993  Michael Meissner  (meissner@osf.org)

* elfcode.h (elf_obj_tdata): Add pointer to an array of pointers
to the section symbols we created.  Remove unused field internal_syms.
(elf_map_symbols): Fill in array of pointers to section symbols.  Only create
section symbols for sections that have SEC_ALLOC set, and have non-zero size.
(elf_symbol_from_bfd_symbol): If udata is NULL, and this is a section symbol,
look up the section in the list of section symbols, and set the udata pointer
appropriately.  Otherwise, if udata is still NULL, fail an assertion, and use
0, instead of dropping core.
1993-08-20 22:21:49 +00:00
Ken Raeburn 7bece32411 * elf32-i386.c (elf_howto_table): All partial_inplace fields should be "true". 1993-08-20 21:18:56 +00:00
Ian Lance Taylor 03f4cf996a * config.bfd (mips-*-elfl*, mips-*-elf*): New targets, using
mipslelf and mipsbelf respectively.
	* config/mipslelf.mt, config/mipsbelf.mt: New files.
	* elf32-mips.c: Added some reloc information.
	* configure.in: Fixed error message.
1993-08-20 19:19:51 +00:00
Ian Lance Taylor 5a735b6353 * ecoff.c (ECOFF_LONG_SIZE): Removed. Just use constants. 1993-08-20 16:21:45 +00:00
David MacKenzie 010877137c * Makefile.in (BFD_LIBS, ALL_MACHINES, BFD32_BACKENDS, BFD64_BACKENDS,
OPTIONAL_BACKENDS): Alphabetize entries and add a few missing ones.
	* archures.c: Alphabetize decls.
1993-08-19 21:07:50 +00:00
David MacKenzie c8e1d00b19 targets.c (target_vector): Remove hp300bsd_vec due to clash with sunos_big_vec. 1993-08-19 19:11:30 +00:00
David MacKenzie cf39664e3c Thu Aug 19 09:45:51 1993 David J. Mackenzie (djm@thepub.cygnus.com)
* configure.in, targets.c: Add missing vectors to the tables.
	* targets.c (target_vector) [!SELECT_VECS]: Add DEFAULT_VECTOR.
1993-08-19 18:21:58 +00:00