* elf/tls-macros.h: Add Sparc64 defines.
* sysdeps/sparc/sparc64/dl-machine.h (sparc64_fixup_plt): Mark as
always_inline.
(elf_machine_fixup_plt): Likewise.
(elf_machine_rela): Handle TLS relocations.
(elf_machine_type_cleaa): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
(SYSCALL_ERROR_HANDLER_ENTRY): Use sethi/or for GOT reloc.
It does not always fit in R_SPARC_GOT13 when building -fPIC.
Also, add TLS handling.
* sysdeps/unix/sysv/linux/configure.in (arch_minimum_kernel):
Increase it to 2.4.21 for sparc64.
* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: NULL terminate
backtrace by zero'ing out %fp. Store away flags, func_ptr,
and func_arg in global registers not local registers.
* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Handle PTID, TLS,
and CTID arguments properly. Add RESET_PID handling.
* sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Rework so that we
do not invoke __sigprocmask(). We can always assume rt signals
are present on sparc64, so just do an inline syscall.
2005-04-13 Jakub Jelinek <jakub@redhat.com>
* sysdeps/sparc/sparc64/dl-machine.h: Add dl_machine_h multiple
inclusion guard for the first half of the header.
(elf_machine_type_class, ELF_MACHINE_JMP_SLOT, ELF_MACHINE_NO_REL,
ELF_MACHINE_PLTREL_OVERLAP, elf_machine_runtime_setup,
elf_machine_relplt, DL_STACK_END, RTLD_START): Move into the
#ifndef dl_machine_h guarded part of the header.
2003-09-11 H.J. Lu <hongjiu.lu@intel.com>
* elf/tls-macros.h (TLS_IE): Add a stop bit for ia64.
(TLS_LD): Likewise.
(TLS_GD): Likewise.
2003-09-11 Jakub Jelinek <jakub@redhat.com>
* libio/fileops.c (_IO_new_file_overflow): Add INTUSE to
_IO_free_backup_area call.
Don't use weak_extern for dl_rtld_map. Instead check only if [SHARED].
(elf_machine_rela): Clean up.
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Clean up.
PowerPC TLS support contributed by Paul Mackerras <paulus@samba.org>.
* sysdeps/powerpc/powerpc32/elf/configure.in: New file.
* sysdeps/powerpc/powerpc32/elf/configure: New generated file.
* elf/tls-macros.h [__powerpc__ && !__powerpc64__]
(TLS_LE, TLS_IE, TLS_LD, TLS_GD): Define them.
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Support
new relocs for TLS.
* sysdeps/powerpc/dl-tls.h (TLS_TP_OFFSET, TLS_DTV_OFFSET): Move these
macros out of [SHARED].
(TLS_TPREL_VALUE, TLS_DTPREL_VALUE): New macros.
* elf/elf.h: Define R_PPC_* relocs for TLS support.
Clean up R_PPC64_* macro definition comments.
2003-01-11 Jim Meyering <jim@meyering.net>
* io/ftw.c [HAVE_CONFIG_H]: Include <config.h>.
[HAVE_SYS_PARAM_H || _LIBC]: Guard inclusion of <sys/param.h>.
Include <sys/stat.h>, not <include/sys/stat.h>, if !_LIBC.
[!_LIBC] (__chdir, __closedir, __fchdir, __getcwd, __opendir): Define.
[!_LIBC] (__readdir64, __tdestroy, __tfind, __tsearch): Define.
[!_LIBC] (internal_function, dirent64, MAX): Define.
(__set_errno): Define if not already defined.
(open_dir_stream): When FTW_CHDIR is enabled, invoke opendir on
the basename, not the entire file name.
(process_entry): When FTW_CHDIR is enabled, invoke XSTAT or LXSTAT on
the basename, not the entire file name.
2003-01-12 Ulrich Drepper <drepper@redhat.com>
* string/tester.c (test_strcpy): Disable last added strcpy until
it is fixed.
2003-01-11 Philip Blundell <philb@gnu.org>
* sysdeps/unix/sysv/linux/arm/socket.S: Add cancellation support.
2003-01-11 Andreas Schwab <schwab@suse.de>
* Makerules: Add vpath for %.dynsym and %.so so that the
implicit rule chaining for check-abi works.
2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/unix/sysv/linux/sh/sysdep.h (SYSCALL_ERROR_HANDLER):
Add non-PIC case.
2003-01-11 Jakub Jelinek <jakub@redhat.com>
* elf/tls-macros.h [__ia64__] (__TLS_CALL_CLOBBERS): Define.
[__ia64__] (TLS_LE, TLS_IE): Fix typos. Add ;; at start of asm if
gp is used early.
[__ia64__] (TLS_LD, TLS_GD): Likewise. Use __TLS_CALL_CLOBBERS.
* elf/Makefile ($(objpfx)tst-tlsmod5.so, $(objpfx)tst-tlsmod6.so):
Ensure libc.so in DT_NEEDED.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Move
CHECK_STATIC_TLS before l_tls_offset use.
* sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela):
Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage) [TLS_DTV_AT_TP]:
Allocate TLS_PRE_TCB_SIZE bytes below result.
(_dl_deallocate_tls) [TLS_DTV_AT_TP]: Adjust before freeing.
* sysdeps/generic/libc-tls.c (__libc_setup_tls): If
TLS_INIT_TP_EXPENSIVE is not defined, allocate even if no PT_TLS
segment has been found. If TLS_DTV_AT_TP, allocate TLS_PRE_TCB_SIZE
bytes below result and add tcb_offset to memsz.
* sysdeps/ia64/dl-tls.h (__tls_get_addr): New prototype.
* sysdeps/ia64/dl-machine.h: Include tls.h.
(elf_machine_type_class): Return ELF_RTYPE_CLASS_PLT for TLS relocs
too.
(elf_machine_rela): Assume if sym_map != NULL sym is non-NULL too.
Handle R_IA64_DTPMOD*, R_IA64_DTPREL* and R_IA64_TPREL* relocations.
* sysdeps/ia64/libc-tls.c: New file.
2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/powerpc64/sysdep.h (PSEUDO_RET): Add branch hit.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h (STAT_VER_LINUX):
Fix type. Move definition out of #if.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ftruncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Add cancellation
support.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Remove
ftruncate64, pread64, pwrite64, truncate64 entries.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
(INLINE_SYSCALL): New version that supports function call like
syscalls. Add __builtin_expect.
(LOADARGS_n): Add argument size safety checks.
(INTERNAL_SYSCALL): New Macro.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/truncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h [__PPC_ELF_H]: Avoid
redefinition of elf_fpreg_t and elf_fpregset_t.
2003-01-12 Ulrich Drepper <drepper@redhat.com>
* elf/dl-close.c (_dl_close): Add several asserts. Correct and
simplify test for unloading. If loader of a DSO is unloaded do not
use its scope anymore. Fall back to own scope and adjust opencounts.
Fix several comments.
* elf/dl-deps.c (_dl_map_object_deps): Always allocate memory for
the l_searchlist, not only for l_initfini.
* elf/dl-lookup.c (add_dependencies): Avoid creating relocation
dependencies if objects cannot be removed. Remove object with the
definition as not unloadable if necessary.
* elf/reldep6.c: Create relocation dependency before closing the first
module.
2003-01-10 Guido Günther <agx@sigxcpu.org>
* elf/Makefile: Add rules to build and run reldep9 test.
* elf/reldep9.c: New file.
* elf/reldep9mod1.c: New file.
* elf/reldep9mod2.c: New file.
* elf/reldep9mod3.c: New file.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
* elf/Makefile: Add rules to build and run nodelete2 test.
* elf/nodelete2.c: New file.
* elf/nodel2mod1.c: New file.
* elf/nodel2mod2.c: New file.
* elf/nodel2mod3.c: New file.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
2002-10-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* elf/tls-macros.h: Fix SH version of macros so as to match ABI syntax.
2002-10-03 Ulrich Drepper <drepper@redhat.com>
* version.h (RELEASE): Change to stable.
See ChangeLog.13 for earlier changes.
2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
* sysdeps/sh/tls.h: Likewise.
* sysdeps/unix/sysv/linux/sh/smp.h: New file.
* sysdeps/unix/x86_64/sysdep.S [USE_TLS && HAVE___THREAD] [! PIC]:
Use direct-%fs form of TLS access for errno.
* sysdeps/unix/sysv/linux/i386/i686/sysdep.h: File removed, since
the i386 version has all the same asm now.
* sysdeps/i386/elf/configure.in: Add @GOTNTPOFF and @NTPOFF uses to
the TLS support check.
* sysdeps/i386/elf/configure: Regenerated.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE_TLS && HAVE___THREAD]
(SYSCALL_ERROR_HANDLER): Use direct-%gs form of TLS access for errno.
* sysdeps/unix/i386/sysdep.S (syscall_error)
[USE_TLS && HAVE___THREAD]: Use TLS access for errno.
(libc: GLIBC_2.0) [USE_TLS && HAVE___THREAD]: Remove _errno, errno.
(libc: GLIBC_2.3) [USE_TLS && HAVE___THREAD]: Put errno here instead.
* resolv/Versions: Use %include <tls.h> to get USE_TLS defined.
(libc: GLIBC_2.0) [USE_TLS && HAVE___THREAD]: Remove _h_errno, h_errno,
and _res.
(libc: GLIBC_2.3) [USE_TLS && HAVE___THREAD]: Put h_errno, _res here.
* elf/tls-macros.h [__x86_64__] (TLS_LE, TLS_IE, TLS_LD, TLS_GD):
New macros for x86-64.
* sysdeps/unix/sysv/linux/alpha/bits/time.h: File removed.
It was indentical to the linux/bits/time.h file.
* nscd/nscd_gethst_r.c (nscd_gethst_r): Add a cast to silence warning.
* resolv/gethnamaddr.c (gethostbyaddr): Use socklen_t for SIZE.
2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
* elf/elf.h: Define R_SH_TLS_xxx macros.
* elf/rtld.c: Remove an extra parenthesis.
* elf/tls-macros.h: Define SH version TLS_LE, TLS_IE, TLS_LD and
TLS_GD macros.
* sysdeps/generic/dl-tls.c: Add a missing semi-colon.
* sysdeps/sh/dl-lookupcfg.h: New file.
* sysdeps/sh/dl-tls.h: New file.
* sysdeps/sh/dl-machine.h (elf_machine_type_class): Set
ELF_RTYPE_CLASS_PLT also for the three TLS relocations.
(elf_machine_rela): Handle R_SH_TLS_DTPMOD32, R_SH_TLS_DTPOFF32 and
R_SH_TLS_TPOFF32 relocations.
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.