-
-
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
PageAlreadyMapped: Failed to load code #1400
Comments
What are the |
https://github.com/abrassel/phil-os is the exact source. |
Maybe try with the following target json file? {
"llvm-target": "x86_64-unknown-linux-gnu",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
"arch": "x86_64",
"target-endian": "little",
"target-pointer-width": "64",
"target-c-int-width": "32",
"os": "linux",
"executables": true,
"linker-flavor": "gcc",
"pre-link-args": ["-m64"],
"morestack": false
} This matches https://os.phil-opp.com/minimal-rust-kernel/#target-specification |
Interestingly, rustc complains about
|
I did this instead (dropping the -m64 flag) and adding a couple of other required fields:
now, the complaint is:
|
excellent, I permuted a bit more. I changed the linking flags, and got it working after I did the following:
|
I have the following program:
I run it with
and get the following error:
From looking around, it seems like this error is related to having two "main" functions. But I don't think that that is the case for me.
The text was updated successfully, but these errors were encountered: