[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/21459] Wrong location for .debug_gdb_scripts on Windows

From: nickc at redhat dot com
Subject: [Bug ld/21459] Wrong location for .debug_gdb_scripts on Windows
Date: Wed, 10 May 2017 08:47:02 +0000


--- Comment #3 from Nick Clifton <nickc at redhat dot com> ---
Created attachment 10044
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10044&action=edit
Linker script fragment

Hi Egon,

> But, it does look like it's using new linker and doesn't create a valid 
> executable. Will investigate further.

Darn!  I assume that the problem is still the same - ie the .debug_gdb_scripts
section is still being placed at VMA 0 ?

> A quick question,

> Is there a workaround to coerce the unfixed ld to behave similarly via 
> command-line flags or some config script?

Actually, yes there is. :-)  Have a look at the attached linker script
It tells the linker exactly where it should place the .debug_gdb_scripts
section.  You can use this fragment to augment the already existing, built-in,
linker script by using this on your linker command line:

  -T debug.ld

or if you are using gcc or g++:


Now this fix will only work for the .debug_gdb_scripts section, but you can
easily edit the debug.ld file and add in other problematic sections as you

You may ask, "why not just add these sections to the built-in linker script ?".
 We could - but - that would only solve the problem for those specific
sections.  The patch that I created is intended to work for any .debug_xxx
section, regardless of its name.


You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]