Rust ELF executable appears to not be 'executable' type
Posted: Fri Nov 25, 2022 2:59 pm
What I mean by "Rust ELF executable appears to not be 'executable' type" is that the executable
produced by the Rust compiler (with settings following https://os.phil-opp.com/) has ELF header position 16-17
(one u16, not two numbers) set to zero. (I have checked this by both looking at the file in a hex editor and via seeing what my bootloader does with it)
This does not appear to be a valid value for that field, as per https://wiki.osdev.org/ELF#Header. The only valid value for my bootloader
to accept the kernel as valid is 2, which marks the ELF file as being 'executable type'. I have honestly no idea why this is the case.
Here's my repo, keep in mind I have modified the result of the first few posts (as in, the first few posts of the "Writing an OS in Rust" blog previously mentioned)
by grafting the resulting Rust executable onto an existing bootloader that did somewhat work with a C-based kernel. (For UEFI compatibility)
https://github.com/ThatCodingGuy86/MimosaOS
produced by the Rust compiler (with settings following https://os.phil-opp.com/) has ELF header position 16-17
(one u16, not two numbers) set to zero. (I have checked this by both looking at the file in a hex editor and via seeing what my bootloader does with it)
This does not appear to be a valid value for that field, as per https://wiki.osdev.org/ELF#Header. The only valid value for my bootloader
to accept the kernel as valid is 2, which marks the ELF file as being 'executable type'. I have honestly no idea why this is the case.
Here's my repo, keep in mind I have modified the result of the first few posts (as in, the first few posts of the "Writing an OS in Rust" blog previously mentioned)
by grafting the resulting Rust executable onto an existing bootloader that did somewhat work with a C-based kernel. (For UEFI compatibility)
https://github.com/ThatCodingGuy86/MimosaOS