mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
powerpc64/module elfv1: Set opd addresses after module relocation
module_frob_arch_sections() is called before the module is moved to its
final location. The function descriptor section addresses we are setting
here are thus invalid. Fix this by processing opd section during
module_finalize()
Fixes: 5633e85b2c
("powerpc64: Add .opd based function descriptor dereference")
Cc: stable@vger.kernel.org # v4.16
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
7cd01b08d3
commit
59fe7eaf35
2 changed files with 8 additions and 5 deletions
|
@ -74,6 +74,14 @@ int module_finalize(const Elf_Ehdr *hdr,
|
|||
(void *)sect->sh_addr + sect->sh_size);
|
||||
#endif /* CONFIG_PPC64 */
|
||||
|
||||
#ifdef PPC64_ELF_ABI_v1
|
||||
sect = find_section(hdr, sechdrs, ".opd");
|
||||
if (sect != NULL) {
|
||||
me->arch.start_opd = sect->sh_addr;
|
||||
me->arch.end_opd = sect->sh_addr + sect->sh_size;
|
||||
}
|
||||
#endif /* PPC64_ELF_ABI_v1 */
|
||||
|
||||
#ifdef CONFIG_PPC_BARRIER_NOSPEC
|
||||
sect = find_section(hdr, sechdrs, "__spec_barrier_fixup");
|
||||
if (sect != NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue