This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: powerpc64 opd edit
On Mon, Dec 08, 2003 at 11:19:01PM +1030, Alan Modra wrote:
> * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
> Validate dynh->h against h.
Embarrassing.
* elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Check for
NULL dyn_h.
Index: bfd/elf64-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-hppa.c,v
retrieving revision 1.44
diff -u -p -r1.44 elf64-hppa.c
--- bfd/elf64-hppa.c 8 Dec 2003 13:05:10 -0000 1.44
+++ bfd/elf64-hppa.c 12 Dec 2003 14:08:22 -0000
@@ -1912,7 +1912,7 @@ elf64_hppa_link_output_symbol_hook (info
hppa_info = elf64_hppa_hash_table (info);
dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table,
name, FALSE, FALSE);
- if (dyn_h->h != h)
+ if (!dyn_h || dyn_h->h != h)
return TRUE;
/* Function symbols for which we created .opd entries *may* have been
@@ -1922,7 +1922,7 @@ elf64_hppa_link_output_symbol_hook (info
into non-dynamic ones, so we initialize st_shndx to -1 in
mark_exported_functions and check to see if it was overwritten
here instead of just checking dyn_h->h->dynindx. */
- if (dyn_h && dyn_h->want_opd && dyn_h->st_shndx != -1)
+ if (dyn_h->want_opd && dyn_h->st_shndx != -1)
{
/* Restore the saved value and section index. */
sym->st_value = dyn_h->st_value;
--
Alan Modra
IBM OzLabs - Linux Technology Centre