summaryrefslogtreecommitdiffstats
path: root/lib/csu
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1999-04-24 02:07:17 +0000
committerjdp <jdp@FreeBSD.org>1999-04-24 02:07:17 +0000
commit62191265703d93ac96d08e284efb482853a7f9ab (patch)
treede0b9d47bb0fb4fef05a0ea2e4d0c073681f62a5 /lib/csu
parentd8fc4c742dc237d71e0b51fa8fa86d3d78149238 (diff)
downloadFreeBSD-src-62191265703d93ac96d08e284efb482853a7f9ab.zip
FreeBSD-src-62191265703d93ac96d08e284efb482853a7f9ab.tar.gz
Remove some left-over stuff from NetBSD that we don't need. This
eliminates the need to include the dynamic linker's private header file, as well as two other headers from <sys>.
Diffstat (limited to 'lib/csu')
-rw-r--r--lib/csu/alpha/Makefile6
-rw-r--r--lib/csu/alpha/crt1.c30
2 files changed, 7 insertions, 29 deletions
diff --git a/lib/csu/alpha/Makefile b/lib/csu/alpha/Makefile
index 4460b44..fc567d8 100644
--- a/lib/csu/alpha/Makefile
+++ b/lib/csu/alpha/Makefile
@@ -1,13 +1,11 @@
#
-# $Id: Makefile,v 1.7 1999/01/09 21:50:56 jdp Exp $
+# $Id: Makefile,v 1.8 1999/04/09 05:56:23 jdp Exp $
#
-RTLDDIR= ${.CURDIR}/../../../libexec/rtld-elf
-
SRCS= crt1.c crtbegin.c crtend.c
OBJS= crt1.o crtbegin.o crtend.o
SOBJS= crtbegin.So crtend.So
-CFLAGS+= -Wall -Wno-unused -I${RTLDDIR}/${MACHINE_ARCH} -I${RTLDDIR}
+CFLAGS+= -Wall -Wno-unused
NOMAN= true
NOPIC= true
NOPROFILE= true
diff --git a/lib/csu/alpha/crt1.c b/lib/csu/alpha/crt1.c
index ac87526..0189e50 100644
--- a/lib/csu/alpha/crt1.c
+++ b/lib/csu/alpha/crt1.c
@@ -30,7 +30,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: crt1.c,v 1.3 1999/01/07 20:18:18 steve Exp $
+ * $Id: crt1.c,v 1.4 1999/01/19 06:58:31 simokawa Exp $
*/
#ifndef __GNUC__
@@ -39,21 +39,8 @@
#include <stdlib.h>
-#include <sys/exec.h>
-#include <sys/syscall.h>
-#include <rtld.h>
-
-const Obj_Entry *__mainprog_obj;
-
-extern int __syscall (int, ...);
-#define _exit(v) __syscall(SYS_exit, (v))
-#define write(fd, s, n) __syscall(SYS_write, (fd), (s), (n))
-
-#define _FATAL(str) \
- do { \
- write(2, str, sizeof(str)); \
- _exit(1); \
- } while (0)
+struct Struct_Obj_Entry;
+struct ps_strings;
#pragma weak _DYNAMIC
extern int _DYNAMIC;
@@ -69,7 +56,7 @@ char *__progname = "";
void
_start(char **ap,
void (*cleanup)(void), /* from shared loader */
- const Obj_Entry *obj, /* from shared loader */
+ struct Struct_Obj_Entry *obj, /* from shared loader */
struct ps_strings *ps_strings)
{
int argc;
@@ -88,15 +75,8 @@ _start(char **ap,
__progname = s + 1;
}
- if (&_DYNAMIC != NULL) {
- if ((obj == NULL) || (obj->magic != RTLD_MAGIC))
- _FATAL("Corrupt Obj_Entry pointer in GOT");
- if (obj->version != RTLD_VERSION)
- _FATAL("Dynamic linker version mismatch");
-
- __mainprog_obj = obj;
+ if (&_DYNAMIC != NULL)
atexit(cleanup);
- }
atexit(_fini);
_init();
OpenPOWER on IntegriCloud