Skip to content

Commit 06df44e

Browse files
trinirustyrussell
authored andcommitted
modpost.c: Add .text.unlikely to TEXT_SECTIONS
gcc's places cold functions into the .text.unlikely section and we need to check this section as well for section mismatches otherwise we may have false negatives for this test. Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-kernel@vger.kernel.org Cc: linux-kbuild@vger.kernel.org Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (wording update)
1 parent d5fe85a commit 06df44e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/mod/modpost.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ static void check_section(const char *modname, struct elf_info *elf,
884884
#define ALL_EXIT_SECTIONS EXIT_SECTIONS, ALL_XXXEXIT_SECTIONS
885885

886886
#define DATA_SECTIONS ".data$", ".data.rel$"
887-
#define TEXT_SECTIONS ".text$"
887+
#define TEXT_SECTIONS ".text$", ".text.unlikely$"
888888

889889
#define INIT_SECTIONS ".init.*"
890890
#define CPU_INIT_SECTIONS ".cpuinit.*"

0 commit comments

Comments
 (0)