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

@ -71,9 +71,10 @@
/* -fwhole-program makes all symbols local. The attribute externally_visible
forces a symbol global. */
# if __GNUC_PREREQ (4,1)
# define ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((__externally_visible__))
# define EXTERNALLY_VISIBLE __attribute__(( visibility("default") ));
//__attribute__ ((__externally_visible__))
# else
# define ATTRIBUTE_EXTERNALLY_VISIBLE
# define EXTERNALLY_VISIBLE
# endif /* GNUC >= 4.1 */
/* We use __extension__ in some places to suppress -pedantic warnings