+2002-06-06 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
+ are "const PTR", not "const PTR *".
+ (bfd_elf32_swap_symbol_in): Likewise.
+ (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.
+
Wed Jun 5 20:43:27 2002 J"orn Rennecke <joern.rennecke@superh.com>
* config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
void (*write_relocs)
PARAMS ((bfd *, asection *, PTR));
void (*swap_symbol_in)
- PARAMS ((bfd *, const PTR *, const PTR *, Elf_Internal_Sym *));
+ PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
void (*swap_symbol_out)
PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
boolean (*slurp_reloc_table)
PARAMS ((bfd *, struct bfd_link_info *));
extern void bfd_elf32_swap_symbol_in
- PARAMS ((bfd *, const PTR *, const PTR *, Elf_Internal_Sym *));
+ PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
extern void bfd_elf32_swap_symbol_out
PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
extern void bfd_elf32_swap_reloc_in
PARAMS ((bfd *, struct bfd_link_info *));
extern void bfd_elf64_swap_symbol_in
- PARAMS ((bfd *, const PTR *, const PTR *, Elf_Internal_Sym *));
+ PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
extern void bfd_elf64_swap_symbol_out
PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
extern void bfd_elf64_swap_reloc_in
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == SHN_UNDEF)
sym_sec = bfd_und_section_ptr;
Elf_Internal_Sym isym;
Elf_External_Sym_Shndx dummy;
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym, (const PTR *) shndx,
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
&isym);
if (isym.st_shndx == sec_shndx
{
Elf_Internal_Sym isym;
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym, (const PTR *) shndx,
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
&isym);
if (isym.st_shndx == sec_shndx
{
asection *isec;
- bfd_elf32_swap_symbol_in (input_bfd, (const PTR *) esym,
- (const PTR *) shndx, isymp);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isymp);
if (isymp->st_shndx == SHN_UNDEF)
isec = bfd_und_section_ptr;
esym = extsyms + r_index;
shndx = shndx_buf + (shndx_buf ? r_index : 0);
bfd_elf32_swap_symbol_in (input_bfd,
- (const PTR *) esym,
- (const PTR *) shndx,
+ (const PTR) esym,
+ (const PTR) shndx,
&isym);
if (isym.st_shndx == SHN_UNDEF)
{
Elf_Internal_Sym isym;
- bfd_elf32_swap_symbol_in (input_bfd, (const PTR *) esym,
- (const PTR *) shndx, &isym);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, &isym);
if (isym.st_shndx == sec_shndx
&& ELF_ST_TYPE (isym.st_info) == STT_FUNC)
{
struct elf_link_hash_table *elftab;
bfd_size_type amt;
- bfd_elf32_swap_symbol_in (input_bfd, (const PTR *) esym,
- (const PTR *) shndx, &isym);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, &isym);
if (isym.st_shndx != sec_shndx)
continue;
/* A local symbol. */
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym,
+ (const PTR) shndx, &isym);
if (isym.st_shndx == SHN_UNDEF)
sym_sec = bfd_und_section_ptr;
Elf_Internal_Sym isym;
Elf_External_Sym_Shndx dummy;
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym, (const PTR *) shndx,
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
&isym);
if (isym.st_shndx == sec_shndx
{
Elf_Internal_Sym isym;
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym, (const PTR *) shndx,
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
&isym);
if (isym.st_shndx == sec_shndx
{
asection *isec;
- bfd_elf32_swap_symbol_in (input_bfd, (const PTR *) esym,
- (const PTR *) shndx, isymp);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isymp);
if (isymp->st_shndx == SHN_UNDEF)
isec = bfd_und_section_ptr;
/* A local symbol. */
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
symval = (isym.st_value
shndx = shndx_buf;
if (shndx != NULL)
shndx += ELF32_R_SYM (last_reloc->r_info);
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx,
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym,
+ (const PTR) shndx,
&last_symbol);
last_sym_sec
Elf_Internal_Sym isym;
Elf_External_Sym_Shndx dummy;
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym, (const PTR *) shndx,
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
&isym);
if (isym.st_shndx == sec_shndx
{
Elf_Internal_Sym isym;
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym, (const PTR *) shndx,
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
&isym);
if (isym.st_shndx == sec_shndx
{
asection *isec;
- bfd_elf32_swap_symbol_in (input_bfd, (const PTR *) esym,
- (const PTR *) shndx, isymp);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isymp);
if (isymp->st_shndx == SHN_UNDEF)
isec = bfd_und_section_ptr;
isym = local_syms, shndx = shndx_buf;
esym < end_sy;
esym++, isym++, shndx = (shndx ? shndx + 1 : NULL))
- bfd_elf32_swap_symbol_in (input_bfd, (const PTR *) esym,
- (const PTR *) shndx, isym);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isym);
/* Now we can free the external symbols. */
free (shndx_buf);
/* A local symbol. */
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
targetsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
}
/* A local symbol. */
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
targetsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
}
esym = extsyms + ELF32_R_SYM (irelfn->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irelfn->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx
!= (unsigned int) _bfd_elf_section_from_bfd_section (abfd, sec))
{
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, &sym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym,
+ (const PTR) shndx, &sym);
if (sym.st_shndx == sec_shndx
&& (sym.st_value <= addr
esym = extsyms + ELF32_R_SYM (irelscan->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irelscan->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, &sym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &sym);
if (sym.st_shndx == sec_shndx
&& (sym.st_value <= addr
Elf_Internal_Sym isym;
Elf_External_Sym_Shndx dummy;
- bfd_elf32_swap_symbol_in (abfd, (const PTR *) esym, (const PTR *) shndx,
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
&isym);
if (isym.st_shndx == sec_shndx
{
asection *isec;
- bfd_elf32_swap_symbol_in (input_bfd, (const PTR *) esym,
- (const PTR *) shndx, isymp);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isymp);
if (isymp->st_shndx == SHN_UNDEF)
isec = bfd_und_section_ptr;
shndx = shndx_buf;
if (shndx != NULL)
shndx += idx;
- bfd_elf32_swap_symbol_in (ibfd, (const PTR *) (extsyms + idx),
- (const PTR *) shndx, &isym);
+ bfd_elf32_swap_symbol_in (ibfd, (const PTR) (extsyms + idx),
+ (const PTR) shndx, &isym);
if (isym.st_shndx == SHN_UNDEF)
continue;
else if (isym.st_shndx == SHN_ABS)
esym = extsyms + ELF64_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF64_R_SYM (irel->r_info) : 0);
- bfd_elf64_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, &isym);
+ bfd_elf64_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == SHN_UNDEF)
continue;
else if (isym.st_shndx == SHN_ABS)
i < symtab_hdr->sh_info;
i++, esym++, isym++, shndx = (shndx != NULL ? shndx + 1 : NULL))
{
- bfd_elf64_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, isym);
+ bfd_elf64_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ isym);
if (isym->st_shndx > highest_shndx)
highest_shndx = isym->st_shndx;
}
esym = extsyms + ELF64_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf
? ELF64_R_SYM (irel->r_info) : 0);
- bfd_elf64_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, &isym);
+ bfd_elf64_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == SHN_UNDEF)
sym_sec = bfd_und_section_ptr;
isym = local_syms, shndx = shndx_buf;
esym < end_sy;
esym++, isym++, shndx = (shndx ? shndx + 1 : NULL))
- bfd_elf64_swap_symbol_in (input_bfd, (const PTR *) esym,
- (const PTR *) shndx, isym);
+ bfd_elf64_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isym);
/* Now we can free the external symbols. */
free (shndx_buf);
{
asection *isec;
- bfd_elf64_swap_symbol_in (input_bfd, (const PTR *) esym,
- (const PTR *) shndx, isymp);
+ bfd_elf64_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isymp);
if (isymp->st_shndx == SHN_UNDEF)
isec = bfd_und_section_ptr;
void
elf_swap_symbol_in (abfd, psrc, pshn, dst)
bfd *abfd;
- const PTR *psrc;
- const PTR *pshn;
+ const PTR psrc;
+ const PTR pshn;
Elf_Internal_Sym *dst;
{
const Elf_External_Sym *src = (const Elf_External_Sym *) psrc;
/* Skip first symbol, which is a null dummy. */
for (i = 1; i < symcount; i++)
{
- elf_swap_symbol_in (abfd, (const PTR *) (x_symp + i),
- (const PTR *) (x_shndx + (x_shndx ? i : 0)),
+ 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
Elf_Internal_Sym sym;
const char * name;
- elf_swap_symbol_in (abfd, (const PTR *) esym, (const PTR *) 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)
override = false;
- elf_swap_symbol_in (abfd, (const PTR *) esym, (const PTR *) shndx, &sym);
+ elf_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx, &sym);
flags = BSF_NO_FLAGS;
sec = NULL;
|| bfd_bread ((PTR) shndx, amt, input_bfd) != amt)
return false;
}
- elf_swap_symbol_in (input_bfd, (const PTR *) &esym, (const PTR *) shndx,
+ elf_swap_symbol_in (input_bfd, (const PTR) &esym, (const PTR) shndx,
&entry->isym);
name = (bfd_elf_string_from_elf_section
const char *name;
Elf_Internal_Sym osym;
- elf_swap_symbol_in (input_bfd, (const PTR *) esym, (const PTR *) shndx,
+ elf_swap_symbol_in (input_bfd, (const PTR) esym, (const PTR) shndx,
isym);
*pindex = -1;
{
locshndx = locsym_shndx + (locsym_shndx ? r_symndx : 0);
elf_swap_symbol_in (input_bfd,
- (const PTR *) (locsyms + r_symndx),
- (const PTR *) locshndx,
+ (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);
{
locshndx = locsym_shndx + (locsym_shndx ? r_symndx : 0);
elf_swap_symbol_in (input_bfd,
- (const PTR *) (locsyms + r_symndx),
- (const PTR *) locshndx,
+ (const PTR) (locsyms + r_symndx),
+ (const PTR) locshndx,
&s);
rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s);
}
lshndx = (Elf_External_Sym_Shndx *) rcookie->locsym_shndx;
if (lshndx != NULL)
lshndx += r_symndx;
- elf_swap_symbol_in (rcookie->abfd, (const PTR *) lsym,
- (const PTR *) lshndx, &isym);
+ elf_swap_symbol_in (rcookie->abfd, (const PTR) lsym,
+ (const PTR) lshndx, &isym);
}
if (r_symndx >= rcookie->locsymcount
/* A local symbol. */
esym = extsyms + ELFNN_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELFNN_R_SYM (irel->r_info) : 0);
- bfd_elfNN_swap_symbol_in (abfd, (const PTR *) esym,
- (const PTR *) shndx, &isym);
+ bfd_elfNN_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == SHN_UNDEF)
continue; /* We can't do anthing with undefined symbols. */
else if (isym.st_shndx == SHN_ABS)
elf32-sh-lin.c
elf32-sh-nbsd.c
elf32-sh.c
+elf32-sh64-com.c
+elf32-sh64-nbsd.c
elf32-sh64.c
elf32-sparc.c
elf32-v850.c
elf64-mmix.c
elf64-ppc.c
elf64-s390.c
+elf64-sh64-nbsd.c
elf64-sh64.c
elf64-sparc.c
elf64-x86-64.c