Skip to content

Commit 50005a8

Browse files
author
Russell King
committed
ARM: module: ignore unwind for sections not marked SHF_ALLOC
If a section is not marked with SHF_ALLOC, it will be discarded by the module code. Therefore, it is not correct to register the unwind tables. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 8931360 commit 50005a8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎arch/arm/kernel/module.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
290290
for (s = sechdrs; s < sechdrs_end; s++) {
291291
const char *secname = secstrs + s->sh_name;
292292

293+
if (!(s->sh_flags & SHF_ALLOC))
294+
continue;
295+
293296
if (strcmp(".ARM.exidx.init.text", secname) == 0)
294297
maps[ARM_SEC_INIT].unw_sec = s;
295298
else if (strcmp(".ARM.exidx.devinit.text", secname) == 0)

0 commit comments

Comments
 (0)