Accepting request 132085 from Base:System
Order changes; update to glibc 2.16 (forwarded request 132084 from a_jaeger) OBS-URL: https://build.opensuse.org/request/show/132085 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=119
This commit is contained in:
commit
5628e22c12
@ -1,11 +0,0 @@
|
||||
diff --git a/sysdeps/arm/shlib-versions b/sysdeps/arm/shlib-versions
|
||||
index 491dd0a..5464959 100644
|
||||
--- a/glibc-ports-2.15/sysdeps/arm/shlib-versions
|
||||
+++ b/glibc-ports-2.15/sysdeps/arm/shlib-versions
|
||||
@@ -1,4 +1,4 @@
|
||||
arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4
|
||||
|
||||
-arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3
|
||||
+arm.*-.*-linux-gnueabi.* ld=ld-linux-armhf.so.3
|
||||
arm.*-.*-linux.* ld=ld-linux.so.2
|
||||
|
304
confstr.patch
304
confstr.patch
@ -1,304 +0,0 @@
|
||||
diff --git a/posix/confstr.c b/posix/confstr.c
|
||||
index 3c9566d..cad6561 100644
|
||||
--- a/posix/confstr.c
|
||||
+++ b/posix/confstr.c
|
||||
@@ -1,5 +1,4 @@
|
||||
-/* Copyright (C) 1991,1996,1997,2000-2004,2009,2010 Free
|
||||
- Software Foundation, Inc.
|
||||
+/* Copyright (C) 1991-2012 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
|
||||
@@ -35,6 +34,10 @@ confstr (name, buf, len)
|
||||
const char *string = "";
|
||||
size_t string_len = 1;
|
||||
|
||||
+ /* Note that this buffer must be large enough for the longest strings
|
||||
+ used below. */
|
||||
+ char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
|
||||
+
|
||||
switch (name)
|
||||
{
|
||||
case _CS_PATH:
|
||||
@@ -53,59 +56,55 @@ confstr (name, buf, len)
|
||||
wint_t types are no greater than the width of type long.
|
||||
|
||||
Currently this means all environment which the system allows. */
|
||||
- {
|
||||
- char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
|
||||
-
|
||||
- string_len = 0;
|
||||
+ string_len = 0;
|
||||
#ifndef _POSIX_V7_ILP32_OFF32
|
||||
- if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
|
||||
+ if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V7_ILP32_OFF32 || _POSIX_V7_ILP32_OFF32 > 0
|
||||
- {
|
||||
- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
|
||||
- sizeof "POSIX_V7_ILP32_OFF32" - 1);
|
||||
- string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
|
||||
+ sizeof "POSIX_V7_ILP32_OFF32" - 1);
|
||||
+ string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V7_ILP32_OFFBIG
|
||||
- if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V7_ILP32_OFFBIG || _POSIX_V7_ILP32_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
|
||||
- sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
|
||||
- string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
|
||||
+ sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
|
||||
+ string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V7_LP64_OFF64
|
||||
- if (__sysconf (_SC_V7_LP64_OFF64) > 0)
|
||||
+ if (__sysconf (_SC_V7_LP64_OFF64) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V7_LP64_OFF64 || _POSIX_V7_LP64_OFF64 > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
|
||||
- sizeof "POSIX_V7_LP64_OFF64" - 1);
|
||||
- string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
|
||||
+ sizeof "POSIX_V7_LP64_OFF64" - 1);
|
||||
+ string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V7_LPBIG_OFFBIG
|
||||
- if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V7_LPBIG_OFFBIG || _POSIX_V7_LPBIG_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
|
||||
- sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
|
||||
- string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
|
||||
- }
|
||||
-#endif
|
||||
- restenvs[string_len++] = '\0';
|
||||
- string = restenvs;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
|
||||
+ sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
|
||||
+ string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
|
||||
+ }
|
||||
+#endif
|
||||
+ restenvs[string_len++] = '\0';
|
||||
+ string = restenvs;
|
||||
break;
|
||||
|
||||
case _CS_V6_WIDTH_RESTRICTED_ENVS:
|
||||
@@ -116,59 +115,55 @@ confstr (name, buf, len)
|
||||
wint_t types are no greater than the width of type long.
|
||||
|
||||
Currently this means all environment which the system allows. */
|
||||
- {
|
||||
- char restenvs[4 * sizeof "POSIX_V6_LPBIG_OFFBIG"];
|
||||
-
|
||||
- string_len = 0;
|
||||
+ string_len = 0;
|
||||
#ifndef _POSIX_V6_ILP32_OFF32
|
||||
- if (__sysconf (_SC_V6_ILP32_OFF32) > 0)
|
||||
+ if (__sysconf (_SC_V6_ILP32_OFF32) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V6_ILP32_OFF32 || _POSIX_V6_ILP32_OFF32 > 0
|
||||
- {
|
||||
- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32",
|
||||
- sizeof "POSIX_V6_ILP32_OFF32" - 1);
|
||||
- string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32",
|
||||
+ sizeof "POSIX_V6_ILP32_OFF32" - 1);
|
||||
+ string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V6_ILP32_OFFBIG
|
||||
- if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V6_ILP32_OFFBIG || _POSIX_V6_ILP32_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG",
|
||||
- sizeof "POSIX_V6_ILP32_OFFBIG" - 1);
|
||||
- string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG",
|
||||
+ sizeof "POSIX_V6_ILP32_OFFBIG" - 1);
|
||||
+ string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V6_LP64_OFF64
|
||||
- if (__sysconf (_SC_V6_LP64_OFF64) > 0)
|
||||
+ if (__sysconf (_SC_V6_LP64_OFF64) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V6_LP64_OFF64 || _POSIX_V6_LP64_OFF64 > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64",
|
||||
- sizeof "POSIX_V6_LP64_OFF64" - 1);
|
||||
- string_len += sizeof "POSIX_V6_LP64_OFF64" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64",
|
||||
+ sizeof "POSIX_V6_LP64_OFF64" - 1);
|
||||
+ string_len += sizeof "POSIX_V6_LP64_OFF64" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V6_LPBIG_OFFBIG
|
||||
- if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V6_LPBIG_OFFBIG || _POSIX_V6_LPBIG_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG",
|
||||
- sizeof "POSIX_V6_LPBIG_OFFBIG" - 1);
|
||||
- string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1;
|
||||
- }
|
||||
-#endif
|
||||
- restenvs[string_len++] = '\0';
|
||||
- string = restenvs;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG",
|
||||
+ sizeof "POSIX_V6_LPBIG_OFFBIG" - 1);
|
||||
+ string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1;
|
||||
+ }
|
||||
+#endif
|
||||
+ restenvs[string_len++] = '\0';
|
||||
+ string = restenvs;
|
||||
break;
|
||||
|
||||
case _CS_V5_WIDTH_RESTRICTED_ENVS:
|
||||
@@ -179,59 +174,55 @@ confstr (name, buf, len)
|
||||
wint_t types are no greater than the width of type long.
|
||||
|
||||
Currently this means all environment which the system allows. */
|
||||
- {
|
||||
- char restenvs[4 * sizeof "XBS5_LPBIG_OFFBIG"];
|
||||
-
|
||||
- string_len = 0;
|
||||
+ string_len = 0;
|
||||
#ifndef _XBS5_ILP32_OFF32
|
||||
- if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
|
||||
+ if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
|
||||
#endif
|
||||
#if !defined _XBS5_ILP32_OFF32 || _XBS5_ILP32_OFF32 > 0
|
||||
- {
|
||||
- memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
|
||||
- sizeof "XBS5_ILP32_OFF32" - 1);
|
||||
- string_len += sizeof "XBS5_ILP32_OFF32" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
|
||||
+ sizeof "XBS5_ILP32_OFF32" - 1);
|
||||
+ string_len += sizeof "XBS5_ILP32_OFF32" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _XBS5_ILP32_OFFBIG
|
||||
- if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _XBS5_ILP32_OFFBIG || _XBS5_ILP32_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
|
||||
- sizeof "XBS5_ILP32_OFFBIG" - 1);
|
||||
- string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
|
||||
+ sizeof "XBS5_ILP32_OFFBIG" - 1);
|
||||
+ string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _XBS5_LP64_OFF64
|
||||
- if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
|
||||
+ if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
|
||||
#endif
|
||||
#if !defined _XBS5_LP64_OFF64 || _XBS5_LP64_OFF64 > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
|
||||
- sizeof "XBS5_LP64_OFF64" - 1);
|
||||
- string_len += sizeof "XBS5_LP64_OFF64" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
|
||||
+ sizeof "XBS5_LP64_OFF64" - 1);
|
||||
+ string_len += sizeof "XBS5_LP64_OFF64" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _XBS5_LPBIG_OFFBIG
|
||||
- if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _XBS5_LPBIG_OFFBIG || _XBS5_LPBIG_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
|
||||
- sizeof "XBS5_LPBIG_OFFBIG" - 1);
|
||||
- string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
|
||||
- }
|
||||
-#endif
|
||||
- restenvs[string_len++] = '\0';
|
||||
- string = restenvs;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
|
||||
+ sizeof "XBS5_LPBIG_OFFBIG" - 1);
|
||||
+ string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
|
||||
+ }
|
||||
+#endif
|
||||
+ restenvs[string_len++] = '\0';
|
||||
+ string = restenvs;
|
||||
break;
|
||||
|
||||
case _CS_XBS5_ILP32_OFF32_CFLAGS:
|
@ -1,64 +0,0 @@
|
||||
2012-01-19 Jeff Law <law@redhat.com>
|
||||
|
||||
* elf/dl-deps.c (_dl_map_object_deps): Fix cycle detection.
|
||||
* elf/dl-fini.c (_dl_sort_fini): Likewise
|
||||
|
||||
|
||||
Index: glibc-2.15/elf/dl-deps.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/dl-deps.c
|
||||
+++ glibc-2.15/elf/dl-deps.c
|
||||
@@ -634,7 +634,7 @@ Filters not supported with LD_TRACE_PREL
|
||||
/* We can skip looking for the binary itself which is at the front
|
||||
of the search list. */
|
||||
i = 1;
|
||||
- char seen[nlist];
|
||||
+ unsigned short seen[nlist];
|
||||
memset (seen, 0, nlist * sizeof (seen[0]));
|
||||
while (1)
|
||||
{
|
||||
@@ -660,13 +660,13 @@ Filters not supported with LD_TRACE_PREL
|
||||
(k - i) * sizeof (l_initfini[0]));
|
||||
l_initfini[k] = thisp;
|
||||
|
||||
- if (seen[i + 1] > 1)
|
||||
+ if (seen[i + 1] > nlist - i - 1)
|
||||
{
|
||||
++i;
|
||||
goto next_clear;
|
||||
}
|
||||
|
||||
- char this_seen = seen[i];
|
||||
+ unsigned short this_seen = seen[i];
|
||||
memmove (&seen[i], &seen[i + 1],
|
||||
(k - i) * sizeof (seen[0]));
|
||||
seen[k] = this_seen;
|
||||
Index: glibc-2.15/elf/dl-fini.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/dl-fini.c
|
||||
+++ glibc-2.15/elf/dl-fini.c
|
||||
@@ -39,7 +39,7 @@ _dl_sort_fini (struct link_map **maps, s
|
||||
/* We can skip looking for the binary itself which is at the front
|
||||
of the search list for the main namespace. */
|
||||
unsigned int i = ns == LM_ID_BASE;
|
||||
- char seen[nmaps];
|
||||
+ unsigned short seen[nmaps];
|
||||
memset (seen, 0, nmaps * sizeof (seen[0]));
|
||||
while (1)
|
||||
{
|
||||
@@ -79,13 +79,13 @@ _dl_sort_fini (struct link_map **maps, s
|
||||
used[k] = here_used;
|
||||
}
|
||||
|
||||
- if (seen[i + 1] > 1)
|
||||
+ if (seen[i + 1] > nmaps - i - 1)
|
||||
{
|
||||
++i;
|
||||
goto next_clear;
|
||||
}
|
||||
|
||||
- char this_seen = seen[i];
|
||||
+ unsigned short this_seen = seen[i];
|
||||
memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
|
||||
seen[k] = this_seen;
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d6d06c85b314ec365a1430a47d2867bf1191ce5d3771d9647bc3bcf31873228a
|
||||
size 299733
|
@ -1,8 +1,8 @@
|
||||
Index: glibc-2.15/Versions.def
|
||||
Index: glibc-2.15.90/Versions.def
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/Versions.def
|
||||
+++ glibc-2.15/Versions.def
|
||||
@@ -40,6 +40,7 @@ libc {
|
||||
--- glibc-2.15.90.orig/Versions.def
|
||||
+++ glibc-2.15.90/Versions.def
|
||||
@@ -41,6 +41,7 @@ libc {
|
||||
}
|
||||
libcrypt {
|
||||
GLIBC_2.0
|
||||
@ -10,10 +10,10 @@ Index: glibc-2.15/Versions.def
|
||||
}
|
||||
libdl {
|
||||
GLIBC_2.0
|
||||
Index: glibc-2.15/crypt/Versions
|
||||
Index: glibc-2.15.90/crypt/Versions
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/crypt/Versions
|
||||
+++ glibc-2.15/crypt/Versions
|
||||
--- glibc-2.15.90.orig/crypt/Versions
|
||||
+++ glibc-2.15.90/crypt/Versions
|
||||
@@ -3,4 +3,7 @@ libcrypt {
|
||||
crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r;
|
||||
crypt_rn; crypt_ra; crypt_gensalt; crypt_gensalt_rn; crypt_gensalt_ra;
|
||||
|
@ -1,7 +1,8 @@
|
||||
diff -urp glibc-2.14.orig/crypt/Makefile glibc-2.14/crypt/Makefile
|
||||
--- glibc-2.14.orig/crypt/Makefile 2011-05-31 04:12:33 +0000
|
||||
+++ glibc-2.14/crypt/Makefile 2011-07-16 21:40:56 +0000
|
||||
@@ -22,6 +22,7 @@
|
||||
Index: glibc-2.15.90/crypt/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/crypt/Makefile
|
||||
+++ glibc-2.15.90/crypt/Makefile
|
||||
@@ -21,6 +21,7 @@
|
||||
subdir := crypt
|
||||
|
||||
headers := crypt.h
|
||||
@ -9,7 +10,7 @@ diff -urp glibc-2.14.orig/crypt/Makefile glibc-2.14/crypt/Makefile
|
||||
|
||||
extra-libs := libcrypt
|
||||
extra-libs-others := $(extra-libs)
|
||||
@@ -29,6 +30,8 @@ extra-libs-others := $(extra-libs)
|
||||
@@ -28,6 +29,8 @@ extra-libs-others := $(extra-libs)
|
||||
libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \
|
||||
crypt_util
|
||||
|
||||
@ -17,10 +18,11 @@ diff -urp glibc-2.14.orig/crypt/Makefile glibc-2.14/crypt/Makefile
|
||||
+
|
||||
tests := cert md5c-test sha256c-test sha512c-test
|
||||
|
||||
distribute := ufc-crypt.h crypt-private.h ufc.c speeds.c README.ufc-crypt \
|
||||
diff -urp glibc-2.14.orig/crypt/Versions glibc-2.14/crypt/Versions
|
||||
--- glibc-2.14.orig/crypt/Versions 2011-05-31 04:12:33 +0000
|
||||
+++ glibc-2.14/crypt/Versions 2011-07-16 21:40:56 +0000
|
||||
include ../Makeconfig
|
||||
Index: glibc-2.15.90/crypt/Versions
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/crypt/Versions
|
||||
+++ glibc-2.15.90/crypt/Versions
|
||||
@@ -1,5 +1,6 @@
|
||||
libcrypt {
|
||||
GLIBC_2.0 {
|
||||
@ -28,10 +30,11 @@ diff -urp glibc-2.14.orig/crypt/Versions glibc-2.14/crypt/Versions
|
||||
+ crypt_rn; crypt_ra; crypt_gensalt; crypt_gensalt_rn; crypt_gensalt_ra;
|
||||
}
|
||||
}
|
||||
diff -urp glibc-2.14.orig/crypt/crypt-entry.c glibc-2.14/crypt/crypt-entry.c
|
||||
--- glibc-2.14.orig/crypt/crypt-entry.c 2011-05-31 04:12:33 +0000
|
||||
+++ glibc-2.14/crypt/crypt-entry.c 2011-07-16 21:40:56 +0000
|
||||
@@ -82,7 +82,7 @@ extern struct crypt_data _ufc_foobar;
|
||||
Index: glibc-2.15.90/crypt/crypt-entry.c
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/crypt/crypt-entry.c
|
||||
+++ glibc-2.15.90/crypt/crypt-entry.c
|
||||
@@ -79,7 +79,7 @@ extern struct crypt_data _ufc_foobar;
|
||||
*/
|
||||
|
||||
char *
|
||||
@ -40,7 +43,7 @@ diff -urp glibc-2.14.orig/crypt/crypt-entry.c glibc-2.14/crypt/crypt-entry.c
|
||||
const char *key;
|
||||
const char *salt;
|
||||
struct crypt_data * __restrict data;
|
||||
@@ -137,6 +137,7 @@ __crypt_r (key, salt, data)
|
||||
@@ -134,6 +134,7 @@ __crypt_r (key, salt, data)
|
||||
_ufc_output_conversion_r (res[0], res[1], salt, data);
|
||||
return data->crypt_3_buf;
|
||||
}
|
||||
@ -48,7 +51,7 @@ diff -urp glibc-2.14.orig/crypt/crypt-entry.c glibc-2.14/crypt/crypt-entry.c
|
||||
weak_alias (__crypt_r, crypt_r)
|
||||
|
||||
char *
|
||||
@@ -177,3 +178,4 @@ __fcrypt (key, salt)
|
||||
@@ -174,3 +175,4 @@ __fcrypt (key, salt)
|
||||
return crypt (key, salt);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f975b80a8fb0fe9984d7dc3e97d2ab1af652c2228ec6d90c36789e71e17ff37b
|
||||
size 10376824
|
@ -1,24 +0,0 @@
|
||||
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,452 +0,0 @@
|
||||
From 402a76b62dded0ee93cfec0471aaeccb989196d2 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Hope <michael.hope@linaro.org>
|
||||
Date: Mon, 5 Mar 2012 17:58:13 -0500
|
||||
Subject: [PATCH] ARM: Implement *context routines.
|
||||
|
||||
* sysdeps/unix/sysv/linux/arm/eabi/getcontext.S: New file.
|
||||
* sysdeps/unix/sysv/linux/arm/eabi/makecontext.c: New file.
|
||||
* sysdeps/unix/sysv/linux/arm/eabi/setcontext.S: New file.
|
||||
* sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S: New file.
|
||||
* sysdeps/unix/sysv/linux/arm/ucontext_i.sym: New file.
|
||||
* sysdeps/unix/sysv/linux/arm/Makefile (gen-as-const-headers): Add
|
||||
ucontext_i.sym.
|
||||
---
|
||||
ChangeLog.arm | 10 ++
|
||||
sysdeps/unix/sysv/linux/arm/Makefile | 4 +
|
||||
sysdeps/unix/sysv/linux/arm/eabi/getcontext.S | 113 ++++++++++++++++++++++++
|
||||
sysdeps/unix/sysv/linux/arm/eabi/makecontext.c | 73 +++++++++++++++
|
||||
sysdeps/unix/sysv/linux/arm/eabi/setcontext.S | 101 +++++++++++++++++++++
|
||||
sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S | 63 +++++++++++++
|
||||
sysdeps/unix/sysv/linux/arm/ucontext_i.sym | 30 ++++++
|
||||
7 files changed, 394 insertions(+), 0 deletions(-)
|
||||
create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/getcontext.S
|
||||
create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/makecontext.c
|
||||
create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/setcontext.S
|
||||
create mode 100644 sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S
|
||||
create mode 100644 sysdeps/unix/sysv/linux/arm/ucontext_i.sym
|
||||
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
|
||||
index d91b968..a981736 100644
|
||||
--- a/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/Makefile
|
||||
+++ b/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/Makefile
|
||||
@@ -20,3 +20,7 @@ endif
|
||||
ifeq ($(subdir),resource)
|
||||
sysdep_routines += oldgetrlimit64
|
||||
endif
|
||||
+
|
||||
+ifeq ($(subdir),stdlib)
|
||||
+gen-as-const-headers += ucontext_i.sym
|
||||
+endif
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S b/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S
|
||||
new file mode 100644
|
||||
index 0000000..435eb12
|
||||
--- /dev/null
|
||||
+++ b/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S
|
||||
@@ -0,0 +1,113 @@
|
||||
+/* Copyright (C) 2012 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, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <sysdep.h>
|
||||
+#include <rtld-global-offsets.h>
|
||||
+
|
||||
+#include "ucontext_i.h"
|
||||
+
|
||||
+ .syntax unified
|
||||
+ .text
|
||||
+
|
||||
+/* int getcontext (ucontext_t *ucp) */
|
||||
+
|
||||
+ENTRY(__getcontext)
|
||||
+ /* No need to save r0-r3, d0-d7, or d16-d31. */
|
||||
+ add r1, r0, #MCONTEXT_ARM_R4
|
||||
+ stmia r1, {r4-r11}
|
||||
+
|
||||
+ /* Save R13 separately as Thumb can't STM it. */
|
||||
+ str r13, [r0, #MCONTEXT_ARM_SP]
|
||||
+ str r14, [r0, #MCONTEXT_ARM_LR]
|
||||
+ /* Return to LR */
|
||||
+ str r14, [r0, #MCONTEXT_ARM_PC]
|
||||
+ /* Return zero */
|
||||
+ mov r2, #0
|
||||
+ str r2, [r0, #MCONTEXT_ARM_R0]
|
||||
+
|
||||
+ /* Save ucontext_t * across the next call. */
|
||||
+ mov r4, r0
|
||||
+
|
||||
+ /* __sigprocmask(SIG_BLOCK, NULL, &(ucontext->uc_sigmask)) */
|
||||
+ mov r0, #SIG_BLOCK
|
||||
+ mov r1, #0
|
||||
+ add r2, r4, #UCONTEXT_SIGMASK
|
||||
+ bl PLTJMP(__sigprocmask)
|
||||
+
|
||||
+ /* Store FP regs. Much of the FP code is copied from arm/eabi/setjmp.S. */
|
||||
+
|
||||
+#ifdef PIC
|
||||
+ ldr r2, 1f
|
||||
+ ldr r1, Lrtld_global_ro
|
||||
+0: add r2, pc, r2
|
||||
+ ldr r2, [r2, r1]
|
||||
+ ldr r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
|
||||
+#else
|
||||
+ ldr r2, Lhwcap
|
||||
+ ldr r2, [r2, #0]
|
||||
+#endif
|
||||
+
|
||||
+ add r0, r4, #UCONTEXT_REGSPACE
|
||||
+
|
||||
+ tst r2, #HWCAP_ARM_VFP
|
||||
+ beq Lno_vfp
|
||||
+
|
||||
+ /* Store the VFP registers.
|
||||
+ Don't use VFP instructions directly because this code
|
||||
+ is used in non-VFP multilibs. */
|
||||
+ /* Following instruction is vstmia r0!, {d8-d15}. */
|
||||
+ stc p11, cr8, [r0], #64
|
||||
+ /* Store the floating-point status register. */
|
||||
+ /* Following instruction is vmrs r1, fpscr. */
|
||||
+ mrc p10, 7, r1, cr1, cr0, 0
|
||||
+ str r1, [r0], #4
|
||||
+Lno_vfp:
|
||||
+
|
||||
+ tst r2, #HWCAP_ARM_IWMMXT
|
||||
+ beq Lno_iwmmxt
|
||||
+
|
||||
+ /* Save the call-preserved iWMMXt registers. */
|
||||
+ /* Following instructions are wstrd wr10, [r0], #8 (etc.) */
|
||||
+ stcl p1, cr10, [r0], #8
|
||||
+ stcl p1, cr11, [r0], #8
|
||||
+ stcl p1, cr12, [r0], #8
|
||||
+ stcl p1, cr13, [r0], #8
|
||||
+ stcl p1, cr14, [r0], #8
|
||||
+ stcl p1, cr15, [r0], #8
|
||||
+Lno_iwmmxt:
|
||||
+
|
||||
+ /* Restore the clobbered R4 and LR. */
|
||||
+ ldr r14, [r4, #MCONTEXT_ARM_LR]
|
||||
+ ldr r4, [r4, #MCONTEXT_ARM_R4]
|
||||
+
|
||||
+ mov r0, #0
|
||||
+
|
||||
+ DO_RET(r14)
|
||||
+
|
||||
+END(__getcontext)
|
||||
+
|
||||
+#ifdef PIC
|
||||
+1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
|
||||
+Lrtld_global_ro:
|
||||
+ .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
|
||||
+#else
|
||||
+Lhwcap:
|
||||
+ .long C_SYMBOL_NAME(_dl_hwcap)
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+weak_alias(__getcontext, getcontext)
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c b/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c
|
||||
new file mode 100644
|
||||
index 0000000..d6ae6f0
|
||||
--- /dev/null
|
||||
+++ b/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c
|
||||
@@ -0,0 +1,73 @@
|
||||
+/* Copyright (C) 2012 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, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+#include <ucontext.h>
|
||||
+
|
||||
+/* Number of arguments that go in registers. */
|
||||
+#define NREG_ARGS 4
|
||||
+
|
||||
+/* Take a context previously prepared via getcontext() and set to
|
||||
+ call func() with the given int only args. */
|
||||
+void
|
||||
+__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
|
||||
+{
|
||||
+ extern void __startcontext (void);
|
||||
+ unsigned long *funcstack;
|
||||
+ va_list vl;
|
||||
+ unsigned long *regptr;
|
||||
+ unsigned int reg;
|
||||
+ int misaligned;
|
||||
+
|
||||
+ /* Start at the top of stack. */
|
||||
+ funcstack = (unsigned long *) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
|
||||
+
|
||||
+ /* Ensure the stack stays eight byte aligned. */
|
||||
+ misaligned = ((unsigned long) funcstack & 4) != 0;
|
||||
+
|
||||
+ if ((argc > NREG_ARGS) && (argc & 1) != 0)
|
||||
+ misaligned = !misaligned;
|
||||
+
|
||||
+ if (misaligned)
|
||||
+ funcstack -= 1;
|
||||
+
|
||||
+ va_start (vl, argc);
|
||||
+
|
||||
+ /* Reserve space for the on-stack arguments. */
|
||||
+ if (argc > NREG_ARGS)
|
||||
+ funcstack -= (argc - NREG_ARGS);
|
||||
+
|
||||
+ ucp->uc_mcontext.arm_sp = (unsigned long) funcstack;
|
||||
+ ucp->uc_mcontext.arm_pc = (unsigned long) func;
|
||||
+
|
||||
+ /* Exit to startcontext() with the next context in R4 */
|
||||
+ ucp->uc_mcontext.arm_r4 = (unsigned long) ucp->uc_link;
|
||||
+ ucp->uc_mcontext.arm_lr = (unsigned long) __startcontext;
|
||||
+
|
||||
+ /* The first four arguments go into registers. */
|
||||
+ regptr = &(ucp->uc_mcontext.arm_r0);
|
||||
+
|
||||
+ for (reg = 0; (reg < argc) && (reg < NREG_ARGS); reg++)
|
||||
+ *regptr++ = va_arg (vl, unsigned long);
|
||||
+
|
||||
+ /* And the remainder on the stack. */
|
||||
+ for (; reg < argc; reg++)
|
||||
+ *funcstack++ = va_arg (vl, unsigned long);
|
||||
+
|
||||
+ va_end (vl);
|
||||
+}
|
||||
+weak_alias (__makecontext, makecontext)
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S b/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S
|
||||
new file mode 100644
|
||||
index 0000000..78003f5
|
||||
--- /dev/null
|
||||
+++ b/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S
|
||||
@@ -0,0 +1,101 @@
|
||||
+/* Copyright (C) 2012 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, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <sysdep.h>
|
||||
+#include <rtld-global-offsets.h>
|
||||
+
|
||||
+#include "ucontext_i.h"
|
||||
+
|
||||
+ .syntax unified
|
||||
+ .text
|
||||
+
|
||||
+/* int setcontext (const ucontext_t *ucp) */
|
||||
+
|
||||
+ENTRY(__setcontext)
|
||||
+ mov r4, r0
|
||||
+ add r0, r0, #UCONTEXT_REGSPACE
|
||||
+
|
||||
+ /* Restore the VFP registers. Copied from arm/eabi/__longjmp.S. */
|
||||
+#ifdef PIC
|
||||
+ ldr r2, 1f
|
||||
+ ldr r1, Lrtld_global_ro
|
||||
+0: add r2, pc, r2
|
||||
+ ldr r2, [r2, r1]
|
||||
+ ldr r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
|
||||
+#else
|
||||
+ ldr r2, Lhwcap
|
||||
+ ldr r2, [r2, #0]
|
||||
+#endif
|
||||
+
|
||||
+ tst r2, #HWCAP_ARM_VFP
|
||||
+ beq Lno_vfp_sc
|
||||
+
|
||||
+ /* Following instruction is vldmia r0!, {d8-d15}. */
|
||||
+ ldc p11, cr8, [r0], #64
|
||||
+ /* Restore the floating-point status register. */
|
||||
+ ldr r1, [r0], #4
|
||||
+ /* Following instruction is fmxr fpscr, r1. */
|
||||
+ mcr p10, 7, r1, cr1, cr0, 0
|
||||
+Lno_vfp_sc:
|
||||
+ tst r2, #HWCAP_ARM_IWMMXT
|
||||
+ beq Lno_iwmmxt_sc
|
||||
+
|
||||
+ /* Restore the call-preserved iWMMXt registers. */
|
||||
+ /* Following instructions are wldrd wr10, [r0], #8 (etc.) */
|
||||
+ ldcl p1, cr10, [r0], #8
|
||||
+ ldcl p1, cr11, [r0], #8
|
||||
+ ldcl p1, cr12, [r0], #8
|
||||
+ ldcl p1, cr13, [r0], #8
|
||||
+ ldcl p1, cr14, [r0], #8
|
||||
+ ldcl p1, cr15, [r0], #8
|
||||
+Lno_iwmmxt_sc:
|
||||
+
|
||||
+ /* Now bring back the signal status. */
|
||||
+ mov r0, #SIG_SETMASK
|
||||
+ add r1, r4, #UCONTEXT_SIGMASK
|
||||
+ mov r2, #0
|
||||
+ bl PLTJMP(__sigprocmask)
|
||||
+
|
||||
+ /* Loading r0-r3 makes makecontext easier. */
|
||||
+ add r14, r4, #MCONTEXT_ARM_R0
|
||||
+ ldmia r14, {r0-r12}
|
||||
+ ldr r13, [r14, #(MCONTEXT_ARM_SP - MCONTEXT_ARM_R0)]
|
||||
+ add r14, r14, #(MCONTEXT_ARM_LR - MCONTEXT_ARM_R0)
|
||||
+ ldmia r14, {r14, pc}
|
||||
+
|
||||
+END(setcontext)
|
||||
+weak_alias(__setcontext, setcontext)
|
||||
+
|
||||
+ /* Called when a makecontext() context returns. Start the
|
||||
+ context in R4 or fall through to exit(). */
|
||||
+ENTRY(__startcontext)
|
||||
+ movs r0, r4
|
||||
+ bne PLTJMP(__setcontext)
|
||||
+
|
||||
+ @ New context was 0 - exit
|
||||
+ b PLTJMP(_exit)
|
||||
+END(__startcontext)
|
||||
+
|
||||
+#ifdef PIC
|
||||
+1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
|
||||
+Lrtld_global_ro:
|
||||
+ .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
|
||||
+#else
|
||||
+Lhwcap:
|
||||
+ .long C_SYMBOL_NAME(_dl_hwcap)
|
||||
+#endif
|
||||
+
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S b/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S
|
||||
new file mode 100644
|
||||
index 0000000..09492d0
|
||||
--- /dev/null
|
||||
+++ b/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S
|
||||
@@ -0,0 +1,63 @@
|
||||
+/* Copyright (C) 2012 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, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <sysdep.h>
|
||||
+
|
||||
+#include "ucontext_i.h"
|
||||
+
|
||||
+ .syntax unified
|
||||
+ .text
|
||||
+
|
||||
+/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */
|
||||
+
|
||||
+ENTRY(swapcontext)
|
||||
+
|
||||
+ /* Have getcontext() do most of the work then fix up
|
||||
+ LR afterwards. Save R3 to keep the stack aligned. */
|
||||
+ push {r0,r1,r3,r14}
|
||||
+ cfi_adjust_cfa_offset (16)
|
||||
+ cfi_rel_offset (r0,0)
|
||||
+ cfi_rel_offset (r1,4)
|
||||
+ cfi_rel_offset (r3,8)
|
||||
+ cfi_rel_offset (r14,12)
|
||||
+
|
||||
+ bl __getcontext
|
||||
+ mov r4, r0
|
||||
+
|
||||
+ pop {r0,r1,r3,r14}
|
||||
+ cfi_adjust_cfa_offset (-16)
|
||||
+ cfi_restore (r0)
|
||||
+ cfi_restore (r1)
|
||||
+ cfi_restore (r3)
|
||||
+ cfi_restore (r14)
|
||||
+
|
||||
+ /* Exit if getcontext() failed. */
|
||||
+ cmp r4, #0
|
||||
+ itt ne
|
||||
+ movne r0, r4
|
||||
+ RETINSTR(ne, r14)
|
||||
+
|
||||
+ /* Fix up LR and the PC. */
|
||||
+ str r13,[r0, #MCONTEXT_ARM_SP]
|
||||
+ str r14,[r0, #MCONTEXT_ARM_LR]
|
||||
+ str r14,[r0, #MCONTEXT_ARM_PC]
|
||||
+
|
||||
+ /* And swap using swapcontext(). */
|
||||
+ mov r0, r1
|
||||
+ b __setcontext
|
||||
+
|
||||
+END(swapcontext)
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/ucontext_i.sym b/sysdeps/unix/sysv/linux/arm/ucontext_i.sym
|
||||
new file mode 100644
|
||||
index 0000000..306292f
|
||||
--- /dev/null
|
||||
+++ b/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/ucontext_i.sym
|
||||
@@ -0,0 +1,30 @@
|
||||
+#include <inttypes.h>
|
||||
+#include <signal.h>
|
||||
+#include <stddef.h>
|
||||
+#include <sys/ucontext.h>
|
||||
+
|
||||
+SIG_BLOCK
|
||||
+SIG_SETMASK
|
||||
+
|
||||
+-- Offsets of the fields in the ucontext_t structure.
|
||||
+#define ucontext(member) offsetof (ucontext_t, member)
|
||||
+#define mcontext(member) ucontext (uc_mcontext.member)
|
||||
+
|
||||
+UCONTEXT_FLAGS ucontext (uc_flags)
|
||||
+UCONTEXT_LINK ucontext (uc_link)
|
||||
+UCONTEXT_STACK ucontext (uc_stack)
|
||||
+UCONTEXT_MCONTEXT ucontext (uc_mcontext)
|
||||
+UCONTEXT_SIGMASK ucontext (uc_sigmask)
|
||||
+
|
||||
+UCONTEXT_REGSPACE ucontext (uc_regspace)
|
||||
+
|
||||
+MCONTEXT_TRAP_NO mcontext (trap_no)
|
||||
+MCONTEXT_ERROR_CODE mcontext (error_code)
|
||||
+MCONTEXT_OLDMASK mcontext (oldmask)
|
||||
+MCONTEXT_ARM_R0 mcontext (arm_r0)
|
||||
+MCONTEXT_ARM_R4 mcontext (arm_r4)
|
||||
+MCONTEXT_ARM_SP mcontext (arm_sp)
|
||||
+MCONTEXT_ARM_LR mcontext (arm_lr)
|
||||
+MCONTEXT_ARM_PC mcontext (arm_pc)
|
||||
+MCONTEXT_ARM_CPSR mcontext (arm_cpsr)
|
||||
+MCONTEXT_FAULT_ADDRESS mcontext (fault_address)
|
||||
--
|
||||
1.7.3.4
|
||||
|
3
glibc-2.16-da1f43196321.tar.xz
Normal file
3
glibc-2.16-da1f43196321.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:563674686eeff7d8473724f511a12506cfe4d40aca43c78f6156e75a84790c51
|
||||
size 10168980
|
@ -1,31 +0,0 @@
|
||||
commit f77f12320635155da728a3c1adb75ff9914cf686
|
||||
Author: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Sun Apr 8 22:45:13 2012 +0000
|
||||
|
||||
Use __kernel_standard instead of __kernel_standard_f in exp wrapper (bug 13705).
|
||||
|
||||
2012-04-08 Aurelien Jarno <aurelien@aurel32.net>
|
||||
|
||||
[BZ #13705]
|
||||
* sysdeps/ieee754/dbl-64/w_exp.c (__exp): Use __kernel_standard
|
||||
instead of __kernel_standard_f.
|
||||
|
||||
diff --git a/sysdeps/ieee754/dbl-64/w_exp.c b/sysdeps/ieee754/dbl-64/w_exp.c
|
||||
index b584ed8..aa8ff76 100644
|
||||
--- a/sysdeps/ieee754/dbl-64/w_exp.c
|
||||
+++ b/sysdeps/ieee754/dbl-64/w_exp.c
|
||||
@@ -31,12 +31,12 @@ __exp (double x)
|
||||
if (__builtin_expect (isgreater (x, o_threshold), 0))
|
||||
{
|
||||
if (_LIB_VERSION != _IEEE_)
|
||||
- return __kernel_standard_f (x, x, 6);
|
||||
+ return __kernel_standard (x, x, 6);
|
||||
}
|
||||
else if (__builtin_expect (isless (x, u_threshold), 0))
|
||||
{
|
||||
if (_LIB_VERSION != _IEEE_)
|
||||
- return __kernel_standard_f (x, x, 7);
|
||||
+ return __kernel_standard (x, x, 7);
|
||||
}
|
||||
|
||||
return __ieee754_exp (x);
|
File diff suppressed because it is too large
Load Diff
@ -1,25 +0,0 @@
|
||||
Index: glibc-2.15/malloc/mcheck.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/malloc/mcheck.c
|
||||
+++ glibc-2.15/malloc/mcheck.c
|
||||
@@ -371,6 +371,12 @@ mabort (enum mcheck_status status)
|
||||
#endif
|
||||
}
|
||||
|
||||
+#ifndef malloc_opt_barrier
|
||||
+#define malloc_opt_barrier(x) \
|
||||
+({ __typeof (x) __x = x; __asm ("" : "+m" (__x)); __x; })
|
||||
+#define malloc_force_eval(x) __asm __volatile ("" : : "m" (x))
|
||||
+#endif
|
||||
+
|
||||
int
|
||||
mcheck (func)
|
||||
void (*func) (enum mcheck_status);
|
||||
@@ -382,6 +388,7 @@ mcheck (func)
|
||||
{
|
||||
/* We call malloc() once here to ensure it is initialized. */
|
||||
void *p = malloc (0);
|
||||
+ p = malloc_opt_barrier (p);
|
||||
free (p);
|
||||
|
||||
old_free_hook = __free_hook;
|
@ -1,795 +0,0 @@
|
||||
commit 3add8e1353d62d77fdd9b4ca363cdfe7006b0efb
|
||||
Author: Joseph Myers <joseph@codesourcery.com>
|
||||
Date: Wed Feb 8 01:45:26 2012 +0000
|
||||
|
||||
Support crti.S and crtn.S provided directly by architectures.
|
||||
|
||||
2012-02-08 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
Support crti.S and crtn.S provided directly by architectures.
|
||||
* csu/Makefile [crti.S in sysdirs] (generated): Do not append.
|
||||
[crti.S in sysdirs] (omit-deps): Likewise.
|
||||
[crti.S in sysdirs] (CFLAGS-initfini.s): Do not define variable.
|
||||
[crti.S in sysdirs] ($(crtstuff:%=$(objpfx)%.o)): Disable rule.
|
||||
[crti.S in sysdirs] ($(objpfx)initfini.s): Likewise.
|
||||
[crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
|
||||
[crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
|
||||
[crti.S in sysdirs] ($(patsubst %,$(objpfx)crt%.o,i n)): Likewise.
|
||||
[crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
|
||||
[crti.S in sysdirs] (initfini.c): Remove vpath directive.
|
||||
* sysdeps/i386/crti.S, sysdeps/i386/crtn.S: New files, based on
|
||||
compiler output for sysdeps/generic/initfini.c.
|
||||
* sysdeps/i386/elf/Makefile: Remove file.
|
||||
* sysdeps/i386/Makefile (CFLAGS-initfini.s): Remove variable.
|
||||
|
||||
Index: glibc-2.15/csu/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/csu/Makefile
|
||||
+++ glibc-2.15/csu/Makefile
|
||||
@@ -75,10 +75,6 @@ before-compile += $(objpfx)abi-tag.h
|
||||
generated += abi-tag.h
|
||||
endif
|
||||
|
||||
-ifeq ($(have-initfini),yes)
|
||||
-
|
||||
-CPPFLAGS += -DHAVE_INITFINI
|
||||
-
|
||||
# These are the special initializer/finalizer files. They are always the
|
||||
# first and last file in the link. crti.o ... crtn.o define the global
|
||||
# "functions" _init and _fini to run the .init and .fini sections.
|
||||
@@ -86,6 +82,13 @@ crtstuff = crti crtn
|
||||
|
||||
install-lib += $(crtstuff:=.o)
|
||||
extra-objs += $(crtstuff:=.o)
|
||||
+
|
||||
+# Conditionals on the existence of a sysdeps version of crti.S are
|
||||
+# temporary until all targets either have such a file or have been
|
||||
+# removed, after which the old approach of postprocessing compiler
|
||||
+# output will be removed.
|
||||
+ifeq (,$(wildcard $(sysdirs:%=%/crti.S)))
|
||||
+
|
||||
generated += $(crtstuff:=.S) initfini.s defs.h
|
||||
omit-deps += $(crtstuff)
|
||||
|
||||
Index: glibc-2.15/nptl/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/nptl/Makefile
|
||||
+++ glibc-2.15/nptl/Makefile
|
||||
@@ -335,15 +335,22 @@ ifneq (,$(patsubst .,,$(multidir)))
|
||||
generated-dirs := $(firstword $(subst /, , $(multidir)))
|
||||
crti-objs += $(multidir)/crti.o
|
||||
crtn-objs += $(multidir)/crtn.o
|
||||
+# Conditionals on the existence of a sysdeps version of crti.S are
|
||||
+# temporary until all targets either have such a file or have been
|
||||
+# removed, after which the old approach of postprocessing compiler
|
||||
+# output will be removed.
|
||||
+ifeq (,$(wildcard $(sysdirs:%=%/crti.S)))
|
||||
omit-deps += $(multidir)/crti $(multidir)/crtn
|
||||
+endif
|
||||
$(objpfx)$(multidir):
|
||||
mkdir -p $@
|
||||
endif
|
||||
extra-objs += $(crti-objs) $(crtn-objs)
|
||||
+ifeq (,$(wildcard $(sysdirs:%=%/crti.S)))
|
||||
omit-deps += crti crtn
|
||||
-
|
||||
CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
endif
|
||||
+endif
|
||||
|
||||
CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
|
||||
CFLAGS-ftrylockfile.c = -D_IO_MTSAFE_IO
|
||||
@@ -543,15 +550,24 @@ $(addprefix $(objpfx),$(tests) $(test-sr
|
||||
endif
|
||||
|
||||
ifeq ($(build-shared),yes)
|
||||
+ifeq (,$(wildcard $(sysdirs:%=%/crti.S)))
|
||||
vpath pt-initfini.c $(sysdirs)
|
||||
|
||||
$(objpfx)pt-initfini.s: pt-initfini.c
|
||||
$(compile.c) -S $(CFLAGS-pt-initfini.s) -finhibit-size-directive \
|
||||
$(patsubst -f%,-fno-%,$(exceptions)) -o $@
|
||||
+endif
|
||||
|
||||
$(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0
|
||||
$(make-test-out) 2>&1 | cmp - tst-cleanup0.expect > $@
|
||||
|
||||
+ifneq (,$(wildcard $(sysdirs:%=%/crti.S)))
|
||||
+
|
||||
+$(objpfx)crti.o: $(objpfx)pt-crti.o
|
||||
+ ln -f $< $@
|
||||
+
|
||||
+else
|
||||
+
|
||||
# We only have one kind of startup code files. Static binaries and
|
||||
# shared libraries are build using the PIC version.
|
||||
$(objpfx)crti.S: $(objpfx)pt-initfini.s
|
||||
@@ -573,6 +589,8 @@ $(objpfx)crti.o: $(objpfx)crti.S $(objpf
|
||||
$(objpfx)crtn.o: $(objpfx)crtn.S $(objpfx)defs.h
|
||||
$(compile.S) -g0 $(ASFLAGS-.os) -o $@
|
||||
|
||||
+endif
|
||||
+
|
||||
ifneq ($(multidir),.)
|
||||
$(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir)/
|
||||
ln -f $< $@
|
||||
Index: glibc-2.15/nptl/pt-crti.S
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/nptl/pt-crti.S
|
||||
@@ -0,0 +1,44 @@
|
||||
+/* Special .init and .fini section support for libpthread.
|
||||
+ Copyright (C) 2012 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.
|
||||
+
|
||||
+ In addition to the permissions in the GNU Lesser General Public
|
||||
+ License, the Free Software Foundation gives you unlimited
|
||||
+ permission to link the compiled version of this file with other
|
||||
+ programs, and to distribute those programs without any restriction
|
||||
+ coming from the use of this file. (The GNU Lesser General Public
|
||||
+ License restrictions do apply in other respects; for example, they
|
||||
+ cover modification of the file, and distribution when not linked
|
||||
+ into another program.)
|
||||
+
|
||||
+ Note that people who make modified versions of this file are not
|
||||
+ obligated to grant this special exception for their modified
|
||||
+ versions; it is their choice whether to do so. The GNU Lesser
|
||||
+ General Public License gives permission to release a modified
|
||||
+ version without this exception; this exception also makes it
|
||||
+ possible to release a modified version which carries forward this
|
||||
+ exception.
|
||||
+
|
||||
+ 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. */
|
||||
+
|
||||
+/* Arrange for __pthread_initialize_minimal_internal to be called at
|
||||
+ libpthread startup, instead of conditionally calling
|
||||
+ __gmon_start__. */
|
||||
+
|
||||
+#define PREINIT_FUNCTION __pthread_initialize_minimal_internal
|
||||
+#define PREINIT_FUNCTION_WEAK 0
|
||||
+
|
||||
+#include <crti.S>
|
||||
Index: glibc-2.15/sysdeps/i386/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/sysdeps/i386/Makefile
|
||||
+++ glibc-2.15/sysdeps/i386/Makefile
|
||||
@@ -5,12 +5,6 @@ asm-CPPFLAGS += -DGAS_SYNTAX
|
||||
# The i386 `long double' is a distinct type we support.
|
||||
long-double-fcts = yes
|
||||
|
||||
-ifeq ($(subdir),csu)
|
||||
-# On i686 we must avoid generating the trampoline functions generated
|
||||
-# to get the GOT pointer.
|
||||
-CFLAGS-initfini.s += -march=i386 -mtune=i386
|
||||
-endif
|
||||
-
|
||||
ifeq ($(subdir),gmon)
|
||||
sysdep_routines += i386-mcount
|
||||
endif
|
||||
Index: glibc-2.15/sysdeps/i386/crti.S
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/sysdeps/i386/crti.S
|
||||
@@ -0,0 +1,85 @@
|
||||
+/* Special .init and .fini section support for x86.
|
||||
+ Copyright (C) 1995-2012 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.
|
||||
+
|
||||
+ In addition to the permissions in the GNU Lesser General Public
|
||||
+ License, the Free Software Foundation gives you unlimited
|
||||
+ permission to link the compiled version of this file with other
|
||||
+ programs, and to distribute those programs without any restriction
|
||||
+ coming from the use of this file. (The GNU Lesser General Public
|
||||
+ License restrictions do apply in other respects; for example, they
|
||||
+ cover modification of the file, and distribution when not linked
|
||||
+ into another program.)
|
||||
+
|
||||
+ Note that people who make modified versions of this file are not
|
||||
+ obligated to grant this special exception for their modified
|
||||
+ versions; it is their choice whether to do so. The GNU Lesser
|
||||
+ General Public License gives permission to release a modified
|
||||
+ version without this exception; this exception also makes it
|
||||
+ possible to release a modified version which carries forward this
|
||||
+ exception.
|
||||
+
|
||||
+ 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. */
|
||||
+
|
||||
+/* crti.S puts a function prologue at the beginning of the .init and
|
||||
+ .fini sections and defines global symbols for those addresses, so
|
||||
+ they can be called as functions. The symbols _init and _fini are
|
||||
+ magic and cause the linker to emit DT_INIT and DT_FINI. */
|
||||
+
|
||||
+#include <libc-symbols.h>
|
||||
+#include <sysdep.h>
|
||||
+
|
||||
+#ifndef PREINIT_FUNCTION
|
||||
+# define PREINIT_FUNCTION __gmon_start__
|
||||
+#endif
|
||||
+
|
||||
+#ifndef PREINIT_FUNCTION_WEAK
|
||||
+# define PREINIT_FUNCTION_WEAK 1
|
||||
+#endif
|
||||
+
|
||||
+#if PREINIT_FUNCTION_WEAK
|
||||
+ weak_extern (PREINIT_FUNCTION)
|
||||
+#else
|
||||
+ .hidden PREINIT_FUNCTION
|
||||
+#endif
|
||||
+
|
||||
+ .section .init,"ax",@progbits
|
||||
+ .p2align 2
|
||||
+ .globl _init
|
||||
+ .type _init, @function
|
||||
+_init:
|
||||
+ pushl %ebx
|
||||
+ /* Maintain 16-byte stack alignment for called functions. */
|
||||
+ subl $8, %esp
|
||||
+ LOAD_PIC_REG (bx)
|
||||
+#if PREINIT_FUNCTION_WEAK
|
||||
+ movl PREINIT_FUNCTION@GOT(%ebx), %eax
|
||||
+ testl %eax, %eax
|
||||
+ je .Lno_weak_fn
|
||||
+ call PREINIT_FUNCTION@PLT
|
||||
+.Lno_weak_fn:
|
||||
+#else
|
||||
+ call PREINIT_FUNCTION
|
||||
+#endif
|
||||
+
|
||||
+ .section .fini,"ax",@progbits
|
||||
+ .p2align 2
|
||||
+ .globl _fini
|
||||
+ .type _fini, @function
|
||||
+_fini:
|
||||
+ pushl %ebx
|
||||
+ subl $8, %esp
|
||||
+ LOAD_PIC_REG (bx)
|
||||
Index: glibc-2.15/sysdeps/i386/crtn.S
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/sysdeps/i386/crtn.S
|
||||
@@ -0,0 +1,48 @@
|
||||
+/* Special .init and .fini section support for x86.
|
||||
+ Copyright (C) 1995-2012 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.
|
||||
+
|
||||
+ In addition to the permissions in the GNU Lesser General Public
|
||||
+ License, the Free Software Foundation gives you unlimited
|
||||
+ permission to link the compiled version of this file with other
|
||||
+ programs, and to distribute those programs without any restriction
|
||||
+ coming from the use of this file. (The GNU Lesser General Public
|
||||
+ License restrictions do apply in other respects; for example, they
|
||||
+ cover modification of the file, and distribution when not linked
|
||||
+ into another program.)
|
||||
+
|
||||
+ Note that people who make modified versions of this file are not
|
||||
+ obligated to grant this special exception for their modified
|
||||
+ versions; it is their choice whether to do so. The GNU Lesser
|
||||
+ General Public License gives permission to release a modified
|
||||
+ version without this exception; this exception also makes it
|
||||
+ possible to release a modified version which carries forward this
|
||||
+ exception.
|
||||
+
|
||||
+ 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. */
|
||||
+
|
||||
+/* crtn.S puts function epilogues in the .init and .fini sections
|
||||
+ corresponding to the prologues in crti.S. */
|
||||
+
|
||||
+ .section .init,"ax",@progbits
|
||||
+ addl $8, %esp
|
||||
+ popl %ebx
|
||||
+ ret
|
||||
+
|
||||
+ .section .fini,"ax",@progbits
|
||||
+ addl $8, %esp
|
||||
+ popl %ebx
|
||||
+ ret
|
||||
Index: glibc-2.15/sysdeps/i386/elf/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/sysdeps/i386/elf/Makefile
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-ifeq ($(subdir),csu)
|
||||
-# Turn off -fasynchronous-unwind-tables
|
||||
-CFLAGS-initfini.s += -fno-asynchronous-unwind-tables
|
||||
-endif
|
||||
Index: glibc-2.15/Makeconfig
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/Makeconfig
|
||||
+++ glibc-2.15/Makeconfig
|
||||
@@ -394,11 +394,6 @@ ifndef asm-CPPFLAGS
|
||||
asm-CPPFLAGS =
|
||||
endif
|
||||
|
||||
-# ELF always supports init/fini sections
|
||||
-ifeq ($(elf),yes)
|
||||
-have-initfini = yes
|
||||
-endif
|
||||
-
|
||||
ifeq ($(have-as-needed),yes)
|
||||
as-needed := -Wl,--as-needed
|
||||
no-as-needed := -Wl,--no-as-needed
|
||||
@@ -412,14 +407,8 @@ no-whole-archive = -Wl,--no-whole-archiv
|
||||
whole-archive = -Wl,--whole-archive
|
||||
|
||||
# Installed name of the startup code.
|
||||
-ifneq ($(have-initfini),yes)
|
||||
-# When not having init/fini, there is just one startfile, called crt0.o.
|
||||
-start-installed-name = crt0.o
|
||||
-else
|
||||
-# On systems having init/fini, crt0.o is called crt1.o, and there are
|
||||
-# some additional bizarre files.
|
||||
+# The ELF convention is that the startfile is called crt1.o
|
||||
start-installed-name = crt1.o
|
||||
-endif
|
||||
# On systems that do not need a special startfile for statically linked
|
||||
# binaries, simply set it to the normal name.
|
||||
ifndef static-start-installed-name
|
||||
Index: glibc-2.15/config.h.in
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/config.h.in
|
||||
+++ glibc-2.15/config.h.in
|
||||
@@ -42,9 +42,6 @@
|
||||
assembler instructions per line. Default is `;' */
|
||||
#undef ASM_LINE_SEP
|
||||
|
||||
-/* Define if not using ELF, but `.init' and `.fini' sections are available. */
|
||||
-#undef HAVE_INITFINI
|
||||
-
|
||||
/* Define if __attribute__((section("foo"))) puts quotes around foo. */
|
||||
#undef HAVE_SECTION_QUOTES
|
||||
|
||||
Index: glibc-2.15/config.make.in
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/config.make.in
|
||||
+++ glibc-2.15/config.make.in
|
||||
@@ -48,11 +48,9 @@ all-warnings = @all_warnings@
|
||||
elf = @elf@
|
||||
have-z-combreloc = @libc_cv_z_combreloc@
|
||||
have-z-execstack = @libc_cv_z_execstack@
|
||||
-have-initfini = @libc_cv_have_initfini@
|
||||
have-Bgroup = @libc_cv_Bgroup@
|
||||
have-as-needed = @libc_cv_as_needed@
|
||||
libgcc_s_suffix = @libc_cv_libgcc_s_suffix@
|
||||
-need-nopic-initfini = @nopic_initfini@
|
||||
with-fp = @with_fp@
|
||||
old-glibc-headers = @old_glibc_headers@
|
||||
unwind-find-fde = @libc_cv_gcc_unwind_find_fde@
|
||||
Index: glibc-2.15/configure
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/configure
|
||||
+++ glibc-2.15/configure
|
||||
@@ -610,7 +610,6 @@ RELEASE
|
||||
VERSION
|
||||
mach_interface_list
|
||||
DEFINES
|
||||
-nopic_initfini
|
||||
static_nss
|
||||
bounded
|
||||
omitfp
|
||||
@@ -7995,7 +7994,6 @@ $as_echo "$libc_cv_pic_default" >&6; }
|
||||
|
||||
|
||||
|
||||
-
|
||||
|
||||
|
||||
|
||||
Index: glibc-2.15/configure.in
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/configure.in
|
||||
+++ glibc-2.15/configure.in
|
||||
@@ -2377,7 +2377,6 @@ AC_SUBST(profile)
|
||||
AC_SUBST(omitfp)
|
||||
AC_SUBST(bounded)
|
||||
AC_SUBST(static_nss)
|
||||
-AC_SUBST(nopic_initfini)
|
||||
|
||||
AC_SUBST(DEFINES)
|
||||
|
||||
Index: glibc-2.15/csu/gmon-start.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/csu/gmon-start.c
|
||||
+++ glibc-2.15/csu/gmon-start.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Code to enable profiling at program startup.
|
||||
- Copyright (C) 1995,1996,1997,2000,2001,2002 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1995,1996,1997,2000,2001,2002,2012 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
|
||||
@@ -43,23 +43,14 @@ extern char etext[];
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#ifndef HAVE_INITFINI
|
||||
-/* This function gets called at startup by the normal constructor
|
||||
- mechanism. We link this file together with start.o to produce gcrt1.o,
|
||||
- so this constructor will be first in the list. */
|
||||
-
|
||||
-extern void __gmon_start__ (void) __attribute__ ((constructor));
|
||||
-#else
|
||||
-/* In ELF and COFF, we cannot use the normal constructor mechanism to call
|
||||
+/* We cannot use the normal constructor mechanism to call
|
||||
__gmon_start__ because gcrt1.o appears before crtbegin.o in the link.
|
||||
- Instead crti.o calls it specially (see initfini.c). */
|
||||
+ Instead crti.o calls it specially. */
|
||||
extern void __gmon_start__ (void);
|
||||
-#endif
|
||||
|
||||
void
|
||||
__gmon_start__ (void)
|
||||
{
|
||||
-#ifdef HAVE_INITFINI
|
||||
/* Protect from being called more than once. Since crti.o is linked
|
||||
into every shared library, each of their init functions will call us. */
|
||||
static int called;
|
||||
@@ -68,7 +59,6 @@ __gmon_start__ (void)
|
||||
return;
|
||||
|
||||
called = 1;
|
||||
-#endif
|
||||
|
||||
/* Start keeping profiling records. */
|
||||
__monstartup ((u_long) TEXT_START, (u_long) &etext);
|
||||
Index: glibc-2.15/sysdeps/powerpc/powerpc32/crti.S
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/sysdeps/powerpc/powerpc32/crti.S
|
||||
@@ -0,0 +1,90 @@
|
||||
+/* Special .init and .fini section support for PowerPC.
|
||||
+ Copyright (C) 2012 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.
|
||||
+
|
||||
+ In addition to the permissions in the GNU Lesser General Public
|
||||
+ License, the Free Software Foundation gives you unlimited
|
||||
+ permission to link the compiled version of this file with other
|
||||
+ programs, and to distribute those programs without any restriction
|
||||
+ coming from the use of this file. (The GNU Lesser General Public
|
||||
+ License restrictions do apply in other respects; for example, they
|
||||
+ cover modification of the file, and distribution when not linked
|
||||
+ into another program.)
|
||||
+
|
||||
+ Note that people who make modified versions of this file are not
|
||||
+ obligated to grant this special exception for their modified
|
||||
+ versions; it is their choice whether to do so. The GNU Lesser
|
||||
+ General Public License gives permission to release a modified
|
||||
+ version without this exception; this exception also makes it
|
||||
+ possible to release a modified version which carries forward this
|
||||
+ exception.
|
||||
+
|
||||
+ 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. */
|
||||
+
|
||||
+/* crti.S puts a function prologue at the beginning of the .init and
|
||||
+ .fini sections and defines global symbols for those addresses, so
|
||||
+ they can be called as functions. The symbols _init and _fini are
|
||||
+ magic and cause the linker to emit DT_INIT and DT_FINI. */
|
||||
+
|
||||
+#include <libc-symbols.h>
|
||||
+#include <sysdep.h>
|
||||
+
|
||||
+#ifndef PREINIT_FUNCTION
|
||||
+# define PREINIT_FUNCTION __gmon_start__
|
||||
+#endif
|
||||
+
|
||||
+#ifndef PREINIT_FUNCTION_WEAK
|
||||
+# define PREINIT_FUNCTION_WEAK 1
|
||||
+#endif
|
||||
+
|
||||
+#if PREINIT_FUNCTION_WEAK
|
||||
+ weak_extern (PREINIT_FUNCTION)
|
||||
+#else
|
||||
+ .hidden PREINIT_FUNCTION
|
||||
+#endif
|
||||
+
|
||||
+ .section .init,"ax",@progbits
|
||||
+ .align 2
|
||||
+ .globl _init
|
||||
+ .type _init, @function
|
||||
+_init:
|
||||
+ stwu r1, -16(r1)
|
||||
+ mflr r0
|
||||
+ stw r0, 20(r1)
|
||||
+ stw r30, 8(r1)
|
||||
+ SETUP_GOT_ACCESS (r30, .Lgot_label_i)
|
||||
+ addis r30, r30, _GLOBAL_OFFSET_TABLE_-.Lgot_label_i@ha
|
||||
+ addi r30, r30, _GLOBAL_OFFSET_TABLE_-.Lgot_label_i@l
|
||||
+#if PREINIT_FUNCTION_WEAK
|
||||
+ lwz r0, PREINIT_FUNCTION@got(r30)
|
||||
+ cmpwi cr7, r0, 0
|
||||
+ beq+ cr7, 1f
|
||||
+ bl PREINIT_FUNCTION@plt
|
||||
+1:
|
||||
+#else
|
||||
+ bl PREINIT_FUNCTION@local
|
||||
+#endif
|
||||
+
|
||||
+ .section .fini,"ax",@progbits
|
||||
+ .align 2
|
||||
+ .globl _fini
|
||||
+ .type _fini, @function
|
||||
+_fini:
|
||||
+ stwu r1, -16(r1)
|
||||
+ mflr r0
|
||||
+ stw r0, 20(r1)
|
||||
+ stw r30, 8(r1)
|
||||
+ SETUP_GOT_ACCESS (r30, .Lgot_label_f)
|
||||
Index: glibc-2.15/sysdeps/powerpc/powerpc32/crtn.S
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/sysdeps/powerpc/powerpc32/crtn.S
|
||||
@@ -0,0 +1,54 @@
|
||||
+/* Special .init and .fini section support for PowerPC.
|
||||
+ Copyright (C) 2012 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.
|
||||
+
|
||||
+ In addition to the permissions in the GNU Lesser General Public
|
||||
+ License, the Free Software Foundation gives you unlimited
|
||||
+ permission to link the compiled version of this file with other
|
||||
+ programs, and to distribute those programs without any restriction
|
||||
+ coming from the use of this file. (The GNU Lesser General Public
|
||||
+ License restrictions do apply in other respects; for example, they
|
||||
+ cover modification of the file, and distribution when not linked
|
||||
+ into another program.)
|
||||
+
|
||||
+ Note that people who make modified versions of this file are not
|
||||
+ obligated to grant this special exception for their modified
|
||||
+ versions; it is their choice whether to do so. The GNU Lesser
|
||||
+ General Public License gives permission to release a modified
|
||||
+ version without this exception; this exception also makes it
|
||||
+ possible to release a modified version which carries forward this
|
||||
+ exception.
|
||||
+
|
||||
+ 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. */
|
||||
+
|
||||
+/* crtn.S puts function epilogues in the .init and .fini sections
|
||||
+ corresponding to the prologues in crti.S. */
|
||||
+
|
||||
+#include <sysdep.h>
|
||||
+
|
||||
+ .section .init,"ax",@progbits
|
||||
+ lwz r0, 20(r1)
|
||||
+ mtlr r0
|
||||
+ lwz r30, 8(r1)
|
||||
+ addi r1, r1, 16
|
||||
+ blr
|
||||
+
|
||||
+ .section .fini,"ax",@progbits
|
||||
+ lwz r0, 20(r1)
|
||||
+ mtlr r0
|
||||
+ lwz r30, 8(r1)
|
||||
+ addi r1, r1, 16
|
||||
+ blr
|
||||
Index: glibc-2.15/sysdeps/powerpc/powerpc64/crti.S
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/sysdeps/powerpc/powerpc64/crti.S
|
||||
@@ -0,0 +1,107 @@
|
||||
+/* Special .init and .fini section support for PowerPC64.
|
||||
+ Copyright (C) 2012 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.
|
||||
+
|
||||
+ In addition to the permissions in the GNU Lesser General Public
|
||||
+ License, the Free Software Foundation gives you unlimited
|
||||
+ permission to link the compiled version of this file with other
|
||||
+ programs, and to distribute those programs without any restriction
|
||||
+ coming from the use of this file. (The GNU Lesser General Public
|
||||
+ License restrictions do apply in other respects; for example, they
|
||||
+ cover modification of the file, and distribution when not linked
|
||||
+ into another program.)
|
||||
+
|
||||
+ Note that people who make modified versions of this file are not
|
||||
+ obligated to grant this special exception for their modified
|
||||
+ versions; it is their choice whether to do so. The GNU Lesser
|
||||
+ General Public License gives permission to release a modified
|
||||
+ version without this exception; this exception also makes it
|
||||
+ possible to release a modified version which carries forward this
|
||||
+ exception.
|
||||
+
|
||||
+ 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. */
|
||||
+
|
||||
+/* crti.S puts a function prologue at the beginning of the .init and
|
||||
+ .fini sections and defines global symbols for those addresses, so
|
||||
+ they can be called as functions. The symbols _init and _fini are
|
||||
+ magic and cause the linker to emit DT_INIT and DT_FINI. */
|
||||
+
|
||||
+#include <libc-symbols.h>
|
||||
+#include <sysdep.h>
|
||||
+
|
||||
+#ifndef PREINIT_FUNCTION
|
||||
+# define PREINIT_FUNCTION __gmon_start__
|
||||
+#endif
|
||||
+
|
||||
+#ifndef PREINIT_FUNCTION_WEAK
|
||||
+# define PREINIT_FUNCTION_WEAK 1
|
||||
+#endif
|
||||
+
|
||||
+#if PREINIT_FUNCTION_WEAK
|
||||
+ weak_extern (PREINIT_FUNCTION)
|
||||
+#else
|
||||
+ .hidden PREINIT_FUNCTION
|
||||
+#endif
|
||||
+
|
||||
+#if PREINIT_FUNCTION_WEAK
|
||||
+ .section ".toc", "aw"
|
||||
+.LC0:
|
||||
+ .tc PREINIT_FUNCTION[TC], PREINIT_FUNCTION
|
||||
+#endif
|
||||
+ .type BODY_LABEL (_init), @function
|
||||
+ .globl _init
|
||||
+ .section ".opd", "aw"
|
||||
+ .align 3
|
||||
+_init: OPD_ENT (_init)
|
||||
+#ifdef HAVE_ASM_GLOBAL_DOT_NAME
|
||||
+ .globl BODY_LABEL (_init)
|
||||
+ .size _init, 24
|
||||
+#else
|
||||
+ .type _init, @function
|
||||
+#endif
|
||||
+ .section ".init", "ax", @progbits
|
||||
+ .align ALIGNARG (2)
|
||||
+BODY_LABEL (_init):
|
||||
+ mflr 0
|
||||
+ std 0, 16(r1)
|
||||
+ stdu r1, -112(r1)
|
||||
+#if PREINIT_FUNCTION_WEAK
|
||||
+ addis r9, r2, .LC0@toc@ha
|
||||
+ ld r0, .LC0@toc@l(r9)
|
||||
+ cmpdi cr7, r0, 0
|
||||
+ beq+ cr7, 1f
|
||||
+#endif
|
||||
+ bl JUMPTARGET (PREINIT_FUNCTION)
|
||||
+ nop
|
||||
+1:
|
||||
+
|
||||
+ .type BODY_LABEL (_fini), @function
|
||||
+ .globl _fini
|
||||
+ .section ".opd", "aw"
|
||||
+ .align 3
|
||||
+_fini: OPD_ENT (_fini)
|
||||
+#ifdef HAVE_ASM_GLOBAL_DOT_NAME
|
||||
+ .globl BODY_LABEL (_fini)
|
||||
+ .size _fini, 24
|
||||
+#else
|
||||
+ .type _fini, @function
|
||||
+#endif
|
||||
+ .section ".fini", "ax", @progbits
|
||||
+ .align ALIGNARG (2)
|
||||
+BODY_LABEL (_fini):
|
||||
+ mflr 0
|
||||
+ std 0, 16(r1)
|
||||
+ stdu r1, -112(r1)
|
||||
Index: glibc-2.15/sysdeps/powerpc/powerpc64/crtn.S
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/sysdeps/powerpc/powerpc64/crtn.S
|
||||
@@ -0,0 +1,52 @@
|
||||
+/* Special .init and .fini section support for PowerPC64.
|
||||
+ Copyright (C) 2012 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.
|
||||
+
|
||||
+ In addition to the permissions in the GNU Lesser General Public
|
||||
+ License, the Free Software Foundation gives you unlimited
|
||||
+ permission to link the compiled version of this file with other
|
||||
+ programs, and to distribute those programs without any restriction
|
||||
+ coming from the use of this file. (The GNU Lesser General Public
|
||||
+ License restrictions do apply in other respects; for example, they
|
||||
+ cover modification of the file, and distribution when not linked
|
||||
+ into another program.)
|
||||
+
|
||||
+ Note that people who make modified versions of this file are not
|
||||
+ obligated to grant this special exception for their modified
|
||||
+ versions; it is their choice whether to do so. The GNU Lesser
|
||||
+ General Public License gives permission to release a modified
|
||||
+ version without this exception; this exception also makes it
|
||||
+ possible to release a modified version which carries forward this
|
||||
+ exception.
|
||||
+
|
||||
+ 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. */
|
||||
+
|
||||
+/* crtn.S puts function epilogues in the .init and .fini sections
|
||||
+ corresponding to the prologues in crti.S. */
|
||||
+
|
||||
+#include <sysdep.h>
|
||||
+
|
||||
+ .section .init,"ax",@progbits
|
||||
+ addi r1, r1, 112
|
||||
+ ld r0, 16(r1)
|
||||
+ mtlr r0
|
||||
+ blr
|
||||
+
|
||||
+ .section .fini,"ax",@progbits
|
||||
+ addi r1, r1, 112
|
||||
+ ld r0, 16(r1)
|
||||
+ mtlr r0
|
||||
+ blr
|
157
glibc-2.16-ppc32-mcount.patch
Normal file
157
glibc-2.16-ppc32-mcount.patch
Normal file
@ -0,0 +1,157 @@
|
||||
From schwab@linux-m68k.org Wed, 02 May 2012 17:13:26 +0200
|
||||
Return-Path: <libc-alpha-return-28278-aj=suse.de@sourceware.org>
|
||||
Received: from imap.suse.de ([unix socket])
|
||||
by imap-int (Cyrus v2.2.12) with LMTPA;
|
||||
Wed, 02 May 2012 17:13:51 +0200
|
||||
X-Sieve: CMU Sieve 2.2
|
||||
Received: from relay2.suse.de (relay2.suse.de [149.44.160.134])
|
||||
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
|
||||
(Client CN "relay.suse.de", Issuer "CAcert Class 3 Root" (verified OK))
|
||||
by imap.suse.de (Postfix) with ESMTPS id F17483C5339B
|
||||
for <aj@imap.suse.de>; Wed, 2 May 2012 17:13:51 +0200 (CEST)
|
||||
Received: by relay2.suse.de (Postfix)
|
||||
id E8E6A18552B2; Wed, 2 May 2012 17:13:51 +0200 (CEST)
|
||||
Received: from localhost (localhost [127.0.0.1])
|
||||
by relay2.suse.de (Postfix) with ESMTP id DD16818552B4
|
||||
for <aj@suse.de>; Wed, 2 May 2012 17:13:51 +0200 (CEST)
|
||||
Received: from relay2.suse.de ([127.0.0.1])
|
||||
by localhost (localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP
|
||||
id 02496-01 for <aj@suse.de>; Wed, 2 May 2012 17:13:49 +0200 (CEST)
|
||||
Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15])
|
||||
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by relay2.suse.de (Postfix) with ESMTPS id DBBF518552B2
|
||||
for <aj@suse.de>; Wed, 2 May 2012 17:13:49 +0200 (CEST)
|
||||
Received: from sourceware.org (server1.sourceware.org [209.132.180.131])
|
||||
by mx2.suse.de (Postfix) with SMTP id 47EFA90F2E
|
||||
for <aj@suse.de>; Wed, 2 May 2012 17:13:48 +0200 (CEST)
|
||||
Comment: DKIM? See http://www.dkim.org
|
||||
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed;
|
||||
d=sourceware.org; s=default; x=1336576429; h=Comment:
|
||||
DomainKey-Signature:Received:Received:From:To:Cc:Subject:
|
||||
References:Date:In-Reply-To:Message-ID:User-Agent:MIME-Version:
|
||||
Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:
|
||||
List-Subscribe:List-Archive:List-Post:List-Help:Sender:
|
||||
Delivered-To; bh=0y95/HSsnyw1ABh4V7CAeeORO5U=; b=scLVxQl2KjsaCsA
|
||||
HlTbKP4b4DlOrh0JbNdDKP3JDs40rI/X02fBsblbArg/QrsiZO9TtF6iehIuw+Sa
|
||||
/d57G5/oKoaZwV46wT3pzH6BUuKDP+BH1ZMp+TMQRYn4C0Asq5wgY+DeEZhF41gK
|
||||
f7wsOFVFEQouRtp3QC3k/eN3yUSY=
|
||||
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
|
||||
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
|
||||
s=default; d=sourceware.org;
|
||||
h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:From:To:Cc:Subject:References:X-Yow:Date:In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To;
|
||||
b=miVyTadt4ff79bxj8elDpRttJ/wxuYnbsl6ZvownzuoJh+HWi+P3S33l/J51gL
|
||||
/k0F6BLmQ0KXBE9/F8Dxpl9sgt1gBlj440D8gh/jh5cPXeP98VBe0g8f13Rz4j/8
|
||||
DiRjxjzQbo8WPJlpbeWWdk/pYQSELCdRi45cxnxRItt7o=;
|
||||
Received: (qmail 23763 invoked by alias); 2 May 2012 15:13:43 -0000
|
||||
Received: (qmail 23753 invoked by uid 22791); 2 May 2012 15:13:41 -0000
|
||||
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0
|
||||
tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_LW
|
||||
X-Spam-Check-By: sourceware.org
|
||||
From: Andreas Schwab <schwab@linux-m68k.org>
|
||||
To: Alan Modra <amodra@gmail.com>
|
||||
Cc: libc-alpha@sourceware.org
|
||||
Subject: [PATCH v2] Fix missing _mcount@GLIBC_2.0 on powerpc32
|
||||
References: <m24nryrjy1.fsf@igel.home>
|
||||
<20120502113123.GC635@bubble.grove.modra.org>
|
||||
X-Yow: I want to read my new poem about pork brains and outer space...
|
||||
Date: Wed, 02 May 2012 17:13:26 +0200
|
||||
In-Reply-To: <20120502113123.GC635@bubble.grove.modra.org> (Alan Modra's
|
||||
message of "Wed, 2 May 2012 21:01:23 +0930")
|
||||
Message-ID: <m2ipgepqeh.fsf_-_@igel.home>
|
||||
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.96 (gnu/linux)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain
|
||||
Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm
|
||||
Precedence: bulk
|
||||
List-Id: <libc-alpha.sourceware.org>
|
||||
List-Unsubscribe: <mailto:libc-alpha-unsubscribe-aj=suse.de@sourceware.org>
|
||||
List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org>
|
||||
List-Archive: <http://sourceware.org/ml/libc-alpha/>
|
||||
List-Post: <mailto:libc-alpha@sourceware.org>
|
||||
List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs>
|
||||
Sender: libc-alpha-owner@sourceware.org
|
||||
Delivered-To: mailing list libc-alpha@sourceware.org
|
||||
X-Virus-Scanned: by amavisd-new at localhost
|
||||
X-Spam-Status: No, score=-7.599 tagged_above=-20 required=5
|
||||
tests=[BAYES_00=-2.599, MY_LINUX=-1, RCVD_IN_DNSWL_MED=-4]
|
||||
X-Spam-Score: -7.599
|
||||
X-Spam-Level:
|
||||
|
||||
[BZ #14042]
|
||||
* sysdeps/powerpc/powerpc32/ppc-mcount.S [SHARED]: Don't use PLT
|
||||
for call to __mcount_internal.
|
||||
* sysdeps/powerpc/powerpc32/Makefile (sysdep_routines)
|
||||
(shared-only-routines) [$(subdir) = gmon]: Add compat-ppc-mcount.
|
||||
* sysdeps/powerpc/powerpc32/compat-ppc-mcount.S: New file.
|
||||
---
|
||||
sysdeps/powerpc/powerpc32/Makefile | 3 ++-
|
||||
sysdeps/powerpc/powerpc32/compat-ppc-mcount.S | 11 +++++++++++
|
||||
sysdeps/powerpc/powerpc32/ppc-mcount.S | 6 +++++-
|
||||
3 files changed, 18 insertions(+), 2 deletions(-)
|
||||
create mode 100644 sysdeps/powerpc/powerpc32/compat-ppc-mcount.S
|
||||
|
||||
diff --git a/sysdeps/powerpc/powerpc32/Makefile b/sysdeps/powerpc/powerpc32/Makefile
|
||||
index aa2d0b9..64f7900 100644
|
||||
--- a/sysdeps/powerpc/powerpc32/Makefile
|
||||
+++ b/sysdeps/powerpc/powerpc32/Makefile
|
||||
@@ -6,8 +6,9 @@ sysdep-LDFLAGS += -msoft-float
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),gmon)
|
||||
-sysdep_routines += ppc-mcount
|
||||
+sysdep_routines += ppc-mcount compat-ppc-mcount
|
||||
static-only-routines += ppc-mcount
|
||||
+shared-only-routines += compat-ppc-mcount
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),misc)
|
||||
diff --git a/sysdeps/powerpc/powerpc32/compat-ppc-mcount.S b/sysdeps/powerpc/powerpc32/compat-ppc-mcount.S
|
||||
new file mode 100644
|
||||
index 0000000..2a9cb24
|
||||
--- /dev/null
|
||||
+++ b/sysdeps/powerpc/powerpc32/compat-ppc-mcount.S
|
||||
@@ -0,0 +1,11 @@
|
||||
+#include <shlib-compat.h>
|
||||
+
|
||||
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_15)
|
||||
+
|
||||
+ compat_text_section
|
||||
+# define _mcount __compat_mcount
|
||||
+# include "ppc-mcount.S"
|
||||
+# undef _mcount
|
||||
+
|
||||
+compat_symbol (libc, __compat_mcount, _mcount, GLIBC_2_0)
|
||||
+#endif
|
||||
diff --git a/sysdeps/powerpc/powerpc32/ppc-mcount.S b/sysdeps/powerpc/powerpc32/ppc-mcount.S
|
||||
index 9a3c041..911638b 100644
|
||||
--- a/sysdeps/powerpc/powerpc32/ppc-mcount.S
|
||||
+++ b/sysdeps/powerpc/powerpc32/ppc-mcount.S
|
||||
@@ -1,5 +1,5 @@
|
||||
/* PowerPC-specific implementation of profiling support.
|
||||
- Copyright (C) 1997, 1999, 2005, 2006 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1997-2012 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
|
||||
@@ -57,7 +57,11 @@ ENTRY(_mcount)
|
||||
stw r4, 44(r1)
|
||||
cfi_offset (lr, -4)
|
||||
stw r5, 8(r1)
|
||||
+#ifndef SHARED
|
||||
bl JUMPTARGET(__mcount_internal)
|
||||
+#else
|
||||
+ bl __mcount_internal@local
|
||||
+#endif
|
||||
/* Restore the registers... */
|
||||
lwz r6, 8(r1)
|
||||
lwz r0, 44(r1)
|
||||
--
|
||||
1.7.10.1
|
||||
|
||||
|
||||
--
|
||||
Andreas Schwab, schwab@linux-m68k.org
|
||||
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
|
||||
"And now for something completely different."
|
||||
|
@ -1,31 +0,0 @@
|
||||
commit 20b38e0301279a37a3f1e769843933bcc0d5f736
|
||||
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
Date: Sun Jan 8 20:13:35 2012 -0500
|
||||
|
||||
sscanf always calls realloc
|
||||
|
||||
|
||||
2012-01-05 Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
|
||||
* stdio-common/vfscanf.c (_IO_vfscanf_internal): Use alloca when
|
||||
appropriate.
|
||||
|
||||
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
|
||||
index 0e71deb..e18a6c3 100644
|
||||
--- a/stdio-common/vfscanf.c
|
||||
+++ b/stdio-common/vfscanf.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 1991-2006, 2007, 2010, 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 1991-2007, 2010, 2011, 2012 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
|
||||
@@ -274,7 +274,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
|
||||
CHAR_T *old = wp; \
|
||||
size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax \
|
||||
? UCHAR_MAX + 1 : 2 * wpmax); \
|
||||
- if (use_malloc || __libc_use_alloca (newsize)) \
|
||||
+ if (use_malloc || !__libc_use_alloca (newsize)) \
|
||||
{ \
|
||||
wp = realloc (use_malloc ? wp : NULL, newsize); \
|
||||
if (wp == NULL) \
|
@ -3,11 +3,11 @@ Wed Jun 4 14:29:07 CEST 2003 - kukuk@suse.de
|
||||
|
||||
- Make --no-archive default for localedef
|
||||
|
||||
Index: glibc-2.15/locale/programs/localedef.c
|
||||
Index: glibc-2.15.90/locale/programs/localedef.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/locale/programs/localedef.c
|
||||
+++ glibc-2.15/locale/programs/localedef.c
|
||||
@@ -82,7 +82,7 @@ const char *alias_file;
|
||||
--- glibc-2.15.90.orig/locale/programs/localedef.c
|
||||
+++ glibc-2.15.90/locale/programs/localedef.c
|
||||
@@ -81,7 +81,7 @@ const char *alias_file;
|
||||
static struct localedef_t *locales;
|
||||
|
||||
/* If true don't add locale data to archive. */
|
||||
@ -16,7 +16,7 @@ Index: glibc-2.15/locale/programs/localedef.c
|
||||
|
||||
/* If true add named locales to archive. */
|
||||
static bool add_to_archive;
|
||||
@@ -113,6 +113,7 @@ void (*argp_program_version_hook) (FILE
|
||||
@@ -112,6 +112,7 @@ void (*argp_program_version_hook) (FILE
|
||||
#define OPT_REPLACE 307
|
||||
#define OPT_DELETE_FROM_ARCHIVE 308
|
||||
#define OPT_LIST_ARCHIVE 309
|
||||
@ -24,7 +24,7 @@ Index: glibc-2.15/locale/programs/localedef.c
|
||||
|
||||
/* Definitions of arguments for argp functions. */
|
||||
static const struct argp_option options[] =
|
||||
@@ -134,6 +135,8 @@ static const struct argp_option options[
|
||||
@@ -133,6 +134,8 @@ static const struct argp_option options[
|
||||
N_("Suppress warnings and information messages") },
|
||||
{ "verbose", 'v', NULL, 0, N_("Print more messages") },
|
||||
{ NULL, 0, NULL, 0, N_("Archive control:") },
|
||||
@ -33,7 +33,7 @@ Index: glibc-2.15/locale/programs/localedef.c
|
||||
{ "no-archive", OPT_NO_ARCHIVE, NULL, 0,
|
||||
N_("Don't add new data to archive") },
|
||||
{ "add-to-archive", OPT_ADD_TO_ARCHIVE, NULL, 0,
|
||||
@@ -314,6 +317,9 @@ parse_opt (int key, char *arg, struct ar
|
||||
@@ -310,6 +313,9 @@ parse_opt (int key, char *arg, struct ar
|
||||
case OPT_PREFIX:
|
||||
output_prefix = arg;
|
||||
break;
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
* nscd/nscd.h: Move persistent storage back to /var/run/nscd
|
||||
|
||||
Index: glibc-2.15/nscd/nscd.h
|
||||
Index: glibc-2.15.90/nscd/nscd.h
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/nscd/nscd.h
|
||||
+++ glibc-2.15/nscd/nscd.h
|
||||
@@ -113,11 +113,11 @@ struct database_dyn
|
||||
--- glibc-2.15.90.orig/nscd/nscd.h
|
||||
+++ glibc-2.15.90/nscd/nscd.h
|
||||
@@ -112,11 +112,11 @@ struct database_dyn
|
||||
|
||||
|
||||
/* Paths of the file for the persistent storage. */
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: glibc-2.15/intl/loadmsgcat.c
|
||||
Index: glibc-2.15.90/intl/loadmsgcat.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/intl/loadmsgcat.c
|
||||
+++ glibc-2.15/intl/loadmsgcat.c
|
||||
@@ -806,8 +806,52 @@ _nl_load_domain (domain_file, domainbind
|
||||
--- glibc-2.15.90.orig/intl/loadmsgcat.c
|
||||
+++ glibc-2.15.90/intl/loadmsgcat.c
|
||||
@@ -805,8 +805,52 @@ _nl_load_domain (domain_file, domainbind
|
||||
if (domain_file->filename == NULL)
|
||||
goto out;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: glibc-2.15/elf/rtld.c
|
||||
Index: glibc-2.15.90/elf/rtld.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/rtld.c
|
||||
+++ glibc-2.15/elf/rtld.c
|
||||
@@ -1802,6 +1802,53 @@ ERROR: ld.so: object '%s' cannot be load
|
||||
--- glibc-2.15.90.orig/elf/rtld.c
|
||||
+++ glibc-2.15.90/elf/rtld.c
|
||||
@@ -1813,6 +1813,53 @@ ERROR: ld.so: object '%s' cannot be load
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: glibc-2.15/intl/locale.alias
|
||||
Index: glibc-2.15.90/intl/locale.alias
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/intl/locale.alias
|
||||
+++ glibc-2.15/intl/locale.alias
|
||||
@@ -57,8 +57,6 @@ korean ko_KR.eucKR
|
||||
--- glibc-2.15.90.orig/intl/locale.alias
|
||||
+++ glibc-2.15.90/intl/locale.alias
|
||||
@@ -56,8 +56,6 @@ korean ko_KR.eucKR
|
||||
korean.euc ko_KR.eucKR
|
||||
ko_KR ko_KR.eucKR
|
||||
lithuanian lt_LT.ISO-8859-13
|
||||
@ -11,10 +11,10 @@ Index: glibc-2.15/intl/locale.alias
|
||||
norwegian nb_NO.ISO-8859-1
|
||||
nynorsk nn_NO.ISO-8859-1
|
||||
polish pl_PL.ISO-8859-2
|
||||
Index: glibc-2.15/localedata/locales/no_NO
|
||||
Index: glibc-2.15.90/localedata/locales/no_NO
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/localedata/locales/no_NO
|
||||
+++ glibc-2.15.90/localedata/locales/no_NO
|
||||
@@ -0,0 +1,69 @@
|
||||
+escape_char /
|
||||
+comment_char %
|
||||
@ -85,11 +85,11 @@ Index: glibc-2.15/localedata/locales/no_NO
|
||||
+LC_ADDRESS
|
||||
+copy "nb_NO"
|
||||
+END LC_ADDRESS
|
||||
Index: glibc-2.15/localedata/SUPPORTED
|
||||
Index: glibc-2.15.90/localedata/SUPPORTED
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/localedata/SUPPORTED
|
||||
+++ glibc-2.15/localedata/SUPPORTED
|
||||
@@ -316,6 +316,8 @@ nl_NL/ISO-8859-1 \
|
||||
--- glibc-2.15.90.orig/localedata/SUPPORTED
|
||||
+++ glibc-2.15.90/localedata/SUPPORTED
|
||||
@@ -317,6 +317,8 @@ nl_NL/ISO-8859-1 \
|
||||
nl_NL@euro/ISO-8859-15 \
|
||||
nn_NO.UTF-8/UTF-8 \
|
||||
nn_NO/ISO-8859-1 \
|
||||
|
@ -2,11 +2,11 @@ This is required for too noisy rpmlint:
|
||||
glibc.i586: E: hardlink-across-partition (Badness: 10000) /usr/lib/getconf/POSIX_V7_ILP32_OFFBIG /usr/bin/getconf
|
||||
|
||||
|
||||
Index: glibc-2.15/posix/Makefile
|
||||
Index: glibc-2.15.90/posix/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/posix/Makefile
|
||||
+++ glibc-2.15/posix/Makefile
|
||||
@@ -316,8 +316,7 @@ $(inst_libexecdir)/getconf: $(inst_bindi
|
||||
--- glibc-2.15.90.orig/posix/Makefile
|
||||
+++ glibc-2.15.90/posix/Makefile
|
||||
@@ -301,8 +301,7 @@ $(inst_libexecdir)/getconf: $(inst_bindi
|
||||
$(addprefix $(..)./scripts/mkinstalldirs ,\
|
||||
$(filter-out $(wildcard $@),$@))
|
||||
while read spec; do \
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 2d80bda39073a35af4b904d27fa1511cd309b26f Mon Sep 17 00:00:00 2001
|
||||
From: Nathan Sidwell <nathan@codesourcery.com>
|
||||
Date: Fri, 6 Jan 2012 20:14:44 +0000
|
||||
Subject: [PATCH 696/712] Add ARM dependency of libmemusage.so on
|
||||
libc_nonshared.a.
|
||||
|
||||
---
|
||||
ChangeLog.arm | 6 ++++++
|
||||
sysdeps/arm/Makefile | 5 +++++
|
||||
2 files changed, 11 insertions(+), 0 deletions(-)
|
||||
|
||||
2012-01-05 Nathan Sidwell <nathan@codesourcery.com>
|
||||
Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* sysdeps/arm/Makefile (libmemusage.so): Add libc_nonshared.a
|
||||
dependency.
|
||||
|
||||
diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
|
||||
--- a/glibc-ports-2.15/sysdeps/arm/Makefile
|
||||
+++ b/glibc-ports-2.15/sysdeps/arm/Makefile
|
||||
@@ -7,3 +7,8 @@ endif
|
||||
ifeq ($(subdir),csu)
|
||||
gen-as-const-headers += tlsdesc.sym
|
||||
endif
|
||||
+
|
||||
+# to pull in __aeabi_read_tp, needed for tls
|
||||
+ifeq ($(subdir),malloc)
|
||||
+$(objpfx)libmemusage.so: $(common-objpfx)libc_nonshared.a
|
||||
+endif
|
||||
--
|
||||
1.7.6.5
|
||||
|
@ -3,27 +3,25 @@
|
||||
configure | 16 +++++++++++++++-
|
||||
configure.in | 1 +
|
||||
posix/Makefile | 2 +-
|
||||
sunrpc/Makefile | 2 +-
|
||||
timezone/Makefile | 2 +-
|
||||
6 files changed, 20 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: glibc-2.15/config.make.in
|
||||
Index: glibc-2.15.90/config.make.in
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/config.make.in
|
||||
+++ glibc-2.15/config.make.in
|
||||
@@ -100,6 +100,7 @@ add-ons = @add_ons@
|
||||
--- glibc-2.15.90.orig/config.make.in
|
||||
+++ glibc-2.15.90/config.make.in
|
||||
@@ -97,6 +97,7 @@ add-ons = @add_ons@
|
||||
add-on-subdirs = @add_on_subdirs@
|
||||
sysdeps-add-ons = @sysdeps_add_ons@
|
||||
cross-compiling = @cross_compiling@
|
||||
+compiled-binaries-can-run-on-buildhost = @compiled_binaries_can_run_on_buildhost@
|
||||
force-install = @force_install@
|
||||
link-obsolete-rpc = @link_obsolete_rpc@
|
||||
|
||||
# Build tools.
|
||||
Index: glibc-2.15/configure.in
|
||||
Index: glibc-2.15.90/configure.in
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/configure.in
|
||||
+++ glibc-2.15/configure.in
|
||||
@@ -15,6 +15,7 @@ if test $host != $build; then
|
||||
--- glibc-2.15.90.orig/configure.in
|
||||
+++ glibc-2.15.90/configure.in
|
||||
@@ -20,6 +20,7 @@ if test $host != $build; then
|
||||
AC_CHECK_PROGS(BUILD_CC, gcc cc)
|
||||
fi
|
||||
AC_SUBST(cross_compiling)
|
||||
@ -31,10 +29,10 @@ Index: glibc-2.15/configure.in
|
||||
AC_PROG_CPP
|
||||
# We need the C++ compiler only for testing.
|
||||
AC_PROG_CXX
|
||||
Index: glibc-2.15/configure
|
||||
Index: glibc-2.15.90/configure
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/configure
|
||||
+++ glibc-2.15/configure
|
||||
--- glibc-2.15.90.orig/configure
|
||||
+++ glibc-2.15.90/configure
|
||||
@@ -553,6 +553,7 @@ ac_clean_files=
|
||||
ac_config_libobj_dir=.
|
||||
LIBOBJS=
|
||||
@ -43,7 +41,7 @@ Index: glibc-2.15/configure
|
||||
subdirs=
|
||||
MFLAGS=
|
||||
MAKEFLAGS=
|
||||
@@ -706,6 +707,7 @@ CXXFLAGS
|
||||
@@ -667,6 +668,7 @@ CXXFLAGS
|
||||
CXX
|
||||
CPP
|
||||
cross_compiling
|
||||
@ -51,7 +49,7 @@ Index: glibc-2.15/configure
|
||||
BUILD_CC
|
||||
OBJEXT
|
||||
ac_ct_CC
|
||||
@@ -1250,6 +1252,13 @@ do
|
||||
@@ -1208,6 +1210,13 @@ do
|
||||
as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
|
||||
done
|
||||
|
||||
@ -65,7 +63,7 @@ Index: glibc-2.15/configure
|
||||
# There might be people who depend on the old broken behavior: `$host'
|
||||
# used to hold the argument of --host etc.
|
||||
# FIXME: To remove some day.
|
||||
@@ -1265,6 +1274,7 @@ if test "x$host_alias" != x; then
|
||||
@@ -1223,6 +1232,7 @@ if test "x$host_alias" != x; then
|
||||
If a cross compiler is detected then cross compile mode will be used" >&2
|
||||
elif test "x$build_alias" != "x$host_alias"; then
|
||||
cross_compiling=yes
|
||||
@ -73,21 +71,21 @@ Index: glibc-2.15/configure
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1450,6 +1460,9 @@ Optional Features:
|
||||
--enable-multi-arch enable single DSO with optimizations for multiple
|
||||
architectures
|
||||
--enable-nss-crypt enable libcrypt to use nss
|
||||
@@ -1407,6 +1417,9 @@ Optional Features:
|
||||
--enable-obsolete-rpc build and install the obsolete RPC code for
|
||||
link-time usage
|
||||
--enable-systemtap enable systemtap static probe points [default=no]
|
||||
+ --enable-runbinaries the compiled binaries should run on the buildhost because
|
||||
+ it happens to have a compatible cpu
|
||||
+
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
Index: glibc-2.15/posix/Makefile
|
||||
Index: glibc-2.15.90/posix/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/posix/Makefile
|
||||
+++ glibc-2.15/posix/Makefile
|
||||
@@ -320,7 +320,7 @@ $(inst_libexecdir)/getconf: $(inst_bindi
|
||||
--- glibc-2.15.90.orig/posix/Makefile
|
||||
+++ glibc-2.15.90/posix/Makefile
|
||||
@@ -305,7 +305,7 @@ $(inst_libexecdir)/getconf: $(inst_bindi
|
||||
done < $(objpfx)getconf.speclist
|
||||
|
||||
$(objpfx)getconf.speclist: $(objpfx)getconf
|
||||
@ -96,29 +94,3 @@ Index: glibc-2.15/posix/Makefile
|
||||
LC_ALL=C GETCONF_DIR=/dev/null \
|
||||
$(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
|
||||
LC_ALL=C GETCONF_DIR=/dev/null \
|
||||
Index: glibc-2.15/sunrpc/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/sunrpc/Makefile
|
||||
+++ glibc-2.15/sunrpc/Makefile
|
||||
@@ -108,7 +108,7 @@ otherlibs += $(nssobjdir)/libnss_files.a
|
||||
$(resolvobjdir)/libresolv.a
|
||||
endif
|
||||
|
||||
-ifeq (no,$(cross-compiling))
|
||||
+ifeq (yes,$(compiled-binaries-can-run-on-buildhost))
|
||||
# We can only build this library if we can run the rpcgen we build.
|
||||
headers += $(rpcsvc:%.x=rpcsvc/%.h)
|
||||
extra-libs := librpcsvc
|
||||
Index: glibc-2.15/timezone/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/timezone/Makefile
|
||||
+++ glibc-2.15/timezone/Makefile
|
||||
@@ -69,7 +69,7 @@ installed-posixrules-file := $(firstword
|
||||
$(addprefix $(inst_zonedir)/, \
|
||||
$(posixrules-file)))
|
||||
|
||||
-ifeq ($(cross-compiling),no)
|
||||
+ifeq (yes,$(compiled-binaries-can-run-on-buildhost))
|
||||
# Don't try to install the zoneinfo files since we can't run zic.
|
||||
install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
|
||||
$(zonenames:%=posix/%) \
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: glibc-2.15/bits/sched.h
|
||||
Index: glibc-2.15.90/bits/sched.h
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/bits/sched.h
|
||||
+++ glibc-2.15/bits/sched.h
|
||||
@@ -54,7 +54,7 @@ struct __sched_param
|
||||
--- glibc-2.15.90.orig/bits/sched.h
|
||||
+++ glibc-2.15.90/bits/sched.h
|
||||
@@ -53,7 +53,7 @@ struct __sched_param
|
||||
#if defined _SCHED_H && !defined __cpu_set_t_defined
|
||||
# define __cpu_set_t_defined
|
||||
/* Size definition for CPU sets. */
|
||||
@ -11,11 +11,11 @@ Index: glibc-2.15/bits/sched.h
|
||||
# define __NCPUBITS (8 * sizeof (__cpu_mask))
|
||||
|
||||
/* Type for array elements in 'cpu_set_t'. */
|
||||
Index: glibc-2.15/sysdeps/unix/sysv/linux/bits/sched.h
|
||||
Index: glibc-2.15.90/sysdeps/unix/sysv/linux/bits/sched.h
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/sysdeps/unix/sysv/linux/bits/sched.h
|
||||
+++ glibc-2.15/sysdeps/unix/sysv/linux/bits/sched.h
|
||||
@@ -113,7 +113,7 @@ struct __sched_param
|
||||
--- glibc-2.15.90.orig/sysdeps/unix/sysv/linux/bits/sched.h
|
||||
+++ glibc-2.15.90/sysdeps/unix/sysv/linux/bits/sched.h
|
||||
@@ -112,7 +112,7 @@ struct __sched_param
|
||||
#if defined _SCHED_H && !defined __cpu_set_t_defined
|
||||
# define __cpu_set_t_defined
|
||||
/* Size definition for CPU sets. */
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: glibc-2.15/elf/dl-close.c
|
||||
Index: glibc-2.15.90/elf/dl-close.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/dl-close.c
|
||||
+++ glibc-2.15/elf/dl-close.c
|
||||
@@ -180,24 +180,28 @@ _dl_close_worker (struct link_map *map)
|
||||
--- glibc-2.15.90.orig/elf/dl-close.c
|
||||
+++ glibc-2.15.90/elf/dl-close.c
|
||||
@@ -179,24 +179,28 @@ _dl_close_worker (struct link_map *map)
|
||||
/* Signal the object is still needed. */
|
||||
l->l_idx = IDX_STILL_USED;
|
||||
|
||||
@ -43,7 +43,7 @@ Index: glibc-2.15/elf/dl-close.c
|
||||
++lp;
|
||||
}
|
||||
}
|
||||
@@ -206,19 +210,25 @@ _dl_close_worker (struct link_map *map)
|
||||
@@ -205,19 +209,25 @@ _dl_close_worker (struct link_map *map)
|
||||
for (unsigned int j = 0; j < l->l_reldeps->act; ++j)
|
||||
{
|
||||
struct link_map *jmap = l->l_reldeps->list[j];
|
||||
|
@ -1,60 +0,0 @@
|
||||
Index: glibc-2.15/sysdeps/x86_64/elf/initfini.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/sysdeps/x86_64/elf/initfini.c
|
||||
+++ glibc-2.15/sysdeps/x86_64/elf/initfini.c
|
||||
@@ -44,6 +44,25 @@
|
||||
* crtn.s puts the corresponding function epilogues
|
||||
in the .init and .fini sections. */
|
||||
|
||||
+/* The unwind annotation for _fini is peculiar for good reasons:
|
||||
+ (a) We need a real function that isn't constructed separately
|
||||
+ (i.e. one which has a .size directive) in order to attach unwind
|
||||
+ info to it. Hence _fini is a wrapper around _real_fini, the
|
||||
+ former being a normal function, the latter being the first
|
||||
+ instruction of the traditional _fini.
|
||||
+ (b) We must not fiddle with the stack pointer in _real_fini,
|
||||
+ as we wouldn't be able to describe the effects in unwind info
|
||||
+ (c) some versions of GCC have no correct unwind info for
|
||||
+ __do_global_dtors_aux, meaning they can't properly restore %rbp
|
||||
+ (unwinding through it is possible but later up when we next
|
||||
+ need %rbp we can't access it anymore)
|
||||
+ Therefore we save/restore it in _fini for uses later up the call chain.
|
||||
+ But we don't make the CFA use that register (that would lead to
|
||||
+ the above problem)
|
||||
+ (d) We want an 16-aligned stack pointer at _real_fini. Because of (a)
|
||||
+ we can't align it in _real_fini, hence we do it in the caller by
|
||||
+ subtracting 8, making in 8mod16 which the call then make 0mod16
|
||||
+ again. */
|
||||
__asm__ ("\n\
|
||||
#include \"defs.h\"\n\
|
||||
\n\
|
||||
@@ -88,16 +107,28 @@ _init:\n\
|
||||
.globl _fini\n\
|
||||
.type _fini,@function\n\
|
||||
_fini:\n\
|
||||
+ .cfi_startproc\n\
|
||||
+ push %rbp\n\
|
||||
+ .cfi_def_cfa_offset 16\n\
|
||||
+ .cfi_offset 6,-16\n\
|
||||
subq $8, %rsp\n\
|
||||
+ .cfi_def_cfa_offset 24\n\
|
||||
+ call _real_fini\n\
|
||||
+ addq $8, %rsp\n\
|
||||
+ .cfi_def_cfa_offset 16\n\
|
||||
+ pop %rbp\n\
|
||||
+ ret\n\
|
||||
+ .cfi_endproc\n\
|
||||
ALIGN\n\
|
||||
END_FINI\n\
|
||||
+.size _fini, .-_fini\n\
|
||||
+_real_fini:\n\
|
||||
\n\
|
||||
/*@_fini_PROLOG_ENDS*/\n\
|
||||
call i_am_not_a_leaf@PLT\n\
|
||||
\n\
|
||||
/*@_fini_EPILOG_BEGINS*/\n\
|
||||
.section .fini\n\
|
||||
- addq $8, %rsp\n\
|
||||
ret\n\
|
||||
END_FINI\n\
|
||||
\n\
|
183
glibc-fix-check-abi.patch
Normal file
183
glibc-fix-check-abi.patch
Normal file
@ -0,0 +1,183 @@
|
||||
|
||||
Index: glibc-2.-15.90/sysdeps/unix/sysv/linux/i386/nptl/libcrypt.abilist
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/sysdeps/unix/sysv/linux/i386/nptl/libcrypt.abilist
|
||||
+++ glibc-2.15.90/sysdeps/unix/sysv/linux/i386/nptl/libcrypt.abilist
|
||||
@@ -1,9 +1,21 @@
|
||||
GLIBC_2.0
|
||||
GLIBC_2.0 A
|
||||
crypt F
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
crypt_r F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
encrypt F
|
||||
encrypt_r F
|
||||
fcrypt F
|
||||
setkey F
|
||||
setkey_r F
|
||||
+OW_CRYPT_1.0
|
||||
+ OW_CRYPT_1.0 A
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
Index: glibc-2.15.90/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libcrypt.abilist
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libcrypt.abilist
|
||||
+++ glibc-2.15.90/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libcrypt.abilist
|
||||
@@ -1,9 +1,21 @@
|
||||
GLIBC_2.0
|
||||
GLIBC_2.0 A
|
||||
crypt F
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
crypt_r F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
encrypt F
|
||||
encrypt_r F
|
||||
fcrypt F
|
||||
setkey F
|
||||
setkey_r F
|
||||
+OW_CRYPT_1.0
|
||||
+ OW_CRYPT_1.0 A
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
Index: glibc-2.15.90/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libcrypt.abilist
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libcrypt.abilist
|
||||
+++ glibc-2.15.90/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libcrypt.abilist
|
||||
@@ -1,9 +1,21 @@
|
||||
GLIBC_2.3
|
||||
GLIBC_2.3 A
|
||||
crypt F
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
crypt_r F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
encrypt F
|
||||
encrypt_r F
|
||||
fcrypt F
|
||||
setkey F
|
||||
setkey_r F
|
||||
+OW_CRYPT_1.0
|
||||
+ OW_CRYPT_1.0 A
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
Index: glibc-2.15.90/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libcrypt.abilist
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libcrypt.abilist
|
||||
+++ glibc-2.15.90/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libcrypt.abilist
|
||||
@@ -1,9 +1,21 @@
|
||||
GLIBC_2.0
|
||||
GLIBC_2.0 A
|
||||
crypt F
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
crypt_r F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
encrypt F
|
||||
encrypt_r F
|
||||
fcrypt F
|
||||
setkey F
|
||||
setkey_r F
|
||||
+OW_CRYPT_1.0
|
||||
+ OW_CRYPT_1.0 A
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
Index: glibc-2.15.90/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libcrypt.abilist
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libcrypt.abilist
|
||||
+++ glibc-2.15.90/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libcrypt.abilist
|
||||
@@ -1,9 +1,21 @@
|
||||
GLIBC_2.2
|
||||
GLIBC_2.2 A
|
||||
crypt F
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
crypt_r F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
encrypt F
|
||||
encrypt_r F
|
||||
fcrypt F
|
||||
setkey F
|
||||
setkey_r F
|
||||
+OW_CRYPT_1.0
|
||||
+ OW_CRYPT_1.0 A
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
Index: glibc-2.15.90/sysdeps/unix/sysv/linux/x86_64/64/nptl/libcrypt.abilist
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/sysdeps/unix/sysv/linux/x86_64/64/nptl/libcrypt.abilist
|
||||
+++ glibc-2.15.90/sysdeps/unix/sysv/linux/x86_64/64/nptl/libcrypt.abilist
|
||||
@@ -1,9 +1,21 @@
|
||||
GLIBC_2.2.5
|
||||
GLIBC_2.2.5 A
|
||||
crypt F
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
crypt_r F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
encrypt F
|
||||
encrypt_r F
|
||||
fcrypt F
|
||||
setkey F
|
||||
setkey_r F
|
||||
+OW_CRYPT_1.0
|
||||
+ OW_CRYPT_1.0 A
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
Index: glibc-2.15.90/glibc-ports-2.16/sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/glibc-ports-2.16/sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist
|
||||
+++ glibc-2.15.90/glibc-ports-2.16/sysdeps/unix/sysv/linux/arm/nptl/libcrypt.abilist
|
||||
@@ -1,9 +1,21 @@
|
||||
GLIBC_2.4
|
||||
GLIBC_2.4 A
|
||||
crypt F
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
crypt_r F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
||||
encrypt F
|
||||
encrypt_r F
|
||||
fcrypt F
|
||||
setkey F
|
||||
setkey_r F
|
||||
+OW_CRYPT_1.0
|
||||
+ OW_CRYPT_1.0 A
|
||||
+ crypt_gensalt F
|
||||
+ crypt_gensalt_ra F
|
||||
+ crypt_gensalt_rn F
|
||||
+ crypt_ra F
|
||||
+ crypt_rn F
|
@ -7,11 +7,11 @@ Remapping ::1 to 127.0.0.1 is bogus when /etc/hosts is correct.
|
||||
bnc #684534, #606980
|
||||
http://sources.redhat.com/bugzilla/show_bug.cgi?id=4980
|
||||
|
||||
Index: glibc-2.11.3/nss/nss_files/files-hosts.c
|
||||
Index: glibc-2.15.90/nss/nss_files/files-hosts.c
|
||||
===================================================================
|
||||
--- glibc-2.11.3.orig/nss/nss_files/files-hosts.c 2011-05-27 15:08:23.000000000 +0200
|
||||
+++ glibc-2.11.3/nss/nss_files/files-hosts.c 2011-07-20 17:15:26.000000000 +0200
|
||||
@@ -69,11 +69,6 @@ LINE_PARSER
|
||||
--- glibc-2.15.90.orig/nss/nss_files/files-hosts.c
|
||||
+++ glibc-2.15.90/nss/nss_files/files-hosts.c
|
||||
@@ -68,11 +68,6 @@ LINE_PARSER
|
||||
{
|
||||
if (IN6_IS_ADDR_V4MAPPED (entdata->host_addr))
|
||||
memcpy (entdata->host_addr, entdata->host_addr + 12, INADDRSZ);
|
||||
|
@ -1,149 +0,0 @@
|
||||
commit 675155e9084e060fd0e1e637b843f14e82898aa5
|
||||
Author: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Wed Sep 22 12:06:30 2010 +0200
|
||||
|
||||
Fix memory leak on init/fini dependency list
|
||||
|
||||
2010-09-27 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* include/link.h (struct link_map): Add l_free_initfini.
|
||||
* elf/dl-deps.c (_dl_map_object_deps): Set it when assigning
|
||||
l_initfini.
|
||||
* elf/rtld.c (dl_main): Clear it on all objects loaded on startup.
|
||||
* elf/dl-libc.c (free_mem): Free l_initfini if l_free_initfini is
|
||||
set.
|
||||
|
||||
Index: glibc-2.15/elf/dl-close.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/dl-close.c
|
||||
+++ glibc-2.15/elf/dl-close.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Close a shared object opened by `_dl_open'.
|
||||
- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1996-2007, 2009, 2010 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
|
||||
@@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
|
||||
if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
|
||||
|| dl_close_state != not_pending)
|
||||
{
|
||||
- if (map->l_direct_opencount == 0)
|
||||
- {
|
||||
- if (map->l_type == lt_loaded)
|
||||
- dl_close_state = rerun;
|
||||
- else if (map->l_type == lt_library)
|
||||
- {
|
||||
- struct link_map **oldp = map->l_initfini;
|
||||
- map->l_initfini = map->l_orig_initfini;
|
||||
- _dl_scope_free (oldp);
|
||||
- }
|
||||
- }
|
||||
+ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
|
||||
+ dl_close_state = rerun;
|
||||
|
||||
/* There are still references to this object. Do nothing more. */
|
||||
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
|
||||
Index: glibc-2.15/elf/dl-libc.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/dl-libc.c
|
||||
+++ glibc-2.15/elf/dl-libc.c
|
||||
@@ -270,13 +270,13 @@ libc_freeres_fn (free_mem)
|
||||
|
||||
for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
|
||||
{
|
||||
- /* Remove all additional names added to the objects. */
|
||||
for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
|
||||
{
|
||||
struct libname_list *lnp = l->l_libname->next;
|
||||
|
||||
l->l_libname->next = NULL;
|
||||
|
||||
+ /* Remove all additional names added to the objects. */
|
||||
while (lnp != NULL)
|
||||
{
|
||||
struct libname_list *old = lnp;
|
||||
@@ -284,6 +284,10 @@ libc_freeres_fn (free_mem)
|
||||
if (! old->dont_free)
|
||||
free (old);
|
||||
}
|
||||
+
|
||||
+ /* Free the initfini dependency list. */
|
||||
+ if (l->l_free_initfini)
|
||||
+ free (l->l_initfini);
|
||||
}
|
||||
|
||||
if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
|
||||
Index: glibc-2.15/elf/rtld.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/rtld.c
|
||||
+++ glibc-2.15/elf/rtld.c
|
||||
@@ -2323,6 +2323,7 @@ ERROR: ld.so: object '%s' cannot be load
|
||||
lnp->dont_free = 1;
|
||||
lnp = lnp->next;
|
||||
}
|
||||
+ l->l_free_initfini = 0;
|
||||
|
||||
if (l != &GL(dl_rtld_map))
|
||||
_dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
|
||||
Index: glibc-2.15/include/link.h
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/include/link.h
|
||||
+++ glibc-2.15/include/link.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Data structure for communication from the run-time dynamic linker for
|
||||
loaded ELF shared objects.
|
||||
- Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1995-2006, 2007, 2009, 2010 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
|
||||
@@ -192,6 +192,9 @@ struct link_map
|
||||
during LD_TRACE_PRELINKING=1
|
||||
contains any DT_SYMBOLIC
|
||||
libraries. */
|
||||
+ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
|
||||
+ freed, ie. not allocated with
|
||||
+ the dummy malloc in ld.so. */
|
||||
|
||||
/* Collected information about own RPATH directories. */
|
||||
struct r_search_path_struct l_rpath_dirs;
|
||||
@@ -240,9 +243,6 @@ struct link_map
|
||||
|
||||
/* List of object in order of the init and fini calls. */
|
||||
struct link_map **l_initfini;
|
||||
- /* The init and fini list generated at startup, saved when the
|
||||
- object is also loaded dynamically. */
|
||||
- struct link_map **l_orig_initfini;
|
||||
|
||||
/* List of the dependencies introduced through symbol binding. */
|
||||
struct link_map_reldeps
|
||||
Index: glibc-2.15/elf/dl-deps.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/dl-deps.c
|
||||
+++ glibc-2.15/elf/dl-deps.c
|
||||
@@ -489,6 +489,7 @@ _dl_map_object_deps (struct link_map *ma
|
||||
nneeded * sizeof needed[0]);
|
||||
atomic_write_barrier ();
|
||||
l->l_initfini = l_initfini;
|
||||
+ l->l_free_initfini = 1;
|
||||
}
|
||||
|
||||
/* If we have no auxiliary objects just go on to the next map. */
|
||||
@@ -689,6 +690,7 @@ Filters not supported with LD_TRACE_PREL
|
||||
l_initfini[nlist] = NULL;
|
||||
atomic_write_barrier ();
|
||||
map->l_initfini = l_initfini;
|
||||
+ map->l_free_initfini = 1;
|
||||
if (l_reldeps != NULL)
|
||||
{
|
||||
atomic_write_barrier ();
|
||||
@@ -697,7 +699,7 @@ Filters not supported with LD_TRACE_PREL
|
||||
_dl_scope_free (old_l_reldeps);
|
||||
}
|
||||
if (old_l_initfini != NULL)
|
||||
- map->l_orig_initfini = old_l_initfini;
|
||||
+ _dl_scope_free (old_l_initfini);
|
||||
|
||||
if (errno_reason)
|
||||
_dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
|
@ -1,278 +0,0 @@
|
||||
commit 6ee65ed6ddbf04402fad0bec6aa9c73b9d982ae4
|
||||
Author: Ulrich Drepper <drepper@gmail.com>
|
||||
Date: Fri Jan 27 15:05:19 2012 -0500
|
||||
|
||||
Sort objects before relocations
|
||||
|
||||
2012-01-27 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
[BZ #13618]
|
||||
* elf/dl-open.c (dl_open_worker): Sort objects by dependency before
|
||||
relocation.
|
||||
* Makeconfig (libm): Define.
|
||||
* elf/Makefile: Add rules to build and run tst-relsort1.
|
||||
* elf/tst-relsort1.c: New file.
|
||||
* elf/tst-relsort1mod1.c: New file.
|
||||
* elf/tst-relsort1mod2.c: New file.
|
||||
|
||||
Index: glibc-2.15/Makeconfig
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/Makeconfig
|
||||
+++ glibc-2.15/Makeconfig
|
||||
@@ -950,6 +950,12 @@ libdl =
|
||||
endif
|
||||
endif
|
||||
|
||||
+ifeq ($(build-shared),yes)
|
||||
+libm = $(common-objpfx)math/libm.so$(libm.so-version)
|
||||
+else
|
||||
+libm = $(common-objpfx)math/libm.a
|
||||
+endif
|
||||
+
|
||||
# These are the subdirectories containing the library source. The order
|
||||
# is more or less arbitrary. The sorting step will take care of the
|
||||
# dependencies.
|
||||
Index: glibc-2.15/elf/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/Makefile
|
||||
+++ glibc-2.15/elf/Makefile
|
||||
@@ -124,7 +124,8 @@ distribute := rtld-Rules \
|
||||
tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
|
||||
tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
|
||||
tst-initorder.c \
|
||||
- tst-initorder2.c
|
||||
+ tst-initorder2.c \
|
||||
+ tst-relsort1.c tst-relsort1mod1.c tst-relsort1mod2.c
|
||||
|
||||
CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
|
||||
@@ -230,7 +231,7 @@ tests += loadtest restest1 preloadtest l
|
||||
tst-audit1 tst-audit2 \
|
||||
tst-stackguard1 tst-addr1 tst-thrlock \
|
||||
tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
|
||||
- tst-initorder tst-initorder2
|
||||
+ tst-initorder tst-initorder2 tst-relsort1
|
||||
# reldep9
|
||||
test-srcs = tst-pathopt
|
||||
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
|
||||
@@ -293,7 +294,9 @@ modules-names = testobj1 testobj2 testob
|
||||
tst-initordera1 tst-initorderb1 \
|
||||
tst-initordera2 tst-initorderb2 \
|
||||
tst-initordera3 tst-initordera4 \
|
||||
- tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
|
||||
+ tst-initorder2a tst-initorder2b tst-initorder2c \
|
||||
+ tst-initorder2d \
|
||||
+ tst-relsort1mod1 tst-relsort1mod2
|
||||
ifeq (yes,$(have-initfini-array))
|
||||
modules-names += tst-array2dep tst-array5dep
|
||||
endif
|
||||
@@ -1198,3 +1201,9 @@ CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS)
|
||||
CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
|
||||
CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
|
||||
endif
|
||||
+
|
||||
+$(objpfx)tst-relsort1: $(libdl)
|
||||
+$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
|
||||
+$(objpfx)tst-relsort1mod2.so: $(libm)
|
||||
+$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
|
||||
+ $(objpfx)tst-relsort1mod2.so
|
||||
Index: glibc-2.15/elf/dl-open.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/dl-open.c
|
||||
+++ glibc-2.15/elf/dl-open.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Load a shared object at runtime, relocate it, and run its initializer.
|
||||
- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1996-2007, 2009, 2010, 2011, 2012 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
|
||||
@@ -302,45 +302,109 @@ dl_open_worker (void *a)
|
||||
if (GLRO(dl_lazy))
|
||||
reloc_mode |= mode & RTLD_LAZY;
|
||||
|
||||
- /* Relocate the objects loaded. We do this in reverse order so that copy
|
||||
- relocs of earlier objects overwrite the data written by later objects. */
|
||||
-
|
||||
+ /* Sort the objects by dependency for the relocation process. This
|
||||
+ allows IFUNC relocations to work and it also means copy
|
||||
+ relocation of dependencies are if necessary overwritten. */
|
||||
+ size_t nmaps = 0;
|
||||
struct link_map *l = new;
|
||||
- while (l->l_next)
|
||||
- l = l->l_next;
|
||||
- while (1)
|
||||
+ do
|
||||
+ {
|
||||
+ if (! l->l_real->l_relocated)
|
||||
+ ++nmaps;
|
||||
+ l = l->l_next;
|
||||
+ }
|
||||
+ while (l != NULL);
|
||||
+ struct link_map *maps[nmaps];
|
||||
+ nmaps = 0;
|
||||
+ l = new;
|
||||
+ do
|
||||
{
|
||||
if (! l->l_real->l_relocated)
|
||||
+ maps[nmaps++] = l;
|
||||
+ l = l->l_next;
|
||||
+ }
|
||||
+ while (l != NULL);
|
||||
+ if (nmaps > 1)
|
||||
+ {
|
||||
+ char seen[nmaps];
|
||||
+ memset (seen, '\0', nmaps);
|
||||
+ size_t i = 0;
|
||||
+ while (1)
|
||||
{
|
||||
-#ifdef SHARED
|
||||
- if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
|
||||
+ ++seen[i];
|
||||
+ struct link_map *thisp = maps[i];
|
||||
+
|
||||
+ /* Find the last object in the list for which the current one is
|
||||
+ a dependency and move the current object behind the object
|
||||
+ with the dependency. */
|
||||
+ size_t k = nmaps - 1;
|
||||
+ while (k > i)
|
||||
{
|
||||
- /* If this here is the shared object which we want to profile
|
||||
- make sure the profile is started. We can find out whether
|
||||
- this is necessary or not by observing the `_dl_profile_map'
|
||||
- variable. If was NULL but is not NULL afterwars we must
|
||||
- start the profiling. */
|
||||
- struct link_map *old_profile_map = GL(dl_profile_map);
|
||||
-
|
||||
- _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
|
||||
-
|
||||
- if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
|
||||
- {
|
||||
- /* We must prepare the profiling. */
|
||||
- _dl_start_profile ();
|
||||
-
|
||||
- /* Prevent unloading the object. */
|
||||
- GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
|
||||
- }
|
||||
+ struct link_map **runp = maps[k]->l_initfini;
|
||||
+ if (runp != NULL)
|
||||
+ /* Look through the dependencies of the object. */
|
||||
+ while (*runp != NULL)
|
||||
+ if (__builtin_expect (*runp++ == thisp, 0))
|
||||
+ {
|
||||
+ /* Move the current object to the back past the last
|
||||
+ object with it as the dependency. */
|
||||
+ memmove (&maps[i], &maps[i + 1],
|
||||
+ (k - i) * sizeof (maps[0]));
|
||||
+ maps[k] = thisp;
|
||||
+
|
||||
+ if (seen[i + 1] > 1)
|
||||
+ {
|
||||
+ ++i;
|
||||
+ goto next_clear;
|
||||
+ }
|
||||
+
|
||||
+ char this_seen = seen[i];
|
||||
+ memmove (&seen[i], &seen[i + 1],
|
||||
+ (k - i) * sizeof (seen[0]));
|
||||
+ seen[k] = this_seen;
|
||||
+
|
||||
+ goto next;
|
||||
+ }
|
||||
+
|
||||
+ --k;
|
||||
}
|
||||
- else
|
||||
-#endif
|
||||
- _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
|
||||
+
|
||||
+ if (++i == nmaps)
|
||||
+ break;
|
||||
+ next_clear:
|
||||
+ memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
|
||||
+ next:;
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ for (size_t i = nmaps; i-- > 0; )
|
||||
+ {
|
||||
+ l = maps[i];
|
||||
+
|
||||
+#ifdef SHARED
|
||||
+ if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
|
||||
+ {
|
||||
+ /* If this here is the shared object which we want to profile
|
||||
+ make sure the profile is started. We can find out whether
|
||||
+ this is necessary or not by observing the `_dl_profile_map'
|
||||
+ variable. If it was NULL but is not NULL afterwars we must
|
||||
+ start the profiling. */
|
||||
+ struct link_map *old_profile_map = GL(dl_profile_map);
|
||||
|
||||
- if (l == new)
|
||||
- break;
|
||||
- l = l->l_prev;
|
||||
+ _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
|
||||
+
|
||||
+ if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
|
||||
+ {
|
||||
+ /* We must prepare the profiling. */
|
||||
+ _dl_start_profile ();
|
||||
+
|
||||
+ /* Prevent unloading the object. */
|
||||
+ GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
+ _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
|
||||
}
|
||||
|
||||
/* If the file is not loaded now as a dependency, add the search
|
||||
Index: glibc-2.15/elf/tst-relsort1.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/elf/tst-relsort1.c
|
||||
@@ -0,0 +1,19 @@
|
||||
+#include <dlfcn.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+do_test ()
|
||||
+{
|
||||
+ const char lib[] = "$ORIGIN/tst-relsort1mod1.so";
|
||||
+ void *h = dlopen (lib, RTLD_NOW);
|
||||
+ if (h == NULL)
|
||||
+ {
|
||||
+ puts (dlerror ());
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#define TEST_FUNCTION do_test ()
|
||||
+#include "../test-skeleton.c"
|
||||
Index: glibc-2.15/elf/tst-relsort1mod1.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/elf/tst-relsort1mod1.c
|
||||
@@ -0,0 +1,7 @@
|
||||
+extern int foo (double);
|
||||
+
|
||||
+int
|
||||
+bar (void)
|
||||
+{
|
||||
+ return foo (1.2);
|
||||
+}
|
||||
Index: glibc-2.15/elf/tst-relsort1mod2.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/elf/tst-relsort1mod2.c
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <math.h>
|
||||
+
|
||||
+int
|
||||
+foo (double d)
|
||||
+{
|
||||
+ return floor (d) != 0.0;
|
||||
+}
|
@ -1,39 +0,0 @@
|
||||
initfini.c is compiled to assembly and further processed and split,
|
||||
we can't have unwind tables therein.
|
||||
|
||||
Index: glibc-2.15/csu/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/csu/Makefile
|
||||
+++ glibc-2.15/csu/Makefile
|
||||
@@ -93,7 +93,7 @@ omit-deps += $(crtstuff)
|
||||
$(crtstuff:%=$(objpfx)%.o): %.o: %.S $(objpfx)defs.h
|
||||
$(compile.S) -g0 $(ASFLAGS-.os) -o $@
|
||||
|
||||
-CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
|
||||
+CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
|
||||
vpath initfini.c $(sysdirs)
|
||||
|
||||
Index: glibc-2.15/nptl/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/nptl/Makefile
|
||||
+++ glibc-2.15/nptl/Makefile
|
||||
@@ -342,7 +342,7 @@ endif
|
||||
extra-objs += $(crti-objs) $(crtn-objs)
|
||||
omit-deps += crti crtn
|
||||
|
||||
-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
|
||||
+CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||
endif
|
||||
|
||||
CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
|
||||
Index: glibc-2.15/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile
|
||||
+++ glibc-2.15/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile
|
||||
@@ -1,4 +1,4 @@
|
||||
ifeq ($(subdir),nptl)
|
||||
CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions \
|
||||
- -fno-asynchronous-unwind-tables $(fno-unit-at-a-time)
|
||||
+ -fno-unwind-tables -fno-asynchronous-unwind-tables $(fno-unit-at-a-time)
|
||||
endif
|
@ -1,8 +1,8 @@
|
||||
Index: glibc-2.15/nscd/nscd_stat.c
|
||||
Index: glibc-2.15.90/nscd/nscd_stat.c
|
||||
===================================================================
|
||||
--- glibc-2.15/nscd/nscd_stat.c.orig 2010-01-18 18:01:41.000000000 +0100
|
||||
+++ glibc-2.15/nscd/nscd_stat.c 2010-02-14 15:02:41.000000000 +0100
|
||||
@@ -37,8 +37,13 @@
|
||||
--- glibc-2.15.90.orig/nscd/nscd_stat.c
|
||||
+++ glibc-2.15.90/nscd/nscd_stat.c
|
||||
@@ -36,8 +36,13 @@
|
||||
#endif /* HAVE_SELINUX */
|
||||
|
||||
|
||||
@ -17,12 +17,11 @@ Index: glibc-2.15/nscd/nscd_stat.c
|
||||
|
||||
/* Statistic data for one database. */
|
||||
struct dbstat
|
||||
|
||||
Index: glibc-2.15/csu/Makefile
|
||||
Index: glibc-2.15.90/csu/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/csu/Makefile
|
||||
+++ glibc-2.15/csu/Makefile
|
||||
@@ -234,8 +234,8 @@ $(objpfx)version-info.h: $(common-objpfx
|
||||
--- glibc-2.15.90.orig/csu/Makefile
|
||||
+++ glibc-2.15.90/csu/Makefile
|
||||
@@ -171,8 +171,8 @@ $(objpfx)version-info.h: $(common-objpfx
|
||||
if [ -z "$$os" ]; then \
|
||||
os=Linux; \
|
||||
fi; \
|
||||
|
@ -1,48 +0,0 @@
|
||||
diff -rup c/nscd/nscd_gethst_r.c d/nscd/nscd_gethst_r.c
|
||||
--- c/nscd/nscd_gethst_r.c 2012-01-01 05:16:32.000000000 -0700
|
||||
+++ d/nscd/nscd_gethst_r.c 2012-03-28 10:45:51.546600822 -0600
|
||||
@@ -101,9 +101,27 @@ libc_freeres_fn (hst_map_free)
|
||||
uint32_t
|
||||
__nscd_get_nl_timestamp (void)
|
||||
{
|
||||
+ uint32_t retval;
|
||||
if (__nss_not_use_nscd_hosts != 0)
|
||||
return 0;
|
||||
|
||||
+ int cnt = 0;
|
||||
+ /* __nscd_get_mapping can change hst_map_handle.mapped to NO_MAPPING.
|
||||
+ However, __nscd_get_mapping assumes the prior value was not NO_MAPPING.
|
||||
+ Thus we have to acquire the lock to prevent this thread from changing
|
||||
+ hst_map_handle.mapped to NO_MAPPING while another thread is inside
|
||||
+ __nscd_get_mapping. */
|
||||
+ while (__builtin_expect
|
||||
+ (atomic_compare_and_exchange_val_acq (&__hst_map_handle.lock,
|
||||
+ 1, 0) != 0, 0))
|
||||
+ {
|
||||
+ // XXX Best number of rounds?
|
||||
+ if (__builtin_expect (++cnt > 5, 0))
|
||||
+ return 0;
|
||||
+
|
||||
+ atomic_delay ();
|
||||
+ }
|
||||
+
|
||||
struct mapped_database *map = __hst_map_handle.mapped;
|
||||
|
||||
if (map == NULL
|
||||
@@ -113,9 +131,14 @@ __nscd_get_nl_timestamp (void)
|
||||
map = __nscd_get_mapping (GETFDHST, "hosts", &__hst_map_handle.mapped);
|
||||
|
||||
if (map == NO_MAPPING)
|
||||
- return 0;
|
||||
+ retval = 0;
|
||||
+ else
|
||||
+ retval = map->head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP];
|
||||
+
|
||||
+ /* Release the lock. */
|
||||
+ __hst_map_handle.lock = 0;
|
||||
|
||||
- return map->head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP];
|
||||
+ return retval;
|
||||
}
|
||||
|
||||
|
@ -1,98 +0,0 @@
|
||||
diff -rup a/nscd/nscd.c b/nscd/nscd.c
|
||||
--- a/nscd/nscd.c 2012-01-01 05:16:32.000000000 -0700
|
||||
+++ b/nscd/nscd.c 2012-02-03 13:07:50.509740586 -0700
|
||||
@@ -72,7 +72,12 @@ thread_info_t thread_info;
|
||||
int do_shutdown;
|
||||
int disabled_passwd;
|
||||
int disabled_group;
|
||||
-int go_background = 1;
|
||||
+
|
||||
+/* Default is to daemonize. Set to 1 to run in foreground in
|
||||
+ debugging mode, or negative to run in foreground but otherwise
|
||||
+ behave like a daemon, i.e., detach from terminal and use
|
||||
+ syslog. */
|
||||
+static int run_in_foreground = 0;
|
||||
|
||||
static const char *conffile = _PATH_NSCDCONF;
|
||||
|
||||
@@ -104,6 +109,8 @@ static const struct argp_option options[
|
||||
N_("Read configuration data from NAME") },
|
||||
{ "debug", 'd', NULL, 0,
|
||||
N_("Do not fork and display messages on the current tty") },
|
||||
+ { "foreground", 'F', NULL, 0,
|
||||
+ N_("Do not fork, but otherwise behave like a deamon") },
|
||||
{ "nthreads", 't', N_("NUMBER"), 0, N_("Start NUMBER threads") },
|
||||
{ "shutdown", 'K', NULL, 0, N_("Shut the server down") },
|
||||
{ "statistics", 'g', NULL, 0, N_("Print current configuration statistics") },
|
||||
@@ -174,16 +181,22 @@ main (int argc, char **argv)
|
||||
/* Determine page size. */
|
||||
pagesize_m1 = getpagesize () - 1;
|
||||
|
||||
- /* Behave like a daemon. */
|
||||
- if (go_background)
|
||||
+ if (run_in_foreground <= 0)
|
||||
{
|
||||
int i;
|
||||
+ pid_t pid;
|
||||
|
||||
- pid_t pid = fork ();
|
||||
- if (pid == -1)
|
||||
- error (EXIT_FAILURE, errno, _("cannot fork"));
|
||||
- if (pid != 0)
|
||||
- exit (0);
|
||||
+ /* Behave like a daemon. */
|
||||
+ if (!run_in_foreground)
|
||||
+ {
|
||||
+ pid = fork ();
|
||||
+ if (pid == -1)
|
||||
+ error (EXIT_FAILURE, errno, _("cannot fork"));
|
||||
+ if (pid != 0)
|
||||
+ exit (0);
|
||||
+ }
|
||||
+ else
|
||||
+ fprintf (stderr, _("further output sent to syslog\n"));
|
||||
|
||||
int nullfd = open (_PATH_DEVNULL, O_RDWR);
|
||||
if (nullfd != -1)
|
||||
@@ -234,11 +247,14 @@ main (int argc, char **argv)
|
||||
for (i = min_close_fd; i < getdtablesize (); i++)
|
||||
close (i);
|
||||
|
||||
- pid = fork ();
|
||||
- if (pid == -1)
|
||||
- error (EXIT_FAILURE, errno, _("cannot fork"));
|
||||
- if (pid != 0)
|
||||
- exit (0);
|
||||
+ if (!run_in_foreground)
|
||||
+ {
|
||||
+ pid = fork ();
|
||||
+ if (pid == -1)
|
||||
+ error (EXIT_FAILURE, errno, _("cannot fork"));
|
||||
+ if (pid != 0)
|
||||
+ exit (0);
|
||||
+ }
|
||||
|
||||
setsid ();
|
||||
|
||||
@@ -260,7 +276,7 @@ main (int argc, char **argv)
|
||||
signal (SIGTSTP, SIG_IGN);
|
||||
}
|
||||
else
|
||||
- /* In foreground mode we are not paranoid. */
|
||||
+ /* In debug mode we are not paranoid. */
|
||||
paranoia = 0;
|
||||
|
||||
signal (SIGINT, termination_handler);
|
||||
@@ -309,7 +325,11 @@ parse_opt (int key, char *arg, struct ar
|
||||
{
|
||||
case 'd':
|
||||
++debug_level;
|
||||
- go_background = 0;
|
||||
+ run_in_foreground = 1;
|
||||
+ break;
|
||||
+
|
||||
+ case 'F':
|
||||
+ run_in_foreground = -1;
|
||||
break;
|
||||
|
||||
case 'f':
|
@ -1,11 +1,11 @@
|
||||
See:
|
||||
http://sourceware.org/bugzilla/show_bug.cgi?id=11928
|
||||
|
||||
Index: glibc-2.15/nscd/aicache.c
|
||||
Index: glibc-2.15.90/nscd/aicache.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/nscd/aicache.c
|
||||
+++ glibc-2.15/nscd/aicache.c
|
||||
@@ -26,6 +26,7 @@
|
||||
--- glibc-2.15.90.orig/nscd/aicache.c
|
||||
+++ glibc-2.15.90/nscd/aicache.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
@ -13,7 +13,7 @@ Index: glibc-2.15/nscd/aicache.c
|
||||
|
||||
#include "dbg_log.h"
|
||||
#include "nscd.h"
|
||||
@@ -103,6 +104,8 @@ addhstaiX (struct database_dyn *db, int
|
||||
@@ -102,6 +103,8 @@ addhstaiX (struct database_dyn *db, int
|
||||
|
||||
if (__res_maybe_init (&_res, 0) == -1)
|
||||
no_more = 1;
|
||||
@ -22,11 +22,11 @@ Index: glibc-2.15/nscd/aicache.c
|
||||
|
||||
/* If we are looking for both IPv4 and IPv6 address we don't want
|
||||
the lookup functions to automatically promote IPv4 addresses to
|
||||
Index: glibc-2.15/resolv/res_hconf.c
|
||||
Index: glibc-2.15.90/resolv/res_hconf.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/resolv/res_hconf.c
|
||||
+++ glibc-2.15/resolv/res_hconf.c
|
||||
@@ -83,7 +83,9 @@ static const struct cmd
|
||||
--- glibc-2.15.90.orig/resolv/res_hconf.c
|
||||
+++ glibc-2.15.90/resolv/res_hconf.c
|
||||
@@ -82,7 +82,9 @@ static const struct cmd
|
||||
};
|
||||
|
||||
/* Structure containing the state. */
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7b7f32252c98467893d3352a57955943e6fd0e7ea606ef4765fe4985df9d7d08
|
||||
size 549483
|
3
glibc-ports-2.16-a20c2b3c87ae.tar.xz
Normal file
3
glibc-ports-2.16-a20c2b3c87ae.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4afc22409c53c5d55a86fc8e5fc1f029dd7d42d3d19d61b64c98e4110f52c829
|
||||
size 946700
|
@ -1,40 +0,0 @@
|
||||
commit d1f741e9120669883c6fc0f6fc53b9d35e5015ce
|
||||
Author: Will Schmidt <will_schmidt@vnet.ibm.com>
|
||||
Date: Sun Jan 8 21:32:57 2012 -0500
|
||||
|
||||
Fix typo in Linux/PPC32 getcontext
|
||||
|
||||
2011-01-05 Will Schmidt <will_schmidt@vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Fix a
|
||||
typo #include statement.
|
||||
|
||||
|
||||
* include/sys/cdefs.h: Define __attribute_alloc_size.
|
||||
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
|
||||
index dad1074..46f3dea 100644
|
||||
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
|
||||
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Save current context.
|
||||
- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2002, 2004, 2005, 2012 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
|
||||
@@ -54,12 +54,12 @@ versioned_symbol (libc, __getcontext, getcontext, GLIBC_2_3_4)
|
||||
|
||||
#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
|
||||
compat_text_section
|
||||
-
|
||||
-# undef __CONTEXT_FUNC_NAME
|
||||
+
|
||||
+# undef __CONTEXT_FUNC_NAME
|
||||
# define __CONTEXT_FUNC_NAME __novec_getcontext
|
||||
# undef __CONTEXT_ENABLE_VRS
|
||||
|
||||
-# clude "getcontext-common.S"
|
||||
+# include "getcontext-common.S"
|
||||
|
||||
.previous
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: glibc-2.15/resolv/res_hconf.c
|
||||
Index: glibc-2.15.90/resolv/res_hconf.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/resolv/res_hconf.c
|
||||
+++ glibc-2.15/resolv/res_hconf.c
|
||||
@@ -242,9 +242,12 @@ parse_line (const char *fname, int line_
|
||||
--- glibc-2.15.90.orig/resolv/res_hconf.c
|
||||
+++ glibc-2.15.90/resolv/res_hconf.c
|
||||
@@ -241,9 +241,12 @@ parse_line (const char *fname, int line_
|
||||
if (c == NULL)
|
||||
{
|
||||
char *buf;
|
||||
|
@ -17,17 +17,11 @@ git diff -R 'fcabc0f8b185f9e0a9289720be5ede6c39b3bf21^!'
|
||||
2011-05-12 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
[BZ #12511]
|
||||
diff --git b/libio/Makefile a/libio/Makefile
|
||||
index ec30904..83b9458 100644
|
||||
--- b/libio/Makefile
|
||||
+++ a/libio/Makefile
|
||||
@@ -1,4 +1,4 @@
|
||||
-# Copyright (C) 1995-2004,2006-2009,2011 Free Software Foundation, Inc.
|
||||
+# Copyright (C) 1995-2004,2006,2007,2008,2009 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
|
||||
@@ -58,7 +58,7 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \
|
||||
Index: glibc-2.15.90/libio/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/libio/Makefile
|
||||
+++ glibc-2.15.90/libio/Makefile
|
||||
@@ -57,7 +57,7 @@ tests = tst_swprintf tst_wprintf tst_sws
|
||||
tst-memstream1 tst-memstream2 \
|
||||
tst-wmemstream1 tst-wmemstream2 \
|
||||
bug-memstream1 bug-wmemstream1 \
|
||||
@ -36,10 +30,9 @@ index ec30904..83b9458 100644
|
||||
test-srcs = test-freopen
|
||||
|
||||
all: # Make this the default target; it will be defined in Rules.
|
||||
diff --git b/libio/bug-fclose1.c a/libio/bug-fclose1.c
|
||||
deleted file mode 100644
|
||||
index f1e09f5..0000000
|
||||
--- b/libio/bug-fclose1.c
|
||||
Index: glibc-2.15.90/libio/bug-fclose1.c
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/libio/bug-fclose1.c
|
||||
+++ /dev/null
|
||||
@@ -1,132 +0,0 @@
|
||||
-// BZ #12724
|
||||
@ -174,11 +167,11 @@ index f1e09f5..0000000
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
Index: glibc-2.14/libio/fileops.c
|
||||
Index: glibc-2.15.90/libio/fileops.c
|
||||
===================================================================
|
||||
--- glibc-2.14.orig/libio/fileops.c
|
||||
+++ glibc-2.14/libio/fileops.c
|
||||
@@ -160,28 +160,20 @@ int
|
||||
--- glibc-2.15.90.orig/libio/fileops.c
|
||||
+++ glibc-2.15.90/libio/fileops.c
|
||||
@@ -155,21 +155,13 @@ int
|
||||
_IO_new_file_close_it (fp)
|
||||
_IO_FILE *fp;
|
||||
{
|
||||
@ -203,10 +196,3 @@ Index: glibc-2.14/libio/fileops.c
|
||||
else
|
||||
write_status = 0;
|
||||
|
||||
INTUSE(_IO_unsave_markers) (fp);
|
||||
|
||||
int close_status = ((fp->_flags2 & _IO_FLAGS2_NOCLOSE) == 0
|
||||
? _IO_SYSCLOSE (fp) : 0);
|
||||
|
||||
/* Free buffer. */
|
||||
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 10f62770e115d9f16a67a974f79fa9b100cf827b Mon Sep 17 00:00:00 2001
|
||||
From: "David S. Miller" <davem@davemloft.net>
|
||||
Date: Tue, 13 Mar 2012 00:45:34 -0700
|
||||
Subject: [PATCH] Use correct implementation for dl-fxstatat64 on sparc64.
|
||||
|
||||
* sysdeps/unix/sysv/linux/sparc/sparc64/dl-fxstatat64.c: New file.
|
||||
|
||||
|
||||
[rediffed for glibc-2.15 for openSUSE]
|
||||
---
|
||||
sysdeps/unix/sysv/linux/sparc/sparc64/dl-fxstatat64.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
create mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/dl-fxstatat64.c
|
||||
|
||||
Index: glibc-2.15/sysdeps/unix/sysv/linux/sparc/sparc64/dl-fxstatat64.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/sysdeps/unix/sysv/linux/sparc/sparc64/dl-fxstatat64.c
|
||||
@@ -0,0 +1,6 @@
|
||||
+/* In this implementation we do not really care whether the call fails
|
||||
+ because of missing kernel support since we do not even call the
|
||||
+ function in this case. */
|
||||
+#undef __ASSUME_ATFCTS
|
||||
+#define __ASSUME_ATFCTS 1
|
||||
+#include "fxstatat.c"
|
@ -1,8 +1,8 @@
|
||||
Index: glibc-2.15/elf/Makefile
|
||||
Index: glibc-2.15.90/elf/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/Makefile
|
||||
+++ glibc-2.15/elf/Makefile
|
||||
@@ -135,6 +135,7 @@ include ../Makeconfig
|
||||
--- glibc-2.15.90.orig/elf/Makefile
|
||||
+++ glibc-2.15.90/elf/Makefile
|
||||
@@ -50,6 +50,7 @@ include ../Makeconfig
|
||||
ifeq ($(unwind-find-fde),yes)
|
||||
routines += unwind-dw2-fde-glibc
|
||||
shared-only-routines += unwind-dw2-fde-glibc
|
||||
@ -10,3 +10,16 @@ Index: glibc-2.15/elf/Makefile
|
||||
endif
|
||||
|
||||
before-compile = $(objpfx)trusted-dirs.h
|
||||
Index: glibc-2.15.90/sunrpc/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/sunrpc/Makefile
|
||||
+++ glibc-2.15.90/sunrpc/Makefile
|
||||
@@ -145,6 +145,8 @@ CFLAGS-key_call.c = -fexceptions
|
||||
CFLAGS-pmap_rmt.c = -fexceptions
|
||||
CFLAGS-clnt_perr.c = -fexceptions
|
||||
CFLAGS-openchild.c = -fexceptions
|
||||
+CFLAGS-clnt_tcp.c = -fno-strict-aliasing
|
||||
+CFLAGS-clnt_unix.c = -fno-strict-aliasing
|
||||
|
||||
sunrpc-CPPFLAGS = -D_RPC_THREAD_SAFE_
|
||||
CPPFLAGS += $(sunrpc-CPPFLAGS)
|
||||
|
@ -1,29 +0,0 @@
|
||||
Index: glibc-2.15/elf/dl-open.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/elf/dl-open.c
|
||||
+++ glibc-2.15/elf/dl-open.c
|
||||
@@ -326,7 +326,7 @@ dl_open_worker (void *a)
|
||||
while (l != NULL);
|
||||
if (nmaps > 1)
|
||||
{
|
||||
- char seen[nmaps];
|
||||
+ uint16_t seen[nmaps];
|
||||
memset (seen, '\0', nmaps);
|
||||
size_t i = 0;
|
||||
while (1)
|
||||
@@ -352,13 +352,13 @@ dl_open_worker (void *a)
|
||||
(k - i) * sizeof (maps[0]));
|
||||
maps[k] = thisp;
|
||||
|
||||
- if (seen[i + 1] > 1)
|
||||
+ if (seen[i + 1] > nmaps - i)
|
||||
{
|
||||
++i;
|
||||
goto next_clear;
|
||||
}
|
||||
|
||||
- char this_seen = seen[i];
|
||||
+ uint16_t this_seen = seen[i];
|
||||
memmove (&seen[i], &seen[i + 1],
|
||||
(k - i) * sizeof (seen[0]));
|
||||
seen[k] = this_seen;
|
@ -1,10 +1,10 @@
|
||||
test-lfs runs for ever on ReiserFS. Let's disable it completely.
|
||||
|
||||
Index: glibc-2.15/io/Makefile
|
||||
Index: glibc-2.15.90/io/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/io/Makefile
|
||||
+++ glibc-2.15/io/Makefile
|
||||
@@ -64,7 +64,7 @@ static-only-routines = stat fstat lstat
|
||||
--- glibc-2.15.90.orig/io/Makefile
|
||||
+++ glibc-2.15.90/io/Makefile
|
||||
@@ -63,7 +63,7 @@ static-only-routines = stat fstat lstat
|
||||
|
||||
others := pwd
|
||||
test-srcs := ftwtest
|
||||
|
@ -1,26 +0,0 @@
|
||||
2009-11-06 Petr Baudis <pasky@suse.cz>
|
||||
|
||||
* include/sys/uio.h: Change __vector to __iovec to avoid clash
|
||||
with altivec.
|
||||
|
||||
diff --git a/include/sys/uio.h b/include/sys/uio.h
|
||||
index 8c2b016..bfaec59 100644
|
||||
--- a/include/sys/uio.h
|
||||
+++ b/include/sys/uio.h
|
||||
@@ -2,12 +2,12 @@
|
||||
#include <misc/sys/uio.h>
|
||||
|
||||
/* Now define the internal interfaces. */
|
||||
-extern ssize_t __readv (int __fd, __const struct iovec *__vector,
|
||||
+extern ssize_t __readv (int __fd, __const struct iovec *__iovec,
|
||||
int __count);
|
||||
-extern ssize_t __libc_readv (int __fd, __const struct iovec *__vector,
|
||||
+extern ssize_t __libc_readv (int __fd, __const struct iovec *__iovec,
|
||||
int __count);
|
||||
-extern ssize_t __writev (int __fd, __const struct iovec *__vector,
|
||||
+extern ssize_t __writev (int __fd, __const struct iovec *__iovec,
|
||||
int __count);
|
||||
-extern ssize_t __libc_writev (int __fd, __const struct iovec *__vector,
|
||||
+extern ssize_t __libc_writev (int __fd, __const struct iovec *__iovec,
|
||||
int __count);
|
||||
#endif
|
@ -1,8 +1,8 @@
|
||||
Index: glibc-2.15/csu/version.c
|
||||
Index: glibc-2.15.90/csu/version.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/csu/version.c
|
||||
+++ glibc-2.15/csu/version.c
|
||||
@@ -25,11 +25,12 @@ static const char __libc_release[] = REL
|
||||
--- glibc-2.15.90.orig/csu/version.c
|
||||
+++ glibc-2.15.90/csu/version.c
|
||||
@@ -24,11 +24,12 @@ static const char __libc_release[] = REL
|
||||
static const char __libc_version[] = VERSION;
|
||||
|
||||
static const char banner[] =
|
||||
|
@ -1,3 +1,42 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 28 07:10:49 UTC 2012 - aj@suse.de
|
||||
|
||||
- Update to da1f43196321, major changes:
|
||||
* Fix strtod integer/buffer overflow (bso#14459).
|
||||
* Fix segmentation fault in strncasecmp for i686.
|
||||
* Translation updates
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 24 08:39:30 UTC 2012 - aj@suse.de
|
||||
|
||||
- Fix _mcount on PowerPC32.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 21 07:31:10 UTC 2012 - aj@suse.de
|
||||
|
||||
- Enable parallel build for some more cases.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 20 17:00:00 UTC 2012 - aj@suse.de
|
||||
|
||||
- Update to glibc 2.16 release.
|
||||
* update version numbers
|
||||
* Documentation updates
|
||||
- Update manpages from Debian, includes new man pages for
|
||||
locale.1, mtrace.1, gencat.1 iconvconfig.8.
|
||||
- Remove getent.1 man page, use the one from man-pages.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 20 16:42:42 UTC 2012 - aj@suse.de
|
||||
|
||||
- Update to glibc 2.16 trunk (git id 416bf844227d):
|
||||
* Fix check-abi for arm
|
||||
* Refresh some patches.
|
||||
* remove merged patches
|
||||
* mainly lots of bug fixes
|
||||
* Support for ISO C11
|
||||
* full details in NEWS file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 20 15:06:49 UTC 2012 - jengelh@inai.de
|
||||
|
||||
|
@ -16,3 +16,10 @@ addFilter("glibc\..*: permissions-missing-requires")
|
||||
addFilter("shlib-policy-missing-suffix")
|
||||
# The dynamic linker and libnsl call exit - this is fine
|
||||
addFilter(".*shared-lib-calls-exit.*")
|
||||
# The man-pages package contains a number of man pages for programs that come
|
||||
# with glibc, therefore do not warn about them
|
||||
addFilter(".*glibc.*no-manual-page-for-binary getent")
|
||||
addFilter(".*glibc.*no-manual-page-for-binary iconv")
|
||||
addFilter(".*glibc.*no-manual-page-for-binary ldd")
|
||||
addFilter(".*glibc.*no-manual-page-for-binary ldconfig")
|
||||
addFilter(".*nscd.*no-manual-page-for-binary nscd")
|
||||
|
168
glibc.spec
168
glibc.spec
@ -29,11 +29,14 @@ Name: glibc
|
||||
Summary: Standard Shared Libraries (from the GNU C Library)
|
||||
License: LGPL-2.1+ and SUSE-LGPL-2.1+-with-GCC-exception and GPL-2.0+
|
||||
Group: System/Libraries
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: libstdc++-devel
|
||||
BuildRequires: makeinfo
|
||||
BuildRequires: xz
|
||||
%if %{with glibc_run_testsuite}
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libstdc++-devel
|
||||
%endif
|
||||
|
||||
%define _filter_GLIBC_PRIVATE 1
|
||||
%if %_target_cpu == "i686"
|
||||
@ -116,17 +119,17 @@ Obsoletes: glibc-32bit
|
||||
Provides: ld-linux.so.3
|
||||
Provides: ld-linux.so.3(GLIBC_2.4)
|
||||
%endif
|
||||
Version: 2.15
|
||||
Version: 2.16
|
||||
Release: 0
|
||||
%define glibc_major_version 2.15
|
||||
%define git_id 725b8ee08aff
|
||||
%define glibc_ports_ver 2.15
|
||||
%define ports_git_id 8a70b2dcabbf
|
||||
%define glibc_major_version 2.16
|
||||
%define git_id da1f43196321
|
||||
%define glibc_ports_ver 2.16
|
||||
%define ports_git_id a20c2b3c87ae
|
||||
Url: http://www.gnu.org/software/libc/libc.html
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Source: glibc-%{version}-%{git_id}.tar.xz
|
||||
%define glibc_ports_dir glibc-ports-%{glibc_ports_ver}
|
||||
Source2: glibc-ports-%{glibc_ports_ver}-%{ports_git_id}.tar.bz2
|
||||
Source2: glibc-ports-%{glibc_ports_ver}-%{ports_git_id}.tar.xz
|
||||
Source3: noversion.tar.bz2
|
||||
Source4: manpages.tar.bz2
|
||||
Source5: nsswitch.conf
|
||||
@ -204,12 +207,10 @@ Patch16: glibc-2.8-getconf.diff
|
||||
Patch17: glibc-compiled-binaries.diff
|
||||
# PATCH-FEATURE-SLE increase cpusetsize to 4096, needs to be kept for compatibility kukuk@suse.de (XXX: Review)
|
||||
Patch18: glibc-cpusetsize.diff
|
||||
# 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
|
||||
# According the the Debian bug report, this is fixed in valgrind now, so disable
|
||||
# this patch.
|
||||
Patch19: x86-cpuid-level2.patch
|
||||
# PATCH-FIX-OPENSUSE Allow ARM binaries with old linker path to run - aj@suse.de
|
||||
Patch20: glibc-armhf-compat.patch
|
||||
# PATCH-FIX-OPENSUSE Fix check abi for crypt additions
|
||||
Patch21: glibc-fix-check-abi.patch
|
||||
|
||||
### Locale related patches
|
||||
# PATCH-FIX-OPENSUSE Add additional locales
|
||||
@ -222,8 +223,6 @@ Patch102: glibc-2.4.90-no_NO.diff
|
||||
Patch103: glibc-2.4-china.diff
|
||||
|
||||
### Broken patches in glibc that we revert for now:
|
||||
# PATCH-FEATURE-OPENSUSE Revert sunrpc removal aj@suse.de
|
||||
Patch200: glibc2.14-revert-sunrpc-removal.patch
|
||||
# PATCH-FIX-OPENSUSE revert seeking on fclose for now bnc#711829 matz@suse.de
|
||||
Patch201: glibc-revert-fseek-on-fclose.diff
|
||||
# PATCH-FIX-OPENSUSE revert pthread-cond-wait change since it causes hangs - aj@suse.de
|
||||
@ -246,8 +245,6 @@ Patch305: glibc-nscd-hconf.diff
|
||||
Patch306: glibc-fix-double-loopback.diff
|
||||
|
||||
### Misc patches
|
||||
# PATCH-FIX-OPENSUSE don't use unwind tables for initfini (solved differently for glibc 2.16)
|
||||
Patch400: glibc-no-unwind-tables.diff
|
||||
# FIX-OPENSUSE compile some files with -fno-strict-aliasing
|
||||
Patch401: glibc-strict-aliasing.diff
|
||||
# PATCH-FIX-OPENSUSE avoid false positive warning that triggers brp postcheck fail
|
||||
@ -256,64 +253,20 @@ Patch402: nscd-avoid-gcc-warning.diff
|
||||
###
|
||||
# Patches from upstream
|
||||
###
|
||||
# PATCH-FIX-UPSTREAM Fix missing declarations
|
||||
Patch1000: glibc-2.15-nss_db-declarations.patch
|
||||
# PATCH-FIX-UPSTREAM Fix realloc usage in vfscanf - aj@suse.de
|
||||
Patch1001: glibc-2.16-scanf.patch
|
||||
# PATCH-FIX-UPSTREAM Fix getcontext on 32-bit powerpc - aj@suse.de
|
||||
Patch1002: glibc-ppc-getcontext.patch
|
||||
# PATCH-FIX-UPSTREAM Fix ifunc relocations (bnc#740109) - aj@suse.de
|
||||
Patch1003: glibc-ifunc-2.16.patch
|
||||
# PATCH-FIX-UPSTREAM vfprintf: validate nargs and maybe allocate from heap bnc#747768 - aj@suse.de
|
||||
Patch1005: vfprintf-nargs.patch
|
||||
# PATCH-FIX-UPSTREAM Add Arm dependency on libmemusage - bwiedemann@suse.de
|
||||
Patch1006: glibc-add-arm-dependency-libmemusage.patch
|
||||
# PATCH-FIX-UPSTREAM Fix check abi - aj@suse.de
|
||||
Patch1007: glibc-2.16-fix-check-abi.patch
|
||||
# PATCH-FIX-UPSTREAM - Allow compilation with -altivec aj@suse.de
|
||||
Patch1009: glibc-uio-cell.diff
|
||||
# PATCH-FIX-UPSTREAM - do not use initfini anymore
|
||||
Patch1010: glibc-2.16-powerpc-initfini.patch
|
||||
# PATCH-FIX-UPSTREAM Use new common path for ARMv7 hardware float linker - aj@suse.de
|
||||
Patch1011: armhf-ld-so.patch
|
||||
# PATCH-FIX-UPSTREAM Add --foreground for nscd (from Fedora) - aj@suse.de
|
||||
Patch1012: glibc-nscd-foreground.patch
|
||||
# PATCH-FIX-UPSTREAM Fix confstr use of local buffer outside its extent
|
||||
Patch1013: confstr.patch
|
||||
# PATCH-FIX-UPSTREAM Bogus FPE on underflow for exp(double) bnc#767956 - aj@suse.de
|
||||
Patch1015: glibc-2.16-expf-underflow-exception.patch
|
||||
# PATCH-FIX-UPSTREAM Fix gb18030 code bnc#54080
|
||||
Patch1016: gb18030.patch.bz2
|
||||
# PATCH-FIX-UPSTREAM Fix crash when nscd is not running (bso#135949) - aj@suse.de
|
||||
Patch1017: glibc-nscd-crash-bso13594.patch
|
||||
# PATCH-FIX-UPSTREAM malloc(0);free gets optimized out
|
||||
Patch1018: glibc-2.16-mcheck.patch
|
||||
# PATCH-FIX-UPSTREAM Correct first_weekday for tr_TR (glibc bug#13223) - aj@suse.de
|
||||
Patch1019: tr_TR.patch
|
||||
# PATCH-FIX-UPSTREAM implement *context on ARM - agraf@suse.de
|
||||
Patch1020: glibc-2.16-arm-context.patch
|
||||
# PATCH-FIX-UPSTREAM Fix dns buffer - aj@suse.de
|
||||
Patch1021: glibc-2.16-getaddrinfo-buffer.patch
|
||||
# PATCH-FIX_UPSTREAM Use correct implementation of fxstatat64 on sparc64
|
||||
Patch1022: glibc-sparc-fxstatat64.diff
|
||||
|
||||
###
|
||||
# Patches awaiting upstream approval
|
||||
###
|
||||
# PATCH-FIX-UPSTREAM Fix assertion error in res_query.c (bso#13013)
|
||||
Patch2001: glibc-resolv-assert.diff
|
||||
# PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140, bso#13579 matz@suse.de
|
||||
Patch2004: glibc-fix-noload.patch
|
||||
# PATCH-FIX-OPENSUSE bnc#657627, http://sourceware.org/bugzilla/show_bug.cgi?id=12561
|
||||
Patch2005: glibc-elf-localscope.diff
|
||||
# PATCH-FIX-OPENSUSE Fix cycle detection - aj@suse.de
|
||||
Patch2006: cycle-detection.patch
|
||||
# PATCH-FIX-OPENSUSE Fix cycle detection 2 (from Fedora) - aj@suse.de
|
||||
Patch2007: glibc-sw13618-2.patch
|
||||
# PATCH-FIX-OPENSUSE Fix LD_PROFILE (glibc bug#13818) - aj@suse.de
|
||||
Patch2008: glibc-ld-profile.patch
|
||||
# PATCH-FIX-OPENSUSE _fini does not have proper unwinding information on x86_64 bso#11610
|
||||
Patch2009: glibc-fini-unwind.diff
|
||||
# PATCH-FIX-OPENSUSE Fix mcount on PowerPC32 - aj@suse.de
|
||||
Patch2009: glibc-2.16-ppc32-mcount.patch
|
||||
|
||||
%description
|
||||
The GNU C Library provides the most important standard libraries used
|
||||
@ -522,17 +475,15 @@ rm nscd/s-stamp
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
# This should be fixed in valgrind now
|
||||
#%patch19 -p1
|
||||
%patch21 -p1
|
||||
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
|
||||
%patch200 -p1
|
||||
%patch201 -p1
|
||||
%patch202 -p1 -R
|
||||
%patch202 -p1
|
||||
|
||||
%patch300 -p1
|
||||
%patch301 -p1
|
||||
@ -542,43 +493,18 @@ rm nscd/s-stamp
|
||||
%patch305 -p1
|
||||
%patch306 -p1
|
||||
|
||||
%patch400 -p1
|
||||
%patch401 -p1
|
||||
%patch402 -p1
|
||||
|
||||
%patch1000 -p1
|
||||
%patch1001 -p1
|
||||
%patch1002 -p1
|
||||
%patch1003 -p1
|
||||
%patch1005 -p1
|
||||
%patch1006 -p1
|
||||
%patch1007 -p1
|
||||
%patch1009 -p1
|
||||
%ifarch ppc ppc64
|
||||
# to support further architectures, some more changes are needed
|
||||
%patch1010 -p1
|
||||
%endif
|
||||
%ifarch armv7l armv7hl
|
||||
%patch1011 -p1
|
||||
%patch20 -p1
|
||||
%endif
|
||||
%patch1012 -p1
|
||||
%patch1013 -p1
|
||||
%patch1015 -p1
|
||||
%patch1016 -p1
|
||||
%patch1017 -p1
|
||||
%patch1018 -p1
|
||||
%patch1019 -p1
|
||||
%patch1020 -p1
|
||||
%patch1021 -p1
|
||||
%patch -P 1022 -p1
|
||||
|
||||
%patch2001 -p1
|
||||
%patch2004 -p1
|
||||
# XXX: Does not pass testsuite, still there's no better solution yet
|
||||
# XXX: Test elf/tst-dlmodcount.out fails with patch2005
|
||||
%patch2005 -p1
|
||||
%patch2006 -p1
|
||||
%patch2007 -p1
|
||||
# XXX Disable, it breaks the testsuite, test elf/tst-audit2
|
||||
# %patch2008 -p1
|
||||
%patch2009 -p1
|
||||
@ -644,7 +570,6 @@ BuildFlags="$(echo $BuildFlags | sed -e 's#-fstack-protector##' -e 's#-ffortify=
|
||||
BuildCC="%__cc"
|
||||
BuildCCplus="%__cxx"
|
||||
add_ons=",libidn"
|
||||
PARALLEL="%{?_smp_mflags}"
|
||||
#
|
||||
#now overwrite for some architectures
|
||||
#
|
||||
@ -691,8 +616,10 @@ PARALLEL="%{?_smp_mflags}"
|
||||
%ifarch %ix86
|
||||
add_ons=$add_ons,noversion
|
||||
%endif
|
||||
%ifarch %arm mipsel
|
||||
%ifarch %arm mipsel ia64
|
||||
add_ons=$add_ons,%glibc_ports_dir
|
||||
%endif
|
||||
%ifarch %arm mipsel
|
||||
# fails to build otherwise - need to recheck and fix
|
||||
%define enable_stackguard_randomization 0
|
||||
%endif
|
||||
@ -718,7 +645,8 @@ configure_and_build_glibc() {
|
||||
profile="--enable-profile"
|
||||
fi
|
||||
%endif
|
||||
CFLAGS="$conf_cflags" CC="$BuildCC" CXX="$BuildCCplus" ../configure \
|
||||
CFLAGS="$conf_cflags" BUILD_CFLAGS="$conf_cflags" \
|
||||
CC="$BuildCC" CXX="$BuildCCplus" ../configure \
|
||||
--prefix=%{_prefix} \
|
||||
--libexecdir=%{_libdir} --infodir=%{_infodir} \
|
||||
--enable-add-ons=nptl$addons \
|
||||
@ -735,10 +663,11 @@ configure_and_build_glibc() {
|
||||
--without-fp \
|
||||
%endif
|
||||
--enable-kernel=%{enablekernel} \
|
||||
--enable-bind-now
|
||||
--enable-bind-now --enable-obsolete-rpc
|
||||
# Should we enable --enable-systemtap?
|
||||
# Should we enable --enable-nss-crypt to build use freebl3 hash functions?
|
||||
# explicitly set CFLAGS to use the full CFLAGS (not the reduced one for configure)
|
||||
make $PARALLEL CFLAGS="$cflags"
|
||||
make %{?_smp_mflags} CFLAGS="$cflags" BUILD_CFLAGS="$cflags"
|
||||
cd ..
|
||||
}
|
||||
|
||||
@ -829,27 +758,24 @@ export SUSE_ASNEEDED=0
|
||||
%if %{run_testsuite}
|
||||
# Increase timeout
|
||||
export TIMEOUTFACTOR=16
|
||||
%ifarch %arm alpha %ix86 ppc ppc64 ia64 s390 s390x x86_64
|
||||
%ifarch alpha %ix86 ppc ppc64 ia64 s390 s390x x86_64
|
||||
# ix86: tst-cputimer? fails
|
||||
# ia64: tst-timer4 fails
|
||||
# ppc64: tst-pselect, ftwtest fails
|
||||
# s390,s390x: tst-timer* fails
|
||||
make -C cc-base -k check || echo make check failed
|
||||
make %{?_smp_mflags} -C cc-base -k check || echo make check failed
|
||||
%else
|
||||
make -C cc-base check
|
||||
make %{?_smp_mflags} -C cc-base check
|
||||
%endif
|
||||
%endif
|
||||
# File was not created as empty file by patch 101
|
||||
touch abilist/libnss_dns.abilist abilist/libnss_db.abilist
|
||||
# This has to pass on x86 and x86-64
|
||||
# This has to pass on all platforms!
|
||||
# Exceptions:
|
||||
# ARM: There's no check-abi data for arm at all
|
||||
# s390, s390x, ppc, ppc64: Outdated check-abi data
|
||||
%ifnarch %arm s390 s390x ppc ppc64
|
||||
make -C cc-base check-abi
|
||||
# PowerPC32: _mcount
|
||||
#%ifnarch ppc
|
||||
make %{?_smp_mflags} -C cc-base check-abi
|
||||
#%else
|
||||
#make -C cc-base check-abi || echo check-abi failed
|
||||
%endif
|
||||
#make %{?_smp_mflags} -C cc-base check-abi || echo check-abi failed
|
||||
#%endif
|
||||
|
||||
#######################################################################
|
||||
###
|
||||
@ -874,8 +800,7 @@ mkdir -p %{buildroot}%{_libdir}/gconv
|
||||
touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache
|
||||
|
||||
# Install base glibc
|
||||
# Do not install in parallel, timezone Makefile will fail
|
||||
make install_root=%{buildroot} install -C cc-base
|
||||
make %{?_smp_mflags} install_root=%{buildroot} install -C cc-base
|
||||
|
||||
install_optimized_variant() {
|
||||
local dirname="$1"; shift
|
||||
@ -940,9 +865,16 @@ install_optimized_variant nosegneg i686/nosegneg "../.."
|
||||
|
||||
# Install locales
|
||||
%if %{build_locales}
|
||||
# Do not install locales in parallel!
|
||||
# XXX Do not install locales in parallel!
|
||||
cd cc-base
|
||||
make install_root=%{buildroot} install-locales -C ../localedata objdir=`pwd`
|
||||
# localedef creates hardlinks to other locales if possible
|
||||
# this will not work if we generate them in parallel.
|
||||
# thus we need to run fdupes on /usr/lib/locale/
|
||||
# Still, on my system this is a speed advantage:
|
||||
# non-parallel build for install-locales: 9:34mins
|
||||
# parallel build with fdupes: 7:08mins
|
||||
make %{?_smp_mflags} install_root=%{buildroot} localedata/install-locales
|
||||
%fdupes %{buildroot}/usr/lib/locale
|
||||
cd ..
|
||||
%endif
|
||||
# Create file list for glibc-locale package
|
||||
@ -981,7 +913,7 @@ install -m 0644 resolv/mapv4v6hostent.h %{buildroot}%{_includedir}/resolv/
|
||||
|
||||
%if %{build_html}
|
||||
mkdir -p %{buildroot}%{_datadir}/doc/glibc
|
||||
cp -p manual/libc/*.html %{buildroot}%{_datadir}/doc/glibc
|
||||
cp -p cc-base/manual/libc/*.html %{buildroot}%{_datadir}/doc/glibc
|
||||
%endif
|
||||
|
||||
cd manpages; make install_root=%{buildroot} install; cd ..
|
||||
@ -1126,10 +1058,12 @@ exit 0
|
||||
%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
|
||||
%verify(not md5 size mtime) %config(noreplace) /etc/gai.conf
|
||||
%config(noreplace) /etc/default/nss
|
||||
%doc %{_mandir}/man1/gencat.1.gz
|
||||
%doc %{_mandir}/man1/getconf.1.gz
|
||||
%doc %{_mandir}/man1/getent.1.gz
|
||||
%doc %{_mandir}/man1/locale.1.gz
|
||||
%doc %{_mandir}/man1/localedef.1.gz
|
||||
%doc %{_mandir}/man5/*
|
||||
%doc %{_mandir}/man8/iconvconfig.8.gz
|
||||
/%{_lib}/ld-%{glibc_major_version}.so
|
||||
|
||||
# Each architecture has a different name for the dynamic linker:
|
||||
@ -1252,7 +1186,6 @@ exit 0
|
||||
%{_libdir}/getconf/*
|
||||
%{_sbindir}/glibc_post_upgrade
|
||||
%{_sbindir}/iconvconfig
|
||||
#%dir /var/db
|
||||
|
||||
%ifarch %ix86
|
||||
|
||||
@ -1274,7 +1207,7 @@ exit 0
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING COPYING.LIB FAQ NEWS NOTES README BUGS CONFORMANCE
|
||||
%doc COPYING COPYING.LIB NEWS README BUGS CONFORMANCE
|
||||
%doc %{_mandir}/man1/catchsegv.1.gz
|
||||
%doc %{_mandir}/man1/rpcgen.1.gz
|
||||
%doc %{_mandir}/man1/sprof.1.gz
|
||||
@ -1375,6 +1308,7 @@ exit 0
|
||||
%{_bindir}/sotruss
|
||||
%{_bindir}/xtrace
|
||||
%{_bindir}/pldd
|
||||
%doc %{_mandir}/man1/mtrace.1.gz
|
||||
|
||||
%files extra
|
||||
%defattr(-,root,root)
|
||||
|
@ -1,63 +0,0 @@
|
||||
Index: glibc-2.15/nis/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/nis/Makefile
|
||||
+++ glibc-2.15/nis/Makefile
|
||||
@@ -23,9 +23,9 @@ subdir := nis
|
||||
|
||||
aux := nis_hash
|
||||
|
||||
+headers := $(wildcard rpcsvc/*.[hx])
|
||||
distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
|
||||
- nisplus-parser.h nis_xdr.h nss \
|
||||
- $(wildcard rpcsvc/*.[hx])
|
||||
+ nisplus-parser.h nis_xdr.h nss
|
||||
|
||||
# These are the databases available for the nis (and perhaps later nisplus)
|
||||
# service. This must be a superset of the services in nss.
|
||||
Index: glibc-2.15/NEWS
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/NEWS
|
||||
+++ glibc-2.15/NEWS
|
||||
@@ -84,16 +84,6 @@ Version 2.14
|
||||
12724, 12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792,
|
||||
12795, 12811, 12813, 12814, 12841
|
||||
|
||||
-* The RPC implementation in libc is obsoleted. Old programs keep working
|
||||
- but new programs cannot be linked with the routines in libc anymore.
|
||||
- Programs in need of RPC functionality must be linked against TI-RPC.
|
||||
- The TI-RPC implementation is IPv6 enabled and there are other benefits.
|
||||
-
|
||||
- Visible changes of this change include (obviously) the inability to link
|
||||
- programs using RPC functions without referencing the TI-RPC library and the
|
||||
- removal of the RPC headers from the glibc headers.
|
||||
- Implemented by Ulrich Drepper.
|
||||
-
|
||||
* New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at,
|
||||
syncfs, setns, sendmmsg
|
||||
|
||||
Index: glibc-2.15/include/libc-symbols.h
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/include/libc-symbols.h
|
||||
+++ glibc-2.15/include/libc-symbols.h
|
||||
@@ -626,7 +626,7 @@ for linking")
|
||||
# define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
|
||||
# define libc_hidden_def(name) hidden_def (name)
|
||||
# define libc_hidden_weak(name) hidden_weak (name)
|
||||
-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
|
||||
+# define libc_hidden_nolink(name, version) hidden_def (name)
|
||||
# define libc_hidden_ver(local, name) hidden_ver (local, name)
|
||||
# define libc_hidden_data_def(name) hidden_data_def (name)
|
||||
# define libc_hidden_data_weak(name) hidden_data_weak (name)
|
||||
Index: glibc-2.15/sunrpc/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/sunrpc/Makefile
|
||||
+++ glibc-2.15/sunrpc/Makefile
|
||||
@@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth
|
||||
des_crypt.h)
|
||||
headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
|
||||
$(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
|
||||
-headers = rpc/netdb.h
|
||||
+headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
|
||||
install-others = $(inst_sysconfdir)/rpc
|
||||
generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
|
||||
$(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:33df2d6951abd1d111570be780e3e6b265183d51b2f0a34699c6e39380b8ea4c
|
||||
size 11611
|
||||
oid sha256:19a74b49f1afe63adb4e79accb214e2ed77d74af7ca0054af31322d64f3e14f1
|
||||
size 15972
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: glibc-2.15/nscd/connections.c
|
||||
Index: glibc-2.15.90/nscd/connections.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/nscd/connections.c
|
||||
+++ glibc-2.15/nscd/connections.c
|
||||
@@ -1805,6 +1805,8 @@ handle_request: request received (Versio
|
||||
--- glibc-2.15.90.orig/nscd/connections.c
|
||||
+++ glibc-2.15.90/nscd/connections.c
|
||||
@@ -1803,6 +1803,8 @@ handle_request: request received (Versio
|
||||
++nready;
|
||||
}
|
||||
/* NOTREACHED */
|
||||
|
@ -1,10 +1,10 @@
|
||||
Use /var/db for nss_db
|
||||
|
||||
Index: glibc-2.15/nss/db-Makefile
|
||||
Index: glibc-2.15.90/nss/db-Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/nss/db-Makefile
|
||||
+++ glibc-2.15/nss/db-Makefile
|
||||
@@ -23,7 +23,7 @@ DATABASES = $(wildcard /etc/passwd /etc/
|
||||
--- glibc-2.15.90.orig/nss/db-Makefile
|
||||
+++ glibc-2.15.90/nss/db-Makefile
|
||||
@@ -22,7 +22,7 @@ DATABASES = $(wildcard /etc/passwd /etc/
|
||||
/etc/rpc /etc/services /etc/shadow /etc/gshadow \
|
||||
/etc/netgroup)
|
||||
|
||||
@ -13,10 +13,10 @@ Index: glibc-2.15/nss/db-Makefile
|
||||
|
||||
AWK = awk
|
||||
MAKEDB = makedb --quiet
|
||||
Index: glibc-2.15/sysdeps/unix/sysv/linux/paths.h
|
||||
Index: glibc-2.15.90/sysdeps/unix/sysv/linux/paths.h
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/sysdeps/unix/sysv/linux/paths.h
|
||||
+++ glibc-2.15/sysdeps/unix/sysv/linux/paths.h
|
||||
--- glibc-2.15.90.orig/sysdeps/unix/sysv/linux/paths.h
|
||||
+++ glibc-2.15.90/sysdeps/unix/sysv/linux/paths.h
|
||||
@@ -68,7 +68,7 @@
|
||||
/* Provide trailing slash, since mostly used for building pathnames. */
|
||||
#define _PATH_DEV "/dev/"
|
||||
@ -26,15 +26,15 @@ Index: glibc-2.15/sysdeps/unix/sysv/linux/paths.h
|
||||
#define _PATH_VARRUN "/var/run/"
|
||||
#define _PATH_VARTMP "/var/tmp/"
|
||||
|
||||
Index: glibc-2.15/Makeconfig
|
||||
Index: glibc-2.15.90/Makeconfig
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/Makeconfig
|
||||
+++ glibc-2.15/Makeconfig
|
||||
@@ -293,7 +293,7 @@ inst_sysconfdir = $(install_root)$(sysco
|
||||
--- glibc-2.15.90.orig/Makeconfig
|
||||
+++ glibc-2.15.90/Makeconfig
|
||||
@@ -287,7 +287,7 @@ inst_sysconfdir = $(install_root)$(sysco
|
||||
|
||||
# Directory for the database files and Makefile for nss_db.
|
||||
ifndef vardbdir
|
||||
-vardbdir = /var/db
|
||||
-vardbdir = $(localstatedir)/db
|
||||
+vardbdir = /var/lib/misc
|
||||
endif
|
||||
inst_vardbdir = $(install_root)$(vardbdir)
|
||||
|
@ -22,225 +22,217 @@ Date: Mon Nov 28 13:38:19 2011 +0100
|
||||
EAGAIN from FUTEX_WAIT_REQUEUE_PI.
|
||||
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
|
||||
|
||||
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
|
||||
index 53970d7..54590b7 100644
|
||||
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
|
||||
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
|
||||
@@ -134,6 +134,7 @@ __pthread_cond_wait:
|
||||
|
||||
Index: glibc-2.15.90/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
|
||||
+++ glibc-2.15.90/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
|
||||
@@ -136,7 +136,6 @@ __pthread_cond_wait:
|
||||
cmpl $PI_BIT, %eax
|
||||
jne 18f
|
||||
|
||||
+90:
|
||||
-90:
|
||||
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
|
||||
movl %ebp, %edx
|
||||
xorl %esi, %esi
|
||||
@@ -147,6 +148,9 @@ __pthread_cond_wait:
|
||||
@@ -150,9 +149,6 @@ __pthread_cond_wait:
|
||||
sete 16(%esp)
|
||||
je 19f
|
||||
|
||||
+ cmpl $-EAGAIN, %eax
|
||||
+ je 91f
|
||||
+
|
||||
- cmpl $-EAGAIN, %eax
|
||||
- je 91f
|
||||
-
|
||||
/* Normal and PI futexes dont mix. Use normal futex functions only
|
||||
if the kernel does not support the PI futex functions. */
|
||||
cmpl $-ENOSYS, %eax
|
||||
@@ -391,6 +395,78 @@ __pthread_cond_wait:
|
||||
@@ -397,78 +393,6 @@ __pthread_cond_wait:
|
||||
#endif
|
||||
call __lll_unlock_wake
|
||||
jmp 11b
|
||||
+
|
||||
+91:
|
||||
+.LcleanupSTART2:
|
||||
+ /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
|
||||
+ call it again. */
|
||||
+
|
||||
+ /* Get internal lock. */
|
||||
+ movl $1, %edx
|
||||
+ xorl %eax, %eax
|
||||
+ LOCK
|
||||
+#if cond_lock == 0
|
||||
+ cmpxchgl %edx, (%ebx)
|
||||
+#else
|
||||
+ cmpxchgl %edx, cond_lock(%ebx)
|
||||
+#endif
|
||||
+ jz 92f
|
||||
+
|
||||
+#if cond_lock == 0
|
||||
+ movl %ebx, %edx
|
||||
+#else
|
||||
+ leal cond_lock(%ebx), %edx
|
||||
+#endif
|
||||
+#if (LLL_SHARED-LLL_PRIVATE) > 255
|
||||
+ xorl %ecx, %ecx
|
||||
+#endif
|
||||
+ cmpl $-1, dep_mutex(%ebx)
|
||||
+ setne %cl
|
||||
+ subl $1, %ecx
|
||||
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
|
||||
+#if LLL_PRIVATE != 0
|
||||
+ addl $LLL_PRIVATE, %ecx
|
||||
+#endif
|
||||
+ call __lll_lock_wait
|
||||
+
|
||||
+92:
|
||||
+ /* Increment the cond_futex value again, so it can be used as a new
|
||||
+ expected value. */
|
||||
+ addl $1, cond_futex(%ebx)
|
||||
+ movl cond_futex(%ebx), %ebp
|
||||
+
|
||||
+ /* Unlock. */
|
||||
+ LOCK
|
||||
+#if cond_lock == 0
|
||||
+ subl $1, (%ebx)
|
||||
+#else
|
||||
+ subl $1, cond_lock(%ebx)
|
||||
+#endif
|
||||
+ je 93f
|
||||
+#if cond_lock == 0
|
||||
+ movl %ebx, %eax
|
||||
+#else
|
||||
+ leal cond_lock(%ebx), %eax
|
||||
+#endif
|
||||
+#if (LLL_SHARED-LLL_PRIVATE) > 255
|
||||
+ xorl %ecx, %ecx
|
||||
+#endif
|
||||
+ cmpl $-1, dep_mutex(%ebx)
|
||||
+ setne %cl
|
||||
+ subl $1, %ecx
|
||||
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
|
||||
+#if LLL_PRIVATE != 0
|
||||
+ addl $LLL_PRIVATE, %ecx
|
||||
+#endif
|
||||
+ call __lll_unlock_wake
|
||||
+
|
||||
+93:
|
||||
+ /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
|
||||
+ xorl %ecx, %ecx
|
||||
+ movl dep_mutex(%ebx), %edi
|
||||
+ jmp 90b
|
||||
+.LcleanupEND2:
|
||||
+
|
||||
-
|
||||
-91:
|
||||
-.LcleanupSTART2:
|
||||
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
|
||||
- call it again. */
|
||||
-
|
||||
- /* Get internal lock. */
|
||||
- movl $1, %edx
|
||||
- xorl %eax, %eax
|
||||
- LOCK
|
||||
-#if cond_lock == 0
|
||||
- cmpxchgl %edx, (%ebx)
|
||||
-#else
|
||||
- cmpxchgl %edx, cond_lock(%ebx)
|
||||
-#endif
|
||||
- jz 92f
|
||||
-
|
||||
-#if cond_lock == 0
|
||||
- movl %ebx, %edx
|
||||
-#else
|
||||
- leal cond_lock(%ebx), %edx
|
||||
-#endif
|
||||
-#if (LLL_SHARED-LLL_PRIVATE) > 255
|
||||
- xorl %ecx, %ecx
|
||||
-#endif
|
||||
- cmpl $-1, dep_mutex(%ebx)
|
||||
- setne %cl
|
||||
- subl $1, %ecx
|
||||
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
|
||||
-#if LLL_PRIVATE != 0
|
||||
- addl $LLL_PRIVATE, %ecx
|
||||
-#endif
|
||||
- call __lll_lock_wait
|
||||
-
|
||||
-92:
|
||||
- /* Increment the cond_futex value again, so it can be used as a new
|
||||
- expected value. */
|
||||
- addl $1, cond_futex(%ebx)
|
||||
- movl cond_futex(%ebx), %ebp
|
||||
-
|
||||
- /* Unlock. */
|
||||
- LOCK
|
||||
-#if cond_lock == 0
|
||||
- subl $1, (%ebx)
|
||||
-#else
|
||||
- subl $1, cond_lock(%ebx)
|
||||
-#endif
|
||||
- je 93f
|
||||
-#if cond_lock == 0
|
||||
- movl %ebx, %eax
|
||||
-#else
|
||||
- leal cond_lock(%ebx), %eax
|
||||
-#endif
|
||||
-#if (LLL_SHARED-LLL_PRIVATE) > 255
|
||||
- xorl %ecx, %ecx
|
||||
-#endif
|
||||
- cmpl $-1, dep_mutex(%ebx)
|
||||
- setne %cl
|
||||
- subl $1, %ecx
|
||||
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
|
||||
-#if LLL_PRIVATE != 0
|
||||
- addl $LLL_PRIVATE, %ecx
|
||||
-#endif
|
||||
- call __lll_unlock_wake
|
||||
-
|
||||
-93:
|
||||
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
|
||||
- xorl %ecx, %ecx
|
||||
- movl dep_mutex(%ebx), %edi
|
||||
- jmp 90b
|
||||
-.LcleanupEND2:
|
||||
-
|
||||
.size __pthread_cond_wait, .-__pthread_cond_wait
|
||||
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
|
||||
GLIBC_2_3_2)
|
||||
@@ -563,6 +639,10 @@ __condvar_w_cleanup:
|
||||
@@ -641,10 +565,6 @@ __condvar_w_cleanup:
|
||||
.long .LcleanupEND-.Lsub_cond_futex
|
||||
.long __condvar_w_cleanup-.LSTARTCODE
|
||||
.uleb128 0
|
||||
+ .long .LcleanupSTART2-.LSTARTCODE
|
||||
+ .long .LcleanupEND2-.LcleanupSTART2
|
||||
+ .long __condvar_w_cleanup-.LSTARTCODE
|
||||
+ .uleb128 0
|
||||
- .long .LcleanupSTART2-.LSTARTCODE
|
||||
- .long .LcleanupEND2-.LcleanupSTART2
|
||||
- .long __condvar_w_cleanup-.LSTARTCODE
|
||||
- .uleb128 0
|
||||
.long .LcallUR-.LSTARTCODE
|
||||
.long .LENDCODE-.LcallUR
|
||||
.long 0
|
||||
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
|
||||
index 7535baa..d837d15 100644
|
||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
|
||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <lowlevelcond.h>
|
||||
#include <tcb-offsets.h>
|
||||
#include <pthread-pi-defines.h>
|
||||
+#include <pthread-errnos.h>
|
||||
|
||||
#include <kernel-features.h>
|
||||
|
||||
@@ -133,11 +134,14 @@ __pthread_cond_wait:
|
||||
Index: glibc-2.15.90/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
|
||||
===================================================================
|
||||
--- glibc-2.15.90.orig/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
|
||||
+++ glibc-2.15.90/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
|
||||
@@ -136,14 +136,11 @@ __pthread_cond_wait:
|
||||
cmpl $PI_BIT, %eax
|
||||
jne 61f
|
||||
|
||||
+90:
|
||||
-90:
|
||||
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
|
||||
movl $SYS_futex, %eax
|
||||
syscall
|
||||
|
||||
movl $1, %r8d
|
||||
+ cmpq $-EAGAIN, %rax
|
||||
+ je 91f
|
||||
- cmpq $-EAGAIN, %rax
|
||||
- je 91f
|
||||
#ifdef __ASSUME_REQUEUE_PI
|
||||
jmp 62f
|
||||
#else
|
||||
@@ -324,6 +328,70 @@ __pthread_cond_wait:
|
||||
|
||||
@@ -331,69 +328,6 @@ __pthread_cond_wait:
|
||||
13: movq %r10, %rax
|
||||
jmp 14b
|
||||
+
|
||||
+91:
|
||||
+.LcleanupSTART2:
|
||||
+ /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
|
||||
+ call it again. */
|
||||
+ movq 8(%rsp), %rdi
|
||||
+
|
||||
+ /* Get internal lock. */
|
||||
+ movl $1, %esi
|
||||
+ xorl %eax, %eax
|
||||
+ LOCK
|
||||
+#if cond_lock == 0
|
||||
+ cmpxchgl %esi, (%rdi)
|
||||
+#else
|
||||
+ cmpxchgl %esi, cond_lock(%rdi)
|
||||
+#endif
|
||||
+ jz 92f
|
||||
+
|
||||
+#if cond_lock != 0
|
||||
+ addq $cond_lock, %rdi
|
||||
+#endif
|
||||
+ cmpq $-1, dep_mutex-cond_lock(%rdi)
|
||||
+ movl $LLL_PRIVATE, %eax
|
||||
+ movl $LLL_SHARED, %esi
|
||||
+ cmovne %eax, %esi
|
||||
+ callq __lll_lock_wait
|
||||
+#if cond_lock != 0
|
||||
+ subq $cond_lock, %rdi
|
||||
+#endif
|
||||
+92:
|
||||
+ /* Increment the cond_futex value again, so it can be used as a new
|
||||
+ expected value. */
|
||||
+ incl cond_futex(%rdi)
|
||||
+ movl cond_futex(%rdi), %edx
|
||||
+
|
||||
+ /* Release internal lock. */
|
||||
+ LOCK
|
||||
+#if cond_lock == 0
|
||||
+ decl (%rdi)
|
||||
+#else
|
||||
+ decl cond_lock(%rdi)
|
||||
+#endif
|
||||
+ jz 93f
|
||||
+
|
||||
+#if cond_lock != 0
|
||||
+ addq $cond_lock, %rdi
|
||||
+#endif
|
||||
+ cmpq $-1, dep_mutex-cond_lock(%rdi)
|
||||
+ movl $LLL_PRIVATE, %eax
|
||||
+ movl $LLL_SHARED, %esi
|
||||
+ cmovne %eax, %esi
|
||||
+ /* The call preserves %rdx. */
|
||||
+ callq __lll_unlock_wake
|
||||
+#if cond_lock != 0
|
||||
+ subq $cond_lock, %rdi
|
||||
+#endif
|
||||
+93:
|
||||
+ /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
|
||||
+ xorq %r10, %r10
|
||||
+ movq dep_mutex(%rdi), %r8
|
||||
+ leaq cond_futex(%rdi), %rdi
|
||||
+ jmp 90b
|
||||
+.LcleanupEND2:
|
||||
+
|
||||
|
||||
-91:
|
||||
-.LcleanupSTART2:
|
||||
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
|
||||
- call it again. */
|
||||
- movq 8(%rsp), %rdi
|
||||
-
|
||||
- /* Get internal lock. */
|
||||
- movl $1, %esi
|
||||
- xorl %eax, %eax
|
||||
- LOCK
|
||||
-#if cond_lock == 0
|
||||
- cmpxchgl %esi, (%rdi)
|
||||
-#else
|
||||
- cmpxchgl %esi, cond_lock(%rdi)
|
||||
-#endif
|
||||
- jz 92f
|
||||
-
|
||||
-#if cond_lock != 0
|
||||
- addq $cond_lock, %rdi
|
||||
-#endif
|
||||
- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
|
||||
- movl $LLL_PRIVATE, %eax
|
||||
- movl $LLL_SHARED, %esi
|
||||
- cmovne %eax, %esi
|
||||
- callq __lll_lock_wait
|
||||
-#if cond_lock != 0
|
||||
- subq $cond_lock, %rdi
|
||||
-#endif
|
||||
-92:
|
||||
- /* Increment the cond_futex value again, so it can be used as a new
|
||||
- expected value. */
|
||||
- incl cond_futex(%rdi)
|
||||
- movl cond_futex(%rdi), %edx
|
||||
-
|
||||
- /* Release internal lock. */
|
||||
- LOCK
|
||||
-#if cond_lock == 0
|
||||
- decl (%rdi)
|
||||
-#else
|
||||
- decl cond_lock(%rdi)
|
||||
-#endif
|
||||
- jz 93f
|
||||
-
|
||||
-#if cond_lock != 0
|
||||
- addq $cond_lock, %rdi
|
||||
-#endif
|
||||
- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
|
||||
- movl $LLL_PRIVATE, %eax
|
||||
- movl $LLL_SHARED, %esi
|
||||
- cmovne %eax, %esi
|
||||
- /* The call preserves %rdx. */
|
||||
- callq __lll_unlock_wake
|
||||
-#if cond_lock != 0
|
||||
- subq $cond_lock, %rdi
|
||||
-#endif
|
||||
-93:
|
||||
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
|
||||
- xorq %r10, %r10
|
||||
- mov dep_mutex(%rdi), %R8_LP
|
||||
- leaq cond_futex(%rdi), %rdi
|
||||
- jmp 90b
|
||||
-.LcleanupEND2:
|
||||
-
|
||||
.size __pthread_cond_wait, .-__pthread_cond_wait
|
||||
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
|
||||
GLIBC_2_3_2)
|
||||
@@ -476,11 +544,15 @@ __condvar_cleanup1:
|
||||
@@ -546,15 +480,11 @@ __condvar_cleanup1:
|
||||
.uleb128 .LcleanupSTART-.LSTARTCODE
|
||||
.uleb128 .LcleanupEND-.LcleanupSTART
|
||||
.uleb128 __condvar_cleanup1-.LSTARTCODE
|
||||
- .uleb128 0
|
||||
+ .uleb128 0
|
||||
+ .uleb128 .LcleanupSTART2-.LSTARTCODE
|
||||
+ .uleb128 .LcleanupEND2-.LcleanupSTART2
|
||||
+ .uleb128 __condvar_cleanup1-.LSTARTCODE
|
||||
- .uleb128 .LcleanupSTART2-.LSTARTCODE
|
||||
- .uleb128 .LcleanupEND2-.LcleanupSTART2
|
||||
- .uleb128 __condvar_cleanup1-.LSTARTCODE
|
||||
- .uleb128 0
|
||||
+ .uleb128 0
|
||||
.uleb128 .LcallUR-.LSTARTCODE
|
||||
.uleb128 .LENDCODE-.LcallUR
|
||||
|
13
tr_TR.patch
13
tr_TR.patch
@ -1,13 +0,0 @@
|
||||
Index: glibc-2.15/localedata/locales/tr_TR
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/localedata/locales/tr_TR
|
||||
+++ glibc-2.15/localedata/locales/tr_TR
|
||||
@@ -3540,6 +3540,8 @@ t_fmt_ampm "<U0025><U0049><U003A><U0025>
|
||||
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
|
||||
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
|
||||
<U0025><U005A><U0020><U0025><U0059>"
|
||||
+first_weekday 2
|
||||
+first_workday 2
|
||||
END LC_TIME
|
||||
|
||||
LC_PAPER
|
@ -1,201 +0,0 @@
|
||||
Date: Thu, 16 Feb 2012 08:16:13 -0800
|
||||
From: Kees Cook <kees@outflux.net>
|
||||
To: "Ryan S. Arnold" <ryan.arnold@gmail.com>
|
||||
Cc: libc-alpha@sourceware.org, Paul Eggert <eggert@cs.ucla.edu>,
|
||||
Roland McGrath <roland@hack.frob.com>,
|
||||
Andreas Schwab <schwab@linux-m68k.org>
|
||||
Subject: Re: [PATCH] vfprintf: validate nargs and maybe allocate from heap
|
||||
|
||||
The nargs value can overflow when doing allocations, allowing arbitrary
|
||||
memory writes via format strings, bypassing _FORTIFY_SOURCE:
|
||||
http://www.phrack.org/issues.html?issue=67&id=9
|
||||
|
||||
This checks for nargs overflow and possibly allocates from heap instead of
|
||||
stack, and adds a regression test for the situation.
|
||||
|
||||
I have FSF assignment via Google. (Sent from @outflux since that's how I'm
|
||||
subscribed here, but CL shows @chromium.org as part of my Google work.)
|
||||
|
||||
This version disables the useless test on non-32-bit platforms.
|
||||
|
||||
2012-02-16 Kees Cook <keescook@chromium.org>
|
||||
|
||||
[BZ #13656]
|
||||
* stdio-common/vfprintf.c (vfprintf): Check for nargs overflow and
|
||||
possibly allocate from heap instead of stack.
|
||||
* stdio-common/bug-vfprintf-nargs.c: New file.
|
||||
* stdio-common/Makefile (tests): Add nargs overflow test.
|
||||
|
||||
Index: glibc-2.15/stdio-common/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/stdio-common/Makefile
|
||||
+++ glibc-2.15/stdio-common/Makefile
|
||||
@@ -60,7 +60,8 @@ tests := tstscanf test_rdwr test-popen t
|
||||
tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
|
||||
tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
|
||||
bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
|
||||
- scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24
|
||||
+ scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
|
||||
+ bug-vfprintf-nargs
|
||||
|
||||
test-srcs = tst-unbputc tst-printf
|
||||
|
||||
Index: glibc-2.15/stdio-common/bug-vfprintf-nargs.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.15/stdio-common/bug-vfprintf-nargs.c
|
||||
@@ -0,0 +1,78 @@
|
||||
+/* Test for vfprintf nargs allocation overflow (BZ #13656).
|
||||
+ Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+ Contributed by Kees Cook <keescook@chromium.org>, 2012.
|
||||
+
|
||||
+ 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 <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <stdint.h>
|
||||
+#include <unistd.h>
|
||||
+#include <inttypes.h>
|
||||
+#include <string.h>
|
||||
+#include <signal.h>
|
||||
+
|
||||
+static int
|
||||
+format_failed (const char *fmt, const char *expected)
|
||||
+{
|
||||
+ char output[80];
|
||||
+
|
||||
+ printf ("%s : ", fmt);
|
||||
+
|
||||
+ memset (output, 0, sizeof output);
|
||||
+ /* Having sprintf itself detect a failure is good. */
|
||||
+ if (sprintf (output, fmt, 1, 2, 3, "test") > 0
|
||||
+ && strcmp (output, expected) != 0)
|
||||
+ {
|
||||
+ printf ("FAIL (output '%s' != expected '%s')\n", output, expected);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ puts ("ok");
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ int rc = 0;
|
||||
+ char buf[64];
|
||||
+
|
||||
+ /* Regular positionals work. */
|
||||
+ if (format_failed ("%1$d", "1") != 0)
|
||||
+ rc = 1;
|
||||
+
|
||||
+ /* Regular width positionals work. */
|
||||
+ if (format_failed ("%1$*2$d", " 1") != 0)
|
||||
+ rc = 1;
|
||||
+
|
||||
+ /* Positional arguments are constructed via read_int, so nargs can only
|
||||
+ overflow on 32-bit systems. On 64-bit systems, it will attempt to
|
||||
+ allocate a giant amount of memory and possibly crash, which is the
|
||||
+ expected situation. Since the 64-bit behavior is arch-specific, only
|
||||
+ test this on 32-bit systems. */
|
||||
+ if (sizeof (long int) == 4)
|
||||
+ {
|
||||
+ sprintf (buf, "%%1$d %%%" PRIdPTR "$d", UINT32_MAX / sizeof (int));
|
||||
+ if (format_failed (buf, "1 %$d") != 0)
|
||||
+ rc = 1;
|
||||
+ }
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+#define TEST_FUNCTION do_test ()
|
||||
+#include "../test-skeleton.c"
|
||||
Index: glibc-2.15/stdio-common/vfprintf.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/stdio-common/vfprintf.c
|
||||
+++ glibc-2.15/stdio-common/vfprintf.c
|
||||
@@ -236,6 +236,9 @@ vfprintf (FILE *s, const CHAR_T *format,
|
||||
0 if unknown. */
|
||||
int readonly_format = 0;
|
||||
|
||||
+ /* For the argument descriptions, which may be allocated on the heap. */
|
||||
+ void *args_malloced = NULL;
|
||||
+
|
||||
/* This table maps a character into a number representing a
|
||||
class. In each step there is a destination label for each
|
||||
class. */
|
||||
@@ -1648,9 +1651,10 @@ do_positional:
|
||||
determine the size of the array needed to store the argument
|
||||
attributes. */
|
||||
size_t nargs = 0;
|
||||
- int *args_type;
|
||||
- union printf_arg *args_value = NULL;
|
||||
+ size_t bytes_per_arg;
|
||||
+ union printf_arg *args_value;
|
||||
int *args_size;
|
||||
+ int *args_type;
|
||||
|
||||
/* Positional parameters refer to arguments directly. This could
|
||||
also determine the maximum number of arguments. Track the
|
||||
@@ -1699,13 +1703,33 @@ do_positional:
|
||||
|
||||
/* Determine the number of arguments the format string consumes. */
|
||||
nargs = MAX (nargs, max_ref_arg);
|
||||
+ bytes_per_arg = sizeof (*args_value) + sizeof (*args_size)
|
||||
+ + sizeof (*args_type);
|
||||
+
|
||||
+ /* Check for potential integer overflow. */
|
||||
+ if (nargs > SIZE_MAX / bytes_per_arg)
|
||||
+ {
|
||||
+ done = -1;
|
||||
+ goto all_done;
|
||||
+ }
|
||||
|
||||
/* Allocate memory for the argument descriptions. */
|
||||
- args_type = alloca (nargs * sizeof (int));
|
||||
+ if (__libc_use_alloca (nargs * bytes_per_arg))
|
||||
+ args_value = alloca (nargs * bytes_per_arg);
|
||||
+ else
|
||||
+ {
|
||||
+ args_value = args_malloced = malloc (nargs * bytes_per_arg);
|
||||
+ if (args_value == NULL)
|
||||
+ {
|
||||
+ done = -1;
|
||||
+ goto all_done;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ args_size = &args_value[nargs].pa_int;
|
||||
+ args_type = &args_size[nargs];
|
||||
memset (args_type, s->_flags2 & _IO_FLAGS2_FORTIFY ? '\xff' : '\0',
|
||||
- nargs * sizeof (int));
|
||||
- args_value = alloca (nargs * sizeof (union printf_arg));
|
||||
- args_size = alloca (nargs * sizeof (int));
|
||||
+ nargs * sizeof (*args_type));
|
||||
|
||||
/* XXX Could do sanity check here: If any element in ARGS_TYPE is
|
||||
still zero after this loop, format is invalid. For now we
|
||||
@@ -1974,8 +1998,8 @@ do_positional:
|
||||
}
|
||||
|
||||
all_done:
|
||||
- if (__builtin_expect (workstart != NULL, 0))
|
||||
- free (workstart);
|
||||
+ free (args_malloced);
|
||||
+ free (workstart);
|
||||
/* Unlock the stream. */
|
||||
_IO_funlockfile (s);
|
||||
_IO_cleanup_region_end (0);
|
@ -1,29 +0,0 @@
|
||||
openSUSE bug report:
|
||||
https://bugzilla.novell.com/show_bug.cgi?id=681398
|
||||
|
||||
Patch from Debian, see
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584748
|
||||
|
||||
---
|
||||
sysdeps/x86_64/cacheinfo.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: glibc-2.15/sysdeps/x86_64/cacheinfo.c
|
||||
===================================================================
|
||||
--- glibc-2.15.orig/sysdeps/x86_64/cacheinfo.c
|
||||
+++ glibc-2.15/sysdeps/x86_64/cacheinfo.c
|
||||
@@ -305,7 +305,13 @@ intel_check_word (int name, unsigned int
|
||||
static long int __attribute__ ((noinline))
|
||||
handle_intel (int name, unsigned int maxidx)
|
||||
{
|
||||
- assert (maxidx >= 2);
|
||||
+ if (maxidx <= 2)
|
||||
+ {
|
||||
+ /* This should never happen as all Intel i686 CPU support a CPUID
|
||||
+ level of 2 minimum. However valgrind sometimes load the i686
|
||||
+ library with a P55C CPUID. Return 0 in that case. */
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
/* OK, we can use the CPUID instruction to get all info about the
|
||||
caches. */
|
Loading…
Reference in New Issue
Block a user