UEFI Print(%s) writes weird characters
Posted: Wed Apr 12, 2023 5:40 pm
I don't know why suddenly when I tried to add DLL Loading to my bootloader, Some weird stuff started to happen, first when I loaded one function from one DLL it worked fine but as soon as I added another function the bootloader does no longer work (and the loading code is copied from the previous os which was successful in loading relocatable importing and exporting pe images).
Print() prints some weird stuff when adding an ASCII String Argument "%s" even on the serial.log.
The Kernel "/src/nos" imports "syscruntime.lib" which is the kernel mode version of my cruntime library (basicly its exactly the same as cruntime.lib but compiled with /SUBSYSTEM:native
I don't see anything wrong in the loader "/src/boot/efi/amd64/load.c"
However even if I try to print a string at the start of UefiEntry to same weird thing happens, but if I use a unicode string "%ls" it works fine.
Libraries code is at "/lib/"
project NewOS : https://github.com/NXTdevosc1/New-Operating-System
Although the bootloader gets extremely larger each time I add a function, now it is at 183KB, I don't think it needs to be more then 25KB
Print() prints some weird stuff when adding an ASCII String Argument "%s" even on the serial.log.
The Kernel "/src/nos" imports "syscruntime.lib" which is the kernel mode version of my cruntime library (basicly its exactly the same as cruntime.lib but compiled with /SUBSYSTEM:native
I don't see anything wrong in the loader "/src/boot/efi/amd64/load.c"
However even if I try to print a string at the start of UefiEntry to same weird thing happens, but if I use a unicode string "%ls" it works fine.
Libraries code is at "/lib/"
project NewOS : https://github.com/NXTdevosc1/New-Operating-System
Although the bootloader gets extremely larger each time I add a function, now it is at 183KB, I don't think it needs to be more then 25KB