diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2011-04-13 13:31:08 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2011-05-16 14:42:56 -0400 |
| commit | 8abd5724a7f1631ab2276954156c629d4d17149a (patch) | |
| tree | 1253dfc237bfe6e295fedf4fc2c568e35b436430 | |
| parent | 9f087e7612115b7a201d4f3392a95ac7408948ab (diff) | |
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 */ | |||
| 360 | succeed_file(); | 360 | succeed_file(); |
| 361 | } | 361 | } |
| 362 | if (w(txthdr->sh_type) != SHT_PROGBITS || | 362 | if (w(txthdr->sh_type) != SHT_PROGBITS || |
| 363 | !(w(txthdr->sh_flags) & SHF_EXECINSTR) || | ||
| 363 | !is_mcounted_section_name(txtname)) | 364 | !is_mcounted_section_name(txtname)) |
| 364 | return NULL; | 365 | return NULL; |
| 365 | return txtname; | 366 | return txtname; |
