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
[Linux][Compiler] Compilation fails with -no-runtime
flag
#2906
Comments
|
The supplied program though named Hello.red was in fact a Red/System program. Should there be either a special target for such programs (e.g. -t em-i386, -t em-ARMel) or the --no-runtime option require a processor argument (e.g. --no-runtime i386, --no-runtime ARMhf)? |
For generating runnable binaries using |
Guys, the code above is an attempt to produce an object (or just flat) file to link it later into a boot loader. I didn't understand from your comments if it is possible at the moment. It wasn't intended to be runnable by itself. |
Okay, I got confused by the On Windows, it compiles fine. Let me investigate why it fails on Linux. |
Ok, it should compile fine now. @sam-baravy Let me give you some extra info about that feature:
I haven't compiled a Linux kernel since 20 years, so I don't recall the image format, so I'm not sure you'll be able to use the currently emitted ELF file to make a bootable code from it. In any case, I suggest you add some extra compilation options (just guessing you'll need them):
Here is how you can do set that from the header (passing those options on command-line is currently broken):
The generated code layout looks like this. As you can see, the PIC mode is used, but initialization code for |
@dockimbel Thank you for the fix and information. IMO, the issue is resolved. Right now I'm doing some low-level programming in Red/System. Just for fun and as a proof of concept. I'll try to not steal too much your time, but come back with new bugs if they arise. Waiting for the second fix you mentioned. |
The PIC mode is now correctly initialized. @sam-baravy Keep us informed of your progress on that (preferrably on our Gitter main chat room), I don't have much time to allocate for such features, but if it doesn't cost too much time, I'll be glad to enable generating bootable code/images using Red/System code. ;-) Cheers! |
The text was updated successfully, but these errors were encountered: