From 4dbb64174c5cc00dc2aa40784b57889f8e0b6c5e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 7 Jul 2001 22:59:32 +0000 Subject: Update. 2001-07-06 Jakub Jelinek * sysdeps/unix/sysv/linux/i386/sigaction.c (RESTORE2): Put asm explicitly into .text section. 2001-04-16 Jes Sorensen * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (struct sigcontext): Add 16 longwords reserved for future use to match changes in the kernel. 2001-07-03 Jes Sorensen * sysdeps/ia64/strncpy.S: Call strnlen() when determining the string length rather than strlen(). Solves the performance problem of doing strlen on a 5MB string when strncpy was called with a length argument of 5 bytes. 2001-07-02 Jakub Jelinek * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Handle R_SPARC_UA16 and R_SPARC_UA32. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. 2001-07-01 Stephen L Moshier * sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): acosh(x) = ln(2x) if x > 2^30. * sysdeps/ieee754/ldbl-128/e_acoshl.c (__ieee754_acoshl): acosh(x) = ln(2x) if x > 2^54. * sysdeps/hppa/dl-machine.h (elf_machine_rela): Handle relocs --- sysdeps/ia64/strncpy.S | 9 +++++---- sysdeps/ieee754/ldbl-128/e_acoshl.c | 2 +- sysdeps/sparc/sparc32/dl-machine.h | 10 ++++++++++ sysdeps/sparc/sparc64/dl-machine.h | 10 ++++++++++ sysdeps/unix/sysv/linux/i386/sigaction.c | 6 ++++-- sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h | 1 + 6 files changed, 31 insertions(+), 7 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/ia64/strncpy.S b/sysdeps/ia64/strncpy.S index 17d6772..051fefa 100644 --- a/sysdeps/ia64/strncpy.S +++ b/sysdeps/ia64/strncpy.S @@ -25,8 +25,8 @@ in1: src in2: char count - If n >= 24, do a memcpy(dest, src, min(strlen(src)+1, n)), followed by a - memset(dest + strlen(src), 0, n - strlen(src) - 1) if necessary. + If n >= 24, do a memcpy(dest, src, min(strnlen(src, n)+1, n)), followed by a + memset(dest + strlen(src, n), 0, n - strlen(src, n) - 1) if necessary. Otherwise, copy characters one by one and fill with nulls if necessary. */ @@ -58,8 +58,9 @@ ENTRY(strncpy) cmp.gtu p6, p0 = 24, n (p6) br.cond.spnt .cpyfew mov out0 = src - mov tmp = gp ;; - br.call.sptk.many b0 = strlen# ;; // rc = strlen(src); + mov out1 = n + mov tmp = gp + br.call.sptk.many b0 = strnlen# ;; // rc = strnlen(src, n); add len = 1, rc // include the null in len mov gp = tmp mov out0 = dest ;; diff --git a/sysdeps/ieee754/ldbl-128/e_acoshl.c b/sysdeps/ieee754/ldbl-128/e_acoshl.c index 7f79340..62170d4 100644 --- a/sysdeps/ieee754/ldbl-128/e_acoshl.c +++ b/sysdeps/ieee754/ldbl-128/e_acoshl.c @@ -51,7 +51,7 @@ ln2 = 0.6931471805599453094172321214581766L; GET_LDOUBLE_WORDS64(hx,lx,x); if(hx<0x3fff000000000000LL) { /* x < 1 */ return (x-x)/(x-x); - } else if(hx >=0x401b000000000000LL) { /* x > 2**28 */ + } else if(hx >=0x4035000000000000LL) { /* x > 2**54 */ if(hx >=0x7fff000000000000LL) { /* x is inf of NaN */ return x+x; } else diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h index 542e84a..460421d 100644 --- a/sysdeps/sparc/sparc32/dl-machine.h +++ b/sysdeps/sparc/sparc32/dl-machine.h @@ -434,6 +434,16 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, case R_SPARC_HI22: *reloc_addr = (*reloc_addr & 0xffc00000) | (value >> 10); break; + case R_SPARC_UA16: + ((unsigned char *) reloc_addr) [0] = value >> 8; + ((unsigned char *) reloc_addr) [1] = value; + break; + case R_SPARC_UA32: + ((unsigned char *) reloc_addr) [0] = value >> 24; + ((unsigned char *) reloc_addr) [1] = value >> 16; + ((unsigned char *) reloc_addr) [2] = value >> 8; + ((unsigned char *) reloc_addr) [3] = value; + break; #endif case R_SPARC_NONE: /* Alright, Wilbur. */ break; diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index c63dc07..b7f2d62 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -338,6 +338,16 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, elf_machine_fixup_plt(map, 0, reloc, reloc_addr, value); break; #ifndef RTLD_BOOTSTRAP + case R_SPARC_UA16: + ((unsigned char *) reloc_addr) [0] = value >> 8; + ((unsigned char *) reloc_addr) [1] = value; + break; + case R_SPARC_UA32: + ((unsigned char *) reloc_addr) [0] = value >> 24; + ((unsigned char *) reloc_addr) [1] = value >> 16; + ((unsigned char *) reloc_addr) [2] = value >> 8; + ((unsigned char *) reloc_addr) [3] = value; + break; case R_SPARC_UA64: if (! ((long) reloc_addr & 3)) { diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c index fe0a192..773101f 100644 --- a/sysdeps/unix/sysv/linux/i386/sigaction.c +++ b/sysdeps/unix/sysv/linux/i386/sigaction.c @@ -163,7 +163,8 @@ weak_alias (__libc_sigaction, sigaction) #define RESTORE2(name, syscall) \ asm \ ( \ - ".align 16\n" \ + ".text\n" \ + " .align 16\n" \ "__" #name ":\n" \ " movl $" #syscall ", %eax\n" \ " int $0x80" \ @@ -179,7 +180,8 @@ RESTORE (restore_rt, __NR_rt_sigreturn) # define RESTORE2(name, syscall) \ asm \ ( \ - ".align 8\n" \ + ".text\n" \ + " .align 8\n" \ "__" #name ":\n" \ " popl %eax\n" \ " movl $" #syscall ", %eax\n" \ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h index 8f9e604..d86bf66 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h @@ -48,6 +48,7 @@ struct sigcontext unsigned long int sc_br[8]; /* branch registers */ unsigned long int sc_gr[32]; /* general registers (static partition) */ struct ia64_fpreg sc_fr[128]; /* floating-point registers */ + unsigned long int sc_rsvd[16];/* reserved for future use */ /* sc_mask is actually an sigset_t but we don't want to * include the kernel headers here. */ -- cgit v1.1