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: RFA: Debug sections seems to be emitted wrong for pe-coff


2009/6/22 Kai Tietz <ktietz70@googlemail.com>:
> 2009/6/22 Dave Korn <dave.korn.cygwin@googlemail.com>:
>> Dave Korn wrote:
>>> Dave Korn wrote:
>>>> Kai Tietz wrote:
>>>>
>>>>> I noticed that some days ago (the version on the 12th of June worked
>>>>> proper) the executables containing debugging information seems to be
>>>>> broken.
>>
>> ?This is from Christian's testcase "a.exe" attached to GCC PR 40455:
>>
>> ?6 .debug_aranges 00000020 ?00406000 ?00406000 ?00001000 ?2**0
>> ? ? ? ? ? ? ? ? ?CONTENTS, READONLY, DEBUGGING
>>
>> ?This is from any other random cygwin executable on my machine:
>>
>> ?5 .debug_aranges 00000900 ?00588000 ?00588000 ?00178200 ?2**3
>> ? ? ? ? ? ? ? ? ?CONTENTS, READONLY, DEBUGGING
>>
>> ?The alignment has changed. ?Wonder if that's the root of the problem? ?I
>> can't find any relocs in this file, so maybe we have two problems.
>>
>> ? ?cheers,
>> ? ? ?DaveK
>>
>
> Well, I was wondering first, too. But I assume that they are in the
> pei-relocator data. Because I took a look on my test app (for
> debugging information) and saw that a .secrel32 was present, so this
> means there has to be at least this relocation.
>
> Cheers,
> Kai
>
> --
> | ?(\_/) This is Bunny. Copy and paste
> | (='.'=) Bunny into your signature to help
> | (")_(") him gain world domination
>

The intersting thing I noticed is that section flag IMAGE_SCN_MEM_DISCARDABLE uy

is set for all debugging sections, even if the don't have SEC_ALLOC
and SEC_LOAD set. This of course wrong as section without those two
flags aren't loaded at all and therefor can't be discardable. I assume
this is at least one of those issues we have here.

Cheers,
Kai

PS: see coffcode.h (sec_to_styp_flags)

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


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