*: add FAST_FUNC to function ptrs where it makes sense

function                                             old     new   delta
evalcommand                                         1195    1209     +14
testcmd                                                -      10     +10
printfcmd                                              -      10     +10
echocmd                                                -      10     +10
func_exec                                            270     276      +6
echo_dg                                              104     109      +5
store_nlmsg                                           85      89      +4
pseudo_exec_argv                                     195     198      +3
dotcmd                                               287     290      +3
machtime_stream                                       29      31      +2
discard_stream                                        24      26      +2
argstr                                              1299    1301      +2
killcmd                                              108     109      +1
evalfor                                              226     227      +1
daytime_stream                                        43      44      +1
run_list                                            2544    2543      -1
lookupvar                                             62      61      -1
ipaddr_modify                                       1310    1309      -1
...
parse_stream                                        2254    2245      -9
evalpipe                                             356     347      -9
collect_if                                           210     197     -13
read_opt                                             869     851     -18
handle_dollar                                        681     658     -23
print_addrinfo                                      1342    1303     -39
iterate_on_dir                                       156      59     -97
print_route                                         1709    1609    -100
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 12/130 up/down: 74/-767)       Total: -693 bytes
   text    data     bss     dec     hex filename
 841748     467    7872  850087   cf8a7 busybox_old
 841061     467    7872  849400   cf5f8 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/shell/ash.c b/shell/ash.c
index b27b277..1e7429c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -900,7 +900,7 @@
 	}
 }
 
-static void
+static void FAST_FUNC
 shcmd(union node *cmd, FILE *fp)
 {
 	union node *np;
@@ -1686,14 +1686,14 @@
 }
 
 #if ENABLE_ASH_GETOPTS
-static void getoptsreset(const char *value);
+static void FAST_FUNC getoptsreset(const char *value);
 #endif
 
 struct var {
 	struct var *next;               /* next entry in hash list */
 	int flags;                      /* flags are defined above */
 	const char *text;               /* name=value */
-	void (*func)(const char *);     /* function to be called when  */
+	void (*func)(const char *) FAST_FUNC; /* function to be called when  */
 					/* the variable gets set/unset */
 };
 
@@ -1745,17 +1745,17 @@
 #endif
 #if ENABLE_ASH_MAIL
 static void chkmail(void);
-static void changemail(const char *);
+static void changemail(const char *) FAST_FUNC;
 #endif
-static void changepath(const char *);
+static void changepath(const char *) FAST_FUNC;
 #if ENABLE_ASH_RANDOM_SUPPORT
-static void change_random(const char *);
+static void change_random(const char *) FAST_FUNC;
 #endif
 
 static const struct {
 	int flags;
 	const char *text;
-	void (*func)(const char *);
+	void (*func)(const char *) FAST_FUNC;
 } varinit_data[] = {
 #ifdef IFS_BROKEN
 	{ VSTRFIXED|VTEXTFIXED       , defifsvar   , NULL            },
@@ -1861,7 +1861,7 @@
 #define is_in_name(c)   ((c) == '_' || isalnum((unsigned char)(c)))
 
 #if ENABLE_ASH_GETOPTS
-static void
+static void FAST_FUNC
 getoptsreset(const char *value)
 {
 	shellparam.optind = number(value);
@@ -2492,7 +2492,7 @@
 	return err;
 }
 
-static int
+static int FAST_FUNC
 cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	const char *dest;
@@ -2556,7 +2556,7 @@
 	return 0;
 }
 
-static int
+static int FAST_FUNC
 pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	int flags;
@@ -3161,7 +3161,7 @@
 /*
  * TODO - sort output
  */
-static int
+static int FAST_FUNC
 aliascmd(int argc UNUSED_PARAM, char **argv)
 {
 	char *n, *v;
@@ -3196,7 +3196,7 @@
 	return ret;
 }
 
-static int
+static int FAST_FUNC
 unaliascmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	int i;
@@ -3680,7 +3680,7 @@
 	doing_jobctl = on;
 }
 
-static int
+static int FAST_FUNC
 killcmd(int argc, char **argv)
 {
 	int i = 1;
@@ -3745,7 +3745,7 @@
 	return status;
 }
 
-static int
+static int FAST_FUNC
 fg_bgcmd(int argc UNUSED_PARAM, char **argv)
 {
 	struct job *jp;
@@ -4000,7 +4000,7 @@
 	}
 }
 
-static int
+static int FAST_FUNC
 jobscmd(int argc UNUSED_PARAM, char **argv)
 {
 	int mode, m;
@@ -4053,7 +4053,7 @@
 	return retval;
 }
 
-static int
+static int FAST_FUNC
 waitcmd(int argc UNUSED_PARAM, char **argv)
 {
 	struct job *job;
@@ -5587,9 +5587,9 @@
 /* These forward decls are needed to use "eval" code for backticks handling: */
 static uint8_t back_exitstatus; /* exit status of backquoted command */
 #define EV_EXIT 01              /* exit after evaluating tree */
-static void evaltree(union node *, int);
+static void FAST_FUNC evaltree(union node *, int);
 
-static void
+static void FAST_FUNC
 evalbackcmd(union node *n, struct backcmd *result)
 {
 	int saveherefd;
@@ -7018,7 +7018,7 @@
 
 struct builtincmd {
 	const char *name;
-	int (*builtin)(int, char **);
+	int (*builtin)(int, char **) FAST_FUNC;
 	/* unsigned flags; */
 };
 #define IS_BUILTIN_SPECIAL(b) ((b)->name[0] & 1)
@@ -7312,7 +7312,7 @@
 	cmdp->rehash = 0;
 }
 
-static int
+static int FAST_FUNC
 hashcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	struct tblentry **pp;
@@ -7382,7 +7382,7 @@
  * pathval() still returns the old value at this point.
  * Called with interrupts off.
  */
-static void
+static void FAST_FUNC
 changepath(const char *new)
 {
 	const char *old;
@@ -7614,7 +7614,7 @@
 	return 0;
 }
 
-static int
+static int FAST_FUNC
 typecmd(int argc UNUSED_PARAM, char **argv)
 {
 	int i = 1;
@@ -7633,7 +7633,7 @@
 }
 
 #if ENABLE_ASH_CMDCMD
-static int
+static int FAST_FUNC
 commandcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	int c;
@@ -8018,13 +8018,13 @@
 }
 
 /* forward declarations - evaluation is fairly recursive business... */
-static void evalloop(union node *, int);
-static void evalfor(union node *, int);
-static void evalcase(union node *, int);
-static void evalsubshell(union node *, int);
+static void FAST_FUNC evalloop(union node *, int);
+static void FAST_FUNC evalfor(union node *, int);
+static void FAST_FUNC evalcase(union node *, int);
+static void FAST_FUNC evalsubshell(union node *, int);
 static void expredir(union node *);
-static void evalpipe(union node *, int);
-static void evalcommand(union node *, int);
+static void FAST_FUNC evalpipe(union node *, int);
+static void FAST_FUNC evalcommand(union node *, int);
 static int evalbltin(const struct builtincmd *, int, char **);
 static void prehash(union node *);
 
@@ -8032,13 +8032,13 @@
  * Evaluate a parse tree.  The value is left in the global variable
  * exitstatus.
  */
-static void
+static void FAST_FUNC
 evaltree(union node *n, int flags)
 {
 	struct jmploc *volatile savehandler = exception_handler;
 	struct jmploc jmploc;
 	int checkexit = 0;
-	void (*evalfn)(union node *, int);
+	void (*evalfn)(union node *, int) FAST_FUNC;
 	int status;
 	int int_level;
 
@@ -8182,7 +8182,7 @@
 #endif
 void evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__));
 
-static void
+static void FAST_FUNC
 evalloop(union node *n, int flags)
 {
 	int status;
@@ -8218,7 +8218,7 @@
 	exitstatus = status;
 }
 
-static void
+static void FAST_FUNC
 evalfor(union node *n, int flags)
 {
 	struct arglist arglist;
@@ -8258,7 +8258,7 @@
 	popstackmark(&smark);
 }
 
-static void
+static void FAST_FUNC
 evalcase(union node *n, int flags)
 {
 	union node *cp;
@@ -8288,7 +8288,7 @@
 /*
  * Kick off a subshell to evaluate a tree.
  */
-static void
+static void FAST_FUNC
 evalsubshell(union node *n, int flags)
 {
 	struct job *jp;
@@ -8375,7 +8375,7 @@
  * of the shell, which make the last process in a pipeline the parent
  * of all the rest.)
  */
-static void
+static void FAST_FUNC
 evalpipe(union node *n, int flags)
 {
 	struct job *jp;
@@ -8644,7 +8644,7 @@
 /*
  * The "local" command.
  */
-static int
+static int FAST_FUNC
 localcmd(int argc UNUSED_PARAM, char **argv)
 {
 	char *name;
@@ -8656,19 +8656,19 @@
 	return 0;
 }
 
-static int
+static int FAST_FUNC
 falsecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	return 1;
 }
 
-static int
+static int FAST_FUNC
 truecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	return 0;
 }
 
-static int
+static int FAST_FUNC
 execcmd(int argc UNUSED_PARAM, char **argv)
 {
 	if (argv[1]) {
@@ -8683,7 +8683,7 @@
 /*
  * The return command.
  */
-static int
+static int FAST_FUNC
 returncmd(int argc UNUSED_PARAM, char **argv)
 {
 	/*
@@ -8695,28 +8695,28 @@
 }
 
 /* Forward declarations for builtintab[] */
-static int breakcmd(int, char **);
-static int dotcmd(int, char **);
-static int evalcmd(int, char **);
-static int exitcmd(int, char **);
-static int exportcmd(int, char **);
+static int breakcmd(int, char **) FAST_FUNC;
+static int dotcmd(int, char **) FAST_FUNC;
+static int evalcmd(int, char **) FAST_FUNC;
+static int exitcmd(int, char **) FAST_FUNC;
+static int exportcmd(int, char **) FAST_FUNC;
 #if ENABLE_ASH_GETOPTS
-static int getoptscmd(int, char **);
+static int getoptscmd(int, char **) FAST_FUNC;
 #endif
 #if !ENABLE_FEATURE_SH_EXTRA_QUIET
-static int helpcmd(int, char **);
+static int helpcmd(int, char **) FAST_FUNC;
 #endif
 #if ENABLE_SH_MATH_SUPPORT
-static int letcmd(int, char **);
+static int letcmd(int, char **) FAST_FUNC;
 #endif
-static int readcmd(int, char **);
-static int setcmd(int, char **);
-static int shiftcmd(int, char **);
-static int timescmd(int, char **);
-static int trapcmd(int, char **);
-static int umaskcmd(int, char **);
-static int unsetcmd(int, char **);
-static int ulimitcmd(int, char **);
+static int readcmd(int, char **) FAST_FUNC;
+static int setcmd(int, char **) FAST_FUNC;
+static int shiftcmd(int, char **) FAST_FUNC;
+static int timescmd(int, char **) FAST_FUNC;
+static int trapcmd(int, char **) FAST_FUNC;
+static int umaskcmd(int, char **) FAST_FUNC;
+static int unsetcmd(int, char **) FAST_FUNC;
+static int ulimitcmd(int, char **) FAST_FUNC;
 
 #define BUILTIN_NOSPEC          "0"
 #define BUILTIN_SPECIAL         "1"
@@ -8739,9 +8739,10 @@
  * Apart from the above, [[ expr ]] should work as [ expr ]
  */
 
-#define echocmd   echo_main
-#define printfcmd printf_main
-#define testcmd   test_main
+/* Stubs for calling non-FAST_FUNC's */
+static int FAST_FUNC echocmd(int argc, char **argv)   { return echo_main(argc, argv); }
+static int FAST_FUNC printfcmd(int argc, char **argv) { return printf_main(argc, argv); }
+static int FAST_FUNC testcmd(int argc, char **argv)   { return test_main(argc, argv); }
 
 /* Keep these in proper order since it is searched via bsearch() */
 static const struct builtincmd builtintab[] = {
@@ -8864,14 +8865,14 @@
 		return 0;
 	return *q == '=';
 }
-static int
+static int FAST_FUNC
 bltincmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	/* Preserve exitstatus of a previous possible redirection
 	 * as POSIX mandates */
 	return back_exitstatus;
 }
-static void
+static void FAST_FUNC
 evalcommand(union node *cmd, int flags)
 {
 	static const struct builtincmd null_bltin = {
@@ -9189,7 +9190,7 @@
  * be an error to break out of more loops than exist, but it isn't
  * in the standard shell so we don't make it one here.
  */
-static int
+static int FAST_FUNC
 breakcmd(int argc UNUSED_PARAM, char **argv)
 {
 	int n = argv[1] ? number(argv[1]) : 1;
@@ -9734,7 +9735,7 @@
 	popstackmark(&smark);
 }
 
-static void
+static void FAST_FUNC
 changemail(const char *val UNUSED_PARAM)
 {
 	mail_var_path_changed = 1;
@@ -9890,7 +9891,7 @@
 /*
  * The shift builtin command.
  */
-static int
+static int FAST_FUNC
 shiftcmd(int argc UNUSED_PARAM, char **argv)
 {
 	int n;
@@ -9952,7 +9953,7 @@
 /*
  * The set command builtin.
  */
-static int
+static int FAST_FUNC
 setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	int retval;
@@ -9973,7 +9974,7 @@
 }
 
 #if ENABLE_ASH_RANDOM_SUPPORT
-static void
+static void FAST_FUNC
 change_random(const char *value)
 {
 	/* Galois LFSR parameter */
@@ -10103,7 +10104,7 @@
  * be processed in the current argument.  If shellparam.optnext is NULL,
  * then it's the first time getopts has been called.
  */
-static int
+static int FAST_FUNC
 getoptscmd(int argc, char **argv)
 {
 	char **optbase;
@@ -11792,7 +11793,7 @@
 /*
  * The eval command.
  */
-static int
+static int FAST_FUNC
 evalcmd(int argc UNUSED_PARAM, char **argv)
 {
 	char *p;
@@ -11917,7 +11918,7 @@
 	/* NOTREACHED */
 }
 
-static int
+static int FAST_FUNC
 dotcmd(int argc, char **argv)
 {
 	struct strlist *sp;
@@ -11952,7 +11953,7 @@
 	return status;
 }
 
-static int
+static int FAST_FUNC
 exitcmd(int argc UNUSED_PARAM, char **argv)
 {
 	if (stoppedjobs())
@@ -12176,7 +12177,7 @@
 /*
  * The trap builtin.
  */
-static int
+static int FAST_FUNC
 trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	char *action;
@@ -12226,7 +12227,7 @@
 /*
  * Lists available builtins
  */
-static int
+static int FAST_FUNC
 helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	unsigned col;
@@ -12264,7 +12265,7 @@
 /*
  * The export and readonly commands.
  */
-static int
+static int FAST_FUNC
 exportcmd(int argc UNUSED_PARAM, char **argv)
 {
 	struct var *vp;
@@ -12315,7 +12316,7 @@
  * variable to allow a function to be unset when there is a readonly variable
  * with the same name.
  */
-static int
+static int FAST_FUNC
 unsetcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	char **ap;
@@ -12353,7 +12354,7 @@
 	0
 };
 
-static int
+static int FAST_FUNC
 timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	long clk_tck, s, t;
@@ -12383,7 +12384,7 @@
  *
  * Copyright (C) 2003 Vladimir Oleynik <dzo@simtreas.ru>
  */
-static int
+static int FAST_FUNC
 letcmd(int argc UNUSED_PARAM, char **argv)
 {
 	arith_t i;
@@ -12425,7 +12426,7 @@
  *      -d DELIM        End on DELIM char, not newline
  *      -e              Use line editing (tty only)
  */
-static int
+static int FAST_FUNC
 readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	static const char *const arg_REPLY[] = { "REPLY", NULL };
@@ -12635,7 +12636,7 @@
 	return status;
 }
 
-static int
+static int FAST_FUNC
 umaskcmd(int argc UNUSED_PARAM, char **argv)
 {
 	static const char permuser[3] ALIGN1 = "ugo";
@@ -12811,7 +12812,7 @@
 	}
 }
 
-static int
+static int FAST_FUNC
 ulimitcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 {
 	int c;