Commit Graph

206 Commits

Author SHA1 Message Date
Ulrich Drepper 40b07f5b94 Update.
* sysdeps/generic/dl-cache.c: Optimize SEARCH_CACHE and
	HWCAP_CHECK macro code.

	* elf/dl-misc.c (_dl_sysdep_read_whole_file): Optimize code a bit.
	Now returns MAP_FAILED on error.
	* elf/rtld.c: Adjust caller.
	* sysdeps/generic/dl-cache.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Adjust description.
2001-11-08 01:48:57 +00:00
Ulrich Drepper 3e2040c851 Update.
* elf/rtld.c (process_dl_debug): Rewritten.  Optimized for size not
	speed.
	(process_envvars): More some optimizations.
2001-11-06 03:53:40 +00:00
Ulrich Drepper c95f3fd42e Update.
* elf/elf.h: Add dynamic tag definitions for prelinking.

	* elf/rtld.c (process_envvars): Avoid using array of string pointers.
	Rewrite code to remove environment varables for SUID binaries.
	Small optimization in LD_PROFILE handling.
	* sysdeps/generic/unsecvars.h: Adjust format for process_envvars
	changes.
	* sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise.

	* sysdeps/generic/dl-sysdep.c: Don't initialize _dl_cpuclock_offset.
2001-11-06 00:16:32 +00:00
Ulrich Drepper ca6c73895d Update.
2001-10-26  Ulrich Drepper  <drepper@redhat.com>

	* string/strxfrm.c [USE_IN_EXTENDED_LOCALE_MODEL]: Correctly get
	nrules value.

2001-10-24  H.J. Lu  <hjl@gnu.org>

	* sysdeps/generic/bits/dlfcn.h (DL_CALL_FCT): Cast to void *.
	Use __BEGIN_DECLS/__END_DECLS around prototypes.
	* sysdeps/mips/bits/dlfcn.h (DL_CALL_FCT): Likewise.

2001-10-21  Jim Meyering  <meyering@lucent.com>

	* malloc/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
	this code would end up calling gettext even in packages built
	with --disable-nls.
	* posix/getopt.c (_): Likewise.
	* posix/regex.c (_): Likewise.

2001-10-26  Ulrich Drepper  <drepper@redhat.com>

	* resolv/gethnamaddr.c (gethostbyaddr): Use ip6.addr for reverse
	lookup not ip6.int.
	* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise.
	Reported by Martin.v.Loewis@t-online.de [PR libc/2598].

2001-10-19  Jakub Jelinek  <jakub@redhat.com>

	* misc/sys/cdefs.h (__attribute_used__): Define.
	* elf/rtld.c (_dl_start): Add __attribute_used__.
	* elf/dl-runtime.c (fixup, profile_fixup): Likewise.
2001-10-27 00:23:28 +00:00
Ulrich Drepper e7beef5f19 (dl_main): Increment l_opencount for main binary. 2001-09-02 07:27:51 +00:00
Ulrich Drepper eaad82e005 Update.
2001-08-31  Richard Henderson  <rth@redhat.com>

	* elf/dl-support.c (_dl_cpuclock_offset): Protect with NONAVAIL.
	(HP_TIMING_AVAIL): Set to HP_SMALL_TIMING_AVAIL if present.
	* elf/rtld.c (HP_TIMING_AVAIL): Likewise.
	(print_statistics): Make scalar unsigned long long.
	* sysdeps/alpha/hp-timing.h: New file.

2001-08-31  Jakub Jelinek  <jakub@redhat.com>

	* stdio-common/perror.c (perror): Save errno early, pass it
	down to perror_internal.
	(perror_internal): Add errnum argument.

2001-08-31  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/alpha/dl-machine.h (elf_machine_rela): Remove unused code.
	Don't add old memory content for R_ALPHA_REFQUAD.
2001-09-01 06:10:36 +00:00
Ulrich Drepper 967cdc10b7 (dl_main): Update call to _dl_lookup_symbol. 2001-08-27 16:21:32 +00:00
Ulrich Drepper cf44e2dd73 Update.
2001-08-24  Ulrich Drepper  <drepper@redhat.com>

	* elf/rtld.c (print_statistics): Printf % after percent values.
	* elf/dl-misc.c (_dl_debug_vdprintf): Implement %%.

	* elf/dl-lookup.c (_dl_lookup_symbol): If we use the cache we
	don't have to compute the hash value and initialize current_value.
	Move reference_name variable to where it is needed.
	(_dl_lookup_versioned_symbol): Likewise.
2001-08-25 06:33:07 +00:00
Ulrich Drepper af8bf6bd49 Update.
* elf/rtld.c: Include <sys/param.h>.
	* elf/dl-reloc.c: Likewise.
2001-08-24 19:56:19 +00:00
Ulrich Drepper 962a3cdd2a (print_statistics): Nicer format for cache hit output. 2001-08-23 23:40:28 +00:00
Ulrich Drepper 647eb037f3 Update.
2001-08-23  Jakub Jelinek  <jakub@redhat.com>

	* elf/ldconfig.c (search_dir): Remove stale symlinks.

2001-08-23  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-lookup.c (lookup_cache, lookup_cache_versioned): New.
	(_dl_lookup_symbol): Lookup relocations in cache and store successfull
	lookups in cache.
	(_dl_lookup_versioned_symbol): Likewise.
	* elf/dl-reloc.c (_dl_relocate_object): Initialize cache for
	relocation lookup.
	* elf/rtld.c (print_statistics): Output _dl_num_cache_relocations.
	* sysdeps/generic/ldsodefs.h (struct lookup_cache): New definition.
	(lookup_cache, lookup_cache_versioned): Add declarations.

2001-08-23  Ulrich Drepper  <drepper@redhat.com>

	* stdlib/tst-random.c (main): Swap parameters in fail call.
	Patch by Pete Bevin <pete@petebevin.com>.

2001-08-23  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/inttypes.h: Use __gwchar_t instead of __wchar_t.

	* malloc/obstack.c: Indent preprocessor directives.
	Patch by Jim Meyering <meyering@ascend.com>.
2001-08-23 23:36:47 +00:00
Ulrich Drepper 67c94753e3 Update.
2001-08-11  Ulrich Drepper  <drepper@redhat.com>

	* malloc/malloc.c (ptmalloc_init): Don't call getenv five times.
	Instead use new function next_env_entry which iterates over the
	environment once.

	* sysdeps/arm/dl-machine.h (elf_machine_runtime_setup): Only set
	_dl_profile_map for the right object.

	* elf/dl-reloc.c (_dl_relocate_object): Allocate l_reloc_result
	only if consider_profiling is != 0, not if _dl_profile != NULL.

	* sysdeps/generic/dl-environ.c (_dl_next_ld_env_entry): Optimize a bit.
	Now returns pointer to first character set "LD_".
	* elf/rtld.c (process_envvars): Adjust for change above.
	* sysdeps/unix/sysv/linux/dl-librecon.h (EXTRA_LD_ENVVARS): Likewise.
	* sysdeps/unix/sysv/linux/i386/dl-librecon.h (EXTRA_LD_ENVVARS):
	Likewise.

2001-08-10  Wolfram Gloger  <wg@malloc.de>

	* malloc/malloc.c (grow_heap): Use mmap() rather than mprotect()
	to allocate new memory, for better performance with Linux-2.4.x.
2001-08-11 08:57:41 +00:00
Ulrich Drepper c2a714f32e Update.
* elf/rtld.c: Correct use of __builtin_expect.

	* elf/dl-close.c: Remove commented-out code.
2001-08-04 15:05:57 +00:00
Ulrich Drepper 370f00c3a7 Update.
2001-06-07  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/ia64/dl-symaddr.c (_dl_symbol_address): Update call to
	__ia64_make_fptr() for new interface.
	(_dl_function_address): Remove.

	* sysdeps/ia64/dl-machine.h (IA64_BOOT_FPTR_TABLE_LEN): Rename
	from IA64_BOOT_FPTR_SIZE and reduce its value from 256 to 200.
	(struct ia64_fdesc): Rename from struct ia64_fptr and drop "next"
	pointer.  Rename member "func" to "ip".
	(struct ia64_fdesc_table): New type.
	(__ia64_make_fptr): Change prototype.
	(__ia64_init_bootstrap_fdesc_table): New function.
	(ELF_MACHINE_BEFORE_RTLD_RELOC): New macro.
	(__boot_ldso_fptr): Removed.
	(__fptr_next): Removed.
	(__fptr_root): Removed.
	(__fptr_count): Removed.
	(TRAMPOLINE_TEMPLATE): Fix typo in comment.  Don't use multi-line
	strings to avoid warning from gcc3.
	(RTLD_START): Don't use multi-line strings.
	(ELF_MACHINE_START_ADDRESS): Use DL_STATIC_FUNCTION_ADDRESS.
	(elf_machine_fixup_plt): Update the code entry point in the
	function descriptor through a "volatile" pointer to ensure proper
	write ordering.
	(elf_machine_rela): Simplify handling of FPTR relocs: always call
	__ia64_make_fptr().

	* sysdeps/ia64/dl-lookupcfg.h (DL_AUTO_FUNCTION_ADDRESS): New macro.
	(DL_STATIC_FUNCTION_ADDRESS): Likewise.
	(DL_DT_INIT_ADDRESS): Use DL_AUTO_FUNCTION_ADDRESS.
	(DL_DT_FINI_ADDRESS): Likewise.

	* sysdeps/ia64/dl-fptr.c: Rewrite for better scalability and to
	avoid deadlocks.

	* include/link.h: Add member machine specific "l_mach" member to
	link_map.

	* sysdeps/generic/bits/link.h: New file.
	* sysdeps/ia64/bits/link.h: Likewise.

	* elf/rtld.c (_dl_start): Fix typo in comment.
	(_dl_start_final): Copy new "l_mach" member from temporary to
	final bootstrap map.
2001-07-26 00:27:15 +00:00
Andreas Jaeger 41bdb6e20c Update to LGPL v2.1.
2001-07-06  Paul Eggert  <eggert@twinsun.com>

	* manual/argp.texi: Remove ignored LGPL copyright notice; it's
	not appropriate for documentation anyway.
	* manual/libc-texinfo.sh: "Library General Public License" ->
	"Lesser General Public License".

2001-07-06  Andreas Jaeger  <aj@suse.de>

	* All files under GPL/LGPL version 2: Place under LGPL version
	2.1.
2001-07-06 04:58:11 +00:00
Ulrich Drepper 2373b30ea8 Update.
2001-05-20  Bruno Haible  <haible@clisp.cons.org>

	* iconvdata/cp1255.c: Completely rewritten.
	* iconvdata/Makefile (gen-8bit-gap-modules): Remove cp1255.
	* iconvdata/testdata/WINDOWS-1255: New file.
	* iconvdata/testdata/WINDOWS-1255..UTF8: New file.
	* iconvdata/TESTS: Add WINDOWS-1255 test.
	* iconvdata/CP1255.irreversible: New file.

2001-05-20  Bruno Haible  <haible@clisp.cons.org>

	* iconvdata/cp1258.c: Completely rewritten.
	* iconvdata/Makefile (gen-8bit-gap-modules): Remove cp1258.
	* iconvdata/testdata/WINDOWS-1258: New file.
	* iconvdata/testdata/WINDOWS-1258..UTF8: New file.
	* iconvdata/TESTS: Add WINDOWS-1258 test.
	* iconvdata/tst-table-from.c (try): Reset the iconv descriptor before
	the main call, and flush it afterwards.
	(utf8_decode): Return a string, possibly containing several Unicode
	characters.
	(main): Update all utf8_decode calls.
	* iconvdata/CP1258.irreversible: New file.

2001-05-20  Bruno Haible  <haible@clisp.cons.org>

	* iconv/gconv.c (__gconv): For flush without output, pass do_flush = 2.
	* iconv/skeleton.c: Distinguish do_flush = 1 and do_flush = 2. In the
	first case, set outbuf, outstart, outend, and call PREPARE_LOOP before
	EMIT_SHIFT_TO_INIT; then pass the output produced by this step down to
	the next step. In the second case, clear the state without calling
	EMIT_SHIFT_TO_INIT.
	* iconvdata/ibm930.c (EMIT_SHIFT_TO_INIT): Use outbuf instead of
	data->__outbuf, and outend instead of data->__outbufend.
	* iconvdata/ibm933.c (EMIT_SHIFT_TO_INIT): Likewise.
	* iconvdata/ibm935.c (EMIT_SHIFT_TO_INIT): Likewise.
	* iconvdata/ibm937.c (EMIT_SHIFT_TO_INIT): Likewise.
	* iconvdata/ibm939.c (EMIT_SHIFT_TO_INIT): Likewise.
	* iconvdata/iso-2022-cn.c (EMIT_SHIFT_TO_INIT): Likewise.
	* iconvdata/iso-2022-cn-ext.c (EMIT_SHIFT_TO_INIT): Likewise.
	* iconvdata/iso-2022-jp.c (EMIT_SHIFT_TO_INIT): Likewise.
	* iconvdata/iso-2022-kr.c (EMIT_SHIFT_TO_INIT): Likewise.
	* iconvdata/utf-7.c (EMIT_SHIFT_TO_INIT): Likewise.

2001-05-21  Jakub Jelinek  <jakub@redhat.com>

	* elf/rtld.c (dl_main): Compute l_map_end for the main program.
	* elf/dl-sym.c (_dl_sym): Don't check for l_addr == 0.
	If match == _dl_loaded, caller can still come from the main program.
	(_dl_vsym): Likewise.
	* elf/dl-open.c (dl_open_worker): Don't check for l_addr == 0.
	* elf/dl-error.c (_dl_signal_error): Change NULL objname into "".
	* elf/restest2.c: New test.
	* elf/Makefile (tests): Add restest2.
	(restest2, LDFLAGS-restest2): Add rules.
2001-05-22 22:30:18 +00:00
Ulrich Drepper a16956f331 Update.
2001-04-10  Andreas Schwab  <schwab@suse.de>

	* math/libm-test.inc (csinh_test): Don't require the invalid
	exception for csinh (x + iNaN), but make it optional.

2001-04-09  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/ia64/elf/start.S (_start): Add unwind directives.

	* sysdeps/generic/entry.h [!__ASSEMBLY__]: Declare _start.
	* sysdeps/ia64/elf/entry.h: New file.
	* sysdeps/unix/sysv/linux/mips/entry.h [!__ASSEMBLY__]: Declare
	__start.
	* elf/rtld.c: Don't declare ENTRY_POINT.  Use ENTRY_POINT instead
	of &ENTRY_POINT.
	* sysdeps/generic/dl-sysdep.c: Likewise.
	* sysdeps/mach/hurd/dl-sysdep.c: Likewise.
	* sysdeps/ia64/elf/start.S: Save base address of register backing
	store in __libc_ia64_register_backing_store_base.
2001-04-10 23:12:08 +00:00
Andreas Jaeger f457369d01 Update.
* sysdeps/ieee754/dbl-64/uroot.h: Add missing braces arount
	initializers.
	* sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Likewise.

	* elf/rtld.c (print_statistics)[!HP_TIMING_NONAVAIL]: Avoid
	warning about unused variable.
2001-04-02 11:26:16 +00:00
Roland McGrath 8a0746ae74 * sysdeps/mach/hurd/Makefile ($(link-rpcuserlibs)): Don't append
options after $(build-module), which is no longer a single command.
	(LDFLAGS-link-rpcuserlibs): New variable to hold those options.
	(LDFLAGS-libmachuser-link.so, LDFLAGS-libhurduser-link.so): New
	variables using it.  Reported by Mark Kettenis <kettenis@gnu.org>.

2001-03-11  Roland McGrath  <roland@frob.com>

	* elf/rtld.c (dl_main): Add cast to quiet warning.
	* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
	* iconv/gconv_conf.c (__gconv_get_path): Likewise.
	(__gconv_read_conf): Likewise.
	* iconv/gconv_db.c (gen_steps): Likewise.
	(__gconv_find_transform): Likewise.
	* locale/programs/charmap-dir.c (fopen_uncompressed): Likewise.
	(fopen_uncompressed): Use const in second argument's type.

2001-03-11  Roland McGrath  <roland@frob.com>

	* sysdeps/mach/hurd/dl-sysdep.c (__writev): New function.

	* mach/mach_error.h: Fix ancient #endif syntax.
	* hurd/hurdmalloc.c: Likewise.

	* sysdeps/generic/atomicity.h (exchange_and_add, atomic_add,
	compare_and_swap): Add volatile qualifier to first arg, to bring
	these prototypes in line with all the other implementations.
	Add a #warning to remind the builder that these are not atomic.

2001-03-04  Roland McGrath  <roland@frob.com>

	* hurd/vpprintf.c (vpprintf) [USE_IN_LIBIO]: Use innermore first
	member of TEMP_F so its type is _IO_FILE * as expected.

	* hurd/fopenport.c (seekio): Conditionalize type of POS argument
	on [USE_IN_LIBIO].  Check the value for overflow, since for libio
	it might exceed off_t's range.

2001-02-25  Roland McGrath  <roland@frob.com>

	* sysdeps/mach/hurd/sysd-stdio.c (__stdio_reopen): Use prototype.
	* sysdeps/unix/bsd/getpt.c (__posix_openpt): Likewise.

	* sysdeps/mach/hurd/i386/intr-msg.h (SYSCALL_EXAMINE): Make this a
	macro instead of an inline function,
	(MSG_EXAMINE): Likewise.

	* hurd/hurd/ioctl.h (_HURD_HANDLE_IOCTLS_1): Remove extraneous ##.

	* hurd/get-host.c: Include <string.h> for decls of built-ins.
	* hurd/hurdchdir.c: Likewise.
	* sysdeps/mach/hurd/i386/sigreturn.c: Likweise.
	* sysdeps/mach/hurd/opendir.c: Likewise.

	* mach/mach_init.c: Include <unistd.h> for _exit decl.

	* mach/errsystems.awk: Give output file a trailing newline.

	* mach/Machrules (MIG): Prepend CC='${CC}' to the mig command, so that
	the script will use our compiler for the cpp stage.

	With --enable-all-warnings we get a whole bunch of warnings,
	and these are just a few fixes; there are more needed to silence it.
	* mach/mach/mig_support.h (__mig_strncpy, mig_strncpy): Add extern
	decls before extern inline defns to quiet gcc warning.
	* hurd/hurd/threadvar.h (__hurd_threadvar_location_from_sp): Likewise.
	* sysdeps/mach/i386/machine-sp.h (__thread_stack_pointer): Likewise.
2001-04-01 05:04:31 +00:00
Ulrich Drepper 667b057725 Update.
2001-03-07  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/ia64/bits/fenv.h (FE_NONIEEE_ENV): New macro.

2001-03-07  Jes Sorensen  <jes@linuxcare.com>

	* sysdeps/unix/sysv/linux/ia64/ioperm.c (_ioperm): Remove unused
	variables addr & len.

2001-02-22  Jes Sorensen  <jes@linuxcare.com>

	* sysdeps/ia64/fpu/feenablxcpt.c (feenableexcept): Remove
	punctuation in asm constraint.

2001-03-07  Mark Kettenis  <kettenis@gnu.org>

	* resolv/netdb.h [__USE_GNU]: Define __need_timespec and include
	<time.h> to get definition of `struct timespec'.

2001-03-08  Jakub Jelinek  <jakub@redhat.com>

	* elf/rtld.c (dl_main): If tracing, warn about undefined symbols if
	LD_WARN=1, not if LD_WARN is unset.

2001-03-07  Andreas Schwab  <schwab@suse.de>

	* elf/ldconfig.h: Moved to ...
	* sysdeps/generic/ldconfig.h: ... here.
	* sysdeps/unix/sysv/linux/i386/ldconfig.h: New file.
	* sysdeps/unix/sysv/linux/m68k/ldconfig.h: New file.
	* sysdeps/unix/sysv/linux/ia64/ldconfig.h: New file.
	* elf/readlib.c (interpreters, known_libs): Use
	SYSDEP_KNOWN_INTERPRETER_NAMES and SYSDEP_KNOWN_LIBRARY_NAMES
	instead of hard coding old names.
2001-03-10 16:40:59 +00:00
Ulrich Drepper 2ace572170 Update.
* Versions.def: Add libanl definition.
	* shlig-versions: Add entry for libanl.
	* resolv/Makefile (distribute): Add gai_misc.h and ga_test.c.
	(routines): Add gai_sigqueue.
	(extra-libs): Add libanl.
	(libanl-routines): New variable.
	Add rules to build libanl and ga_test.
	* resolv/Versions [libc] (GLIBC_2.2.3): Add __gai_sigqueue.
	[libanl]: New library.
	* resolv/netdb.h: Add definitions for libanl.
	* resolv/getaddrinfo_a.c: New file.
	* resolv/gai_cancel.c: New file.
	* resolv/gai_error.c: New file.
	* resolv/gai_misc.c: New file.
	* resolv/gai_misc.h: New file.
	* resolv/gai_notify.c: New file.
	* resolv/gai_suspend.c: New file.
	* resolv/ga_test.c: New file.
	* sysdeps/generic/gai_sigqueue.c: New file.
	* sysdeps/unix/sysv/linux/gai_sigqueue.c: New file.
	* sysdeps/generic/bits/siginfo.h: Allow __need_sigevent_t being defined
	and provide only that definition.
	* sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Likewise.

	* rt/aio_misc.c: Fix typos in comments.
	* rt/lio_listio.c: Pretty printing.  Little optimization in request
	list handling.

	* elf/rtld.c: Remove commented out code.
2001-03-03 18:21:04 +00:00
Ulrich Drepper 35fc382add Update.
* sysdeps/arm/dl-machine.h: Likewise.
	* sysdeps/hppa/dl-machine.h: Likewise.
	* sysdeps/m68k/dl-machine.h: Likewise.
	* sysdeps/powerpc/dl-machine.h: Likewise.
	* sysdeps/s390/dl-machine.h: Likewise.
	* sysdeps/sh/dl-machine.h: Likewise.
2001-02-28 06:36:10 +00:00
Ulrich Drepper ba9fcb3f41 Update.
* elf/rtld.c: Little optimizations in handling _dl_lazy.

	* elf/cache.c (save_cache): Portability changes.
	* elf/dl-profile.c (_dl_start_profile): Likewise.

	* elf/sln.c: Cleanups.  Remove arbitrary limits.
2001-02-27 17:59:27 +00:00
Ulrich Drepper 62dcee574f Replace _dl_debug_* variables with _dl_debug_mask. 2001-02-27 09:34:31 +00:00
Ulrich Drepper 1e71bd5279 Update.
* elf/rtld.c (process_envvars): Call __strtoul_internal instead of
	strtoul.
	* elf/dl-minimal.c (strtol, __strtol_internal, strtoul): Removed.
	(__sigjmp_save): Set __mask_was_saved to zero since we don't save
	anything.
	* dlfcn/eval.c (__strtol_internal): Define here.
	(eval): Use __strtol_internal instead of strtol.
2001-01-19 00:36:48 +00:00
Ulrich Drepper 92effacf83 Update.
* elf/rtld.c (process_envvars): Place output files for profiling
	in SUID binaries in /var/profile.
2001-01-09 04:32:41 +00:00
Andreas Jaeger 72f70279f4 Update.
* sysdeps/unix/sysv/linux/init-first.c: Include <libc-internals.h>
	for prototypes, remove redundant prototypes.
	* gmon/gmon.c: Likewise.
	* sysdeps/unix/i386/i586/clock_getres.c: Likewise.
	* sysdeps/unix/i386/i586/clock_gettime.c: Likewise.

	* sysdeps/generic/enbl-secure.c: Include <libc-internals.h> for
	prototypes.
	* elf/soinit.c: Likewise.
	* sysdeps/generic/prof-freq.c: Likewise.
	* sysdeps/mach/hurd/profil.c: Likewise.
	* debug/noophooks.c: Likewise.
	* debug/pcprofile.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/get_clockfreq.c: Likewise.
	* sysdeps/generic/get_clockfreq.c: Likewise.

	* locale/localeinfo.h: Add internal prototypes.

	* elf/rtld.c (dl_main): Fix prototype.
2000-12-31 18:24:24 +00:00
Andreas Jaeger 48896b9dba Update.
2000-12-05  Andreas Jaeger  <aj@suse.de>

	* elf/dl-misc.c (_dl_sysdep_read_whole_file): Mark as
	internal_function.
	* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Likewise.
	* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start_cleanup): Likewise.

	* sysdeps/generic/dl-cache.c: Remove declaration of
	_dl_sysdep_read_whole_file.

	* elf/dl-load.c (_dl_map_object): Remove declaration of
	_dl_load_cache_lookup.

	* sysdeps/generic/ldsodefs.h: Add declarations of
	_dl_load_cache_lookup, _dl_unload_cache,
	_dl_sysdep_read_whole_file, _dl_sysdep_start and
	_dl_sysdep_start_cleanup.

	* elf/rtld.c: Remove prototypes that are defined in ldsodefs.h
	now.

	* elf/dl-misc.c: Include <ldsodefs.h> to get prototypes.
	* sysdeps/generic/dl-environ.c: Likewise.

	* stdio-common/printf_fp.c: Include <gmp.h> instead of
	<stdlib/gmp.h>.
	* math/atest-exp.c: Likewise.
	* math/atest-exp2.c: Likewise.
	* math/atest-sincos.c: Likewise.
	* stdio-common/_itoa.c: Likewise.
	* stdio-common/_itowa.c: Likewise.

	* include/gmp.h: New file with internal prototypes.

	* sysdeps/generic/longjmp.c: Move _longjmp_unwind declaration from
	here to...
	* include/setjmp.h: ...here.

	* locale/Makefile (routines): Remove codeset_name since it's not
	needed anywhere.

	* locale/codeset_name.c: Removed.
2000-12-05 17:34:28 +00:00
Ulrich Drepper 42c4f32a44 Update.
2000-10-24  Ulrich Drepper  <drepper@redhat.com>

	Complete revamp of the reference counter handling.
	* include/link.h (struct link_map): Add l_idx field.
	* elf/dl-close.c: Handle decrementing of reference counters more
	correctly. If necessary decrement reference counters of dependencies
	of dependencies.
	* elf/dl-lookup.c (add_dependency): Only increment reference counter
	of the object itself and not also its dependencies.
	* elf/dl-open.c: Increment reference counters here.
	* elf/dl-deps.c: Remove reference counter handling here.
	* elf/dl-load.c: Likewise.
	* elf/rtld.c: Adjust for _dl_map_deps not handling reference counters.

	* elf/loadtest.c: Print loaded objects at the beginning.
2000-10-24 07:36:55 +00:00
Ulrich Drepper a881e0a074 Update.
* include/link.h (struct link_map): New bit field l_faked.
	* elf/dl-deps.c: Use l_faked field in struct link_map instead of
	the magic l_opencount==0.
	* elf/dl-load.c: Likewise.
	* elf/dl-version.c: Likewise.
	* elf/rtld.c: Likewise.
2000-10-24 01:02:15 +00:00
Ulrich Drepper 74955460c5 Update.
2000-09-26  Thorsten Kukuk  <kukuk@suse.de>

	* nscd/dbg_log.c (dbg_log): Add missing format string.

	* catgets/catgets.c (catopen): Use getenv instead of __secure_getenv
	since we filter out the variable once.
	* iconv/gconv_conf.c (__gconv_get_path): Likewise.
	* locale/newlocale.c (__newlocale): Likewise.
	* locale/setlocale.c (setlocale): Likewise.
	* malloc/malloc.c (ptmalloc_init): Likewise.
	* resolv/res_hconf.c (_res_hconf_init): Likewise.
	* resolv/res_init.c (__res_vinit): Likewise.
	* time/tzfile.c (__tzfile_read): Likewise.
	* sysdeps/generic/unsecvars.h: New file.
	* elf/dl-support.c (non_dynamic_init): Use it here to remove variables.
	* elf/rtld.c (process_envvars): Likewise.
	* elf/Makefile (distribute): Add unsecvars.h.
2000-09-26 09:46:55 +00:00
Ulrich Drepper 5f2de3379c Update.
* elf/rtld.c (process_envvars): Open debug output file with O_NOFOLLOW.
2000-09-26 05:50:51 +00:00
Ulrich Drepper 8a0e201e33 Update.
* elf/rtld.c (_dl_dynamic_weak): Set to 1 by default for now.
	* elf/dl-support.c: Likewise.

	necessary.  Move includes of POSIX and Unix limits files to the end.
2000-09-16 05:22:26 +00:00
Ulrich Drepper 2b7238dda8 Update.
2000-08-26  Ulrich Drepper  <drepper@redhat.com>

	* elf/Makefile (distribute): Add unloadmod.c, reldepmod1.c,
	reldepmod2.c, reldepmod3.c, and reldepmod4.c.
	(tests): Add unload, reldep, reldep2, and reldep3.
	(modules-names): Add unloadmod, reldepmod1, reldepmod2, reldepmod3,
	and reldepmod4.
	Add rules to build and run unload, reldep, reldep2, and reldep3.
	* elf/dl-lookup.c (_dl_lookup_symbol): Add new parameter explicit.
	Don't create relocation dependency if it is nonzero.
	(_dl_lookup_symbol_skip): Remove relocation dependency stuff.  This
	can never happen here.
	(_dl_lookup_versioned_symbol): Add new parameter explicit.
	Don't create relocation dependency if it is nonzero.
	(_dl_lookup_versioned_symbol_skip): Remove relocation dependency
	stuff.  This can never happen here.
	* sysdeps/generic/ldsodefs.h: Change prototypes.
	* elf/dl-reloc.c (RESOLVE_MAP): Pass 0 in explicit parameter to
	_dl_lookup_up and _dl_lookup_versioned_symbol.
	(RESOLV): Likewise.
	* elf/dl-runtime.c (fixup): Likewise.
	(profile_fixup): Likewise.
	* elf/dl-libc.c (do_dlsym): Pass 1 in explicit parameter to
	_dl_lookup_symbol.
	* elf/dl-symbol.c (_dl_symbol_value): Likewise.
	* elf/rtld.c (dl_main): Likewise.
	* elf/dl-sym.c (_dl_sym): Pass 1 in explicit parameter to
	_dl_lookup_symbol if handle is not RTLD_DEFAULT.  Always compute
	and pass down the caller map.
	(_dl_vsym): Likewise.
	* elf/reldep.c: New file.
	* elf/reldep2.c: New file.
	* elf/reldep3.c: New file.
	* elf/reldepmod1.c: New file.
	* elf/reldepmod2.c: New file.
	* elf/reldepmod3.c: New file.
	* elf/reldepmod4.c: New file.
	* elf/unload.c: New file.
	* elf/unloadmod.c: New file.

	* elf/do-lookup.h: Remove unused undef_name parameter.
	* elf/dl-lookup.c: Adjust callers.
2000-08-26 23:41:19 +00:00
Ulrich Drepper 752a2a50d4 Update.
2000-08-19  Ulrich Drepper  <drepper@redhat.com>

	* elf/Versions [ld] (GLIBC_2.2): Export _dl_check_map_versions.
	* elf/dl-deps.c (_dl_map_object_deps): If object was dependency of
	a dynamically loaded object remove old l_initfini list.
	* elf/dl-libc.c (free_mem): Used as __libc_subfreeres callback to
	remove some dynamically allocated memory blocks in the dynamic
	loading data structures.
	* elf/dl-load.c (add_name_to_object): Initialize dont_free to 0.
	* elf/dl-open.c (dl_open_workder): Don't call _dl_check_all_versions.
	Instead call _dl_check_map_versions only for the dependencies.
	* elf/rtld.c: Avoid unneccessary initializations.  Mark l_libname
	information of initial objects as not free-able.
	* sysdeps/generic/ldsodefs.h (struct libname_list): Add dont_free
	element.

	* elf/filter.c: Call mtrace.
	* elf/restest1.c: Likewise.  Close the objects.
	* elf/loadtest.c: Call mtrace.  Check result of dlclose.  Print more
	debug information.

	* elf/constload1.c: Add comment explaining not freed memory.
2000-08-19 07:17:09 +00:00
Ulrich Drepper 1ebba33ece Update.
2000-08-15  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/generic/ldsodefs.h: Declare _nl_nloaded.
	* elf/Versions [ld] (GLIBC_2.2): Add _nl_nloaded.
	* elf/dl-support.c: Define _nl_nloaded.
	* elf/rtld.c: Likewise.  Increment _nl_nloaded for rtld itself.
	* elf/dl-object.c (_dl_new_object): Increment _nl_nloaded after adding
	object to global list.
	* elf/dl-close.c (_dl_close): Decrement _nl_nloaded after removing
	from _dl_loaded list.
	* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
	* elf/dl-fini.c (_dl_fini): Use _nl_nloaded instead of computing the
	number here.

	* sysdeps/i386/fpu/fedisblxcpt.c (fedisableexcept): Mask, not
	unmask, exceptions.
	* sysdeps/i386/fpu/feenablxcpt.c (feenableexcept): Unmask, not mask,
	exceptions.
	Reported by Harvey J. Stein <hjstein@bfr.co.il>.
2000-08-16 06:30:08 +00:00
Ulrich Drepper f53c03c20d Update.
* elf/rtld.c: Define _dl_bind_not variable.
	(process_envvars): Recognize LD_BIND_NOT and set _dl_bind_not.
	* elf/dl-support.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Declare _dl_bind_not.
	* elf/dl-runtime.c (fixup): Don't remember looked up value if
	_dl_bind_not.
	(profile_fixup): Likewise.
2000-07-21 06:43:05 +00:00
Ulrich Drepper bf8b3e74bf Update.
* elf/elf.h: Add various DF_1_*, DTF_1_*, and DF_P1_* entries.
	* elf/dl-close.c (_dl_close): Don't close an object if it is marked
	with nodelete.
	* elf/dl-open.c (dl_open_worker): Pass RTLD_NOLOAD as new parameter
	to _dl_map_object.  Return immediately if no object loaded.
	Set DF_1_NODELETE bit in l_flags_1 if RTLD_NODELETE was passed.
	* elf/dynamic-link.h (elf_get_dynamic_info): Copy DT_FLAGS_1 entry
	if it exists into l_flags_1 word.
	* elf/dl-load.c (_dl_map_object_from_fd): Take no parameter and use
	it to determine whether loading is wanted or not.
	(_dl_map_object): Likewise.
	Call _dl_map_object_from_fd with new parameter.
	* sysdeps/generic/ldsodefs.h: Update prototype.
	* elf/dl-deps.c: Add new parameter to _dl_map_object calls.
	* elf/rtld.c: Likewise.
	* elf/Makefile (tests): Add noload.  Add rules to generate noload.
	* elf/noload.c: New file.
	* include/link.h (struct link_map): Add l_feature_1 and l_flags_1.
	* sysdeps/generic/bits/dlfcn.h: Define RTLD_NOLOAD and RTLD_NODELETE.
	* sysdeps/mips/bits/dlfcn.h: Likewise.
2000-07-20 22:53:54 +00:00
Ulrich Drepper ca3c013564 Update.
* elf/Versions (ld): Export _dl_out_of_memory for GLIBC_2.2.
	* dlfcn/dlerror.c (dlerror): Don't free the error string if it is the
	report that we are out of memory.
	* elf/dl-deps.c (_dl_map_object_deps): Likewise.
	* elf/dl-libc.c (dlerror_run): Likewise.
	* elf/dl-open.c (_dl_open): Likewise.
	* elf/rtld.c (dl_main): Likewise.
	* elf/dl-error.c: Define _dl_out_of_memory.
	(_dl_signal_error): Return _dl_signal_error if we cannot duplicate
	the error string.
	* sysdeps/generic/ldsodefs.h: Declare _dl_out_of_memory.

	* dlfcn/dlerror.c (free_key_mem): Also free error string.

	* iconv/loop.c: Fix comment.
2000-07-13 19:46:27 +00:00
Ulrich Drepper 47a81620ad Update.
2000-07-09  Mark Kettenis  <kettenis@gnu.org>

	* elf/rtld.c (dl_main): Move call to __libc_check_standard_fds...
	* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): ... to here.

2000-07-10  Ulrich Drepper  <drepper@redhat.com>

	* include/features.h: Include ISO C99 features if the compiler used
	is an ISO C99 compiler.
	Patch by Joseph S. Myers <jsm28@cam.ac.uk>.

2000-07-08  Mark Kettenis  <kettenis@gnu.org>

	* iconv/gconv_conf.c: Include <bits/libc-lock.h>.
2000-07-10 20:02:00 +00:00
Ulrich Drepper 8e17ea5817 Update.
2000-06-09  Ulrich Drepper  <drepper@redhat.com>

	Rewrite error message handling.
	* elf/dl-deps.c (_dl_map_object_deps): Pass new parameter to
	_dl_catch_error.
	* elf/dl-error (struct catch): Add objname member.
	(_dl_signal_error): Take new parameter with object name.  When
	passing message on simply store object name and duplicate error
	message.
	(_dl_catch_error): Take new parameter.  Store object name in the
	place pointed to.
	* include/dlfcn.h: Adjust _dl_catch_error prototype.
	* sysdeps/generic/ldsodefs.h: Adjust _dl_signal_error prototype.
	* elf/dl-libc.c (dlerror_run): Pass new parameter to _dl_catch_error.
	* elf/dl-open.c (_dl_open): Likewise.
	* elf/rtld.c (dl_main): Likewise.
	* elf/dl-close.c: Mark error messages with N_().
	* elf/dl-deps.c: Likewise.
	* elf/dl-error.c: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-reloc.c: Likewise.
	* elf/dl-support.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/dl-version.c: Likewise.
	* elf/dl-lookup.c: Add comments about problems with error message
	translations.
	* elf/dl-reloc.c: Likewise.
	* elf/dl-version.c: Likewise.
2000-06-10 04:01:36 +00:00
Ulrich Drepper b0982c4ad3 Update.
* include/elf.h: Include also <dl-dtprocnum.h>.
	* elf/dl-deps.c: Likewise.
	* elf/dl-lookup.c: Likewise.
	* elf/dl-runtime.c: Likewise.
	* elf/dl-version.c: Likewise.
	* elf/do-rel.h: Likewise.
	* elf/dynamic-link.h: Likewise.
	* elf/link.h: Likewise.
	* elf/rtld.c: Likewise.
	* sysdeps/generic/dl-dtprocnum.h: New file.
	* sysdeps/ia64/dl-dtprocnum.h: New file.
	* sysdeps/mips/dl-dtprocnum.h: New file.
	* sysdeps/sparc/dl-dtprocnum.h: New file.
2000-06-08 04:48:56 +00:00
Ulrich Drepper dec126b41a Update.
* dlfcn/dlfcn.h: Pretty print dladdr declaraction.

	* elf/rtld.c (process_envvars): Recognize LD_DYNAMIC_WEAK.
	(_dl_dynamic_weak): New variable.
	* elf/dl-support.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Declare _dl_dynamic_weak.
	* elf/do-lookup.h: If we find a weak definition treat it like a
	normal symbol unless _dl_dynamic_weak is nonzero.  In the latter
	case treat it like before.
2000-06-08 03:03:00 +00:00
Ulrich Drepper 75e8d1f516 Update.
2000-06-02  Ulrich Drepper  <drepper@redhat.com>

	* elf/rtld.c (process_envvars): Test for = after variable name.
2000-06-02 07:30:28 +00:00
Ulrich Drepper db33f7d4ae Update.
* csu/Makefile (routines): Add check_fds.
	* elf/rtld.c (dl_main): Call __libc_check_standard_fds for SUID
	binaries.  Add various __builtin_expect.
	* sysdeps/generic/libc-start.c: Move check_fds and helper functions...
	* sysdeps/generic/check_fds.c: ...here.  New file.

	* malloc/malloc.c (ptmalloc_init): Only enable debugging for SUID
	binaries if file /etc/suid-debug is available.
2000-05-25 05:02:35 +00:00
Ulrich Drepper c0282c0642 Update.
2000-05-05  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-load.c (_dl_map_object_from_fd): Little of computation of
	parameter to mprotect and for variable assignments.

2000-05-03  Jes Sorensen  <jes@linuxcare.com>

	* sysdeps/generic/ldsodefs.h (LOOKUP_VALUE_ADDRESS): Check the
	validity of map before dereferencing it.

	* elf/dl-reloc.c (RESOLVE_MAP): Define.

2000-05-02  Jes Sorensen  <jes@linuxcare.com>

	* elf/dl-runtime.c (fixup): Add the value returned in the symbol
	lookup to the arguments to elf_machine_fixup_plt().

	* sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Add Link_map
	of the symbol being resolved to input argument list and make the
	function return the pointer to the reloc.

	* sysdeps/alpha/dl-machine.h (elf_machine_fixup_plt): Change
	return valuie to lookup_t and return the value.
	* sysdeps/arm/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/generic/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/i386/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/m68k/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_fixup_plt): Likewise.

	* sysdeps/powerpc/dl-machine.h (elf_machine_fixup_plt): Likewise.
	Make it an inline function returning value after calling
	__elf_machine_fixup_plt().

	* elf/dl-sym.c (_dl_vsym): Use DL_SYMBOL_ADDRESS() to obtain the
	symbol address.

	* elf/dl-symbol.c (_dl_symbol_value): Use LOOKUP_VALUE_ADDRESS to
	obtain the symbol address.

	* sysdeps/generic/ldsodefs.h: Add generic DL_SYMBOL_ADDRESS() macro
	depending on the definition of ELF_FUNCTION_PTR_IS_SPECIAL.

	* sysdeps/ia64/dl-machine.h: Add DL_SYMBOL_ADDRESS() macro calling
	_dl_symbol_address() - this way DL_SYMBOL_ADDRESS() turns into an
	inline on non ia64.

2000-04-28  Jes Sorensen  <jes@linuxcare.com>

	* elf/dl-runtime.c (fixup): Use the portable macros to get the
	symbol address of an object.

	* elf/dl-runtime.c (fixup-profile): Use the portable macros to get
	the symbol address of an object.

	* elf/dl-libc.c (struct do_dlsym_args): Change loadbase to a lookup_t.
	* elf/dl-lookup.c (_dl_lookup_symbol): Likewise.
	(_dl_lookup_symbol_skip): Likewise.
	(_dl_lookup_versioned_symbol): Likewise.
	(_dl_lookup_versioned_symbol_skip): Likewise.

2000-04-27  Jes Sorensen  <jes@linuxcare.com>

	* elf/rtld.c (_dl_start): Get the function pointer return address
	via _dl_start_address for architectures that need a function
	pointer descriptor rather than just a pointer (ia64).

	* sysdeps/generic/dl-lookupcfg.h: New file.
	* sysdeps/ia64/dl-lookupcfg.h: New file.
	* sysdeps/ia64/dl-machine.h: New file.
	* sysdeps/ia64/dl-symaddr.c: New file.
	* sysdeps/ia64/dl-fptr.c: New file.

	* elf/elf.h: Add IA-64 specific definitions.
2000-05-05 07:15:29 +00:00
Andreas Jaeger 8b07d6a860 2000-04-20 Andreas Jaeger <aj@suse.de>
* elf/rtld.c (print_statistics): Move ifndef further up.
	(_dl_start_final): Added HP_TIMINIG_NONAVAIL to avoid warnings.
	(dl_main): Likewise.
2000-04-20  Andreas Jaeger  <aj@suse.de>

	* elf/rtld.c (print_statistics): Move ifndef further up.
	(_dl_start_final): Added HP_TIMINIG_NONAVAIL to avoid warnings.
	(dl_main): Likewise.
2000-04-21 02:05:30 +00:00
Andreas Jaeger b034c2b191 2000-04-18 Andreas Jaeger <aj@suse.de>
* elf/rtld.c (process_dl_debug): Remove obsolete comment.
	* elf/rtld.c (process_dl_debug): Remove obsolete comment.
2000-04-18 21:37:51 +00:00
Ulrich Drepper dc9116316e Update.
* elf/rtld.c: Display statitics option also if hp timing is not
	available.
2000-04-18 18:50:15 +00:00
Andreas Jaeger 1531e094ce 2000-04-18 Andreas Jaeger <aj@suse.de>
* elf/rtld.c (print_statistics): Added HP_TIMINIG_NONAVAIL where
	needed.
2000-04-18  Andreas Jaeger  <aj@suse.de>

	* elf/rtld.c (print_statistics): Added HP_TIMINIG_NONAVAIL where
	needed.
2000-04-18 17:21:41 +00:00