This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH gold/6859] Symbols specified as -u <symbol> may erroneously get added to dynsym
- From: Kris Van Hees <kris dot van dot hees at oracle dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 27 Aug 2008 01:38:05 -0400
- Subject: Re: [PATCH gold/6859] Symbols specified as -u <symbol> may erroneously get added to dynsym
- References: <20080529205212.GQ13586@oracle.com> <20080826140138.GA16080@oracle.com> <20080826141248.GB16080@oracle.com> <m3k5e3ioii.fsf@google.com> <20080826191944.GC16080@oracle.com>
[Resending this since my mail server seems to have eaten the previous copy.]
Revision of the patch. Could you perform the commit, or could I ask for
sponsoring to get commit privileges and I'll commit it myself once they
are granted? Same for the patch for PR 6858?
Kris
Changelog:
----------
2008-08-26 Kris Van Hees <kris.van.hees@oracle.com>
PR 6859
* symtab.cc (Symbol::init_base_undefined): Mark explicitly undefined
symbols as not needing a dynsym entry.
Patch:
------
Index: gold/symtab.cc
===================================================================
RCS file: /cvs/src/src/gold/symtab.cc,v
retrieving revision 1.107
diff -u -p -r1.107 symtab.cc
--- gold/symtab.cc 23 Jul 2008 23:44:02 -0000 1.107
+++ gold/symtab.cc 26 Aug 2008 19:15:39 -0000
@@ -174,6 +174,7 @@ Symbol::init_base_undefined(const char*
elfcpp::STV visibility, unsigned char nonvis)
{
this->init_fields(name, version, type, binding, visibility, nonvis);
+ this->dynsym_index_ = -1U;
this->source_ = IS_UNDEFINED;
this->in_reg_ = true;
}
On Tue, Aug 26, 2008 at 12:07:17PM -0700, Ian Lance Taylor wrote:
> Kris Van Hees <kris.van.hees@oracle.com> writes:
>
> > Patch:
> > ======
> > Index: gold/symtab.cc
> > ===================================================================
> > RCS file: /cvs/src/src/gold/symtab.cc,v
> > retrieving revision 1.107
> > diff -r1.107 symtab.cc
> > 176a177
> >> this->dynsym_index_ = -1;
>
> Please write -1U. This is OK with that change.
>
> By the way, diffs are easier to understand if you generate them with
> -up or plain -p.
>
> Thanks.
>
> Ian