On Wed, Jul 15, 2009 at 5:33 PM, Pavel Roskin<pro...@gnu.org> wrote: > On Tue, 2009-07-14 at 21:00 -0400, Pavel Roskin wrote: >> ChangeLog: >> >> * boot/i386/pc/boot.S: Declare 0x0-0x7c00 as a discardable .bss >> segment. Eliminate ABS, rely on the assembler knowing correct >> addresses. Eliminate .bss segment for the kernel, use direct >> jump to the kernel address. > > I managed to install a Darwin cross-compiler, and it turn out it won't > accept .bss in assembler files. Using real addresses would be very, > very nice, but we'll need to find a portable way. Maybe grub-macho2img > should be taught to cut away sections filled with zeroes. > AFAIR during compilation process relocation entries are preserved and resolved only in the last step. Now thinking it should work even without .bss. Anyway don't care much about compiling bootsectors under darwin. Apple's CC generates longer opcodes which breaks bootsectors. Untill someone finds a fix darwin users will have to use bootsectors compiled under linux. It's not a huge problem since very few developpers need to modify boot sector > So patches 5 and 7 are dropped for now. Patches 1-4 and 6 have been > applied. Installation on FAT32 is safe now. The "Hard Disk" message > has been preserved, so it can be shortened later if the real need > arises. > > That said, using direct jump to 0x8000 would save 3 bytes Unfortunately BIOSes loading at 7c0:0 exist > and then we > can save 2 bytes by taking an unconditional jump from the "disk check" > code and reverting the logic. I don't understand what part of code you mean but as long if it's just revertion of a logic to do the same then it's fine with me > And maybe we could save 1 byte by yanking > "cli" as writing to %ss disables interrupts until the next instruction. I pefer to keep cli because alternative i386 implementations may have bug with it > > While testing the patches in qemu, I've seen some error messages and > found that they should be followed by a new line, as qemu adds its own > error message. > > -- > Regards, > Pavel Roskin > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel >
-- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel