diff mbox

[libiberty] : Fix long-section name handling for coff in simple-object-coff

Message ID AANLkTinqu4fedbxYnB-nKm0-uyH9znpKAZVLaVL9qzxL@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz Nov. 13, 2010, 6:37 p.m. UTC
Hello,

this patch adds the missing object offset for reading strtab data from object.

ChangeLog

2010-11-13  Kai Tietz

        * simple-object-coff.c (simple_object_coff_read_strtab): Fix reading
        offset.

Tested for x86_64-w64-mingw32, i686-w64-mingw32, and i686-pc-cygwin.
If there are no objections, I will apply this tomorrow.

Regards,
Kai

Comments

DJ Delorie Nov. 14, 2010, 4:05 a.m. UTC | #1
>   But I'm not sure if our area-maintainership rights cover
> COFF-specific parts of libiberty.  DJ?

I think we've always given specific maintainers right over parts of
libiberty and the build system specific to their maintainerships.
Since you're a Windows maintainer, and a PE/COFF maintainer in
binutils, I'd say it's all yours...
Dave Korn Nov. 14, 2010, 4:16 a.m. UTC | #2
On 13/11/2010 18:37, Kai Tietz wrote:
> Hello,
> 
> this patch adds the missing object offset for reading strtab data from object.
> 
> ChangeLog
> 
> 2010-11-13  Kai Tietz
> 
>         * simple-object-coff.c (simple_object_coff_read_strtab): Fix reading
>         offset.
> 
> Tested for x86_64-w64-mingw32, i686-w64-mingw32, and i686-pc-cygwin.
> If there are no objections, I will apply this tomorrow.

  None from me, I already submitted the same thing as part of:

http://gcc.gnu.org/ml/gcc-patches/2010-11/msg00229.html

  But I'm not sure if our area-maintainership rights cover COFF-specific parts
of libiberty.  DJ?

    cheers,
      DaveK
Dave Korn Nov. 14, 2010, 4:33 a.m. UTC | #3
On 14/11/2010 04:05, DJ Delorie wrote:
>>   But I'm not sure if our area-maintainership rights cover
>> COFF-specific parts of libiberty.  DJ?
> 
> I think we've always given specific maintainers right over parts of
> libiberty and the build system specific to their maintainerships.

  Wasn't sure if that only covered the gcc/ subdirectory or not.  (Apart from
the pex-* files there hasn't been any seriously target-specific code in
libiberty until now, so it might not have come up for consideration in the past.)

> Since you're a Windows maintainer, and a PE/COFF maintainer in
> binutils, I'd say it's all yours...

  Thanks for clarifying... that is pretty unambiguous :)

    cheers,
      DaveK
Kai Tietz Nov. 14, 2010, 6:50 p.m. UTC | #4
2010/11/14 Dave Korn <dave.korn.cygwin@gmail.com>:
> On 14/11/2010 04:05, DJ Delorie wrote:
>>>   But I'm not sure if our area-maintainership rights cover
>>> COFF-specific parts of libiberty.  DJ?
>>
>> I think we've always given specific maintainers right over parts of
>> libiberty and the build system specific to their maintainerships.
>
>  Wasn't sure if that only covered the gcc/ subdirectory or not.  (Apart from
> the pex-* files there hasn't been any seriously target-specific code in
> libiberty until now, so it might not have come up for consideration in the past.)
>
>> Since you're a Windows maintainer, and a PE/COFF maintainer in
>> binutils, I'd say it's all yours...
>
>  Thanks for clarifying... that is pretty unambiguous :)
>
>    cheers,
>      DaveK
>

Committed at revision 166735.

Kai
diff mbox

Patch

Index: simple-object-coff.c
===================================================================
--- simple-object-coff.c        (revision 166701)
+++ simple-object-coff.c        (working copy)
@@ -308,7 +308,8 @@ 
   size_t strsize;
   char *strtab;

-  strtab_offset = ocr->symptr + ocr->nsyms * sizeof (struct external_syment);
+  strtab_offset = sobj->offset + ocr->symptr
+                 + ocr->nsyms * sizeof (struct external_syment);
   if (!simple_object_internal_read (sobj->descriptor, strtab_offset,
                                    strsizebuf, 4, errmsg, err))
     return NULL;