diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-09-12 18:59:24 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-09-12 18:59:24 +0000 |
commit | 396aaeb2b690a3aeb287fc2c057d492379654944 (patch) | |
tree | 4d88887e6fac0838ec9236129d4787629da56866 /bfd/libaout.h | |
parent | 58a4f585f7bcff146614522f598bd6a2f71e5e06 (diff) | |
download | gdb-396aaeb2b690a3aeb287fc2c057d492379654944.zip gdb-396aaeb2b690a3aeb287fc2c057d492379654944.tar.gz gdb-396aaeb2b690a3aeb287fc2c057d492379654944.tar.bz2 |
* sunos.c (sunos_slurp_dynamic_symtab): New static function,
broken out of sunos_canonicalize_dynamic_symtab.
(sunos_canonicalize_dynamic_symtab): Call new function
sunos_slurp_dynamic_symtab.
(sunos_add_dynamic_symbols): Add three new parameters. Return the
dynamic symbol table to the caller.
* aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
callback to override the symbols being read.
* libaout.h (struct aout_backend_data): Add three new parameters
to add_dynamic_symbols callback.
Diffstat (limited to 'bfd/libaout.h')
-rw-r--r-- | bfd/libaout.h | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/bfd/libaout.h b/bfd/libaout.h index a40f3c0..dd98d12 100644 --- a/bfd/libaout.h +++ b/bfd/libaout.h @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef LIBAOUT_H #define LIBAOUT_H @@ -127,7 +127,9 @@ struct aout_backend_data /* Callback from the add symbols phase of the linker code to handle a dynamic object. */ - boolean (*add_dynamic_symbols) PARAMS ((bfd *, struct bfd_link_info *)); + boolean (*add_dynamic_symbols) PARAMS ((bfd *, struct bfd_link_info *, + struct external_nlist **, + bfd_size_type *, char **)); /* Callback from the add symbols phase of the linker code to handle adding a single symbol to the global linker hash table. */ @@ -145,14 +147,17 @@ struct aout_backend_data boolean (*write_dynamic_symbol) PARAMS ((bfd *, struct bfd_link_info *, struct aout_link_hash_entry *)); - /* This callback is called by the linker for each reloc against an - external symbol. RELOC is a pointer to the unswapped reloc. If - *SKIP is set to true, the reloc will be skipped. */ + /* If this callback is not NULL, the linker calls it for each reloc. + RELOC is a pointer to the unswapped reloc. If *SKIP is set to + true, the reloc will be skipped. *RELOCATION may be changed to + change the effects of the relocation. */ boolean (*check_dynamic_reloc) PARAMS ((struct bfd_link_info *info, bfd *input_bfd, asection *input_section, struct aout_link_hash_entry *h, - PTR reloc, boolean *skip)); + PTR reloc, bfd_byte *contents, + boolean *skip, + bfd_vma *relocation)); /* Called at the end of a link to finish up any dynamic linking information. */ @@ -217,12 +222,12 @@ enum machine_type { M_SPARC_NETBSD = 138, /* NetBSD/sparc binary */ M_MIPS1 = 151, /* MIPS R2000/R3000 binary */ M_MIPS2 = 152, /* MIPS R4000/R6000 binary */ - M_HP200 = 200, /* HP 200 (68010) BSD binary */ - M_HP300 = (300 % 256), /* HP 300 (68020+68881) BSD binary */ - M_HPUX = (0x20c % 256)/* HP 200/300 HPUX binary */ /* start-sanitize-rce */ M_RCE = 155, /* Motorola RCE binary */ /* end-sanitize-rce */ + M_HP200 = 200, /* HP 200 (68010) BSD binary */ + M_HP300 = (300 % 256), /* HP 300 (68020+68881) BSD binary */ + M_HPUX = (0x20c % 256)/* HP 200/300 HPUX binary */ }; #define N_DYNAMIC(exec) ((exec).a_info & 0x80000000) @@ -340,6 +345,11 @@ struct aoutdata { /* A pointer for shared library information. */ PTR dynamic_info; + + /* A mapping from local symbols to offsets into the global offset + table, used when linking on SunOS. This is indexed by the symbol + index. */ + bfd_vma *local_got_offsets; }; struct aout_data_struct { @@ -381,6 +391,9 @@ struct aout_section_data_struct #define aout_section_data(s) \ ((struct aout_section_data_struct *) (s)->used_by_bfd) +#define set_aout_section_data(s,v) \ + ((s)->used_by_bfd = (PTR)&(v)->relocs) + /* Prototype declarations for functions defined in aoutx.h */ boolean @@ -440,10 +453,14 @@ NAME(aout,get_symtab) PARAMS ((bfd *abfd, asymbol **location)); void NAME(aout,swap_ext_reloc_in) PARAMS ((bfd *, struct reloc_ext_external *, - arelent *, asymbol **)); + arelent *, asymbol **, bfd_size_type)); void NAME(aout,swap_std_reloc_in) PARAMS ((bfd *, struct reloc_std_external *, - arelent *, asymbol **)); + arelent *, asymbol **, bfd_size_type)); + +reloc_howto_type * +NAME(aout,reloc_type_lookup) PARAMS ((bfd *abfd, + bfd_reloc_code_real_type code)); boolean NAME(aout,slurp_reloc_table) PARAMS ((bfd *abfd, sec_ptr asect, @@ -475,6 +492,13 @@ NAME(aout,find_nearest_line) PARAMS ((bfd *abfd, asection *section, asymbol **symbols, bfd_vma offset, CONST char **filename_ptr, CONST char **functionname_ptr, unsigned int *line_ptr)); +long +NAME(aout,read_minisymbols) PARAMS ((bfd *, boolean, PTR *, unsigned int *)); + +asymbol * +NAME(aout,minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR, + asymbol *)); + int NAME(aout,sizeof_headers) PARAMS ((bfd *abfd, boolean exec)); |