[PATCH 3/4] module: add section-size to move_module pr_debug

From: Jim Cromie
Date: Thu May 06 2021 - 00:01:49 EST


move_module() prints "Final section addresses for $modname".
So lets add those section addresses to the pr_debug(section name)s.

Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
---
kernel/module.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index ab16b8da2555..c3333b45d812 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3393,8 +3393,8 @@ static int move_module(struct module *mod, struct load_info *info)
memcpy(dest, (void *)shdr->sh_addr, shdr->sh_size);
/* Update sh_addr to point to copy in image. */
shdr->sh_addr = (unsigned long)dest;
- pr_debug("\t0x%lx %s\n",
- (long)shdr->sh_addr, info->secstrings + shdr->sh_name);
+ pr_debug("\t0x%lx 0x%.8lx %s\n", (long)shdr->sh_addr,
+ (long)shdr->sh_size, info->secstrings + shdr->sh_name);
}

return 0;
--
2.30.2