]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Remove recursion between recordmcount and scripts/mod/empty
authorSteven Rostedt <srostedt@redhat.com>
Mon, 18 Oct 2010 18:42:00 +0000 (14:42 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 18 Oct 2010 21:08:10 +0000 (17:08 -0400)
commit8490631e8a64411373532f5c6b5c3f137fd4be40
tree5c8e6fbe25157136cab42ca0fa6f03b065cbbb69
parent194d685c78c4cb6fcdfeb256ca81c2f194e102b5
ftrace: Remove recursion between recordmcount and scripts/mod/empty

When DYNAMIC_FTRACE is enabled and we use the C version of recordmcount,
all objects are run through the recordmcount program to create a
separate section that stores all the callers of mcount.

The build process has a special file: scripts/mod/empty.o. This is
built from empty.c which is literally an empty file (except for a
single comment). This file is used to find information about the target
elf format, like endianness and word size.

The problem comes up when we need to build recordmcount. The
build process requires that empty.o is built first. The build rules
for empty.o will try to execute recordmcount on the empty.o file.
We get an error that recordmcount does not exist.

To avoid this recursion, the build file will skip running recordmcount
if the file that it is building is script/mod/empty.o.

[ extra comment Suggested-by: Sam Ravnborg <sam@ravnborg.org> ]

Reported-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
scripts/Makefile.build