David Daney 2e885057b7 recordmcount: Fix handling of elf64 big-endian objects.
In ELF64, the sh_flags field is 64-bits wide.  recordmcount was
erroneously treating it as a 32-bit wide field.  For little endian
objects this works because the flags of interest (SHF_EXECINSTR)
reside in the lower 32 bits of the word, and you get the same result
with either a 32-bit or 64-bit read.  Big endian objects on the
other hand do not work at all with this error.

The fix:  Correctly treat sh_flags as 64-bits wide in elf64 objects.

The symptom I observed was that my
__start_mcount_loc..__stop_mcount_loc was empty even though ftrace
function tracing was enabled.

Link: http://lkml.kernel.org/r/1324345362-12230-1-git-send-email-ddaney.cavm@gmail.com

Cc: stable@kernel.org # 3.0+
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-01-06 17:06:42 -05:00
..
2011-09-09 11:45:47 +02:00
2011-06-09 14:04:47 -04:00
2005-04-16 15:20:36 -07:00
2011-03-31 11:26:23 -03:00
2011-05-19 15:59:38 -07:00
2005-04-16 15:20:36 -07:00
2010-10-28 00:32:23 +02:00
2008-07-25 22:12:41 +02:00
2011-06-16 20:40:03 +02:00
2011-08-31 16:12:17 +02:00
2009-06-09 22:37:54 +02:00
2010-03-23 12:26:38 +01:00
2011-06-09 14:04:38 -04:00
2011-03-31 11:26:23 -03:00
2008-04-25 20:18:48 +02:00
2005-04-16 15:20:36 -07:00
2009-06-09 22:37:54 +02:00