* elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
[deliverable/binutils-gdb.git] / bfd / elfcode.h
index 203323cdb5e66d36ed774b136798a62bfedb0b2a..1a362eebcc5328827c640623918ef5405d159a6f 100644 (file)
@@ -1,6 +1,6 @@
 /* ELF executable support for BFD.
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001 Free Software Foundation, Inc.
+   2001, 2002 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
    in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -203,12 +203,14 @@ static char *elf_symbol_flags PARAMS ((flagword));
    format.  */
 
 void
-elf_swap_symbol_in (abfd, src, shndx, dst)
+elf_swap_symbol_in (abfd, psrc, pshn, dst)
      bfd *abfd;
-     const Elf_External_Sym *src;
-     const Elf_External_Sym_Shndx *shndx;
+     const PTR *psrc;
+     const PTR *pshn;
      Elf_Internal_Sym *dst;
 {
+  const Elf_External_Sym *src = (const Elf_External_Sym *) psrc;
+  const Elf_External_Sym_Shndx *shndx = (const Elf_External_Sym_Shndx *) pshn;
   int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
 
   dst->st_name = H_GET_32 (abfd, src->st_name);
@@ -1242,8 +1244,9 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
       /* Skip first symbol, which is a null dummy.  */
       for (i = 1; i < symcount; i++)
        {
-         elf_swap_symbol_in (abfd, x_symp + i,
-                             x_shndx + (x_shndx != NULL ? i : 0), &i_sym);
+         elf_swap_symbol_in (abfd, (const PTR *) (x_symp + i),
+                             (const PTR *) (x_shndx + (x_shndx ? i : 0)),
+                             &i_sym);
          memcpy (&sym->internal_elf_sym, &i_sym, sizeof (Elf_Internal_Sym));
 #ifdef ELF_KEEP_EXTSYM
          memcpy (&sym->native_elf_sym, x_symp + i, sizeof (Elf_External_Sym));
@@ -1695,6 +1698,7 @@ const struct elf_size_info NAME(_bfd_elf,size_info) = {
   elf_write_out_phdrs,
   elf_write_shdrs_and_ehdr,
   elf_write_relocs,
+  elf_swap_symbol_in,
   elf_swap_symbol_out,
   elf_slurp_reloc_table,
   elf_slurp_symbol_table,
This page took 0.036771 seconds and 4 git commands to generate.