This is the mail archive of the cygwin-patches mailing list for the Cygwin 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: Rewrite/fix cygwin1.dbg generation


On Nov  5 10:19, Pedro Alves wrote:
> Corinna Vinschen wrote:
> > On Nov  4 04:00, Pedro Alves wrote:
> > >
> > > Ah, got it.  VirtualAlloc fails on the first _csbrk, since it
> > > is tripping on the VMA of .gnu_debuglink ...  I assumed it would
> > > not be a problem, since it isn't ALLOCced, but oh well...
> > > I tried adding an EXCLUDE/NOLOAD flag to .gnu_debuglink, but no
> > > can do.
> >
> > That was the reason for creating the .dbg file in the first place,
> > wasn't it?  The Windows loader appears to allocate the full size of all
> > sections of the image, including the NOLOAD and DEBUG sections.  Sort of
> > counterproductive but there seem to be no way around it.
> >
> 
> It occurred me that the problem may be that
> ld is accounting for the virtual address and virtual size of the last section
> to write the SizeOfImage field in the PE headers, in
> bfd/peXXigen.c:_bfd_XXi_swap_aouthdr_out.
> We can change it to not include non ALLOC, DEBUG sections.
> 
> Anyone tried that already?

Not me.  It never occurred to me that this could be a problem in ld,
actually.  If that's the problem and we can fix it, that would be really
cool.  IIUTC, it would remove the necessity to create a cygwin1.dbg file
at all.

> I'll see if I can give it a try tonight.

Yes, please!


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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