projects
/
platform
/
kernel
/
linux-3.10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f087e7
)
ftrace/recordmcount: Modify only executable sections
author
Steven Rostedt
<srostedt@redhat.com>
Wed, 13 Apr 2011 17:31:08 +0000
(13:31 -0400)
committer
Steven Rostedt
<rostedt@goodmis.org>
Mon, 16 May 2011 18:42:56 +0000
(14:42 -0400)
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>
scripts/recordmcount.h
patch
|
blob
|
history
diff --git
a/scripts/recordmcount.h
b/scripts/recordmcount.h
index
ac7b330
..
7f8d5c4
100644
(file)
--- 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;