aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 203323c..1a362ee 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -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,