Fix a long standing bug where file_load() passes down the global loadaddr

to the l_load() method in the file_formats structure, while being passed
an address as an argument (dest). With file_load() calling arch_loadaddr()
now, this bug is a little bit more significant.

Spotted by: nyan@ (nice catch!)
This commit is contained in:
marcel 2011-04-04 16:59:46 +00:00
parent ffdcd9464d
commit 8bd7372b19

View File

@ -280,7 +280,7 @@ file_load(char *filename, vm_offset_t dest, struct preloaded_file **result)
error = EFTYPE;
for (i = 0, fp = NULL; file_formats[i] && fp == NULL; i++) {
error = (file_formats[i]->l_load)(filename, loadaddr, &fp);
error = (file_formats[i]->l_load)(filename, dest, &fp);
if (error == 0) {
fp->f_loader = i; /* remember the loader */
*result = fp;