diff options
author | Alan Modra <amodra@bigpond.net.au> | 2005-02-02 01:39:00 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2005-02-02 01:39:00 +0000 |
commit | b54d3fd09c190172789018c65f7f22301079f9d8 (patch) | |
tree | 153c4b9d2606869445ca5ef18d8f3f95e8960fb4 | |
parent | e20d84abaf6b8879ec10f43e8e6749fa78d7ffaa (diff) | |
download | binutils-redhat-b54d3fd09c190172789018c65f7f22301079f9d8.tar.gz |
* elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Don't clear everything,
just the fields specific to hppa64.
-rw-r--r-- | bfd/ChangeLog | 1 | ||||
-rw-r--r-- | bfd/elf64-hppa.c | 11 |
2 files changed, 7 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6c394ab619..699bcc1586 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -2,6 +2,7 @@ * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear everything, just the field specific to ia64. + * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise. 2005-02-01 Alan Modra <amodra@bigpond.net.au> diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 8bc830c110..869f7ed707 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -1,5 +1,5 @@ /* Support for HPPA 64-bit ELF - Copyright 1999, 2000, 2001, 2002, 2003, 2004 + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -305,14 +305,15 @@ elf64_hppa_new_dyn_hash_entry (entry, table, string) if (!ret) return 0; - /* Initialize our local data. All zeros, and definitely easier - than setting 8 bit fields. */ - memset (ret, 0, sizeof (*ret)); - /* Call the allocation method of the superclass. */ ret = ((struct elf64_hppa_dyn_hash_entry *) bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string)); + /* Initialize our local data. All zeros. */ + memset (&ret->dlt_offset, 0, + (sizeof (struct elf64_hppa_dyn_hash_entry) + - offsetof (struct elf64_hppa_dyn_hash_entry, dlt_offset))); + return &ret->root; } |