aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-08-17 00:37:19 +0000
committerUlrich Drepper <drepper@redhat.com>2003-08-17 00:37:19 +0000
commit137ffcdc6effa6b3a750b1d0c228dae61b96adbc (patch)
treefcccdc24bd598da4d8c6dcf8ceb34abf4d7b6da0 /sysdeps/sparc
parent36a8cf1e48eda7d925454c3882dfc34ff0b887f3 (diff)
downloadglibc-137ffcdc6effa6b3a750b1d0c228dae61b96adbc.tar
glibc-137ffcdc6effa6b3a750b1d0c228dae61b96adbc.tar.gz
glibc-137ffcdc6effa6b3a750b1d0c228dae61b96adbc.tar.bz2
glibc-137ffcdc6effa6b3a750b1d0c228dae61b96adbc.zip
Update.
2003-08-16 Jakub Jelinek <jakub@redhat.com> * sysdeps/powerpc/powerpc32/sysdep.h (PSEUDO_ERRVAL, PSEUDO_RET_ERRVAL, ret_ERRVAL, PSEUDO_END_ERRVAL): Define. * sysdeps/powerpc/powerpc64/sysdep.h (PSEUDO_ERRVAL, PSEUDO_RET_ERRVAL, ret_ERRVAL, PSEUDO_END_ERRVAL): Define. * sysdeps/unix/alpha/sysdep.h (PSEUDO_ERRVAL, ret_ERRVAL, PSEUDO_END_ERRVAL): Define. * sysdeps/unix/mips/sysdep.h (PSEUDO_ERRVAL, ret_ERRVAL, PSEUDO_END_ERRVAL): Define. * sysdeps/unix/sparc/sysdep.h (PSEUDO_ERRVAL, ret_ERRVAL): Define. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (PSEUDO_ERRVAL, PSEUDO_END_ERRVAL, ret_ERRVAL): Define. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (PSEUDO_ERRVAL, PSEUDO_END_ERRVAL, ret_ERRVAL): Define. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (PSEUDO_ERRVAL): Define. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (PSEUDO_ERRVAL, PSEUDO_END_ERRVAL, ret_ERRVAL): Define. * sysdeps/unix/sysdep.h (PSEUDO_END_ERRVAL): Define. * sysdeps/unix/sysv/linux/syscalls.list (posix_fadvise64, posix_fadvise64_64): Remove. * sysdeps/unix/sysv/linux/alpha/syscalls.list (posix_fadvise64): Add V flag. * sysdeps/unix/sysv/linux/ia64/syscalls.list (posix_fadvise64): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list (posix_fadvise64): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (posix_fadvise64): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (posix_fadvise64): Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list (posix_fadvise64): Likewise. * sysdeps/unix/sysv/linux/i386/posix_fadvise64_64.S: Moved to... * sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: ...here. (__posix_fadvise64_l64): Fix a typo in fadvise64 syscall invocation. (__posix_fadvise64_l32): New function. * sysdeps/unix/sysv/linux/i386/Makefile: Revert last change. * sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions (libc): Export posix_fadvise64@@GLIBC_2.3.3. * sysdeps/unix/sysv/linux/s390/s390-32/Versions (libc): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/Versions (libc): Likewise. * sysdeps/unix/sysv/linux/posix_fadvise.c (posix_fadvise): Return error value. * sysdeps/unix/sysv/linux/posix_fadvise64.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (SYSCALL_ERROR_HANDLER): Use TLS errno/__libc_errno if USE___THREAD. 2003-08-15 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/sparc32/dl-machine.h (WEAKADDR): Remove. (elf_machine_matches_host): Remove weak extern stuff. Use GL(dl_hwcap) unconditionally and GL(dl_hwcap_mask) if SHARED. (elf_machine_runtime_setup, sparc_fixup_plt): Remove weak extern stuff. Use GL(dl_hwcap) unconditionally.
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h34
1 files changed, 7 insertions, 27 deletions
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index 45bb0bf152..f43b4788ef 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -40,12 +40,6 @@
#define OPCODE_SAVE_SP 0x9de3bfa8 /* save %sp, -(16+6)*4, %sp */
#define OPCODE_BA 0x30800000 /* b,a ?; add PC-rel word address */
-/* Protect some broken versions of gcc from misinterpreting weak addresses. */
-#define WEAKADDR(x) ({ __typeof(x) *_px = &x; \
- __asm ("" : "=r" (_px) : "0" (_px)); \
- _px; })
-
-
/* Use a different preload file when running in 32-bit emulation mode
on a 64-bit host. */
#define LD_SO_PRELOAD ((GL(dl_hwcap) & HWCAP_SPARC_V9) \
@@ -61,16 +55,13 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr)
return 1;
else if (ehdr->e_machine == EM_SPARC32PLUS)
{
- unsigned long *hwcap;
-#ifndef SHARED
- weak_extern (_dl_hwcap);
- weak_extern (_dl_hwcap_mask);
-#endif
-
- hwcap = WEAKADDR (GL(dl_hwcap));
/* XXX The following is wrong! Dave Miller rejected to implement it
correctly. If this causes problems shoot *him*! */
- return hwcap == NULL || (*hwcap & GL(dl_hwcap_mask) & HWCAP_SPARC_V9);
+#ifdef SHARED
+ return GL(dl_hwcap) & GL(dl_hwcap_mask) & HWCAP_SPARC_V9;
+#else
+ return GL(dl_hwcap) & HWCAP_SPARC_V9;
+#endif
}
else
return 0;
@@ -170,17 +161,12 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
|| __builtin_expect (l->l_info [VALIDX (DT_GNU_LIBLISTSZ)] != NULL, 0))
{
/* Need to reinitialize .plt to undo prelinking. */
- unsigned long *hwcap;
int do_flush;
Elf32_Rela *rela = (Elf32_Rela *) D_PTR (l, l_info[DT_JMPREL]);
Elf32_Rela *relaend
= (Elf32_Rela *) ((char *) rela
+ l->l_info[DT_PLTRELSZ]->d_un.d_val);
-#ifndef SHARED
- weak_extern (_dl_hwcap);
-#endif
- hwcap = WEAKADDR (GL(dl_hwcap));
- do_flush = (!hwcap || (*hwcap & HWCAP_SPARC_FLUSH));
+ do_flush = GL(dl_hwcap) & HWCAP_SPARC_FLUSH;
/* prelink must ensure there are no R_SPARC_NONE relocs left
in .rela.plt. */
@@ -367,13 +353,7 @@ sparc_fixup_plt (const Elf32_Rela *reloc, Elf32_Addr *reloc_addr,
#ifndef RTLD_BOOTSTRAP
/* Note that we don't mask the hwcap here, as the flush is essential to
functionality on those cpu's that implement it. */
- unsigned long *hwcap;
- int do_flush;
-# ifndef SHARED
- weak_extern (_dl_hwcap);
-# endif
- hwcap = WEAKADDR (GL(dl_hwcap));
- do_flush = (!hwcap || (*hwcap & HWCAP_SPARC_FLUSH));
+ int do_flush = GL(dl_hwcap) & HWCAP_SPARC_FLUSH;
#else
/* Unfortunately, this is necessary, so that we can ensure
ld.so will not execute corrupt PLT entry instructions. */