From 42d2676e7ccdad60b91f1f90855db164c833ca9f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 Nov 1995 04:53:06 +0000 Subject: Wed Nov 22 12:37:39 1995 Roland McGrath * sysdeps/unix/sysv/linux/i386/sysdep.S (_errno): Define as alias for errno. * stdio-common/vfprintf.c [USE_IN_LIBIO] (vfprintf): Define as alias for _IO_vfprintf. * sysdeps/unix/sysv/linux/sockaddrcom.h: File removed. * sysdeps/unix/sysv/linux/i386/init-first.c (init): Use __fpu_control instead of ___fpu_control. * sysdeps/unix/sysv/linux/i386/ieee_fpu.c (___fpu_control): Renamed to __fpu_control. * sysdeps/unix/sysv/linux/i386/fpu_control.h: Likewise. * sysdeps/unix/sysv/linux/i386/fpu_control.c: Likewise. * elf/dl-minimal.c: New file. * elf/Makefile (rtld-routines): Add dl-minimal. * elf/rtld.c (__dgettext, __assert_fail, __assert_perror_fail): Functions moved to dl-minimal.c. * sysdeps/mach/hurd/dl-sysdep.c (malloc, free, realloc, sigjmp_save, longjmp): Likewise. * sysdeps/unix/sysv/linux/i386/brk.S (__curbrk): Always initialize to &_end, regardless of PIC. * stdio-common/vfscanf.c (__vfscanf): Fix arg name in defn. --- sysdeps/mach/hurd/dl-sysdep.c | 56 ------------------------------------------- 1 file changed, 56 deletions(-) (limited to 'sysdeps/mach') diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index f8997fe025..a2ffcd2e8c 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -535,62 +535,6 @@ weak_symbol (open) weak_symbol (close) weak_symbol (mmap) -/* Minimal `malloc' allocator for use while loading shared libraries. - Only small blocks are allocated, and none are ever freed. */ - -void * -malloc (size_t n) -{ - static vm_address_t ptr, end; - void *block; - - if (end == 0) - { - /* Consume any unused space in the last page of our data segment. */ - extern char _end; - ptr = (vm_address_t) &_end; - end = round_page (ptr); - } - - /* Make sure the allocation pointer is ideally aligned. */ - ptr += sizeof (double) - 1; - ptr &= ~(sizeof (double) - 1); - - if (ptr + n >= end) - { - /* Insufficient space left; allocate another page. */ - vm_address_t page; - assert (n <= __vm_page_size); - __vm_allocate (__mach_task_self (), &page, __vm_page_size, 1); - if (page != end) - ptr = page; - end = page + __vm_page_size; - } - - block = (void *) ptr; - ptr += n; - return block; -} -weak_symbol (malloc) - -/* This should never be called. */ -void *realloc (void *ptr, size_t n) { ptr += n; abort (); } -weak_symbol (realloc) - -/* This will rarely be called. */ -void free (void *ptr) { ptr = ptr; } -weak_symbol (free) - -/* Avoid signal frobnication in setjmp/longjmp. */ - -int __sigjmp_save (sigjmp_buf env, int savemask) -{ env[0].__mask_was_saved = savemask; return 0; } -weak_symbol (__sigjmp_save) - -void -longjmp (jmp_buf env, int val) { __longjmp (env[0].__jmpbuf, val); } -weak_symbol (longjmp) - /* This function is called by interruptible RPC stubs. For initial dynamic linking, just use the normal mach_msg. Since this defn is -- cgit 1.4.1