Hi
I'd like to propose a small change: converting freeldr into a PE file.
The current freeldr / setupldr are raw binaries, which makes them easy to handle for the bootsector but it disqualifies them from proper debugging with gdb. A solution is to convert them into PE format. As there is no space to implement a real PE loader in the bootsector, the image must not use a .bss section, this can easily be done with a linker script. I have this working in my WC. With the result we can use gdb for debugging freeldr including symbols. The only thing still to solve is how to remove rsym data from the files, without stripping all symbols. Rsym data makes the file twice as big, too big to be loaded in to real mode memory.
Any objections / suggestions?
Regards, Timo
IIRC, there is currently some extra boot code prepended to the beginning of the FreeLoader binary to assist the bootsector on certain file systems. Does converting to PE format cause any problems for this?
-----Original Message----- From: ros-dev-bounces@reactos.org [mailto:ros-dev-bounces@reactos.org] On Behalf Of Timo Kreuzer Sent: Saturday, July 17, 2010 8:52 PM To: ReactOS Development List Subject: [ros-dev] freeldr as PE file
Hi
I'd like to propose a small change: converting freeldr into a PE file.
The current freeldr / setupldr are raw binaries, which makes them easy to handle for the bootsector but it disqualifies them from proper debugging with gdb. A solution is to convert them into PE format. As there is no space to implement a real PE loader in the bootsector, the image must not use a .bss section, this can easily be done with a linker script. I have this working in my WC. With the result we can use gdb for debugging freeldr including symbols. The only thing still to solve is how to remove rsym data from the files, without stripping all symbols. Rsym data makes the file twice as big, too big to be loaded in to real mode memory.
Any objections / suggestions?
Regards, Timo
_______________________________________________ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Brian Palmer schrieb:
IIRC, there is currently some extra boot code prepended to the beginning of the FreeLoader binary to assist the bootsector on certain file systems. Does converting to PE format cause any problems for this?
Yes, you are right, this might cause problems. I'll look into it. We probably need to replace the fathelper code at the beginning with an additional binary file.
IMO, it would be preferable not to have two separate filesystem files required for the bootsector to load in and boot with. My vote would be for the fat helper code to stay where it is, even at the expense of easier GDB debugging. Although, I was always content with the serial port output to debug FreeLoader. Of course, if GDB support could be enabled without making the boot code harder to manage, that would be great also.
-----Original Message----- From: ros-dev-bounces@reactos.org [mailto:ros-dev-bounces@reactos.org] On Behalf Of Timo Kreuzer Sent: Tuesday, July 20, 2010 1:30 PM To: ReactOS Development List Subject: Re: [ros-dev] freeldr as PE file
Brian Palmer schrieb:
IIRC, there is currently some extra boot code prepended to the beginning
of
the FreeLoader binary to assist the bootsector on certain file systems.
Does
converting to PE format cause any problems for this?
Yes, you are right, this might cause problems. I'll look into it. We probably need to replace the fathelper code at the beginning with an additional binary file.
_______________________________________________ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev