From 14a793b2f2d16ac51e6ac53e817a60a520a83200 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 11 Oct 2002 08:33:11 +0000 Subject: Fix numerous occurrences of warning: dereferencing type-punned pointer will break strict-aliasing rules --- bfd/elf64-ppc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bfd/elf64-ppc.c') diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 909314f..7c6ec10 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -3166,6 +3166,7 @@ func_desc_adjust (h, inf) { bfd *abfd; asymbol *newsym; + struct bfd_link_hash_entry *bh; abfd = h->root.u.undef.abfd; newsym = bfd_make_empty_symbol (abfd); @@ -3176,13 +3177,14 @@ func_desc_adjust (h, inf) if (h->root.type == bfd_link_hash_undefweak) newsym->flags |= BSF_WEAK; + bh = &fdh->root; if ( !(_bfd_generic_link_add_one_symbol (info, abfd, newsym->name, newsym->flags, - newsym->section, newsym->value, NULL, false, false, - (struct bfd_link_hash_entry **) &fdh))) + newsym->section, newsym->value, NULL, false, false, &bh))) { return false; } + fdh = (struct elf_link_hash_entry *) bh; fdh->elf_link_hash_flags &= ~ELF_LINK_NON_ELF; } -- cgit v1.1