diff options
author | Alan Modra <amodra@gmail.com> | 2002-10-11 08:33:11 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-10-11 08:33:11 +0000 |
commit | 14a793b2f2d16ac51e6ac53e817a60a520a83200 (patch) | |
tree | f61585eba76e731da279ee2a157c23c0496c0354 /bfd/elf32-sh64.c | |
parent | 2d801b0fa01bf6af6d34f000ab55096ff1064acc (diff) | |
download | gdb-14a793b2f2d16ac51e6ac53e817a60a520a83200.zip gdb-14a793b2f2d16ac51e6ac53e817a60a520a83200.tar.gz gdb-14a793b2f2d16ac51e6ac53e817a60a520a83200.tar.bz2 |
Fix numerous occurrences of
warning: dereferencing type-punned pointer will break strict-aliasing rules
Diffstat (limited to 'bfd/elf32-sh64.c')
-rw-r--r-- | bfd/elf32-sh64.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c index 7a38fb22..844a6a4 100644 --- a/bfd/elf32-sh64.c +++ b/bfd/elf32-sh64.c @@ -411,16 +411,19 @@ sh64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) if (h == NULL) { /* No previous datalabel symbol. Make one. */ + struct bfd_link_hash_entry *bh = NULL; + struct elf_backend_data *bed = get_elf_backend_data (abfd); + if (! _bfd_generic_link_add_one_symbol (info, abfd, dl_name, flags, *secp, *valp, *namep, false, - get_elf_backend_data (abfd)->collect, - (struct bfd_link_hash_entry **) &h)) + bed->collect, &bh)) { free (dl_name); return false; } + h = (struct elf_link_hash_entry *) bh; h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF; h->type = STT_DATALABEL; } |