Commit Graph

3670 Commits

Author SHA1 Message Date
Nick Clifton c7eece073a RELOC_22_PCREL only uses bottom 24 bits of PC. 1997-10-14 00:34:46 +00:00
Nick Clifton 676d3f022c Fixed bugs exposed by compiling NEC sample sources. 1997-10-10 23:01:17 +00:00
David Edelsohn 70e818d423 * elf64-sparc.c (sparc_elf_{hix22,lox10}_reloc): New functions.
(sparc64_elf_howto_table): Use them for HIX22,LOX10 relocs.
1997-10-09 23:46:24 +00:00
Richard Henderson b0632d61e0 * elfcore.h (bfd_prstatus): Pedanticly, alignment_power should
be LOG_FILE_ALIGN.
1997-10-08 18:41:19 +00:00
Richard Henderson ba2934ce9b * config.bfd: Missed one alpha* change. 1997-10-08 18:39:23 +00:00
Ian Lance Taylor 758b6765b8 * som.c (som_construct_extended_name_table): Remove static
function, and define as macro instead.
1997-10-07 15:41:40 +00:00
Stan Shebs 6d11ae7b63 Remove sanitized-out Magic Cap support, will never be released 1997-10-06 23:57:21 +00:00
Richard Henderson 6b5f5d6107 * config.bfd: Change alpha-*-* to alpha*-*-*; config.guess now
recognizes alphaev5 etc.
        * configure.host: Likewise.
1997-10-03 21:06:27 +00:00
Ian Lance Taylor 927e3a3094 Make ld -s work on AIX:
* xcofflink.c (xcoff_link_add_symbols): Don't create the .debug
	section if we are stripping.
	(bfd_xcoff_size_dynamic_sections): Don't set the .debug section
	size if we are stripping.
	(_bfd_xcoff_bfd_final_link): Don't set SEC_RELOC or rel_filepos,
	and don't write out relocs, if we are stripping.
	(xcoff_link_input_bfd): Don't set up reloc if we are stripping.
	(xcoff_write_global_symbol): Don't write out symbol or reloc if we
	are stripping.
1997-10-03 18:22:35 +00:00
Ian Lance Taylor d9eff006a5 * configure.in: Don't include elf.lo again for ELF targets; it's
always in the library anyhow.
	* configure: Rebuild.
1997-10-03 16:53:51 +00:00
Ian Lance Taylor 9b5ec8b1e0 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Cast to bfd_byte *, not
char *, when calling bfd_get_32 and bfd_put_32.
	* sunos.c (sunos_scan_dynamic_symbol): Cast contents to char *
	when calling strcpy.
1997-10-03 15:25:10 +00:00
David Edelsohn 22b23d7deb * reloc.c (bfd_check_overflow): New function.
(bfd_perform_relocation, bfd_install_relocation): Use it.
	(BFD_RELOC_SPARC_{DISP64,PLT64}): New relocs.
	(BFD_RELOC_SPARC_{HIX22,LOX10,H44,M44,L44,REGISTER}): New relocs.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
1997-10-02 23:55:22 +00:00
David Edelsohn a446b86dec * elf32-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
renamed to R_SPARC_UNUSED_42.
	(sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
	* elf64-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
	renamed to R_SPARC_UNUSED_42.
	(sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
	* reloc.c (BFD_RELOC_SPARC_GLOB_JMP): Delete.
	* bfd-in2.h: Regenerated.
	* libbfd.h: Regenerated.
1997-10-02 20:51:12 +00:00
Ian Lance Taylor 2fb4c89fb4 * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_READ for an
unrecognized section.  From Jon Thackray <jont@harlequin.co.uk>.
1997-10-02 17:22:35 +00:00
Ian Lance Taylor 9347808dd9 * Makefile.am ($(BFD_H)): Change stmp-bfd.h to stmp-bfd-h.
(stmp-bfd-h): Rename from stmp-bfd.h.
 	(BFD_H_FILES, LIBBFD_H_FILES, LIBCOFF_H_FILES): New variables.
	($(srcdir)/bfd-in2.h): Just depend upon stmp-bin2-h.
	(stmp-bin2-h): New target.
	($(srcdir)/libbfd.h): Just depend upon stmp-lbfd-h.
	(stmp-lbfd-h): New target.
	($(srcdir)/libcoff.h): Just depend upon stmp-lcoff-h.
	(stmp-lcoff-h): New target.
	(CLEANFILES): Change stmp-bfd.h to stmp-bfd-h.  Add stmp-bin2.h,
	stmp-lbfd-h, and stmp-lcoff-h.
	* Makefile.in: Rebuild.
1997-10-01 18:45:44 +00:00
Ian Lance Taylor 7810074c29 * configure.in: Use a diversion to set enable_shared before the
arguments are parsed.
	* configure: Rebuild.
1997-10-01 18:05:52 +00:00
David Edelsohn 3869b11f87 * elf32-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
renamed to R_SPARC_UNUSED_42.
	(sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
	* elf64-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
	renamed to R_SPARC_UNUSED_42.
	(sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
	* reloc.c (BFD_RELOC_SPARC_GLOB_JMP): Delete.
	* bfd-in2.h: Regenerated.
	* libbfd.h: Regenerated.
1997-09-30 21:33:19 +00:00
Ian Lance Taylor 3359a0bcec * elflink.h (elf_merge_symbol): Don't check the hash creator until
after we have set *sym_hash.
1997-09-25 16:16:11 +00:00
Ian Lance Taylor 780a00c9f3 Wed Sep 24 16:52:28 1997 Joel Sherrill <joel@oarcorp.com>
* config.bfd (sh*-*-rtems*): New target, like sh-*-*elf*.
1997-09-24 20:53:25 +00:00
Ian Lance Taylor 0035c8a009 * Makefile.am (libbfd_a_SOURCES): Define.
* Makefile.in: Rebuild.
1997-09-24 16:22:13 +00:00
Ian Lance Taylor 805c3d70bd * configure.in: Call AC_CHECK_TOOL before AM_PROG_LIBTOOL.
* aclocal.m4: Rebuild with new libtool.
	* configure: Rebuild.
1997-09-24 15:30:03 +00:00
Ian Lance Taylor 3099ef787a * elf.c (map_sections_to_segments): Even if we are not demand
paged, don't put a loadable section after a nonloadable section.
	(assign_file_positions_for_segments): Increment the file offset
	for a section with contents, even if it is not loadable.
PR 13139.
1997-09-23 23:04:37 +00:00
Nick Clifton 15d82b260c Removed v850eq sanitization.
Changed mismatch architecture message to a warning.
1997-09-20 23:59:31 +00:00
Nick Clifton 55e6f0bf32 Improved error message to include symbol's name. 1997-09-18 22:02:06 +00:00
Felix Lee e1625ed217 v850 files that weren't being removed if !keep-v850 1997-09-18 01:33:24 +00:00
Nick Clifton 9420c20ac4 Added support for the call table relocations. 1997-09-17 23:50:21 +00:00
Nick Clifton db1fa6ab26 Catch relocations against non-existant symbols. 1997-09-17 16:52:23 +00:00
Nick Clifton 5bb2876408 Add support for a 16 bit reloc against the TDA pointer! 1997-09-16 21:21:30 +00:00
Ken Raeburn 2199f848c0 merge from d30v-970225-branch 1997-09-15 16:43:43 +00:00
Andrew Cagney f2dbbf9543 Fix sanitization. 1997-09-15 08:21:04 +00:00
Nick Clifton 43898c918f Removed spurious error return. 1997-09-10 22:15:31 +00:00
Andrew Cagney eaa9c2e7ac New function: bfd_arch_list cf bfd_target_list.
Make bfd_default_scan (arch) more flexable in its match of name to arch,
remove some of the dead code.
1997-09-10 05:55:15 +00:00
Nick Clifton 5ddf2a9e6c Do not complain if an R_V850_LO16 reloc has bit 15 set. 1997-09-09 23:52:39 +00:00
Nick Clifton 98ab32a58a Fixed buglet displaying machine architecture. 1997-09-09 17:20:41 +00:00
Richard Henderson 60b570d17a Sun Sep 7 12:25:22 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
* bfd/elf64-alpha.c (reloc_howto_type): Fix the howto table.
1997-09-07 21:34:32 +00:00
Ian Lance Taylor 1732b93b48 * Makefile.am: Rebuild dependencies.
(ALL_MACHINES_CFILES): Add cpu-v850.c.
	(ALL_MACHINES_CFILES): Add elf32-v850.c.
	* Makefile.in: Rebuild.
1997-09-04 18:02:56 +00:00
Ian Lance Taylor 4878fa5b57 * reloc.c: Remove extraneous commas from relocation entries.
Remove BFD_RELOC_V850_16_PCREL.
	* bfd-in2.h: Rebuild.
1997-09-04 17:51:12 +00:00
Ian Lance Taylor 7dac939c43 fix sanitizations and copyright 1997-09-04 17:34:50 +00:00
Ian Lance Taylor 679bf0a2a4 * xcofflink.c (xcoff_link_add_symbols): Put XTY_CM/XMC_TD symbols
in sections named .tocbss rather than .bss.
For AIX 4.2 support (PR 12597).
1997-09-04 16:44:52 +00:00
Nick Clifton 2cf9a0d043 Removed v850 sanitization.
Fixed v850e sanitization.
1997-09-03 22:50:06 +00:00
Nick Clifton 93f1885739 Removed BFD_RELOC_V850_PCREL. 1997-09-03 18:22:00 +00:00
Fred Fish c2d708261f * cofflink.c (coff_link_check_ar_symbols): Handle C_SYSTEM syms
the same as C_EXT syms.
        (coff_link_add_symbols): Ditto.
        (_bfd_coff_link_input_bfd): Ditto.
        (_bfd_coff_write_task_globals): Add save_global_to_static.  Use
        it to preserve and restore state of global_to_static flag.
PR 13202
1997-09-03 04:14:29 +00:00
Nick Clifton 8bef8c3071 Set machine number based in bits in e_flags field rather than magic number. 1997-09-03 00:44:56 +00:00
David Edelsohn 1c0e698e2f * cpu-arc.c (arc_get_mach): Properly scan defined mach entries. 1997-09-03 00:36:19 +00:00
Jeff Law a9d67a8857 * elf-m10200.c (mn10200_elf_final_link_relocate): PC relative
instructions are relative to the next instruction, not the
        current instruction.
        (mn10200_elf_relax_section): Similarly.

pr13171
1997-09-03 00:31:34 +00:00
Nick Clifton def31039ac Switched over to using new reloc types. 1997-09-02 22:53:31 +00:00
Andrew Cagney f40d28bfc0 Add sh3 et.al. to SH arch table.
Improve machine name parsing for v850 and SH.
1997-08-28 10:01:33 +00:00
Andrew Cagney 2f88c3244e * archures.c (bfd_archures_list): Always NULL terminate the list. 1997-08-27 07:40:23 +00:00
Ian Lance Taylor 099ddbf117 * Makefile.am: Rebuild dependencies.
(ALL_MACHINES_CFILES): Add cpu-arc.c.
	(ALL_MACHINES_CFILES): Add elf32-arc.c.
	(elf32-arc.lo): Remove explicit dependency.
	* Makefile.in: Rebuild.
1997-08-26 22:26:20 +00:00
Ian Lance Taylor aa7bd5a5a2 fix v850 machine number stuff 1997-08-26 22:23:58 +00:00
Ian Lance Taylor 2c66160cfb * acinclude.m4 (BFD_CC_FOR_BUILD): Set EXEEXT_FOR_BUILD.
* doc/Makefile.am (MKDOC): Use EXEEXT_FOR_BUILD, not EXEEXT.
	* aclocal.m4, configure, Makefile.in, doc/Makefile.in: Rebuild.
1997-08-26 21:30:19 +00:00
Chris Provenzano 70e8e5854f Rebuild with latest devo autoconf for NT support 1997-08-25 23:16:51 +00:00
Nick Clifton 04f295b648 Fixed minor buglet in compatible. 1997-08-25 23:08:49 +00:00
Nick Clifton 8988d935a3 Switched over to using machine numbers to distinguish v850 architecture variants. 1997-08-25 23:00:29 +00:00
Ian Lance Taylor 591ebe4255 * syms.c (_bfd_stab_section_find_nearest_line): Clear the
cached_stab field if the offset prevents us from using the cache.
1997-08-25 18:10:15 +00:00
Nick Clifton 845c40d529 Added rules to build cpu-v850e.lo and cpu-v850eq.lo object files. 1997-08-25 17:04:46 +00:00
Ian Lance Taylor a068267798 * aout-target.h (MY(vec)): Add SEC_CODE and SEC_DATA to section
flags.
	* aout-arm.c (aout_arm_little_vec): Likewise.
	(aout_arm_big_vec): Likewise.
	* bout.c (b_out_vec_big_host): Likewise.
	(b_out_vec_little_host): Likewise.
	* mipsbsd.c (aout_mips_little_vec): Likewise.
	(aout_mips_big_vec): Likewise.
1997-08-25 16:10:56 +00:00
Nick Clifton c429dba96d oops - fixed bugs in new v850e/q rules. 1997-08-19 17:07:05 +00:00
Fred Fish c4188c2a6a * coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
(GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define.
	* coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define.
	* coffcode.h (coff_set_alignment_hook): Conditionally compile in if
	COFF_ALIGN_IN_SECTION_HEADER is defined.  Convert alignment to power
	of two for I960 only.
	* coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO,
	PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide
	default definitions.
	(coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC,
	GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN.
	(coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN.
start-sanitize-tic80
	* Makefile.in (coff-tic80.o): Depends upon coffswap.h.
	* coff-tic80.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
	(GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Define
	*coffcode.h (coff_write_object_contents): Set alignment field in
 	section header for TIC80COFF files.
end-sanitize-tic80
PR 12215 and PR 13061
1997-08-19 16:44:00 +00:00
Nick Clifton def47b537e Add support for v850e and v850eq targets.
Add support for BFD_RELOC_V850_PCREL relocation.
1997-08-18 18:42:35 +00:00
Ian Lance Taylor 00c7247bce * coffgen.c (coff_find_nearest_line): Correctly handle the offset
argument as section relative, rather than an absolute address.
	From Jan Hoogenraad <hoogenrd@natlab.research.philips.com>.
1997-08-15 16:02:53 +00:00
David Edelsohn 76af94b9a4 Remove ARC sanitization. 1997-08-15 12:08:52 +00:00
Ian Lance Taylor 6ccdc203e6 * aoutx.h (NAME(aout,final_link)): Don't emit the string table if
there are no symbols.
1997-08-11 16:46:40 +00:00
Ian Lance Taylor 2af5a7e491 * coff-stgo32.c: Rename from coff-stubgo32.c to avoid old System V
file system 14 character limit.
	* Makefile.am, configure.in: Corresponding changes.
	* Makefile.in, configure: Rebuild.
1997-08-10 18:47:36 +00:00
Ian Lance Taylor c40331ba92 * Makefile.am (docdir): Define.
* Makefile.in: Rebuild.
1997-08-06 22:57:44 +00:00
Ian Lance Taylor 097fd78abe * configure: Rebuild with autoconf 2.12.1. 1997-08-06 03:05:32 +00:00
Peter Schauer e6071dc57f * rs6000-core.c (make_bfd_asection): New function to add a section
to the core file bfd.
	(rs6000coff_core_p):  Use make_bfd_asection to add the core file
	sections.
	Use BFD routines to seek, read and stat the core file.
	Handle .data sections from loaded objects and anonymously mmapped
	regions, these are available in AIX 4 core files.
1997-08-03 15:16:37 +00:00
Ian Lance Taylor aa13d30d81 * configure.in: Set enable_shared before AM_PROG_LIBTOOL.
* acinclude.m4: Move acmacros.m4 in here.  Remove AM_PROG_LIBTOOL
	copy; use a patches libtool instead.
	* acmacros.m4: Remove.
	* Makefile.in, aclocal.m4, configure: Rebuild.
1997-08-01 17:01:36 +00:00
Ian Lance Taylor a3d2e13be9 sanitize Makefile.am 1997-08-01 15:56:29 +00:00
Ian Lance Taylor 5e377ed2f2 tweaks 1997-08-01 01:43:21 +00:00
Ian Lance Taylor 9df51f4f39 * VERSION: Remove. 1997-08-01 00:46:56 +00:00
Ian Lance Taylor c073470881 * Makefile.am: New file, based on old Makefile.in.
* acinclude.m4: New file, copied from old aclocal.m4.
	* configure.in: Define and call AM_PROG_LIBTOOL and friends.
	Remove shared library handling; now handled by libtool.  Replace
	AC_CONFIG_HEADER with AM_CONFIG_HEADER.  Call AM_MAINTAINER_MODE,
	AM_CYGWIN32, and AM_EXEEXT.  Change all .o files to .lo.  Remove
	stamp-h handling in AC_OUTPUT.
	* acconfig.h: Mention PACKAGE and VERSION.
	* stamp-h.in: New file.
	* dep-in.sed: Change .o to .lo.
	* Makefile.in: Now built with automake.
	* aclocal.m4: Now built with aclocal.
	* config.in, configure: Rebuild.
1997-08-01 00:04:48 +00:00
Ian Lance Taylor bc6b39f5f5 * Makefile.am: New file, based on old Makefile.in.
* Makefile.in: Now built with automake.
1997-08-01 00:04:05 +00:00
Ian Lance Taylor 3745ac6db2 Thu Jul 31 12:09:20 1997 Geoff Keating <geoffk@ozemail.com.au>
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Don't set TEXTREL
 	if there is only a relocation to a read-only but not allocatable
 	section (like .stab).
	* elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
	* elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
	* elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
	* elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
	* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.

	* elf32-ppc.c (ppc_elf_howto_raw): Correct various comments.
	(ppc_elf_create_linker_section): These sections are not
	created by the linker (that is, they are created by the user
	putting data in them). In particular, they can be the source
	and target of relocations.
	(ppc_elf_adjust_dynamic_symbol): Check postcondition of
 	bfd_elf32_link_record_dynamic_symbol.  Align 16-byte common
 	objects (for instance, 'long double') to 16-byte boundaries.
	(ppc_elf_size_dynamic_sections): Make the code that generates
	section symbols exactly the same as for sparc, reducing the
	number of section symbols output.
	(ppc_elf_check_relocs): Check postcondition of
	bfd_elf32_link_record_dynamic_symbol.  Make default case the
	same as corresponding code for sparc, fixing bug involving
	.rela.stabs.
	(ppc_elf_finish_dynamic_symbol): Fix case involving GOT symbols
 	forced to be local because of versioning (by replicating
 	corresponding change in sparc).  Treat R_PPC_RELATIVE RELA relocs
 	as usual in ELF, not as pseudo-REL relocs (as the sparc linker
 	does).
	(ppc_elf_relocate_section): Add handy debugging code for when
 	assertion fails.  Add some more 'symbol made local because of
 	versioning' cases.

	* elf32-ppc.c (ppc_elf_relocate_section): Cope with addend when
	processing a GOT relocation as required by ABI.
1997-07-31 16:15:02 +00:00
Ian Lance Taylor 13eb6306e7 Wed Jul 30 21:30:35 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elflink.h (NAME(bfd_elf,record_link_assignment)): Remove any
	version info if this symbol came from a dynamic object.
	(elf_link_add_object_symbols): Set the version info of a symbol
	only if the object actually contains version definitions and
	defines this symbol.
1997-07-31 01:35:46 +00:00
Rob Savoye b1ee3d6a87 * aclocal.m4: Add CYGWIN and EXEEXT autoconf macros.
* configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
        win32 dependencies.
        * configure: Regenerated with autoconf 2.12.
        * doc/Makefile.in: Add $(EXEEXT) to chew executable.
1997-07-29 00:37:04 +00:00
Felix Lee 8dbbb8be9b * coffswap.h (coff_swap_aux_in): add semicolon to make MSVC happy. 1997-07-28 21:59:14 +00:00
Peter Schauer f366291b4f * rs6000-core.c (rs6000coff_core_p): If CORE_TRUNC is set, print
a warning rather than returning an error.
1997-07-28 09:52:23 +00:00
Felix Lee 3e94ea70e6 * cisco-core.c: define signals for wingdb. 1997-07-25 21:58:27 +00:00
Ian Lance Taylor fbd550db30 * ecofflink.c (bfd_ecoff_debug_accumulate): Only merge files with
the same number of aux entries.
PR 12962.
1997-07-25 20:27:50 +00:00
Jeff Law 491501de77 * som.c (hppa_som_gen_reloc_type): Use R_DATA_EXPR for the
difference of two symbols if the relocation size is 32 bits.
        (som_write_fixups): Handle R_DATA_EXPR.
Useful stuff from one of the aborted attempts to fix 12912.
1997-07-25 14:20:12 +00:00
Ian Lance Taylor 1868acf81d * coff-i386.c (coff_i386_reloc): Don't offset a common symbol by
its value if COFF_WITH_PE is defined.
1997-07-23 20:08:37 +00:00
Ian Lance Taylor 88a25e44d3 Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
* config.bfd (i[3456]86-*-msdosdjgpp*): New target.
	(i[3456]86-*-go32*): Change to be like new msdosdjgpp*.
1997-07-22 22:33:02 +00:00
Ian Lance Taylor 179ce6e10b Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
* coff-stubgo32.c: New file.
	* go32stub.h: New file.
	* coff-i386.c: If COFF_GO32_EXE, include coff/go32exe.h.
	* targets.c (go32stubbedcoff_vec): Declare.
	(bfd_target_vector): Add go32stubbedcoff_vec.
	* configure.in (go32coff_vec): New target vector.
	(go32stubbedcoff_vec): Likewise.
	* Makefile.in: Rebuild dependencies.
 	(BFD32_BACKENDS): Add coff-stubgo32.o.
	(BFD32_BACKENDS_CFILES): Add coff-stubgo32.c.
	(HFILES): Add go32stub.h.
1997-07-22 22:29:11 +00:00
Ian Lance Taylor e8640d5e09 Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
* coffswap.h (coff_swap_filehdr_in): Invoke
	COFF_ADJUST_FILEHDR_IN_PRE and COFF_ADJUST_FILEHDR_IN_POST if they
	are defined.
	(coff_swap_filehdr_out): Invoke COFF_ADJUST_FILEHDR_OUT_PRE and
	COFF_ADJUST_FILEHDR_OUT_POST if they are defined.
	(coff_swap_aux_in): Invoke COFF_ADJUST_AUX_IN_PRE and
	COFF_ADJUST_AUX_IN_POST if they are defined.
	(coff_swap_aux_out): Invoke COFF_ADJUST_AUX_OUT_PRE and
	COFF_ADJUST_AUX_OUT_POST if they are defined.
	(coff_swap_scnhdr_in): Invoke COFF_ADJUST_SCNHDR_IN_PRE and
	COFF_ADJUST_SCNHDR_IN_POST if they are defined.
	(coff_swap_scnhdr_out): Invoke COFF_ADJUST_SCNHDR_OUT_PRE and
	COFF_ADJUST_SCNHDR_OUT_POST if they are defined.
1997-07-22 21:20:46 +00:00
Ian Lance Taylor 60f1ad85ac * configure.in: Check for fdopen.
* configure, config.in: Rebuild.
	* opncls.c (bfd_fdopenr): Check HAVE_FDOPEN rather than VMS or
	__GO32__.  Reindent a bit.
1997-07-22 19:11:04 +00:00
Ian Lance Taylor 25496d0ca1 Tue Jul 22 14:44:00 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
* Makefile.in: Change stamp-* files to s-* files.  Use bfdt.texi
	rather than bfd.texi.
 	(DOCFILES): Change bfd.texi to bfdt.texi.
	* bfd.texinfo: Include bfdt.texi, not bfd.texi.
1997-07-22 18:47:27 +00:00
Ian Lance Taylor f1c88b48db * sunos.c (sunos_create_dynamic_sections): Set SEC_LINKER_CREATED
flag for newly created sections.
	(sunos_add_dynamic_symbols): Don't discard newly created sections
	if shared library is dynobj.
1997-07-21 03:06:42 +00:00
Ian Lance Taylor 3fc2c14638 * elf.c (map_sections_to_segments): When checking whether
including a section in a segment would force us to skip a page,
	align the address of the next segment to avoid wraparound
	problems.
PR 12828.
1997-07-14 22:35:27 +00:00
Fred Fish 67bc13a478 Add coffswap.h to file list for TIc80 sanitization. 1997-07-09 00:34:22 +00:00
Fred Fish 7f2e68542b * coffcode.h (coff_write_object_contents): Initialize
target id field to TIC80_TARGET_ID.
      * coffswap.h (coff_swap_filehdr_out): Swap out target id field
      if used.
      (coff_swap_filehdr_in): Swap in target id field if used.
1997-07-09 00:19:41 +00:00
Ian Lance Taylor 4049609622 * coff-i386.c (coff_i386_is_local_label_name): New static function
if TARGET_UNDERSCORE.
	(coff_bfd_is_local_label_name): Define if TARGET_UNDERSCORE.
	(i386coff_vec): Add SEC_CODE and SEC_DATA to section_flags.
1997-07-07 20:42:48 +00:00
Ian Lance Taylor 01da2d5213 * elf32-m68k.c (howto_table): Use complain_overflow_bitfield, not
complain_overflow_signed, for 32 bit PC relative relocations.
1997-06-30 18:30:55 +00:00
Ian Lance Taylor 677525e961 * elflink.h (elf_link_add_object_symbols): When a version
indirection symbol is overridden, make the original symbol point
	at the real overriding symbol.
1997-06-26 16:06:03 +00:00
Ian Lance Taylor 20db24950c * elf.c (bfd_elf_string_from_elf_section): Check for an invalid
string index.
1997-06-26 15:40:41 +00:00
Ian Lance Taylor 8211c92986 * elflink.h (elf_link_output_extsym): Use the right section for a
common symbol.
	* elf32-mips.c (mips_elf_link_output_symbol_hook): If a common
	symbol was in .scommon, mark it as SHN_MIPS_SCOMMON.
PR 12697.
1997-06-26 05:27:56 +00:00
Ian Lance Taylor e9982ee534 Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* elflink.h (elf_merge_symbols): Resolve indirect and warning
	symbols before checking for new symbols.
1997-06-25 16:45:12 +00:00
Ian Lance Taylor 0ac96a37f6 Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* elfcore.h (elf_corefile_note): Move out of HAVE_SYS_PROCFS_H.
1997-06-25 16:43:48 +00:00
Ian Lance Taylor a90f6864be * coffgen.c (coff_object_p): Read the f_opthdr bytes from the
file, not aoutsz bytes (they are different in XCOFF .o files).
1997-06-24 15:22:35 +00:00
Ian Lance Taylor 862eaedc1a comment fix 1997-06-24 14:34:47 +00:00
Ian Lance Taylor 541a4b5425 * elflink.h (elf_merge_symbol): In the case of a new defined
symbol overriding an old defined symbol, return the hash table
	entry which we modify, even if it is the target of an
	indirection.
	(elf_link_add_object_symbols): If the real name of the symbol gets
	overridden, convert the versioned symbol into an indirect symbol
	to the real symbol.
1997-06-24 02:28:03 +00:00
Ian Lance Taylor 044d7d4944 * elflink.h (elf_merge_symbol): New static function, broken out of
elf_link_add_object_symbols.
	(elf_link_add_object_symbols): Call it.
1997-06-23 22:06:29 +00:00
Ian Lance Taylor 3ce6d9410c * coff-i386.c (i3coff_object_p): If COFF_IMAGE_WITH_PE, hack to
handle case where COFF filehdr does not immediately follow PE
	header.
	* coffgen.c (coff_object_p): Remove useless seek to current
	location.
1997-06-22 23:41:55 +00:00
Ian Lance Taylor ba0e3b78dc * linker.c (link_action): Change COMMON_ROW/indr to from CREF to
REFC.
1997-06-18 23:04:29 +00:00
Ian Lance Taylor c4badc83ec revert last patch 1997-06-18 23:02:58 +00:00
Ian Lance Taylor c68867051c * elflink.h (elf_link_add_object_symbols): Don't let a common
symbol in a regular object override a common symbol in a shared
	object if the latter was found via an indirect symbol.
1997-06-18 15:36:33 +00:00
Ian Lance Taylor ac44b2b9c7 * cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging
symbols, skip N_ABS symbols with debugging storage classes.
PR 12630.
Also a couple of warning and formatting fixes.
1997-06-17 15:56:09 +00:00
Ian Lance Taylor c1292d9ba9 whitespace tweaks 1997-06-16 23:33:49 +00:00
Ian Lance Taylor b6eb341bf8 Mon Jun 16 18:56:27 1997 Geoff Keating <geoffk@ozemail.com.au>
* elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL*
 	relocs in shared libraries which refer to local symbols.  Cope
 	with addend when processing a GOT relocation.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols
	for sections that the linker didn't create.
	(ppc_elf_finish_dynamic_sections): Only try to write out a section
 	symbol if it was created in ppc_elf_size_dynamic_sections.
	(ppc_elf_relocate_section): Complain if we have to generate a reloc
	relative to a section for which we didn't output a symbol.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up.  PLT
 	relocs are 'rela' relocs, like everything else.  .rela.plt is not
 	a read-only section, so we don't have to special-case it.

	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the
	.rela.bss section are (of course) 'rela' relocs not 'rel' relocs.

	* elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot.
	(ppc_elf_relocate_section): @got offsets are 4 from start of the
	actual .got section.
	* elflink.c (_bfd_elf_create_got_section): The three reserved
	words start from the symbol '_GLOBAL_OFFSET_TABLE_'.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5
	characters, not 4.

	* elf32-ppc.c (ppc_elf_check_relocs): Use
	_bfd_elf_create_got_section to create the GOT rather than
	ppc_elf_create_linker_section. Create the '.rela.got' section
	ourselves.
	(ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a
	symbol has a GOT entry.
	(ppc_elf_relocate_section): Record when a symbol is used through
	the GOT, and allocate space in the GOT for each such symbol.
	(ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff.
	(ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT
	stuff.

	* elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be
	treated in a similar way to ADDR16_HA relocs.
	(ppc_elf_relocate_section): PLTREL24 relocs do not get copied into
	shared objects; the linker must deal with them.
	(ppc_elf_create_linker_section): Stop setting
	_GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused
	LINKER_SECTION_PLT stuff.
	(ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff.
	(ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT
	section, not ELF-specific calls.
	(elf_backend_plt_not_loaded): Set to 1.
	(elf_backend_got_symbol_offset): Set to 4.
	* elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member
	for when ld.so fills in the PLT; and 'got_symbol_offset' member.
	* elflink.c (_bfd_elf_create_dynamic_sections): Apply
	plt_not_loaded member.
	(_bfd_elf_create_got_section): Apply got_symbol_offset.
	* elfxx-target.h (elf_backend_plt_not_loaded): Set default to
	'loaded'.
	(elf_backend_G_O_T_offset): Set default to 0.
	(elfNN_bed): Set added fields.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting
	DT_RELENT in shared objects; should be DT_RELAENT.

	* elf32-ppc.c (ppc_elf_relocate_section): Propagate
	R_PPC_ADDR16_HA relocs to shared objects. Cope with case where
	such a reloc (in a non-shared object) refers to a symbol that's
	not defined.
1997-06-16 23:05:27 +00:00
Ian Lance Taylor a86bf27a92 credit 1997-06-16 19:34:28 +00:00
Ian Lance Taylor 44edf9165f * Makefile.in (CC, CFLAGS): Substitute from configure script. 1997-06-16 19:34:04 +00:00
Ian Lance Taylor 90d7b9b9dd * elf32-i386.c (elf_i386_relocate_section): When generating a
shared library, do the relocation if the input section is not
	allocated in memory.
1997-06-16 19:24:23 +00:00
Ian Lance Taylor fdc944a7fb Mon Jun 16 14:42:14 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* elfcode.h (put_signed_word): Define.
	(get_signed_word): Define.
	(elf_swap_reloca_in): Use get_signed_word for the r_addend field.
	(elf_swap_reloca_out): Use put_signed_word for the r_addend
	field.
	* elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Use
	bfd_get_signed_32 to set the r_addend field.
	* elf64-mips.c (mips_elf64_swap_reloca_in): Use
	bfd_h_get_signed_64 to set the r_addend field.
1997-06-16 18:45:30 +00:00
Ian Lance Taylor c19fbe0f57 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Call
elf_link_assign_sym_version before elf_adjust_dynamic_symbol.
	(elf_fix_symbol_flags): New static function, broken out of
	elf_adjust_dynamic_symbol.
	(elf_adjust_dynamic_symbol): Call elf_fix_symbol_flags.
	(elf_link_assign_sym_version): Likewise.  Permit a symbol to be
	forced local even if NEEDS_PLT is set.  When forcing a symbol to
	be local, clear NEEDS_PLT.
	(elf_link_output_extsym): Remove unused local bed.
1997-06-16 18:41:19 +00:00
Jeff Law bb2a6cfbfd * elf32-mn10300.c (elf32_mn10300_link_hash_entry): New structure
for derived elf linker hash table entries.  References to
        elf_link_hash_entry changed appropriately.
        (elf32_mn10300_link_hash_table): New structure for derived elf
        linker hash table.
        (elf32_mn10300_hash_table): Define.
        (elf32_mn10300_link_hash_traverse): Likewise.
        (elf32_mn10300_link_hash_newfunc): New function.
        (elf32_mn10300_link_hash_table_create): Likewise.
        (elf32_mn10300_finish_hash_table_entry): Likewise.
        (mn10300_elf_relax_section): Handle "call" -> "calls", removal
        of prologue code, and call:32->call:16 relaxing.
        (compute_function_info: New function.
        (bfd_elf32_bfd_ilink_hash_table_create): Define.
1997-06-12 04:50:18 +00:00
Fred Fish 79a682fd3e Back out last change, there are too many more to fix them all. 1997-06-12 04:26:37 +00:00
Fred Fish f5d3fb7587 * coffgen.c (_bfd_coff_is_local_label_name): Return proper boolean
(enum) type.
1997-06-12 03:22:46 +00:00
Ian Lance Taylor 8519ea2120 * elflink.h (elf_link_output_extsym): Call finish_dynamic_symbol
for a symbol which is being forced to be local.
	* elf32-i386.c (elf_i386_relocate_section): Write out the
 	relocation value for a GOT reloc for a symbol which is turning
 	into a local symbol.
	(elf_i386_finish_dynamic_symbol): If a symbol is turning into a
	local symbol, write out a RELATIVE reloc rather than a GLOB_DAT
	reloc.
	* elf32-m68k.c, elf32-sparc.c: Corresponding changes.
1997-06-11 16:59:00 +00:00
Ian Lance Taylor 6a1878c997 * elf32-i386.c (elf_i386_relocate_section): Get the relocation
value if the symbol is turning into a local symbol.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1997-06-11 04:01:48 +00:00
Ulrich Drepper 601acd6158 (elf_link_add_object_symbols): Also read verneed
information by calling `_bfd_elf_slurp_version_tables'.
(elf_link_add_object_symbols): For undefined symbols look for
version informaiton in the verneed records.
(elf_link_add_object_symbols): Use soname of shared object
for verneed record if it is available.
1997-06-10 21:46:23 +00:00
Ian Lance Taylor ba383e02de Tue Jun 10 11:13:03 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* cpu-arm.c: Add prototypes for compatible and scan.
	* cofflink.c: Add prototype for mark_relocs.

	* archive.c (bfd_special_undocumented_glue): Change filename to
	const pointer.  Add prototype.
1997-06-10 15:16:17 +00:00
Ian Lance Taylor 94e05b00bd Mon Jun 9 12:34:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elflink.h (elf_link_add_object_symbols): Ignore relocations of
	sections that will be discarded.
1997-06-09 16:36:08 +00:00
Ulrich Drepper cf2cd4cf5d (elf_link_find_version_dependencies): When searching
for known version symbol skip non-matching verdef records, not
matching records.
1997-06-06 21:19:41 +00:00
Nick Clifton fd2553f96e Added the Thumb relocations from the armT-970328-branch. 1997-06-04 00:11:36 +00:00
Nick Clifton 48e509bf2c Merged in changes made in armT-970328-branch 1997-06-04 00:07:07 +00:00
Ian Lance Taylor e08eb976ab * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Set dynindx
for a section even if it is not loaded.
Otherwise compiling this
static char bar; char *foo() { return &bar; }
without -fpic and then doing ld -shared OBJECT dumps core.
1997-05-31 01:57:27 +00:00
Ian Lance Taylor 907f6015c0 * cofflink.c (coff_link_add_symbols): If PE file, don't subtract
section VMA.
	(_bfd_coff_link_input_bfd): Separate section VMA handling for
	input and output files.
	(_bfd_coff_generic_relocate_section): Check whether input file,
	not output file, is a PE file.
1997-05-30 16:47:49 +00:00
Ian Lance Taylor 5edcd3b9c9 * coff-i386.c (coff_i386_reloc): Don't just exit if we see an
R_IMAGEBASE reloc.
1997-05-28 20:16:35 +00:00
Nick Clifton 916660cb3b Added support for ARM architecture supersets in the compatibility function. 1997-05-28 16:49:25 +00:00
Bob Manson 3c82a73127 * cofflink.c (_bfd_coff_final_link): Initialize global_to_static
member.

Fixes linker bug on hpux-x-i960-vxworks.
1997-05-28 02:43:30 +00:00
Nick Clifton 177f3d7fc9 Made coff-arm_bfd_set_private_flags global as it is called directly from
gas/config/tc-arm.c .
1997-05-27 21:37:16 +00:00
Ian Lance Taylor 70edb961ea Tue May 27 15:58:53 1997 Richard Henderson <rth@tamu.edu>
* elf64-alpha.c (PLT_ENTRY_*): Use a new thread-safe format.
	(elf64_alpha_finish_dynamic_symbol): Fill it in properly.
1997-05-27 20:01:14 +00:00
Ian Lance Taylor d82e4bf6cc * coff-ppc.c (coff_ppc_relocate_section): If PE file, don't add
section VMA.
1997-05-26 18:09:21 +00:00
Fred Fish 315dc1f411 * peicode.h (coff_bfd_print_private_bfd_data): #undef before #define.
(coff_bfd_copy_private_bfd_data): Ditto.
	* coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Make static.
	(coff_arm_bfd_print_private_bfd_data): Ditto.
	(coff_arm_bfd_set_private_flags): Ditto.
	(coff_arm_bfd_copy_private_bfd_data): Ditto.
1997-05-26 18:00:54 +00:00
Fred Fish e074d05eac * libcoff-in.h (struct coff_final_link_info): Add boolean
global_to_static member for support of task linking.
	(_bfd_coff_write_task_globals): Add prototype.
	* libcoff.h: Regenerate.
	* coffcode.h (coff_write_object_contents): Use #ifdef to
	check RS6000COFF_C, to be consistent with all other uses
	in this file.
	* cofflink.c (_bfd_coff_final_link): If doing task linking,
	call _bfd_coff_write_task_globals.
	(_bfd_coff_link_input_bfd): If doing task linking, convert
	global functions to static.
	(_bfd_coff_write_global_sym): If doing task linking, convert
	global variables to static.
	(_bfd_coff_write_task_globals): New function.
	* coff-tic80.c (TIC80COFF): Define this instead of just TIC80.
	(C_AUTOARG): #undef since it clashes with C_UEXT.
	(C_LASTENT): #undef since it clashes with C_STATLAB.
	* coffcode.h (coff_write_object_contents): Use TIC80COFF
	rather than TIC80.
	(coff_slurp_symbol_table): Use C_SYSTEM.  Hide C_AUTOARG use
	when TIC80COFF defined (clashes with C_UEXT).  Explicitly
	recognize C_UEXT, C_STATLAB, and C_EXTLAB as unsupported.
PR 12236
1997-05-24 15:30:55 +00:00
Ian Lance Taylor 546d7a90d0 * coff-tic80.c (tic80_howto_table): Change overflow check for most
PP relocations to complain_overflow_dont.
1997-05-23 16:39:10 +00:00
Ian Lance Taylor 8ac5f94028 * coff-tic80.c (tic80_howto_table): Add PP relocations. Change
name of R_RELLONG to "RELLONG".  Set rightshift and complain for
	M_PPCR.
	(ppbase_reloc, glob15_reloc): New static functions.
	(glob16_reloc, local16_reloc): New static functions.
	(rtype2howto): Handle all relocation types.
	(coff_tic80_relocate_section): New static function.
	(coff_relocate_section): Define to coff_tic80_relocate_section.
	* Makefile.in (coff-tic80.o): Depends upon include/coff/tic80.h.
1997-05-23 00:26:58 +00:00
David Edelsohn 97cbfc2309 Tweak ChangeLog entry. 1997-05-22 21:12:22 +00:00
Ian Lance Taylor 20a9631ae3 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE or
COFF_IMAGE_WITH_PE, don't subtract the section VMA from the symbol
	value.
	* coffgen.c (fixup_symbol_value): Add abfd parameter.  Change all
	callers.  If PE file, don't add section VMA.
	(coff_write_alien_symbol): If PE file, don't add section VMA.
	* cofflink.c (_bfd_coff_link_input_bfd): Likewise.
	(_bfd_coff_write_global_sym): Likewise.
	(_bfd_coff_generic_relocate_section): Likewise.
1997-05-21 21:42:38 +00:00
Ian Lance Taylor d2d70da54f * peicode.h: Add & 0xffffffff when using ImageBase in case bfd_vma
is 64 bits.
1997-05-21 21:17:17 +00:00
Nick Clifton e18683b73b Added code to cope with 'ld -X -r' stripiung symbols that will later be
used in relocations.
1997-05-21 16:59:02 +00:00
Ian Lance Taylor 4e39c0f9b2 * coff-sh.c (sh_merge_private_data): New static function.
(coff_bfd_merge_private_bfd_data): Define.
PR 12351.
1997-05-20 22:45:49 +00:00
Mark Alexander d667d8f251 * coff-tic80.c: Remove unnecessary #ifdefs.
* config.bfd: Set targ_underscore to yes for tic80.
1997-05-19 21:47:45 +00:00
Mark Alexander 69f3f9f7c7 * coff-tic80.c (NAMES_HAVE_UNDERSCORE): Define (fixes problem
with unresolved external symbols in GDB).
1997-05-19 21:26:34 +00:00
Jeff Law efc02f6657 * elf-m10300.c (elf32_mn10300_relax_section): Read in all
the symbols associated with each BFD.
        (mn10300_elf_relax_delete_bytes): Don't adjust the same symbol
        more than once.
        * elf-m10200.c: Likewise.
        * elf32-m32r.c: Likewise.
        * elf32-sh.c: Likewise.
1997-05-16 16:34:52 +00:00
Ian Lance Taylor fd6c00bac2 * elflink.h (elf_link_add_object_symbols): Don't decrease the
alignment of a common symbol.  If two symbols that look like
 	common symbols are found in two shared libraries, and the size is
 	different, use the larger size, and warn if --warn-common.  If a
	common symbol overrides a definition in a shared library, set the
	size to the larger size, and warn if --warn-common.
1997-05-16 16:13:33 +00:00
Ian Lance Taylor 77bd8dfa1f * elflink.h (elf_link_add_object_symbols): Consistently treat
uninitialized symbols in shared objects as common symbols.
1997-05-15 21:38:26 +00:00
Nick Clifton 4c4badea81 Added support to LD to select the architecture of an ARM COFF output file
based on the architecture of the first input file.
1997-05-15 21:32:35 +00:00
Ian Lance Taylor 031dfce06f * elflink.h (elf_link_add_object_symbols): Force ELF symbol size
to common symbol size.
1997-05-15 20:40:54 +00:00
Nick Clifton 46686c7839 Added support for storing ARM Procedure Calling Standard variant, and ARM
architecture variant in the BFD and COFF structures.  This goes towards
fixing PRs 11709 and 11326 and will integrate with future updates to LD and
GCC.
1997-05-14 17:00:43 +00:00
Ian Lance Taylor 64aaba23e0 * config.bfd (i[3456]86-*-gnu*): Don't include Mach support. 1997-05-09 21:44:46 +00:00
Ian Lance Taylor 3baa24adb1 * config.bfd: Change #if 0 around uses of host_aout_vec to #if
HAVE_host_aout_vec.
1997-05-09 21:40:42 +00:00
Michael Meissner aba5cc8b9d Do not abort if coff has no debug information for bfd_find_nearest_line 1997-05-06 13:51:01 +00:00
Ian Lance Taylor 6a2922d501 * config.bfd: cope with '*-*-linux-gnuaout' targets. 1997-05-05 22:20:46 +00:00
Ian Lance Taylor 9f4b686cb5 * targmatch.sed: Add explicit \n characters to work around bug in
HP/UX 10.20 sed program.
1997-05-01 15:32:09 +00:00
Ian Lance Taylor 412dfaedc8 * elf.c (copy_private_bfd_data): Cast csecs to avoid sign
extension problems.
1997-04-30 16:28:53 +00:00
Ian Lance Taylor 3c8caeb720 revert Alpha/OpenBSD patches 1997-04-30 16:12:04 +00:00
Ian Lance Taylor f4236094a0 Mon Apr 21 11:21:31 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf32-m68k.c: Follow the last changes in elf32-i386.c:
	(struct elf_m68k_pcrel_relocs_copied, struct
	elf_m68k_link_hash_entry, struct elf_m68k_link_hash_table,
	elf_m68k_link_hash_traverse, elf_m68k_hash_table,
	elf_m68k_link_hash_newfunc, elf_m68k_link_hash_table_create,
	elf_m68k_discard_copies, bfd_elf32_bfd_link_hash_table_create):
	New definitions.
	(elf_m68k_check_relocs): If linking with -Bsymbolic, don't copy
	PC relative relocs for a global symbol defined in a regular
	object, and count the number of PC relative relocs copied for any
	global symbol.
	(elf_m68k_size_dynamic_sections): If linking with -Bsymbolic,
	traverse with elf_m68k_discard_copies.
1997-04-21 15:22:42 +00:00
Ian Lance Taylor 9d71be7231 * elf32-i386.c (elf_i386_check_relocs): Only count PC relative
relocs.  From Jamie Lokier <jamie@rebellion.co.uk>.
1997-04-20 02:57:25 +00:00
Ian Lance Taylor 752eaefc85 * coffcode.h (coff_compute_section_file_positions): Force the
potential last byte in the file to be written out when
	COFF_IMAGE_WITH_PE.
1997-04-20 02:50:49 +00:00
Ian Lance Taylor 896d548cb1 * coff-alpha.c (bsd_alpha_howto_table): Cloned from alpha_howto_table
but with an added LITERALSLEAZY entry.
	(alpha_adjust_reloc_in): Add handling of LITERALSLEAZY relocs.  Use
	info on the howto_table gotten from the ecoff_backend data.
	(alpha_ecoff_get_relocated_section_contents): Ditto.
	(alpha_bfd_reloc_type_lookup): Ditto.
	(alpha_relocate_section): Ditto.  Also remove an assertion
	causing failures on *BSD/alpha systems.
	(alpha_ecoff_backend_data): Addition of fields to handle different
	howto tables as well as a has_literalseazy flag.
	(bsd_alpha_ecoff_backend_data): New backend data structure for *BSD.
	(bsd_ecoffalpha_little_vec): Define.
	* coff-mips.c (MIPS_HOWTO_COUNT): Removed, it's unused.
	(mips_adjust_reloc_in): Use new ecoff_backend data to get at the howto
	table.
	(mips_bfd_reloc_type_lookup): Ditto.
	(mips_relocate_section): Ditto.
	(mips_ecoff_backend_data): Addition of fields to handle different
	howto tables as well as a has_literalseazy flag.
	* config.bfd: (alpha-*-openbsd*): New target.
	* configure.in (alpha*-*-openbsd*): New target.
	(bsd_ecoffalpha_little_vec): New vector for *BSD/Alpha ECOFF.
	* ecoff.c (_bfd_ecoff_set_arch_mach_hook): Handle new magic.
	(ecoff_get_magic): Ditto.
	* libecoff.h (ecoff_backend_data): Addition of fields to handle
	different howto tables as well as a has_literalseazy flag.
	* reloc.c: BFD_RELOC_ALPHA_LITERALSLEAZY): New reloc.
	* targets.c (bsd_ecoffalpha_little_vec): Declare.
	(bfd_target_vector): Include the bsd_ecoffalpha_little_vec target.
	* configure, bfd-in2.h, libbfd.h: Rebuild.
1997-04-18 15:50:19 +00:00
Ian Lance Taylor a041278519 x 1997-04-17 18:06:32 +00:00
Ian Lance Taylor e066f244d5 Thu Apr 17 13:46:56 1997 Per Fogelstrom <pefo@openbsd.org>
* configure.host (mips*-*-openbsd*): New target.
1997-04-17 17:51:22 +00:00
Ian Lance Taylor f02004e95a * elflink.h (elf_link_add_object_symbols): Only subtract the
section VMA from the symbol value if this is a fully linked file.
1997-04-17 16:29:43 +00:00
Ian Lance Taylor 6e2183b1a7 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Define.
(struct elf_i386_link_hash_entry): Define.
	(struct elf_i386_link_hash_table): Define.
	(elf_i386_link_hash_traverse): Define.
	(elf_i386_hash_table): Define.
	(elf_i386_link_hash_newfunc): New static function.
	(elf_i386_link_hash_table_create): New static function.
	(elf_i386_check_relocs): If linking with -Bsymbolic, don't copy
	PC relative relocs for a global symbol defined in a regular
	object, and count the number of PC relative relocs copied for any
	global symbol.
	(elf_i386_size_dynamic_sections): If linking with -Bsymbolic,
	traverse with elf_i386_discard_copies.
	(elf_i386_discard_copies): New static function.
	(bfd_elf32_bfd_link_hash_table_create): Define.
1997-04-17 16:13:36 +00:00
Ian Lance Taylor 81f01dd538 From Gordon W. Ross <gwr@mc.com>:
* aoutf1.h (MY_entry_is_text_address): Define if not defined.
	(sunos4_aout_backend): Use MY_entry_is_text_address.
1997-04-17 15:12:09 +00:00
Ian Lance Taylor a895901a15 From Gordon W. Ross <gwr@mc.com>:
* netbsd.h (N_SHARED_LIB): Define.
	(SEGMENT_SIZE): Don't define.
	* m68knetbsd.c (SEGMENT_SIZE): Don't define (revert change of
	April 11).
	* sparcnetbsd.c (TARGET_PAGE_SIZE): Define as 0x2000.
	(SEGMENT_SIZE): Don't define.
1997-04-16 22:02:56 +00:00
Martin Hunt ebec2a6a21 Wed Apr 16 12:43:32 1997 Martin Hunt <hunt@cygnus.com>
* elf32-d30v.c (elf_d30v_howto_table): Changed size of
	R_D30V_32_NORMAL to 2 (4 bytes).
1997-04-16 19:50:24 +00:00
Ian Lance Taylor 10888f106a * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set .rela.bss size
to sizeof Rela structure, not sizeof Rel structure.  From Gary
	Thomas <g.thomas@opengroup.org>.
1997-04-16 18:03:42 +00:00
Ian Lance Taylor 55aba3335b * aout-target.h (MY(callback)): If entry_is_text_address, adjust
whenever entry is larger than text address, but only by whole
	pages.  From Gordon W. Ross <gwr@mc.com>.
1997-04-15 19:47:45 +00:00
Ian Lance Taylor 9b31e6f533 * Makefile.in (install): Depend upon installdirs. Use
mkinstalldirs to build $(oldincludedir).
	(installdirs): New target.
1997-04-15 16:38:24 +00:00
Ian Lance Taylor a0c807260c * elflink.h (elf_link_add_object_symbols): Don't call check_relocs
if this is a debugging section which we are stripping.
1997-04-15 15:54:24 +00:00
Ian Lance Taylor e5d7e3df0d From Thomas Graichen <graichen@rzpd.de>:
* Makefile.in: Always use $(SHELL) when running move-if-change.
	* configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
	* configure: Rebuild.
1997-04-14 15:47:24 +00:00
Ian Lance Taylor 3bc3351e05 * elfcode.h (elf_slurp_symbol_table): Only subtract the section
VMA if this is an executable file or a shared object.
1997-04-11 22:14:21 +00:00
Ian Lance Taylor faa0b8db32 * targets.c (netbsd_core_vec): Declare. From Gordon W. Ross
<gwr@mc.com>.

	* libaout.h (struct aout_backend_data): Add entry_is_text_address
	field.
	* aout-target.h (SEGMENT_SIZE): Define to TARGET_PAGE_SIZE at the
	start of the file.  Remove uses later on which switch using
	ifdef.
	(MY(callback)): Handle entry_is_text_address.
	(MY_entry_is_text_address): Define if not defined.
	(MY(backend_data)): Initialize new field.
	* aoutf1.h (sunos4_aout_backend): Likewise.
	* i386aout.c (MY(backend_data)): Likewise.
	* i386mach3.c (MY(backend_data)): Likewise.
	* mipsbsd.c (MY(backend_data)): Likewise.
	* sparclynx.c (sparclynx_aout_backend): Likewise.
	* netbsd.h (SEGMENT_SIZE): Define if not defined.
	(MY_entry_is_text_address): Define.
	* m68knetbsd.c (SEGMENT_SIZE): Define as 0x20000
1997-04-11 20:27:40 +00:00
Ian Lance Taylor 4b8c8bb988 * xcofflink.c (bfd_xcoff_import_symbol): Handle importing a symbol
whose name starts with `.'.
PR 12061.
1997-04-11 19:44:15 +00:00
Ian Lance Taylor 3b1b0308a4 * config.bfd: (i[3456]86-*-openbsd*, m68*-*-openbsd*,
mips*el*-*-openbsd*, mips*-*-openbsd*, ns32k-*-openbsd*,
	powerpc-*-*bsd*, sparc-*-openbsd*): New targets.
	* configure.in (i[3456]86-*-openbsd*, mips*-*-openbsd*,
	m68*-*-openbsd*, ns32k-*-openbsd*, powerpc-*-*bsd*,
	sparc-*-openbsd*): New targets.
	* configure: Rebuild.
1997-04-11 15:59:02 +00:00
Ian Lance Taylor 57a3027b38 Tue Apr 8 18:09:29 1997 Jamie Lokier <jamie@rebellion.co.uk>
* stabs.c (struct stab_section_info): New field
	`cumulative_skips'.
	(_bfd_link_section_stabs): Fill the above array.
	(_bfd_stab_section_offset): Use `cumulative_skips' to
	speed up offset calculation.
1997-04-08 22:10:27 +00:00
Jeff Law 6944401473 * elf32-mn10300.c (mn10300_elf_relax_section): Don't forget the
addend for non pc-relative relocations.
Bug exposed by testing relaxing linker.
1997-04-08 13:52:51 +00:00
Jeff Law a01362cc63 * elf-m10300.c (bfd_elf32_mn10300_reloc): Remove prototype
for non-existent function.
Just something I noticed.

        * elf-m10300.c (mn10300_elf_relax_section): New function.
        (mn10300_elf_relax_delete_bytes): Likewise.
        (mn10300_elf_symbol_address_p): Likewise.
        (mn10300_elf_get_relocated_section_contents): Likewise.
        (bfd_elf32_bfd_relax_section): Define.
        (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
Basic relaxing linker.
1997-04-08 06:08:29 +00:00
Ian Lance Taylor 418d5b058a * configure.host: Set SHLIB_LIBS.
* configure.in: Substitute SHLIB_LIBS.
	* configure: Rebuild.
	* Makefile.in (SHLIB_LIBS): New variable.
	($(SHLIB)): Use $(SHLIB_LIBS).
1997-04-07 21:00:31 +00:00
Ian Lance Taylor 61e51cd730 * Makefile.in (distclean): Don't remove *.info files. 1997-04-07 19:24:32 +00:00
Michael Snyder d9654a710e Mon Apr 7 10:53:52 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
* bfd-in.h bfd-in2.h: add bfd_section_lma macro to correspond
        with bfd_section_vma.
1997-04-07 17:56:18 +00:00
Ian Lance Taylor b872076e96 * configure.in: Update file names for bfd_elf32_mn10[23]00_vec.
Correct CPU file names for mn10[23]00.
	* configure: Rebuild.
1997-04-05 00:52:15 +00:00
Ian Lance Taylor ac66474758 * bfd.c (bfd_record_phdr): Cast count to size_t before
subtraction.
1997-04-04 20:59:36 +00:00
Ian Lance Taylor 44fe6ab1e5 * coff-ppc.c (dump_toc): Add cast to avoid warning from SunOS cc.
* coff-rs6000.c (xcoff_read_ar_hdr): Likewise.
	(xcoff_write_archive_contents): LIkewise.
	* elf32-mips.c (_bfd_mips_elf_set_section_contents): Likewise.
	(mips_elf_create_procedure_table): Likewise.
	* peicode.h (pe_print_idata): Likewise.
	(pe_print_edata, pe_print_pdata, pe_print_reloc): Likewise.
	* xcofflink.c (xcoff_get_section_contents): Likewise.
	(_bfd_xcoff_canonicalize_dynamic_symtab): Likewise.
	(xcoff_link_add_symbols): Likewise.
	(xcoff_link_add_symbols): Likewise.
1997-04-04 19:35:32 +00:00
Ian Lance Taylor 0cea98f0c1 * ppcboot.c (ppcboot_set_arch_mach): Make static.
(ppcboot_bfd_print_private_bfd_data): Likewise.
1997-04-04 19:08:42 +00:00
Ian Lance Taylor 5641f23e6c * elf32-mips.c (elf_mips_ctor64_howto): Set complain_on_overflow
to complain_overflow_signed.
1997-04-04 16:38:02 +00:00
Ian Lance Taylor 58b4a8f344 * VERSION: Set to 2.8.1.
* Branched binutils 2.8.
1997-04-03 18:16:38 +00:00
Ian Lance Taylor d0c45fcb75 tweak last patch 1997-04-03 16:27:28 +00:00
Ian Lance Taylor ba254dc504 Revert last patch, and:
* elflink.h (elf_link_add_object_symbols): Let a common symbol
	override an uninitialized symbol from a shared library with a
	smaller size.
1997-04-02 22:47:29 +00:00
Ian Lance Taylor f74e2365dd * elflink.h (elf_link_add_object_symbols): When there is a size
change, use the larger size.  From H.J. Lu <hjl@gnu.ai.mit.edu>.
1997-04-02 22:17:35 +00:00
Michael Meissner acba322ed2 Undo part of 3/26 change and always create got section 1997-04-02 21:22:19 +00:00
Ian Lance Taylor 7a68d1f726 * elf-m10200.c: Rename from elf32-mn10200.c.
* elf-m10300.c: Rename from elf32-mn10300.c.
	* cpu-m10200.c: Rename from cpu-mn10200.c
	* cpu-m10300.c: Rename from cpu-mn10300.c
	* Makefile.in: Update accordingly.
1997-04-02 21:09:29 +00:00
Ian Lance Taylor 3072dce9e5 * elf32-mips.c (elf_mips_ctor64_howto): New static variable.
(elf_mips_isa): Move to earlier in file.
	(mips_reloc_map): Remove BFD_RELOC_CTOR entry.
	(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR
	specially.
1997-04-02 16:57:43 +00:00
Ian Lance Taylor ab66cc8d3d * elf32-mips.c (mips16_jump_reloc): Print a warning rather than
calling abort.
PR 11972.
1997-04-02 15:49:47 +00:00
Ian Lance Taylor 0f8545578e Tue Apr 1 16:18:05 1997 Klaus Kaempf <kkaempf@progis.de>
* configure.com: New file.
	* config.h-vms: Remove file.
	* makefile.vms: Update for new configure scheme.
1997-04-01 21:19:48 +00:00
Ian Lance Taylor 8faaff9e41 Mon Mar 31 23:28:39 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* coffcode.h (coff_mkobject_hook): Declare if not a macro.
1997-04-01 04:30:38 +00:00
Ian Lance Taylor 3418d8c43d x 1997-03-31 21:35:19 +00:00
Ian Lance Taylor 5cfc99877f Mon Mar 31 16:29:50 1997 Joel Sherrill <joel@oarcorp.com>
* bfd/config.bfd (hppa*-*-rtems*): New target, like hppa-*-*elf*.
1997-03-31 21:30:49 +00:00
Ian Lance Taylor 34c6830141 * coff-a29k.c (coff_a29k_relocate_section): Don't use symndx as a
symbol index for a R_IHCONST reloc.
1997-03-31 21:12:54 +00:00
Ian Lance Taylor 774dc17cdc Mon Mar 31 15:40:59 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* targmatch.sed: Do not use \(\) recursively.
1997-03-31 20:41:59 +00:00
Ian Lance Taylor 5f792743f1 From David S. Miller <davem@caip.rutgers.edu> and H.J. Lu
<hjl@gnu.ai.mit.edu>:
	* sparclinux.c: New file.
	* config.bfd (sparc-*-linuxaout*, sparc-*-linux*): New targets.
	* configure.in (sparclinux_vec): Add to list of vectors.
	* configure: Rebuild.
	* targets.c (sparclinux_vec): Declare.
	(bfd_target_vector): Add sparclinux_vec.
	* Makefile.in: Rebuild dependencies.
	(BFD32_BACKENDS): Add sparclinux.o.
	(BFD32_BACKENDS_CFILES): Add sparclinux.c.
1997-03-28 20:24:08 +00:00
Ian Lance Taylor 9e55b695b2 Fri Mar 28 14:44:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* m68klinux.c (MACHTYPE_OK): Define.
	* i386linux.c (MACHTYPE_OK): Define.
1997-03-28 19:47:20 +00:00
Ian Lance Taylor bebe5fbfd8 * coff-mips.c (mips_ecoff_backend_data): Initialize new
bfd_coff_backend_data field.
	* coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1997-03-28 19:01:48 +00:00
Ian Lance Taylor f0315e65fa * config.bfd: Add bfd_elf64_{big,little}mips_vec to targ_selvecs
for mips*el*-*-linux* and mips*-*-linux*.  From H.J. Lu
	<hjl@lucon.org> and Ralf Baechle <ralf@gnu.ai.mit.edu>.
1997-03-28 17:39:23 +00:00
Ian Lance Taylor f3f3b47503 * bfd.c: Include "libiberty.h".
(strerror): Don't declare.
	(bfd_errmsg): Call xstrerror rather than strerror.
1997-03-28 16:56:57 +00:00
Ian Lance Taylor eb80d52a27 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Generate a COPY
reloc even if the symbol is in the .bss section.
	* elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
	* elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1997-03-27 18:45:20 +00:00
Ian Lance Taylor f89adeb774 * coffcode.h (bfd_coff_backend_data): Add new field
_bfd_coff_default_section_alignment_power.
	(bfd_coff_default_section_alignment_power): Define.
	(bfd_coff_std_swap_table): Initialize new field.
	* libcoff.h: Rebuild.
	* cofflink.c (coff_link_add_symbols): Limit alignment of a common
	symbol to the default section alignment.
1997-03-27 18:01:55 +00:00
Ian Lance Taylor 013b249fef * COPYING: Update FSF address. 1997-03-27 17:56:03 +00:00
Martin Hunt 0e9c437767 Thu Mar 27 00:45:57 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
* elf32-d30v.c (elf_d30v_howto_table): Fix a typo in the
	21-bit absolute that made it act as a relative.
1997-03-27 08:48:14 +00:00
Ian Lance Taylor 537327bc62 * elf32-ppc.c (ppc_elf_check_relocs): Only create the got section
if it is needed.
1997-03-26 19:51:12 +00:00
Stu Grossman 60d1227a31 * aoutx.h (some_aout_object_p): Change executable test to fix
problems with embedded a.out systems.
1997-03-26 06:53:10 +00:00
Ian Lance Taylor 6717fb0de0 * stabs.c (_bfd_stab_section_offset): New function.
* libbfd-in.h (_bfd_stab_section_offset): Declare.
	* libbfd.h: Rebuild.
	* elf32-i386.c (elf_i386_relocate_section): Adjust the offset of a
	stab reloc.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mips.c (mips_elf_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1997-03-25 20:49:31 +00:00
Ian Lance Taylor 3cd5cf3d40 * stabs.c (_bfd_link_section_stabs): Copy over the first header
symbol.  Check for memory allocation failure of *psinfo.
	(_bfd_write_section_stabs): Add psinfo parameter.  Change all
	callers.  Set the value of the header symbol.
	* libbfd-in.h (_bfd_write_section_stabs): Update declaration.
	* libbfd.h: Rebuild.
1997-03-25 19:46:12 +00:00
Fred Fish 67e87a1d4f * coff-tic80.c (tic80_howto_table): Add R_ABS entry.
(rtype2howto): Handle R_ABS reloc type.  Also abort on unhandled
	reloc types, rather than silently failing to generate an output file.
1997-03-25 03:07:35 +00:00
Ian Lance Taylor e1ea3dd50b * targmatch.sed: Use the hold space to put the #ifdef around the
the string constant.
	* targets.c (UNSUPPORTED_TARGET): Don't define.
	(find_target): Don't check for UNSUPPORTED_TARGET.
	(bfd_set_default_target): Don't try to optimize by checking for
	default.
1997-03-24 21:22:00 +00:00
Ian Lance Taylor 032dc9edcb * Makefile.in: Rebuild dependencies.
(ALL_MACHINES_CFILES): Add cpu-m32r.c.
	(BFD32_BACKENDS_CFILES): Add elf32-m32r.c.
	(elf32-m32r.o): Remove explicit target.
1997-03-24 20:07:49 +00:00
Ian Lance Taylor 19d025765c * config.bfd: Don't set targ_underscore for i[3456]86-*-gnu* or
i[3456]86-*-linux*.
1997-03-24 19:52:42 +00:00
Ian Lance Taylor e91487242e * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Don't
count section symbols for sections that were created by the
	linker, or are not allocatable or not loadable.
	(elf32_sparc_finish_dynamic_sections): Output output section
	symbols for section for which we made space for them.
1997-03-24 18:42:09 +00:00
David Edelsohn 37bdd624bd Remove m32r sanitization. 1997-03-21 20:59:30 +00:00
David Edelsohn ff22a9dbf8 * elf32-m32r.c (m32r_elf_howto_table): Use special function for LO16.
(m32r_hi16_list): New static local.
	(m32r_elf_hi16_reloc): Don't perform reloc, just queue it up.
	(m32r_elf_do_hi16_reloc): Delete.
	(m32r_elf_relocate_hi16): New function.
	(m32r_elf_lo16_reloc): New function.
	(m32r_elf_relocate_section): For HI16 relocs, scan for corresponding
	LO16 reloc.

	* elf32-m32r.c (m32r_elf_create_linker_section): Delete.
	(m32r_elf_add_symbol_hook): Rewrite _SDA_BASE_ support.
	(m32r_elf_final_sda_base): New function.
	(m32r_elf_relocate_section): Rewrite sdata support.
	(m32r_elf_finish_dynamic_sections): Delete.
Bring over from m32r-970131 branch.
1997-03-21 20:51:17 +00:00
Ian Lance Taylor 0727fe1023 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): If there is
no .rela.plt section, don't output a DT_PLTGOT dynamic entry.
Handles the case of a shared library with no function calls.
1997-03-21 18:09:12 +00:00
Ian Lance Taylor ac388f2a39 Based on patches from Philippe De Muyter <phdm@info.ucl.ac.be>.
* coff-svm68k.c: New file.  Just defines some macros and includes
	coff-m68k.c.
	* coff-m68k.c: Add functions to handle common addends, moved in
	from cf-m68klynx.c.  Control them using COFF_COMMON_ADDEND macro.
	Control whether relocs are visible using STATIC_RELOCS.
	* cf-m68klynx.c: Simplify greatly: just define macros to control
	coff-m68k.c.
	* coff-aux.c: Likewise.  Just leave add_one_symbol routine.
	* targets. (m68ksysvcoff_vec): Declare.
	(bfd_target_vector): Add m68ksysvcoff_vec.
	* config.bfd (m68*-motorola-sysv*): New target.
	* configure.in (m68ksysvcoff_vec): New vector.
	* configure: Rebuild.
	* Makefile.in: Rebuild dependencies.
 	(BFD32_BACKENDS): Add coff-svm68k.o.
	(BFD32_BACKENDS_CFILES): Add coff-svm68k.c.
1997-03-20 21:23:10 +00:00
Ian Lance Taylor b9576d75bc * binary.c (binary_set_section_contents): Don't get misled if the
first section is not loadable.  From Matthew L. Martin
 	<mlm@xedia.com>.
1997-03-20 18:33:44 +00:00
Ian Lance Taylor 34bc6ffca6 * elflink.h (elf_bfd_final_link): Set the value of a section
symbol to the section address unless doing a relocateable link.
1997-03-20 17:40:06 +00:00
Ian Lance Taylor 7197adc414 * Makefile.in: Rebuild dependencies. 1997-03-19 04:02:00 +00:00
Ian Lance Taylor 303e725723 Tue Mar 18 22:40:09 1997 H.J. Lu <hjl@lucon.org>
* Many files: Add function prototypes.
	* cpu-m68k.c (bfd_default_scan_num_mach): Don't declare.
	* ecofflink.c: Include "libcoff.h" and "libecoff.h".
	* elf32-ppc.c (ppc_elf_fake_sections): Make static.
	* opncls.c (bfd_openstreamr): Change stream parameter to PTR.
	* peicode.h: Change several void * parameters to PTR.
	* srec.c (srec_get_symbol_info): Make static.
	* syms.c (bfd_symbol_is_absolute): Remove.
1997-03-19 03:58:45 +00:00
Ian Lance Taylor e76386d24b start-sanitize-m32r
* elf32-m32r.c (m32r_elf_is_local_label_name): Remove.
	(bfd_elf32_bfd_is_local_label): Don't define.

end-sanitize-m32r
1997-03-19 03:01:27 +00:00
Ian Lance Taylor 939b216956 * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather
than malloc.
1997-03-18 17:58:48 +00:00
Ian Lance Taylor 724a4c0d46 fix tipo in comment 1997-03-18 16:39:38 +00:00
Ian Lance Taylor 508539ab8b * bfd-in.h: Don't include obstack.h.
(struct bfd_hash_table): Change memory field to PTR.
	* bfd.c (struct _bfd): Change memory field to PTR.
	* bfd-in2.h: Rebuild.
	* libbfd-in.h (bfd_release): Declare as function, don't define as
	macro.
	* libbfd.h: Rebuild.
	* opncls.c: Include "objalloc.h" rather than "obstack.h".  Use
	objalloc routines rather than obstack routines.
	(obstack_chunk_alloc, obstack_chunk_free): Don't define.
	(getpagesize): Don't define.
	(_bfd_new_bfd): Don't set _bfd_chunksize.
	(bfd_openr): Free new bfd and objalloc on failure.
	(bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
	(bfd_alloc_size): Remove.
	(bfd_release): New function.
	* hash.c: Include "objalloc.h" rather than "obstack.h".  Use
	objalloc routines rather than obstack routines.
	(obstack_chunk_alloc, obstack_chunk_free): Don't define.
	* ecofflink.c: Include "objalloc.h" rather than "obstack.h".  Use
	objalloc routines rather than obstack routines.
	(obstack_chunk_alloc, obstack_chunk_free): Don't define.
	(struct accumulate): Change memory to struct objalloc *.
	* liboasys.h (oasys_data_type): Remove oasys_obstack field.
	* dep-in.sed: Don't remove obstack.h from dependency list.
	* Makefile.in: Rebuild dependencies.
	(BFD_H_DEPS): Remove obstack.h.
	(install): Don't install obstack.h.
	* Many files: Don't include "obstack.h".
	* VERSION: Bump.
1997-03-18 00:47:04 +00:00
Ian Lance Taylor 0103b44764 * srec.c (srec_scan): Rewrite to not use obstack_1grow. 1997-03-17 20:14:55 +00:00
Ian Lance Taylor 062a1b96e0 * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.
* libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare.
	* libbfd.h: Rebuild.
	* ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow.
	* sunos.c (sunos_add_dynamic_symbols): Likewise.
1997-03-17 17:51:20 +00:00
Ian Lance Taylor 50ede03d76 * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t. Remove
old version of bfd_alloc.
	* libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
	* libbfd.h: Rebuild.
	* Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
1997-03-17 16:36:08 +00:00
Ian Lance Taylor 5e67a3c601 * elf32-mips.c (mips_elf_is_local_label_name): Accept the generic
ELF local label syntax as well.
1997-03-15 20:27:16 +00:00
Fred Fish 7305cacd49 * config.bfd (powerpc-*-beos*): New target.
* configure.in (powerpc-*-beos*): Add case that explicitly
	does not set COREFILE for now.  A future BeOS version is
	expected to support core files.
	* configure: Regenerate with autoconf.
1997-03-15 17:27:45 +00:00
Ian Lance Taylor 4813bbed2b * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
seen with a local symbol, rather than crashing.
1997-03-15 02:16:30 +00:00
Ian Lance Taylor f56d634e29 * elfcode.h (elf_slurp_symbol_table): Don't try to read the
version symbols if there aren't any.
1997-03-14 21:46:39 +00:00
Fred Fish 4507d85857 * coff-tic80.c (coff_rtype_to_howto): Define
(coff_tic80_rtype_to_howto): Clone generic coff version and
	add code to handle the funky TI "internal relocations".
1997-03-13 23:40:30 +00:00
Ian Lance Taylor 37897db02c * elflink.h (elf_link_add_object_symbols): Don't warn about type
or size changes because of a weak symbol.
PR 11827.
1997-03-13 19:24:20 +00:00
Ian Lance Taylor 94ba939aae * cisco-core.c (SIGEMT): Define if not defined. 1997-03-13 19:11:06 +00:00
Ian Lance Taylor e549b1d2a3 * elflink.h (elf_link_add_object_symbols): Use extsymoff when
setting ever.  Sanity check the version number.  Sort out copying
	flags and other information when adding an indirect symbol.
	(NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic
	symbols added by the backend.  Clear the entire contents of the
	versym section.
	(elf_export_symbol): Ignore indirect symbols.
	(elf_link_output_extsym): Accept a section without an owner in an
	assert.
	* elfcode.h (elf_slurp_symbol_table): Add a sanity check on the
	version count.  Correct the allocation of x_versymp.
1997-03-13 02:41:44 +00:00
Ian Lance Taylor 7d996a75d2 * elf32-mips.c (mips_elf_add_symbol_hook): Don't set the owner of
the magic sections used for SHN_MIPS_TEXT and SHN_MIPS_DATA.
	Don't return bfd_und_section_ptr when info->shared.
	(mips_elf_final_link): Set the alignment of .rtproc to 4, not 12.
	(mips_elf_create_dynamic_sections): Correct type: ^= for &=.
	(mips_elf_check_relocs): Resolve an indirect symbol in
	sym_hashes.
	(mips_elf_finish_dynamic_symbol): Don't change SHN_ABS into
	SHN_MIPS_TEXT or SHN_MIPS_DATA.
1997-03-13 02:41:08 +00:00
Ian Lance Taylor 52c92c7f75 From Eric Youngdale <eric@andante.jic.com>:
* elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define.
	* elf.c (bfd_elf_print_symbol): Correct errors in last change.
	* elflink.h (elf_link_add_object_symbols): Handle cases in which a
	versioned symbol appears in both a regular and a shared object.
	(elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when
	appropriate.  Improve error message.
	(struct elf_outext_info): Rename from elf_finfo_failed.  Change
	all uses.  Add localsyms field.
	(elf_bfd_final_link): When generating a shared library, call
	elf_link_output_extsym to output all local symbols.
	(elf_link_output_extsym): Handle symbols which were forced to
	become local.
1997-03-11 06:46:46 +00:00
Ian Lance Taylor d6bfcdb505 From Eric Youngdale <eric@andante.jic.com>:
* elf-bfd.h (elf_symbol_type): Add version field.
	* elfcode.h (elf_slurp_symbol_table): Set version field.
	* elflink.h (elf_link_add_object_symbols): When creating an
 	indirect symbol for a default version symbol, set DEF_DYNAMIC if
 	appropriate.  Set up an indirection from the nondefault version of
	the symbol as well.
	(NAME(bfd_elf,size_dynamic_sections)): Call
	elf_link_assign_sym_version before checking whether there are any
	versions.  Always record the version name as a dynamic symbol.
	Initialize counters.
	(elf_link_assign_sym_version): After finding a version, see if a
	symbol should be forced to local scope.  Create a new version
	definition if appropriate.
	(elf_link_output_extsym): Correct indirect symbol handling.
	* elf.c (bfd_elf_print_symbol): Print version information.
	(bfd_section_from_shdr): Turn version sections into BFD sections.
	(elf_fake_sections): Only copy cverdefs and cverrefs into sh_info
	if sh_info is not already set.
	(_bfd_elf_copy_private_section_data): Copy sh_info for version
	sections.
	* elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell
	_bfd_stringtab_add to copy the name into permanent memory if
	appropriate.
1997-03-10 04:43:42 +00:00
Ian Lance Taylor ccd0e5e29d * coffcode.h (bfd_coff_backend_data): Change
_bfd_coff_compute_section_file_positions to return a boolean
	value.  Change all callers.
	(coff_compute_section_file_positions): Change return type to
	boolean.  If the size of the last section changed, then output a
	zero byte at the end of the file.
	* libcoff.h: Rebuild.
PR 11806.
1997-03-07 17:45:43 +00:00
Ian Lance Taylor 7debe20cf7 Fri Mar 7 11:55:31 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* elf64-alpha.c (alpha_elf_dynamic_symbol_p): Fully parenthesize.
1997-03-07 16:57:21 +00:00
Ian Lance Taylor e8c4696e1b * xcofflink.c (_bfd_xcoff_bfd_final_link): Always allocate space
for at least 6 output symbols.
	(xcoff_write_global_symbol): When emitting TOC entry relocs, also
	emit a TC csect to represent the space they take up.  For an XO
	symbol, just emit a reference, not a csect.
PR 11793.
1997-03-07 16:50:22 +00:00
Jeff Law a98a3061a6 Update copyrights. 1997-03-07 16:11:48 +00:00