From 2c7e5c09a27ccb0e6ca7274fd464165e3f25a03e Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 22 Aug 2002 12:03:53 +0000 Subject: Hide .hidden stuff unless explicitly enabled -Erik --- libc/sysdeps/linux/common/initfini.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'libc/sysdeps/linux/common') diff --git a/libc/sysdeps/linux/common/initfini.c b/libc/sysdeps/linux/common/initfini.c index f93a9baed..c2e82d591 100644 --- a/libc/sysdeps/linux/common/initfini.c +++ b/libc/sysdeps/linux/common/initfini.c @@ -36,15 +36,21 @@ * crtn.s puts the corresponding function epilogues in the .init and .fini sections. */ +#include + #undef GMON_SUPPORT /* We use embedded asm for .section unconditionally, as this makes it easier to insert the necessary directives into crtn.S. */ -#define SECTION(x) asm (".section " x ) +#define SECTION(x) asm (".section " x ); /* Declare symbols as hidden. Hidden symbols are only seen by * the link editor and not by the dynamic loader. */ -#define HIDDEN(func) asm (".hidden " #func ) +#ifdef HAVE_DOT_HIDDEN +# define HIDDEN(func) asm (".hidden " #func ); +#else +# define HIDDEN(func) +#endif /* The initial common code ends here. */ asm ("\n/*@HEADER_ENDS*/"); @@ -75,11 +81,11 @@ call_gmon_start(void) } #endif -SECTION (".init"); -HIDDEN(_init); +SECTION (".init") +HIDDEN(_init) + extern void _init (void); -void -_init (void) +void _init (void) { #ifdef GMON_SUPPORT /* We cannot use the normal constructor mechanism in gcrt1.o because it @@ -112,11 +118,11 @@ _init (void) asm ("\n/*@_init_EPILOG_ENDS*/"); asm ("\n/*@_fini_PROLOG_BEGINS*/"); -SECTION (".fini"); -HIDDEN(_fini); +SECTION (".fini") +HIDDEN(_fini) + extern void _fini (void); -void -_fini (void) +void _fini (void) { /* End of the _fini prolog. */ -- cgit v1.2.3