James Molloy's Tutorial Known Bugs: Difference between revisions

Jump to navigation Jump to search
Undo revision 18151 by 0fb1d8 (talk) - You misunderstood the purpose of libgcc
[unchecked revision][unchecked revision]
(Even I don't link my kernel against libgcc. Libgcc should only be used for user-mode applications. Or else, you are "gnu-ing" your kernel. James Molloy shouldn't be criticized for this.)
(Undo revision 18151 by 0fb1d8 (talk) - You misunderstood the purpose of libgcc)
Line 18:
 
The tutorial recommends using these compilation options <tt>-nostdlib -nostdinc -fno-builtin -fno-stack-protector</tt>, but this is not the recommended practice. The tutorial neglects to pass the important <tt>-ffreestanding</tt> option. See [[Bare Bones]] on how to correctly compile C kernel files and how to correctly link the kernel.
 
== Problem: Not using libgcc ==
 
{{Main|libgcc}}
 
The tutorial disables libc and [[libgcc]] through the <tt>-nodefaultlibs</tt> option (implied by <tt>-nostdlib</tt>) but neglects to add back libgcc during the link.
 
== Problem: Not setting a stack ==
1,490

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu