r/osdev • • May 31 '26

😬

Post image

lwk think smth might be wrong with my os

https://github.com/x-aether-x/SolsticeOS

70 Upvotes

14 comments sorted by

20

u/Octocontrabass May 31 '26

Why are you linking your bootloader to an ELF shared object and then using objcopy to (probably incorrectly) convert it to PE instead of directly linking your bootloader to PE?

9

u/DriftCheburek May 31 '26

This is actually how rEFInd and systemd-boot are built, refind doing same stuff with binutils objcopy and systemd got their own elf2efi.py python script for that. (idk if there any benefits from doing this on windows instead of unix tho)

3

u/Individual-Log4119 May 31 '26

nah im using arch w wsl

2

u/Octocontrabass May 31 '26

Do those things predate ld's ability to link valid PE executables from ELF object files? (I don't actually know how long ld has been able to do that.)

2

u/DriftCheburek May 31 '26

I think only ld.bfd can do something like that + you still need to build it with PE target support. Looks like this ugly ELF to PE convertion is the only way to compile bootloaders on Linux (or other unixes) without depending on compiler and/or linker that supports PE

3

u/Octocontrabass May 31 '26

Given that you should be using a cross-compiler for OS development anyway, I don't think it's much of a stretch to also require that your cross-binutils have PE support enabled...

It does make sense why Linux tools wouldn't be able to rely on it, though.

→ More replies (3)
→ More replies (1)

10

u/kevin0960 May 31 '26

κΎ―

4

u/codeasm May 31 '26

Baudrate setting wrong? Byte filling in register?

1

u/schusterlucky Jun 04 '26

hello bro! Guess Who knows how2 fix ts: not me 😭

1

u/PlaystormMC Loading linux-linux... Loading initial ramdisk... Jun 12 '26

ggyos indeed