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] Revise long section names coff extension handling for PE targets, take 2.


H.J. Lu wrote:
> On Mon, Feb 16, 2009 at 6:08 PM, Dave Korn
> <dave.korn.cygwin@googlemail.com> wrote:
>> Dave Korn wrote:
>>> H.J. Lu wrote:
>>>> On Mon, Feb 16, 2009 at 3:30 PM, Dave Korn wrote:
>>>>>    Hi again,
>>>>>
>>>>>  Here's the revised version of the PE/COFF long section names patch that I
>>>>> posted previously at
>>>>>
>>>>> http://sourceware.org/ml/binutils/2009-02/msg00136.html
>>>> I assume it will fix:
>>>>
>>>> http://sourceware.org/bugzilla/show_bug.cgi?id=7059
>>>>
>>>> Would you mind mentioning this PR in your ChangeLog?
>>>   I don't know, I certainly will if it fixes the bug; can you send me the
>>> testcase in private email?
>>  Well, I can't reproduce the original problem, even after rolling back both
>> this patch and my previous one to fix the .reloc sections.  I notice the bug
>> was reported against a fairly old version of as stamped 2.18.50.20080109, so
>> it could have been fixed in CVS for potentially quite a long time.
>>
> 
> I don't think it is fixed in CVS.  You can add a check/abort in coffcode.h to
> verify if it is fixed. See
> 
> http://sourceware.org/ml/binutils/2009-01/msg00043.html
> 
> for details.
> 

  Ah, no, then my patch doesn't touch the problem.

  There's not a lot we can do about it.  There is no other place than the
s_name field to put the \nnnn notation and there is no more than 8 bytes for it.

  However, the field does not need to be NUL-terminated, so we can handle a
string table size up to 10 million bytes instead of 1 million before we run
out of room, but we'll have to take care to generate an 8-byte-non-terminated
string instead of overrunning by 1 byte into the subsequent field (s_paddr).
Presumably simplest way would be to snprintf into a 9-byte buffer and memcpy
it across into the section header.

    cheers,
      DaveK



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