diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-11-12 08:04:16 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-01 05:23:05 -0500 |
commit | 50005a8deb38e5e6456ebd94e57adb321d4589de (patch) | |
tree | 22a45e6e598848aeb1d930bfb0bc13bd974bf85c /arch/arm/kernel | |
parent | 8931360eb9c6ec8bd30efef579cef81917a2fcf3 (diff) |
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>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/module.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index f9937c4b7d1..0c1bb68ff4a 100644 --- 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, | |||
290 | for (s = sechdrs; s < sechdrs_end; s++) { | 290 | for (s = sechdrs; s < sechdrs_end; s++) { |
291 | const char *secname = secstrs + s->sh_name; | 291 | const char *secname = secstrs + s->sh_name; |
292 | 292 | ||
293 | if (!(s->sh_flags & SHF_ALLOC)) | ||
294 | continue; | ||
295 | |||
293 | if (strcmp(".ARM.exidx.init.text", secname) == 0) | 296 | if (strcmp(".ARM.exidx.init.text", secname) == 0) |
294 | maps[ARM_SEC_INIT].unw_sec = s; | 297 | maps[ARM_SEC_INIT].unw_sec = s; |
295 | else if (strcmp(".ARM.exidx.devinit.text", secname) == 0) | 298 | else if (strcmp(".ARM.exidx.devinit.text", secname) == 0) |