From d7643439eba4ded2253cc4c0c5b2531ee82bd4ea Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 19 Aug 2002 10:07:41 +0000 Subject: Work from Stefan Allius which allows superH to use the common method for building crti.o and crtn.o --- libc/sysdeps/linux/common/initfini.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libc/sysdeps/linux/common/initfini.c') diff --git a/libc/sysdeps/linux/common/initfini.c b/libc/sysdeps/linux/common/initfini.c index eb9f4c73b..f93a9baed 100644 --- a/libc/sysdeps/linux/common/initfini.c +++ b/libc/sysdeps/linux/common/initfini.c @@ -42,6 +42,10 @@ easier to insert the necessary directives into crtn.S. */ #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 ) + /* The initial common code ends here. */ asm ("\n/*@HEADER_ENDS*/"); @@ -72,6 +76,7 @@ call_gmon_start(void) #endif SECTION (".init"); +HIDDEN(_init); extern void _init (void); void _init (void) @@ -108,6 +113,7 @@ asm ("\n/*@_init_EPILOG_ENDS*/"); asm ("\n/*@_fini_PROLOG_BEGINS*/"); SECTION (".fini"); +HIDDEN(_fini); extern void _fini (void); void _fini (void) -- cgit v1.2.3