Skip to content

Commit 849b882

Browse files
diandersRussell King
authored andcommitted
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>
1 parent 6a7d2c6 commit 849b882

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

arch/arm/include/asm/module.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ enum {
1212
ARM_SEC_CORE,
1313
ARM_SEC_EXIT,
1414
ARM_SEC_DEVEXIT,
15+
ARM_SEC_HOT,
16+
ARM_SEC_UNLIKELY,
1517
ARM_SEC_MAX,
1618
};
1719

arch/arm/kernel/module.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,20 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
292292
maps[ARM_SEC_CORE].unw_sec = s;
293293
else if (strcmp(".ARM.exidx.exit.text", secname) == 0)
294294
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;
295299
else if (strcmp(".init.text", secname) == 0)
296300
maps[ARM_SEC_INIT].txt_sec = s;
297301
else if (strcmp(".text", secname) == 0)
298302
maps[ARM_SEC_CORE].txt_sec = s;
299303
else if (strcmp(".exit.text", secname) == 0)
300304
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;
301309
}
302310

303311
for (i = 0; i < ARM_SEC_MAX; i++)

0 commit comments

Comments
 (0)