diff --git a/bfd/ChangeLog b/bfd/ChangeLog index df39493838..f2f946d792 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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. diff --git a/bfd/aout-adobe.c b/bfd/aout-adobe.c index 42188595cd..9709423827 100644 --- a/bfd/aout-adobe.c +++ b/bfd/aout-adobe.c @@ -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 }; diff --git a/bfd/bout.c b/bfd/bout.c index eb94cef333..fcb5265ee7 100644 --- a/bfd/bout.c +++ b/bfd/bout.c @@ -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 }; diff --git a/bfd/coff-a29k.c b/bfd/coff-a29k.c index 21b48502c7..500057c577 100644 --- a/bfd/coff-a29k.c +++ b/bfd/coff-a29k.c @@ -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 }; diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c index 7aa2aa1541..b3c2b81232 100644 --- a/bfd/coff-mips.c +++ b/bfd/coff-mips.c @@ -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 }; diff --git a/bfd/coff-sparc.c b/bfd/coff-sparc.c index ebd5babdfe..568f66bbe8 100644 --- a/bfd/coff-sparc.c +++ b/bfd/coff-sparc.c @@ -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, }; diff --git a/bfd/elf32-target.h b/bfd/elf32-target.h index ca4db2179b..f5a1fae12c 100644 --- a/bfd/elf32-target.h +++ b/bfd/elf32-target.h @@ -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, diff --git a/bfd/elf64-target.h b/bfd/elf64-target.h index a7b1b272c4..e32f11465e 100644 --- a/bfd/elf64-target.h +++ b/bfd/elf64-target.h @@ -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, diff --git a/bfd/i386os9k.c b/bfd/i386os9k.c index 2d5cd15005..5db5a52c90 100644 --- a/bfd/i386os9k.c +++ b/bfd/i386os9k.c @@ -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, }; diff --git a/bfd/ieee.c b/bfd/ieee.c index 889fbcc896..424322fc68 100644 --- a/bfd/ieee.c +++ b/bfd/ieee.c @@ -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 }; diff --git a/bfd/nlm-target.h b/bfd/nlm-target.h index 7b4b8932a6..099d09506e 100644 --- a/bfd/nlm-target.h +++ b/bfd/nlm-target.h @@ -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 diff --git a/bfd/som.c b/bfd/som.c index 7bca3c6fc2..fb4427656f 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -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 }; diff --git a/bfd/srec.c b/bfd/srec.c index 2eadc04610..fb38c43149 100644 --- a/bfd/srec.c +++ b/bfd/srec.c @@ -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 }; diff --git a/bfd/tekhex.c b/bfd/tekhex.c index 507fb54576..4d8e19db89 100644 --- a/bfd/tekhex.c +++ b/bfd/tekhex.c @@ -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 . @@ -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 };