Skip to content

Commit

Permalink
ARM: module: ignore unwind for sections not marked SHF_ALLOC
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Dec 1, 2010
1 parent 8931360 commit 50005a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
for (s = sechdrs; s < sechdrs_end; s++) {
const char *secname = secstrs + s->sh_name;

if (!(s->sh_flags & SHF_ALLOC))
continue;

if (strcmp(".ARM.exidx.init.text", secname) == 0)
maps[ARM_SEC_INIT].unw_sec = s;
else if (strcmp(".ARM.exidx.devinit.text", secname) == 0)
Expand Down

0 comments on commit 50005a8

Please sign in to comment.