Rewrite/fix cygwin1.dbg generation

Brian Dessent
Sun Nov 4 07:48:00 GMT 2007

Pedro Alves wrote:

> 10 .cygheap      000a0000  611e0000  611e0000  00000000  2**2
>                   ALLOC
> 11 .gnu_debuglink 00000010  61280000  61280000  001d0a00  2**2
> I'll come up with a different fix.

Just thinking out loud here... what about teaching objcopy that when
doing --add-gnu-debuglink if there'a already a section named
.gnu_debuglink (and it's of sufficient length to hold the .dbg filename)
that it can just rewrite its contents, rather than appending a new
section?  That way we can continue to allocate the section in the link
script (except without having to call it .gnu_debuglink_overlay) so that
we can put the .cygheap last, but we don't have to do the dllfixdbg
hackery to get the ordering correct.

The downside here would be that if we rely on this feature of objcopy
then we'd need to either require bleeding edge binutils to build Cygwin
or do some kind of autoconf runtime test to test for behavior.  Still,
it would be nice to lay the groundwork for being able to one day retire
the hackery.


More information about the Cygwin-patches mailing list