aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/module.c')
-rw-r--r--arch/arm/kernel/module.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index 6fcf22cf385c..fee7c36349eb 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -283,12 +283,13 @@ static const Elf_Shdr *find_mod_section(const Elf32_Ehdr *hdr,
283 return NULL; 283 return NULL;
284} 284}
285 285
286extern void fixup_pv_table(const void *, unsigned long);
286extern void fixup_smp(const void *, unsigned long); 287extern void fixup_smp(const void *, unsigned long);
287 288
288int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, 289int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
289 struct module *mod) 290 struct module *mod)
290{ 291{
291 const Elf_Shdr * __maybe_unused s = NULL; 292 const Elf_Shdr *s = NULL;
292#ifdef CONFIG_ARM_UNWIND 293#ifdef CONFIG_ARM_UNWIND
293 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; 294 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
294 const Elf_Shdr *sechdrs_end = sechdrs + hdr->e_shnum; 295 const Elf_Shdr *sechdrs_end = sechdrs + hdr->e_shnum;
@@ -333,6 +334,11 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
333 maps[i].txt_sec->sh_addr, 334 maps[i].txt_sec->sh_addr,
334 maps[i].txt_sec->sh_size); 335 maps[i].txt_sec->sh_size);
335#endif 336#endif
337#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
338 s = find_mod_section(hdr, sechdrs, ".pv_table");
339 if (s)
340 fixup_pv_table((void *)s->sh_addr, s->sh_size);
341#endif
336 s = find_mod_section(hdr, sechdrs, ".alt.smp.init"); 342 s = find_mod_section(hdr, sechdrs, ".alt.smp.init");
337 if (s && !is_smp()) 343 if (s && !is_smp())
338 fixup_smp((void *)s->sh_addr, s->sh_size); 344 fixup_smp((void *)s->sh_addr, s->sh_size);