From: Steven Rostedt Date: Wed, 13 Apr 2011 17:31:08 +0000 (-0400) Subject: ftrace/recordmcount: Modify only executable sections X-Git-Tag: upstream/snapshot3+hdmi~9607^2~39^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df2ccb69454d022ce99e3a3b7ee7f9fb4a4e9563;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ftrace/recordmcount: Modify only executable sections PROGBITS is not enough to determine if the section should be modified or not. Only process sections that are marked as executable. Cc: John Reiser Link: http://lkml.kernel.org/r/20110421023737.991485123@goodmis.org Signed-off-by: Steven Rostedt --- diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index ac7b330..7f8d5c4 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -360,6 +360,7 @@ __has_rel_mcount(Elf_Shdr const *const relhdr, /* is SHT_REL or SHT_RELA */ succeed_file(); } if (w(txthdr->sh_type) != SHT_PROGBITS || + !(w(txthdr->sh_flags) & SHF_EXECINSTR) || !is_mcounted_section_name(txtname)) return NULL; return txtname;