From 918d9742419429e4f063e4f8ff624f00237456a4 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 7 Aug 2009 17:10:43 +0000 Subject: [PATCH] * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict aliasing error. --- bfd/ChangeLog | 5 +++++ bfd/elf32-microblaze.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e9d27c7b4a6..e7d0e94e2d4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2009-08-07 Tom Tromey + + * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict + aliasing error. + 2009-08-06 Michael Eager * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}. diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c index 5b1a71b4b2d..c975e76800f 100644 --- a/bfd/elf32-microblaze.c +++ b/bfd/elf32-microblaze.c @@ -2121,6 +2121,7 @@ microblaze_elf_check_relocs (bfd * abfd, asection *s; Elf_Internal_Sym *isym; + void *vpp; isym = bfd_sym_from_r_symndx (&htab->sym_sec, abfd, r_symndx); @@ -2131,8 +2132,8 @@ microblaze_elf_check_relocs (bfd * abfd, if (s == NULL) return FALSE; - head = ((struct elf32_mb_dyn_relocs **) - &elf_section_data (s)->local_dynrel); + vpp = &elf_section_data (s)->local_dynrel; + head = (struct elf32_mb_dyn_relocs **) vpp; } p = *head; -- 2.30.2