Commit Graph

214 Commits

Author SHA1 Message Date
Roland McGrath 948c3e72ec Wed Mar 20 09:42:11 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* elf/dl-load.c (_dl_map_object_from_fd): Always set L->l_type; if not
	lt_executable, then lt_library.
	* elf/rtld.c (dl_main): Don't set NEW->l_type after _dl_map_object.

Wed Mar 20 00:08:23 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/syscalls.list: Remove gtty and stty.

Tue Mar 19 16:31:06 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/termbits.h (CRTSCTS, CBAUDEX, VEOL,
	VEOL2, VMIN, VTIME): Corrected.
	(PAGEOUT, WRAP, VDSUSP): Deleted.

	* sysdeps/unix/readdir.c: Test [! _DIRENT_HAVE_D_RECLEN] instead of
	(sizeof (DP->d_name) > 1) to detect fixed-size dir entries.
1996-03-20 14:50:57 +00:00
Roland McGrath 22930c9bf2 Tue Jan 9 16:10:26 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* elf/dl-load.c (_dl_map_object_from_fd): After mapping first
 	segment to find location, mprotect excess region to no access,
 	don't munmap it.

	* sysdeps/mach/hurd/dl-sysdep.c (mmap): If vm_map returns
	KERN_NO_SPACE for fixed location, deallocate it and try again.
1996-01-10 10:00:22 +00:00
Roland McGrath c4b7291877 Fixed ELFMAG check to work for either byte order. Align end of load segment only to page size, not to segment alignment. 1996-01-06 21:39:03 +00:00
Roland McGrath 9b8a44cd18 (MAP_FILE): Define to zero if undefined. (MAP_COPY): Define to MAP_PRIVATE if undefined. (_dl_map_object_from_fd): Don't use MAP_INHERIT in mmap calls. If file it ET_EXEC, set its l_type to lt_executable. 1995-12-12 01:07:35 +00:00
Roland McGrath 4cb202902d Thu Nov 16 06:07:49 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start_cleanup): New
	function.
	(_dl_sysdep_start): Move cleanup code there.

	* Makeconfig (default-rpath): New variable.
	(link-libc): Use it.
	* elf/Makefile (ld.so): Pass -rpath=$(default-rpath).
	* elf/rtld.c (_dl_rpath): New variable.
	(_dl_start): Set it from rtld_map's DT_RPATH.
	Call _dl_setup_hash on rtld_map.
	(dl_main): Cache address of _exit in variable before relocating,
	and use that in later calls.  Call _dl_sysdep_start_cleanup before
	relocating.  Keep track of dependency order while loading; remove
	rtld_map from chain, and reinsert in proper order if there is a
	dependency on it.

	* sysdeps/generic/Makefile (make_siglist): Pass
	-DSIGNUM_H=... with config's signum.h location.
	* sysdeps/generic/make_siglist.c: Include SIGNUM_H to define
	signal numbers.
	(HAVE_STRSIGNAL, HAVE_PSIGNAL): Define these before including signame.c
	(main): Deansideclize output.

	* elf/dl-load.c (_dl_map_object): Use _dl_rpath variable in place
	of DEFAULT_RPATH macro.
	* elf/Makefile: Undo last change.

	* sysdeps/mach/hurd/dl-sysdep.c (free): Don't abort, just nop.
1995-11-17 02:33:47 +00:00
Roland McGrath 8738e7f8b0 * elf/dl-lookup.c (_dl_lookup_symbol): Undefined symbol is no
error if weak.

	* elf/Makefile (default-rpath): New variable.
	(CPPFLAGS): Append -DDEFAULT_RPATH=....
	* elf/dl-load.c (_dl_map_object): Use DEFAULT_RPATH instead of
	hard-coded "/lib:/usr/lib".
1995-11-16 02:37:06 +00:00
Roland McGrath b122c7038e Mon Oct 9 02:54:14 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* Makeconfig (config-LDFLAGS): Define to
	-Wl-dynamic-linker=$(libdir)$(rtld-installed-name).
	(rtld-installed-name): New variable.
	* elf/Makefile (install-lib): Variable removed.
	(install-others): Define this instead, to
	$(libdir)(rtld-installed-name). 
	($(libdir)(rtld-installed-name)): New target; install from ld.so.

	* elf/ldd.sh.in: New file.
	* elf/Makefile (distribute): Add ldd.sh.in.
	(install-bin): Add ldd.
	($(objpfx)ldd: ldd.sh.in): New rule.

	* sysdeps/mach/hurd/dl-sysdep.c: Use __hurd_fail throughout.
	* hurd/hurd.h (__hurd_fail): Replace macro with inline function.
	Translate some Mach errors to Hurd errors.

	* elf/rtld.c (dl_main): Under --list, print msg if executable is
	statically linked.

	* elf/dl-load.c (_dl_map_object_from_fd): Rewrote program header
	table processing.

Sat Oct  7 01:25:48 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* sysdeps/stub/machine-gmon.h: Add #error.

Fri Oct  6 01:49:48 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* elf/dynamic-link.h (elf_get_dynamic_info): If DYN is null, don't
	examine it.
1995-10-09 07:06:29 +00:00
Roland McGrath 879bf2e65a * sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): If started by
kernel with args on stack, point _dl_hurd_data at zero data
	instead of garbage.  When ld.so run as program, grok args
	-LIB=MEMOBJ and pre-load shared object files found in memory
	objects loaded by the boot loader.

	* elf/link.h (struct link_map): New member `l_entry'.
	(_dl_map_object, _dl_map_object_from_fd): Remove last arg ENTRY_POINT.
	* elf/dl-load.c (_dl_map_object, _dl_map_object_from_fd): Remove
	last arg ENTRY_POINT.  Store the entry point location in the
	`l_entry' member of the new map.
	* elf/rtld.c (dl_main): Don't pass USER_ENTRY arg to
	_dl_map_object.  When run as program, set *USER_ENTRY to L->l_entry.
	* elf/dl-init.c (_dl_init_next): Don't pass ENTRY_POINT arg to
	_dl_map_object.
1995-09-30 21:18:30 +00:00
Roland McGrath ea03559a9d Wed Sep 27 00:27:25 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* config.make.in (AS): New variable; set to `$(CC) -c'.

	* posix/unistd.h [__USE_BSD]: Declare profil.

	* elf/dl-load.c (_dl_map_object_from_fd): New function, broken out
	of _dl_map_object.
	(_dl_map_object): Call it.
	* elf/link.h (_dl_map_object_from_fd): Declare it.
1995-09-27 06:49:48 +00:00
Roland McGrath f2b0f935d7 * elf/dl-load.c (_dl_map_object): Add MAP_INHERIT flag in mmap
from zero fill.

	* elf/dl-lookup.c (_dl_lookup_symbol): Take new flag arg NOSELF;
 	if nonzero, don't let *REF satisfy the reference itself.
	* elf/link.h (_dl_lookup_symbol): Add new arg NOSELF in decl.
	* sysdeps/i386/dl-runtime.c (_dl_runtime_resolve): Pass new arg to
 	_dl_lookup_symbol.
	* elf/do-rel.h (elf_dynamic_do_rel): Pass new second arg of
 	R->r_offset to RESOLVE callback.
	* elf/dl-reloc.c (_dl_relocate_object: resolve): Don't let *REF
 	satisfy the reference itself if its value equals the reloc's
 	offset.

	* elf/rtld.c (dl_main): Write a newline in fatal msg.

	* Makerules (lib%.so: lib%_pic.a): Pass $(LDFLAGS.so).
1995-06-12 09:00:13 +00:00
Roland McGrath 5bf62f2d3a Thu Jun 8 02:50:26 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* elf/rtld.c [! NDEBUG] (__assert_perror_fail): New function.

	* hurd/hurdstartup.c (_hurd_startup): Fancier kludge to guess phdr
 	and user entry point addresses.

	* elf/dl-load.c (open_path): Don't do strlen on DIRPATH if it's null.
	(_dl_map_object): DT_RPATH value is relative to DT_STRTAB value.

	* Makerules (install-lib.so): Don't include libc.so.
	[$(build-shared)=yes] (install): Depend on the installed libc.so file.
	[$(build-shared)=yes] (install-no-libc.a): Make this, rather than
	install, depend on the installed $(install-lib.so) files.
	[$(build-shared)=yes] (install-lib.so): Append libc.so after that rule.

	* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): Add kludge to
 	allocate high addresses to avoid random mappings appearing there.
	(mmap): Comment out mask; always pass zero.

Tue Jun  6 13:34:53 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* sysdeps/i386/dl-machine.h (ELF_MACHINE_USER_ADDRESS_MASK): New macro.
	* sysdeps/mach/hurd/dl-sysdep.c (mmap): Use it as mask in vm_map call.

	* elf/dl-error.c (_dl_catch_error): Clear *ERRSTRING and *OBJNAME
 	when successful.

	* sysdeps/mach/hurd/dl-sysdep.c (threadvars): New static variable.
	(__hurd_threadvar_max, __hurd_threadvar_stack_offset): Define these
	variables, using the `threadvars' buffer.

	* elf/dl-reloc.c: Don't dereference L->l_prev when it's null.
	* sysdeps/i386/dl-runtime.c: Likewise.

	* elf/rtld.c (dl_main): Add missing NULL terminating argument in
 	_dl_sysdep_fatal call.
	(__assert_fail): Likewise.

	* locale/Makefile (localedef-modules): Renamed ctype to
 	locale-ctype so as not to conflict with the object file for
 	ctype/ctype.c in the build directory.

	* sysdeps/i386/dl-machine.h (elf_machine_rel): If MAP->l_type is
 	lt_interpreter, first undo relocation done during bootstrapping.
1995-06-08 09:00:23 +00:00
Roland McGrath a1a9d21596 Tue May 30 15:52:32 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* mach/Makefile (server-interfaces): Removed notify and
 	device_reply.  For shlibs with eager binding, libmachuser.so must
 	not refer to any functions not defined in libc.
1995-05-31 13:23:14 +00:00
Roland McGrath 421f82e5cc Sat May 6 11:06:47 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* Makeconfig (+gccwarn): Add -Winline.

	* hurd/hurdsig.c (_hurd_internal_post_signal): If SS->context is
 	set, avoid abort_rpcs, and use reply and intr ports saved in
 	SS->context.
	* sysdeps/mach/hurd/i386/trampoline.c: Don't set SS->intr_port
 	from SS->context.  Don't clear SS->context.
	* sysdeps/mach/hurd/i386/sigreturn.c: Don't set SS->intr_port when
 	setting SS->context.  If msg_sig_post returns, re-lock and clear
 	SS->context.

Fri May  5 10:37:09 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* mach/Makefile (errsystems.c): Comment out generation rule.

	* sysdeps/mach/_strerror.c: Consider a system unknown if its
 	bad_sub member is null.

	* mach/mig-alloc.c: Add weak alias to non-__ name.
1995-05-08 09:11:25 +00:00
Roland McGrath d66e34cd42 * sysdeps/mach/i386/sysdep.h (SNARF_ARGS, CALL_WITH_SP): Rewritten.
* sysdeps/i386/dl-machine.h: New file.
	* sysdeps/stub/dl-machine.h: New file.
	* sysdeps/i386/dl-runtime.c: New file.
	* sysdeps/stub/dl-runtime.c: New file.
	* sysdeps/i386/elf/start.S: New file.
	* sysdeps/generic/dl-sysdep.c: New file.
	* sysdeps/mach/hurd/dl-sysdep.c: New file.
1995-05-02 06:35:55 +00:00