Commit Graph

3196 Commits

Author SHA1 Message Date
Ulrich Drepper 557fab43bd Update.
2002-02-23  Ulrich Drepper  <drepper@redhat.com>

	* csu/set-init.c: Moved to...
	* sysdeps/mach/hurd/set-init.c: ...here.  New file.
	* csu/Makefile: Don't compile set-init.
	* sysdeps/mach/hurd/Makefile: Compile set-init for subdir csu.
	* sysdeps/mach/hurd/i386/init-first.c: Call __init_misc in addition
	to __libc_init.
	* sysdeps/mach/hurd/mips/init-first.c: Likewise.
	* sysdeps/mach/hurd/powerpc/init-first.c: Likewise.
	* sysdeps/unix/sysv/linux/init-first.c: Call __init_misc instead of
	__libc_init.
	* misc/init-misc.c: Always export __init_misc.  Don't define hooks for
	__libc_subinit.
2002-02-23 08:47:54 +00:00
Ulrich Drepper e413826144 Update.
2002-02-22  Ulrich Drepper  <drepper@redhat.com>

	* elf/Versions: Add _dl_allocate_tls and _dl_deallocate_tls.
	* elf/rtld.c (dl_main): Use _dl_allocate_tls with INTUSE.
	* sysdeps/generic/dl-tls.c: Add INTDEF for _dl_allocate_tls.
	(_dl_deallocate_tls): New function.
	* sysdeps/generic/ldsodefs.h: Declare _dl_allocate_tls_internal and
	_dl_deallocate_tls.
2002-02-23 07:59:56 +00:00
Roland McGrath 3a2832a07f * sysdeps/mach/hurd/times.c: Fix typo in last change.
* sysdeps/mach/hurd/setpriority.c [POLICY_TIMESHARE_BASE_COUNT]:
	Use task_policy in place of task_priority.

	* sysdeps/generic/bits/mman.h
	(MS_ASYNC, MS_SYNC, MS_INVALIDATE): New macros.
	* sysdeps/mach/msync.c: New file.

	* sysdeps/mach/powerpc/syscall.S: New file.

	* mach/msg.c [MACH_MSG_OVERWRITE]
	(__mach_msg_trap, __mach_msg_overwrite): New functions.
	* mach/Versions (libc: GLIBC_2.0): Add mach_msg_overwrite and __ name.

	* sysdeps/mach/configure.in: Check for clock.defs to put into
	mach_interface_list.
	* sysdeps/mach/configure: Regenerated.

	* mach/Makefile (mach-machine): New variable, set from $(base-machine).
	($(objpfx)mach-syscalls.mk): Use it in place of $(base-machine).
	($(mach-syscalls:%=$(objpfx)%.S) static pattern rule):
	Use <mach/machine/syscall_sw.h> instead of <sysdep.h>.
	(mach-shortcuts): Add device_read_overwrite_request,
	device_read_overwrite, vm_read_overwrite, thread_switch.

	* configure.in (base_machine): Set to $machine by default.
	* configure: Regenerated.
2002-02-19 00:22:30 +00:00
Roland McGrath 21297437bb * sysdeps/mach/configure.in: Check for <mach/machine/ndr_def.h>
or <machine/ndr_def.h> and add -DNDR_DEF_HEADER=... to DEFINES.
	* sysdeps/mach/configure: Regenerated.
	* mach/mach_init.c [NDR_DEF_HEADER]: #include it.

	* hurd/hurdfault.c (_hurdsig_fault_init): Add a cast.

	* hurd/hurd/signal.h: Include <setjmp.h> for `jmp_buf' decl.

	* mach/msgserver.c (__mach_msg_server_timeout) [! MACH_RCV_LARGE]:
	Double MAX_SIZE and don't retry on MACH_RCV_TOO_LARGE.

	* sysdeps/mach/hurd/times.c
	[NO_CREATION_TIME] (startup_time): New static variable.
	[NO_CREATION_TIME] (times_init): New static function in __libc_subinit.
	(__times) [NO_CREATION_TIME]: Use startup_time in lieu of task
	creation_time from task_basic_info.
	(__times): Use __gettimeofday instead of __host_get_time.

	* hurd/intr-msg.c (_hurd_intr_rpc_mach_msg) [! MACH_MSG_TYPE_BIT]:
	Use untyped Mach IPC message format.

	* hurd/catch-exc.c: Include <assert.h>, missing from last change.
2002-02-18 20:57:51 +00:00
Roland McGrath 9ce8b3c817 * hurd/Versions (libc: GLIBC_2.0): Add _S_catch_exception_raise_state,
_S_catch_exception_raise_state_identity,
	_hurdsig_fault_catch_exception_raise_state,
	_hurdsig_fault_catch_exception_raise_state_identity.

	* mach/shortcut.awk: Don't apply the /^}$/ rule when $proto == "".

	* sysdeps/mach/getsysstats.c (__get_avphys_pages) [HOST_VM_INFO]: Use
	__host_info with HOST_VM_INFO flavor instead of __vm_statistics.

	* sysdeps/mach/hurd/getpriority.c [TASK_SCHED_TIMESHARE_INFO]: Find
	`base_priority' in PIP->timeshare_base_info instead of PIP->taskinfo.

	* sysdeps/mach/hurd/dl-sysdep.c [FMH]: Define for i386 only.
	(fmh, unfmh): Define these functions only #if FMH.  Otherwise define
	them as no-op macros.
	[FMH] (ELF_MACHINE_USER_ADDRESS_MASK): Redefine it to zero.
	(__mmap): Uncomment uses of ELF_MACHINE_USER_ADDRESS_MASK.

	* sysdeps/powerpc/dl-machine.h
	(ELF_MACHINE_USER_ADDRESS_MASK): New macro.
2002-02-18 01:50:52 +00:00
Roland McGrath f22a77e1db * hurd/hurdselect.c (_hurd_select) [MACH_MSG_TRAILER_MINIMUM_SIZE]:
Use untyped Mach IPC message format.

	* sysdeps/mach/hurd/ioctl.c (__ioctl) [! MACH_MSG_TYPE_BIT]: Handle
	Handle untyped Mach IPC message formats.

	* hurd/catch-exc.c (_S_catch_exception_raise) [EXC_MASK_ALL]:
	Expect different argument conventions when this is defined.
	[EXC_MASK_ALL] (_S_catch_exception_raise_state): New stub function.
	[EXC_MASK_ALL] (_S_catch_exception_raise_state_identity): Likewise.
	* hurd/hurdfault.c: Likewise for _hurdsig_fault_catch_exception_*.
	[NDR_CHAR_ASCII] (mig_reply_header_t): #define as mig_reply_error_t
	for OSF Mach variant.
	(faulted): Use mig_reply_error_t for REPLY.
	(_hurdsig_fault_init) [EXC_MASK_ALL]: Use EXCEPTION_STATE_IDENTITY
	in __thread_set_exception_ports call.
	(_hurdsig_fault_init) [MACH_PORT_RECEIVE_STATUS]: Use
	__mach_port_set_attributes in place of __mach_port_set_qlimit.

	* sysdeps/mach/powerpc/sysdep.h (_MACH_MACHINE_ASM_H): Define this
	before include <sysdeps/mach/sysdep.h>, to inhibit <mach/machine/asm.h>
	on Darwin, which includes bogons.
2002-02-17 22:54:39 +00:00
Roland McGrath 9b09446441 * sysdeps/powerpc/dl-machine.h (elf_machine_rela): Move local
variable LOADBASE so it's not declared when it's not used.
2002-02-17 19:32:29 +00:00
Roland McGrath 746f400783 * sysdeps/mach/hurd/times.c (__times) [NO_CREATION_TIME]: Don't try
to use BI.creation_time.

	* mach/Machrules (MIG): Add -x c to CPP value passed down.
2002-02-17 07:57:32 +00:00
Roland McGrath 30537cab78 * config.h.in: Add #undef HAVE_HOST_PAGE_SIZE.
* sysdeps/mach/configure.in: Check for host_page_size RPC to define it.
	* mach/mach_init.c (__mach_init) [HAVE_HOST_PAGE_SIZE]: Use
	host_page_size instead of vm_statistics.
2002-02-17 07:30:04 +00:00
Roland McGrath 690a2f7da6 * sysdeps/mach/Makefile (mach-before-compile): Don't include
mach_interface.h here, since not all variants use that name.
2002-02-17 07:22:56 +00:00
Roland McGrath 61c83c3f05 * sysdeps/mach/configure.in: Add some checks for Mach headers
to ensure a sane installation.
	(mach_interface_list): Define this variable by checking for .defs
	files found in various variants.
	* configure.in (mach_interface_list): AC_SUBST this.
	* config.make.in (mach-interface-list): New substituted variable.
	* mach/Makefile (user-interfaces): Define this using the value
	of $(mach-interface-list) instead of mach, mach4.
	Updated other references to mach_interface to use it as well.

	* sysdeps/mach/powerpc/machine-lock.h: Avoid multi-line strings.

	* mach/msgserver.c [NDR_CHAR_ASCII] (mig_reply_header_t): #define as
	mig_reply_error_t for OSF Mach variant.

	* mach/Makefile (routines): Remove bootprivport.
	* mach/bootprivport.c: File removed.  It has never been used.

	* mach/msg-destroy.c (__mach_msg_destroy) [MACH_MSG_PORT_DESCRIPTOR]:
	Grok the OSF flavor of message format.
	(mach_msg_destroy_port): For MAKE_SEND and
	MAKE_SEND_ONCE rights, create an destroy a right to ensure proper
	no-senders notification.

2002-02-06  Roland McGrath  <roland@frob.com>

	* hurd/Versions (libc: GLIBC_2.0): Move cthread_fork, cthread_detach
	to here if 2.0 compatibility enabled ...
	(libc: GLIBC_2.1.3): ... from here.
2002-02-17 07:19:11 +00:00
Ulrich Drepper 425838aa4b Update.
2002-02-14  Ulrich Drepper  <drepper@redhat.com>

	* stdlib/test-a64l.c (tests): Add more test cases.

	* sunrpc/rtime.c (rtime): Change type of thetime to uint32_t.
	Reported by Walter Harms <WHarms@bfs.de>.

2002-02-11  Jes Sorensen  <jes@trained-monkey.org>

	* sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Add sc_flag bit
	definitions for struct sigcontext.
	Suggested by David Mosberger-Tang.
2002-02-14 09:25:02 +00:00
Ulrich Drepper fc093be160 Update.
* elf/dl-close.c (remove_slotinfo): New function.  Handles everything
	for removing reference of module in slotinfo list.
	(_dl_close): Use remove_slotinfo.
	* sysdeps/generic/dl-tls.c: General pretty printing.
	(oom): Define only if SHARED.
	(_dl_next_tls_modid): Correct starting point for the case we assume
	there is a gap.  Add missing instruction grouping (doh!).  Correct
	tests for reaching maximum index.
	* elf/Makefile: Add rules to build and run tst-tls7.
	* elf/tst-tls7.c: New file.
	* elf/tst-tlsmod3.c: New file.

	* elf/tst-tlsmod1.c: Move #include "tls-macros.h" instead #ifdef
	USE_TLS.
	* elf/tst-tlsmod2.c: Likewise.
2002-02-14 07:57:19 +00:00
Ulrich Drepper aed283dd45 Update.
2002-02-12  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/generic/dl-tls.c (TLS_DTV_UNALLOCATED): Renamed from
	TLS_DTV_UNALLOCATE.
	(oom): New function.
	(_dl_next_tls_modid): Rewrite to handle dl_tls_dtv_slotinfo_list.
	(_dl_determine_tlsoffset): Likewise.
	(_dl_allocate_tls): Likewise.
	(__TLS_GET_ADDR): Define if not already defined.
	(_dl_tls_symaddr): New function.
	(allocate_and_init): New function.
	(__tls_get_addr): Actually implement handling of generation counter
	and deferred allocation.
	* sysdeps/generic/ldsodefs.h (_rtld_global): Remove _dl_initimage_list,
	add _dl_tls_dtv_slotinfo_list, _dl_tls_static_nelem, and
	_dl_tls_generation.
	Define TLS_SLOTINFO_SURPLUS and DTV_SURPLUS.
	Declare _dl_tls_symaddr.
	* sysdeps/i386/dl-tls.h: Disable __tls_get_addr handling unless
	SHARED.
	* include/link.h (struct link_map):  Remove l_tls_nextimage and
	l_tls_previmage.
	* elf/dl-sym.c (_dl_sym): After successful lookup call _dl_tls_symaddr
	instead of DL_SYMBOL_ADDRESS for STT_TLS symbols.
	(_dl_vsym): Likewise.
	* elf/rtld.c (_dl_start_final): Adjust initdtv initialization for new
	layout.
	(dl_main): Allow PT_TLS be present for empty segment.  Remove
	nextimage list handling.  Instead add all modules using TLS to
	dl_tls_dtv_slotinfo_list.
	* elf/dl-open.c (dl_open_worker): After successfully loading all
	objects add those with TLS to the dl_tls_dtv_slotinfo_list list.
	* elf/dl-load.c (_dl_map_object_from_fd): If PT_TLS entry is for an
	empty segment don't do anything.  Remove handling of initimage list.
	* elf/Versions [ld] (GLIBC_2.0): Add __libc_memalign.
	(GLIBC_PRIVATE): Add _dl_tls_symaddr.
	* elf/dl-minimal.c: Define __libc_memalign.
	* elf/dl-support.c: Remove _dl_initimage_list.  Add
	_dl_tls_dtv_slotinfo_list, _dl_tls_static_nelem, and
	_dl_tls_generation.
	* include/stdlib.h: Declare __libc_memalign.

	* elf/Makefile: Add rules to build and run tst-tls4 and tst-tls5.
	* elf/tst-tls4.c: New file.
	* elf/tst-tls5.c: New file.
	* elf/tst-tlsmod2.c: New file.

	* elf/tls-macros.h: asms using ___tls_get_addr destroy %ecx and %edx.

	* elf/tst-tlsmod1.c: Don't define variables unles USE_TLS.

	* elf/tst-tls1.c: Use test-skeleton.c.
	* elf/tst-tls2.c: Likewise.
	* elf/tst-tls3.c: Likewise.

	* elf/dl-conflict.c (RESOLVE_MAP): Return NULL not 0.

	* sysdeps/mips/machine-gmon.h: Update MCOUNT for current GCC behavior.
2002-02-13 08:03:56 +00:00
Andreas Jaeger 4e11dd5a9f Update MCOUNT for current GCC behavior. 2002-02-11 10:23:36 +00:00
Ulrich Drepper 2e36cb48e5 Update.
* elf/tst-tls3.c: New file.
	* elf/tst-tlsmod1.c: New file.
	* elf/Makefile: Add rules to build and run tst-tls3.

	* sysdeps/i386/dl-machine.h: Include <tls.h>.
	(elf_machine_type_class): Set ELF_RTYPE_CLASS_PLT also for the three
	TLS relocations.
2002-02-11 06:00:19 +00:00
Ulrich Drepper a330abe2cd Update.
* sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): More changes
	required by passing pointer to last element of the list.

	* elf/dl-load.c (_dl_map_object_from_fd): Move adjustment of
	l_tls_initimage to a place where it actually is performed.

	* elf/tls-macros.h: ...here.  New file.
2002-02-11 00:57:37 +00:00
Ulrich Drepper 03af57939c Update.
* sysdeps/generic/glob.c (glob): Explicitly set gl_pathc to zero
	after globfree() calls.
2002-02-10 23:36:05 +00:00
Ulrich Drepper 87837aace9 Update.
* elf/dl-deps.c (struct openaux_args): Add open_mode element.
	(openaux): Pass open_mode as new last argument to _dl_map_object.
	(_dl_map_object_deps): Add new argument open_mode.  Initialize
	open_mode element of args variable with it.
	* elf/dl-open.c (dl_open_worker): Pass __RTLD_DLOPEN flag is set to
	_dl_map_object_deps.
	* elf/rtld.c (dl_main): Add zero as last parameter to
	_dl_map_object_deps call.
	* sysdeps/generic/ldsodefs.h: Adjust prototype of _dl_map_object_deps.
	* elf/nodlopen2.c: New file.
	* elf/nodlopenmod2.c: New file.
	* elf/Makefile: Add rules to build and run nodlopen2.

	* elf/tls-macros.hgg: ...here.  New file.
2002-02-08  Richard Henderson  <rth@redhat.com>
2002-02-10 22:40:17 +00:00
Ulrich Drepper b123d06e21 Update.
* elf/Makefile (tests): Add tst-tls1.
	* elf/tst-tls1.c: New file.

	* sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Don't handle
	alignment of TCB for now.

	* elf/rtld.c (dl_main): Use p_vaddr as address of TLS
	initialization image for the application itself.

	loop to initialize TLS block.
2002-02-10 07:44:36 +00:00
Ulrich Drepper 3065b0c799 Update.
2002-02-09  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/generic/dl-tls.c (_dl_allocate_tls): Correctly terminate
	loop to initial TLS block.

	* csu/version.c (banner): If TLS support is available say so.
2002-02-09 19:02:31 +00:00
Ulrich Drepper 2a535bf6a0 Update.
2002-02-08  Richard Henderson  <rth@twiddle.net>
	* sysdeps/alpha/elf/initfini.c: Use \n\ for multiline string.
2002-02-09 01:59:10 +00:00
Ulrich Drepper 67eb7235ce Update.
2002-02-09  Richard Henderson  <rth@twiddle.net>

	* sysdeps/generic/ldsodefs.h (struct rtld_global): Also include
	_dl_cpuclock_offset if HP_SMALL_TIMING_AVAIL.

2002-02-09  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/dl-environ.c (unsetenv): Clear cnt before use.

	* po/ca.po: Update from translation team.
	* po/sk.po: Likewise.
2002-02-09 01:54:57 +00:00
Ulrich Drepper a52d15621f Update.
2002-02-08  Ulrich Drepper  <drepper@redhat.com>

	* elf/rtld.c (_dl_start_final): Install DTV explicitly.
	(dl_main): Move dtv/static TLS handling before relocation.
	Unconditionally call _dl_tlsoffset.  Call _dl_allocate_tls and
	TLS_INIT_TP to allocate and install the dtv/static TLS block.
	* sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): If no object
	so far uses TLS initialize GL(dl_tls_static_size) and
	GL(dl_tls_static_align) to account for the TCB.
	(_dl_allocate_tls): New function.
	* sysdeps/generic/ldsodefs.h (rtld_global): Add
	_dl_initial_dtv_malloced.

	* configure.in: Test for __builtin_memset more realistically.

	* csu/version.c (banner): If TLS support available say so.
2002-02-09 01:41:44 +00:00
Andreas Jaeger 0f0d61adf5 Update.
2002-02-04  H.J. Lu  <hjl@gnu.org>

	* sysdeps/mips/dl-machine.h (elf_machine_matches_host): Use
	__attribute_used__.
	(__dl_runtime_resolve): Likewise.

	* sysdeps/mips/machine-gmon.h (_MCOUNT_DECL): Make it a real
	declaration.
2002-02-08 18:57:15 +00:00
Andreas Jaeger bc632c0728 Update.
2001-11-15  H.J. Lu  <hjl@gnu.org>

	* sysdeps/unix/sysv/linux/mips/sys/procfs.h: Don't include
	<signal.h>, <sys/ucontext.h> nor <asm/elf.h>. Updated for gdb.

	* sysdeps/unix/sysv/linux/mips/sys/user.h: New.
2002-02-08 16:21:13 +00:00
Andreas Jaeger c899461bec * sysdeps/mips/atomicity.h (compare_and_swap): Remove
".set noreorder".
	* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set):
	Likewise.
2002-02-08 16:15:43 +00:00
Ulrich Drepper 96beb56332 Update.
* sysdeps/unix/sysv/linux/bits/stat.h: Undo last patch.
2002-02-08 07:50:07 +00:00
Ulrich Drepper eee868c3c7 Update.
* sysdeps/i386/dl-tls.h (__tls_get_addr): Call
	___tls_get_addr_internal.
	(___tls_get_addr_internal): Define as alias for ___tls_get_addr.
2002-02-08 06:24:57 +00:00
Ulrich Drepper 935fbdbd6a Update.
2002-02-07  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/bits/stat.h (struct stat): Remove packed
	attribute, change __pad{1,2} type to unsigned int.
	(struct stat64): Remove packed attribute.
2002-02-08 04:59:15 +00:00
Ulrich Drepper 04b6da2724 Update.
2002-02-07  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/i386/dl-tls.h: No need for #ifdef USE_TLS.
2002-02-07 18:04:59 +00:00
Ulrich Drepper d555194cb3 Update.
2002-02-07  Andreas Schwab  <schwab@suse.de>

	* configure.in: Fix check for -zcombreloc.

2002-02-06  H.J. Lu  <hjl@gnu.org>

	* config.h.in (HAVE_BUILTIN_MEMSET): New.
	* configure.in: Check if __builtin_memset really works.
	* elf/rtld.c (_dl_start): Check HAVE_BUILTIN_MEMSET instead of
	__GNUC_PREREQ (2, 96) before using __builtin_memset.

2002-02-06  Jakub Jelinek  <jakub@redhat.com>

	* io/bug-ftw3.c (main): Don't try the test if root.

2002-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* sysdeps/unix/sysv/linux/s390/brk.c (__brk): Correct inline assembly
	constraints.
	* sysdeps/unix/sysv/linux/s390/s390-32/bits/resource.h (RLIMIT_LOCKS):
	Add RLIMIT_LOCKS and adjust RLIMIT_NLIMITS.
	* sysdeps/unix/sysv/linux/s390/s390-64/bits/resource.h (RLIMIT_LOCKS):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/clone.S (clone): Make clone
	a weak alias for __clone.
	* sysdeps/unix/sysv/linux/s390/s390-64/clone.S (clone): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h: Fix typo.
	* sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Add framestate.
	* sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
	* sysdeps/unix/sysv/linux/s390/s390-64/mmap.S (__mmap64): Make __mmap
	a weak alias for __mmap64.

	* sysdeps/mips/atomicity.h (exchange_and_add): Not use branch likely.
	* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Likewise.
	* sysdeps/generic/dl-tls.c: Don't read TLS header if TLS is not needed.
2002-02-07 17:54:45 +00:00
Ulrich Drepper d4468ab788 Don't read TLS header if TLS is not needed. 2002-02-07 17:29:14 +00:00
Andreas Jaeger a6049f98ed Do not use branch likely.
2002-02-05  H.J. Lu  <hjl@gnu.org>

	* sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
	branch likely.
	* sysdeps/mips/pt-machine.h (testandset): Likewise.
	(__compare_and_swap): Likewise.

>>>>>>> 1.469
2002-02-07 10:39:07 +00:00
Ulrich Drepper cd30b01ee9 Update.
2002-02-07  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Account for
	alignment of the TCB and store total size and alignment of static
	TLS block in _dl_tls_static_size and _dl_tls_static_align.
	tls_index is a typedef.
	* sysdeps/generic/ldsodefs.h: Declare _dl_tls_static_size and
	_dl_tls_static_align.
	* sysdeps/i386/dl-tls.h: tls_index is a typedef.
	* elf/dl-support.c: Define _dl_tls_static_size and
	_dl_tls_static_align.
2002-02-07 08:44:37 +00:00
Ulrich Drepper 8d4b5a8a50 Update.
2002-02-06  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Add --without-tls option.
	* sysdeps/i386/elf/configure.in: Don't check for TLS support if
	--without-tls is given.

	* sysdeps/generic/dl-tls.c: Include <tls.h>.

	* sysdeps/i386/dl-tls.h: Don't define anything if !USE_TLS.
2002-02-07 06:38:57 +00:00
Ulrich Drepper 4b9abcb6b8 Don't define anything if !USE_TLS. 2002-02-07 06:06:02 +00:00
Ulrich Drepper 3fb558781f Update.
2002-02-06  Ulrich Drepper  <drepper@redhat.com>

	* Versions.def [ld]: Add GLIBC_2.3.
	* elf/Versions [ld]: Add __tls_get_addr to GLIBC_2.3.
	* elf/Makefile (dl-routines): Add dl-tls.
	(distribute): Add dl-tls.h.
	* sysdeps/generic/ldsodefs.h (struct rtld_global): Remove
	_dl_tls_module_cnt, add _dl_tls_max_dtv_idx and _dl_tls_dtv_gaps.
	Add prototypes for _dl_next_tls_modid and _dl_determine_tlsoffset.
	* elf/dl-load.c (_dl_map_object_from_fd): Store alignment requirement
	along with the other info in the link map.  Change queueing of init
	images for double linked list.  Use _dl_next_tls_modid to compute
	l_tls_modid.
	* elf/rtld.c (_dl_start_final): Store alignment requirement
	along with the other info in rtld map and executable map.
	(dl_main): Add ld.so to the init image list if necessary.  Compute
	final module ID with _dl_next_tls_modid.
	* include/link.h (struct link_map): Add l_tls_previmage and
	l_tls_align.
	* eld/dl-support.c: Define _dl_tls_max_dtv_idx and _dl_tls_dtv_gaps.
	* sysdeps/i386/elf/Versions: New file.
	* sysdeps/generic/dl-tls.c: New file.
	* sysdeps/generic/dl-tls.h: New file.
	* sysdeps/i386/dl-tls.h: New file.

	attribute((packed)) to counter stupid people misusing gcc options.
2002-02-07 04:08:19 +00:00
Roland McGrath fb190a0440 * sysdeps/mach/configure.in: New file.
* sysdeps/mach/configure: New generated file.

	* mach/Makefile (user-interfaces): Remove default_pager_helper.
	It has never been used by anything.
2002-02-07 03:52:18 +00:00
Roland McGrath bcef95d89c 2002-02-06 Roland McGrath <roland@frob.com>
* sysdeps/unix/sysv/linux/netinet/ip.h: Moved to ...
	* sysdeps/generic/netinet/ip.h: ... here, replacing old file.
2002-02-07 03:49:18 +00:00
Ulrich Drepper d9e0ed0f7f Additional version definitions for i386/ELF. 2002-02-07 03:47:17 +00:00
Andreas Jaeger a07954fa01 Make sure the right <ldsodefs.h> is included. 2002-02-06 22:48:35 +00:00
Ulrich Drepper 5eab9e0215 (struct stat): Add attribute((packed)) to counter stupid people misuing gcc options. (struct stat64): Likewise. 2002-02-06 18:12:16 +00:00
Andreas Jaeger cff26a3ed5 Update.
2002-02-06  Andreas Jaeger  <aj@suse.de>

	* include/libc-symbols.h (INTUSE): Renamed from INT.
	* elf/dl-deps.c: Change users.
	* sysdeps/generic/dl-sysdep.c: Likewise.
	* sysdeps/generic/dl-cache.c: Likewise.
	* elf/dl-reloc.c: Likewise.
	* elf/rtld.c: Likewise.
	* elf/dl-version.c: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/dl-dst.h: Likewise.
	* elf/dl-init.c: Likewise.
2002-02-06 14:14:51 +00:00
Ulrich Drepper a2f1f5cb89 Update.
2002-02-05  Ulrich Drepper  <drepper@redhat.com>

	* elf/rtld.c (dl_main): Read PT_TLS entry of the executable.
	* sysdeps/generic/ldsodefs.h (struct rtld_global): Add
	_dl_tls_module_cnt.
2002-02-05 08:25:04 +00:00
Ulrich Drepper 5d6feea8f5 Update.
* elf/rtld.c (_dl_start): Fill TLS values in link map for rtld.
	* include/link.h (struct link_map): Add various members for TLS
	information.
	* sysdeps/generic/ldsodefs.h (struct rtld_global): Remove
	_rtld_tlsoffset, add _dl_initimage_list.
	* sysdeps/i386/dl-lookupcfg.h: New file.
	* sysdeps/i386/dl-machine.h (elf_machine_rel): Implement missing
	TLS relocation.  When using TLS we now use RESOLVE_MAP.
	(elf_machine_rela): Use RESOLVE_MAP instead of RESOLVE_MAP if TLS
	is used.

	* sysdeps/generic/dl-cache.c (_dl_cache_libcmp): Mark as possibly
	unused.
2002-02-05 08:02:04 +00:00
Ulrich Drepper 535b764df5 Update.
* elf/rtld.c (_dl_start_final): Allocate TLS and initialize
	thread-pointer as soon as possible.
	* sysdeps/generic/ldsodefs.h: Include <tls.h>.  Define first TLS
	elements in rtld_global.
	* sysdeps/generic/tls.h: New file.
	* elf/Makefile (distribute): Add tls.h.
	* sysdeps/i386/dl-machine.h (elf_machine_rel): Add support for TLS
	relocations.  Not complete yet.

	* resolv/resolv.h: Allow user to define __need_res_state and only
	define __res_start structure then.
	* include/resolv.h: Only declare functions if _RESOLV_H_ is defined.
2002-02-05 00:57:29 +00:00
Ulrich Drepper 67ddea9254 Update.
2002-02-04  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Move
	dl_cpuclock_offset initialization to _dl_start_final.
	(_dl_show_auxv): Avoid unnecessary sign extension.
	* elf/rtld.c (_dl_start_final): Initialize dl_cpuclock_offset.
2002-02-04 08:38:52 +00:00
Ulrich Drepper e23f8d206d Update.
2002-02-03  Ulrich Drepper  <drepper@redhat.com>

	* config.h.in: Add HAVE_TLS_SUPPORT.
	* sysdeps/i386/elf/configure.in: New file.
2002-02-04 06:24:37 +00:00
Ulrich Drepper 9710f75d4a Update.
2002-02-03  Andreas Schwab  <schwab@suse.de>

	* sysdeps/posix/readv.c: Use ssize_t for bytes_read.
	* sysdeps/posix/writev.c: Use ssize_t for bytes_written.  Fix comment.

2002-02-03  Thorsten Kukuk  <kukuk@suse.de>

	* sysdeps/posix/writev.c: Check for ssize_t overflow, don't use
	alloca if the memory reqirements are too high.

2002-02-03  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-load.c (decompose_rpath): Avoid using strstr.
	* elf/dl-minimal.c (_strerror_r): Use _itoa instead of _itoa_word since
	the former is available anyway and speed isn't important here.
	* elf/dl-misc.c (_dl_debug_vdprintf): Likewise.
	* elf/dl-version.c (match_symbol): Likewise.
	(_dl_check_map_versions): Likewise.
	* elf/rtld.c (process_envvars): Likewise.
	(print_statistics): Likewise.
	* sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Likewise.
	* elf/dl-minimal.c (_itoa): Always define it.  Make it work for all
	bases.  Add assert to catch uses of unimplemented features.
	(__strsep): Add assert to catch uses of unimplemented features.
	* elf/dl-object.c (_dl_new_object): Don't use rawmemchr.  Use strchr
	and avoid inline optimization.
	* elf/rtld.c (process_envvars): Likewise.
	* elf/dl-open.c: Don't include <stdio-common/_itoa.h>.
	* elf/dl-profile.c (_dl_start_profile): Help compiler to avoid ffs.
	* elf/rtld.c (dl_main): Avoid strsep inline optimization.

	* stdio-common/_itoa.h: Minor simplifications of the code.
	* stdio-common/_itoa.c: Likewise.

	* elf/dl-reloc.c (_dl_relocate_object): Use _dl_debug_printf
	instead of _dl_printf for debugging info output.

	* sysdeps/mips/atomicity.h (exchange_and_add): Use branch likely.
2002-02-03 19:39:52 +00:00