]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elflink.h
* elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
[thirdparty/binutils-gdb.git] / bfd / elflink.h
index 5046416a75900c62e8b10415f65ad5a2e2d182ec..8c221f983cf66e9463ebf842de59f3e5ef4f9fd6 100644 (file)
@@ -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