add -fvisibility=hidden to CC flags, mark XXX_main functions

EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
This commit is contained in:
Denis Vlasenko
2007-10-11 10:05:36 +00:00
parent 8d82cf72c9
commit 9b49a5ed85
260 changed files with 325 additions and 307 deletions

View File

@ -11,7 +11,7 @@
#include "libbb.h"
int mktemp_main(int argc, char **argv);
int mktemp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mktemp_main(int argc, char **argv)
{
unsigned long flags = getopt32(argv, "dqt");

View File

@ -14,7 +14,7 @@
/* Read a block of data from stdin, write it to stdout.
* Activity is indicated by a '.' to stderr
*/
int pipe_progress_main(int argc, char **argv);
int pipe_progress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int pipe_progress_main(int argc, char **argv)
{
RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE);

View File

@ -110,7 +110,7 @@ static const char runparts_longopts[] ALIGN1 =
;
#endif
int run_parts_main(int argc, char **argv);
int run_parts_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int run_parts_main(int argc, char **argv)
{
const char *umask_p = "22";

View File

@ -234,7 +234,7 @@ enum {
OPT_NICELEVEL = 0x4000 * ENABLE_FEATURE_START_STOP_DAEMON_FANCY, // -N
};
int start_stop_daemon_main(int argc, char **argv);
int start_stop_daemon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int start_stop_daemon_main(int argc, char **argv)
{
unsigned opt;

View File

@ -12,7 +12,7 @@
#include "libbb.h"
int which_main(int argc, char **argv);
int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int which_main(int argc, char **argv)
{
int status = EXIT_SUCCESS;