https://sourceware.org/bugzilla/show_bug.cgi?id=21459
Bug ID: 21459 Summary: Wrong location for .debug_gdb_scripts on Windows Product: binutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: egonelbre at gmail dot com Target Milestone: --- While debugging go compilation issue (https://github.com/golang/go/issues/20183) we trace it to ld placing .debug_gdb_scripts to a wrong location for Windows. Easiest test-case: int main(int argc, char const *argv[]) { return 0; } __attribute__ ((section(".debug_gdb_scripts"))) char data[] = "debug.py"; > gcc -o example.exe example.c && example.exe Access Denied This also happens when you use any other random .debug_* section... e.g. int main(int argc, char const *argv[]) { return 0; } __attribute__ ((section(".debug_zzz"))) char data[] = "debug.py"; Suggestion from Ian Lance Taylor (https://github.com/golang/go/issues/20183#issuecomment-299167976): > The GNU linker source files that fail to list the .debug_gdb_scripts > section are ld/scripttempl/pe.sc and ld/scripttempl/pep.sc. > The best fix is to handle this case in gld_${EMULATION_NAME}_place_orphan > in ld/emultempl/pe.em and ld/emultempl/pep.em. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils