aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRafal Jaworowski <raj@FreeBSD.org>2009-11-26 22:35:26 +0000
committerRafal Jaworowski <raj@FreeBSD.org>2009-11-26 22:35:26 +0000
commit5e542944684b17f3c460d23bbe1da3077575da66 (patch)
tree2679d69cfacb2545a08501d651d80269d67890c2 /sys
parentc2a9d0a20ed4e5ab215d85e23fc29b3b6a5f14eb (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/boot/uboot/common/metadata.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/boot/uboot/common/metadata.c b/sys/boot/uboot/common/metadata.c
index 9c8ce94d4f3d..e5f4b04c37bf 100644
--- a/sys/boot/uboot/common/metadata.c
+++ b/sys/boot/uboot/common/metadata.c
@@ -231,6 +231,7 @@ md_copymodules(vm_offset_t addr)
struct preloaded_file *fp;
struct file_metadata *md;
int c;
+ vm_offset_t a;
c = addr != 0;
/* start with the first module on the list, should be the kernel */
@@ -240,7 +241,8 @@ md_copymodules(vm_offset_t addr)
MOD_TYPE(addr, fp->f_type, c);
if (fp->f_args)
MOD_ARGS(addr, fp->f_args, c);
- MOD_ADDR(addr, fp->f_addr, c);
+ a = fp->f_addr - __elfN(relocation_offset);
+ MOD_ADDR(addr, a, c);
MOD_SIZE(addr, fp->f_size, c);
for (md = fp->f_metadata; md != NULL; md = md->md_next) {
if (!(md->md_type & MODINFOMD_NOCOPY))