aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 5046416..8c221f9 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -237,7 +237,7 @@ elf_link_is_defined_archive_symbol (abfd, symdef)
Elf_Internal_Sym sym;
const char * name;
- elf_swap_symbol_in (abfd, esym, shndx, &sym);
+ elf_swap_symbol_in (abfd, (const PTR *) esym, (const PTR *) shndx, &sym);
name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, sym.st_name);
if (name == (const char *) NULL)
@@ -1666,7 +1666,7 @@ elf_link_add_object_symbols (abfd, info)
override = false;
- elf_swap_symbol_in (abfd, esym, shndx, &sym);
+ elf_swap_symbol_in (abfd, (const PTR *) esym, (const PTR *) shndx, &sym);
flags = BSF_NO_FLAGS;
sec = NULL;
@@ -2556,7 +2556,8 @@ elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
|| bfd_bread ((PTR) shndx, amt, input_bfd) != amt)
return false;
}
- elf_swap_symbol_in (input_bfd, &esym, shndx, &entry->isym);
+ elf_swap_symbol_in (input_bfd, (const PTR *) &esym, (const PTR *) shndx,
+ &entry->isym);
name = (bfd_elf_string_from_elf_section
(input_bfd, elf_tdata (input_bfd)->symtab_hdr.sh_link,
@@ -6521,7 +6522,8 @@ elf_link_input_bfd (finfo, input_bfd)
const char *name;
Elf_Internal_Sym osym;
- elf_swap_symbol_in (input_bfd, esym, shndx, isym);
+ elf_swap_symbol_in (input_bfd, (const PTR *) esym, (const PTR *) shndx,
+ isym);
*pindex = -1;
if (elf_bad_symtab (input_bfd))
@@ -7660,6 +7662,7 @@ elf_gc_mark (info, sec, gc_mark_hook)
asection *rsec;
struct elf_link_hash_entry *h;
Elf_Internal_Sym s;
+ Elf_External_Sym_Shndx *locshndx;
r_symndx = ELF_R_SYM (rel->r_info);
if (r_symndx == 0)
@@ -7667,9 +7670,10 @@ elf_gc_mark (info, sec, gc_mark_hook)
if (elf_bad_symtab (sec->owner))
{
+ locshndx = locsym_shndx + (locsym_shndx ? r_symndx : 0);
elf_swap_symbol_in (input_bfd,
- locsyms + r_symndx,
- locsym_shndx + (locsym_shndx ? r_symndx : 0),
+ (const PTR *) (locsyms + r_symndx),
+ (const PTR *) locshndx,
&s);
if (ELF_ST_BIND (s.st_info) == STB_LOCAL)
rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s);
@@ -7686,9 +7690,10 @@ elf_gc_mark (info, sec, gc_mark_hook)
}
else
{
+ locshndx = locsym_shndx + (locsym_shndx ? r_symndx : 0);
elf_swap_symbol_in (input_bfd,
- locsyms + r_symndx,
- locsym_shndx + (locsym_shndx ? r_symndx : 0),
+ (const PTR *) (locsyms + r_symndx),
+ (const PTR *) locshndx,
&s);
rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s);
}
@@ -8282,7 +8287,8 @@ elf_reloc_symbol_deleted_p (offset, cookie)
lshndx = (Elf_External_Sym_Shndx *) rcookie->locsym_shndx;
if (lshndx != NULL)
lshndx += r_symndx;
- elf_swap_symbol_in (rcookie->abfd, lsym, lshndx, &isym);
+ elf_swap_symbol_in (rcookie->abfd, (const PTR *) lsym,
+ (const PTR *) lshndx, &isym);
}
if (r_symndx >= rcookie->locsymcount