Commit Graph

9 Commits

Author SHA1 Message Date
Roland McGrath f68b86cc7b Tue Jun 4 18:57:57 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dladdr.c: Remove #include <setjmp.h>, we don't use it.

	* shlib-versions: Set libdl=2.

	* elf/dl-deps.c (_dl_map_object_deps): Use a linked list of alloca'd
 	elements and then scan it to fill the single malloc'd array, instead
 	of using realloc to grow the array in the first pass.  _dl_map_object
	may do some mallocs that break our stream of reallocs, and the minimal
	realloc can't handle that.

	* elf/dl-init.c (_dl_init_next): Take argument, link_map whose
 	searchlist describes the piece of the DT_NEEDED graph to be
 	initialized.
	* elf/link.h: Update prototype.
	* sysdeps/i386/dl-machine.h (RTLD_START): Pass _dl_loaded as argument
	to _dl_init_next.
	* sysdeps/m68k/dl-machine.h: Likewise.
	* elf/dl-deps.c (_dl_open): Pass new object as arg to _dl_init_next.

	* elf/link.h (struct link_map): Add `l_reserved' member, soaking up
	extra bits in last byte.
	* elf/dl-deps.c (_dl_map_object_deps): Use that for mark bit to avoid
	putting dup elts in search list.

	* elf/dlclose.c: Use MAP->l_searchlist to find deps to close.

	* elf/dlsym.c: Don't tweak linked list.  Scope array given to
	_dl_lookup_symbol does the right thing.
Tue Jun  4 02:25:44 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>
1996-06-04 23:06:02 +00:00
Roland McGrath efec1d0c47 Tue Jun 4 02:25:44 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/linux-compat.c (_init): Pass reloc_addr arg to _dl_lookup_symbol.

	* elf/dl-lookup.c (_dl_lookup_symbol): Use l_searchlist.

	* elf/dl-deps.c: New file.
	* elf/Makefile (rtld-routines): Add dl-deps.
	* elf/link.h: Declare _dl_map_object_deps, _dl_open.
	* elf/rtld.c (dl_main): Use _dl_map_object_deps.
	* elf/dlopen.c: Use _dl_open.

	* elf/rtld.c (dl_main): Remove BEFORE_RTLD variable and list
	frobnication based on its value.  Detach RTLD_MAP from the chain if
	its l_opencount is zero after loading deps.

	* elf/dlfcn.h (RTLD_BINDING_MASK): New macro.

	* elf/link.h (struct link_map): Replace l_deps_loaded flag member with
	`struct link_map **l_searchlist' and `unsigned int l_nsearchlist'.
	* elf/dl-lookup.c (_dl_lookup_symbol): Make SYMBOL_SCOPE arg an array
	of two link_map ptrs.  Search the maps in the l_searchlist of each
	elt that is not null.
	* elf/dl-reloc.c (_dl_relocate_object): Pass proper SCOPE array.
	* elf/dl-runtime.c: Likewise.
	* elf/dlsym.c: Likewise.
	* elf/rtld.c (dl_main): Likewise.

	* elf/dl-minimal.c (realloc): Support realloc of the block most
	recently returned by the minimal malloc.

	* intl/localealias.c, intl/dcgettext.c [_LIBC]: Define HAVE_ALLOCA.
1996-06-04 05:18:15 +00:00
Roland McGrath 6c03c2cf27 * elf/dl-lookup.c (_dl_lookup_symbol): Arg NOSELF renamed to NOPLT.
Reject SHN_UNDEF defns iff NOPLT is nonzero.
	* elf/link.h (_dl_lookup_symbol): Update prototype and comment.
	* elf/dl-runtime.c (fixup): Pass 1 to _dl_lookup_symbol for NOPLT.
	* elf/dlsym.c (dlsym): Pass 0.
	* elf/rtld.c (dl_main): Likewise.
	* elf/dl-reloc.c (_dl_relocate_object: resolve): Second arg R_OFFSET
	replaced with NOPLT flag.  Pass it through to _dl_lookup_symbol.
	* elf/do-rel.h (elf_dynamic_do_rel): Update prototype of RESOLVE arg.
	Pass `elf_machine_pltrel_p (R->r_type)' result as NOPLT flag value.
	* sysdeps/i386/dl-machine.h (elf_machine_pltrel_p): New macro.
	* sysdeps/m68k/dl-machine.h (elf_machine_pltrel_p): Likewise.
	* sysdeps/stub/dl-machine.h (elf_machine_pltrel_p): Likewise.
1996-06-02 21:35:43 +00:00
Roland McGrath 86d2c878ac Tue Nov 7 12:29:46 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* elf/linux-compat.c: New file.
	* elf/Makefile (distribute): Add linux-compat.c.
	(generated): Add librtld.so.
	[$(config-os)=linux*] (extra-objs): Add linux-compat.so.
	[$(config-os)=linux*] (extra-objs): Add ld-linux.so.1.
	(librtld.so): New target.
	(ld.so, ld-linux.so.1): Make from librtld.so.

	* elf/rtld.c (dl_main): Instead of weak call to _dl_compat_init,
	call our own DT_INIT if we have one (and then clear it).
	(__dgettext): New weak function.

	* intl/localealias.c (read_alias_file): Avoid sprintf; use memcpy
	by hand instead.

	* sysdeps/generic/_strerror.c (_strerror_internal): Use _itoa
	instead of snprintf.

	* sysdeps/mach/_strerror.c (_strerror_internal): Don't write
	BUF[BUFLEN].

	* elf/rtld.c (rtld_map): New static variable.
	(_dl_start): Use a differently named local BOOTSTRAP_MAP for the
	bootstrapping.  Then copy data into `rtld_map'.
	(dl_main): Finish filling in rtld_map and link it into the chain,
	instead of allocating a new structure.
	(dl_main): Call _dl_compat_init if it is defined (use weak ref).

	* elf/dlsym.c: Fix last change: move REF out of `doit'.


	control.
	using it.

	and cwdir ports.
	functions.
	these.
	$(libdir)(rtld-installed-name).

	leading zeroes.

	in the rhs.
	pattern rule.


	never know.
	(fork): Use symbol_set_* macros for _hurd_fork_locks.
	* sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S (__syscall_error):
 	instead of unix/sysv.

	-dynamic-linker.

	(__printf_fp): Last arg ARGS is now `const void **const';

	locale/C-ctype.c.
	* sysdeps/mach/hurd/sigsuspend.c: Likewise.
	* sysdeps/mach/hurd/mips/sigreturn.c: Likewise.
	alias gethostname.
	setitmr
	setpgrp
	(_S_msg_get_exec_flags, _S_msg_set_exec_flags,
	(abort_thread, abort_rpcs): Take same new arg and pass it through.
1995-11-07 21:46:52 +00:00
Roland McGrath 51093422b2 Mon Nov 6 16:20:14 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* elf/dlsym.c: Return the proper value, not just the defining
	object's loadbase.
1995-11-07 10:00:21 +00:00
Roland McGrath d819080cba Mon Jul 10 05:39:21 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* sysdeps/mach/hurd/i386/init-first.c (init): Take just one arg,
 	DATA for the entry SP; DATA[-1] is always the return address
 	location.  In both cthreads and non-cthreads cases, use asm to
 	force parameters into %eax and %ecx before return, and mutate
 	DATA[-1] to return to specific asm code to set up the user from
 	%eax and %ecx.
	[PIC] (_init): Caller changed.
	(__libc_init_first) [! PIC] (doinit): Use asm to effect call to init
	with SP unwound to argument data ptr.

Thu Jul  6 14:28:56 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* sysdeps/mach/hurd/dl-sysdep.c (fmh): Fixed this kludge to work
 	when 0x08000000 and up are not mapped.

	* Makerules (stamp$o-$(subdir) rule): Remove the timestamp file
 	before touching it.
	(lib%.so): Use -Wl to get -soname to ld.

	* elf/dlsym.c: Pass final arg to _dl_lookup_symbol.

	* elf/Makefile (libdl.so): Pass $(LDFLAGS.so).
1995-07-10 09:40:15 +00:00
Roland McGrath 273d56ce89 (__data_start): Define this symbol as the first thing in .data. 1995-05-09 07:03:38 +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