bootloader icon indicating copy to clipboard operation
bootloader copied to clipboard

[Question] How do you make the MBR not have ELF headers?

Open david4r4 opened this issue 2 years ago • 1 comments

Hi, First I just want to say this is a great project and thanks for putting this out here. I have a question regarding the BIOS bootloader. If I am undestanding properly, the BIOS bootloader is a unique ELF mixing Rust and assembly code, split into 4 stages. I wonder how you do to make Rust (or the LLVM backend inside it) not to generate ELF headers at the beginning of the file, so MBR code is first. I appreciate the help in advance.

david4r4 avatar Oct 18 '22 16:10 david4r4

Llvm obj-copy is used to transform the elf file corresponding to the mbr bootsector into a binary file, which has no headers

JarlEvanson avatar Feb 25 '23 16:02 JarlEvanson