Many of the functions in the Uclinux kernel are not invoked at the outset, but only as a function pointer, in order to avoid excessive link errors from the outset, a macro is defined in Config.h:
#ifndef __ASSEMBLY__
#include <ccblkfn.h>
#include <stdio.h>
#endif
#define WARN()
do {fprintf(stderr, "code omited: %d @ %s/n", __LINE__, __FILE__); while(1) idle();} while(0)
When a link error occurs, the function body is first identified, followed by warn (), as follows:
static void
default_handler(int var_segment, struct pt_regs *regp)
{
// set_personality(0);
//
// if (current_thread_info()->exec_domain->handler != default_handler)
// current_thread_info()->exec_domain->handler(var_segment, regp);
// else
// send_sig(SIGSEGV, current, 1);
WARN();
}
So, when you run to this function, you'll output a hint and stop, and we'll remove the comment from the function body, hehe ...