Commit graph

3498 commits

Author SHA1 Message Date
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