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>
This commit is contained in:
parent
e5f7772eec
commit
09e56a2d07
2 changed files with 10 additions and 0 deletions
|
@ -17,6 +17,8 @@ enum {
|
||||||
ARM_SEC_INIT,
|
ARM_SEC_INIT,
|
||||||
ARM_SEC_DEVINIT,
|
ARM_SEC_DEVINIT,
|
||||||
ARM_SEC_CORE,
|
ARM_SEC_CORE,
|
||||||
|
ARM_SEC_EXIT,
|
||||||
|
ARM_SEC_DEVEXIT,
|
||||||
ARM_SEC_MAX,
|
ARM_SEC_MAX,
|
||||||
};
|
};
|
||||||
struct mod_arch_specific {
|
struct mod_arch_specific {
|
||||||
|
|
|
@ -80,12 +80,20 @@ int module_frob_arch_sections(Elf_Ehdr *hdr,
|
||||||
maps[ARM_SEC_DEVINIT].unw_sec = s;
|
maps[ARM_SEC_DEVINIT].unw_sec = s;
|
||||||
else if (strcmp(".ARM.exidx", secname) == 0)
|
else if (strcmp(".ARM.exidx", secname) == 0)
|
||||||
maps[ARM_SEC_CORE].unw_sec = s;
|
maps[ARM_SEC_CORE].unw_sec = s;
|
||||||
|
else if (strcmp(".ARM.exidx.exit.text", secname) == 0)
|
||||||
|
maps[ARM_SEC_EXIT].unw_sec = s;
|
||||||
|
else if (strcmp(".ARM.exidx.devexit.text", secname) == 0)
|
||||||
|
maps[ARM_SEC_DEVEXIT].unw_sec = s;
|
||||||
else if (strcmp(".init.text", secname) == 0)
|
else if (strcmp(".init.text", secname) == 0)
|
||||||
maps[ARM_SEC_INIT].sec_text = s;
|
maps[ARM_SEC_INIT].sec_text = s;
|
||||||
else if (strcmp(".devinit.text", secname) == 0)
|
else if (strcmp(".devinit.text", secname) == 0)
|
||||||
maps[ARM_SEC_DEVINIT].sec_text = s;
|
maps[ARM_SEC_DEVINIT].sec_text = s;
|
||||||
else if (strcmp(".text", secname) == 0)
|
else if (strcmp(".text", secname) == 0)
|
||||||
maps[ARM_SEC_CORE].sec_text = s;
|
maps[ARM_SEC_CORE].sec_text = s;
|
||||||
|
else if (strcmp(".exit.text", secname) == 0)
|
||||||
|
maps[ARM_SEC_EXIT].sec_text = s;
|
||||||
|
else if (strcmp(".devexit.text", secname) == 0)
|
||||||
|
maps[ARM_SEC_DEVEXIT].sec_text = s;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue