* All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector.

This commit is contained in:
Ian Lance Taylor 1994-04-07 01:58:27 +00:00
parent fa77c7041c
commit dfc1c00613
14 changed files with 100 additions and 11 deletions

View File

@ -1,5 +1,75 @@
Wed Apr 6 17:24:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
Add new target vectors to read the dynamic symbols and dynamic
relocs. Change a.out to use these rather than reading the dynamic
symbols and relocs along with the normal symbols and relocs.
* targets.c (bfd_target): Add fields
_bfd_get_dynamic_symtab_upper_bound,
_bfd_canonicalize_dynamic_symtab,
_bfd_get_dynamic_reloc_upper_bound,
_bfd_canonicalize_dynamic_reloc.
(BFD_JUMP_TABLE_DYNAMIC): Define.
* libbfd-in.h (_bfd_nodynamic_get_dynamic_symtab_upper_bound):
Define.
(_bfd_nodynamic_canonicalize_dynamic_symtab): Define.
(_bfd_nodynamic_get_dynamic_reloc_upper_bound): Define.
(_bfd_nodynamic_canonicalize_dynamic_reloc): Define.
* bfd.c (bfd_get_dynamic_symtab_upper_bound): Define.
(bfd_canonicalize_dynamic_symtab): Define.
(bfd_get_dynamic_reloc_upper_bound): Define.
(bfd_canonicalize_dynamic_reloc): Define.
* sunos.c (MY_read_dynamic_symbols): Don't define.
(MY_read_dynamic_relocs): Don't define.
(MY_get_dynamic_symtab_upper_bound): Define.
(MY_canonicalize_dynamic_symtab): Define.
(MY_get_dynamic_reloc_upper_bound): Define.
(MY_canonicalize_dynamic_reloc): Define.
(struct sunos_dynamic_info): Change type of dynsym_count and
dynrel_count to long. Add fields canonical_dynsym and
canonical_dynrel.
(sunos_read_dynamic_info): Check that BFD had DYNAMIC flag set.
Clear info->canonical_dynsym and info->canonical_dynrel.
(MY(read_dynamic_symbols)): Removed.
(MY(read_dynamic_relocs)): Removed.
(sunos_get_dynamic_symtab_upper_bound): New function.
(sunos_canonicalize_dynamic_symtab): New function.
(sunos_get_dynamic_reloc_upper_bound): New function.
(sunos_canonicalize_dynamic_reloc): New function.
* libaout.h: Declare struct reloc_ext_external and
reloc_std_external to avoid prototype problems.
(struct aout_backend_data): Remove fields read_dynamic_symbols and
read_dynamic_relocs.
(NAME(aout,translate_symbol_table)): Declare.
(NAME(aout,swap_ext_reloc_in)): Declare.
(NAME(aout,swap_std_reloc_in)): Declare.
* aoutx.h (NAME(aout,translate_symbol_table)): Renamed from
translate_symbol_table and made non-static. Changed all callers.
(NAME(aout,slurp_symbol_table)): Don't read dynamic symbols.
(NAME(aout,slurp_reloc_table)): Don't read dynamic relocs.
(NAME(aout,get_reloc_upper_bound)): Don't count dynamic relocs.
* aoutf1.h (aout_32_sunos4_write_object_contents): Don't bother to
remove dynamic symbols and relocs. They will no longer be
present.
(MY_read_dynamic_symbols): Don't define.
(MY_read_dynamic_relocs): Don't define.
(sunos4_aout_backend): Don't initialize dynamic entry points.
* aout-target.h (MY_read_dynamic_symbols): Don't define.
(MY_read_dynamic_relocs): Don't define.
(MY(backend_data)): Don't initialize dynamic entry points.
(MY_get_dynamic_symtab_upper_bound): If not defined, define to
_bfd_nodynamic version.
(MY_canonicalize_dynamic_symtab): Likewise.
(MY_get_dynamic_reloc_upper_bound): Likewise.
(MY_canonicalize_dynamic_reloc): Likewise.
* All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
* cf-m68klynx.c: Include sysdep.h.
* hp300hpux.c: Removed some spaces in uses of NAME to avoid
problems with traditional C compilers.
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.

View File

@ -1,5 +1,5 @@
/* BFD back-end for a.out.adobe binaries.
Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Written by Cygnus Support. Based on bout.c.
This file is part of BFD, the Binary File Descriptor library.
@ -523,6 +523,7 @@ bfd_target a_out_adobe_vec =
BFD_JUMP_TABLE_RELOCS (aout_32),
BFD_JUMP_TABLE_WRITE (aout_32),
BFD_JUMP_TABLE_LINK (aout_32),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
(PTR) 0
};

View File

@ -1,5 +1,5 @@
/* BFD back-end for Intel 960 b.out binaries.
Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -1399,6 +1399,7 @@ bfd_target b_out_vec_big_host =
BFD_JUMP_TABLE_RELOCS (b_out),
BFD_JUMP_TABLE_WRITE (b_out),
BFD_JUMP_TABLE_LINK (b_out),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
(PTR) 0,
};
@ -1440,6 +1441,7 @@ bfd_target b_out_vec_little_host =
BFD_JUMP_TABLE_RELOCS (b_out),
BFD_JUMP_TABLE_WRITE (b_out),
BFD_JUMP_TABLE_LINK (b_out),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
(PTR) 0
};

View File

@ -1,5 +1,5 @@
/* BFD back-end for AMD 29000 COFF binaries.
Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Contributed by David Wood at New York University 7/8/91.
This file is part of BFD, the Binary File Descriptor library.
@ -343,6 +343,7 @@ bfd_target a29kcoff_big_vec =
BFD_JUMP_TABLE_RELOCS (coff),
BFD_JUMP_TABLE_WRITE (coff),
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
COFF_SWAP_TABLE
};

View File

@ -1,5 +1,5 @@
/* BFD back-end for MIPS Extended-Coff files.
Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@ -1815,6 +1815,7 @@ bfd_target ecoff_little_vec =
BFD_JUMP_TABLE_RELOCS (ecoff),
BFD_JUMP_TABLE_WRITE (ecoff),
BFD_JUMP_TABLE_LINK (ecoff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
(PTR) &mips_ecoff_backend_data
};
@ -1856,6 +1857,7 @@ bfd_target ecoff_big_vec =
BFD_JUMP_TABLE_RELOCS (ecoff),
BFD_JUMP_TABLE_WRITE (ecoff),
BFD_JUMP_TABLE_LINK (ecoff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
(PTR) &mips_ecoff_backend_data
};

View File

@ -1,5 +1,5 @@
/* BFD back-end for Sparc COFF files.
Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -255,6 +255,7 @@ bfd_target
BFD_JUMP_TABLE_RELOCS (coff),
BFD_JUMP_TABLE_WRITE (coff),
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
COFF_SWAP_TABLE,
};

View File

@ -1,5 +1,5 @@
/* Target definitions for 32-bit ELF
Copyright 1993 Free Software Foundation, Inc.
Copyright 1993, 1994 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -204,6 +204,7 @@ bfd_target TARGET_BIG_SYM =
BFD_JUMP_TABLE_RELOCS (bfd_elf32),
BFD_JUMP_TABLE_WRITE (bfd_elf32),
BFD_JUMP_TABLE_LINK (bfd_elf32),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
/* backend_data: */
(PTR) &elf32_bed,
@ -291,6 +292,7 @@ bfd_target TARGET_LITTLE_SYM =
BFD_JUMP_TABLE_RELOCS (bfd_elf32),
BFD_JUMP_TABLE_WRITE (bfd_elf32),
BFD_JUMP_TABLE_LINK (bfd_elf32),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
/* backend_data: */
(PTR) &elf32_bed,

View File

@ -1,5 +1,5 @@
/* Target definitions for 64-bit ELF
Copyright 1993 Free Software Foundation, Inc.
Copyright 1993, 1994 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -206,6 +206,7 @@ bfd_target TARGET_BIG_SYM =
BFD_JUMP_TABLE_RELOCS (bfd_elf64),
BFD_JUMP_TABLE_WRITE (bfd_elf64),
BFD_JUMP_TABLE_LINK (bfd_elf64),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
/* backend_data: */
(PTR) &elf64_bed,
@ -293,6 +294,7 @@ bfd_target TARGET_LITTLE_SYM =
BFD_JUMP_TABLE_RELOCS (bfd_elf64),
BFD_JUMP_TABLE_WRITE (bfd_elf64),
BFD_JUMP_TABLE_LINK (bfd_elf64),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
/* backend_data: */
(PTR) &elf64_bed,

View File

@ -1,5 +1,5 @@
/* BFD back-end for os9000 i386 binaries.
Copyright 1990, 1991, 1992, 1993 1994 Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -370,6 +370,7 @@ bfd_target i386os9k_vec =
BFD_JUMP_TABLE_RELOCS (aout_32),
BFD_JUMP_TABLE_WRITE (aout_32),
BFD_JUMP_TABLE_LINK (os9k),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
(PTR) 0,
};

View File

@ -3417,6 +3417,7 @@ bfd_target ieee_vec =
BFD_JUMP_TABLE_RELOCS (ieee),
BFD_JUMP_TABLE_WRITE (ieee),
BFD_JUMP_TABLE_LINK (ieee),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
(PTR) 0
};

View File

@ -1,5 +1,5 @@
/* Target definitions for 32/64-bit NLM (NetWare Loadable Module)
Copyright (C) 1993 Free Software Foundation, Inc.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -136,6 +136,7 @@ bfd_target TARGET_BIG_SYM =
BFD_JUMP_TABLE_RELOCS (nlm),
BFD_JUMP_TABLE_WRITE (nlm),
BFD_JUMP_TABLE_LINK (nlm),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
/* backend_data: */
(PTR) TARGET_BACKEND_DATA
@ -225,6 +226,7 @@ bfd_target TARGET_LITTLE_SYM =
BFD_JUMP_TABLE_RELOCS (nlm),
BFD_JUMP_TABLE_WRITE (nlm),
BFD_JUMP_TABLE_LINK (nlm),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
/* backend_data: */
(PTR) TARGET_BACKEND_DATA

View File

@ -1,5 +1,5 @@
/* bfd back-end for HP PA-RISC SOM objects.
Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
@ -5561,6 +5561,7 @@ bfd_target som_vec =
BFD_JUMP_TABLE_RELOCS (som),
BFD_JUMP_TABLE_WRITE (som),
BFD_JUMP_TABLE_LINK (som),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
(PTR) 0
};

View File

@ -1011,6 +1011,7 @@ bfd_target srec_vec =
BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (srec),
BFD_JUMP_TABLE_LINK (srec),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
(PTR) 0
};
@ -1066,6 +1067,7 @@ bfd_target symbolsrec_vec =
BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (srec),
BFD_JUMP_TABLE_LINK (srec),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
(PTR) 0
};

View File

@ -1,5 +1,5 @@
/* BFD backend for Extended Tektronix Hex Format objects.
Copyright (C) 1992, 1993 Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@ -1064,6 +1064,7 @@ bfd_target tekhex_vec =
BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (tekhex),
BFD_JUMP_TABLE_LINK (tekhex),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
(PTR) 0
};