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 Dave Korn <dave.korn.cygwin@googlemail.com>:
> 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. By inspecting the generated executable by objdump, I see that
>> all debugging sections don't have the LOAD flag set. As there are
>> relocations in debug sections OS pe-loader rejects to load such an
>> image. When I strip this rejected executable, it works.
>>
>> Has somebody an idea when and where this happend, what the reason here could be?
>
> ?I'm investigating it now.
>
> ? ?cheers,
> ? ? ?DaveK
>
>
>

See also  http://sourceforge.net/mailarchive/forum.php?thread_name=2bf229d30906221150u44925a38t6759455f6e21ae37%40mail.gmail.com&forum_name=mingw-w64-public

I changed in bfd that all SEC_DEBUGGING sections have SEC_ALLOC and
SEC_LOAD bits set. This works, but then when those binaries are
stripped, again a failure appears (I assume it has to do with the
relocations in debug sections). In fact by spec the section flags are
correct, but as GNU emits for debugging formats .secrel32 relocations,
this can work, because on relocation attempt those sections aren't
allocated and loaded. A general way to solve this would be to remove
those section relative relocations at all and do the relocation itself
based to the _image_base.

Cheers,
Kai
-- 
|  (\_/) 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]