* Fix use of uninitialized data in elf32-ppc.c
@ 2011-01-28 23:25 Joseph S. Myers
2011-01-29 0:02 ` Alan Modra
0 siblings, 1 reply; 2+ messages in thread
From: Joseph S. Myers @ 2011-01-28 23:25 UTC (permalink / raw)
To: binutils
This patch fixes nondeterministic behavior in the ppc32 linker arising
from the has_sda_refs field in struct ppc_elf_link_hash_entry not
being initialized.
Tested with no regressions with cross to powerpc-linux-gnu. OK to
commit?
2011-01-28 Joseph Myers <joseph@codesourcery.com>
* elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
field.
Index: elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.290
diff -u -p -r1.290 elf32-ppc.c
--- elf32-ppc.c 25 Oct 2010 15:54:14 -0000 1.290
+++ elf32-ppc.c 28 Jan 2011 23:22:31 -0000
@@ -2785,6 +2785,7 @@ ppc_elf_link_hash_newfunc (struct bfd_ha
ppc_elf_hash_entry (entry)->linker_section_pointer = NULL;
ppc_elf_hash_entry (entry)->dyn_relocs = NULL;
ppc_elf_hash_entry (entry)->tls_mask = 0;
+ ppc_elf_hash_entry (entry)->has_sda_refs = 0;
}
return entry;
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Fix use of uninitialized data in elf32-ppc.c
2011-01-28 23:25 Fix use of uninitialized data in elf32-ppc.c Joseph S. Myers
@ 2011-01-29 0:02 ` Alan Modra
0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2011-01-29 0:02 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: binutils
On Fri, Jan 28, 2011 at 11:25:26PM +0000, Joseph S. Myers wrote:
> This patch fixes nondeterministic behavior in the ppc32 linker arising
> from the has_sda_refs field in struct ppc_elf_link_hash_entry not
> being initialized.
>
> Tested with no regressions with cross to powerpc-linux-gnu. OK to
> commit?
Yes please. 2.21 too.
> 2011-01-28 Joseph Myers <joseph@codesourcery.com>
>
> * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
> field.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-29 0:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 23:25 Fix use of uninitialized data in elf32-ppc.c Joseph S. Myers
2011-01-29 0:02 ` Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).