Page 1 of 1
I'm compelled to disable debug symbols...
Posted: Sat Apr 16, 2005 9:11 am
by Silverhawk
Hi guys,
I'm in front of a problem concerning the debug informations in my kernel binary...
If I do not use the -S option while I link my kernel, it provoques an error :
ld: bootstrap/jumpToKernel.o(.stab+0x0): entr?e des talons a une cha?ne index invalide
It's a little bit bothering in order to debug...
What is "stab" ?
How to correct this problem ?
Thanks.
Re:I'm compelled to disable debug symbols...
Posted: Sat Apr 16, 2005 8:26 pm
by Chris Giese
STABS is a debug format used in old versions of GCC. New versions of GCC use DWARF instead.
If leaving STABS debug information in the kernel causes problems, you might need to add these statements to the linker script:
.stab : { *(.stab) }
.stabstr : { *(.stabstr) }
http://my.execpc.com/~geezer/osd/code/krnl1m.ld
Re:I'm compelled to disable debug symbols...
Posted: Sun Apr 17, 2005 4:56 am
by Silverhawk
Thanks Chris,
I've tried what you said : it didn't work...
Always the same error.
So, I've tried to suppress debug info generated by nasm (stop using -g option with nasm), and to keep debug info generated by gcc.
The link is now possible ! It works fine !
Is there anybody who has noticed this fact ?
Re:I'm compelled to disable debug symbols...
Posted: Mon Apr 18, 2005 2:58 am
by Pype.Clicker
iirc, you can select the debug format to be used by nasm (with -F; it has at least a list of available formats using "nasm -f elf/coff -y").
However, my local nasm build doesn't seem to support anything else but "Null debug format" ...
Re:I'm compelled to disable debug symbols...
Posted: Tue Apr 19, 2005 9:01 am
by Pype.Clicker
Chris Giese wrote:
STABS is a debug format used in old versions of GCC. New versions of GCC use DWARF instead.
Funny enough, i got a book about linux kernel that presents "stabs" as being "nowadays" and "dwarf" as being "old days legacy".
The actual debug format used by gcc 3.x is dwarf v2
