summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-08-19 10:07:41 +0000
committerEric Andersen <andersen@codepoet.org>2002-08-19 10:07:41 +0000
commitd7643439eba4ded2253cc4c0c5b2531ee82bd4ea (patch)
tree87538475452f3b3ee086fd704ef70e97e6a35585 /libc/sysdeps/linux/common
parent3358b761b15daa480ca0ca788b3fe077ac967674 (diff)
Work from Stefan Allius which allows superH to use the common
method for building crti.o and crtn.o
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/Makefile2
-rw-r--r--libc/sysdeps/linux/common/initfini.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile
index b9a8319cb..84de78aca 100644
--- a/libc/sysdeps/linux/common/Makefile
+++ b/libc/sysdeps/linux/common/Makefile
@@ -1,7 +1,7 @@
# Makefile for uClibc
#
# Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Library General Public License as published by the Free
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)