This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH gold/6859] Symbols specified as -u <symbol> may erroneously get added to dynsym


[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]