Commit graph

3925 commits

Author SHA1 Message Date
Nick Clifton
774852e913 Fix seg fault when displaying linker error message 1998-08-20 22:08:22 +00:00
Ian Lance Taylor
54e4cfaf3a add configure to list of files to check 1998-08-20 20:55:13 +00:00
Ian Lance Taylor
c6167c136c Check whether any sanitized files are mentioned elsewhere. 1998-08-20 20:54:08 +00:00
Michael Snyder
b64beb2d10 Wed Aug 19 15:43:26 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* elfcode.h (elf_object_p): Reject files of header type ET_CORE
        (core files are treated differently than object files).
        * elf-bfd.h (_bfd_elf_write_corefile_contents,
        bfd_elf_mkcorefile): declare.
        * elfxx-target.h (_bfd_elf_write_corefile_contents,
        bfd_elf_mkcorefile): add to bfd_target vector.
        * elfcore.h (elf_core_file_p): save the program header table,
        and set the bfd architecture from the elf file header.
        * elf.c (bfd_elf_mkcorefile): new function.
        (_bfd_elf_write_corefile_contents): new function.
        (assign_file_positions_for_segments): add cases for handling
        PT_NOTE segments.  (assign_file_positions_except_relocs):
        core files should be handled the same as exec files.
        (prep_headers): identify core files as type ET_CORE.
        (copy_private_bfd_data): identify the sections belonging to
        the PT_NOTE segment.

        * elf32-sparc.c (elf32_sparc_final_write_processing):
        add break statement to default case.
1998-08-20 00:32:36 +00:00
Vladimir Makarov
b49867b644 * elf32-ppc.c (ppc_elf_relocate_section): Check that output
section (not input) will be in sections ".sbss", ".sbss2",
	".sdata", and ".sdata" for R_PPC_SDAREL16, R_PPC_EMB_SDA2REL,
	R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA.  In all these cases also ignore
	output_offset for correct evaluation of addend.
PR16246
1998-08-19 21:28:51 +00:00
Catherine Moore
2c3c46ad0c * elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking,
elf32_arm_allocate_interworking_sections and
       elf32_arm_process_before_allocation.

        * bfd-in.h: Ammend prototype for
        elf32_arm_process_before_allocation to remove surplus third
        argument.

        * bfd-in2.h: Regenerate.
1998-08-18 16:55:29 +00:00
Richard Henderson
803f5d55cd * elf64-alpha.c (elf64_alpha_relax_section): Handle indirect symbols. 1998-08-16 03:58:11 +00:00
Stan Cox
a05d3537a8 * aoutx.h (aout_link_input_section_ext): Use the relocation already
calculated for RELOC_SPARC_REV32 case.
1998-08-14 18:56:41 +00:00
Ian Lance Taylor
cb5fa481a6 Wed Aug 12 19:00:39 1998 Geoff Keating <geoffk@ozemail.com.au>
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Generate PLT
	entries unless the symbol is defined in the executable; in
	particular, undefined weak symbols get a PLT entry.
1998-08-12 23:04:13 +00:00
Ian Lance Taylor
24ec5f63f7 * libaout.h: Remove nested comment to avoid warning. 1998-08-12 18:48:57 +00:00
Ken Raeburn
3d759c53c9 sanitize-vr5400 -> sanitize-cygnus, for 98r2 1998-08-12 10:50:35 +00:00
Ken Raeburn
1a85826ebc sanitize-vr5400 -> sanitize-cygnus 1998-08-12 02:18:03 +00:00
Catherine Moore
a17e14c150 * elf32-arm.c (elf32_arm_final_link_relocate): Remove unused
argument is_local.  Add argument sym_flags.  Check sym_flags
         in R_ARM_ABS32 case.  Include addend for R_ARM_THM_PC22 case.
         (elf32_arm_relocate_section):  Don't pass local sym and pass
         sym_flags to elf32_arm_final_link_relocate.
1998-08-11 19:58:02 +00:00
Richard Henderson
176e2f2592 * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Correct last change
to not count too few relocs for dynamicly linked executables.
1998-08-11 03:40:39 +00:00
Richard Henderson
7993f96a80 * elflink.h (elf_gc_common_finalize_got_offsets): For backends
that use a .got.plt section start the got offset at zero.
1998-08-10 22:35:02 +00:00
Ian Lance Taylor
70c732096a * ieee.c (ieee_write_processor): Correct the processor ID written
out for bfd_arch_m68k, accommodating change of March 25.
1998-08-10 21:32:53 +00:00
Catherine Moore
cb43e2a9b8 * elf32-arm.c (elf32_arm_final_link_relocate): Rework
R_ARM_THM_RPC22 relocations.
1998-08-10 02:02:18 +00:00
Richard Henderson
382fab1a7a * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Undef weak symbols
are always dynamic.
        (elf64_alpha_calc_dynrel_sizes): Allow enough room for RELATIVE
        .got relocs in -Bsymbolic shared objects.
1998-08-08 22:17:16 +00:00
Catherine Moore
f754ac3529 Add armelf sanitization. 1998-08-07 01:25:52 +00:00
Nick Clifton
0e7361bcd5 Add ARM ELF private flags 1998-08-05 22:52:27 +00:00
Nick Clifton
28574bf993 fixed armelf sanitization 1998-08-04 00:36:01 +00:00
Ian Lance Taylor
82912e99bd * elf32-sparc.c (elf32_sparc_check_relocs): Permit WPLT30 against
a local symbol.
	(elf32_sparc_relocate_section): Likewise.
1998-08-04 00:11:32 +00:00
Catherine Moore
1ec183ca2f Remove elf32-arm.c from armelf_files. 1998-08-02 17:21:39 +00:00
Catherine Moore
ee1e206fb0 add armelf. 1998-08-02 17:20:50 +00:00
Richard Henderson
c95f174afc * elf32-ppc.c (ppc_elf_check_relocs): Init sgot to NULL. Create the
.got if any relocation referrs to _GLOBAL_OFFSET_TABLE_.
        (ppc_elf_relocate_section): Pull sgot and splt search to the start
        of the function.  Recognize no .plt as static linking.
1998-08-02 10:22:30 +00:00
Ulrich Drepper
5530d45d45 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Don't pass
.liblist string through gettext.
1998-08-01 16:41:51 +00:00
Catherine Moore
7cebe50aea *** empty log message *** 1998-07-31 21:40:41 +00:00
Catherine Moore
efaa65c99c * Makefile.am: Add support for elf32-arm.lo.
* Makefile.in: Rebuild.
        * config.bfd (arm-*-elf):  Define targ_defvec and targ_selvecs.
        (thumb-*-elf): Define targ_defvec and targ_selvecs.
        * configure.in:  Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec.
        * configure: Regenerate.
        * elf.c: (prep_headers):  Support arch_type of EM_ARM.
        * targets.c:  Support new targets bfd_elf32_bigarm_vec and
        bfd_target bfd_elf32_littlearm_vec.
        * elf32-arm.c:  New file.
1998-07-31 21:26:28 +00:00
Nick Clifton
5639074c60 Fix memory corruption due to generic_add_output_symbol being called after elf_map_symbols. 1998-07-24 20:56:53 +00:00
Jeff Law
8417b6242e * elf-m10300.c (mn10300_elf_relax_section): Fix typo when relaxing
from 24bit operand to an 8bit operand.
1998-07-24 18:24:31 +00:00
Jeff Law
88ac1a5e13 * elf-m10300.c (mn10300_elf_relax_section): Do not relax "dmul",
"dmulu", "dmach", "dmachu" with 32bit operands.
1998-07-24 17:49:08 +00:00
Jeff Law
06992a452a * elf-m10300.c (mn10300_elf_howto): Add R_MN10300_24 entry.
(mn10300_elf_reloc_map): Similarly.
        (mn10300_elf_final_link_relocate): Handle R_MN10300_24.
        (mn10300_elf_relax_section): Support relaxing on the am33.
1998-07-24 17:26:51 +00:00
Ian Lance Taylor
e2e8e76bd1 start-sanitize-r5900
The value of R_MIPS15_S3 has changed:
	* elf32-mips.c (elf_mips15_s3_howto): New static variable.
	(mips_reloc_map): Remove BFD_RELOC_MIPS15_S3.
	(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS15_S3
	specially.
	(mips_info_to_howto_rel): Handle R_MIPS15_S3 specially.
	(mips_elf_relocate_section): Check for R_MIPS15_S3.

end-sanitize-r5900
	* elf32-mips.c (elf_mips_howto_table): Add reloc types used on
	Irix 6.
	(bfd_elf32_bfd_reloc_type_lookup): Add default case.
	* elf64-mips.c: Replace all uses of mips_elf64_reloc_type with
	elf_mips_reloc_type defined in elf/mips.h.
1998-07-24 16:51:33 +00:00
Ulrich Drepper
30471c22e3 Remove reloc_type definition completely. It's now in elf/mips.h. 1998-07-24 16:39:19 +00:00
Ulrich Drepper
ef8349a149 Remove reloc_type definition completely. It's now in elf/mips.h. 1998-07-24 16:39:08 +00:00
Ian Lance Taylor
6767a3abb7 remove d30v sanitization 1998-07-23 23:50:13 +00:00
Ian Lance Taylor
82f21cea28 rebuild 1998-07-23 23:35:41 +00:00
Doug Evans
650a22721e * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations
as they are defined in elf/mips.h now.
1998-07-23 20:37:42 +00:00
Jeff Law
91b9fccdf0 * elf-m10300.c (compute_function_info): Keep track of stack space
needed by am33 movm instruction variant.
1998-07-23 17:41:00 +00:00
Jeff Law
d5394da7ec * Re-add lost change:
* elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
        "movm_stack_size".
        (mn10300_elf_relax_section): Include stack space for register saves
        in the imm8 field of a "call" instruction.
        (compute_function_info): Determine how much stack is allocated by
        the movm instruction.  Fix typo.
        (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
1998-07-23 17:30:54 +00:00
Ian Lance Taylor
511068f6c3 * elf32-sparc.c (elf_backend_got_header_size): Define as 4.
* elf64-sparc.c (elf_backend_got_header_size): Define as 8.
1998-07-23 15:40:18 +00:00
Ulrich Drepper
873e2f6aa6 Update. 1998-07-22 23:46:33 +00:00
Nick Clifton
6ff4269b8a Move reloc definitions into headers in include/elf 1998-07-22 23:29:51 +00:00
Ulrich Drepper
043e6949fd Update. 1998-07-22 22:02:02 +00:00
Ulrich Drepper
30483570cf Let ELF header now define the macros to get the enum. 1998-07-22 21:59:00 +00:00
Nick Clifton
c13661938a Chnage type from 'unsigned char' to 'unsigned int' to avoid K&R compatability issue. 1998-07-22 20:58:50 +00:00
Ian Lance Taylor
7ae26f2731 * ieee.c (ieee_find_nearest_line): Change filename_ptr and
functionname_ptr to be const.  Change line_ptr to be unsigned.

	* coffcode.h (coff_link_output_has_begun): Simplify handling when
	macro is not defined.  Change second parameter from bfd_link_info
	to coff_final_link_info.  Add prototype.
	(coff_final_link_postscript): Simplify handling when macro is not
	defined.  Add prototype.
1998-07-22 20:44:52 +00:00
Ulrich Drepper
91e32e23ff Before include system specific ELF header define
START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS.
1998-07-22 20:40:28 +00:00
Ulrich Drepper
767af63c2c Before include system specific ELF header define
START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS.
1998-07-22 20:11:16 +00:00
Ian Lance Taylor
39e4bca406 * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c
temporary patch over to elf64-mips.c as well.
1998-07-22 17:47:42 +00:00
Ulrich Drepper
92a7119c1f elf32-mips.c (reloc_type): Temporarily disable definition of standard
relocation since they are now defined in elf/mips.h.
1998-07-22 01:35:34 +00:00
Ulrich Drepper
5e37b2da13 (reloc_type): Temporarily disable definition of standard relocation since
they are now defined in elf/mips.h.
1998-07-22 01:34:44 +00:00
Richard Henderson
965d5a46be * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size.
* elf32-i386.c (elf_backend_got_header_size): Define.
        (elf_backend_plt_header_size): Define.
        * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
        * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
        * elfxx-target.h: Provide a default of zero.
        * elflink.c (_bfd_elf_create_got_section): Use got_header_size.
        * elflink.h (elf_gc_common_finalize_got_offsets): Likewise.

        * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
        entry from an executable, even if the plt refcount goes to 0.
1998-07-21 01:54:28 +00:00
Ian Lance Taylor
490e0e1339 Mon Jul 20 12:47:26 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* aoutx.h (NAME(aout,find_nearest_line)): Also remember the
	directory name at the line number.

	* elf.c (_bfd_elf_find_nearest_line): Also consider symbols
	with an unspecified type.
1998-07-20 16:50:34 +00:00
Ian Lance Taylor
c3da0ebf3e * sunos.c: Add undef of valid to avoid problem on SunOS. 1998-07-15 15:20:28 +00:00
Richard Henderson
c86d82ee47 Strip beos markers. 1998-07-14 23:15:20 +00:00
Ian Lance Taylor
be228e0db6 Tue Jul 14 11:22:21 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf32-m68k.c (elf_m68k_check_relocs): Also reference count
	R_68K_PCxx and R_68K_xx relocations.  Make sure that
	ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference.
	(elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and
	R_68K_xx relocations.
	(elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol
	that has no plt entry.
	(elf_m68k_relocate_section): Ignore the plt offset in a static
	link.
	* elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for
	an ignored symbol.
	(elf_gc_common_finalize_got_offsets): Set the got offsets also in
	a static link.

	* elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc
	types.
	(howto_table, reloc_map): Add entries for them.
	(elf_m68k_check_relocs): Handle them.  Implement reference
	counting for got and plt entries.
	(elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions.
	(elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt
	symbols.
	(rtype_to_howto_rel, elf_info_to_howto_rel): Delete.
	(elf_m68k_relocate_section): Handle the new reloc types.
	(bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook,
	elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define.
	* elflink.h (elf_link_add_object_symbols): When creating an
	indirect reference for symbol versioning also copy the plt
	offset.
	(elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT
	flag also reset the plt offset.
	(elf_link_assign_sym_version): Likewise.
	(elf_gc_common_finalize_got_offsets): Increment the got offset by
	the size of the entry in bytes.
	(elf_gc_allocate_got_offsets): Likewise.

Tue Jul 14 11:18:14 1998  Ian Lance Taylor  <ian@cygnus.com>

	* elflink.h (elf_gc_sections): Return true rather than falling off
	the bottom.
1998-07-14 15:45:55 +00:00
Ian Lance Taylor
bb51198f7a * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not
xmalloc.
1998-07-14 15:18:39 +00:00
Nick Clifton
8654629216 Removed leading underscore. 1998-07-13 18:09:20 +00:00
Ian Lance Taylor
6d138e6f4e * ieee.c (ieee_slurp_external_symbols): Handle call optimization
information ATN records.
1998-07-13 17:07:27 +00:00
Ian Lance Taylor
81d195ae16 * ieee.c (ieee_slurp_external_symbols): Select an appropriate
section for an absolute symbol in a fully linked file.  Based on
	patch from Christian Holland <CHolland@de.lucent.com>.
1998-07-10 20:31:44 +00:00
Ian Lance Taylor
ab1d35b40c Wed Jul 8 11:29:56 1998 Manfred Hollstein <manfred@s-direktnet.de>
* coff-m88k.c (m88k_special_reloc): Don't lose the information
	that a symbol is undefined.
1998-07-08 15:30:31 +00:00
Jeff Law
3f4444e020 * som.c (som_bfd_gc_sections): Define. 1998-07-08 03:51:25 +00:00
Ian Lance Taylor
41cae8d4ed Update for ChangeLog breakup. Remove gm sanitization; the stuff being
sanitized out was removed long ago.
1998-07-06 22:22:36 +00:00
Ian Lance Taylor
06fdc311e7 Rearrange ChangeLog files by years. 1998-07-06 22:08:05 +00:00
Nick Clifton
384fff9c9b Do not complain about overflows in ARM_26D relocations, since they have already been performed.
Patch submitted by <rjb@dcs.gla.ac.uk>
1998-07-06 18:38:19 +00:00
Ian Lance Taylor
69c3ef085f * coffcode.h (coff_write_object_contents): If we have any long
section names, call coff_write_symbols even if there are no
	symbols.
1998-07-04 16:27:08 +00:00
Ian Lance Taylor
369ee5df3e * elf.c (copy_private_bfd_data): Only set phdr_included oncde for
a PT_LOAD segment, rather than only setting it once for the entire
	file.

	* elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA,
	rather than ignoring every phdr with a p_paddr of 0, ignore all
	the phdrs if they all have a p_paddr of 0.
1998-07-03 17:45:52 +00:00
Ian Lance Taylor
81db6a9e28 * stabs.c (_bfd_write_stab_strings): Check whether the .stabstr
section was discarded from the link.
1998-07-03 17:12:22 +00:00
Joern Rennecke
a83a26f74a Brought over from sh4-980527-branch:
Fix for execute/va-arg-5.c -Os -mrelax -m4-single failure:
	* coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number.
1998-07-03 13:43:16 +00:00
Joern Rennecke
0ea9d7bc70 Brought over from sh4-980527-branch:
Fix for execute/921208-1.c -Os -mrelax -m4-single failure:
	* coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with
	floating point operations.
1998-07-03 13:40:08 +00:00
Ian Lance Taylor
bf47f02283 * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global
function symbols.
1998-07-02 22:40:45 +00:00
Ian Lance Taylor
0dc4c667ac Thu Jul 2 14:59:42 1998 Klaus Kaempf <kkaempf@rmi.de>
Merge of vax/vms (read-only) support
	* configure.com: Support Vax target.
	* makefile.vms: Support Vax target.
        * vms.h: Renamed from evax.h, merged vax/vms (read-only) support.
	* vms.c: Renamed from evax-alpha.c, merged vax/vms (read-only)
	support.
	* vms-hdr.c: Renamed from evax-emh.c, merged vax/vms (read-only)
	support.
	* vms-gsd.c: Renamed from evax-egsd.c, merged vax/vms (read-only)
	support.
	* vms-tir.c: Renamed from evax-etir.c, merged vax/vms (read-only)
	support.
	* vms-misc.c: Renamed from evax-misc.c, merged vax/vms (read-only)
	support.
	* libbfd.c (real_read): Use unbuffered read on VMS/Vax.
	* targets.c (bfd_target_ovax_flavour): New flavour.
	(vms_alpha_vec): Renamed from evax_alpha_vec.
	(vms_vax_vec): New.
	(target_vector): Update accordingly.
	* config.bfd (alpha*-*-*vms*): Use vms_alpha_vec, not
	evax_alpha_vec.
	(vax*-*-*vms*): New target.
	* Makefile.am: Update for renamed files.  Rebuild dependencies.
	* bfd-in2.h: Rebuild.
	* configure.in, Makefile.in, aclocal.m4: Rebuild.
1998-07-02 18:41:08 +00:00
Nick Clifton
9e7e5d5e5b Add support for changing LMA and VMA of sections/ 1998-07-02 00:06:49 +00:00
Richard Henderson
1ff137652b "propogate" -> "propagate" 1998-07-01 21:53:34 +00:00
Ian Lance Taylor
70f549105f * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons
when handling 32 bit immediate relocs.
	* elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
1998-07-01 21:03:27 +00:00
Doug Evans
a57fc6b9c0 * reloc.c: New relocs BFD_RELOC_MIPS_DVP_11_S4,
BFD_RELOC_MIPS_DVP_U15_S3.
	* elf32-mips.c: Handle them.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
1998-07-01 20:14:12 +00:00
Jeff Law
39f5104e63 * section.c (STD_SECTION): Account for recently added gc_mark
field in struct asection.
1998-06-30 17:09:28 +00:00
Jeff Law
7ec96df5e2 * elf-m10300.c (bfd_mn10300_elf_merge_private_bfd_data): New function.
(bfd_elf32_bfd_merge_private_bfd_data): Define.
So the machine id gets propagated into executables.
1998-06-30 16:00:12 +00:00
Richard Henderson
303b4cc64f ELF Section-level Garbage Collection. 1998-06-30 10:02:22 +00:00
Jeff Law
4db4e912e1 * archures.c (bfd_mach_mn10300): Define.
* elf-m10300.c: Include elf/mn10300.h
        (elf_mn10300_mach): New function.
        (_bfd_mn10300_elf_final_write_processing): Likewise.
        (_bfd_mn10300_elf_object_p): Likewise.
        (elf_backendfinal_write_processing): Define.
        (elf_backend_object_p): Likewise.
start-sanitize-am33
        * archures.c (bfd_mach_am33): Define.
        * cpu-m10300.c (bfd_am33_arch): New arch info structure.  Link it
        into the NEXT field of bfd_mn10300_arch.
end-sanitize-am33
1998-06-26 16:59:08 +00:00
Nick Clifton
9ea28a8595 Fix HI16_S relocation 1998-06-26 01:31:43 +00:00
Ian Lance Taylor
146f8b771c * elflink.h (elf_bfd_final_link): Loop over input_bfds using the
link_next field, not the next field.
1998-06-24 21:18:25 +00:00
Ian Lance Taylor
ae49bab676 * elf32-mips.c (mips_elf_size_dynamic_sections): Only strip a
linker created empty input section if the output section has the
	same name.
1998-06-19 21:11:47 +00:00
Ian Lance Taylor
e1079cda8d * elflink.h (elf_link_output_extsym): Print an error message if
_bfd_elf_section_from_bfd_section fails.
1998-06-19 21:10:39 +00:00
Ian Lance Taylor
22b17c7474 * elf.c (_bfd_elf_section_from_bfd_section): Call bfd_set_error on
failure.
1998-06-19 21:10:20 +00:00
Tom Tromey
365fac52c2 * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
($(PACKAGE).pot): Unconditionally depend on POTFILES.
1998-06-12 22:25:09 +00:00
Doug Evans
37fcafe682 * elf.c (swap_out_syms): New arg relocatable_p.
Don't add section VMA to symbols for relocatable output.
	(_bfd_elf_compute_section_file_positions): Update call to
	swap_out_syms.
1998-06-12 20:37:40 +00:00
Nick Clifton
5aa6fe96a0 Use signed comparisons against addend. 1998-06-08 22:22:21 +00:00
Nick Clifton
0203fbf278 Add prototypes. 1998-06-06 07:42:09 +00:00
Nick Clifton
7c3b369de0 Add prototypes. 1998-06-06 07:32:18 +00:00
Nick Clifton
40afcc4cd4 sort sections by LMA then VMA. 1998-06-06 00:28:46 +00:00
Nick Clifton
c84c3b965c Add prototypes for static functions.
Chnage type of addend from long to bfd_vma.
1998-06-06 00:23:25 +00:00
Ian Lance Taylor
118bd5952f * aoutx.h (howto_table_ext): Change RELOC_BASE13 to use
complain_overflow_signed instead of complain_overflow_bitfield.
1998-06-05 22:19:09 +00:00
Ian Lance Taylor
5e3da1b0d3 Fri Jun 5 15:11:11 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf.c (elf_map_symbols): Don't add section VMA to symbol value
	when comparing against 0.
1998-06-05 19:17:08 +00:00
Ian Lance Taylor
2edb8195a9 * Makefile.am (config.status): New target.
* Makefile.in: Rebuild.
1998-06-03 21:53:14 +00:00
Doug Evans
24a459d631 * elf32-mips.c (_bfd_mips_elf_fake_sections): Update to use
Elf32_Dvp_External_Overlay instead of 64 bit version.
1998-06-03 18:42:31 +00:00
Stan Cox
f5bb0acb5a Give error if previous object endianness doesn't match the current one. 1998-06-03 16:20:48 +00:00
Nick Clifton
cfba9ab0ac Fixed private data printing to include program headers. 1998-06-03 00:51:58 +00:00
Ian Lance Taylor
0e039bdc1b * elflink.h (elf_merge_symbol): Don't always set type_change_ok
and size_change_ok.
 	(elf_link_add_object_symbols): Set type_change_ok and
	size_change_ok before calling elf_merge_symbol.
1998-06-02 21:16:06 +00:00
Ian Lance Taylor
d212bfa723 * elf32-mips.c (mips_elf_relocate_section): If we issue an
undefined symbol error, don't also issue an overflow error.
1998-06-02 19:30:09 +00:00
Ian Lance Taylor
defc0050f4 Tue Jun 2 13:51:00 1998 Geoff Keating <geoffk@ozemail.com.au>
* elf32-ppc.c (ppc_elf_relocate_section): The target of an
	R_PPC_LOCAL24PC relocation should be local; if not, print an error
	message instead of crashing.
1998-06-02 18:15:42 +00:00
Ian Lance Taylor
9591998dbf Mon Jun 1 18:23:12 1998 Yuli Barcohen <yuli.barcohen@telrad.co.il>
* archures.c (bfd_mach_cpu32): Define.
	(bfd_default_scan): Add case for 68060.  Fix 68332 case to use
	bfd_mach_cpu32.
	* cpu-m68k.c (arch_info_struct): Add m68k:cpu32.
	* ieee.c: Include <ctype.h>.
	(ieee_object_p): Parse out process ID string to make it more
	likely to be acceptable for bfd_scan_arch.
	* bfd-in2.h: Rebuild.
1998-06-01 22:25:37 +00:00
Nick Clifton
5872728aba Fix PHDRS test in linker testsuite by also dumping program header output
when displaying private data.
1998-06-01 18:13:33 +00:00
Ian Lance Taylor
179ac41c63 * peicode.h (coff_swap_sym_in): Check for C_SECTION rather than
0x68.  Reindent.  Add some comments.
1998-06-01 16:15:08 +00:00
Doug Evans
edac2b4c88 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Set sh_link
field of .DVP.ovlytab to .DVP.ovlystrtab's section index.
	(_bfd_mips_elf_section_from_shdr): Recognize SHT_DVP_OVERLAY_TABLE
	and SHT_DVP_OVERLAY.
	(_bfd_mips_elf_fake_sections): Ditto.
1998-05-31 23:14:40 +00:00
Nick Clifton
e5fc780949 Partial fix for PR 15929 - Change physical address of segment when its
sections' LMAs have changed.
1998-05-29 17:00:08 +00:00
Stan Cox
e838aeea64 Added BFD_RELOC_SPARC_32LE and bfd_mach_sparc_sparclite_le. 1998-05-27 15:41:27 +00:00
Stan Cox
fc23c14efc sparclite 86x big endian instruction / little endian data support. 1998-05-27 01:06:20 +00:00
Nick Clifton
5422c7498b Fix operator precedence in if() statement. 1998-05-21 23:59:59 +00:00
Ian Lance Taylor
71842815b0 * reloc.c (bfd_check_overflow): Add casts before shifts which may
not fit in 32 bits.
	(_bfd_relocate_contents): Likewise.
1998-05-19 22:45:38 +00:00
Nick Clifton
be461cc321 Fix nightly testing bug. 1998-05-18 21:47:54 +00:00
Richard Henderson
b0f7df0653 * elf64-alpha.c (elf64_alpha_relax_section): Set again on changes.
(elf64_alpha_can_merge_gots, elf64_alpha_merge_gots,
        elf64_alpha_size_got_sections): Rewrite, handling multiple got
        subsections during relaxation more correctly.
1998-05-18 07:14:11 +00:00
Nick Clifton
7c511326e8 Add support for interwotking between Thumb code and non-interworking aware ARM code. 1998-05-14 21:29:28 +00:00
Ian Lance Taylor
980381afd7 If sysdep.h includes a header file, don't include it again:
* aix386-core.c: Don't include <stdio.h>, <stddef.h>, or
	<errno.h>.
	* aoutx.h: Don't include <string.h>.  Use "sysdep.h" rather than
	<sysdep.h>.
	* archive.c: Don't include <string.h> or <errno.h>.
	* evax-alpha.c; Don't include <stdio.h>.
	* evax-egsd.c: Likewise.
	* evax-etir.c: Likewise.
	* evax-misc.c: Likewise.
	* evax-emh.c: Likewise.  Also, don't include <sys/types.h>.
	* hppabsd-core.c: Don't include <stdio.h>, <sys/types.h>, or
	<errno.h>.
	* hpux-core.c: Likewise.
	* netbsd-core.c: Likewise.
	* som.c: Likewise.
	* libbfd.c: Don't include <sys/types.h>.
	* nlmcode.h: Don't include <string.h>.
	* osf-core.c: Don't include <string.h> or <stdio.h>.
	* ptrace-core.c: Don't include <stdio.h>, <sys/types.h>,
	<errno.h>, or <unistd.h>.
	* trad-core.c: Don't include <stdio.h> or <sys/types.h>.
1998-05-07 22:05:46 +00:00
Ian Lance Taylor
62ebd0a880 * filemode.c: Remove; not used. 1998-05-07 22:05:13 +00:00
Ian Lance Taylor
4c7f1d4109 Thu May 7 13:12:50 1998 Klaus Kaempf <kkaempf@progis.de>
* configure.com: If the version number can not be found in
	configure.in, set it to "unknown" rather than "2.8.1".
1998-05-07 17:13:37 +00:00
Ian Lance Taylor
e888ecaacf fix sanitization of elf32-mips.c 1998-05-07 16:13:49 +00:00
Ian Lance Taylor
c2400a02de fix gettext sanitization 1998-05-06 18:15:00 +00:00
Gavin Romig-Koch
f5916da7d0 * elf32-mips.c (elf_mips_mach): New.
(_bfd_mips_elf_object_p): Use elf_mips_mach.
	(_bfd_mips_elf_final_write_processing): Use the names
	of machines, rather than the numbers.  Set both the ARCH
	and MACH in e_flags.  Handle a few more specific machines.
	(_bfd_mips_elf_merge_private_bfd_data): Merge both
	EF_MIPS_ARCH and EF_MIPS_MACH.
	* mips.h (EF_MIPS_MACH,E_MIPS_MACH_*): Added.
1998-05-06 13:48:08 +00:00
Richard Henderson
97ec511fa4 * syms.c (bfd_is_local_label): Revert last change.
* srec.c (srec_write_symbols): Discard debugging symbols.
1998-05-06 04:06:47 +00:00
Ian Lance Taylor
3b9f57c5c0 fix copyright 1998-05-06 03:42:18 +00:00
Ian Lance Taylor
80d30ced0e * som.c: Include <ctype.h>.
* som.h: Don't include sysdep.h.
1998-05-06 03:37:41 +00:00
Tom Tromey
fc8ff72d5f * libbfd.h: Rebuilt.
* libbfd-in.h: Removed gettext includes and defines.
	* sysdep.h: Moved gettext-related includes and defines here.
1998-05-06 01:07:41 +00:00
Richard Henderson
4aa65bb8c1 * srec.c (srec_write_symbols): Use bfd_is_local_label rather than
an ad-hoc test.  Kill bogus #if 0 code.
        * syms.c (bfd_is_local_label): Consider BSF_DEBUGGING symbols local.

PR 13455
1998-05-05 23:49:26 +00:00
Tom Tromey
766dcecc99 * libbfd.h: Rebuilt.
* libbfd-in.h (_): Define as dgettext.
1998-05-04 16:52:21 +00:00
Ian Lance Taylor
d116929ee7 * coff-arm.c (coff_arm_relocate_section): Cast to bfd_signed_vma,
not signed.
	* peicode.h (pe_saved_coff_bfd_print_private_bfd_data): Use PARAMS
	when declaring parameter types.
	(pe_saved_coff_bfd_copy_private_bfd_data): Likewise.
1998-05-04 15:03:38 +00:00
Ian Lance Taylor
b18c9753ca add overview information and ELF segment information 1998-05-02 16:06:32 +00:00
Ian Lance Taylor
d8dedd7946 fix TeX problems 1998-05-01 23:11:19 +00:00
Ian Lance Taylor
5de8088770 add target vector documentation 1998-05-01 22:44:27 +00:00
Ian Lance Taylor
d1d5d252c4 add relocation code and ELF docs 1998-04-29 20:15:19 +00:00
Ian Lance Taylor
92769ae949 * config.bfd: If we include any ELF targets in targ_defvec and/or
targ_selvecs, then add the generic ELF targets to targ_selvecs.
	* elf32-gen.c (dummy): New static const variable.
	(elf_generic_info_to_howto): New static function.
	(elf_generic_info_to_howto_rel): New static function.
	(elf_info_to_howto): Define as elf_generic_info_to_howto.
	(elf_info_to_howto_rel): Define as elf_generic_info_to_howto_rel.
	* elf64-gen.c: Same changes as elf32-gen.c.
	* elfcode.h (elf_object_p): For the generic target, ignore a
	failure of bfd_default_set_arch_mach.  Fix indentation a bit.
1998-04-29 19:38:38 +00:00
Tom Tromey
5873cbec2b Fixed xgettext invocation in .Sanitize files 1998-04-29 00:11:07 +00:00
Ian Lance Taylor
351fc10beb * configure.in (WIN32LIBADD): Add -lintl on cygwin32.
* configure: Rebuild.
1998-04-29 00:06:18 +00:00
Ian Lance Taylor
accf488e25 add title, fix some minor problems 1998-04-28 21:18:23 +00:00
Ian Lance Taylor
508fa296e1 add a section on relocations 1998-04-28 19:37:19 +00:00
Jason Molenda
1142c24124 Tue Apr 28 12:16:57 1998 Jason Molenda (crash@bugshack.cygnus.com)
* config.bfd:  Update OSR5/Unixware patterns.
1998-04-28 19:18:10 +00:00
Ian Lance Taylor
5e04ff140d remove PR numbers 1998-04-28 02:31:15 +00:00
Richard Henderson
4d6f96ebe7 * elf.c (assign_file_positions_for_segments): Allow for holes
between sections added by a link script.

PR 15645
1998-04-28 01:03:42 +00:00
Ian Lance Taylor
c91a48dd42 * bfdint.texi: New file.
* Makefile.am (noinst_TEXINFOS): New variable.
	* Makefile.in: Rebuild.
1998-04-28 00:20:27 +00:00
Ian Lance Taylor
d510976d2a * configure.in: Change version number to 2.9.4
* configure: Rebuild.
1998-04-27 19:44:13 +00:00
Ian Lance Taylor
0d3887ba8f Based on patch from H.J. Lu <hjl@gnu.org>:
* elf.c (bfd_elf_get_bfd_needed_list): New function.
	* bfd-in.h (bfd_elf_get_bfd_needed_list): Declare.
	* bfd-in2.h: Rebuild.
1998-04-27 15:51:27 +00:00
Richard Henderson
dbcd157d76 * elf64-alpha.c (struct alpha_relax_info): Replace elfsym with other.
Change all users.
1998-04-26 03:09:20 +00:00
Richard Henderson
2506b5688c * elf64-alpha.c (struct alpha_relax_info): Add tsec & elfsym members.
(elf64_alpha_relax_section): Fill them in.
        (elf64_alpha_relax_opt_call): Implement more than a stub.
        (elf64_alpha_add_symbol_hook): Don't set SEC_LOAD or default
        alignment on .scommon.
        (elf64_alpha_merge_gots): Merge use counts as well.
1998-04-26 01:33:51 +00:00
Richard Henderson
986c3691f2 * elf64-alpha.c (elf64_alpha_relax_section): Use the proper section
for calculating a local symbol's address.
        (elf64_alpha_calc_got_offsets): Skip entries with 0 use count.
        Set the .got's cooked size as well as the raw size.
1998-04-25 21:10:01 +00:00
Nick Clifton
05c07e2968 Added internationalisation macros to printed infoamrion in
v850_elf_print_private_data
1998-04-24 16:18:41 +00:00
Ian Lance Taylor
016b7b4bdc * syms.c (struct indexentry): Change directory_name, file_name,
and function_name fields to char *.
	(struct stab_find_info): Change cached_file_name field to char *.
1998-04-24 16:10:07 +00:00
Nick Clifton
fd1b5eb76a Added missing internationalisation macros. 1998-04-24 16:06:26 +00:00
Nick Clifton
701552a5a1 Fixed internationalisation. 1998-04-23 15:15:27 +00:00
Tom Tromey
d6f3da9bc4 If xgettext fails, make Sanitize fail 1998-04-23 05:17:30 +00:00