-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Consider switching to new x86_64-unknown-none
target
#1068
Comments
Stablised today in 1.58 |
Awesome! I'll try to switch the blog to it when I have some time. I think we are still having some problems with loading PIC code in the bootloader crate (rust-osdev/bootloader#206 (comment)), but this might be avoidable using |
I should note that I have tried using |
Why is |
@bjorn3 Really? I didn't know that. I assumed that it used PIE. No wonder my change to have it use PIE didn't work. As for it being ridiculous, I guess I look at it from a security standpoint: if the relocation model is static it means that once you know where the kernel has been loaded into memory, you instantly can determine where all the variables are and all that trivially. I didn't know that static was the relocation model that blog_os used though. PIC will be pretty nice to have, and same for ASLR once its added. |
Quick update: This will be part of the upcoming third edition. It is now even a Tier 2 target, which means that it's installable through |
Rust recently added a Tier-3
x86_64-unknown-none
target: rust-lang/rust#89062I believe it should be possible to use this target instead of the custom
x86_64-blog_os.json
target. It's designed to support bare-metal x86_64 code (like operating systems), and the target definition looks almost identical tox86_64-blog_os.json
. It should be possible to address any differences via-C
flags.The text was updated successfully, but these errors were encountered: