Next: Remaining issues, Previous: Dumping phase, Up: Dumping [Contents][Index]
The file is mmap’ed in memory (which ensures a PAGESIZE alignment, at least 4096), or if mmap is unavailable or fails, a 256-bytes aligned malloc is done and the file is loaded.
Some variables are reinitialized from the values found in the header.
The difference between the actual loading address and the reloc_address is computed and will be used for all the relocations.
The memory contents are restored in the obvious and trivial way.
The variables pointed to by pdump_root_struct_ptrs in the dump phase are reset to the right relocated object addresses.
All the objects are relocated using their description and their offset
by pdump_reloc_one
. This step is unnecessary if the
reloc_address is equal to the file loading address.
Same as Putting back the pdump_root_struct_ptrs.
Since some of the hash values in the lisp hash tables are
address-dependent, their layout is now wrong. So we go through each of
them and have them resorted by calling pdump_reorganize_hash_table
.