Commit graph

3912 commits

Author SHA1 Message Date
Jeff Law
8e40ea4bbe * som.c (som_finish_writing): Perform some sanity checks when
writing an executable or shared library.
17075
1998-10-05 20:57:25 +00:00
Gavin Romig-Koch
ecd41d25b9 * dwarf1.c : New file. Adds _bfd_dwarf1_find_nearest_line.
* configure.in (elf): Add dwarf1.lo.
	* elf_bfd.h (elf_ob_tdata): Add dwarf1_find_line_info.
	* elf.c (_bfd_elf_find_nearest_line): Add call to
	_bfd_dwarf1_find_nearest_line.
	* elf32-mips.c (_bfd_mips_elf_find_nearest_line):
	Add call to _bfd_dwarf1_find_nearest_line.
	* configure: Rebuilt.
1998-10-05 16:07:44 +00:00
Catherine Moore
6342b0623a elflink.h (elf_gc_sections): Do not allow garbage
collection if dynamic sections have been created.

: ----------------------------------------------------------------------
1998-10-05 15:21:26 +00:00
Catherine Moore
2bbf16bf81 * elf32-v850.c: Add HOWTO entries for R_V850_GNU_VTINHERIT and
R_V850_GNU_VTENTRY.
        (v850_elf_check_relocs):  Handle VTINHERIT and VTENTRY relocs.
        (v850_elf_perform_relocation):  Likewise.
        (v850_elf_final_link_relocate):  Likewise.
        (v850_elf_relocate_section):  Likewise.
        (v850_elf_gc_sweep_hook):  New routine.
        (v850_elf_gc_mark_hook):  New routine.
        (elf_backend_can_gc_sections):  Define.
1998-10-05 14:18:10 +00:00
Catherine Moore
1b9dc864ba * elf32-m68k.c (elf_m68k_gc_sweep_hook): Don't assume
that dynobj exists.
1998-10-05 14:08:53 +00:00
Ian Lance Taylor
cba6760b24 Sun Oct 4 23:29:34 1998 David Edelsohn <edelsohn@mhpcc.edu>
* rs6000-core.c (rs6000coff_core_file_matches_executable_p):
	Declare size as bfd_size_type.
	(rs6000coff_get_section_contents): Declare count as bfd_size_type.
1998-10-05 03:37:54 +00:00
Ian Lance Taylor
1bec01fc8b * elflink.h (elf_link_add_object_symbols): When a versioned symbol
has a base which is already defined, only add the referenced
	symbol to the dynamic symbol table if it is defined or referenced
	by a regular file.
1998-10-05 03:11:55 +00:00
Jeff Law
6886ab292b * cpu-hppa.c (bfd_hppa20_arch): Define. Link it into the bfd_hppa_arch
structure.
        * som.c (CPU_PA_RISC2_0): Define.
        (_PA_RISC2_0_ID): Likewise.
        (som_finish_writing): Use CPU_PA_RISC2_0 for the system_id as needed.
PA2.0 infrastructure.
1998-10-05 02:42:05 +00:00
Ian Lance Taylor
0f529d8c15 * elf32-i386.c (elf_i386_info_to_howto_rel): Handle vtable relocs
correctly.
1998-10-05 01:19:36 +00:00
Richard Henderson
300a10323a 1998-09-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elflink.h (elf_link_add_object_symbols): Undo last change.
1998-09-29 03:53:21 +00:00
Richard Henderson
c4a00a8302 * elflink.h (elf_link_add_object_symbols): Don't record a dynamic
symbol for the indirect alias to a versioned symbol.
1998-09-23 23:09:54 +00:00
Catherine Moore
74db0d03a7 * elf32-i386.c (elf32_i386_vtinherit_howto): New.
(elf32_i386_vtentry_howto): New.
        (elf_i386_reloc_type_lookup):  Return elf32_i386_vtentry_howto
        or elf32_i386_vtinherit_howto  on lookup.
1998-09-21 17:29:28 +00:00
Ian Lance Taylor
776c436d8b Sun Sep 20 00:48:07 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf32-m68k.c: Include "elf/m68k.h".  Remove definition of enum
	reloc_type.  Rename R_68K__max to R_68K_max.
	(howto_table): Use _bfd_elf_rel_vtable_reloc_fn for a VTENTRY
	reloc.
1998-09-20 04:57:41 +00:00
Ian Lance Taylor
8b77a7d9d2 Sun Sep 20 00:09:25 1998 Chris Torek <torek@bsdi.com>
* libbfd.c (bfd_getb32): Rewrite expression to get better code.
	(bfd_getl32, bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
1998-09-20 04:17:27 +00:00
Ian Lance Taylor
0983267416 * libbfd.c (bfd_log2): Cast to bfd_vma before shifting, not
after.  From Chris Torek <torek@bsdi.com>.
1998-09-20 03:53:05 +00:00
Ian Lance Taylor
d7298d8f7e Sat Sep 19 22:42:23 1998 Doug Rabson <dfr@nlsystems.com>
* elflink.h (elf_link_add_object_symbols): Ensure that the warning
	message has a null byte terminator.
1998-09-20 02:45:04 +00:00
Nick Clifton
618e96a058 Fic PR17107 - ignore contents of word subject to R_V850_32 relocation. 1998-09-18 21:37:41 +00:00
Nick Clifton
bc2c7e533b Always treat section symbols as special, even if they are attached to a
common section.
1998-09-18 16:23:48 +00:00
Nick Clifton
f5ec493e57 Add comment about problem computing nearets line numbers for undefined
symbols at link time.
1998-09-18 00:22:23 +00:00
Richard Henderson
93893904de * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
transform a defweak into a plt entry.
        (elf64_alpha_calc_dynrel_sizes): Allow room for secondary
        plt entry references to receive a RELATIVE reloc.
        (elf64_alpha_finish_dynamic_symbol): Fill them in.
        (elf64_alpha_relocate_section): Assert we don't overrun
        the allocated relocation space.
1998-09-17 23:17:10 +00:00
Catherine Moore
9c68226165 get rid of print statement in elf32_arm_gc_mark_hook. 1998-09-16 16:31:18 +00:00
Vladimir Makarov
5df02296c9 1998-09-15 Geoff Keating <geoffk@ozemail.com.au>
* elf32-ppc.c (ppc_elf_relocate_section): Reverse output_offset
	part of Vladimir's change of 1998-08-19.  Make a R_PPC_SDAREL16
	reloc to the wrong section a warning, not an error.  .dynsbss
	is not an output section, so there is no need to check for it.
1998-09-15 21:36:41 +00:00
Catherine Moore
a2dd26e9e9 Fix changeLOg entry. Add argument to elf_backend_get_symbol_type. 1998-09-15 17:42:09 +00:00
Catherine Moore
948beb4a24 * bfd-in.h: Add argument to elf_backend_get_symbol_type.
* bfd-in2.h: Rebuild.
       * elf.c (swap_out_syms):  Pass type to elf_backend_get_symbol_type.
       * elf32-arm.c:  Add HOWTO entries for R_ARM_GNU_VTINHERIT and
       R_ARM_GNU_VTENTRY.
       (elf32_arm_gc_mark_hook): New.
       (elf32_arm_gc_sweep_hook): New.
       (elf32_arm_check_relocs): New.
       (elf32_arm_final_link_relocate):  Handle VTINHERIT and VTENTRY
       relocations.
       (elf32_arm_relocate_section): Handle VTINHERIT and VTENTRY
       relocations.
1998-09-15 13:52:55 +00:00
Richard Henderson
7194b91a0f 1998-09-10 Geoff Keating <geoffk@ozemail.com.au>
* elf32-ppc.c (ppc_elf_relocate_section): If dynobj is NULL,
        assume there is no PLT or GOT.
1998-09-11 20:15:54 +00:00
Nick Clifton
a61c93863e fix linker testsuite failure 1998-09-09 21:25:37 +00:00
Peter Schauer
ebe909d29e * rs6000-core.c (_LONG_LONG): Define for AIX 4.x only. 1998-09-07 20:26:43 +00:00
Ian Lance Taylor
c84d3d6970 * libbfd-in.h (_bfd_nolink_bfd_gc_sections): Correct definition to
match definition of _bfd_gc_sections field.
	* libbfd.h: Rebuild.
1998-09-06 00:41:41 +00:00
Richard Henderson
35ac82f2a3 Fri Sep 4 13:54:23 1998 David Miller <davem@dm.cobaltmicro.com>
* elf32-sparc.c (elf32_sparc_relocate_section): Properly adjust
        the addend of a dynamic relocation referencing a section.
        * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
        (sparc64_elf_finish_dynamic_symbol): Fix the PLT relocation offset.
1998-09-04 20:57:07 +00:00
Richard Henderson
37b68f729c * elflink.h (bfd_elfNN_size_dynamic_sections): Verify that the
bed has a size_dynamic_sections routine before trying to use it.
1998-09-04 00:30:35 +00:00
Michael Snyder
a6ac3b6bb5 Thu Aug 20 11:30:17 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* elf.c: comment and formatting cleanups.
        * elfcore.h: ditto.
1998-09-02 19:28:55 +00:00
Richard Henderson
c2242569d0 * elf32-mips.c (elf_mips_gnu_vtentry_howto): Use
_bfd_elf_rel_vtable_reloc_fn.
1998-08-31 21:50:12 +00:00
Catherine Moore
bb3b4377a4 * Makefile.am: Add elf32-arm.c.
* Makefile.in:  Rebuild.
        * elf-bfd.h:  Add elf_backend_get_symbol_type.
        * elf.c (swap_out_syms):  If defined, call
        elf_backend_get_symbol_type.
        * elf32-arm.c: Define elf_backend_get_symbol_type.
        (elf32_arm_get_symbol-type):  New routine.
        (record_thumb_to_arm_glue):  Change to use STT_ARM_TFUNC.
        (bfd_elf32_arm_process_before_allocation):  Change to
        check for STT_ARM_TFUNC.
        (elf32_arm_final_link_relocate):  Likewise.
        * elfxx-target.h:  Add elf_backend_get_symbol_type.
1998-08-31 15:50:04 +00:00
Richard Henderson
68631a8643 * archures.c (bfd_mach_alpha_ev[456]): New.
* cpu-alpha.c: Rework to match these types.
1998-08-29 02:46:21 +00:00
Richard Henderson
09e5322ac0 * elf-bfd.h (_bfd_elf_rel_vtable_reloc_fn): Declare.
* elf.c (_bfd_elf_rel_vtable_reloc_fn): New.

        * elf32-i386.c (elf_howto_table): Add vtable relocs.
        (elf_i386_reloc_type_lookup): Recognize them.
        (elf_i386_check_relocs): Pass them off to generic code.
        (elf_i386_relocate_section): Ignore them.
        (elf_i386_gc_mark_hook, elf_i386_gc_sweep_hook): New.
        (elf_backend_can_gc_sections): True.
1998-08-29 02:43:47 +00:00
Catherine Moore
9d811c2141 add elf32-arm.c to things to keep 1998-08-27 20:35:58 +00:00
Catherine Moore
4d2466d15a remove armelf sanitization. 1998-08-26 17:55:50 +00:00
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