Commit graph

3812 commits

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