This is the mail archive of the binutils@sourceware.cygnus.com 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]

Re: [aph@cygnus.co.uk: PE linker broken with `ld -r' and C++]


   Date: 22 Mar 2000 19:16:49 -0000
   From: Andrew Haley <aph@pasanda.cygnus.co.uk>

   Last year I submitted this patch.  At the time, we couldn't agree that
   it was the right thing to do.  I believe it is, and this patch has
   been in Cygnus releases ever since, with no apparent regressions.

   I think that six months is long enough.  Unless someone objects I'd
   like to check it in.

My only response is that there is an answer as to whether this patch
is right or not.  The length of time and the absence of regressions is
only negative proof.  Correct maintenance implies understanding the
problem and obtaining positive proof.

Also, the comment suggests that the patch is related to PE, but it is
changing code which is not necessarily related to PE.  I don't see why
the comment should mention PE at all.  If it should, it should explain
why PE is different here.  It seems to me that the patch needs to be
correct for any COFF object file format which defines
COFF_LONG_SECTION_NAMES.  That is true of PE, of course, but it could
in principle be true of other COFF targets as well.

To me, the patch doesn't have the right feel.  What you want to test
is whether this file is being created by the backend linker.  You are
testing that by looking at obj_raw_syment_count.  It's not immediately
obvious to me that that is the best way to determine that.  But I
don't know of a better approach offhand, and I don't feel like taking
the time to figure one out.  If there isn't a better approach, it
might be more maintainable to invent one.

In general, I don't care about PE, so I don't care whether this patch
goes in or not.  If you are certain that this patch is correct and
maintainable, then go ahead and check it in.

Ian

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