[Bug debug/14977] -gstabs+ breaks AMD 64-bit linking

ian at wasabisystems dot com gcc-bugzilla@gcc.gnu.org
Thu Apr 22 17:20:00 GMT 2004


------- Additional Comments From ian at wasabisystems dot com  2004-04-22 17:07 -------
There is a real bug here, though I don't think the compiler can be described as
responsible.  The compiler generates lines like
        .stabs  "ispacez:V(0,54)=ar(0,28);1;2;(0,28)",40,0,12,spacez_
For this line, the assembler generates a relocation against spacez_.  This
relocation is always a four byte relocation.  The linker script arranges for
spacez_ to be at an address which can not be referenced by a four byte relocation.

Fixing this would require changing the assembler to generate an eight byte
relocation.  Of course, this would break the debugger, which only expects to see
a four byte value.

Most people just recommend using DWARF instead.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14977



More information about the Gcc-bugs mailing list