diff options
author | Steven Rostedt | 2011-04-13 19:31:08 +0200 |
---|---|---|
committer | Steven Rostedt | 2011-05-17 16:41:39 +0200 |
commit | df2ccb69454d022ce99e3a3b7ee7f9fb4a4e9563 (patch) | |
tree | 8a8e3bc13025ee904ae64413c3c12aad961d440c | |
parent | ftrace: Add .kprobe.text section to whitelist for recordmcount.c (diff) | |
download | kernel-qcow2-linux-df2ccb69454d022ce99e3a3b7ee7f9fb4a4e9563.tar.gz kernel-qcow2-linux-df2ccb69454d022ce99e3a3b7ee7f9fb4a4e9563.tar.xz kernel-qcow2-linux-df2ccb69454d022ce99e3a3b7ee7f9fb4a4e9563.zip |
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 <jreiser@bitwagon.com>
Link: http://lkml.kernel.org/r/20110421023737.991485123@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | scripts/recordmcount.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index ac7b3303cb31..7f8d5c4c780f 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; |