forked from pool/glibc
Accepting request 98264 from home:a_jaeger:my-factory-packages
Update to glibc 2.15 - do not forward to Factory yet. OBS-URL: https://build.opensuse.org/request/show/98264 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=144
This commit is contained in:
parent
44b0bcb29e
commit
b5ae287187
@ -13,7 +13,7 @@ Index: sysdeps/posix/getaddrinfo.c
|
|||||||
{
|
{
|
||||||
const struct gaih_typeproto *tp = gaih_inet_typeproto;
|
const struct gaih_typeproto *tp = gaih_inet_typeproto;
|
||||||
struct gaih_servtuple *st = (struct gaih_servtuple *) &nullserv;
|
struct gaih_servtuple *st = (struct gaih_servtuple *) &nullserv;
|
||||||
@@ -766,7 +766,7 @@ gaih_inet (const char *name, const struc
|
@@ -935,7 +935,7 @@ gaih_inet (const char *name, const struc
|
||||||
if (fct != NULL)
|
if (fct != NULL)
|
||||||
{
|
{
|
||||||
if (req->ai_family == AF_INET6
|
if (req->ai_family == AF_INET6
|
||||||
@ -22,7 +22,7 @@ Index: sysdeps/posix/getaddrinfo.c
|
|||||||
{
|
{
|
||||||
gethosts (AF_INET6, struct in6_addr);
|
gethosts (AF_INET6, struct in6_addr);
|
||||||
no_inet6_data = no_data;
|
no_inet6_data = no_data;
|
||||||
@@ -2157,7 +2157,7 @@ getaddrinfo (const char *name, const cha
|
@@ -2418,7 +2418,7 @@ getaddrinfo (const char *name, const cha
|
||||||
if (hints->ai_family == AF_UNSPEC || hints->ai_family == AF_INET
|
if (hints->ai_family == AF_UNSPEC || hints->ai_family == AF_INET
|
||||||
|| hints->ai_family == AF_INET6)
|
|| hints->ai_family == AF_INET6)
|
||||||
{
|
{
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
From http://sourceware.org/bugzilla/show_bug.cgi?id=10855
|
|
||||||
|
|
||||||
2009-10-27 Aurelien Jarno <aurelien@aurel32.net>
|
|
||||||
|
|
||||||
* locale/programs/locarchive.c: use MMAP_SHARED to reserve memory
|
|
||||||
used later with MMAP_FIXED | MMAP_SHARED to cope with different
|
|
||||||
alignment restrictions.
|
|
||||||
|
|
||||||
--- a/locale/programs/locarchive.c
|
|
||||||
+++ b/locale/programs/locarchive.c
|
|
||||||
@@ -134,7 +134,7 @@
|
|
||||||
size_t reserved = RESERVE_MMAP_SIZE;
|
|
||||||
int xflags = 0;
|
|
||||||
if (total < reserved
|
|
||||||
- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
|
|
||||||
+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
|
|
||||||
-1, 0)) != MAP_FAILED))
|
|
||||||
xflags = MAP_FIXED;
|
|
||||||
else
|
|
||||||
@@ -397,7 +397,7 @@
|
|
||||||
size_t reserved = RESERVE_MMAP_SIZE;
|
|
||||||
int xflags = 0;
|
|
||||||
if (total < reserved
|
|
||||||
- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
|
|
||||||
+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
|
|
||||||
-1, 0)) != MAP_FAILED))
|
|
||||||
xflags = MAP_FIXED;
|
|
||||||
else
|
|
||||||
@@ -615,7 +615,7 @@
|
|
||||||
int xflags = 0;
|
|
||||||
void *p;
|
|
||||||
if (st.st_size < reserved
|
|
||||||
- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
|
|
||||||
+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
|
|
||||||
-1, 0)) != MAP_FAILED))
|
|
||||||
xflags = MAP_FIXED;
|
|
||||||
else
|
|
@ -1,33 +0,0 @@
|
|||||||
commit 5615eaf26469f20c2d8c3be5770e12564a1edfff
|
|
||||||
Author: Roland McGrath <roland@hack.frob.com>
|
|
||||||
Date: Fri Jun 10 12:45:09 2011 -0700
|
|
||||||
|
|
||||||
Quash some new warnings from GCC 4.6.
|
|
||||||
|
|
||||||
2011-06-10 Roland McGrath <roland@hack.frob.com>
|
|
||||||
|
|
||||||
* elf/dl-open.c (_dl_open): Quash warnings when DL_NNS==1.
|
|
||||||
|
|
||||||
diff --git a/elf/dl-open.c b/elf/dl-open.c
|
|
||||||
index 8d90b56..19fda91 100644
|
|
||||||
--- a/elf/dl-open.c
|
|
||||||
+++ b/elf/dl-open.c
|
|
||||||
@@ -516,7 +516,7 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
|
|
||||||
if (__builtin_expect (nsid == LM_ID_NEWLM, 0))
|
|
||||||
{
|
|
||||||
/* Find a new namespace. */
|
|
||||||
- for (nsid = 1; nsid < GL(dl_nns); ++nsid)
|
|
||||||
+ for (nsid = 1; DL_NNS > 1 && nsid < GL(dl_nns); ++nsid)
|
|
||||||
if (GL(dl_ns)[nsid]._ns_loaded == NULL)
|
|
||||||
break;
|
|
||||||
|
|
||||||
@@ -528,8 +528,7 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
|
|
||||||
_dl_signal_error (EINVAL, file, NULL, N_("\
|
|
||||||
no more namespaces available for dlmopen()"));
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- if (nsid == GL(dl_nns))
|
|
||||||
+ else if (nsid == GL(dl_nns))
|
|
||||||
{
|
|
||||||
__rtld_lock_initialize (GL(dl_ns)[nsid]._ns_unique_sym_table.lock);
|
|
||||||
++GL(dl_nns);
|
|
@ -1,24 +0,0 @@
|
|||||||
# patch to fix printf when register_printf_function is in use and the format to
|
|
||||||
# printf contains more than 64 elements.
|
|
||||||
#
|
|
||||||
# extend_alloca modifies nspecs_max (2nd arg) with the size of the space, not the
|
|
||||||
# number of elements. Use a temporary to store the return value. Explicitly set the correct size.
|
|
||||||
#
|
|
||||||
# bnc#733140
|
|
||||||
#
|
|
||||||
# Rich Coe (rcoe@wi.rr.com)
|
|
||||||
#
|
|
||||||
--- stdio-common/vfprintf.c.orig 2011-11-28 11:53:32.937976831 -0600
|
|
||||||
+++ stdio-common/vfprintf.c 2011-11-28 16:07:35.546839533 -0600
|
|
||||||
@@ -1683,8 +1683,10 @@ do_positional:
|
|
||||||
{
|
|
||||||
/* Extend the array of format specifiers. */
|
|
||||||
struct printf_spec *old = specs;
|
|
||||||
- specs = extend_alloca (specs, nspecs_max,
|
|
||||||
+ size_t nsize = nspecs_max;
|
|
||||||
+ specs = extend_alloca (specs, nsize,
|
|
||||||
2 * nspecs_max * sizeof (*specs));
|
|
||||||
+ nspecs_max = 2 * nspecs_max;
|
|
||||||
|
|
||||||
/* Copy the old array's elements to the new space. */
|
|
||||||
memmove (specs, old, nspecs * sizeof (struct printf_spec));
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:5a1f7ea9ea887d7d0e7174d76b9f2b99aceae9efedc9d0c708446ae5a2fd4f35
|
|
||||||
size 15650076
|
|
@ -1,569 +0,0 @@
|
|||||||
commit d53a73acdbf6ac6eb99cd06f5dd695da58d9e8f5
|
|
||||||
Author: Ulrich Drepper <drepper@gmail.com>
|
|
||||||
Date: Tue Sep 6 20:22:37 2011 -0400
|
|
||||||
|
|
||||||
Avoid gettimeofday vsyscall
|
|
||||||
|
|
||||||
2011-09-06 Ulrich Drepper <drepper@gmail.com>
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Don't use
|
|
||||||
gettimeofday vsyscall, just use time.
|
|
||||||
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
|
|
||||||
index b9bae3d..7feb7a1 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/getsysstats.c
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/getsysstats.c
|
|
||||||
@@ -37,15 +37,6 @@
|
|
||||||
#include <not-cancel.h>
|
|
||||||
#include <kernel-features.h>
|
|
||||||
|
|
||||||
-#ifndef HAVE_CLOCK_GETTIME_VSYSCALL
|
|
||||||
-# undef INTERNAL_VSYSCALL
|
|
||||||
-# define INTERNAL_VSYSCALL INTERNAL_SYSCALL
|
|
||||||
-# undef INLINE_VSYSCALL
|
|
||||||
-# define INLINE_VSYSCALL INLINE_SYSCALL
|
|
||||||
-#else
|
|
||||||
-# include <bits/libc-vdso.h>
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
|
|
||||||
/* How we can determine the number of available processors depends on
|
|
||||||
the configuration. There is currently (as of version 2.0.21) no
|
|
||||||
@@ -141,17 +132,10 @@ __get_nprocs ()
|
|
||||||
static int cached_result;
|
|
||||||
static time_t timestamp;
|
|
||||||
|
|
||||||
-#ifdef __ASSUME_POSIX_TIMERS
|
|
||||||
- struct timespec ts;
|
|
||||||
- INTERNAL_SYSCALL_DECL (err);
|
|
||||||
- INTERNAL_VSYSCALL (clock_gettime, err, 2, CLOCK_REALTIME, &ts);
|
|
||||||
-#else
|
|
||||||
- struct timeval ts;
|
|
||||||
- __gettimeofday (&ts, NULL);
|
|
||||||
-#endif
|
|
||||||
+ time_t now = time (NULL);
|
|
||||||
time_t prev = timestamp;
|
|
||||||
atomic_read_barrier ();
|
|
||||||
- if (ts.tv_sec == prev)
|
|
||||||
+ if (now == prev)
|
|
||||||
return cached_result;
|
|
||||||
|
|
||||||
/* XXX Here will come a test for the new system call. */
|
|
||||||
@@ -243,7 +227,7 @@ __get_nprocs ()
|
|
||||||
out:
|
|
||||||
cached_result = result;
|
|
||||||
atomic_write_barrier ();
|
|
||||||
- timestamp = ts.tv_sec;
|
|
||||||
+ timestamp = now;
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
commit a77d3c17dc6517636c1cf6ab9c6bb8c257772354
|
|
||||||
Author: Ulrich Drepper <drepper@gmail.com>
|
|
||||||
Date: Tue Sep 6 21:34:11 2011 -0400
|
|
||||||
|
|
||||||
Don't unconditionally use clock_gettime vsyscall on x86-64
|
|
||||||
|
|
||||||
2011-09-06 Ulrich Drepper <drepper@gmail.com>
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/clock_gettime.c: New file.
|
|
||||||
* sysdeps/unix/sysv/linux/clock_gettime.c (SYSCALL_GETTIME): Allow
|
|
||||||
already be defined. Change to take two parameters and don't assign
|
|
||||||
result to variable. Adjust all users.
|
|
||||||
Define INTERNAL_GETTIME if not already defined.
|
|
||||||
Use INTERNAL_GETTIME instead of INTERNAL_VSYSCALL got clock_gettime
|
|
||||||
call.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Don't define
|
|
||||||
HAVE_CLOCK_GETTIME_VSYSCALL.
|
|
||||||
* sysdeps/unix/clock_gettime.c: Adjust use of SYSDEP_GETTIME_CPU.
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c
|
|
||||||
index fbaaf30..d467f2b 100644
|
|
||||||
--- a/sysdeps/unix/clock_gettime.c
|
|
||||||
+++ b/sysdeps/unix/clock_gettime.c
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/* clock_gettime -- Get the current time from a POSIX clockid_t. Unix version.
|
|
||||||
- Copyright (C) 1999-2004, 2005, 2007 Free Software Foundation, Inc.
|
|
||||||
+ Copyright (C) 1999-2004, 2005, 2007, 2011 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
@@ -113,7 +113,7 @@ clock_gettime (clockid_t clock_id, struct timespec *tp)
|
|
||||||
|
|
||||||
default:
|
|
||||||
#ifdef SYSDEP_GETTIME_CPU
|
|
||||||
- SYSDEP_GETTIME_CPU;
|
|
||||||
+ retval = SYSDEP_GETTIME_CPU (clock_id, tp);
|
|
||||||
#endif
|
|
||||||
#if HP_TIMING_AVAIL
|
|
||||||
if ((clock_id & ((1 << CLOCK_IDFIELD_SIZE) - 1))
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c
|
|
||||||
index dd3755c..0ae45de 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/clock_gettime.c
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/clock_gettime.c
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/* clock_gettime -- Get current time from a POSIX clockid_t. Linux version.
|
|
||||||
- Copyright (C) 2003,2004,2005,2006,2007,2010 Free Software Foundation, Inc.
|
|
||||||
+ Copyright (C) 2003,2004,2005,2006,2007,2010,2011 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
@@ -32,9 +32,14 @@
|
|
||||||
# include <bits/libc-vdso.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#define SYSCALL_GETTIME \
|
|
||||||
- retval = INLINE_VSYSCALL (clock_gettime, 2, clock_id, tp); \
|
|
||||||
- break
|
|
||||||
+#ifndef SYSCALL_GETTIME
|
|
||||||
+# define SYSCALL_GETTIME(id, tp) \
|
|
||||||
+ INLINE_VSYSCALL (clock_gettime, 2, id, tp)
|
|
||||||
+#endif
|
|
||||||
+#ifndef INTERNAL_GETTIME
|
|
||||||
+# define INTERNAL_GETTIME(id, tp) \
|
|
||||||
+ INTERNAL_VSYSCALL (clock_gettime, err, 2, id, tp)
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#ifdef __ASSUME_POSIX_TIMERS
|
|
||||||
|
|
||||||
@@ -44,7 +49,8 @@
|
|
||||||
SYSDEP_GETTIME_CPUTIME \
|
|
||||||
case CLOCK_REALTIME: \
|
|
||||||
case CLOCK_MONOTONIC: \
|
|
||||||
- SYSCALL_GETTIME
|
|
||||||
+ retval = SYSCALL_GETTIME (clock_id, tp); \
|
|
||||||
+ break
|
|
||||||
|
|
||||||
# define __libc_missing_posix_timers 0
|
|
||||||
#elif defined __NR_clock_gettime
|
|
||||||
@@ -59,7 +65,7 @@ maybe_syscall_gettime (clockid_t clock_id, struct timespec *tp)
|
|
||||||
if (!__libc_missing_posix_timers)
|
|
||||||
{
|
|
||||||
INTERNAL_SYSCALL_DECL (err);
|
|
||||||
- int r = INTERNAL_VSYSCALL (clock_gettime, err, 2, clock_id, tp);
|
|
||||||
+ int r = INTERNAL_GETTIME (clock_id, tp);
|
|
||||||
if (!INTERNAL_SYSCALL_ERROR_P (r, err))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
@@ -89,7 +95,7 @@ maybe_syscall_gettime (clockid_t clock_id, struct timespec *tp)
|
|
||||||
/* Fallback code. */ \
|
|
||||||
if (retval == EINVAL && clock_id == CLOCK_REALTIME) \
|
|
||||||
retval = realtime_gettime (tp); \
|
|
||||||
- else \
|
|
||||||
+ else \
|
|
||||||
{ \
|
|
||||||
__set_errno (retval); \
|
|
||||||
retval = -1; \
|
|
||||||
@@ -119,7 +125,7 @@ maybe_syscall_gettime_cpu (clockid_t clock_id, struct timespec *tp)
|
|
||||||
if (!__libc_missing_posix_cpu_timers)
|
|
||||||
{
|
|
||||||
INTERNAL_SYSCALL_DECL (err);
|
|
||||||
- int r = INTERNAL_VSYSCALL (clock_gettime, err, 2, clock_id, tp);
|
|
||||||
+ int r = INTERNAL_GETTIME (clock_id, tp);
|
|
||||||
if (!INTERNAL_SYSCALL_ERROR_P (r, err))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..9d6cd23
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
|
|
||||||
@@ -0,0 +1,10 @@
|
|
||||||
+#include "bits/libc-vdso.h"
|
|
||||||
+
|
|
||||||
+#ifdef SHARED
|
|
||||||
+# define SYSCALL_GETTIME(id, tp) \
|
|
||||||
+ (*__vdso_clock_gettime) (id, tp)
|
|
||||||
+# define INTERNAL_GETTIME(id, tp) \
|
|
||||||
+ (*__vdso_clock_gettime) (id, tp)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#include "../clock_gettime.c"
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
|
|
||||||
index 2b9ea85..a9821dc 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-/* Copyright (C) 2001-2005, 2007 Free Software Foundation, Inc.
|
|
||||||
+/* Copyright (C) 2001-2005, 2007, 2011 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
@@ -279,8 +279,8 @@
|
|
||||||
if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \
|
|
||||||
{ \
|
|
||||||
iserr: \
|
|
||||||
- __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)); \
|
|
||||||
- sc_ret = -1L; \
|
|
||||||
+ __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)); \
|
|
||||||
+ sc_ret = -1L; \
|
|
||||||
} \
|
|
||||||
out: \
|
|
||||||
sc_ret; \
|
|
||||||
@@ -304,9 +304,6 @@
|
|
||||||
v_ret; \
|
|
||||||
})
|
|
||||||
|
|
||||||
-/* List of system calls which are supported as vsyscalls. */
|
|
||||||
-# define HAVE_CLOCK_GETTIME_VSYSCALL 1
|
|
||||||
-
|
|
||||||
# else
|
|
||||||
# define INLINE_VSYSCALL(name, nr, args...) \
|
|
||||||
INLINE_SYSCALL (name, nr, ##args)
|
|
||||||
|
|
||||||
commit a0e1f41bd487d2202b6c1e0802c0e6c91630fbea
|
|
||||||
Author: Ulrich Drepper <drepper@gmail.com>
|
|
||||||
Date: Tue Sep 6 23:17:53 2011 -0400
|
|
||||||
|
|
||||||
Don't call gettimeofday vsyscall in x86-64 sem_timedwait
|
|
||||||
|
|
||||||
2011-09-06 Ulrich Drepper <drepper@gmail.com>
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
|
|
||||||
use gettimeofday vsyscall, just call gettimeofday.
|
|
||||||
|
|
||||||
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
|
|
||||||
index ca49cb8..2926b36 100644
|
|
||||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
|
|
||||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-/* Copyright (C) 2002,2003,2005,2007,2009,2010 Free Software Foundation, Inc.
|
|
||||||
+/* Copyright (C) 2002,2003,2005,2007,2009,2010,2011 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
|
||||||
|
|
||||||
@@ -24,10 +24,6 @@
|
|
||||||
#include <pthread-errnos.h>
|
|
||||||
#include <structsem.h>
|
|
||||||
|
|
||||||
-
|
|
||||||
-/* For the calculation see asm/vsyscall.h. */
|
|
||||||
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
|
|
||||||
-
|
|
||||||
.text
|
|
||||||
|
|
||||||
.globl sem_timedwait
|
|
||||||
@@ -212,9 +208,10 @@ sem_timedwait:
|
|
||||||
addq $1, NWAITERS(%r12)
|
|
||||||
|
|
||||||
7: xorl %esi, %esi
|
|
||||||
- movq %rsp, %rdi
|
|
||||||
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
|
||||||
- callq *%rax
|
|
||||||
+ movq %rsp,%rdi
|
|
||||||
+ /* This call works because we directly jump to a system call entry
|
|
||||||
+ which preserves all the registers. */
|
|
||||||
+ call JUMPTARGET(__gettimeofday)
|
|
||||||
|
|
||||||
/* Compute relative timeout. */
|
|
||||||
movq 8(%rsp), %rax
|
|
||||||
|
|
||||||
commit fc8bffcccf5821bca179486abef83a7f82526715
|
|
||||||
Author: Ulrich Drepper <drepper@gmail.com>
|
|
||||||
Date: Tue Sep 6 23:50:04 2011 -0400
|
|
||||||
|
|
||||||
Fix handling of __vdso_clock_gettime
|
|
||||||
|
|
||||||
2011-09-06 Ulrich Drepper <drepper@gmail.com>
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/clock_gettime.c (INTERNAL_GETTIME):
|
|
||||||
Forgot to demangle the pointer.
|
|
||||||
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
|
|
||||||
index 9d6cd23..7802701 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
|
|
||||||
@@ -2,9 +2,13 @@
|
|
||||||
|
|
||||||
#ifdef SHARED
|
|
||||||
# define SYSCALL_GETTIME(id, tp) \
|
|
||||||
- (*__vdso_clock_gettime) (id, tp)
|
|
||||||
+ ({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
|
|
||||||
+ PTR_DEMANGLE (f); \
|
|
||||||
+ f (id, tp); })
|
|
||||||
# define INTERNAL_GETTIME(id, tp) \
|
|
||||||
- (*__vdso_clock_gettime) (id, tp)
|
|
||||||
+ ({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
|
|
||||||
+ PTR_DEMANGLE (f); \
|
|
||||||
+ f (id, tp); })
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "../clock_gettime.c"
|
|
||||||
|
|
||||||
commit 9e5c9dcd57e80cd56c47fd2bf11de8d167176a0e
|
|
||||||
Author: Ulrich Drepper <drepper@gmail.com>
|
|
||||||
Date: Wed Sep 7 00:14:06 2011 -0400
|
|
||||||
|
|
||||||
Remove gettimeofday vsyscall use from x86-86 libpthread
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
|
|
||||||
Likewise.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
|
|
||||||
Likewise.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
|
|
||||||
Simplify __vdso_clock_gettime use.
|
|
||||||
|
|
||||||
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
|
|
||||||
index 3195db2..018da0c 100644
|
|
||||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
|
|
||||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-/* Copyright (C) 2002-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
+/* Copyright (C) 2002-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
|
||||||
|
|
||||||
@@ -68,10 +68,6 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
-/* For the calculation see asm/vsyscall.h. */
|
|
||||||
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
|
|
||||||
-
|
|
||||||
-
|
|
||||||
.globl __lll_lock_wait_private
|
|
||||||
.type __lll_lock_wait_private,@function
|
|
||||||
.hidden __lll_lock_wait_private
|
|
||||||
@@ -250,10 +246,9 @@ __lll_timedlock_wait:
|
|
||||||
/* Get current time. */
|
|
||||||
movq %rsp, %rdi
|
|
||||||
xorl %esi, %esi
|
|
||||||
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
|
||||||
- /* This is a regular function call, all caller-save registers
|
|
||||||
- might be clobbered. */
|
|
||||||
- callq *%rax
|
|
||||||
+ /* This call works because we directly jump to a system call entry
|
|
||||||
+ which preserves all the registers. */
|
|
||||||
+ call JUMPTARGET(__gettimeofday)
|
|
||||||
|
|
||||||
/* Compute relative timeout. */
|
|
||||||
movq 8(%rsp), %rax
|
|
||||||
@@ -402,8 +397,9 @@ __lll_timedwait_tid:
|
|
||||||
/* Get current time. */
|
|
||||||
2: movq %rsp, %rdi
|
|
||||||
xorl %esi, %esi
|
|
||||||
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
|
||||||
- callq *%rax
|
|
||||||
+ /* This call works because we directly jump to a system call entry
|
|
||||||
+ which preserves all the registers. */
|
|
||||||
+ call JUMPTARGET(__gettimeofday)
|
|
||||||
|
|
||||||
/* Compute relative timeout. */
|
|
||||||
movq 8(%rsp), %rax
|
|
||||||
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
|
|
||||||
index 5218a4f..b7b8b34 100644
|
|
||||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
|
|
||||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-/* Copyright (C) 2002=2007, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
+/* Copyright (C) 2002, 2011=2007, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
|
||||||
|
|
||||||
@@ -50,9 +50,6 @@
|
|
||||||
orl $FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME, reg
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-/* For the calculation see asm/vsyscall.h. */
|
|
||||||
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
|
|
||||||
-
|
|
||||||
|
|
||||||
.globl __lll_robust_lock_wait
|
|
||||||
.type __lll_robust_lock_wait,@function
|
|
||||||
@@ -219,10 +216,9 @@ __lll_robust_timedlock_wait:
|
|
||||||
/* Get current time. */
|
|
||||||
movq %rsp, %rdi
|
|
||||||
xorl %esi, %esi
|
|
||||||
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
|
||||||
- /* This is a regular function call, all caller-save registers
|
|
||||||
- might be clobbered. */
|
|
||||||
- callq *%rax
|
|
||||||
+ /* This call works because we directly jump to a system call entry
|
|
||||||
+ which preserves all the registers. */
|
|
||||||
+ call JUMPTARGET(__gettimeofday)
|
|
||||||
|
|
||||||
/* Compute relative timeout. */
|
|
||||||
movq 8(%rsp), %rax
|
|
||||||
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
|
|
||||||
index 48ea8b9..d11b297 100644
|
|
||||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
|
|
||||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
|
|
||||||
@@ -26,9 +26,6 @@
|
|
||||||
|
|
||||||
#include <kernel-features.h>
|
|
||||||
|
|
||||||
-/* For the calculation see asm/vsyscall.h. */
|
|
||||||
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
|
|
||||||
-
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
@@ -453,13 +450,11 @@ __pthread_cond_timedwait:
|
|
||||||
movq __vdso_clock_gettime@GOTPCREL(%rip), %rax
|
|
||||||
movq (%rax), %rax
|
|
||||||
PTR_DEMANGLE (%rax)
|
|
||||||
- jz 26f
|
|
||||||
call *%rax
|
|
||||||
- jmp 27f
|
|
||||||
-# endif
|
|
||||||
-26: movl $__NR_clock_gettime, %eax
|
|
||||||
+# else
|
|
||||||
+ movl $__NR_clock_gettime, %eax
|
|
||||||
syscall
|
|
||||||
-27:
|
|
||||||
+# endif
|
|
||||||
# ifndef __ASSUME_POSIX_TIMERS
|
|
||||||
cmpq $-ENOSYS, %rax
|
|
||||||
je 19f
|
|
||||||
@@ -473,8 +468,9 @@ __pthread_cond_timedwait:
|
|
||||||
# else
|
|
||||||
leaq 24(%rsp), %rdi
|
|
||||||
xorl %esi, %esi
|
|
||||||
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
|
||||||
- callq *%rax
|
|
||||||
+ /* This call works because we directly jump to a system call entry
|
|
||||||
+ which preserves all the registers. */
|
|
||||||
+ call JUMPTARGET(__gettimeofday)
|
|
||||||
|
|
||||||
/* Compute relative timeout. */
|
|
||||||
movq 40(%rsp), %rax
|
|
||||||
@@ -611,8 +607,9 @@ __pthread_cond_timedwait:
|
|
||||||
/* clock_gettime not available. */
|
|
||||||
19: leaq 32(%rsp), %rdi
|
|
||||||
xorl %esi, %esi
|
|
||||||
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
|
||||||
- callq *%rax
|
|
||||||
+ /* This call works because we directly jump to a system call entry
|
|
||||||
+ which preserves all the registers. */
|
|
||||||
+ call JUMPTARGET(__gettimeofday)
|
|
||||||
|
|
||||||
/* Compute relative timeout. */
|
|
||||||
movq 40(%rsp), %rax
|
|
||||||
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
|
|
||||||
index f5d055c..0e6a6ee 100644
|
|
||||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
|
|
||||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
+/* Copyright (C) 2002-2005,2007,2009,2010,2011 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
|
||||||
|
|
||||||
@@ -23,10 +23,6 @@
|
|
||||||
#include <pthread-errnos.h>
|
|
||||||
#include <kernel-features.h>
|
|
||||||
|
|
||||||
-
|
|
||||||
-/* For the calculation see asm/vsyscall.h. */
|
|
||||||
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
|
|
||||||
-
|
|
||||||
.text
|
|
||||||
|
|
||||||
.globl pthread_rwlock_timedrdlock
|
|
||||||
@@ -123,8 +119,9 @@ pthread_rwlock_timedrdlock:
|
|
||||||
/* Get current time. */
|
|
||||||
movq %rsp, %rdi
|
|
||||||
xorl %esi, %esi
|
|
||||||
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
|
||||||
- callq *%rax
|
|
||||||
+ /* This call works because we directly jump to a system call entry
|
|
||||||
+ which preserves all the registers. */
|
|
||||||
+ call JUMPTARGET(__gettimeofday)
|
|
||||||
|
|
||||||
/* Compute relative timeout. */
|
|
||||||
movq 8(%rsp), %rax
|
|
||||||
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
|
|
||||||
index 6ed8b49..16bf920 100644
|
|
||||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
|
|
||||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
|
|
||||||
@@ -1,4 +1,5 @@
|
|
||||||
-/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
+/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010, 2011
|
|
||||||
+ Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
|
||||||
|
|
||||||
@@ -23,10 +24,6 @@
|
|
||||||
#include <pthread-errnos.h>
|
|
||||||
#include <kernel-features.h>
|
|
||||||
|
|
||||||
-
|
|
||||||
-/* For the calculation see asm/vsyscall.h. */
|
|
||||||
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
|
|
||||||
-
|
|
||||||
.text
|
|
||||||
|
|
||||||
.globl pthread_rwlock_timedwrlock
|
|
||||||
@@ -120,8 +117,9 @@ pthread_rwlock_timedwrlock:
|
|
||||||
/* Get current time. */
|
|
||||||
movq %rsp, %rdi
|
|
||||||
xorl %esi, %esi
|
|
||||||
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
|
||||||
- callq *%rax
|
|
||||||
+ /* This call works because we directly jump to a system call entry
|
|
||||||
+ which preserves all the registers. */
|
|
||||||
+ call JUMPTARGET(__gettimeofday)
|
|
||||||
|
|
||||||
/* Compute relative timeout. */
|
|
||||||
movq 8(%rsp), %rax
|
|
||||||
commit e38ba7ab6a56d53bde4fcff250f6928fb473bc3c
|
|
||||||
Author: Ulrich Drepper <drepper@gmail.com>
|
|
||||||
Date: Wed Sep 7 00:07:08 2011 -0400
|
|
||||||
|
|
||||||
Make sure __vdso_clock_gettime always contains a valid pointer
|
|
||||||
|
|
||||||
2011-09-07 Ulrich Drepper <drepper@gmail.com>
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/init-first.c
|
|
||||||
(_libc_vdso_platform_setup): If vDSO is not present store pointer to
|
|
||||||
syscall wrapper around clock_gettime in __vdso_clock_gettime.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Add entry for
|
|
||||||
clock_gettime.
|
|
||||||
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/init-first.c b/sysdeps/unix/sysv/linux/x86_64/init-first.c
|
|
||||||
index 25cf08b..cb39aca 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/x86_64/init-first.c
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/init-first.c
|
|
||||||
@@ -17,6 +17,8 @@
|
|
||||||
02111-1307 USA. */
|
|
||||||
|
|
||||||
#ifdef SHARED
|
|
||||||
+# include <time.h>
|
|
||||||
+# include <sysdep.h>
|
|
||||||
# include <dl-vdso.h>
|
|
||||||
# include <bits/libc-vdso.h>
|
|
||||||
|
|
||||||
@@ -27,12 +29,17 @@ strong_alias (__vdso_clock_gettime, __GI___vdso_clock_gettime attribute_hidden)
|
|
||||||
long int (*__vdso_getcpu) (unsigned *, unsigned *, void *) attribute_hidden;
|
|
||||||
|
|
||||||
|
|
||||||
+extern long int __syscall_clock_gettime (clockid_t, struct timespec *);
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static inline void
|
|
||||||
_libc_vdso_platform_setup (void)
|
|
||||||
{
|
|
||||||
PREPARE_VERSION (linux26, "LINUX_2.6", 61765110);
|
|
||||||
|
|
||||||
void *p = _dl_vdso_vsym ("clock_gettime", &linux26);
|
|
||||||
+ if (p == NULL)
|
|
||||||
+ p = __syscall_clock_gettime;
|
|
||||||
PTR_MANGLE (p);
|
|
||||||
__GI___vdso_clock_gettime = p;
|
|
||||||
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
|
|
||||||
index 3e231a0..ccddb84 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/x86_64/syscalls.list
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
|
|
||||||
@@ -14,6 +14,7 @@ semop - semop i:ipi __semop semop
|
|
||||||
semtimedop - semtimedop i:ipip semtimedop
|
|
||||||
semget - semget i:iii __semget semget
|
|
||||||
semctl - semctl i:iiii __semctl semctl
|
|
||||||
+syscall_clock_gettime EXTRA clock_gettime Ei:ip __syscall_clock_gettime
|
|
||||||
|
|
||||||
|
|
||||||
# proper socket implementations:
|
|
3
glibc-2.15-c0da14cdda1f.tar.bz2
Normal file
3
glibc-2.15-c0da14cdda1f.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cb2366b1bf2bdf00c63c2f2be91ef41fe3bde49d898e1b1c7e53fc31fc34c58f
|
||||||
|
size 15776360
|
@ -1,145 +0,0 @@
|
|||||||
From glibc.git (for 2.15):
|
|
||||||
|
|
||||||
2011-06-23 H.J. Lu <hongjiu.lu@intel.com>
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Use
|
|
||||||
__gettimeofday instead of gettimeofday.
|
|
||||||
|
|
||||||
2011-06-22 Ulrich Drepper <drepper@gmail.com>
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Use
|
|
||||||
/sys/devices/system/cpu/online if it is usable.
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Rate limit
|
|
||||||
reading the information from the /proc filesystem to once a second.
|
|
||||||
|
|
||||||
--- glibc-2.13/sysdeps/unix/sysv/linux/getsysstats.c 2010-04-08 10:45:22.000000000 +0200
|
|
||||||
+++ glibc.git/sysdeps/unix/sysv/linux/getsysstats.c 2011-06-27 09:56:27.359389056 +0200
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/* Determine various system internal values, Linux version.
|
|
||||||
- Copyright (C) 1996-2003,2006,2007,2009,2010 Free Software Foundation, Inc.
|
|
||||||
+ Copyright (C) 1996-2003,2006,2007,2009,2010,2011 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
|
||||||
|
|
||||||
@@ -35,6 +35,16 @@
|
|
||||||
|
|
||||||
#include <atomic.h>
|
|
||||||
#include <not-cancel.h>
|
|
||||||
+#include <kernel-features.h>
|
|
||||||
+
|
|
||||||
+#ifndef HAVE_CLOCK_GETTIME_VSYSCALL
|
|
||||||
+# undef INTERNAL_VSYSCALL
|
|
||||||
+# define INTERNAL_VSYSCALL INTERNAL_SYSCALL
|
|
||||||
+# undef INLINE_VSYSCALL
|
|
||||||
+# define INLINE_VSYSCALL INLINE_SYSCALL
|
|
||||||
+#else
|
|
||||||
+# include <bits/libc-vdso.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* How we can determine the number of available processors depends on
|
|
||||||
@@ -128,6 +138,22 @@
|
|
||||||
int
|
|
||||||
__get_nprocs ()
|
|
||||||
{
|
|
||||||
+ static int cached_result;
|
|
||||||
+ static time_t timestamp;
|
|
||||||
+
|
|
||||||
+#ifdef __ASSUME_POSIX_TIMERS
|
|
||||||
+ struct timespec ts;
|
|
||||||
+ INTERNAL_SYSCALL_DECL (err);
|
|
||||||
+ INTERNAL_VSYSCALL (clock_gettime, err, 2, CLOCK_REALTIME, &ts);
|
|
||||||
+#else
|
|
||||||
+ struct timeval ts;
|
|
||||||
+ __gettimeofday (&ts, NULL);
|
|
||||||
+#endif
|
|
||||||
+ time_t prev = timestamp;
|
|
||||||
+ atomic_read_barrier ();
|
|
||||||
+ if (ts.tv_sec == prev)
|
|
||||||
+ return cached_result;
|
|
||||||
+
|
|
||||||
/* XXX Here will come a test for the new system call. */
|
|
||||||
|
|
||||||
const size_t buffer_size = __libc_use_alloca (8192) ? 8192 : 512;
|
|
||||||
@@ -135,20 +161,65 @@
|
|
||||||
char *buffer_end = buffer + buffer_size;
|
|
||||||
char *cp = buffer_end;
|
|
||||||
char *re = buffer_end;
|
|
||||||
- int result = 1;
|
|
||||||
|
|
||||||
#ifdef O_CLOEXEC
|
|
||||||
const int flags = O_RDONLY | O_CLOEXEC;
|
|
||||||
#else
|
|
||||||
const int flags = O_RDONLY;
|
|
||||||
#endif
|
|
||||||
+ int fd = open_not_cancel_2 ("/sys/devices/system/cpu/online", flags);
|
|
||||||
+ char *l;
|
|
||||||
+ int result = 0;
|
|
||||||
+ if (fd != -1)
|
|
||||||
+ {
|
|
||||||
+ l = next_line (fd, buffer, &cp, &re, buffer_end);
|
|
||||||
+ if (l != NULL)
|
|
||||||
+ do
|
|
||||||
+ {
|
|
||||||
+ char *endp;
|
|
||||||
+ unsigned long int n = strtoul (l, &endp, 10);
|
|
||||||
+ if (l == endp)
|
|
||||||
+ {
|
|
||||||
+ result = 0;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ unsigned long int m = n;
|
|
||||||
+ if (*endp == '-')
|
|
||||||
+ {
|
|
||||||
+ l = endp + 1;
|
|
||||||
+ m = strtoul (l, &endp, 10);
|
|
||||||
+ if (l == endp)
|
|
||||||
+ {
|
|
||||||
+ result = 0;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ result += m - n + 1;
|
|
||||||
+
|
|
||||||
+ l = endp;
|
|
||||||
+ while (l < re && isspace (*l))
|
|
||||||
+ ++l;
|
|
||||||
+ }
|
|
||||||
+ while (l < re);
|
|
||||||
+
|
|
||||||
+ close_not_cancel_no_status (fd);
|
|
||||||
+
|
|
||||||
+ if (result > 0)
|
|
||||||
+ goto out;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ cp = buffer_end;
|
|
||||||
+ re = buffer_end;
|
|
||||||
+ result = 1;
|
|
||||||
+
|
|
||||||
/* The /proc/stat format is more uniform, use it by default. */
|
|
||||||
- int fd = open_not_cancel_2 ("/proc/stat", flags);
|
|
||||||
+ fd = open_not_cancel_2 ("/proc/stat", flags);
|
|
||||||
if (fd != -1)
|
|
||||||
{
|
|
||||||
result = 0;
|
|
||||||
|
|
||||||
- char *l;
|
|
||||||
while ((l = next_line (fd, buffer, &cp, &re, buffer_end)) != NULL)
|
|
||||||
/* The current format of /proc/stat has all the cpu* entries
|
|
||||||
at the front. We assume here that stays this way. */
|
|
||||||
@@ -169,6 +240,11 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ out:
|
|
||||||
+ cached_result = result;
|
|
||||||
+ atomic_write_barrier ();
|
|
||||||
+ timestamp = ts.tv_sec;
|
|
||||||
+
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
weak_alias (__get_nprocs, get_nprocs)
|
|
@ -1,716 +0,0 @@
|
|||||||
commit 3a62d00d408e9ec19479b6c7d39e89021061f9cd
|
|
||||||
Author: Andreas Schwab <schwab@redhat.com>
|
|
||||||
Date: Tue Oct 4 16:10:16 2011 +0200
|
|
||||||
|
|
||||||
Don't call ifunc functions in trace mode
|
|
||||||
|
|
||||||
2011-10-04 Andreas Schwab <schwab@redhat.com>
|
|
||||||
|
|
||||||
* include/dlfcn.h (__RTLD_NOIFUNC): Define.
|
|
||||||
* elf/do-rel.h (elf_dynamic_do_rel): Add parameter skip_ifunc and
|
|
||||||
pass it down.
|
|
||||||
* elf/dynamic-link.h: Adjust prototypes of elf_machine_rel,
|
|
||||||
elf_machine_rela, elf_machine_lazy_rel.
|
|
||||||
(_ELF_DYNAMIC_DO_RELOC): Add parameter skip_ifunc and pass it down.
|
|
||||||
(ELF_DYNAMIC_DO_REL): Likewise.
|
|
||||||
(ELF_DYNAMIC_DO_RELA): Likewise.
|
|
||||||
(ELF_DYNAMIC_RELOCATE): Likewise.
|
|
||||||
* elf/dl-reloc.c (_dl_relocate_object): Pass __RTLD_NOIFUNC down
|
|
||||||
to ELF_DYNAMIC_DO_REL.
|
|
||||||
* elf/rtld.c (_dl_start): Adjust use of ELF_DYNAMIC_RELOCATE.
|
|
||||||
(dl_main): In trace mode always set __RTLD_NOIFUNC.
|
|
||||||
* elf/dl-conflict.c (_dl_resolve_conflicts): Adjust call to
|
|
||||||
elf_machine_rela.
|
|
||||||
* sysdeps/i386/dl-machine.h (elf_machine_rel): Add parameter
|
|
||||||
skip_ifunc, don't call ifunc function if non-zero.
|
|
||||||
(elf_machine_rela): Likewise.
|
|
||||||
(elf_machine_lazy_rel): Likewise.
|
|
||||||
(elf_machine_lazy_rela): Likewise.
|
|
||||||
* sysdeps/ia64/dl-machine.h (elf_machine_rela): Likewise.
|
|
||||||
(elf_machine_lazy_rel): Likewise.
|
|
||||||
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela):
|
|
||||||
Likewise.
|
|
||||||
(elf_machine_lazy_rel): Likewise.
|
|
||||||
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela):
|
|
||||||
Likewise.
|
|
||||||
(elf_machine_lazy_rel): Likewise.
|
|
||||||
* sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela): Likewise.
|
|
||||||
(elf_machine_lazy_rel): Likewise.
|
|
||||||
* sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela): Likewise.
|
|
||||||
(elf_machine_lazy_rel): Likewise.
|
|
||||||
* sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
|
|
||||||
(elf_machine_lazy_rel): Likewise.
|
|
||||||
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise.
|
|
||||||
(elf_machine_lazy_rel): Likewise.
|
|
||||||
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise.
|
|
||||||
(elf_machine_lazy_rel): Likewise.
|
|
||||||
* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
|
|
||||||
(elf_machine_lazy_rel): Likewise.
|
|
||||||
|
|
||||||
Index: glibc-2.14/elf/dl-conflict.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/elf/dl-conflict.c
|
|
||||||
+++ glibc-2.14/elf/dl-conflict.c
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/* Resolve conflicts against already prelinked libraries.
|
|
||||||
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
|
|
||||||
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2008, 2011 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
|
|
||||||
|
|
||||||
@@ -69,7 +69,8 @@ _dl_resolve_conflicts (struct link_map *
|
|
||||||
GL(dl_num_cache_relocations) += conflictend - conflict;
|
|
||||||
|
|
||||||
for (; conflict < conflictend; ++conflict)
|
|
||||||
- elf_machine_rela (l, conflict, NULL, NULL, (void *) conflict->r_offset);
|
|
||||||
+ elf_machine_rela (l, conflict, NULL, NULL, (void *) conflict->r_offset,
|
|
||||||
+ 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
Index: glibc-2.14/elf/dl-reloc.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/elf/dl-reloc.c
|
|
||||||
+++ glibc-2.14/elf/dl-reloc.c
|
|
||||||
@@ -162,6 +162,7 @@ _dl_relocate_object (struct link_map *l,
|
|
||||||
/* Initialize it to make the compiler happy. */
|
|
||||||
const char *errstring = NULL;
|
|
||||||
int lazy = reloc_mode & RTLD_LAZY;
|
|
||||||
+ int skip_ifunc = reloc_mode & __RTLD_NOIFUNC;
|
|
||||||
|
|
||||||
#ifdef SHARED
|
|
||||||
/* If we are auditing, install the same handlers we need for profiling. */
|
|
||||||
@@ -261,7 +262,7 @@ _dl_relocate_object (struct link_map *l,
|
|
||||||
|
|
||||||
#include "dynamic-link.h"
|
|
||||||
|
|
||||||
- ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling);
|
|
||||||
+ ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc);
|
|
||||||
|
|
||||||
#ifndef PROF
|
|
||||||
if (__builtin_expect (consider_profiling, 0))
|
|
||||||
Index: glibc-2.14/elf/do-rel.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/elf/do-rel.h
|
|
||||||
+++ glibc-2.14/elf/do-rel.h
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/* Do relocations for ELF dynamic linking.
|
|
||||||
- Copyright (C) 1995-2003, 2004 Free Software Foundation, Inc.
|
|
||||||
+ Copyright (C) 1995-2003, 2004, 2011 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
@@ -52,7 +52,7 @@
|
|
||||||
auto inline void __attribute__ ((always_inline))
|
|
||||||
elf_dynamic_do_rel (struct link_map *map,
|
|
||||||
ElfW(Addr) reladdr, ElfW(Addr) relsize,
|
|
||||||
- int lazy)
|
|
||||||
+ int lazy, int skip_ifunc)
|
|
||||||
{
|
|
||||||
const ElfW(Rel) *r = (const void *) reladdr;
|
|
||||||
const ElfW(Rel) *end = (const void *) (reladdr + relsize);
|
|
||||||
@@ -66,7 +66,7 @@ elf_dynamic_do_rel (struct link_map *map
|
|
||||||
{
|
|
||||||
/* Doing lazy PLT relocations; they need very little info. */
|
|
||||||
for (; r < end; ++r)
|
|
||||||
- elf_machine_lazy_rel (map, l_addr, r);
|
|
||||||
+ elf_machine_lazy_rel (map, l_addr, r, skip_ifunc);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
@@ -119,14 +119,14 @@ elf_dynamic_do_rel (struct link_map *map
|
|
||||||
ElfW(Half) ndx = version[ELFW(R_SYM) (r->r_info)] & 0x7fff;
|
|
||||||
elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)],
|
|
||||||
&map->l_versions[ndx],
|
|
||||||
- (void *) (l_addr + r->r_offset));
|
|
||||||
+ (void *) (l_addr + r->r_offset), skip_ifunc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#ifndef RTLD_BOOTSTRAP
|
|
||||||
else
|
|
||||||
for (; r < end; ++r)
|
|
||||||
elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)], NULL,
|
|
||||||
- (void *) (l_addr + r->r_offset));
|
|
||||||
+ (void *) (l_addr + r->r_offset), skip_ifunc);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Index: glibc-2.14/elf/dynamic-link.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/elf/dynamic-link.h
|
|
||||||
+++ glibc-2.14/elf/dynamic-link.h
|
|
||||||
@@ -60,7 +60,7 @@ int internal_function _dl_try_allocate_s
|
|
||||||
auto inline void __attribute__((always_inline))
|
|
||||||
elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
|
|
||||||
const ElfW(Sym) *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr);
|
|
||||||
+ void *const reloc_addr, int skip_ifunc);
|
|
||||||
auto inline void __attribute__((always_inline))
|
|
||||||
elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
|
|
||||||
void *const reloc_addr);
|
|
||||||
@@ -69,7 +69,7 @@ elf_machine_rel_relative (ElfW(Addr) l_a
|
|
||||||
auto inline void __attribute__((always_inline))
|
|
||||||
elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
|
|
||||||
const ElfW(Sym) *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr);
|
|
||||||
+ void *const reloc_addr, int skip_ifunc);
|
|
||||||
auto inline void __attribute__((always_inline))
|
|
||||||
elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
|
|
||||||
void *const reloc_addr);
|
|
||||||
@@ -77,11 +77,13 @@ elf_machine_rela_relative (ElfW(Addr) l_
|
|
||||||
# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
|
|
||||||
auto inline void __attribute__((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
|
|
||||||
+ ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
|
|
||||||
+ int skip_ifunc);
|
|
||||||
# else
|
|
||||||
auto inline void __attribute__((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
|
|
||||||
+ ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
|
|
||||||
+ int skip_ifunc);
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -254,7 +256,7 @@ elf_get_dynamic_info (struct link_map *l
|
|
||||||
not happen we do something more optimal. */
|
|
||||||
|
|
||||||
# ifdef ELF_MACHINE_PLTREL_OVERLAP
|
|
||||||
-# define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, do_lazy, test_rel) \
|
|
||||||
+# define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, do_lazy, skip_ifunc, test_rel) \
|
|
||||||
do { \
|
|
||||||
struct { ElfW(Addr) start, size; int lazy; } ranges[3]; \
|
|
||||||
int ranges_index; \
|
|
||||||
@@ -284,10 +286,11 @@ elf_get_dynamic_info (struct link_map *l
|
|
||||||
elf_dynamic_do_##reloc ((map), \
|
|
||||||
ranges[ranges_index].start, \
|
|
||||||
ranges[ranges_index].size, \
|
|
||||||
- ranges[ranges_index].lazy); \
|
|
||||||
+ ranges[ranges_index].lazy, \
|
|
||||||
+ skip_ifunc); \
|
|
||||||
} while (0)
|
|
||||||
# else
|
|
||||||
-# define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, do_lazy, test_rel) \
|
|
||||||
+# define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, do_lazy, skip_ifunc, test_rel) \
|
|
||||||
do { \
|
|
||||||
struct { ElfW(Addr) start, size; int lazy; } ranges[2]; \
|
|
||||||
ranges[0].lazy = 0; \
|
|
||||||
@@ -324,7 +327,8 @@ elf_get_dynamic_info (struct link_map *l
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
if (ELF_DURING_STARTUP) \
|
|
||||||
- elf_dynamic_do_##reloc ((map), ranges[0].start, ranges[0].size, 0); \
|
|
||||||
+ elf_dynamic_do_##reloc ((map), ranges[0].start, ranges[0].size, 0, \
|
|
||||||
+ skip_ifunc); \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
int ranges_index; \
|
|
||||||
@@ -332,7 +336,8 @@ elf_get_dynamic_info (struct link_map *l
|
|
||||||
elf_dynamic_do_##reloc ((map), \
|
|
||||||
ranges[ranges_index].start, \
|
|
||||||
ranges[ranges_index].size, \
|
|
||||||
- ranges[ranges_index].lazy); \
|
|
||||||
+ ranges[ranges_index].lazy, \
|
|
||||||
+ skip_ifunc); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
# endif
|
|
||||||
@@ -345,29 +350,29 @@ elf_get_dynamic_info (struct link_map *l
|
|
||||||
|
|
||||||
# if ! ELF_MACHINE_NO_REL
|
|
||||||
# include "do-rel.h"
|
|
||||||
-# define ELF_DYNAMIC_DO_REL(map, lazy) \
|
|
||||||
- _ELF_DYNAMIC_DO_RELOC (REL, rel, map, lazy, _ELF_CHECK_REL)
|
|
||||||
+# define ELF_DYNAMIC_DO_REL(map, lazy, skip_ifunc) \
|
|
||||||
+ _ELF_DYNAMIC_DO_RELOC (REL, rel, map, lazy, skip_ifunc, _ELF_CHECK_REL)
|
|
||||||
# else
|
|
||||||
-# define ELF_DYNAMIC_DO_REL(map, lazy) /* Nothing to do. */
|
|
||||||
+# define ELF_DYNAMIC_DO_REL(map, lazy, skip_ifunc) /* Nothing to do. */
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# if ! ELF_MACHINE_NO_RELA
|
|
||||||
# define DO_RELA
|
|
||||||
# include "do-rel.h"
|
|
||||||
-# define ELF_DYNAMIC_DO_RELA(map, lazy) \
|
|
||||||
- _ELF_DYNAMIC_DO_RELOC (RELA, rela, map, lazy, _ELF_CHECK_REL)
|
|
||||||
+# define ELF_DYNAMIC_DO_RELA(map, lazy, skip_ifunc) \
|
|
||||||
+ _ELF_DYNAMIC_DO_RELOC (RELA, rela, map, lazy, skip_ifunc, _ELF_CHECK_REL)
|
|
||||||
# else
|
|
||||||
-# define ELF_DYNAMIC_DO_RELA(map, lazy) /* Nothing to do. */
|
|
||||||
+# define ELF_DYNAMIC_DO_RELA(map, lazy, skip_ifunc) /* Nothing to do. */
|
|
||||||
# endif
|
|
||||||
|
|
||||||
/* This can't just be an inline function because GCC is too dumb
|
|
||||||
to inline functions containing inlines themselves. */
|
|
||||||
-# define ELF_DYNAMIC_RELOCATE(map, lazy, consider_profile) \
|
|
||||||
+# define ELF_DYNAMIC_RELOCATE(map, lazy, consider_profile, skip_ifunc) \
|
|
||||||
do { \
|
|
||||||
int edr_lazy = elf_machine_runtime_setup ((map), (lazy), \
|
|
||||||
(consider_profile)); \
|
|
||||||
- ELF_DYNAMIC_DO_REL ((map), edr_lazy); \
|
|
||||||
- ELF_DYNAMIC_DO_RELA ((map), edr_lazy); \
|
|
||||||
+ ELF_DYNAMIC_DO_REL ((map), edr_lazy, skip_ifunc); \
|
|
||||||
+ ELF_DYNAMIC_DO_RELA ((map), edr_lazy, skip_ifunc); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Index: glibc-2.14/elf/rtld.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/elf/rtld.c
|
|
||||||
+++ glibc-2.14/elf/rtld.c
|
|
||||||
@@ -543,7 +543,7 @@ _dl_start (void *arg)
|
|
||||||
/* Relocate ourselves so we can do normal function calls and
|
|
||||||
data access using the global offset table. */
|
|
||||||
|
|
||||||
- ELF_DYNAMIC_RELOCATE (&bootstrap_map, 0, 0);
|
|
||||||
+ ELF_DYNAMIC_RELOCATE (&bootstrap_map, 0, 0, 0);
|
|
||||||
}
|
|
||||||
bootstrap_map.l_relocated = 1;
|
|
||||||
|
|
||||||
@@ -1992,8 +1992,9 @@ ERROR: ld.so: object '%s' cannot be load
|
|
||||||
|
|
||||||
/* Relocate the main executable. */
|
|
||||||
struct relocate_args args = { .l = l,
|
|
||||||
- .reloc_mode = (GLRO(dl_lazy)
|
|
||||||
- ? RTLD_LAZY : 0) };
|
|
||||||
+ .reloc_mode = ((GLRO(dl_lazy)
|
|
||||||
+ ? RTLD_LAZY : 0)
|
|
||||||
+ | __RTLD_NOIFUNC) };
|
|
||||||
_dl_receive_error (print_unresolved, relocate_doit, &args);
|
|
||||||
|
|
||||||
/* This loop depends on the dependencies of the executable to
|
|
||||||
@@ -2070,7 +2071,8 @@ ERROR: ld.so: object '%s' cannot be load
|
|
||||||
struct relocate_args args;
|
|
||||||
struct link_map *l;
|
|
||||||
|
|
||||||
- args.reloc_mode = GLRO(dl_lazy) ? RTLD_LAZY : 0;
|
|
||||||
+ args.reloc_mode = ((GLRO(dl_lazy) ? RTLD_LAZY : 0)
|
|
||||||
+ | __RTLD_NOIFUNC);
|
|
||||||
|
|
||||||
l = main_map;
|
|
||||||
while (l->l_next != NULL)
|
|
||||||
@@ -2093,7 +2095,7 @@ ERROR: ld.so: object '%s' cannot be load
|
|
||||||
/* Mark the link map as not yet relocated again. */
|
|
||||||
GL(dl_rtld_map).l_relocated = 0;
|
|
||||||
_dl_relocate_object (&GL(dl_rtld_map),
|
|
||||||
- main_map->l_scope, 0, 0);
|
|
||||||
+ main_map->l_scope, __RTLD_NOIFUNC, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#define VERNEEDTAG (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (DT_VERNEED))
|
|
||||||
Index: glibc-2.14/include/dlfcn.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/include/dlfcn.h
|
|
||||||
+++ glibc-2.14/include/dlfcn.h
|
|
||||||
@@ -10,6 +10,7 @@
|
|
||||||
#define __RTLD_CALLMAP 0x10000000
|
|
||||||
#define __RTLD_AUDIT 0x08000000
|
|
||||||
#define __RTLD_SECURE 0x04000000 /* Apply additional security checks. */
|
|
||||||
+#define __RTLD_NOIFUNC 0x02000000 /* Suppress calling ifunc functions. */
|
|
||||||
|
|
||||||
#define __LM_ID_CALLER -2
|
|
||||||
|
|
||||||
Index: glibc-2.14/sysdeps/i386/dl-machine.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/sysdeps/i386/dl-machine.h
|
|
||||||
+++ glibc-2.14/sysdeps/i386/dl-machine.h
|
|
||||||
@@ -311,7 +311,7 @@ auto inline void
|
|
||||||
__attribute ((always_inline))
|
|
||||||
elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
|
||||||
const Elf32_Sym *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg, int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
|
||||||
@@ -347,7 +347,8 @@ elf_machine_rel (struct link_map *map, c
|
|
||||||
if (sym != NULL
|
|
||||||
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC,
|
|
||||||
0)
|
|
||||||
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
|
|
||||||
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
|
||||||
+ && __builtin_expect (!skip_ifunc, 1))
|
|
||||||
value = ((Elf32_Addr (*) (void)) value) ();
|
|
||||||
|
|
||||||
switch (r_type)
|
|
||||||
@@ -490,7 +491,7 @@ auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
|
||||||
const Elf32_Sym *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg, int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
|
||||||
@@ -507,8 +508,8 @@ elf_machine_rela (struct link_map *map,
|
|
||||||
|
|
||||||
if (sym != NULL
|
|
||||||
&& __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
|
||||||
- && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC,
|
|
||||||
- 0))
|
|
||||||
+ && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
|
|
||||||
+ && __builtin_expect (!skip_ifunc, 1))
|
|
||||||
value = ((Elf32_Addr (*) (void)) value) ();
|
|
||||||
|
|
||||||
switch (ELF32_R_TYPE (reloc->r_info))
|
|
||||||
@@ -655,7 +656,8 @@ elf_machine_rela_relative (Elf32_Addr l_
|
|
||||||
auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- Elf32_Addr l_addr, const Elf32_Rel *reloc)
|
|
||||||
+ Elf32_Addr l_addr, const Elf32_Rel *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
|
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
|
||||||
@@ -706,19 +708,20 @@ elf_machine_lazy_rel (struct link_map *m
|
|
||||||
ElfW(Half) ndx = version[ELFW(R_SYM) (r->r_info)] & 0x7fff;
|
|
||||||
elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)],
|
|
||||||
&map->l_versions[ndx],
|
|
||||||
- (void *) (l_addr + r->r_offset));
|
|
||||||
+ (void *) (l_addr + r->r_offset), skip_ifunc);
|
|
||||||
}
|
|
||||||
# ifndef RTLD_BOOTSTRAP
|
|
||||||
else
|
|
||||||
elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)], NULL,
|
|
||||||
- (void *) (l_addr + r->r_offset));
|
|
||||||
+ (void *) (l_addr + r->r_offset), skip_ifunc);
|
|
||||||
# endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (__builtin_expect (r_type == R_386_IRELATIVE, 0))
|
|
||||||
{
|
|
||||||
Elf32_Addr value = map->l_addr + *reloc_addr;
|
|
||||||
- value = ((Elf32_Addr (*) (void)) value) ();
|
|
||||||
+ if (__builtin_expect (!skip_ifunc, 1))
|
|
||||||
+ value = ((Elf32_Addr (*) (void)) value) ();
|
|
||||||
*reloc_addr = value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
@@ -730,7 +733,8 @@ elf_machine_lazy_rel (struct link_map *m
|
|
||||||
auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_lazy_rela (struct link_map *map,
|
|
||||||
- Elf32_Addr l_addr, const Elf32_Rela *reloc)
|
|
||||||
+ Elf32_Addr l_addr, const Elf32_Rela *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
|
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
|
||||||
@@ -747,7 +751,8 @@ elf_machine_lazy_rela (struct link_map *
|
|
||||||
else if (__builtin_expect (r_type == R_386_IRELATIVE, 0))
|
|
||||||
{
|
|
||||||
Elf32_Addr value = map->l_addr + reloc->r_addend;
|
|
||||||
- value = ((Elf32_Addr (*) (void)) value) ();
|
|
||||||
+ if (__builtin_expect (!skip_ifunc, 1))
|
|
||||||
+ value = ((Elf32_Addr (*) (void)) value) ();
|
|
||||||
*reloc_addr = value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Index: glibc-2.14/sysdeps/ia64/dl-machine.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/sysdeps/ia64/dl-machine.h
|
|
||||||
+++ glibc-2.14/sysdeps/ia64/dl-machine.h
|
|
||||||
@@ -377,7 +377,8 @@ elf_machine_rela (struct link_map *map,
|
|
||||||
const Elf64_Rela *reloc,
|
|
||||||
const Elf64_Sym *sym,
|
|
||||||
const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf64_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info);
|
|
||||||
@@ -493,7 +494,8 @@ elf_machine_rela_relative (Elf64_Addr l_
|
|
||||||
auto inline void
|
|
||||||
__attribute ((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- Elf64_Addr l_addr, const Elf64_Rela *reloc)
|
|
||||||
+ Elf64_Addr l_addr, const Elf64_Rela *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf64_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
|
|
||||||
const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info);
|
|
||||||
Index: glibc-2.14/sysdeps/powerpc/powerpc32/dl-machine.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/sysdeps/powerpc/powerpc32/dl-machine.h
|
|
||||||
+++ glibc-2.14/sysdeps/powerpc/powerpc32/dl-machine.h
|
|
||||||
@@ -280,7 +280,7 @@ extern void _dl_reloc_overflow (struct l
|
|
||||||
auto inline void __attribute__ ((always_inline))
|
|
||||||
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
|
||||||
const Elf32_Sym *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg, int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const Elf32_Sym *const refsym = sym;
|
|
||||||
@@ -315,7 +315,8 @@ elf_machine_rela (struct link_map *map,
|
|
||||||
|
|
||||||
if (sym != NULL
|
|
||||||
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
|
|
||||||
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
|
|
||||||
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
|
||||||
+ && __builtin_expect (!skip_ifunc, 1))
|
|
||||||
value = ((Elf32_Addr (*) (void)) value) ();
|
|
||||||
|
|
||||||
/* A small amount of code is duplicated here for speed. In libc,
|
|
||||||
@@ -391,7 +392,8 @@ elf_machine_rela_relative (Elf32_Addr l_
|
|
||||||
|
|
||||||
auto inline void __attribute__ ((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- Elf32_Addr l_addr, const Elf32_Rela *reloc)
|
|
||||||
+ Elf32_Addr l_addr, const Elf32_Rela *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
/* elf_machine_runtime_setup handles this. */
|
|
||||||
}
|
|
||||||
Index: glibc-2.14/sysdeps/powerpc/powerpc64/dl-machine.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/sysdeps/powerpc/powerpc64/dl-machine.h
|
|
||||||
+++ glibc-2.14/sysdeps/powerpc/powerpc64/dl-machine.h
|
|
||||||
@@ -558,7 +558,8 @@ elf_machine_rela (struct link_map *map,
|
|
||||||
const Elf64_Rela *reloc,
|
|
||||||
const Elf64_Sym *sym,
|
|
||||||
const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf64_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const int r_type = ELF64_R_TYPE (reloc->r_info);
|
|
||||||
@@ -583,7 +584,8 @@ elf_machine_rela (struct link_map *map,
|
|
||||||
|
|
||||||
if (sym != NULL
|
|
||||||
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
|
|
||||||
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
|
|
||||||
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
|
||||||
+ && __builtin_expect (!skip_ifunc, 1))
|
|
||||||
value = resolve_ifunc (value, map, sym_map);
|
|
||||||
|
|
||||||
/* For relocs that don't edit code, return.
|
|
||||||
@@ -596,12 +598,14 @@ elf_machine_rela (struct link_map *map,
|
|
||||||
return;
|
|
||||||
|
|
||||||
case R_PPC64_IRELATIVE:
|
|
||||||
- value = resolve_ifunc (value, map, sym_map);
|
|
||||||
+ if (__builtin_expect (!skip_ifunc, 1))
|
|
||||||
+ value = resolve_ifunc (value, map, sym_map);
|
|
||||||
*reloc_addr = value;
|
|
||||||
return;
|
|
||||||
|
|
||||||
case R_PPC64_JMP_IREL:
|
|
||||||
- value = resolve_ifunc (value, map, sym_map);
|
|
||||||
+ if (__builtin_expect (!skip_ifunc, 1))
|
|
||||||
+ value = resolve_ifunc (value, map, sym_map);
|
|
||||||
/* Fall thru */
|
|
||||||
case R_PPC64_JMP_SLOT:
|
|
||||||
#ifdef RESOLVE_CONFLICT_FIND_MAP
|
|
||||||
@@ -852,7 +856,8 @@ elf_machine_rela (struct link_map *map,
|
|
||||||
|
|
||||||
auto inline void __attribute__ ((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- Elf64_Addr l_addr, const Elf64_Rela *reloc)
|
|
||||||
+ Elf64_Addr l_addr, const Elf64_Rela *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
/* elf_machine_runtime_setup handles this. */
|
|
||||||
}
|
|
||||||
Index: glibc-2.14/sysdeps/s390/s390-32/dl-machine.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/sysdeps/s390/s390-32/dl-machine.h
|
|
||||||
+++ glibc-2.14/sysdeps/s390/s390-32/dl-machine.h
|
|
||||||
@@ -275,7 +275,7 @@ auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
|
||||||
const Elf32_Sym *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg, int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
|
||||||
@@ -434,7 +434,8 @@ elf_machine_rela_relative (Elf32_Addr l_
|
|
||||||
auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- Elf32_Addr l_addr, const Elf32_Rela *reloc)
|
|
||||||
+ Elf32_Addr l_addr, const Elf32_Rela *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
|
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
|
||||||
Index: glibc-2.14/sysdeps/s390/s390-64/dl-machine.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/sysdeps/s390/s390-64/dl-machine.h
|
|
||||||
+++ glibc-2.14/sysdeps/s390/s390-64/dl-machine.h
|
|
||||||
@@ -247,7 +247,7 @@ auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
|
|
||||||
const Elf64_Sym *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg, int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf64_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const unsigned int r_type = ELF64_R_TYPE (reloc->r_info);
|
|
||||||
@@ -413,7 +413,8 @@ elf_machine_rela_relative (Elf64_Addr l_
|
|
||||||
auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- Elf64_Addr l_addr, const Elf64_Rela *reloc)
|
|
||||||
+ Elf64_Addr l_addr, const Elf64_Rela *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf64_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
|
|
||||||
const unsigned int r_type = ELF64_R_TYPE (reloc->r_info);
|
|
||||||
Index: glibc-2.14/sysdeps/sh/dl-machine.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/sysdeps/sh/dl-machine.h
|
|
||||||
+++ glibc-2.14/sysdeps/sh/dl-machine.h
|
|
||||||
@@ -268,7 +268,7 @@ auto inline void
|
|
||||||
__attribute ((always_inline))
|
|
||||||
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
|
||||||
const Elf32_Sym *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg, int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
|
||||||
@@ -454,7 +454,8 @@ elf_machine_rela_relative (Elf32_Addr l_
|
|
||||||
auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- Elf32_Addr l_addr, const Elf32_Rela *reloc)
|
|
||||||
+ Elf32_Addr l_addr, const Elf32_Rela *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
|
|
||||||
/* Check for unexpected PLT reloc type. */
|
|
||||||
Index: glibc-2.14/sysdeps/sparc/sparc32/dl-machine.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/sysdeps/sparc/sparc32/dl-machine.h
|
|
||||||
+++ glibc-2.14/sysdeps/sparc/sparc32/dl-machine.h
|
|
||||||
@@ -347,7 +347,7 @@ auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
|
||||||
const Elf32_Sym *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg, int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const Elf32_Sym *const refsym = sym;
|
|
||||||
@@ -397,7 +397,8 @@ elf_machine_rela (struct link_map *map,
|
|
||||||
|
|
||||||
if (sym != NULL
|
|
||||||
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
|
|
||||||
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
|
|
||||||
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
|
||||||
+ && __builtin_expect (!skip_ifunc, 1))
|
|
||||||
{
|
|
||||||
value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
|
|
||||||
}
|
|
||||||
@@ -552,7 +553,8 @@ elf_machine_rela_relative (Elf32_Addr l_
|
|
||||||
auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- Elf32_Addr l_addr, const Elf32_Rela *reloc)
|
|
||||||
+ Elf32_Addr l_addr, const Elf32_Rela *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
|
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
|
||||||
@@ -562,7 +564,8 @@ elf_machine_lazy_rel (struct link_map *m
|
|
||||||
else if (r_type == R_SPARC_JMP_IREL)
|
|
||||||
{
|
|
||||||
Elf32_Addr value = map->l_addr + reloc->r_addend;
|
|
||||||
- value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
|
|
||||||
+ if (__builtin_expect (!skip_ifunc, 1))
|
|
||||||
+ value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
|
|
||||||
sparc_fixup_plt (reloc, reloc_addr, value, 1, 1);
|
|
||||||
}
|
|
||||||
else if (r_type == R_SPARC_NONE)
|
|
||||||
Index: glibc-2.14/sysdeps/sparc/sparc64/dl-machine.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/sysdeps/sparc/sparc64/dl-machine.h
|
|
||||||
+++ glibc-2.14/sysdeps/sparc/sparc64/dl-machine.h
|
|
||||||
@@ -375,7 +375,7 @@ auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
|
|
||||||
const Elf64_Sym *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg, int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf64_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP
|
|
||||||
@@ -429,7 +429,8 @@ elf_machine_rela (struct link_map *map,
|
|
||||||
|
|
||||||
if (sym != NULL
|
|
||||||
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
|
|
||||||
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
|
|
||||||
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
|
||||||
+ && __builtin_expect (!skip_ifunc, 1))
|
|
||||||
value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
|
|
||||||
|
|
||||||
switch (r_type)
|
|
||||||
@@ -647,7 +648,8 @@ elf_machine_rela_relative (Elf64_Addr l_
|
|
||||||
auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- Elf64_Addr l_addr, const Elf64_Rela *reloc)
|
|
||||||
+ Elf64_Addr l_addr, const Elf64_Rela *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf64_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
|
|
||||||
const unsigned int r_type = ELF64_R_TYPE (reloc->r_info);
|
|
||||||
@@ -658,7 +660,8 @@ elf_machine_lazy_rel (struct link_map *m
|
|
||||||
|| r_type == R_SPARC_IRELATIVE)
|
|
||||||
{
|
|
||||||
Elf64_Addr value = map->l_addr + reloc->r_addend;
|
|
||||||
- value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
|
|
||||||
+ if (__builtin_expect (!skip_ifunc, 1))
|
|
||||||
+ value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
|
|
||||||
if (r_type == R_SPARC_JMP_IREL)
|
|
||||||
{
|
|
||||||
/* 'high' is always zero, for large PLT entries the linker
|
|
||||||
Index: glibc-2.14/sysdeps/x86_64/dl-machine.h
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/sysdeps/x86_64/dl-machine.h
|
|
||||||
+++ glibc-2.14/sysdeps/x86_64/dl-machine.h
|
|
||||||
@@ -261,7 +261,7 @@ auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
|
|
||||||
const Elf64_Sym *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg, int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf64_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info);
|
|
||||||
@@ -299,7 +299,8 @@ elf_machine_rela (struct link_map *map,
|
|
||||||
if (sym != NULL
|
|
||||||
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC,
|
|
||||||
0)
|
|
||||||
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
|
|
||||||
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
|
||||||
+ && __builtin_expect (!skip_ifunc, 1))
|
|
||||||
value = ((Elf64_Addr (*) (void)) value) ();
|
|
||||||
|
|
||||||
# if defined RTLD_BOOTSTRAP && !USE___THREAD
|
|
||||||
@@ -470,7 +471,8 @@ elf_machine_rela_relative (Elf64_Addr l_
|
|
||||||
auto inline void
|
|
||||||
__attribute ((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- Elf64_Addr l_addr, const Elf64_Rela *reloc)
|
|
||||||
+ Elf64_Addr l_addr, const Elf64_Rela *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf64_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
|
|
||||||
const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info);
|
|
||||||
@@ -497,7 +499,8 @@ elf_machine_lazy_rel (struct link_map *m
|
|
||||||
else if (__builtin_expect (r_type == R_X86_64_IRELATIVE, 0))
|
|
||||||
{
|
|
||||||
Elf64_Addr value = map->l_addr + reloc->r_addend;
|
|
||||||
- value = ((Elf64_Addr (*) (void)) value) ();
|
|
||||||
+ if (__builtin_expect (!skip_ifunc, 1))
|
|
||||||
+ value = ((Elf64_Addr (*) (void)) value) ();
|
|
||||||
*reloc_addr = value;
|
|
||||||
}
|
|
||||||
else
|
|
24
glibc-2.15-nss_db-declarations.patch
Normal file
24
glibc-2.15-nss_db-declarations.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
diff --git a/nss/nss_db/db-init.c b/nss/nss_db/db-init.c
|
||||||
|
index 8228d61..85ac48f 100644
|
||||||
|
--- a/nss/nss_db/db-init.c
|
||||||
|
+++ b/nss/nss_db/db-init.c
|
||||||
|
@@ -18,6 +18,7 @@
|
||||||
|
02111-1307 USA. */
|
||||||
|
|
||||||
|
#include <paths.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include <nscd/nscd.h>
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/nss/nss_db/db-initgroups.c b/nss/nss_db/db-initgroups.c
|
||||||
|
index aa8163b..1b806e5 100644
|
||||||
|
--- a/nss/nss_db/db-initgroups.c
|
||||||
|
+++ b/nss/nss_db/db-initgroups.c
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#include <errno.h>
|
||||||
|
#include <grp.h>
|
||||||
|
#include <paths.h>
|
||||||
|
+#include <string.h>
|
||||||
|
|
||||||
|
#include "nss_db.h"
|
||||||
|
|
@ -1,479 +0,0 @@
|
|||||||
commit 91b392a4bab0c2dc90e7e3ff914dec20b97adca8
|
|
||||||
Author: Ulrich Drepper <drepper@gmail.com>
|
|
||||||
Date: Sun Aug 21 13:52:28 2011 -0400
|
|
||||||
|
|
||||||
Use ifuncs for time and gettimeofday on x86-64
|
|
||||||
|
|
||||||
2011-08-21 Ulrich Drepper <drepper@gmail.com>
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/gettimeofday.S: Removed.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/time.S: Removed.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/gettimeofday.c: New file.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/time.c: New file.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h: Remove declaration
|
|
||||||
of __vdso_gettimeofday.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/init-first.c: Remove definition of
|
|
||||||
__vdso_gettimeofday and __vdso_time. Define __vdso_getcpu with
|
|
||||||
attribute_hidden.
|
|
||||||
(_libc_vdso_platform_setup): Remove initialization of
|
|
||||||
__vdso_gettimeofday and __vdso_time.
|
|
||||||
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h
|
|
||||||
index d7123c9..f9bf84e 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/* Resolve function pointers to VDSO functions.
|
|
||||||
- Copyright (C) 2005, 2007 Free Software Foundation, Inc.
|
|
||||||
+ Copyright (C) 2005, 2007, 2011 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
@@ -25,9 +25,6 @@
|
|
||||||
|
|
||||||
#ifdef SHARED
|
|
||||||
|
|
||||||
-extern long int (*__vdso_gettimeofday) (struct timeval *, void *)
|
|
||||||
- attribute_hidden;
|
|
||||||
-
|
|
||||||
extern long int (*__vdso_clock_gettime) (clockid_t, struct timespec *);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S
|
|
||||||
deleted file mode 100644
|
|
||||||
index f618e73..0000000
|
|
||||||
--- a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,49 +0,0 @@
|
|
||||||
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
|
|
||||||
- This file is part of the GNU C Library.
|
|
||||||
-
|
|
||||||
- The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
- modify it under the terms of the GNU Lesser General Public
|
|
||||||
- License as published by the Free Software Foundation; either
|
|
||||||
- version 2.1 of the License, or (at your option) any later version.
|
|
||||||
-
|
|
||||||
- The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
- Lesser General Public License for more details.
|
|
||||||
-
|
|
||||||
- You should have received a copy of the GNU Lesser General Public
|
|
||||||
- License along with the GNU C Library; if not, write to the Free
|
|
||||||
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
||||||
- 02111-1307 USA. */
|
|
||||||
-
|
|
||||||
-#include <sysdep.h>
|
|
||||||
-#define _ERRNO_H 1
|
|
||||||
-#include <bits/errno.h>
|
|
||||||
-
|
|
||||||
-/* For the calculation see asm/vsyscall.h. */
|
|
||||||
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-ENTRY (__gettimeofday)
|
|
||||||
- /* Align stack. */
|
|
||||||
- sub $0x8, %rsp
|
|
||||||
- cfi_adjust_cfa_offset(8)
|
|
||||||
-#ifdef SHARED
|
|
||||||
- movq __vdso_gettimeofday(%rip), %rax
|
|
||||||
- PTR_DEMANGLE (%rax)
|
|
||||||
-#else
|
|
||||||
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
|
||||||
-#endif
|
|
||||||
- callq *%rax
|
|
||||||
- /* Check error return. */
|
|
||||||
- cmpl $-4095, %eax
|
|
||||||
- jae SYSCALL_ERROR_LABEL
|
|
||||||
-
|
|
||||||
-L(pseudo_end):
|
|
||||||
- add $0x8, %rsp
|
|
||||||
- cfi_adjust_cfa_offset(-8)
|
|
||||||
- ret
|
|
||||||
-PSEUDO_END(__gettimeofday)
|
|
||||||
-
|
|
||||||
-strong_alias (__gettimeofday, __gettimeofday_internal)
|
|
||||||
-weak_alias (__gettimeofday, gettimeofday)
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..1a773d6
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
|
|
||||||
@@ -0,0 +1,49 @@
|
|
||||||
+/* Copyright (C) 2002, 2003, 2007, 2011 Free Software Foundation, Inc.
|
|
||||||
+ This file is part of the GNU C Library.
|
|
||||||
+
|
|
||||||
+ The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
+ modify it under the terms of the GNU Lesser General Public
|
|
||||||
+ License as published by the Free Software Foundation; either
|
|
||||||
+ version 2.1 of the License, or (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
+ Lesser General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU Lesser General Public
|
|
||||||
+ License along with the GNU C Library; if not, write to the Free
|
|
||||||
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
||||||
+ 02111-1307 USA. */
|
|
||||||
+
|
|
||||||
+#include <dl-vdso.h>
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000ul
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+#ifdef SHARED
|
|
||||||
+void *gettimeofday_ifunc (void) __asm__ ("__gettimeofday");
|
|
||||||
+
|
|
||||||
+void *
|
|
||||||
+gettimeofday_ifunc (void)
|
|
||||||
+{
|
|
||||||
+ PREPARE_VERSION (linux26, "LINUX_2.6", 61765110);
|
|
||||||
+
|
|
||||||
+ /* If the vDSO is not available we fall back on the old vsyscall. */
|
|
||||||
+ return (_dl_vdso_vsym ("gettimeofday", &linux26)
|
|
||||||
+ ?: (void *) VSYSCALL_ADDR_vgettimeofday);
|
|
||||||
+}
|
|
||||||
+__asm (".type __gettimeofday, %gnu_indirect_function");
|
|
||||||
+#else
|
|
||||||
+# include <sys/time.h>
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+__gettimeofday (struct timeval *tv, struct timezone *tz)
|
|
||||||
+{
|
|
||||||
+ return ((int (*) (struct timeval *, struct timezone *)) VSYSCALL_ADDR_vgettimeofday) (tv, tz);
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+weak_alias (__gettimeofday, gettimeofday)
|
|
||||||
+strong_alias (__gettimeofday, __gettimeofday_internal)
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/init-first.c b/sysdeps/unix/sysv/linux/x86_64/init-first.c
|
|
||||||
index e676f62..25cf08b 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/x86_64/init-first.c
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/init-first.c
|
|
||||||
@@ -20,15 +20,11 @@
|
|
||||||
# include <dl-vdso.h>
|
|
||||||
# include <bits/libc-vdso.h>
|
|
||||||
|
|
||||||
-long int (*__vdso_gettimeofday) (struct timeval *, void *) attribute_hidden;
|
|
||||||
-
|
|
||||||
long int (*__vdso_clock_gettime) (clockid_t, struct timespec *)
|
|
||||||
__attribute__ ((nocommon));
|
|
||||||
strong_alias (__vdso_clock_gettime, __GI___vdso_clock_gettime attribute_hidden)
|
|
||||||
|
|
||||||
-long int (*__vdso_getcpu) (unsigned *, unsigned *, void *);
|
|
||||||
-
|
|
||||||
-long int (*__vdso_time) (time_t *) attribute_hidden;
|
|
||||||
+long int (*__vdso_getcpu) (unsigned *, unsigned *, void *) attribute_hidden;
|
|
||||||
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
@@ -36,15 +32,7 @@ _libc_vdso_platform_setup (void)
|
|
||||||
{
|
|
||||||
PREPARE_VERSION (linux26, "LINUX_2.6", 61765110);
|
|
||||||
|
|
||||||
- void *p = _dl_vdso_vsym ("gettimeofday", &linux26);
|
|
||||||
- /* If the vDSO is not available we fall back on the old vsyscall. */
|
|
||||||
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000ul
|
|
||||||
- if (p == NULL)
|
|
||||||
- p = (void *) VSYSCALL_ADDR_vgettimeofday;
|
|
||||||
- PTR_MANGLE (p);
|
|
||||||
- __vdso_gettimeofday = p;
|
|
||||||
-
|
|
||||||
- p = _dl_vdso_vsym ("clock_gettime", &linux26);
|
|
||||||
+ void *p = _dl_vdso_vsym ("clock_gettime", &linux26);
|
|
||||||
PTR_MANGLE (p);
|
|
||||||
__GI___vdso_clock_gettime = p;
|
|
||||||
|
|
||||||
@@ -55,14 +43,6 @@ _libc_vdso_platform_setup (void)
|
|
||||||
p = (void *) VSYSCALL_ADDR_vgetcpu;
|
|
||||||
PTR_MANGLE (p);
|
|
||||||
__vdso_getcpu = p;
|
|
||||||
-
|
|
||||||
- p = _dl_vdso_vsym ("time", &linux26);
|
|
||||||
- /* If the vDSO is not available we fall back on the old vsyscall. */
|
|
||||||
-#define VSYSCALL_ADDR_vtime 0xffffffffff600400
|
|
||||||
- if (p == NULL)
|
|
||||||
- p = (void *) VSYSCALL_ADDR_vtime;
|
|
||||||
- PTR_MANGLE (p);
|
|
||||||
- __vdso_time = p;
|
|
||||||
}
|
|
||||||
|
|
||||||
# define VDSO_SETUP _libc_vdso_platform_setup
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/time.S b/sysdeps/unix/sysv/linux/x86_64/time.S
|
|
||||||
deleted file mode 100644
|
|
||||||
index 66d7498..0000000
|
|
||||||
--- a/sysdeps/unix/sysv/linux/x86_64/time.S
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,47 +0,0 @@
|
|
||||||
-/* Copyright (C) 2001,02, 2003, 2011 Free Software Foundation, Inc.
|
|
||||||
- This file is part of the GNU C Library.
|
|
||||||
-
|
|
||||||
- The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
- modify it under the terms of the GNU Lesser General Public
|
|
||||||
- License as published by the Free Software Foundation; either
|
|
||||||
- version 2.1 of the License, or (at your option) any later version.
|
|
||||||
-
|
|
||||||
- The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
- Lesser General Public License for more details.
|
|
||||||
-
|
|
||||||
- You should have received a copy of the GNU Lesser General Public
|
|
||||||
- License along with the GNU C Library; if not, write to the Free
|
|
||||||
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
||||||
- 02111-1307 USA. */
|
|
||||||
-
|
|
||||||
-#include <sysdep.h>
|
|
||||||
-#define _ERRNO_H 1
|
|
||||||
-#include <bits/errno.h>
|
|
||||||
-
|
|
||||||
-/* For the calculation see asm/vsyscall.h. */
|
|
||||||
-#define VSYSCALL_ADDR_vtime 0xffffffffff600400
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-/* Return the current time as a `time_t' and also put it in *T if T is
|
|
||||||
- not NULL. Time is represented as seconds from Jan 1 00:00:00 1970. */
|
|
||||||
-
|
|
||||||
-ENTRY (time)
|
|
||||||
- /* Align stack. */
|
|
||||||
- sub $0x8, %rsp
|
|
||||||
- cfi_adjust_cfa_offset(8)
|
|
||||||
-
|
|
||||||
-#ifdef SHARED
|
|
||||||
- movq __vdso_time(%rip), %rax
|
|
||||||
- PTR_DEMANGLE (%rax)
|
|
||||||
-#else
|
|
||||||
- movq $VSYSCALL_ADDR_vtime, %rax
|
|
||||||
-#endif
|
|
||||||
- callq *%rax
|
|
||||||
-
|
|
||||||
- add $0x8, %rsp
|
|
||||||
- cfi_adjust_cfa_offset(-8)
|
|
||||||
- ret
|
|
||||||
-PSEUDO_END_NOERRNO(time)
|
|
||||||
-libc_hidden_def (time)
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/time.c b/sysdeps/unix/sysv/linux/x86_64/time.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..698d561
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/time.c
|
|
||||||
@@ -0,0 +1,47 @@
|
|
||||||
+/* Copyright (C) 2001,02, 2003, 2011 Free Software Foundation, Inc.
|
|
||||||
+ This file is part of the GNU C Library.
|
|
||||||
+
|
|
||||||
+ The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
+ modify it under the terms of the GNU Lesser General Public
|
|
||||||
+ License as published by the Free Software Foundation; either
|
|
||||||
+ version 2.1 of the License, or (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
+ Lesser General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU Lesser General Public
|
|
||||||
+ License along with the GNU C Library; if not, write to the Free
|
|
||||||
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
||||||
+ 02111-1307 USA. */
|
|
||||||
+
|
|
||||||
+#include <dl-vdso.h>
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+#define VSYSCALL_ADDR_vtime 0xffffffffff600400
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+#ifdef SHARED
|
|
||||||
+void *time_ifunc (void) __asm__ ("time");
|
|
||||||
+
|
|
||||||
+void *
|
|
||||||
+time_ifunc (void)
|
|
||||||
+{
|
|
||||||
+ PREPARE_VERSION (linux26, "LINUX_2.6", 61765110);
|
|
||||||
+
|
|
||||||
+ /* If the vDSO is not available we fall back on the old vsyscall. */
|
|
||||||
+ return _dl_vdso_vsym ("time", &linux26) ?: (void *) VSYSCALL_ADDR_vtime;
|
|
||||||
+}
|
|
||||||
+__asm (".type time, %gnu_indirect_function");
|
|
||||||
+#else
|
|
||||||
+# include <time.h>
|
|
||||||
+
|
|
||||||
+time_t
|
|
||||||
+time (time_t *t)
|
|
||||||
+{
|
|
||||||
+ return ((time_t (*) (time_t *)) VSYSCALL_ADDR_vtime) (t);
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+strong_alias (time, __GI_time)
|
|
||||||
|
|
||||||
commit 2bc174332ba6ddbd1b855dced33889bef56e8ba3
|
|
||||||
Author: Andreas Schwab <schwab@redhat.com>
|
|
||||||
Date: Tue Aug 30 15:37:54 2011 +0200
|
|
||||||
|
|
||||||
Relocate objects in dependency order
|
|
||||||
|
|
||||||
2011-08-30 Andreas Schwab <schwab@redhat.com>
|
|
||||||
|
|
||||||
* elf/rtld.c (dl_main): Relocate objects in dependency order.
|
|
||||||
|
|
||||||
diff --git a/elf/rtld.c b/elf/rtld.c
|
|
||||||
index 87bb5f0..4f6bbfd 100644
|
|
||||||
--- a/elf/rtld.c
|
|
||||||
+++ b/elf/rtld.c
|
|
||||||
@@ -2255,13 +2255,12 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
|
|
||||||
/* If we are profiling we also must do lazy reloaction. */
|
|
||||||
GLRO(dl_lazy) |= consider_profiling;
|
|
||||||
|
|
||||||
- struct link_map *l = main_map;
|
|
||||||
- while (l->l_next)
|
|
||||||
- l = l->l_next;
|
|
||||||
-
|
|
||||||
HP_TIMING_NOW (start);
|
|
||||||
- do
|
|
||||||
+ unsigned i = main_map->l_searchlist.r_nlist;
|
|
||||||
+ while (i-- > 0)
|
|
||||||
{
|
|
||||||
+ struct link_map *l = main_map->l_initfini[i];
|
|
||||||
+
|
|
||||||
/* While we are at it, help the memory handling a bit. We have to
|
|
||||||
mark some data structures as allocated with the fake malloc()
|
|
||||||
implementation in ld.so. */
|
|
||||||
@@ -2280,10 +2279,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
|
|
||||||
/* Add object to slot information data if necessasy. */
|
|
||||||
if (l->l_tls_blocksize != 0 && tls_init_tp_called)
|
|
||||||
_dl_add_to_slotinfo (l);
|
|
||||||
-
|
|
||||||
- l = l->l_prev;
|
|
||||||
}
|
|
||||||
- while (l);
|
|
||||||
HP_TIMING_NOW (stop);
|
|
||||||
|
|
||||||
HP_TIMING_DIFF (relocate_time, start, stop);
|
|
||||||
|
|
||||||
commit ef60624956e93df1da329a48570776ed963b1916
|
|
||||||
Author: Ulrich Drepper <drepper@gmail.com>
|
|
||||||
Date: Tue Sep 6 00:12:18 2011 -0400
|
|
||||||
|
|
||||||
Prefer real syscalls instead of vsyscalls on x86-64 outside libc.so
|
|
||||||
|
|
||||||
2011-09-06 Ulrich Drepper <drepper@gmail.com>
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/kernel-features.h: Add entry for getcpu
|
|
||||||
syscall on x86-64.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/gettimeofday.c [!SHARED]: Use real
|
|
||||||
syscall.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/time.c: Likewise.
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S [!SHARED]: Use real
|
|
||||||
syscall if possible.
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
|
|
||||||
index d91f581..58f833e 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/kernel-features.h
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
|
|
||||||
@@ -546,3 +546,8 @@
|
|
||||||
#if __LINUX_KERNEL_VERSION >= 0x020627
|
|
||||||
# define __ASSUME_SENDMMSG 1
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
+/* getcpu is a syscall for x86-64 since 3.1. */
|
|
||||||
+#if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100
|
|
||||||
+# define __ASSUME_GETCPU_SYSCALL 1
|
|
||||||
+#endif
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
|
|
||||||
index 1a773d6..56171bc 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
|
|
||||||
@@ -37,11 +37,12 @@ gettimeofday_ifunc (void)
|
|
||||||
__asm (".type __gettimeofday, %gnu_indirect_function");
|
|
||||||
#else
|
|
||||||
# include <sys/time.h>
|
|
||||||
+# include <sysdep.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
__gettimeofday (struct timeval *tv, struct timezone *tz)
|
|
||||||
{
|
|
||||||
- return ((int (*) (struct timeval *, struct timezone *)) VSYSCALL_ADDR_vgettimeofday) (tv, tz);
|
|
||||||
+ return INLINE_SYSCALL (gettimeofday, 2, tv, tz);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S b/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
|
|
||||||
index 8ec7d3f..246c955 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
|
|
||||||
@@ -20,6 +20,7 @@
|
|
||||||
#include <tls.h>
|
|
||||||
#define _ERRNO_H 1
|
|
||||||
#include <bits/errno.h>
|
|
||||||
+#include <kernel-features.h>
|
|
||||||
|
|
||||||
/* For the calculation see asm/vsyscall.h. */
|
|
||||||
#define VSYSCALL_ADDR_vgetcpu 0xffffffffff600800
|
|
||||||
@@ -38,10 +39,26 @@ ENTRY (sched_getcpu)
|
|
||||||
#ifdef SHARED
|
|
||||||
movq __vdso_getcpu(%rip), %rax
|
|
||||||
PTR_DEMANGLE (%rax)
|
|
||||||
+ callq *%rax
|
|
||||||
#else
|
|
||||||
+# ifdef __NR_getcpu
|
|
||||||
+ movl $__NR_getcpu, %eax
|
|
||||||
+ syscall
|
|
||||||
+# ifndef __ASSUME_GETCPU_SYSCALL
|
|
||||||
+ cmpq $-ENOSYS, %rax
|
|
||||||
+ jne 1f
|
|
||||||
+# endif
|
|
||||||
+# endif
|
|
||||||
+# ifndef __ASSUME_GETCPU_SYSCALL
|
|
||||||
movq $VSYSCALL_ADDR_vgetcpu, %rax
|
|
||||||
-#endif
|
|
||||||
callq *%rax
|
|
||||||
+1:
|
|
||||||
+# else
|
|
||||||
+# ifndef __NR_getcpu
|
|
||||||
+# error "cannot happen"
|
|
||||||
+# endif
|
|
||||||
+# endif
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
cmpq $-4095, %rax
|
|
||||||
jae SYSCALL_ERROR_LABEL
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/time.c b/sysdeps/unix/sysv/linux/x86_64/time.c
|
|
||||||
index 698d561..c1c1a75 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/x86_64/time.c
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/x86_64/time.c
|
|
||||||
@@ -36,11 +36,13 @@ time_ifunc (void)
|
|
||||||
__asm (".type time, %gnu_indirect_function");
|
|
||||||
#else
|
|
||||||
# include <time.h>
|
|
||||||
+# include <sysdep.h>
|
|
||||||
|
|
||||||
time_t
|
|
||||||
time (time_t *t)
|
|
||||||
{
|
|
||||||
- return ((time_t (*) (time_t *)) VSYSCALL_ADDR_vtime) (t);
|
|
||||||
+ INTERNAL_SYSCALL_DECL (err);
|
|
||||||
+ return INTERNAL_SYSCALL (time, err, 1, t);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
2011-09-06 Andreas Jaeger <aj@suse.de>
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/gettimeofday.c: Include <errno.h>
|
|
||||||
to fix build.
|
|
||||||
|
|
||||||
Index: glibc-2.14/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.14.orig/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
|
|
||||||
+++ glibc-2.14/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
|
|
||||||
@@ -36,6 +36,7 @@ gettimeofday_ifunc (void)
|
|
||||||
}
|
|
||||||
__asm (".type __gettimeofday, %gnu_indirect_function");
|
|
||||||
#else
|
|
||||||
+# include <errno.h>
|
|
||||||
# include <sys/time.h>
|
|
||||||
# include <sysdep.h>
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
|
|
||||||
This fixes ceil (x) for -1.0 < x < 0.
|
|
||||||
|
|
||||||
Index: sysdeps/x86_64/fpu/s_ceil.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/s_ceil.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/s_ceil.c
|
|
||||||
@@ -34,7 +34,11 @@ double __ceil(double x)
|
|
||||||
/* x is +zero or -zero; return the same zero */
|
|
||||||
return x;
|
|
||||||
else if (xneg) /* x < 0.0 */
|
|
||||||
- return 0.0;
|
|
||||||
+ {
|
|
||||||
+ /* Return zero with the sign of x */
|
|
||||||
+ PUT_BITS_DP64(SIGNBIT_DP64, x);
|
|
||||||
+ return x;
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
return 1.0;
|
|
||||||
}
|
|
||||||
Index: sysdeps/x86_64/fpu/s_ceilf.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/s_ceilf.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/s_ceilf.c
|
|
||||||
@@ -34,7 +34,11 @@ float __ceilf(float x)
|
|
||||||
/* x is +zero or -zero; return the same zero */
|
|
||||||
return x;
|
|
||||||
else if (xneg) /* x < 0.0 */
|
|
||||||
- return 0.0F;
|
|
||||||
+ {
|
|
||||||
+ /* Return zero with the sign of x */
|
|
||||||
+ PUT_BITS_SP32(SIGNBIT_SP32, x);
|
|
||||||
+ return x;
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
return 1.0F;
|
|
||||||
}
|
|
@ -4,9 +4,11 @@
|
|||||||
|
|
||||||
Index: nscd/nscd.h
|
Index: nscd/nscd.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- nscd/nscd.h.orig
|
diff --git a/nscd/nscd.h b/nscd/nscd.h
|
||||||
|
index fdaf01b..23b6a94 100644
|
||||||
|
--- nscd/nscd.h
|
||||||
+++ nscd/nscd.h
|
+++ nscd/nscd.h
|
||||||
@@ -105,10 +105,10 @@ struct database_dyn
|
@@ -113,11 +113,11 @@ struct database_dyn
|
||||||
|
|
||||||
|
|
||||||
/* Paths of the file for the persistent storage. */
|
/* Paths of the file for the persistent storage. */
|
||||||
@ -14,10 +16,12 @@ Index: nscd/nscd.h
|
|||||||
-#define _PATH_NSCD_GROUP_DB "/var/db/nscd/group"
|
-#define _PATH_NSCD_GROUP_DB "/var/db/nscd/group"
|
||||||
-#define _PATH_NSCD_HOSTS_DB "/var/db/nscd/hosts"
|
-#define _PATH_NSCD_HOSTS_DB "/var/db/nscd/hosts"
|
||||||
-#define _PATH_NSCD_SERVICES_DB "/var/db/nscd/services"
|
-#define _PATH_NSCD_SERVICES_DB "/var/db/nscd/services"
|
||||||
|
-#define _PATH_NSCD_NETGROUP_DB "/var/db/nscd/netgroup"
|
||||||
+#define _PATH_NSCD_PASSWD_DB "/var/run/nscd/passwd"
|
+#define _PATH_NSCD_PASSWD_DB "/var/run/nscd/passwd"
|
||||||
+#define _PATH_NSCD_GROUP_DB "/var/run/nscd/group"
|
+#define _PATH_NSCD_GROUP_DB "/var/run/nscd/group"
|
||||||
+#define _PATH_NSCD_HOSTS_DB "/var/run/nscd/hosts"
|
+#define _PATH_NSCD_HOSTS_DB "/var/run/nscd/hosts"
|
||||||
+#define _PATH_NSCD_SERVICES_DB "/var/run/nscd/services"
|
+#define _PATH_NSCD_SERVICES_DB "/var/run/nscd/services"
|
||||||
|
+#define _PATH_NSCD_NETGROUP_DB "/var/run/nscd/netgroup"
|
||||||
|
|
||||||
/* Path used when not using persistent storage. */
|
/* Path used when not using persistent storage. */
|
||||||
#define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX"
|
#define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX"
|
||||||
|
@ -1,122 +0,0 @@
|
|||||||
Send to libc-alpha on 2011-07-01, will be part of glibc 2.15.
|
|
||||||
|
|
||||||
commit id: 445b4a53ea9d6c457c5f4ac1538102d8be0a5d89
|
|
||||||
|
|
||||||
2011-07-01 Thorsten Kukuk <kukuk@suse.de>
|
|
||||||
|
|
||||||
* nscd/pwdcache.c (cache_addpw): Handle zero negtimeout.
|
|
||||||
* nscd/initgrcache.c (addinitgroupsX): Likewise.
|
|
||||||
* nscd/hstcache.c (cache_addhst): Likewise.
|
|
||||||
* nscd/grpcache.c (cache_addgr): Likewise.
|
|
||||||
* nscd/aicache.c (addhstaiX): Likewise.
|
|
||||||
|
|
||||||
Index: nscd/aicache.c
|
|
||||||
===================================================================
|
|
||||||
--- nscd/aicache.c.orig
|
|
||||||
+++ nscd/aicache.c
|
|
||||||
@@ -504,9 +504,15 @@ next_nip:
|
|
||||||
if (fd != -1)
|
|
||||||
TEMP_FAILURE_RETRY (send (fd, ¬found, total, MSG_NOSIGNAL));
|
|
||||||
|
|
||||||
- dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1);
|
|
||||||
/* If we cannot permanently store the result, so be it. */
|
|
||||||
- if (dataset != NULL)
|
|
||||||
+ if (db->negtimeout == 0)
|
|
||||||
+ {
|
|
||||||
+ /* Mark the old entry as obsolete. */
|
|
||||||
+ if (dh != NULL)
|
|
||||||
+ dh->usable = false;
|
|
||||||
+ dataset = NULL;
|
|
||||||
+ }
|
|
||||||
+ else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL)
|
|
||||||
{
|
|
||||||
dataset->head.allocsize = sizeof (struct dataset) + req->key_len;
|
|
||||||
dataset->head.recsize = total;
|
|
||||||
Index: nscd/grpcache.c
|
|
||||||
===================================================================
|
|
||||||
--- nscd/grpcache.c.orig
|
|
||||||
+++ nscd/grpcache.c
|
|
||||||
@@ -113,10 +113,14 @@ cache_addgr (struct database_dyn *db, in
|
|
||||||
written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
|
|
||||||
MSG_NOSIGNAL));
|
|
||||||
|
|
||||||
- dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
|
|
||||||
- 1);
|
|
||||||
/* If we cannot permanently store the result, so be it. */
|
|
||||||
- if (dataset != NULL)
|
|
||||||
+ if (db->negtimeout == 0)
|
|
||||||
+ {
|
|
||||||
+ /* Mark the old entry as obsolete. */
|
|
||||||
+ if (dh != NULL)
|
|
||||||
+ dh->usable = false;
|
|
||||||
+ }
|
|
||||||
+ else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL)
|
|
||||||
{
|
|
||||||
dataset->head.allocsize = sizeof (struct dataset) + req->key_len;
|
|
||||||
dataset->head.recsize = total;
|
|
||||||
Index: nscd/hstcache.c
|
|
||||||
===================================================================
|
|
||||||
--- nscd/hstcache.c.orig
|
|
||||||
+++ nscd/hstcache.c
|
|
||||||
@@ -119,10 +119,14 @@ cache_addhst (struct database_dyn *db, i
|
|
||||||
MSG_NOSIGNAL)) != total)
|
|
||||||
all_written = false;
|
|
||||||
|
|
||||||
- dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
|
|
||||||
- 1);
|
|
||||||
/* If we cannot permanently store the result, so be it. */
|
|
||||||
- if (dataset != NULL)
|
|
||||||
+ if (db->negtimeout == 0)
|
|
||||||
+ {
|
|
||||||
+ /* Mark the old entry as obsolete. */
|
|
||||||
+ if (dh != NULL)
|
|
||||||
+ dh->usable = false;
|
|
||||||
+ }
|
|
||||||
+ else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL)
|
|
||||||
{
|
|
||||||
dataset->head.allocsize = sizeof (struct dataset) + req->key_len;
|
|
||||||
dataset->head.recsize = total;
|
|
||||||
Index: nscd/initgrcache.c
|
|
||||||
===================================================================
|
|
||||||
--- nscd/initgrcache.c.orig
|
|
||||||
+++ nscd/initgrcache.c
|
|
||||||
@@ -197,10 +197,14 @@ addinitgroupsX (struct database_dyn *db,
|
|
||||||
written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
|
|
||||||
MSG_NOSIGNAL));
|
|
||||||
|
|
||||||
- dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
|
|
||||||
- 1);
|
|
||||||
/* If we cannot permanently store the result, so be it. */
|
|
||||||
- if (dataset != NULL)
|
|
||||||
+ if (db->negtimeout == 0)
|
|
||||||
+ {
|
|
||||||
+ /* Mark the old entry as obsolete. */
|
|
||||||
+ if (dh != NULL)
|
|
||||||
+ dh->usable = false;
|
|
||||||
+ }
|
|
||||||
+ else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL)
|
|
||||||
{
|
|
||||||
dataset->head.allocsize = sizeof (struct dataset) + req->key_len;
|
|
||||||
dataset->head.recsize = total;
|
|
||||||
Index: nscd/pwdcache.c
|
|
||||||
===================================================================
|
|
||||||
--- nscd/pwdcache.c.orig
|
|
||||||
+++ nscd/pwdcache.c
|
|
||||||
@@ -120,10 +120,14 @@ cache_addpw (struct database_dyn *db, in
|
|
||||||
written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
|
|
||||||
MSG_NOSIGNAL));
|
|
||||||
|
|
||||||
- dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
|
|
||||||
- 1);
|
|
||||||
/* If we cannot permanently store the result, so be it. */
|
|
||||||
- if (dataset != NULL)
|
|
||||||
+ if (db->negtimeout == 0)
|
|
||||||
+ {
|
|
||||||
+ /* Mark the old entry as obsolete. */
|
|
||||||
+ if (dh != NULL)
|
|
||||||
+ dh->usable = false;
|
|
||||||
+ }
|
|
||||||
+ else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL)
|
|
||||||
{
|
|
||||||
dataset->head.allocsize = sizeof (struct dataset) + req->key_len;
|
|
||||||
dataset->head.recsize = total;
|
|
@ -1,95 +1,3 @@
|
|||||||
Index: nscd/cache.c
|
|
||||||
===================================================================
|
|
||||||
--- nscd/cache.c.orig 2010-01-18 18:01:41.000000000 +0100
|
|
||||||
+++ nscd/cache.c 2010-02-14 14:58:08.000000000 +0100
|
|
||||||
@@ -267,27 +267,29 @@
|
|
||||||
if (table->inotify_descr < 0 && table->check_file && now != LONG_MAX)
|
|
||||||
{
|
|
||||||
struct stat64 st;
|
|
||||||
+ time_t mtime;
|
|
||||||
|
|
||||||
- if (stat64 (table->filename, &st) < 0)
|
|
||||||
+ mtime = stat64 (table->filename, &st) ? LONG_MAX : st.st_mtime;
|
|
||||||
+ if (mtime != table->file_mtime)
|
|
||||||
{
|
|
||||||
- char buf[128];
|
|
||||||
- /* We cannot stat() the file, disable file checking if the
|
|
||||||
- file does not exist. */
|
|
||||||
- dbg_log (_("cannot stat() file `%s': %s"),
|
|
||||||
- table->filename, strerror_r (errno, buf, sizeof (buf)));
|
|
||||||
- if (errno == ENOENT)
|
|
||||||
- table->check_file = 0;
|
|
||||||
+ /* The file changed. Invalidate all entries. */
|
|
||||||
+ now = LONG_MAX;
|
|
||||||
+ table->file_mtime = mtime;
|
|
||||||
}
|
|
||||||
- else
|
|
||||||
+ if (*table->filename2)
|
|
||||||
{
|
|
||||||
- if (st.st_mtime != table->file_mtime)
|
|
||||||
+ mtime = stat64 (table->filename2, &st) ? LONG_MAX : st.st_mtime;
|
|
||||||
+ if (mtime != table->file_mtime2)
|
|
||||||
{
|
|
||||||
/* The file changed. Invalidate all entries. */
|
|
||||||
now = LONG_MAX;
|
|
||||||
- table->file_mtime = st.st_mtime;
|
|
||||||
+ table->file_mtime2 = mtime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ /* now == 0 means just check for changed files */
|
|
||||||
+ if (now == (time_t)0)
|
|
||||||
+ return 0;
|
|
||||||
|
|
||||||
/* We run through the table and find values which are not valid anymore.
|
|
||||||
|
|
||||||
Index: nscd/connections.c
|
|
||||||
===================================================================
|
|
||||||
--- nscd/connections.c.orig 2010-01-18 18:01:41.000000000 +0100
|
|
||||||
+++ nscd/connections.c 2010-02-14 14:58:08.000000000 +0100
|
|
||||||
@@ -119,6 +119,7 @@ struct database_dyn dbs[lastdb] =
|
|
||||||
.suggested_module = DEFAULT_SUGGESTED_MODULE,
|
|
||||||
.reset_res = 0,
|
|
||||||
.filename = "/etc/passwd",
|
|
||||||
+ .filename2 = "",
|
|
||||||
.db_filename = _PATH_NSCD_PASSWD_DB,
|
|
||||||
.disabled_iov = &pwd_iov_disabled,
|
|
||||||
.postimeout = 3600,
|
|
||||||
@@ -140,6 +141,7 @@ struct database_dyn dbs[lastdb] =
|
|
||||||
.suggested_module = DEFAULT_SUGGESTED_MODULE,
|
|
||||||
.reset_res = 0,
|
|
||||||
.filename = "/etc/group",
|
|
||||||
+ .filename2 = "",
|
|
||||||
.db_filename = _PATH_NSCD_GROUP_DB,
|
|
||||||
.disabled_iov = &grp_iov_disabled,
|
|
||||||
.postimeout = 3600,
|
|
||||||
@@ -161,6 +163,7 @@ struct database_dyn dbs[lastdb] =
|
|
||||||
.suggested_module = DEFAULT_SUGGESTED_MODULE,
|
|
||||||
.reset_res = 1,
|
|
||||||
.filename = "/etc/hosts",
|
|
||||||
+ .filename2 = "/etc/resolv.conf",
|
|
||||||
.db_filename = _PATH_NSCD_HOSTS_DB,
|
|
||||||
.disabled_iov = &hst_iov_disabled,
|
|
||||||
.postimeout = 3600,
|
|
||||||
@@ -855,15 +858,9 @@ cannot set socket to close on exec: %s;
|
|
||||||
/* We need the modification date of the file. */
|
|
||||||
struct stat64 st;
|
|
||||||
|
|
||||||
- if (stat64 (dbs[cnt].filename, &st) < 0)
|
|
||||||
- {
|
|
||||||
- /* We cannot stat() the file, disable file checking. */
|
|
||||||
- dbg_log (_("cannot stat() file `%s': %s"),
|
|
||||||
- dbs[cnt].filename, strerror (errno));
|
|
||||||
- dbs[cnt].check_file = 0;
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
- dbs[cnt].file_mtime = st.st_mtime;
|
|
||||||
+ dbs[cnt].file_mtime = stat64 (dbs[cnt].filename, &st) ? LONG_MAX : st.st_mtime;
|
|
||||||
+ if (*dbs[cnt].filename2)
|
|
||||||
+ dbs[cnt].file_mtime2 = stat64 (dbs[cnt].filename2, &st) ? LONG_MAX : st.st_mtime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: nscd/nscd.conf
|
Index: nscd/nscd.conf
|
||||||
===================================================================
|
===================================================================
|
||||||
--- nscd/nscd.conf.orig 2010-01-18 18:01:41.000000000 +0100
|
--- nscd/nscd.conf.orig 2010-01-18 18:01:41.000000000 +0100
|
||||||
@ -109,21 +17,6 @@ Index: nscd/nscd.conf
|
|||||||
shared hosts yes
|
shared hosts yes
|
||||||
max-db-size hosts 33554432
|
max-db-size hosts 33554432
|
||||||
|
|
||||||
Index: nscd/nscd.h
|
|
||||||
===================================================================
|
|
||||||
--- nscd/nscd.h.orig 2010-01-18 18:01:41.000000000 +0100
|
|
||||||
+++ nscd/nscd.h 2010-02-14 14:59:07.000000000 +0100
|
|
||||||
@@ -80,8 +80,10 @@ struct database_dyn
|
|
||||||
int propagate;
|
|
||||||
int reset_res;
|
|
||||||
const char filename[16];
|
|
||||||
+ const char filename2[17];
|
|
||||||
const char *db_filename;
|
|
||||||
time_t file_mtime;
|
|
||||||
+ time_t file_mtime2;
|
|
||||||
size_t suggested_module;
|
|
||||||
size_t max_db_size;
|
|
||||||
|
|
||||||
Index: nscd/nscd_stat.c
|
Index: nscd/nscd_stat.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- nscd/nscd_stat.c.orig 2010-01-18 18:01:41.000000000 +0100
|
--- nscd/nscd_stat.c.orig 2010-01-18 18:01:41.000000000 +0100
|
||||||
@ -143,12 +36,3 @@ Index: nscd/nscd_stat.c
|
|||||||
|
|
||||||
/* Statistic data for one database. */
|
/* Statistic data for one database. */
|
||||||
struct dbstat
|
struct dbstat
|
||||||
@@ -302,7 +307,7 @@ receive_print_stats (void)
|
|
||||||
data.dbs[i].maxnsearched,
|
|
||||||
data.dbs[i].rdlockdelayed,
|
|
||||||
data.dbs[i].wrlockdelayed,
|
|
||||||
- data.dbs[i].addfailed, check_file, dbnames[i]);
|
|
||||||
+ data.dbs[i].addfailed, check_file, (strcmp(dbnames[i], "hosts") ? dbnames[i] : "{hosts,resolv.conf}"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selinux_enabled)
|
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
--- ports/sysdeps/unix/sysv/linux/arm/clone.S
|
|
||||||
+++ ports/sysdeps/unix/sysv/linux/arm/clone.S
|
|
||||||
@@ -81,8 +81,11 @@
|
|
||||||
RETINSTR(, lr)
|
|
||||||
|
|
||||||
cfi_startproc
|
|
||||||
- cfi_undefined (lr)
|
|
||||||
+PSEUDO_END (__clone)
|
|
||||||
+
|
|
||||||
1:
|
|
||||||
+ .fnstart
|
|
||||||
+ .cantunwind
|
|
||||||
#ifdef RESET_PID
|
|
||||||
tst ip, #CLONE_THREAD
|
|
||||||
bne 3f
|
|
||||||
@@ -116,6 +119,6 @@
|
|
||||||
@ and we are done, passing the return value through r0
|
|
||||||
b PLTJMP(HIDDEN_JUMPTARGET(_exit))
|
|
||||||
|
|
||||||
-PSEUDO_END (__clone)
|
|
||||||
+ .fnend
|
|
||||||
|
|
||||||
weak_alias (__clone, clone)
|
|
@ -21,9 +21,9 @@ Index: config.make.in
|
|||||||
# Build tools.
|
# Build tools.
|
||||||
Index: configure.in
|
Index: configure.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- configure.in.orig 2011-05-20 15:39:31.237690293 +0200
|
--- configure.in.orig
|
||||||
+++ configure.in 2011-05-20 15:43:55.595111363 +0200
|
+++ configure.in
|
||||||
@@ -16,6 +16,7 @@
|
@@ -16,6 +16,7 @@ if test $host != $build; then
|
||||||
AC_CHECK_PROGS(BUILD_CC, gcc cc)
|
AC_CHECK_PROGS(BUILD_CC, gcc cc)
|
||||||
fi
|
fi
|
||||||
AC_SUBST(cross_compiling)
|
AC_SUBST(cross_compiling)
|
||||||
@ -33,9 +33,9 @@ Index: configure.in
|
|||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
Index: configure
|
Index: configure
|
||||||
===================================================================
|
===================================================================
|
||||||
--- configure.orig 2011-05-20 15:46:40.675628746 +0200
|
--- configure.orig
|
||||||
+++ configure 2011-05-20 15:40:52.292884126 +0200
|
+++ configure
|
||||||
@@ -545,6 +545,7 @@
|
@@ -554,6 +554,7 @@ ac_clean_files=
|
||||||
ac_config_libobj_dir=.
|
ac_config_libobj_dir=.
|
||||||
LIBOBJS=
|
LIBOBJS=
|
||||||
cross_compiling=no
|
cross_compiling=no
|
||||||
@ -43,7 +43,7 @@ Index: configure
|
|||||||
subdirs=
|
subdirs=
|
||||||
MFLAGS=
|
MFLAGS=
|
||||||
MAKEFLAGS=
|
MAKEFLAGS=
|
||||||
@@ -697,6 +696,7 @@
|
@@ -706,6 +707,7 @@ CXXFLAGS
|
||||||
CXX
|
CXX
|
||||||
CPP
|
CPP
|
||||||
cross_compiling
|
cross_compiling
|
||||||
@ -51,7 +51,7 @@ Index: configure
|
|||||||
BUILD_CC
|
BUILD_CC
|
||||||
OBJEXT
|
OBJEXT
|
||||||
ac_ct_CC
|
ac_ct_CC
|
||||||
@@ -1244,6 +1242,13 @@
|
@@ -1250,6 +1252,13 @@ do
|
||||||
as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
|
as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ Index: configure
|
|||||||
# There might be people who depend on the old broken behavior: `$host'
|
# There might be people who depend on the old broken behavior: `$host'
|
||||||
# used to hold the argument of --host etc.
|
# used to hold the argument of --host etc.
|
||||||
# FIXME: To remove some day.
|
# FIXME: To remove some day.
|
||||||
@@ -1266,6 +1257,7 @@
|
@@ -1265,6 +1274,7 @@ if test "x$host_alias" != x; then
|
||||||
If a cross compiler is detected then cross compile mode will be used" >&2
|
If a cross compiler is detected then cross compile mode will be used" >&2
|
||||||
elif test "x$build_alias" != "x$host_alias"; then
|
elif test "x$build_alias" != "x$host_alias"; then
|
||||||
cross_compiling=yes
|
cross_compiling=yes
|
||||||
@ -73,9 +73,9 @@ Index: configure
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1454,6 +1444,9 @@
|
@@ -1450,6 +1460,9 @@ Optional Features:
|
||||||
--enable-experimental-malloc
|
--enable-multi-arch enable single DSO with optimizations for multiple
|
||||||
enable experimental malloc features
|
architectures
|
||||||
--enable-nss-crypt enable libcrypt to use nss
|
--enable-nss-crypt enable libcrypt to use nss
|
||||||
+ --enable-runbinaries the compiled binaries should run on the buildhost because
|
+ --enable-runbinaries the compiled binaries should run on the buildhost because
|
||||||
+ it happens to have a compatible cpu
|
+ it happens to have a compatible cpu
|
||||||
@ -87,7 +87,7 @@ Index: posix/Makefile
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- posix/Makefile.orig
|
--- posix/Makefile.orig
|
||||||
+++ posix/Makefile
|
+++ posix/Makefile
|
||||||
@@ -302,7 +302,7 @@ $(inst_libexecdir)/getconf: $(inst_bindi
|
@@ -320,7 +320,7 @@ $(inst_libexecdir)/getconf: $(inst_bindi
|
||||||
done < $(objpfx)getconf.speclist
|
done < $(objpfx)getconf.speclist
|
||||||
|
|
||||||
$(objpfx)getconf.speclist: $(objpfx)getconf
|
$(objpfx)getconf.speclist: $(objpfx)getconf
|
||||||
@ -100,7 +100,7 @@ Index: sunrpc/Makefile
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- sunrpc/Makefile.orig
|
--- sunrpc/Makefile.orig
|
||||||
+++ sunrpc/Makefile
|
+++ sunrpc/Makefile
|
||||||
@@ -98,7 +98,7 @@ otherlibs += $(nssobjdir)/libnss_files.a
|
@@ -108,7 +108,7 @@ otherlibs += $(nssobjdir)/libnss_files.a
|
||||||
$(resolvobjdir)/libresolv.a
|
$(resolvobjdir)/libresolv.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
|
|
||||||
index f5d055c..8f3c68c 100644
|
|
||||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
|
|
||||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
|
|
||||||
@@ -210,7 +210,7 @@ pthread_rwlock_timedrdlock:
|
|
||||||
cfi_restore(%r12)
|
|
||||||
retq
|
|
||||||
|
|
||||||
-#ifdef __ASSUME_PRIVATE_FUTEX
|
|
||||||
+#ifdef __ASSUME_FUTEX_CLOCK_REALTIME
|
|
||||||
cfi_adjust_cfa_offset(16)
|
|
||||||
cfi_rel_offset(%r12, 8)
|
|
||||||
cfi_rel_offset(%r13, 0)
|
|
||||||
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
|
|
||||||
index 6ed8b49..9aaaeba 100644
|
|
||||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
|
|
||||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
|
|
||||||
@@ -192,7 +192,7 @@ pthread_rwlock_timedwrlock:
|
|
||||||
|
|
||||||
7: movq %rdx, %rax
|
|
||||||
|
|
||||||
-#ifndef __ASSUME_PRIVATE_FUTEX
|
|
||||||
+#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
|
||||||
addq $16, %rsp
|
|
||||||
cfi_adjust_cfa_offset(-16)
|
|
||||||
popq %r14
|
|
||||||
@@ -207,7 +207,7 @@ pthread_rwlock_timedwrlock:
|
|
||||||
cfi_restore(%r12)
|
|
||||||
retq
|
|
||||||
|
|
||||||
-#ifdef __ASSUME_PRIVATE_FUTEX
|
|
||||||
+#ifdef __ASSUME_FUTEX_CLOCK_REALTIME
|
|
||||||
cfi_adjust_cfa_offset(16)
|
|
||||||
cfi_rel_offset(%r12, 8)
|
|
||||||
cfi_rel_offset(%r13, 0)
|
|
@ -1,27 +0,0 @@
|
|||||||
2011-06-21 Andreas Jaeger <aj@suse.de>
|
|
||||||
|
|
||||||
* sysdeps/s390/s390-64/Makefile ($(inst_gconvdir)/gconv-modules):
|
|
||||||
Copy rule from iconvdata/Makefile.
|
|
||||||
|
|
||||||
Index: glibc/sysdeps/s390/s390-64/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/s390/s390-64/Makefile 2009-08-03 10:18:31.000000000 +0200
|
|
||||||
+++ sysdeps/s390/s390-64/Makefile 2010-04-07 10:01:35.000000000 +0200
|
|
||||||
@@ -74,5 +74,17 @@ $(objpfx)gconv-modules-s390: gconv-modul
|
|
||||||
|
|
||||||
$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules-s390 $(+force)
|
|
||||||
$(do-install)
|
|
||||||
+ifeq (no,$(cross-compiling))
|
|
||||||
+# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
|
|
||||||
+# if this libc has more gconv modules than the previously installed one.
|
|
||||||
+ if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \
|
|
||||||
+ LC_ALL=C LANGUAGE=C \
|
|
||||||
+ $(common-objpfx)elf/ld.so --library-path $(rpath-link) \
|
|
||||||
+ $(common-objpfx)iconv/iconvconfig \
|
|
||||||
+ $(addprefix --prefix=,$(install_root)); \
|
|
||||||
+ fi
|
|
||||||
+else
|
|
||||||
+ @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
|
|
||||||
+endif
|
|
||||||
|
|
||||||
endif
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:1c830afb6d4aa166edaa09ec539580377ecbb16ba655d0aad6f5cb5a9a269aa9
|
|
||||||
size 630641
|
|
3
glibc-ports-2.15-8a70b2dcabbf.tar.bz2
Normal file
3
glibc-ports-2.15-8a70b2dcabbf.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7b7f32252c98467893d3352a57955943e6fd0e7ea606ef4765fe4985df9d7d08
|
||||||
|
size 549483
|
@ -1,95 +0,0 @@
|
|||||||
commit 0507f293c9b67d8eec92e8178308d72f1ed88449
|
|
||||||
Author: Andreas Schwab <schwab@redhat.com>
|
|
||||||
Date: Wed Oct 5 11:51:41 2011 +0200
|
|
||||||
|
|
||||||
arm: don't call ifunc functions in trace mode
|
|
||||||
|
|
||||||
--- a/sysdeps/arm/dl-machine.h
|
|
||||||
+++ b/sysdeps/arm/dl-machine.h
|
|
||||||
@@ -335,7 +335,7 @@ auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
|
||||||
const Elf32_Sym *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg, int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
|
||||||
@@ -369,9 +369,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
|
||||||
Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
|
|
||||||
|
|
||||||
if (sym != NULL
|
|
||||||
- && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC,
|
|
||||||
- 0)
|
|
||||||
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
|
|
||||||
+ && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
|
|
||||||
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
|
||||||
+ && __builtin_expect (!skip_ifunc, 1))
|
|
||||||
value = ((Elf32_Addr (*) (void)) value) ();
|
|
||||||
|
|
||||||
switch (r_type)
|
|
||||||
@@ -430,7 +430,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
|
||||||
}
|
|
||||||
case R_ARM_TLS_DESC:
|
|
||||||
{
|
|
||||||
- struct tlsdesc volatile *td =
|
|
||||||
+ struct tlsdesc volatile *td =
|
|
||||||
(struct tlsdesc volatile *)reloc_addr;
|
|
||||||
|
|
||||||
# ifndef RTLD_BOOTSTRAP
|
|
||||||
@@ -454,10 +454,10 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
|
||||||
else
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
- {
|
|
||||||
+ {
|
|
||||||
td->argument.value = value + sym_map->l_tls_offset;
|
|
||||||
td->entry = _dl_tlsdesc_return;
|
|
||||||
- }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
@@ -525,7 +525,7 @@ auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
|
||||||
const Elf32_Sym *sym, const struct r_found_version *version,
|
|
||||||
- void *const reloc_addr_arg)
|
|
||||||
+ void *const reloc_addr_arg, int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = reloc_addr_arg;
|
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
|
||||||
@@ -543,9 +543,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
|
||||||
Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
|
|
||||||
|
|
||||||
if (sym != NULL
|
|
||||||
- && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC,
|
|
||||||
- 0)
|
|
||||||
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
|
|
||||||
+ && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
|
|
||||||
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
|
||||||
+ && __builtin_expect (!skip_ifunc, 1))
|
|
||||||
value = ((Elf32_Addr (*) (void)) value) ();
|
|
||||||
|
|
||||||
switch (r_type)
|
|
||||||
@@ -656,7 +656,8 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
|
|
||||||
auto inline void
|
|
||||||
__attribute__ ((always_inline))
|
|
||||||
elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
- Elf32_Addr l_addr, const Elf32_Rel *reloc)
|
|
||||||
+ Elf32_Addr l_addr, const Elf32_Rel *reloc,
|
|
||||||
+ int skip_ifunc)
|
|
||||||
{
|
|
||||||
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
|
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
|
||||||
@@ -674,8 +675,8 @@ elf_machine_lazy_rel (struct link_map *map,
|
|
||||||
(struct tlsdesc volatile *)reloc_addr;
|
|
||||||
|
|
||||||
/* The linker must have given us the parameter we need in the
|
|
||||||
- first GOT entry, and left the second one empty. We fill the
|
|
||||||
- last with the resolver address */
|
|
||||||
+ first GOT entry, and left the second one empty. We fill the
|
|
||||||
+ last with the resolver address */
|
|
||||||
assert (td->entry == 0);
|
|
||||||
td->entry = (void*)(D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)])
|
|
||||||
+ map->l_addr);
|
|
@ -1,87 +0,0 @@
|
|||||||
Index: elf/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- elf/Makefile.orig
|
|
||||||
+++ elf/Makefile
|
|
||||||
@@ -133,6 +133,7 @@ include ../Makeconfig
|
|
||||||
ifeq ($(unwind-find-fde),yes)
|
|
||||||
routines += unwind-dw2-fde-glibc
|
|
||||||
shared-only-routines += unwind-dw2-fde-glibc
|
|
||||||
+CFLAGS-unwind-dw2-fde-glibc.c = -fno-strict-aliasing
|
|
||||||
endif
|
|
||||||
|
|
||||||
before-compile = $(objpfx)trusted-dirs.h
|
|
||||||
Index: inet/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- inet/Makefile.orig
|
|
||||||
+++ inet/Makefile
|
|
||||||
@@ -57,6 +57,8 @@ tests := htontest test_ifindex tst-ntoa
|
|
||||||
|
|
||||||
include ../Rules
|
|
||||||
|
|
||||||
+CFLAGS-tst-inet6_rth.c = -fno-strict-aliasing
|
|
||||||
+
|
|
||||||
ifeq ($(have-thread-library),yes)
|
|
||||||
|
|
||||||
CFLAGS-gethstbyad_r.c = -DUSE_NSCD=1 -fexceptions
|
|
||||||
Index: nis/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- nis/Makefile.orig
|
|
||||||
+++ nis/Makefile
|
|
||||||
@@ -69,6 +69,8 @@ libnss_nisplus-inhibit-o = $(filter-out
|
|
||||||
|
|
||||||
include ../Rules
|
|
||||||
|
|
||||||
+CFLAGS-nis_findserv.c = -fno-strict-aliasing
|
|
||||||
+CFLAGS-ypclnt.c = -fno-strict-aliasing
|
|
||||||
|
|
||||||
$(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
|
|
||||||
$(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
|
|
||||||
Index: nss/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- nss/Makefile.orig
|
|
||||||
+++ nss/Makefile
|
|
||||||
@@ -75,6 +75,7 @@ endif
|
|
||||||
|
|
||||||
include ../Rules
|
|
||||||
|
|
||||||
+CFLAGS-files-hosts.c = -fno-strict-aliasing
|
|
||||||
|
|
||||||
ifeq (yes,$(build-static-nss))
|
|
||||||
$(objpfx)getent: $(objpfx)libnss_files.a
|
|
||||||
Index: resolv/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- resolv/Makefile.orig
|
|
||||||
+++ resolv/Makefile
|
|
||||||
@@ -77,6 +77,7 @@ CPPFLAGS += -Dgethostbyname=res_gethostb
|
|
||||||
-Dgetnetbyaddr=res_getnetbyaddr
|
|
||||||
|
|
||||||
CFLAGS-res_hconf.c = -fexceptions
|
|
||||||
+CFLAGS-res_send.c = -fno-strict-aliasing
|
|
||||||
|
|
||||||
# The BIND code elicits some harmless warnings.
|
|
||||||
+cflags += -Wno-strict-prototypes -Wno-write-strings
|
|
||||||
Index: sunrpc/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- sunrpc/Makefile.orig
|
|
||||||
+++ sunrpc/Makefile
|
|
||||||
@@ -152,6 +152,10 @@ CFLAGS-openchild.c = -fexceptions
|
|
||||||
|
|
||||||
CPPFLAGS += -D_RPC_THREAD_SAFE_
|
|
||||||
|
|
||||||
+CFLAGS-clnt_tcp.c = -fno-strict-aliasing
|
|
||||||
+CFLAGS-clnt_udp.c = -fno-strict-aliasing
|
|
||||||
+CFLAGS-clnt_unix.c = -fno-strict-aliasing
|
|
||||||
+
|
|
||||||
$(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
|
|
||||||
$(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
|
|
||||||
$(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
|
|
||||||
Index: sysdeps/powerpc/powerpc64/elf/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/powerpc/powerpc64/elf/Makefile.orig
|
|
||||||
+++ sysdeps/powerpc/powerpc64/elf/Makefile
|
|
||||||
@@ -9,3 +9,5 @@ CFLAGS-rtld-mempcpy.os = $(no-special-re
|
|
||||||
CFLAGS-rtld-memmove.os = $(no-special-regs)
|
|
||||||
CFLAGS-rtld-memchr.os = $(no-special-regs)
|
|
||||||
CFLAGS-rtld-strnlen.os = $(no-special-regs)
|
|
||||||
+
|
|
||||||
+CFLAGS-gmon-start.c = -fno-strict-aliasing
|
|
@ -1,35 +0,0 @@
|
|||||||
|
|
||||||
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e502e19455c6110dd4487d91b7b7d6d8121f9ba
|
|
||||||
|
|
||||||
commit 6e502e19455c6110dd4487d91b7b7d6d8121f9ba
|
|
||||||
Author: Ulrich Drepper <drepper@gmail.com>
|
|
||||||
Date: Wed Jun 22 08:32:55 2011 -0400
|
|
||||||
|
|
||||||
Clean up after kernel sigcontext header mess
|
|
||||||
|
|
||||||
|
|
||||||
2011-06-21 Andreas Jaeger <aj@suse.de>
|
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/bits/sigcontext.h: Fix definition of
|
|
||||||
NULL after inclusion of kernel headers.
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/sysdeps/unix/sysv/linux/bits/sigcontext.h b/sysdeps/unix/sysv/linux/bits/sigcontext.h
|
|
||||||
index 67dcf94..0f5b607 100644
|
|
||||||
--- a/sysdeps/unix/sysv/linux/bits/sigcontext.h
|
|
||||||
+++ b/sysdeps/unix/sysv/linux/bits/sigcontext.h
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
|
||||||
+/* Copyright (C) 1996, 1997, 1998, 2011 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
@@ -26,4 +26,8 @@
|
|
||||||
# define sigcontext_struct sigcontext
|
|
||||||
|
|
||||||
# include <asm/sigcontext.h>
|
|
||||||
+
|
|
||||||
+/* The Linux kernel headers redefine NULL wrongly, so cleanup afterwards. */
|
|
||||||
+# define __need_NULL
|
|
||||||
+# include <stddef.h>
|
|
||||||
#endif
|
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 26 12:53:55 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- Update to c0da14cdda1f (glibc-ports: 8a70b2dcabbf):
|
||||||
|
- new locales
|
||||||
|
- many bugfixes
|
||||||
|
- glibc 2.15
|
||||||
|
- obsoletes tzfile-corruption-fix.patch,
|
||||||
|
glibc-2.14-32args-printf.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 21 15:16:42 CET 2011 - meissner@suse.de
|
Thu Dec 21 15:16:42 CET 2011 - meissner@suse.de
|
||||||
|
|
||||||
@ -9,6 +19,16 @@ Mon Dec 19 10:01:56 UTC 2011 - aj@suse.de
|
|||||||
- Fix timezone loader overflow (bnc#735850,CVE-2009-5029) (patch
|
- Fix timezone loader overflow (bnc#735850,CVE-2009-5029) (patch
|
||||||
tzfile-corruption-fix.patch)
|
tzfile-corruption-fix.patch)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 5 09:29:32 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- Update to 52ad36a21973 (glibc-ports: 4a40b38f6355):
|
||||||
|
* fix many warnings
|
||||||
|
* bugfixes
|
||||||
|
* obsolete patches glibc-strict-aliasing.diff and
|
||||||
|
glibc-arm-clone-unwind-fix.diff
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 29 03:09:56 UTC 2011 - rcoe@wi.rr.com
|
Tue Nov 29 03:09:56 UTC 2011 - rcoe@wi.rr.com
|
||||||
|
|
||||||
@ -29,6 +49,21 @@ Thu Nov 17 10:27:31 UTC 2011 - aj@suse.de
|
|||||||
|
|
||||||
- Remove duplicated locales from glibc-2.3.locales.diff.bz2
|
- Remove duplicated locales from glibc-2.3.locales.diff.bz2
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 15 12:49:56 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- nscd now monitors resolv.conf, so simplify glibc-2.4.90-nscd.diff
|
||||||
|
patch and re-enable it
|
||||||
|
- Adjust and re-enable glibc-2.3.3-nscd-db-path.diff
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 15 12:10:32 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- Update to 09f93bd3d6b1:
|
||||||
|
- Clean up internal fopen uses to always use close-on-exec
|
||||||
|
- Optimized strcasecmp and strncasecmp for SSSE3 and SSE4.2 on x86-32
|
||||||
|
- bugfixes
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Nov 14 12:02:06 CET 2011 - ro@suse.de
|
Mon Nov 14 12:02:06 CET 2011 - ro@suse.de
|
||||||
|
|
||||||
@ -57,6 +92,35 @@ Mon Nov 7 21:06:32 CET 2011 - dmueller@suse.de
|
|||||||
* sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S: New.
|
* sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S: New.
|
||||||
- Fix unwinding crash when using clone()
|
- Fix unwinding crash when using clone()
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 2 13:52:36 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- Update to d35dce5213b3:
|
||||||
|
- caching of network information for getaddrinfo
|
||||||
|
- bugfixes
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Oct 29 18:37:46 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- Update to 21b64b153631:
|
||||||
|
- various bugfixes
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 27 08:44:14 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- Update to 804791474dc1:
|
||||||
|
- more libm optimizations
|
||||||
|
- Remove AMD libm routines due to new upstream libm optimizations
|
||||||
|
and interfaces.
|
||||||
|
- Fix build on x86.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 24 19:02:46 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- Update to a201fbcf9cc3:
|
||||||
|
- More libm optimizations
|
||||||
|
- Optimize wcslen, strnlen
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 20 08:58:47 UTC 2011 - aj@suse.de
|
Thu Oct 20 08:58:47 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
@ -68,6 +132,20 @@ Wed Oct 19 12:07:41 UTC 2011 - aj@suse.de
|
|||||||
- Provide glibc-static from glibc-devel-static to make packaging
|
- Provide glibc-static from glibc-devel-static to make packaging
|
||||||
easier. glibc-static is the Fedora name.
|
easier. glibc-static is the Fedora name.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 18 07:42:40 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- Update to glibc head 99ce7b04edf1:
|
||||||
|
- Optimize many libm functions
|
||||||
|
- Optimize access to isXYZ and toXYZ tables
|
||||||
|
- Optimized memcmp and wmemcmp for x86-64 and x86-32
|
||||||
|
- Add parameter annotation to modf
|
||||||
|
- Support optimized isXXX functions in C++ code
|
||||||
|
- Optimized memchr, memrchr, rawmemchr for x86-32
|
||||||
|
- Add nscd netgroupcache
|
||||||
|
- Disable libm-x86-64.diff.bz2 since it needs changes following the
|
||||||
|
libm optimzations.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 17 07:47:54 UTC 2011 - aj@suse.de
|
Mon Oct 17 07:47:54 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
@ -97,6 +175,18 @@ Fri Sep 30 17:14:04 CEST 2011 - dmueller@suse.de
|
|||||||
|
|
||||||
- avoid build failure on %%arm
|
- avoid build failure on %%arm
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 29 12:58:59 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- Update to 68577918437e:
|
||||||
|
* Obsoleted patches: glibc-gconvcache-s390.diff,
|
||||||
|
glibc-2.3.5-nscd-zeronegtimeout.diff,
|
||||||
|
glibc-x86-bits-sigcontext.patch,
|
||||||
|
glibc-2.15-getsysstats-speedup.patch, glibc-2.13-warnings.fix,
|
||||||
|
glibc-2.13-localedef.patch,
|
||||||
|
glibc-fix-rwlock-stack-imbalance.patch, glibc-2.15-vsyscall.patch,
|
||||||
|
glibc-2.15-avoid-vsyscall.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 29 07:40:25 UTC 2011 - adrian@suse.de
|
Thu Sep 29 07:40:25 UTC 2011 - adrian@suse.de
|
||||||
|
|
||||||
|
90
glibc.spec
90
glibc.spec
@ -77,15 +77,16 @@ Obsoletes: glibc-64bit
|
|||||||
%ifarch ppc
|
%ifarch ppc
|
||||||
Obsoletes: glibc-32bit
|
Obsoletes: glibc-32bit
|
||||||
%endif
|
%endif
|
||||||
Version: 2.14.1
|
Version: 2.15
|
||||||
Release: 0
|
Release: 11
|
||||||
%define git_id 4f2b767fef50
|
%define git_id c0da14cdda1f
|
||||||
%define glibc_ports_ver %version
|
%define glibc_ports_ver 2.15
|
||||||
|
%define ports_git_id 8a70b2dcabbf
|
||||||
Url: http://www.gnu.org/software/libc/libc.html
|
Url: http://www.gnu.org/software/libc/libc.html
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Source: glibc-%{version}-%{git_id}.tar.bz2
|
Source: glibc-%{version}-%{git_id}.tar.bz2
|
||||||
%define glibc_ports_dir glibc-ports-%{glibc_ports_ver}
|
%define glibc_ports_dir glibc-ports-%{glibc_ports_ver}
|
||||||
Source2: http://ftp.gnu.org/gnu/glibc/glibc-ports-%{glibc_ports_ver}.tar.bz2
|
Source2: glibc-ports-%{glibc_ports_ver}-%{ports_git_id}.tar.bz2
|
||||||
Source3: noversion.tar.bz2
|
Source3: noversion.tar.bz2
|
||||||
Source4: manpages.tar.bz2
|
Source4: manpages.tar.bz2
|
||||||
Source8: nsswitch.conf
|
Source8: nsswitch.conf
|
||||||
@ -130,23 +131,17 @@ Patch8: glibc-2.4.90-revert-only-euro.diff
|
|||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||||
Patch12: glibc-2.3.2.no_archive.diff
|
Patch12: glibc-2.3.2.no_archive.diff
|
||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||||
Patch13: libm-x86-64.diff.bz2
|
|
||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
|
||||||
Patch14: glibc-2.3.90-bindresvport.blacklist.diff
|
Patch14: glibc-2.3.90-bindresvport.blacklist.diff
|
||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||||
Patch16: glibc-2.4.90-no_NO.diff
|
Patch16: glibc-2.4.90-no_NO.diff
|
||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||||
Patch18: glibc-2.3.3-amd64-s_ceil.diff
|
|
||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
|
||||||
Patch20: glibc-2.4-china.diff
|
Patch20: glibc-2.4-china.diff
|
||||||
# PATCH-FIX-OPENSUSE Fix gb18030 code bnc#54080
|
# PATCH-FIX-OPENSUSE Fix gb18030 code bnc#54080
|
||||||
Patch21: glibc-2.3.4-gb18030-big5hkscs.diff.bz2
|
Patch21: glibc-2.3.4-gb18030-big5hkscs.diff.bz2
|
||||||
# PATCH-FIX-OPENSUSE Handle
|
# PATCH-FIX-OPENSUSE Handle timestamp, adjust nscd.conf
|
||||||
Patch22: glibc-2.4.90-nscd.diff
|
Patch22: glibc-2.4.90-nscd.diff
|
||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
# PATCH-FIX-OPENSUSE Fix path for nscd databases
|
||||||
Patch23: glibc-2.3.3-nscd-db-path.diff
|
Patch23: glibc-2.3.3-nscd-db-path.diff
|
||||||
# PATCH-FIX-UPSTREAM - handle zero negative timeout, committed for glibc 2.15
|
|
||||||
Patch24: glibc-2.3.5-nscd-zeronegtimeout.diff
|
|
||||||
# PATCH-FIX-OPENSUSE prefer -lang rpm packages
|
# PATCH-FIX-OPENSUSE prefer -lang rpm packages
|
||||||
Patch25: glibc-2.3.90-langpackdir.diff
|
Patch25: glibc-2.3.90-langpackdir.diff
|
||||||
# PATCH-FIX-OPENSUSE Fix hangs in UDP RPC calls bso#5379 bnc#257745 aj@suse.de
|
# PATCH-FIX-OPENSUSE Fix hangs in UDP RPC calls bso#5379 bnc#257745 aj@suse.de
|
||||||
@ -161,8 +156,6 @@ Patch33: glibc-compiled-binaries.diff
|
|||||||
Patch36: glibc-no-unwind-tables.diff
|
Patch36: glibc-no-unwind-tables.diff
|
||||||
# PATCH-FEATURE-SLE increase cpusetsize to 4096, needs to be kept for compatibility kukuk@suse.de
|
# PATCH-FEATURE-SLE increase cpusetsize to 4096, needs to be kept for compatibility kukuk@suse.de
|
||||||
Patch38: glibc-cpusetsize.diff
|
Patch38: glibc-cpusetsize.diff
|
||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
|
||||||
Patch40: libm-x86-64-exceptions.diff
|
|
||||||
# PATCH-FIX-OPENSUSE - Allow compilation with -altivec aj@suse.de
|
# PATCH-FIX-OPENSUSE - Allow compilation with -altivec aj@suse.de
|
||||||
Patch41: glibc-uio-cell.diff
|
Patch41: glibc-uio-cell.diff
|
||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||||
@ -175,22 +168,8 @@ Patch47: glibc-nscd-hconf.diff
|
|||||||
Patch48: glibc-malloc-arena-max.diff
|
Patch48: glibc-malloc-arena-max.diff
|
||||||
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||||
Patch49: glibc-fini-unwind.diff
|
Patch49: glibc-fini-unwind.diff
|
||||||
# PATCH-FIX-UPSTREAM install gconv-modules aj@suse.de
|
|
||||||
Patch50: glibc-gconvcache-s390.diff
|
|
||||||
# PATCH-FIX-OPENSUSE bnc#657627
|
# PATCH-FIX-OPENSUSE bnc#657627
|
||||||
Patch52: glibc-elf-localscope.diff
|
Patch52: glibc-elf-localscope.diff
|
||||||
# FIX-OPENSUSE compile some files with -fno-strict-aliasing
|
|
||||||
Patch58: glibc-strict-aliasing.diff
|
|
||||||
# PATCH-FIX-UPSTREAM fix x86 <bits/sigcontext.h> aj@suse.de
|
|
||||||
Patch60: glibc-x86-bits-sigcontext.patch
|
|
||||||
# PATCH-FEATURE-UPSTREAM Speedup getsysstats call aj@suse.de
|
|
||||||
Patch61: glibc-2.15-getsysstats-speedup.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Fix gcc 4.6 warnings aj@suse.de
|
|
||||||
Patch62: glibc-2.13-warnings.fix
|
|
||||||
# PATCH-FIX-OPENSUSE Fix localedef locale-archive creation bso#10855 aj@suse.de
|
|
||||||
Patch63: glibc-2.13-localedef.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Fix futex bug bso#12403 aj@suse.de
|
|
||||||
Patch64: glibc-fix-rwlock-stack-imbalance.patch
|
|
||||||
# PATCH-FIX-OPENSUSE disable rewriting ::1 to 127.0.0.1 for /etc/hosts bnc#684534, bnc#706719
|
# PATCH-FIX-OPENSUSE disable rewriting ::1 to 127.0.0.1 for /etc/hosts bnc#684534, bnc#706719
|
||||||
Patch65: glibc-fix-double-loopback.diff
|
Patch65: glibc-fix-double-loopback.diff
|
||||||
# PATCH-FEATURE-OPENSUSE Revert sunrpc removal aj@suse.de
|
# PATCH-FEATURE-OPENSUSE Revert sunrpc removal aj@suse.de
|
||||||
@ -199,34 +178,22 @@ Patch66: glibc2.14-revert-sunrpc-removal.patch
|
|||||||
Patch67: glibc-revert-fseek-on-fclose.diff
|
Patch67: glibc-revert-fseek-on-fclose.diff
|
||||||
# PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140 matz@suse.de
|
# PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140 matz@suse.de
|
||||||
Patch68: glibc-fix-lookup-crash.patch
|
Patch68: glibc-fix-lookup-crash.patch
|
||||||
# PATCH-FIX-UPSTREAM Add vdso support to support Linux 3.1, fix order of relocations aj@suse.de
|
|
||||||
Patch70: glibc-2.15-vsyscall.patch
|
|
||||||
# PATCH-FIX-OPENSUSE Do not trigger an abort when an i586 Intel CPU is running the i686 library, as valgrind does. bnc#681398 aj@suse.de
|
# PATCH-FIX-OPENSUSE Do not trigger an abort when an i586 Intel CPU is running the i686 library, as valgrind does. bnc#681398 aj@suse.de
|
||||||
Patch71: x86-cpuid-level2.patch
|
Patch71: x86-cpuid-level2.patch
|
||||||
# PATCH-FIX-UPSTREAM Avoid use of vsyscall aj@suse.de
|
|
||||||
Patch72: glibc-2.15-avoid-vsyscall.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Fix assertion error in res_query.c (bso#13013)
|
# PATCH-FIX-UPSTREAM Fix assertion error in res_query.c (bso#13013)
|
||||||
Patch73: glibc-resolv-assert.diff
|
Patch73: glibc-resolv-assert.diff
|
||||||
# PATCH-FIX-OPENSUSE Run ctors (bnc#717671) aj@suse.de
|
# PATCH-FIX-OPENSUSE Run ctors (bnc#717671) aj@suse.de
|
||||||
Patch74: glibc-2.14-fix-ctors.patch
|
Patch74: glibc-2.14-fix-ctors.patch
|
||||||
# PATCH-FIX-UPSTREAM Fix trace and ifuncs aj@suse.de
|
# PATCH-FIX-OPENSUSE Fix missing declarations
|
||||||
Patch75: glibc-2.15-ifunc-trace.patch
|
Patch75: glibc-2.15-nss_db-declarations.patch
|
||||||
# PATCH-FIX-UPSTREAM Fix trace and ifuncs (talk to aj@suse.de)
|
|
||||||
Patch76: glibc-ports-2.15-ifunc-trace.patch
|
|
||||||
# PATCH-FEATURE-OPENSUSE -- add sha support to crypt_blowfish lnussel@suse.de
|
# PATCH-FEATURE-OPENSUSE -- add sha support to crypt_blowfish lnussel@suse.de
|
||||||
Patch80: crypt_blowfish-1.2-sha.diff
|
Patch80: crypt_blowfish-1.2-sha.diff
|
||||||
# PATCH-FEATURE-OPENSUSE -- use separate symbol version for Owl extensions - lnussel@suse.de
|
# PATCH-FEATURE-OPENSUSE -- use separate symbol version for Owl extensions - lnussel@suse.de
|
||||||
Patch81: crypt_blowfish-1.2-versioning.diff
|
Patch81: crypt_blowfish-1.2-versioning.diff
|
||||||
# PATCH-FIX-OPENSUSE Avoid build failure on noexecstack marker on ARM dmueller@suse.de
|
# PATCH-FIX-OPENSUSE Avoid build failure on noexecstack marker on ARM dmueller@suse.de
|
||||||
Patch82: crypt_blowfish-1.2-hack_around_arm.diff
|
Patch82: crypt_blowfish-1.2-hack_around_arm.diff
|
||||||
# PATCH-FIX-UPSTREAM fix unwinding when using clone()
|
|
||||||
Patch83: glibc-arm-clone-unwind-fix.diff
|
|
||||||
# PATCH-FIX-OPENSUSE avoid false positive warning that triggers brp postcheck fail
|
# PATCH-FIX-OPENSUSE avoid false positive warning that triggers brp postcheck fail
|
||||||
Patch84: nscd-avoid-gcc-warning.diff
|
Patch84: nscd-avoid-gcc-warning.diff
|
||||||
# PATCH-FIX-OPENSUSE fix printf with > 32 args and printf specifiers bnc#733140, bso#13446
|
|
||||||
Patch85: glibc-2.14-32args-printf.patch
|
|
||||||
# PATCH-FIX-UPSTREAM fix tzfile heap overrun bnc#735850 - aj@suse.de
|
|
||||||
Patch86: tzfile-corruption-fix.patch
|
|
||||||
# PATCH-FIX-OPENSUSE fixed build-compare by omitting one more date - meissner@suse.de
|
# PATCH-FIX-OPENSUSE fixed build-compare by omitting one more date - meissner@suse.de
|
||||||
Patch87: glibc-nodate.patch
|
Patch87: glibc-nodate.patch
|
||||||
|
|
||||||
@ -387,17 +354,7 @@ versions of your software.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%ifarch %arm
|
|
||||||
# add glibc-ports for arm
|
|
||||||
%setup -n glibc-%{version} -q -a 2 -a 3 -a 4
|
%setup -n glibc-%{version} -q -a 2 -a 3 -a 4
|
||||||
pushd %glibc_ports_dir
|
|
||||||
%patch76 -p1
|
|
||||||
%patch83 -p1
|
|
||||||
popd
|
|
||||||
%else
|
|
||||||
# any other leave out ports
|
|
||||||
%setup -n glibc-%{version} -q -a 3 -a 4
|
|
||||||
%endif
|
|
||||||
# Owl crypt_blowfish
|
# Owl crypt_blowfish
|
||||||
tar -xzf %SOURCE50
|
tar -xzf %SOURCE50
|
||||||
pushd crypt_blowfish-%{crypt_bf_version}
|
pushd crypt_blowfish-%{crypt_bf_version}
|
||||||
@ -418,12 +375,8 @@ mv crypt_blowfish-%crypt_bf_version/*.[chS] crypt/
|
|||||||
%patch7
|
%patch7
|
||||||
%patch8
|
%patch8
|
||||||
%patch12
|
%patch12
|
||||||
%patch13 -E
|
|
||||||
# We have s_sincos.c in patch13, remove duplicate
|
|
||||||
rm sysdeps/x86_64/fpu/s_sincos.S
|
|
||||||
%patch14
|
%patch14
|
||||||
%patch16
|
%patch16
|
||||||
%patch18
|
|
||||||
%patch20
|
%patch20
|
||||||
# XXX Did not patch for 2.14:
|
# XXX Did not patch for 2.14:
|
||||||
#%patch21
|
#%patch21
|
||||||
@ -432,7 +385,6 @@ rm sysdeps/x86_64/fpu/s_sincos.S
|
|||||||
touch -r nscd/nscd_stat.c nscd/s-stamp
|
touch -r nscd/nscd_stat.c nscd/s-stamp
|
||||||
%patch22
|
%patch22
|
||||||
%patch23
|
%patch23
|
||||||
%patch24
|
|
||||||
touch -r nscd/s-stamp nscd/nscd_stat.c
|
touch -r nscd/s-stamp nscd/nscd_stat.c
|
||||||
rm nscd/s-stamp
|
rm nscd/s-stamp
|
||||||
%patch25
|
%patch25
|
||||||
@ -442,7 +394,6 @@ rm nscd/s-stamp
|
|||||||
%patch33
|
%patch33
|
||||||
%patch36
|
%patch36
|
||||||
%patch38
|
%patch38
|
||||||
%patch40
|
|
||||||
%patch41 -p1
|
%patch41 -p1
|
||||||
%patch45
|
%patch45
|
||||||
%patch46 -p1
|
%patch46 -p1
|
||||||
@ -451,27 +402,16 @@ rm nscd/s-stamp
|
|||||||
%patch48 -p1
|
%patch48 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch49
|
%patch49
|
||||||
%patch50
|
|
||||||
%patch52
|
%patch52
|
||||||
%patch58
|
|
||||||
%patch60 -p1
|
|
||||||
%patch61 -p1
|
|
||||||
%patch62 -p1
|
|
||||||
%patch63 -p1
|
|
||||||
%patch64 -p1
|
|
||||||
%patch65 -p1
|
%patch65 -p1
|
||||||
%patch66 -p1
|
%patch66 -p1
|
||||||
%patch67 -p1
|
%patch67 -p1
|
||||||
%patch68 -p1
|
%patch68 -p1
|
||||||
%patch70 -p1
|
|
||||||
%patch71 -p1
|
%patch71 -p1
|
||||||
%patch72 -p1
|
|
||||||
%patch73 -p1
|
%patch73 -p1
|
||||||
%patch74 -p1
|
%patch74 -p1
|
||||||
%patch75 -p1
|
%patch75 -p1
|
||||||
%patch84
|
%patch84
|
||||||
%patch85
|
|
||||||
%patch86 -p1
|
|
||||||
%patch87 -p0
|
%patch87 -p0
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -579,7 +519,7 @@ configure_and_build_glibc() {
|
|||||||
cd "cc-$dirname"
|
cd "cc-$dirname"
|
||||||
%ifarch %arm
|
%ifarch %arm
|
||||||
# remove asynchronous-unwind-tables during configure as it causes
|
# remove asynchronous-unwind-tables during configure as it causes
|
||||||
# some checks to fail spuriously on %arm
|
# some checks to fail spuriously on arm
|
||||||
conf_cflags="${cflags/-fasynchronous-unwind-tables/}"
|
conf_cflags="${cflags/-fasynchronous-unwind-tables/}"
|
||||||
conf_cflags="${conf_cflags/-funwind-tables/}"
|
conf_cflags="${conf_cflags/-funwind-tables/}"
|
||||||
%else
|
%else
|
||||||
@ -988,6 +928,8 @@ exit 0
|
|||||||
/%{_lib}/libnsl.so.1
|
/%{_lib}/libnsl.so.1
|
||||||
/%{_lib}/libnss_compat-%{version}.so
|
/%{_lib}/libnss_compat-%{version}.so
|
||||||
/%{_lib}/libnss_compat.so.2
|
/%{_lib}/libnss_compat.so.2
|
||||||
|
/%{_lib}/libnss_db-%{version}.so
|
||||||
|
/%{_lib}/libnss_db.so.2
|
||||||
/%{_lib}/libnss_dns-%{version}.so
|
/%{_lib}/libnss_dns-%{version}.so
|
||||||
/%{_lib}/libnss_dns.so.2
|
/%{_lib}/libnss_dns.so.2
|
||||||
/%{_lib}/libnss_files-%{version}.so
|
/%{_lib}/libnss_files-%{version}.so
|
||||||
@ -1047,11 +989,14 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
%{_bindir}/locale
|
%{_bindir}/locale
|
||||||
%{_bindir}/localedef
|
%{_bindir}/localedef
|
||||||
|
%{_bindir}/makedb
|
||||||
%verify(not mode caps) %attr(4755,root,root) %{_libdir}/pt_chown
|
%verify(not mode caps) %attr(4755,root,root) %{_libdir}/pt_chown
|
||||||
%dir %attr(0755,root,root) %{_libdir}/getconf
|
%dir %attr(0755,root,root) %{_libdir}/getconf
|
||||||
%{_libdir}/getconf/*
|
%{_libdir}/getconf/*
|
||||||
%{_sbindir}/glibc_post_upgrade
|
%{_sbindir}/glibc_post_upgrade
|
||||||
%{_sbindir}/iconvconfig
|
%{_sbindir}/iconvconfig
|
||||||
|
%dir /var/db
|
||||||
|
/var/db/Makefile
|
||||||
|
|
||||||
%ifarch %ix86
|
%ifarch %ix86
|
||||||
|
|
||||||
@ -1073,7 +1018,7 @@ exit 0
|
|||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc COPYING COPYING.LIB FAQ INSTALL NEWS NOTES README BUGS CONFORMANCE
|
%doc COPYING COPYING.LIB FAQ NEWS NOTES README BUGS CONFORMANCE
|
||||||
%doc %{_mandir}/man1/catchsegv.1.gz
|
%doc %{_mandir}/man1/catchsegv.1.gz
|
||||||
%doc %{_mandir}/man1/rpcgen.1.gz
|
%doc %{_mandir}/man1/rpcgen.1.gz
|
||||||
%doc %{_mandir}/man1/sprof.1.gz
|
%doc %{_mandir}/man1/sprof.1.gz
|
||||||
@ -1170,5 +1115,6 @@ exit 0
|
|||||||
%{_bindir}/pcprofiledump
|
%{_bindir}/pcprofiledump
|
||||||
%{_bindir}/sotruss
|
%{_bindir}/sotruss
|
||||||
%{_bindir}/xtrace
|
%{_bindir}/xtrace
|
||||||
|
%{_bindir}/pldd
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,569 +0,0 @@
|
|||||||
Index: sysdeps/x86_64/fpu/libm_inlines_amd.h
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/libm_inlines_amd.h.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/libm_inlines_amd.h
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -254,6 +254,33 @@ static inline void clear_fpsw_flags(int
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(USE_RAISE_FPSW_FLAGS)
|
|
||||||
+static inline void raise_fp_exc(int flags)
|
|
||||||
+{
|
|
||||||
+ if((flags & AMD_F_UNDERFLOW) == AMD_F_UNDERFLOW)
|
|
||||||
+ {
|
|
||||||
+ double a = 0x1.0p-1022;
|
|
||||||
+ __asm __volatile ("mulsd %1, %0" : "+x" (a));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if((flags & AMD_F_OVERFLOW) == AMD_F_OVERFLOW)
|
|
||||||
+ {
|
|
||||||
+ double a = 0x1.fffffffffffffp1023;
|
|
||||||
+ __asm __volatile ("mulsd %1, %0" : "+x" (a));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if((flags & AMD_F_DIVBYZERO) == AMD_F_DIVBYZERO)
|
|
||||||
+ {
|
|
||||||
+ double a = 1.0, b = 0.0;
|
|
||||||
+ __asm __volatile ("divsd %1, %0" : "+x" (a) : "x" (b));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if((flags & AMD_F_INVALID) == AMD_F_INVALID)
|
|
||||||
+ {
|
|
||||||
+ double a = 0.0;
|
|
||||||
+ __asm __volatile ("divsd %1, %0" : "+x" (a));
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Raises floating-point status flags. The argument should be
|
|
||||||
the bitwise or of the flags to be raised, from the
|
|
||||||
list above, e.g.
|
|
||||||
@@ -269,11 +296,7 @@ static inline void raise_fpsw_flags(int
|
|
||||||
/* Put the floating-point environment back */
|
|
||||||
__asm fldenv fenv;
|
|
||||||
#elif defined(linux)
|
|
||||||
- unsigned int cw;
|
|
||||||
- /* Get the current floating-point control/status word */
|
|
||||||
- asm volatile ("STMXCSR %0" : "=m" (cw));
|
|
||||||
- cw |= flags;
|
|
||||||
- asm volatile ("LDMXCSR %0" : : "m" (cw));
|
|
||||||
+ raise_fp_exc(flags);
|
|
||||||
#else
|
|
||||||
#error Unknown machine
|
|
||||||
#endif
|
|
||||||
Index: sysdeps/x86_64/fpu/s_atan2.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/s_atan2.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/s_atan2.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -595,6 +595,14 @@ double __atan2(double y, double x)
|
|
||||||
if (yneg) return val_with_flags(-piby2,AMD_F_INEXACT);
|
|
||||||
else val_with_flags(piby2,AMD_F_INEXACT);
|
|
||||||
}
|
|
||||||
+ else if((!xneg) && xinf && (!yinf) && (!yzero))
|
|
||||||
+ {
|
|
||||||
+ if(yneg)
|
|
||||||
+ return -0.0;
|
|
||||||
+ else
|
|
||||||
+ return 0.0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
|
|
||||||
/* Scale up both x and y if they are both below 1/4.
|
|
||||||
This avoids any possible later denormalised arithmetic. */
|
|
||||||
Index: sysdeps/x86_64/fpu/s_atan2f.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/s_atan2f.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/s_atan2f.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -349,6 +349,14 @@ float __atan2f(float fy, float fx)
|
|
||||||
if (yneg) return val_with_flags(-piby2,AMD_F_INEXACT);
|
|
||||||
else val_with_flags(piby2,AMD_F_INEXACT);
|
|
||||||
}
|
|
||||||
+ else if((!xneg) && xinf && (!yinf) && (!yzero))
|
|
||||||
+ {
|
|
||||||
+ if(yneg)
|
|
||||||
+ return -0.0;
|
|
||||||
+ else
|
|
||||||
+ return 0.0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
|
|
||||||
if (diffexp > 26)
|
|
||||||
{ /* abs(y)/abs(x) > 2^26 => arctan(x/y)
|
|
||||||
Index: sysdeps/x86_64/fpu/s_atan.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/s_atan.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/s_atan.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ double __atan (double x)
|
|
||||||
if (aux == 0) /* if x=0, then result is precise */
|
|
||||||
return x;
|
|
||||||
else
|
|
||||||
- return val_with_flags(x, AMD_F_INEXACT);
|
|
||||||
+ return val_with_flags(x, AMD_F_INEXACT | AMD_F_UNDERFLOW);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Argument reduction to range [-7/16,7/16] */
|
|
||||||
Index: sysdeps/x86_64/fpu/s_atanf.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/s_atanf.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/s_atanf.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ float __atanf (float fx)
|
|
||||||
if (aux == 0) /* if x=0, then result is precise */
|
|
||||||
return fx;
|
|
||||||
else
|
|
||||||
- return valf_with_flags(fx, AMD_F_INEXACT);
|
|
||||||
+ return valf_with_flags(fx, AMD_F_INEXACT | AMD_F_UNDERFLOW);
|
|
||||||
}
|
|
||||||
|
|
||||||
v = x;
|
|
||||||
Index: sysdeps/x86_64/fpu/s_sincos.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/s_sincos.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/s_sincos.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
-** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
- AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
+** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
+ AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ void __sincos(double x, double *s, doubl
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- *s = x;
|
|
||||||
+ *s = val_with_flags(x, AMD_F_INEXACT);
|
|
||||||
*c = val_with_flags(1.0, AMD_F_INEXACT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Index: sysdeps/x86_64/fpu/s_sincosf.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/s_sincosf.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/s_sincosf.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
-** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
- AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
+ AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
+ LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
Index: sysdeps/x86_64/fpu/s_tanf.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/s_tanf.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/s_tanf.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
-** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
- AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
+ AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
+ LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@
|
|
||||||
#undef USE_NAN_WITH_FLAGS
|
|
||||||
#undef USE_REMAINDER_PIBY2F_INLINE
|
|
||||||
|
|
||||||
-/* tan(x) approximation valid on the interval [-pi/4,pi/4].
|
|
||||||
+/* tan(x) approximation valid on the interval [-pi/4,pi/4].
|
|
||||||
If recip is true return -1/tan(x) instead. */
|
|
||||||
static inline double tanf_piby4(double x, int recip)
|
|
||||||
{
|
|
||||||
Index: sysdeps/x86_64/fpu/w_asin.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/w_asin.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/w_asin.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -76,7 +76,8 @@ double __asin(double x)
|
|
||||||
|
|
||||||
if (xexp < -28)
|
|
||||||
{ /* y small enough that arcsin(x) = x */
|
|
||||||
- return val_with_flags(x, AMD_F_INEXACT);
|
|
||||||
+ if(aux == 0) return x;
|
|
||||||
+ return val_with_flags(x, AMD_F_INEXACT | AMD_F_UNDERFLOW);
|
|
||||||
}
|
|
||||||
else if (xnan) return x + x;
|
|
||||||
else if (xexp >= 0)
|
|
||||||
Index: sysdeps/x86_64/fpu/w_asinf.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/w_asinf.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/w_asinf.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -75,8 +75,11 @@ float __asinf(float x)
|
|
||||||
/* Special cases */
|
|
||||||
|
|
||||||
if (xexp < -14)
|
|
||||||
+ {
|
|
||||||
/* y small enough that arcsin(x) = x */
|
|
||||||
- return valf_with_flags(x, AMD_F_INEXACT);
|
|
||||||
+ if(aux == 0 ) return x;
|
|
||||||
+ return valf_with_flags(x, AMD_F_INEXACT | AMD_F_UNDERFLOW);
|
|
||||||
+ }
|
|
||||||
else if (xnan) return x + x;
|
|
||||||
else if (xexp >= 0)
|
|
||||||
{
|
|
||||||
Index: sysdeps/x86_64/fpu/w_hypotf.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/w_hypotf.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/w_hypotf.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -79,6 +79,20 @@ float __hypotf(float x, float y)
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* Set x = abs(x) and y = abs(y) */
|
|
||||||
+ if (ux == 0)
|
|
||||||
+ {
|
|
||||||
+ /* x is zero */
|
|
||||||
+ PUT_BITS_DP64(avy, dy);
|
|
||||||
+ return dy;
|
|
||||||
+ }
|
|
||||||
+ if (uy == 0)
|
|
||||||
+ {
|
|
||||||
+ /* y is zero */
|
|
||||||
+ PUT_BITS_DP64(avx, dx);
|
|
||||||
+ return dx;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
dr = (dx*dx + dy*dy);
|
|
||||||
|
|
||||||
#if USE_SOFTWARE_SQRT
|
|
||||||
Index: sysdeps/x86_64/fpu/w_pow.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/w_pow.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/w_pow.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -364,8 +364,20 @@ double __pow(double x, double y)
|
|
||||||
{
|
|
||||||
/* y is -ve */
|
|
||||||
if (ax == 0)
|
|
||||||
- /* abs(x) = 0.0. Return +infinity. */
|
|
||||||
- return retval_errno_edom(argx, argy, 1);
|
|
||||||
+ {
|
|
||||||
+ if(yinf)
|
|
||||||
+ {
|
|
||||||
+ /* Return +infinity with no flags */
|
|
||||||
+ double sz;
|
|
||||||
+ PUT_BITS_DP64(PINFBITPATT_DP64, sz);
|
|
||||||
+ return sz;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ /* abs(x) = 0.0. Return +infinity. */
|
|
||||||
+ return retval_errno_edom(argx, argy, 1);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
else if (ax < 0x3ff0000000000000)
|
|
||||||
{
|
|
||||||
/* abs(x) < 1.0; return +infinity. */
|
|
||||||
Index: sysdeps/x86_64/fpu/w_powf.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/w_powf.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/w_powf.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -175,8 +175,20 @@ float __powf(float x, float y)
|
|
||||||
{
|
|
||||||
/* y is -ve */
|
|
||||||
if (ax == 0)
|
|
||||||
- /* abs(x) = 0.0. Return +infinity. */
|
|
||||||
- return retval_errno_edom(x, y, 1);
|
|
||||||
+ {
|
|
||||||
+ if(yinf)
|
|
||||||
+ {
|
|
||||||
+ /* Return +infinity with no flags */
|
|
||||||
+ float sz;
|
|
||||||
+ PUT_BITS_SP32(PINFBITPATT_SP32, sz);
|
|
||||||
+ return sz;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ /* abs(x) = 0.0. Return +infinity. */
|
|
||||||
+ return retval_errno_edom(x, y, 1);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
else if (ax < 0x3f800000)
|
|
||||||
{
|
|
||||||
/* abs(x) < 1.0; return +infinity. */
|
|
||||||
Index: sysdeps/x86_64/fpu/w_remainder.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/w_remainder.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/w_remainder.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -69,11 +69,31 @@ double __remainder(double x, double y)
|
|
||||||
{
|
|
||||||
/* x is NaN or infinity */
|
|
||||||
if (ux & MANTBITS_DP64)
|
|
||||||
- /* x is NaN */
|
|
||||||
- return dx + dx; /* Raise invalid if it is a signalling NaN */
|
|
||||||
+ {
|
|
||||||
+ if( (yexp > BIASEDEMAX_DP64) && (uy & MANTBITS_DP64) )
|
|
||||||
+ {
|
|
||||||
+ /* y is also NaN */
|
|
||||||
+ return dx + dy;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ /* x is NaN */
|
|
||||||
+ return dx + dx; /* Raise invalid if it is a signalling NaN */
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
- /* x is infinity; result is NaN */
|
|
||||||
- return nan_with_flags(AMD_F_INVALID);
|
|
||||||
+ {
|
|
||||||
+ if((yexp > BIASEDEMAX_DP64) && (uy & MANTBITS_DP64))
|
|
||||||
+ {
|
|
||||||
+ /* y is NaN */
|
|
||||||
+ return dy+dy;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ /* x is infinity; result is NaN */
|
|
||||||
+ return nan_with_flags(AMD_F_INVALID);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
else if (yexp > BIASEDEMAX_DP64)
|
|
||||||
{
|
|
||||||
Index: sysdeps/x86_64/fpu/w_remainderf.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/w_remainderf.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/w_remainderf.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -50,11 +50,31 @@ float __remainderf(float x, float y)
|
|
||||||
{
|
|
||||||
/* x is NaN or infinity */
|
|
||||||
if (ux & MANTBITS_DP64)
|
|
||||||
- /* x is NaN */
|
|
||||||
- return dx + dx; /* Raise invalid if it is a signalling NaN */
|
|
||||||
+ {
|
|
||||||
+ if((yexp > BIASEDEMAX_DP64) && (uy & MANTBITS_DP64))
|
|
||||||
+ {
|
|
||||||
+ /* y is also NaN */
|
|
||||||
+ return dx + dy;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ /* x is NaN */
|
|
||||||
+ return dx + dx; /* Raise invalid if it is a signalling NaN */
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
- /* x is infinity; result is NaN */
|
|
||||||
- return nan_with_flags(AMD_F_INVALID);
|
|
||||||
+ {
|
|
||||||
+ if((yexp > BIASEDEMAX_DP64) && (uy & MANTBITS_DP64))
|
|
||||||
+ {
|
|
||||||
+ /* y is NaN */
|
|
||||||
+ return dy+dy;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ /* x is infinity; result is NaN */
|
|
||||||
+ return nan_with_flags(AMD_F_INVALID);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
else if (yexp > BIASEDEMAX_DP64)
|
|
||||||
{
|
|
||||||
Index: sysdeps/x86_64/fpu/w_sinh.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/w_sinh.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/w_sinh.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ double __sinh(double x)
|
|
||||||
/* with no inexact */
|
|
||||||
return x;
|
|
||||||
else
|
|
||||||
- return val_with_flags(x, AMD_F_INEXACT);
|
|
||||||
+ return val_with_flags(x, AMD_F_INEXACT | AMD_F_UNDERFLOW);
|
|
||||||
}
|
|
||||||
else if (aux >= 0x7ff0000000000000) /* |x| is NaN or Inf */
|
|
||||||
return x + x;
|
|
||||||
Index: sysdeps/x86_64/fpu/w_sinhf.c
|
|
||||||
===================================================================
|
|
||||||
--- sysdeps/x86_64/fpu/w_sinhf.c.orig
|
|
||||||
+++ sysdeps/x86_64/fpu/w_sinhf.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
/*
|
|
||||||
-(C) 2002 Advanced Micro Devices, Inc.
|
|
||||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
|
||||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
|
||||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
|
||||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
|
||||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
|
||||||
THIS LIBRARY**
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -13,11 +13,13 @@
|
|
||||||
#define USE_SCALEDOUBLE_1
|
|
||||||
#define USE_SCALEDOUBLE_2
|
|
||||||
#define USE_INFINITY_WITH_FLAGS
|
|
||||||
+#define USE_VAL_WITH_FLAGS
|
|
||||||
#include "libm_inlines_amd.h"
|
|
||||||
#undef USE_SPLITEXP
|
|
||||||
#undef USE_SCALEDOUBLE_1
|
|
||||||
#undef USE_SCALEDOUBLE_2
|
|
||||||
#undef USE_INFINITY_WITH_FLAGS
|
|
||||||
+#undef USE_VAL_WITH_FLAGS
|
|
||||||
|
|
||||||
/* Deal with errno for out-of-range result */
|
|
||||||
#include "libm_errno_amd.h"
|
|
||||||
@@ -166,7 +168,8 @@ float __sinhf(float fx)
|
|
||||||
if (aux < 0x3f10000000000000) /* |x| small enough that sinh(x) = x */
|
|
||||||
{
|
|
||||||
if (aux == 0) return x; /* with no inexact */
|
|
||||||
- if (LAMBDA_DP64 + x > 1.0) return x; /* with inexact */
|
|
||||||
+ else
|
|
||||||
+ return val_with_flags(x, AMD_F_INEXACT | AMD_F_UNDERFLOW); /* with inexact */
|
|
||||||
}
|
|
||||||
else if (aux >= 0x7ff0000000000000) /* |x| is NaN or Inf */
|
|
||||||
return x + x;
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:65537d54c9f89d1d54123b450e39975177decba4131fb99f3392981b10887bcb
|
|
||||||
size 75446
|
|
@ -1,100 +0,0 @@
|
|||||||
2011-12-17 Ulrich Drepper <drepper@gmail.com>
|
|
||||||
|
|
||||||
[BZ #13506]
|
|
||||||
* time/tzfile.c (__tzfile_read): Check values from file header.
|
|
||||||
|
|
||||||
diff --git a/time/tzfile.c b/time/tzfile.c
|
|
||||||
index 144e20b..402389c 100644
|
|
||||||
--- a/time/tzfile.c
|
|
||||||
+++ b/time/tzfile.c
|
|
||||||
@@ -234,23 +234,58 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
|
|
||||||
goto read_again;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (__builtin_expect (num_transitions
|
|
||||||
+ > ((SIZE_MAX - (__alignof__ (struct ttinfo) - 1))
|
|
||||||
+ / (sizeof (time_t) + 1)), 0))
|
|
||||||
+ goto lose;
|
|
||||||
total_size = num_transitions * (sizeof (time_t) + 1);
|
|
||||||
total_size = ((total_size + __alignof__ (struct ttinfo) - 1)
|
|
||||||
& ~(__alignof__ (struct ttinfo) - 1));
|
|
||||||
types_idx = total_size;
|
|
||||||
- total_size += num_types * sizeof (struct ttinfo) + chars;
|
|
||||||
+ if (__builtin_expect (num_types
|
|
||||||
+ > (SIZE_MAX - total_size) / sizeof (struct ttinfo), 0))
|
|
||||||
+ goto lose;
|
|
||||||
+ total_size += num_types * sizeof (struct ttinfo);
|
|
||||||
+ if (__builtin_expect (chars > SIZE_MAX - total_size, 0))
|
|
||||||
+ goto lose;
|
|
||||||
+ total_size += chars;
|
|
||||||
+ if (__builtin_expect (__alignof__ (struct leap) - 1
|
|
||||||
+ > SIZE_MAX - total_size, 0))
|
|
||||||
+ goto lose;
|
|
||||||
total_size = ((total_size + __alignof__ (struct leap) - 1)
|
|
||||||
& ~(__alignof__ (struct leap) - 1));
|
|
||||||
leaps_idx = total_size;
|
|
||||||
+ if (__builtin_expect (num_leaps
|
|
||||||
+ > (SIZE_MAX - total_size) / sizeof (struct leap), 0))
|
|
||||||
+ goto lose;
|
|
||||||
total_size += num_leaps * sizeof (struct leap);
|
|
||||||
- tzspec_len = (sizeof (time_t) == 8 && trans_width == 8
|
|
||||||
- ? st.st_size - (ftello (f)
|
|
||||||
- + num_transitions * (8 + 1)
|
|
||||||
- + num_types * 6
|
|
||||||
- + chars
|
|
||||||
- + num_leaps * 12
|
|
||||||
- + num_isstd
|
|
||||||
- + num_isgmt) - 1 : 0);
|
|
||||||
+ tzspec_len = 0;
|
|
||||||
+ if (sizeof (time_t) == 8 && trans_width == 8)
|
|
||||||
+ {
|
|
||||||
+ off_t rem = st.st_size - ftello (f);
|
|
||||||
+ if (__builtin_expect (rem < 0
|
|
||||||
+ || (size_t) rem < (num_transitions * (8 + 1)
|
|
||||||
+ + num_types * 6
|
|
||||||
+ + chars), 0))
|
|
||||||
+ goto lose;
|
|
||||||
+ tzspec_len = (size_t) rem - (num_transitions * (8 + 1)
|
|
||||||
+ + num_types * 6
|
|
||||||
+ + chars);
|
|
||||||
+ if (__builtin_expect (num_leaps > SIZE_MAX / 12
|
|
||||||
+ || tzspec_len < num_leaps * 12, 0))
|
|
||||||
+ goto lose;
|
|
||||||
+ tzspec_len -= num_leaps * 12;
|
|
||||||
+ if (__builtin_expect (tzspec_len < num_isstd, 0))
|
|
||||||
+ goto lose;
|
|
||||||
+ tzspec_len -= num_isstd;
|
|
||||||
+ if (__builtin_expect (tzspec == 0 || tzspec_len - 1 < num_isgmt, 0))
|
|
||||||
+ goto lose;
|
|
||||||
+ tzspec_len -= num_isgmt + 1;
|
|
||||||
+ if (__builtin_expect (SIZE_MAX - total_size < tzspec_len, 0))
|
|
||||||
+ goto lose;
|
|
||||||
+ }
|
|
||||||
+ if (__builtin_expect (SIZE_MAX - total_size - tzspec_len < extra, 0))
|
|
||||||
+ goto lose;
|
|
||||||
|
|
||||||
/* Allocate enough memory including the extra block requested by the
|
|
||||||
caller. */
|
|
||||||
|
|
||||||
|
|
||||||
And fix the previous patch ...
|
|
||||||
|
|
||||||
--- a/time/tzfile.c.orig 2011-12-19 10:58:26.000000000 +0100
|
|
||||||
+++ b/time/tzfile.c 2011-12-19 10:59:35.000000000 +0100
|
|
||||||
@@ -19,6 +19,7 @@
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <limits.h>
|
|
||||||
+#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdio_ext.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
@@ -278,7 +279,7 @@
|
|
||||||
if (__builtin_expect (tzspec_len < num_isstd, 0))
|
|
||||||
goto lose;
|
|
||||||
tzspec_len -= num_isstd;
|
|
||||||
- if (__builtin_expect (tzspec == 0 || tzspec_len - 1 < num_isgmt, 0))
|
|
||||||
+ if (__builtin_expect (tzspec_len == 0 || tzspec_len - 1 < num_isgmt, 0))
|
|
||||||
goto lose;
|
|
||||||
tzspec_len -= num_isgmt + 1;
|
|
||||||
if (__builtin_expect (SIZE_MAX - total_size < tzspec_len, 0))
|
|
Loading…
Reference in New Issue
Block a user