Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 7829/1: Add ".text.unlikely" and ".text.hot" to arm unwind tables

It appears that gcc may put some code in ".text.unlikely" or
".text.hot" sections. Right now those aren't accounted for in unwind
tables. Add them.

I found some docs about this at:
http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc.pdf

Without this, if you have slub_debug turned on, you can get messages
that look like this:
unwind: Index not found 7f008c50

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Douglas Anderson and committed by
Russell King
849b882b 6a7d2c62

+10
+2
arch/arm/include/asm/module.h
··· 12 12 ARM_SEC_CORE, 13 13 ARM_SEC_EXIT, 14 14 ARM_SEC_DEVEXIT, 15 + ARM_SEC_HOT, 16 + ARM_SEC_UNLIKELY, 15 17 ARM_SEC_MAX, 16 18 }; 17 19
+8
arch/arm/kernel/module.c
··· 292 292 maps[ARM_SEC_CORE].unw_sec = s; 293 293 else if (strcmp(".ARM.exidx.exit.text", secname) == 0) 294 294 maps[ARM_SEC_EXIT].unw_sec = s; 295 + else if (strcmp(".ARM.exidx.text.unlikely", secname) == 0) 296 + maps[ARM_SEC_UNLIKELY].unw_sec = s; 297 + else if (strcmp(".ARM.exidx.text.hot", secname) == 0) 298 + maps[ARM_SEC_HOT].unw_sec = s; 295 299 else if (strcmp(".init.text", secname) == 0) 296 300 maps[ARM_SEC_INIT].txt_sec = s; 297 301 else if (strcmp(".text", secname) == 0) 298 302 maps[ARM_SEC_CORE].txt_sec = s; 299 303 else if (strcmp(".exit.text", secname) == 0) 300 304 maps[ARM_SEC_EXIT].txt_sec = s; 305 + else if (strcmp(".text.unlikely", secname) == 0) 306 + maps[ARM_SEC_UNLIKELY].txt_sec = s; 307 + else if (strcmp(".text.hot", secname) == 0) 308 + maps[ARM_SEC_HOT].txt_sec = s; 301 309 } 302 310 303 311 for (i = 0; i < ARM_SEC_MAX; i++)