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

@@ -2752,7 +2752,7 @@ static rstream *next_input_file(void)
#undef files_happen
}
int awk_main(int argc, char **argv);
int awk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int awk_main(int argc, char **argv)
{
unsigned opt;

View File

@@ -42,7 +42,7 @@ static const char opt_chars[] ALIGN1 = "sl";
#define CMP_OPT_s (1<<0)
#define CMP_OPT_l (1<<1)
int cmp_main(int argc, char **argv);
int cmp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cmp_main(int argc, char **argv)
{
FILE *fp1, *fp2, *outfile = stdout;

View File

@@ -1207,7 +1207,7 @@ static void diffdir(char *p1, char *p2)
#endif
int diff_main(int argc, char **argv);
int diff_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int diff_main(int argc, char **argv)
{
bool gotstdin = 0;

View File

@@ -88,7 +88,7 @@ static char *skip_blank(const char *cp)
}
int ed_main(int argc, char **argv);
int ed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ed_main(int argc, char **argv)
{
INIT_G();

View File

@@ -77,7 +77,7 @@ static int file_doesnt_exist(const char *filename)
return stat(filename, &statbuf);
}
int patch_main(int argc, char **argv);
int patch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int patch_main(int argc, char **argv)
{
int patch_level = -1;

View File

@@ -1223,7 +1223,7 @@ static void add_cmd_block(char *cmdstr)
free(sv);
}
int sed_main(int argc, char **argv);
int sed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sed_main(int argc, char **argv)
{
enum {

View File

@@ -311,7 +311,7 @@ static void write1(const char *out)
fputs(out, stdout);
}
int vi_main(int argc, char **argv);
int vi_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int vi_main(int argc, char **argv)
{
int c;