diff -r -u grub-0.92/stage2/boot.c grub-0.92-1/stage2/boot.c --- grub-0.92/stage2/boot.c Mon Apr 29 21:47:14 2002 +++ grub-0.92-1/stage2/boot.c Tue May 14 22:34:31 2002 @@ -141,8 +141,12 @@ cur_addr = pu.mb->load_addr; /* first offset into file */ grub_seek (i - (pu.mb->header_addr - cur_addr)); + if (!pu.mb->load_end_addr) + pu.mb->load_end_addr = cur_addr + filemax; text_len = pu.mb->load_end_addr - cur_addr; data_len = 0; + if (!pu.mb->bss_end_addr) + pu.mb->bss_end_addr = pu.mb->load_end_addr; bss_len = pu.mb->bss_end_addr - pu.mb->load_end_addr; if (pu.mb->header_addr < pu.mb->load_addr diff -r -u grub-0.92/util/mbchk.c grub-0.92-1/util/mbchk.c --- grub-0.92/util/mbchk.c Tue Dec 11 09:49:17 2001 +++ grub-0.92-1/util/mbchk.c Tue May 14 21:55:43 2002 @@ -126,7 +126,7 @@ return 0; } - if (mbh->load_addr >= mbh->load_end_addr) + if (mbh->load_end_addr && mbh->load_addr >= mbh->load_end_addr) { fprintf (stderr, "%s: load_addr is not less than load_end_addr" @@ -153,7 +153,7 @@ return 0; } - if (mbh->load_end_addr <= mbh->entry_addr) + if (mbh->load_end_addr && mbh->load_end_addr <= mbh->entry_addr) { fprintf (stderr, "%s: load_end_addr is not less than entry_addr" diff -r -u grub-0.92/docs/multiboot.texi grub-0.92-1/docs/multiboot.texi --- grub-0.92/docs/multiboot.texi Fri Mar 2 22:42:36 2001 +++ grub-0.92-1/docs/multiboot.texi Wed May 15 11:52:53 2002 @@ -467,12 +467,15 @@ segment. (load_end_addr - load_addr) specifies how much data to load. This implies that the text and data segments must be consecutive in the OS image; this is true for existing a.out executable formats. +If this field is zero, the boot loader assumes that text and data +segments occupy the whole OS image file. @item bss_end_addr Contains the physical address of the end of the bss segment. The boot loader initializes this area to zero, and reserves the memory it occupies to avoid placing boot modules and other data relevant to the -operating system in that area. +operating system in that area. This value may be set to zero, it means +that there is no BSS segment present. @item entry_addr The physical address to which the boot loader should jump in order to