diff options
author | Alan Modra <amodra@gmail.com> | 2002-06-05 13:32:02 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-06-05 13:32:02 +0000 |
commit | 73ff0d563cc293d039736e9fc3dc335d88b5c586 (patch) | |
tree | d4185480201e131ed36ee1244c76fc6f5c58d969 /bfd/elflink.h | |
parent | 53bfd6b45b89735e648cf4c966f9113eadcda35d (diff) | |
download | gdb-73ff0d563cc293d039736e9fc3dc335d88b5c586.zip gdb-73ff0d563cc293d039736e9fc3dc335d88b5c586.tar.gz gdb-73ff0d563cc293d039736e9fc3dc335d88b5c586.tar.bz2 |
* elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
(bfd_elf32_swap_symbol_in): Update prototype.
(bfd_elf64_swap_symbol_in): Likewise.
* elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
(elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
* elflink.h (elf_link_is_defined_archive_symbol): Likewise.
(elf_link_add_object_symbols): Likewise.
(elf_link_record_local_dynamic_symbol): Likewise.
(elf_link_input_bfd): Likewise.
(elf_gc_mark): Likewise.
(elf_reloc_symbol_deleted_p): Likewise.
* elf-m10200.c (mn10200_elf_relax_section): Likewise.
(mn10200_elf_relax_delete_bytes): Likewise.
(mn10200_elf_symbol_address_p): Likewise.
(mn10200_elf_get_relocated_section_contents): Likewise.
* elf-m10300.c (mn10300_elf_relax_section): Likewise.
(mn10300_elf_relax_section): Likewise.
(mn10300_elf_relax_delete_bytes): Likewise.
(mn10300_elf_symbol_address_p): Likewise.
(mn10300_elf_get_relocated_section_contents): Likewise.
* elf32-h8300.c (elf32_h8_relax_section): Likewise.
(elf32_h8_relax_delete_bytes): Likewise.
(elf32_h8_symbol_address_p): Likewise.
(elf32_h8_get_relocated_section_contents): Likewise.
* elf32-hppa.c (get_local_syms): Likewise.
* elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
* elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
* elf32-sh.c (sh_elf_relax_section): Likewise.
(sh_elf_relax_delete_bytes): Likewise.
(sh_elf_get_relocated_section_contents): Likewise.
* elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
* elf64-alpha.c (elf64_alpha_relax_section): Likewise.
* elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
* elf64-mmix.c (mmix_elf_relax_section): Likewise.
* elf64-ppc.c (get_local_syms): Likewise.
* elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
* elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
* elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
* elf64-alpha.c (alpha_elf_size_info): Likewise.
* elf64-hppa.c (hppa64_elf_size_info): Likewise.
* elf64-mips.c (mips_elf64_size_info): Likewise.
* elf64-s390.c (s390_elf64_size_info): Likewise.
* elf64-sparc.c (sparc64_elf_size_info): Likewise.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r-- | bfd/elflink.h | 24 |
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 |