Commit Graph

690 Commits

Author SHA1 Message Date
Alan Modra
1badb539a7 Correct comments. Don't check non-code output sections for stub
grouping.  (In the process, partly revert and fix bugs introduced
with the last change.  Oops.)
2000-09-21 13:40:00 +00:00
Alan Modra
a017a7241d Fix a segfault caused by under-allocating an array. 2000-09-21 10:13:18 +00:00
Alan Modra
b3ea35849f Handle out of memory situations. 2000-09-20 04:20:26 +00:00
Nick Clifton
6091b433d7 Change the PLT entry 0 instruction sequence to actually work. 2000-09-19 23:21:36 +00:00
Alexandre Oliva
8a3975e63b * elf32-sh.c (sh_elf_relocate_section): Use
_bfd_final_link_relocate to apply the relocation against a section
symbol, when doing relocatable links.
2000-09-18 16:19:15 +00:00
Alan Modra
25f7275229 Group stub sections. 2000-09-18 12:22:43 +00:00
Alexandre Oliva
4bb5e078a2 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
ld/emulparams/shelf.sh.
2000-09-16 23:09:35 +00:00
Nick Clifton
0752970ef8 add support for embedded relocs in m68k ELF port 2000-09-15 18:52:52 +00:00
Nick Clifton
ffcb7aff0f ld performs LITUSE relocations incorrectly if -relax is specified on the ld
command line and the displacement field of the load or store instruction is
non-zero.
2000-09-15 18:07:28 +00:00
Alan Modra
d5c73c2f38 Find the first .init and .fini sections correctly.
Clobber millicode syms via a hash traversal here.  elf_adjust_dynamic_symbol
really ought to let us look at all dynamic symbols, but it doesn't.
2000-09-15 10:24:50 +00:00
Alan Modra
74d1c347e9 Lots of bug fixes. .plt entries for DT_INIT, DT_FINI, and any
local function that has a plabel.  Size the stub reloc sections
as we size the stubs.
2000-09-14 12:55:45 +00:00
Alexandre Oliva
06bb75c14b * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
the original entries with EMPTY_HOWTOs, and added new ones to fill
in the gap.
(sh_elf_info_to_howto): Make sure the new gap isn't used.
(sh_elf_relocate_section): Likewise.
2000-09-14 04:59:14 +00:00
Nick Clifton
156c2f8bf7 Add support for the MIPS32 2000-09-14 01:47:38 +00:00
Jeff Law
8681fbcd21 * som.c (som_write_symbol_strings): Do not used fixed buffers,
use size_t as a counter.
        (som_write_space_strings): Similarly.
2000-09-14 01:33:46 +00:00
Jason Eckhardt
c1e8b7101f 2000-09-12 Jason Eckhardt <jle@cygnus.com>
* elf32-i860.c (elf32_i860_relocate_pc26): New function
	and prototype.
	(elf32_i860_relocate_section): Invoke new function from here.
2000-09-12 14:34:59 +00:00
Nick Clifton
dbf481172f Make debug_sec_names static. 2000-09-11 17:01:47 +00:00
Nick Clifton
ff0829fd43 Emit 8 NULs for target section name instead of dumping core when the target
symbol is undefined.
2000-09-10 19:17:08 +00:00
Kazu Hirata
27985c55a4 2000-09-09 Kazu Hirata <kazu@hxi.com>
* riscix.c: Remove DEFUN.
2000-09-09 20:17:47 +00:00
Nick Clifton
fe077fa645 Do not initialise flags in output bfd if the input bfd is the default
architecture with the default flags.
2000-09-09 00:40:08 +00:00
Kazu Hirata
d70910e85d 2000-09-08 Kazu Hirata <kazu@hxi.com>
* archive.c: Fix formatting.
	* coff-arm.c: Likewise.
	* doc/chew.c: Likewise.
2000-09-08 23:46:41 +00:00
Alan Modra
77cb06e9d4 (bfd_get_unique_section_name): Put a dot before the numeric suffix. 2000-09-08 02:11:34 +00:00
Kazu Hirata
256d98afc9 2000-09-07 Kazu Hirata <kazu@hxi.com>
* doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
2000-09-07 20:22:50 +00:00
Kazu Hirata
c044fabd5e 2000-09-07 Kazu Hirata <kazu@hxi.com>
* elf.c: Fix formatting.
2000-09-07 20:20:05 +00:00
Alexandre Oliva
b129bfef3a * config.bfd (sh-*-linux*): Added.
* configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
* targets.c: Declare them.
* elf32-sh-lin.c: New file.
* Makefile.am: Compile it.
* elf32-sh.c: Don't override defines from elf32-sh-lin.c.
* configure, Makefile.in: Rebuilt.
2000-09-07 04:23:43 +00:00
Geoffrey Keating
492055e633 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
pseduo-section when determining where the TOC ends.

	* coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
	output x_tvndx as it is only two bytes wide.

	* coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
        reloc is 26 or 32 bits wide.

	* coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
        for relocs that don't change anything.  Also look at the full
        6 bits of bitsize.
2000-09-06 21:21:51 +00:00
Phil Blundell
566ad7d7ea 2000-09-06 Philip Blundell <philb@gnu.org>
* config.bfd (arm*-*-uclinux*): New target.
2000-09-06 20:43:43 +00:00
Alexandre Oliva
90f2472aa1 * configure: Rebuilt with new libtool.m4. 2000-09-06 13:42:23 +00:00
Alan Modra
a966dba9da `template' isn't a very good name for a variable.
Who invented c++ anyway?
2000-09-06 00:22:01 +00:00
Nick Clifton
5b343f5ae8 Regenerate files using fixed aclocal install. 2000-09-06 00:13:34 +00:00
Nick Clifton
ea7607fcf3 Fix buggy macros 2000-09-05 21:32:34 +00:00
Geoffrey Keating
188ac6625b 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
* cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
2000-09-05 19:35:51 +00:00
Alan Modra
30667bf3fc Shared lib support. 2000-09-05 05:03:43 +00:00
Alan Modra
1bd916895e (SEC_HAS_GOT_REF): Define new flag for asection.
(bfd_get_unique_section_name): New function.
2000-09-05 02:42:16 +00:00
Alan Modra
832d951ba4 A tiny addition for PCREL12F relocs, and a fix for functions that have
been forced local.
2000-09-05 02:30:24 +00:00
Alan Modra
49bd834cc5 Support for vtable relocs. 2000-09-05 02:23:23 +00:00
Nick Clifton
aa76cae82e Fix formatting and spelling mistakes 2000-09-03 19:14:36 +00:00
Phil Blundell
05924f3654 2000-09-03 Philip Blundell <philb@gnu.org>
* elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
	references to undefined symbols in debugging sections.
2000-09-03 16:32:02 +00:00
H.J. Lu
3d96075c0c 2000-09-02 H.J. Lu <hjl@gnu.org>
* reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
	BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
	BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
	section.
2000-09-03 02:57:52 +00:00
Jason Eckhardt
de24da47db 2000-09-02 Jason Eckhardt <jle@cygnus.com>
* elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
        (elf32_i860_is_local_label_name): New function and prototype.
2000-09-03 01:39:08 +00:00
Nick Clifton
18e03609ef Increase minor version number (to 2.10.91) to help tools detect the new
ability to support removal of duplciate DWARF@ debug information.
2000-09-02 21:35:47 +00:00
Nick Clifton
7a6cc5fb0c Add .gnu.linkobce.wi. to the list of debug section names.
Update generated files
2000-09-02 20:33:48 +00:00
Nick Clifton
a092b08432 Find all sections containing debug information and include them in the stash. 2000-09-02 20:21:40 +00:00
Alexandre Oliva
37c644f2f5 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
(sh_reloc_map): Add new relocs.
(sh_elf_check_relocs, sh_elf_link_hash_newfunc,
sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
functions.
(ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
(elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
elf_sh_plt_entry_be, elf_sh_plt_entry_le,
elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
New array constants.
(elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
New variables.
(elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
elf_sh_plt_reloc_offset): Define.
(elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
elf_sh_link_hash_table): New structs.
(sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
(sh_elf_relocate_section, sh_elf_check_relocs): Handle new
relocation types.
(elf_backend_create_dynamic_sections,
bfd_elf32_bfd_link_hash_table_create,
elf_backend_adjust_dynamic_symbol,
elf_backend_size_dynamic_sections,
elf_backend_finish_dynamic_symbol,
elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
elf_backend_plt_readonly, elf_backend_want_plt_sym,
elf_backend_got_header_size, elf_backend_plt_header_size):
Define.
* reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
New relocs.
* bfd-in2.h, libbfd.h: Rebuilt.
2000-09-02 02:33:26 +00:00
Alan Modra
791987aff2 (elf_i386_finish_dynamic_symbol): Remove unnecessary check added 2000-08-27. 2000-09-01 11:17:07 +00:00
Joern Rennecke
a39b79b997 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
not initialized, set them to indicate the SH1 instruction set.
2000-08-31 22:15:42 +00:00
Alexandre Oliva
ac48eca1ad * acinclude.m4: Include libtool and gettext macros from the
top level.
* aclocal.m4, configure: Rebuilt.
2000-08-31 09:46:11 +00:00
Michael Snyder
7ee3806531 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
* elf.c: Eliminate references to __sparcv9 macro; replace with
        autoconf variables HAVE_PSINFO32_T etc.
        * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
        HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
        * config.in: Ditto.
        * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
        detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
        * aclocal.m4: Ditto.
        * configure: Regenerate.
2000-08-30 18:12:21 +00:00
Alan Modra
f69da49f95 Reclaim reloc space for symbols that have been forced local. 2000-08-27 08:10:16 +00:00
Nick Clifton
724982f606 Allow common symbols to have an alignment of 1 if explicitly requested, and
not overridden by other definitions.
2000-08-24 17:41:40 +00:00
Nick Clifton
371e71b8de Fix bugs detecting w65 architecture. 2000-08-22 20:11:36 +00:00