Re: [PATCH 3/4] gcov: add gcov profiling infrastructure

From: Peter Oberparleiter
Date: Fri May 22 2009 - 04:55:57 EST


Ingo Molnar wrote:
* Peter Oberparleiter <oberpar@xxxxxxxxxxxxxxxxxx> wrote:

+int __gcov_execve(const char *path, char *const argv[], char *const envp[])
+{
+ return kernel_execve(path, argv, envp);
+}
+EXPORT_SYMBOL(__gcov_execve);

Looks weird, why is this needed?

When compiling with -fprofile-arcs, gcc will turn execve calls into a builtin which calls __gcov_execve(). This is needed in userspace to ensure that data for the calling process is correctly saved.

Back when kernel_execve() used to be called execve(), this function was required to prevent linker errors. If it's generally agreed not to name kernel functions execve(), this one might as well be removed (not sure about such an agreement though).

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/