Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/arch/i386/i386
On 01/12/2011 05:09 AM, enami tsugutomo wrote:
=?UTF-8?B?R3LDqWdvaXJlIFN1dHJl?=<gsutre%NetBSD.org@localhost> writes:
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 |
+--------+--------------+--------------+
If this ascii art is correct, memmove should be used instead of
memcpy.
Agreed. I should have mentioned it in the commit message. Here,
I just wanted to restore previous (working) behavior.
Note that the figure is just an example: afaik, no assumption can
be made regarding the placement of the tables.
Also, if initial order is kernel, string table, symbol table
and a gap between kernel and string table is smaller than symbol
table, copying it may overwrite the string table.
Is there any guarantee that the gap is large enough?
The code (that was already there) takes care of this by examining
all possible cases. If initial order is kernel, string table,
symbol table, then the order remains the same.
Grégoire
Home |
Main Index |
Thread Index |
Old Index