* elfxx-target.h: Remove PTR cast.

* targets.c (bfd_target): Make backend_data const void *.
	* elf-bfd.h: Constify all occurrences of struct elf_backend_data.
	* elf-m10300.c: Likewise.
	* elf.c: Likewise.
	* elf32-hppa.c: Likewise.
	* elf32-i386.c: Likewise.
	* elf32-m68hc1x.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-s390.c: Likewise.
	* elf32-sh.c: Likewise.
	* elf32-sh64.c: Likewise.
	* elf32-sparc.c: Likewise.
	* elf32-xtensa.c: Likewise.
	* elf64-mips.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf64-s390.c: Likewise.
	* elf64-sh64.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elf64-x86-64.c: Likewise.
	* elfcode.h: Likewise.
	* elfcore.h: Likewise.
	* elflink.c: Likewise.
	* elflink.h: Likewise.
	* elfxx-ia64.c: Likewise.
	* elfxx-mips.c: Likewise.
	* elfxx-mips.h: Likewise.
	* elf.c (prep_headers): Remove useless check for null backend_data.
	* bfd-in2.h: Regenerate.
This commit is contained in:
Alan Modra
2003-08-07 08:38:11 +00:00
parent abd4220e18
commit 9c5bfbb7fd
29 changed files with 137 additions and 107 deletions

View File

@ -492,7 +492,7 @@ elf_object_p (bfd *abfd)
Elf_Internal_Shdr *i_shdrp; /* Section header table, internal form */
unsigned int shindex;
char *shstrtab; /* Internal copy of section header stringtab */
struct elf_backend_data *ebd;
const struct elf_backend_data *ebd;
struct bfd_preserve preserve;
asection *s;
bfd_size_type amt;
@ -591,11 +591,11 @@ elf_object_p (bfd *abfd)
for which we do not have a specific backend. */
for (target_ptr = bfd_target_vector; *target_ptr != NULL; target_ptr++)
{
struct elf_backend_data *back;
const struct elf_backend_data *back;
if ((*target_ptr)->flavour != bfd_target_elf_flavour)
continue;
back = (struct elf_backend_data *) (*target_ptr)->backend_data;
back = (const struct elf_backend_data *) (*target_ptr)->backend_data;
if (back->elf_machine_code == i_ehdrp->e_machine
|| (back->elf_machine_alt1 != 0
&& back->elf_machine_alt1 == i_ehdrp->e_machine)
@ -1008,7 +1008,7 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
Elf_Internal_Sym *isymbuf = NULL;
Elf_External_Versym *xver;
Elf_External_Versym *xverbuf = NULL;
struct elf_backend_data *ebd;
const struct elf_backend_data *ebd;
bfd_size_type amt;
/* Read each raw ELF symbol, converting from external ELF form to
@ -1238,7 +1238,7 @@ elf_slurp_reloc_table_from_section (bfd *abfd,
asymbol **symbols,
bfd_boolean dynamic)
{
struct elf_backend_data * const ebd = get_elf_backend_data (abfd);
const struct elf_backend_data * const ebd = get_elf_backend_data (abfd);
void *allocated = NULL;
bfd_byte *native_relocs;
arelent *relent;