projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8931360
)
ARM: module: ignore unwind for sections not marked SHF_ALLOC
author
Russell King
<rmk+kernel@arm.linux.org.uk>
Fri, 12 Nov 2010 13:04:16 +0000
(13:04 +0000)
committer
Russell King
<rmk+kernel@arm.linux.org.uk>
Wed, 1 Dec 2010 10:23:05 +0000
(10:23 +0000)
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>
arch/arm/kernel/module.c
patch
|
blob
|
history
diff --git
a/arch/arm/kernel/module.c
b/arch/arm/kernel/module.c
index f9937c4b7d1ad289d17ef8749900d61a4ba23386..0c1bb68ff4a8449b5884949dc3498404532bb293 100644
(file)
--- a/
arch/arm/kernel/module.c
+++ b/
arch/arm/kernel/module.c
@@
-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)