-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add -fno-PIC flag in Makefile. #22
Conversation
Thank you! |
Some of my classmates do have this problem... |
I have encoutered this problem. I tested gcc6.4.1 and gcc7+ with -Q -v flags, and found that -fPIC is a default option for gcc7+, while gcc6- DOES NOT set it to default. |
ping |
禁用位置无关代码也有助于减小代码体积。如果不开启的话,在较新版本的 gcc 中,bootloader 的体积很容易就会超过 512 字节导致无法生成扇区 |
Conclusions:
|
@Csomnia Thank you! I merged your PR. |
目前问题:内核线程栈上切页表会崩;用户线程 2M 堆栈时中间有一个页无法访问
hello_world 如果最后是 loop{} 运行一段时间后会玄学挂掉
Resolve "lab6" Closes #22 See merge request os20-rcore-tutorial/rcore-tutorial!18
When I compile with newer version gcc, I find that the code is position-indepent, it makes kernel can't work properly in qemu. To solve this, add -fno-PIC in Makefile force gcc to generate absolute code.