diff options
author | Alan Modra <amodra@bigpond.net.au> | 2002-10-11 08:59:24 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2002-10-11 08:59:24 +0000 |
commit | cf500db0d14d67d98a9b214576df2105ccdaccc5 (patch) | |
tree | 157c8b9b3aacab1b9bb2770da464750fde3cb659 /ld/pe-dll.c | |
parent | 2a14282fa1fdce81d949dd8ee86b54898073ec0a (diff) | |
download | binutils-redhat-cf500db0d14d67d98a9b214576df2105ccdaccc5.tar.gz |
* pe-dll.c (make_import_fixup_mark): Avoid type-punned pointer.
Diffstat (limited to 'ld/pe-dll.c')
-rw-r--r-- | ld/pe-dll.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 367759a114..61dc16cbb6 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -1978,7 +1978,7 @@ make_import_fixup_mark (rel) struct symbol_cache_entry *sym = *rel->sym_ptr_ptr; bfd *abfd = bfd_asymbol_bfd (sym); - struct coff_link_hash_entry *myh = NULL; + struct bfd_link_hash_entry *bh; if (!fixup_name) { @@ -2000,15 +2000,20 @@ make_import_fixup_mark (rel) sprintf (fixup_name, "__fu%d_%s", counter++, sym->name); + bh = NULL; bfd_coff_link_add_one_symbol (&link_info, abfd, fixup_name, BSF_GLOBAL, current_sec, /* sym->section, */ - rel->address, NULL, true, false, - (struct bfd_link_hash_entry **) &myh); + rel->address, NULL, true, false, &bh); + + if (0) + { + struct coff_link_hash_entry *myh; + + myh = (struct coff_link_hash_entry *) bh; + printf ("type:%d\n", myh->type); + printf ("%s\n", myh->root.u.def.section->name); + } -#if 0 - printf ("type:%d\n", myh->type); - printf ("%s\n", myh->root.u.def.section->name); -#endif return fixup_name; } |