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.
I'm compelled to disable debug symbols...
-
Chris Giese
Re:I'm compelled to disable debug symbols...
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
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
-
Silverhawk
Re:I'm compelled to disable debug symbols...
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 ?
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 ?
- Pype.Clicker
- Member

- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:I'm compelled to disable debug symbols...
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" ...
However, my local nasm build doesn't seem to support anything else but "Null debug format" ...
- Pype.Clicker
- Member

- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:I'm compelled to disable debug symbols...
Funny enough, i got a book about linux kernel that presents "stabs" as being "nowadays" and "dwarf" as being "old days legacy".Chris Giese wrote: STABS is a debug format used in old versions of GCC. New versions of GCC use DWARF instead.
The actual debug format used by gcc 3.x is dwarf v2