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.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -884,7 +884,7 @@ static void check_section(const char *modname, struct elf_info *elf, · 883 unmodified lines | ||
| 884 | 884 | #define ALL_EXIT_SECTIONS EXIT_SECTIONS, ALL_XXXEXIT_SECTIONS |
| 885 | 885 | |
| 886 | 886 | #define DATA_SECTIONS ".data$", ".data.rel$" |
| 887 | −#define TEXT_SECTIONS ".text$" | |
| 887 | +#define TEXT_SECTIONS ".text$", ".text.unlikely$" | |
| 888 | 888 | |
| 889 | 889 | #define INIT_SECTIONS ".init.*" |
| 890 | 890 | #define CPU_INIT_SECTIONS ".cpuinit.*" |