summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2011-04-04 16:59:46 +0000
committermarcel <marcel@FreeBSD.org>2011-04-04 16:59:46 +0000
commit8bd7372b191814d75834882aaf29b9218a0f46c9 (patch)
tree3e984c62d841c85b0a23a6cce644ac32aed9f058 /sys/boot/common
parentffdcd9464d252d66d03183fbdb6667c5cf0b3628 (diff)
downloadFreeBSD-src-8bd7372b191814d75834882aaf29b9218a0f46c9.zip
FreeBSD-src-8bd7372b191814d75834882aaf29b9218a0f46c9.tar.gz
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!)
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/common/module.c b/sys/boot/common/module.c
index 728992d..12ffe6e 100644
--- a/sys/boot/common/module.c
+++ b/sys/boot/common/module.c
@@ -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;
OpenPOWER on IntegriCloud