summaryrefslogtreecommitdiff
path: root/bfd/linker.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-10-11 08:33:11 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-10-11 08:33:11 +0000
commit2a14282fa1fdce81d949dd8ee86b54898073ec0a (patch)
tree507ec00957a8442f4809895bba63fc039c21f393 /bfd/linker.c
parent51d4a85da5d64b4603e8cd72a6a513ad5294738b (diff)
downloadbinutils-redhat-2a14282fa1fdce81d949dd8ee86b54898073ec0a.tar.gz
Fix numerous occurrences of
warning: dereferencing type-punned pointer will break strict-aliasing rules
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index 242f8bd762..e44ac6c6c9 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1305,6 +1305,7 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols, collect)
const char *name;
const char *string;
struct generic_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
name = bfd_asymbol_name (p);
if (((p->flags & BSF_INDIRECT) != 0
@@ -1326,12 +1327,12 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols, collect)
else
string = NULL;
- h = NULL;
+ bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name, p->flags, bfd_get_section (p),
- p->value, string, false, collect,
- (struct bfd_link_hash_entry **) &h)))
+ p->value, string, false, collect, &bh)))
return false;
+ h = (struct generic_link_hash_entry *) bh;
/* If this is a constructor symbol, and the linker didn't do
anything with it, then we want to just pass the symbol