2009/11/21 Dave Korn<dave.korn.cygwin@googlemail.com>:
Kai Tietz wrote:
So here is the updated version making section .gnu_debuglink a no load section.
Lto for x86_64-pc-mingw32, i686-pc-mingw32, and i686-pc-cygwin32
tested so far, that binutils parts about pe-coff are working.
OK, once you've verified that a split-debug exe still works fine in gdb
automatically (i.e. without needing a 'file' command or otherwise separately
loading the splitted-out debug info) even with NOLOAD on the .gnu_debuglink
section, and of course with an updated ChangeLog.
(for building libelf on cygwin, the elf.h has to be moved temporary
into elf_old.h, before building libelf, afterwards it can be renamed
to old name)
Right, so from JonY's description I'm guessing the ELF formatted data is all
just quietly encapsulated in one of these PE sections. I currently owe the
Cygwin distro a respin of the current stable compiler build for 1.5 and 1.7,
but after that's shipping I'd like to try an experimental release of 4.5.0,
with lto and graphite and everything enabled. Thanks for the advice, both of you.
cheers,
DaveK
Ok, I tested it and gdb doesn't like the NOLOAD, so I removed the
.gnu_debuglink complete from my patch.
I noticed that in objcopy there is some issue about long section names.
The option --add-gnu-debuglink seems to be broken as it shortens
automatically the section name to 8 characters, Dave rings here a
bell? Can be related to the way I initial did the split
objcopy --only-keep-debug $f ${strippath}/$d/$s.dbg
objcopy --strip-debug $f
objcopy --add-gnu-debuglink=${strippath}/$d/$s.dbg $f
$f = is the executable with debug information
$s = is the base name of executable
Is by this something wrong? But well, this is a different issue.
Modified changelog is
2009-11-21 Kai Tietz<kai.tietz@onevision.com>
* scripttempl/pe.sc: (.note.GNU-stack): Mark as discardable.
(.gnu.lto_*): Likewise.
* scripttempl/pep.sc: (.note.GNU-stack): Mark as discardable.
(.gnu.lto_*): Likewise.
Tested for i686-pc-cygwin, i686-pc-mingw32, and x86_64-pc-mingw32. Ok for apply.
Cheers,
Kai