aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Carmody <ext-phil.2.carmody@nokia.com>2010-08-19 10:19:04 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-09-02 10:31:35 -0400
commit09e56a2d076c2afb2a1932ae4283e10ef2d26ef3 (patch)
treee09b4b469af8ebfac601520d81f98b1b274dda84
parente5f7772eec3ec342ecfe686ab8330ef538af134b (diff)
ARM: 6340/1: module - additional unwind tables for exit/devexit sections
Without these, exit functions cannot be stack-traced, so to speak. This implies that module unloads that perform allocations (don't laugh) will cause noisy warnings on the console when kmemleak is enabled, as it presumes that all code's call chains are traceable. Similarly, BUGs and WARN_ONs will give additional console spam. Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/include/asm/module.h2
-rw-r--r--arch/arm/kernel/module.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/include/asm/module.h b/arch/arm/include/asm/module.h
index 6dcff0f7f8d7..cbb0bc295d2b 100644
--- a/arch/arm/include/asm/module.h
+++ b/arch/arm/include/asm/module.h
@@ -17,6 +17,8 @@ enum {
17 ARM_SEC_INIT, 17 ARM_SEC_INIT,
18 ARM_SEC_DEVINIT, 18 ARM_SEC_DEVINIT,
19 ARM_SEC_CORE, 19 ARM_SEC_CORE,
20 ARM_SEC_EXIT,
21 ARM_SEC_DEVEXIT,
20 ARM_SEC_MAX, 22 ARM_SEC_MAX,
21}; 23};
22struct mod_arch_specific { 24struct mod_arch_specific {
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index 0aa622e84b24..d9bd786ce23d 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -80,12 +80,20 @@ int module_frob_arch_sections(Elf_Ehdr *hdr,
80 maps[ARM_SEC_DEVINIT].unw_sec = s; 80 maps[ARM_SEC_DEVINIT].unw_sec = s;
81 else if (strcmp(".ARM.exidx", secname) == 0) 81 else if (strcmp(".ARM.exidx", secname) == 0)
82 maps[ARM_SEC_CORE].unw_sec = s; 82 maps[ARM_SEC_CORE].unw_sec = s;
83 else if (strcmp(".ARM.exidx.exit.text", secname) == 0)
84 maps[ARM_SEC_EXIT].unw_sec = s;
85 else if (strcmp(".ARM.exidx.devexit.text", secname) == 0)
86 maps[ARM_SEC_DEVEXIT].unw_sec = s;
83 else if (strcmp(".init.text", secname) == 0) 87 else if (strcmp(".init.text", secname) == 0)
84 maps[ARM_SEC_INIT].sec_text = s; 88 maps[ARM_SEC_INIT].sec_text = s;
85 else if (strcmp(".devinit.text", secname) == 0) 89 else if (strcmp(".devinit.text", secname) == 0)
86 maps[ARM_SEC_DEVINIT].sec_text = s; 90 maps[ARM_SEC_DEVINIT].sec_text = s;
87 else if (strcmp(".text", secname) == 0) 91 else if (strcmp(".text", secname) == 0)
88 maps[ARM_SEC_CORE].sec_text = s; 92 maps[ARM_SEC_CORE].sec_text = s;
93 else if (strcmp(".exit.text", secname) == 0)
94 maps[ARM_SEC_EXIT].sec_text = s;
95 else if (strcmp(".devexit.text", secname) == 0)
96 maps[ARM_SEC_DEVEXIT].sec_text = s;
89 } 97 }
90#endif 98#endif
91 return 0; 99 return 0;