This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] bfd/elf32-i386.c forgot to initialize tls_ldm_got
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: John Reiser <jreiser at BitWagon dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 26 Jul 2002 15:00:50 +0930
- Subject: Re: [PATCH] bfd/elf32-i386.c forgot to initialize tls_ldm_got
- References: <3D40D954.6050801@BitWagon.com>
On Thu, Jul 25, 2002 at 10:08:36PM -0700, John Reiser wrote:
> bfd/elf32-i386.c, both CVS and latest linux release 2.12.90.0.15,
> never initializes tls_ldm_got in elf_i386_link_hash_table_create()
> at line 683 and following, yet reads the .refcount in
> elf_i386_size_dynamic_sections() at line 1792.
>
> diff -u -r1.75 elf32-i386.c
> --- elf32-i386.c 11 Jul 2002 05:33:28 -0000 1.75
> +++ elf32-i386.c 26 Jul 2002 05:06:01 -0000
> @@ -699,6 +699,9 @@
> ret->srelbss = NULL;
> ret->sym_sec.abfd = NULL;
>
> + ret->tls_ldm_got.refcount = 0;
> + ret->tls_ldm_got.offset = 0;
> +
> return &ret->elf.root;
> }
Thanks. Please submit a ChangeLog entry next time.
bfd/ChangeLog
From John Reiser <jreiser@BitWagon.com>
* elf32-i386.c (elf_i386_link_hash_table_create): Clear
tls_ldm_got.refcount.
Index: bfd/elf32-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i386.c,v
retrieving revision 1.75
diff -u -p -r1.75 elf32-i386.c
--- bfd/elf32-i386.c 11 Jul 2002 05:33:28 -0000 1.75
+++ bfd/elf32-i386.c 26 Jul 2002 05:29:16 -0000
@@ -697,6 +697,7 @@ elf_i386_link_hash_table_create (abfd)
ret->srelplt = NULL;
ret->sdynbss = NULL;
ret->srelbss = NULL;
+ ret->tls_ldm_got.refcount = 0;
ret->sym_sec.abfd = NULL;
return &ret->elf.root;
--
Alan Modra
IBM OzLabs - Linux Technology Centre