Implemented runtime dynamic linker to support ELF shared libraries.
* elf/Makefile: Added rules to make ld.so and libdl.
* elf/dl-error.c: New file.
* elf/dl-fini.c: New file.
* elf/dl-init.c: New file.
* elf/dl-load.c: New file.
* elf/dl-lookup.c: New file.
* elf/dl-object.c: New file.
* elf/dl-reloc.c: New file.
* elf/dlclose.c: New file.
* elf/dlerror.c: New file.
* elf/dlopen.c: New file.
* elf/dlsym.c: New file.
* elf/dynamic-link.h: New file.
* elf/link.h: New file.
* elf/rtld.c: New file.
Mon May 1 18:48:30 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* Makerules (LDFLAGS-c.so): Add -interp and -e switches to make
libc.so runnable.
* version.c (__libc_print_version): Add "et al" and missing NL to
author credit.
Tue Apr 25 17:17:19 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob.c (glob): If GLOB_MARK set, stat names to find
directories and append slashes to them in final pass before
sorting.
(glob_in_dir): If GLOB_MARK set, just allocate the extra char for the
slash; never append it here.
* mach/Machrules [interface-library]
(LDFLAGS-$(interface-library:lib%=%.so)): New variable, set to
-nostdlib.
* sysdeps/mach/hurd/fork.c: Subfunction `unlockss' removed. Lock
_hurd_siglock only around initial task creation in parent. Use
_hurd_critical_section_unlock at end. Handle dead name rights
properly, and deal with a send right dying while we try to copy
it. For the time being, use assert_perror for kernel and proc RPC
failures.
Fri Apr 21 01:10:15 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* extra-lib.mk: Don't include $(o-iterator); construct it by hand
using $(object-suffixes-$(lib)) instead.
* sysdeps/mach/hurd/Makefile (LDLIBS-c.so): New variable.
* Makerules (lib%.so: lib%_pic.a): Pass $(LDFLAGS-$(notdir $*).so).
(LDFLAGS-c.so): New variable.
* resolv/res_init.c (res_init): Don't clobber _res.options with
RES_DEFAULT. If RES_INIT is clear, OR in RES_DEFAULT.
* hurd/hurd.h: Declare _hurd_startup.
* hurd/hurdstartup.c: New file.
* hurd/Makefile (routines): Add hurdstartup.
* sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler):
Point the return address for sigreturn's frame at a "hlt" insn so
it will definitely crash if sigreturn returns.
HAVE_WEAK_SYMBOLS for doing weak_alias.
* configure.in: Move $os tests to set $elf et al earlier, before
construction of $sysnames. Instead of prepending MACHINE/elf to
$sysnames, append &/elf after each elt appended to $mach.
Tue Apr 18 14:00:19 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
of the byte that was zero, so we return a valid number.
Mon Apr 17 12:02:49 1995 Brendan Kehoe (brendan@zen.org)
* sysdeps/alpha/strlen.c (strlen): Fix cmpbge insn, and returning
of the byte that was zero, so we return a valid number.
* sysdeps/unix/bsd/ultrix4/mips/sysdep.h: New file defining
Sun Apr 16 03:23:09 1995 Brendan Kehoe (brendan@zen.org)
* /sysdeps/unix/bsd/ultrix4/mips/sysdep.h: New file defining
NO_UNDERSCORES then using sysdeps/unix/mips/sysdep.h.
* sysdeps/i386/add_n.S [PIC]: Use self-call to avoid generating reloc.
* sysdeps/i386/sub_n.S [PIC]: Likewise.
* libc-symbols.h (_elf_set_element) [PIC]: Don't make the element
word `const'.
* Makeconfig (CPPFLAGS, CFLAGS): Fix swapped references to
$(foo-$(suffix $@)).
* manual/Makefile (chapters-incl): Filter out summary.texi.
* stdlib/strtod.c (STRTOF): Use extra macro to make STRTOF's #defn
a weak symbol instead of literal "STRTOF".
* locale/setlocale.c: Work around ld bug: don't weakify refs to
_nl_{current,C}_*.
* Makerules (+depfiles): Translate %.so to %.o in $(extra-objs).
* malloc/free.c [emacs] (__malloc_safe_bcopy): Define to safe_bcopy.
* malloc/realloc.c (__malloc_safe_bcopy): Undefine before defining.
* malloc/free.c (memmove, __malloc_safe_bcopy): Do include these
#ifdef emacs, but only #ifndef memmove.
* malloc/realloc.c [emacs] (__malloc_safe_bcopy): Just #define to
safe_bcopy.
(memmove): Define only if undefined.
* stdio/_itoa.h (_EXTERN_INLINE): Define if undefined.
(_itoa): Use it in defn.
mmap call.
* configure.in (os=freebsd*|bsdi*): Set base_os=unix/bsd/bsd4.4
for these too.
* sysdeps/unix/sysv/tcsetattr.c: Use |= instead of = to properly
set c_oflag value.
* Makeconfig [! objpfx] (csu-objpfx): Add trailing slash.
* locale/Makefile (categories): Uncomment collate.
* locale/lc-collate.c: New file.
* malloc/free.c: Remove use of `assert'.
* malloc/realloc.c [! emacs] (safe_bcopy): Renamed to
__malloc_safe_bcopy; #define safe_bcopy.
* malloc/free.c: Cope with systems lacking `memmove'.
(_free_internal): Cast result of _malloc_internal.
its inlines too.
* sysdeps/unix/sysv/sysv4/sigset.h (__sigfillset): Use ~0L instead
of -1 to avoid compiler warning.
* configure.in (host_os=linux*): Set elf=yes for this, not just
linux*elf*.
* misc/progname.c (program_invocation_name,
program_invocation_short_name): Make these initialized data
definitions.
* sysdeps/mach/hurd/setitimer.c (fork_itimer): Add self reference
so gcc doesn't optimize out the function entirely.