Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df2ccb69 authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt
Browse files

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: default avatarSteven Rostedt <rostedt@goodmis.org>
parent bde66c3f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;