From 6edfbbad08647691263c23151a75601a6c30d42f Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 6 Oct 2005 19:21:14 +0000 Subject: bfd/ * elf32-arm.c (elf32_arm_check_relocs): Avoid aliasing warnings from GCC. (elf32_arm_size_dynamic_sections): Likewise. * ecofflink.c (bfd_ecoff_debug_one_external): Likewise. * elf32-hppa.c (elf32_hppa_check_relocs): Likewise. * elf32-m32r.c (m32r_elf_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_check_relocs): Likewise. * elf32-s390.c (elf_s390_check_relocs): Likewise. (elf_s390_size_dynamic_sections): Likewise. * elf32-sh.c (sh_elf_check_relocs): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count) (ppc64_elf_size_dynamic_sections): Likewise. * elf64-s390.c (elf_s390_check_relocs): Likewise. (elf_s390_size_dynamic_sections): Likewise. * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise. (_bfd_sparc_elf_size_dynamic_sections): Likewise. * ieee.c (ieee_slurp_section_data): Likewise. * oasys.c (oasys_slurp_section_data): Likewise. opcodes/ * ppc-dis.c (struct dis_private): Remove. (powerpc_dialect): Avoid aliasing warnings. (print_insn_big_powerpc, print_insn_little_powerpc): Likewise. --- bfd/ecofflink.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bfd/ecofflink.c') diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c index c4663b7..d7bb817 100644 --- a/bfd/ecofflink.c +++ b/bfd/ecofflink.c @@ -1338,10 +1338,14 @@ bfd_ecoff_debug_one_external (abfd, debug, swap, name, esym) - (char *) debug->external_ext) < (symhdr->iextMax + 1) * external_ext_size) { - if (! ecoff_add_bytes ((char **) &debug->external_ext, - (char **) &debug->external_ext_end, + char *external_ext = debug->external_ext; + char *external_ext_end = debug->external_ext_end; + if (! ecoff_add_bytes ((char **) &external_ext, + (char **) &external_ext_end, (symhdr->iextMax + 1) * (size_t) external_ext_size)) return FALSE; + debug->external_ext = external_ext; + debug->external_ext_end = external_ext_end; } esym->asym.iss = symhdr->issExtMax; -- cgit v1.1