Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/arch/i386/i386

Module Name:    src
Committed By:   gsutre
Date:           Tue Jan 11 12:24:38 UTC 2011

Modified Files:
        src/sys/arch/i386/i386: multiboot.c

Log Message:
As said in the comment (lines 327-336), we must make sure that
we don't overwrite valid data when moving the symbol and string

Assume for instance that the boot-loader left us with:

  +--------------+   +--------+     +--------------+
  | string table |   | kernel |     | symbol table |
  +--------------+   +--------+     +--------------+

The new addresses computed by lines 338-359 (here, it's really
lines 344-345) will move the tables so that they end up as:

                     | kernel | symbol table | string table |

The current version (rev. 1.20) will, however, first copy the
string table and then the symbol table.  But the copy of the
string table will overwrite the symbol table (see the pictures).

The old code (rev. 1.19) uses the right order of table copy to
make sure that we don't overwrite one table when moving the
other.  Here, we simply restore this behavior.  This makes
multibooting from GRUB2 work again (for MONOLITHIC).

ok jmcneill@

To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/i386/i386/multiboot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index