1 --- glibc-2.14/ChangeLog
2 +++ glibc-2.14-2/ChangeLog
4 +2011-05-31 Andreas Schwab <schwab@redhat.com>
6 + * nscd/nscd_getserv_r.c (nscd_getserv_r): Don't free non-malloced
7 + memory. Use alloca_account. Fix memory leak when retrying.
9 2011-05-31 Ulrich Drepper <drepper@gmail.com>
11 * version.h (RELEASE): Bump for 2.14 release.
13 * po/Makefile (po-sed-cmd): Add ksh to extensions.
14 (libc.pot): Work around missing support for .ksh extension in xgettext.
17 - * resolv/res_send.c (__libc_res_nsend): Only go to the next name server
18 - if both request failed.
19 - (send_dg): In case of server errors clear resplen or *resplen2.
22 * elf/dl-deps.c (_dl_map_object_deps): Run initializer sorting only
23 when there are multiple maps.
25 * libio/Makefile (tests): Add bug-fclose1.
26 * libio/bug-fclose1.c: New file.
28 +2011-05-13 Andreas Schwab <schwab@redhat.com>
30 + * elf/dl-load.c (is_dst): Remove parameter secure, all callers
31 + changed. Move check for valid use of $ORIGIN ...
32 + (_dl_dst_substitute): ... here. Reset check_for_trusted when a
33 + path element is skipped.
35 2011-05-12 Ulrich Drepper <drepper@gmail.com>
39 * sysdeps/unix/sysv/linux/Versions [GLIBC_2.14] (clock_adjtime):
42 +2011-04-06 Andreas Schwab <schwab@redhat.com>
44 + * scripts/check-local-headers.sh: Ignore systemtap headers.
46 +2011-02-21 Roland McGrath <roland@redhat.com>
48 + * sysdeps/x86_64/__longjmp.S: Add a static probe here.
49 + * sysdeps/x86_64/setjmp.S: Likewise.
50 + * sysdeps/i386/bsd-setjmp.S: Likewise.
51 + * sysdeps/i386/bsd-_setjmp.S: Likewise.
52 + * sysdeps/i386/setjmp.S: Likewise.
53 + * sysdeps/i386/__longjmp.S: Likewise.
54 + * sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S: Likewise.
55 + * sysdeps/unix/sysv/linux/i386/____longjmp_chk.S: Likewise.
57 +2011-02-08 Roland McGrath <roland@redhat.com>
59 + * include/stap-probe.h: New file.
60 + * configure.in: Handle --enable-systemtap.
61 + * configure: Regenerated.
62 + * config.h.in (USE_STAP_PROBE): New #undef.
63 + * extra-lib.mk (CPPFLAGS-$(lib)): Add -DIN_LIB=$(lib).
64 + * elf/Makefile (CPPFLAGS-.os): Add -DIN_LIB=rtld.
65 + * elf/rtld-Rules (rtld-CPPFLAGS): Likewise.
67 2011-03-22 Ulrich Drepper <drepper@gmail.com>
69 * sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word): Increment
71 $LDFLAGS and -nostdlib -nostartfiles to linking step. Change main
74 +2011-03-18 Andreas Schwab <schwab@redhat.com>
76 + * elf/ldd.bash.in: Never run file directly.
78 +2011-03-07 Andreas Schwab <schwab@redhat.com>
80 + * include/link.h (struct link_map): Remove l_orig_initfini.
81 + * elf/dl-close.c (_dl_close_worker): Revert its use.
82 + * elf/dl-deps.c (_dl_map_object_deps): Likewise.
84 2011-03-06 Ulrich Drepper <drepper@gmail.com>
86 * elf/dl-load.c (_dl_map_object): If we are looking for the first
87 @@ -1035,12 +1077,6 @@
88 * elf/noload.c: Include <memcheck.h>.
89 (main): Call mtrace. Close all opened handles.
91 -2011-02-17 Andreas Schwab <schwab@redhat.com>
94 - * elf/dl-deps.c (_dl_map_object_deps): Signal error early when
95 - dependencies are missing.
97 2011-02-22 Samuel Thibault <samuel.thibault@ens-lyon.org>
99 Fix __if_freereq crash: Unlike the generic version which uses free,
100 @@ -1197,6 +1233,12 @@
101 * shadow/sgetspent.c: Check return value of __sgetspent_r instead
104 +2011-02-03 Andreas Schwab <schwab@redhat.com>
106 + * login/programs/pt_chown.c (main): Check for valid file
107 + descriptor instead of privileges. Be careful to drop all
108 + capabilities when not needed.
110 2011-01-19 Ulrich Drepper <drepper@gmail.com>
113 @@ -1884,6 +1926,29 @@
114 * sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS):
115 Mask out sign-bit copies when constructing f_fsid.
117 +2010-09-27 Andreas Schwab <schwab@redhat.com>
119 + * include/link.h (struct link_map): Add l_free_initfini.
120 + * elf/dl-deps.c (_dl_map_object_deps): Set it when assigning
122 + * elf/rtld.c (dl_main): Clear it on all objects loaded on startup.
123 + * elf/dl-libc.c (free_mem): Free l_initfini if l_free_initfini is
127 + * posix/regcomp.c (parse_bracket_exp): When looking up collating
128 + elements compare against the byte sequence of it, not its name.
131 + * stdio-common/vfprintf.c (process_string_arg): Revert 2000-07-22
134 + * nss/nss_files/files-XXX.c (internal_getent): Declare linebuflen
137 + * sysdeps/i386/i686/multiarch/strspn.S (ENTRY): Add missing
140 2010-09-24 Petr Baudis <pasky@suse.cz>
142 * debug/stack_chk_fail_local.c: Add missing licence exception.
143 @@ -2676,6 +2741,32 @@
144 call returning > 0 value.
145 * sysdeps/unix/sysv/linux/getlogin.c (getlogin): Likewise.
147 +2010-07-01 Andreas Schwab <schwab@redhat.com>
149 + * include/sys/resource.h (__getrlimit): Add hidden proto.
150 + * sysdeps/unix/sysv/linux/i386/getrlimit.c: Add libc_hidden_weak.
151 + * sysdeps/mach/hurd/getrlimit.c: Add libc_hidden_def.
152 + * resource/getrlimit.c: Likewise.
154 +2010-06-28 Andreas Schwab <schwab@redhat.com>
156 + * allocatestack.c (setxid_mark_thread): Ensure that the exiting
157 + thread is woken up.
159 + * elf/Makefile: Add rules to build and run unload8 test.
160 + * elf/unload8.c: New file.
161 + * elf/unload8mod1.c: New file.
162 + * elf/unload8mod1x.c: New file.
163 + * elf/unload8mod2.c: New file.
164 + * elf/unload8mod3.c: New file.
166 + * elf/dl-close.c (_dl_close_worker): Reset private search list if
169 +2010-06-21 Andreas Schwab <schwab@redhat.com>
171 + * sysdeps/i386/i686/Makefile: Don't pass -mtune to assembler.
173 2010-06-07 Andreas Schwab <schwab@redhat.com>
175 * dlfcn/Makefile: Remove explicit dependencies on libc.so and
176 @@ -2728,6 +2819,24 @@
177 * hurd/hurd/fd.h (__file_name_lookup_at): Update comment.
178 * sysdeps/mach/hurd/linkat.c (linkat): Pass O_NOLINK in FLAGS.
180 +2010-06-11 Andreas Schwab <schwab@redhat.com>
182 + * elf/rtld.c (_dl_starting_up): Always define.
183 + (dl_main): Always set _dl_starting_up.
184 + * elf/dl-support.c (_dl_starting_up): Always define.
185 + * elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
187 +2010-06-10 Andreas Schwab <schwab@redhat.com>
189 + * sysdeps/unix/sysv/linux/getpagesize.c: Don't assume AT_PAGESIZE
190 + is always available.
192 + * sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
194 + * nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
195 + * sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
196 + * nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
198 2010-05-28 Luis Machado <luisgpm@br.ibm.com>
200 * sysdeps/powerpc/powerpc32/power7/memcpy.S: Exchange srdi for srwi.
201 --- glibc-2.14/ChangeLog.15
202 +++ glibc-2.14-2/ChangeLog.15
205 2004-11-26 Jakub Jelinek <jakub@redhat.com>
207 + * posix/Makefile (generated: Add getconf.speclist.
208 + ($(inst_libexecdir)/getconf): Use getconf.speclist instead of
210 + ($(objpfx)getconf.speclist): New rule.
211 + * posix/getconf.speclist.h: New file.
213 +2004-11-26 Jakub Jelinek <jakub@redhat.com>
215 * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add GETCONF_DIR.
217 2004-11-26 Kaz Kojima <kkojima@rr.iij4u.or.jp>
218 @@ -1103,6 +1111,13 @@
219 * sysdeps/generic/tempname.c (__path_search): Add missing argument
222 +2004-11-02 Jakub Jelinek <jakub@redhat.com>
224 + * include/features.h (__USE_FORTIFY_LEVEL): Also set for Red Hat
225 + GCC 3.4.x-RH >= 3.4.2-8.
226 + * debug/tst-chk1.c (do_test): Deal with GCC 3.4.x-RH not
227 + being able to recognize subobjects.
229 2004-10-31 Mariusz Mazur <mmazur@kernel.pl>
231 * sysdeps/unix/sysv/linux/alpha/setregid.c: New file.
232 @@ -1443,6 +1458,11 @@
233 * sysdeps/generic/readonly-area.c (__readonly_str): Renamed to ...
234 (__readonly_area): ... this.
236 +2004-10-19 Jakub Jelinek <jakub@redhat.com>
238 + * include/features.h (__USE_FORTIFY_LEVEL): Enable even with
239 + Red Hat gcc4 4.0.0 and above.
241 2004-10-18 Jakub Jelinek <jakub@redhat.com>
243 * sysdeps/generic/strcpy_chk.c (__strcpy_chk): Speed up by checking
244 @@ -3182,6 +3202,23 @@
246 * locale/localename.c (__current_locale_name): Likewise.
248 +2004-08-31 Jakub Jelinek <jakub@redhat.com>
250 + * elf/ldconfig.c (parse_conf): Add prefix argument, prepend it
251 + before arguments to add_dir and pass to parse_conf_include.
252 + (parse_conf_include): Add prefix argument, pass it down to
254 + (main): Call arch_startup. Adjust parse_conf caller.
255 + Call add_arch_dirs.
256 + * sysdeps/generic/dl-cache.h (arch_startup, add_arch_dirs): Define.
257 + * sysdeps/unix/sysv/linux/i386/dl-cache.h: New file.
258 + * sysdeps/unix/sysv/linux/ia64/dl-cache.h (EMUL_HACK, arch_startup,
259 + add_arch_dirs): Define.
260 + * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Prepend
261 + /emul/ia32-linux before the 32-bit ld.so pathname.
262 + * sysdeps/unix/sysv/linux/ia64/dl-procinfo.c: New file.
263 + * sysdeps/unix/sysv/linux/ia64/dl-procinfo.h: New file.
265 2004-08-30 Roland McGrath <roland@frob.com>
267 * scripts/extract-abilist.awk: If `lastversion' variable defined, omit
268 --- glibc-2.14/ChangeLog.16
269 +++ glibc-2.14-2/ChangeLog.16
270 @@ -2042,6 +2042,9 @@
271 (__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT
274 + * sysdeps/unix/sysv/linux/futimesat.c (futimesat): If
275 + file == NULL, use __futimes unconditionally.
277 2006-02-02 Ulrich Drepper <drepper@redhat.com>
279 * sysdeps/unix/sysv/linux/futimesat.c [__NR_futimesat]
280 @@ -2101,6 +2104,11 @@
281 * sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Fix a typo.
282 * sysdeps/s390/fpu/libm-test-ulps: Remove llrint ulps.
284 +2006-01-30 Jakub Jelinek <jakub@redhat.com>
286 + * include/bits/stdlib-ldbl.h: New file.
287 + * include/bits/wchar-ldbl.h: New file.
289 2006-01-19 Thomas Schwinge <tschwinge@gnu.org>
291 * libio/genops.c: Include <stdbool.h>.
292 --- glibc-2.14/ChangeLog.17
293 +++ glibc-2.14-2/ChangeLog.17
296 * Makerules (libc-abis): Fix search for libc-abis in add-ons.
298 +2010-04-06 Ulrich Drepper <drepper@redhat.com>
300 + * sysdeps/posix/getaddrinfo.c (default_scopes): Assign global
301 + scope to RFC 1918 addresses.
302 + * posix/gai.conf: Document difference from RFC 3484.
304 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
306 * sysdeps/gnu/unwind-resume.c: New, moved from nptl/sysdeps/pthread/.
307 @@ -1010,6 +1016,13 @@
308 * sysdeps/x86_64/fpu/fegetenv.c: Likewise
309 * sysdeps/s390/fpu/fegetenv.c: Likewise. Remove unused headers.
311 +2009-10-27 Aurelien Jarno <aurelien@aurel32.net>
314 + * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory
315 + used later with MMAP_FIXED | MMAP_SHARED to cope with different
316 + alignment restrictions.
318 2010-02-05 H.J. Lu <hongjiu.lu@intel.com>
321 @@ -2953,6 +2966,11 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
322 * sysdeps/generic/ldsodefs.h (struct rtld_global): The map element in
323 the unique symbol hash table should not be const.
325 +2009-07-22 Jakub Jelinek <jakub@redhat.com>
327 + * Makeconfig (ASFLAGS): Append $(sysdep-ASFLAGS).
328 + * sysdeps/i386/Makefile (sysdep-ASFLAGS): Add -U__i686.
330 2009-07-21 Ulrich Drepper <drepper@redhat.com>
332 * sysdeps/x86_64/multiarch/strstr.c: Minor cleanups. Remove
333 @@ -3218,6 +3236,11 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
334 out common code into new function get_common_indeces. Determine
335 extended family and model for Intel processors.
337 +2009-06-26 Andreas Schwab <aschwab@redhat.com>
339 + * timezone/zic.c (stringzone): Don't try to generate a POSIX TZ
340 + string when the timezone ends in DST.
342 2009-06-26 Ulrich Drepper <drepper@redhat.com>
344 * resolv/resolv.h: Define RES_SNGLKUPREOP.
345 @@ -11818,6 +11841,10 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
347 * stdlib/stdlib.h: Remove obsolete part of comment for realpath.
349 +2007-04-16 Jakub Jelinek <jakub@redhat.com>
351 + * locale/programs/locarchive.c (add_alias, insert_name): Remove static.
353 2007-04-16 Ulrich Drepper <drepper@redhat.com>
356 @@ -13075,6 +13102,15 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
357 separators also if no non-zero digits found.
358 * stdlib/Makefile (tests): Add tst-strtod3.
360 +2006-12-10 Jakub Jelinek <jakub@redhat.com>
362 + * sysdeps/unix/sysv/linux/netlinkaccess.h: Include linux/if_addr.h
363 + if IFA_MAX is not defined.
364 + (IFA_RTA, IFA_PAYLOAD, IFLA_RTA, IFLA_PAYLOAD): Define if not
366 + * sysdeps/unix/sysv/linux/check_pf.c: Include netlinkaccess.h
367 + instead of asm/types.h, linux/netlink.h and linux/rtnetlink.h.
369 2006-12-09 Ulrich Drepper <drepper@redhat.com>
372 --- glibc-2.14/Makeconfig
373 +++ glibc-2.14-2/Makeconfig
374 @@ -791,12 +791,12 @@ endif
375 # The assembler can generate debug information too.
377 ifeq ($(have-cpp-asm-debuginfo),yes)
378 -ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
379 +ASFLAGS = $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
385 -ASFLAGS += $(ASFLAGS-config) $(asflags-cpu)
386 +ASFLAGS += $(ASFLAGS-config) $(asflags-cpu) $(sysdep-ASFLAGS)
391 +++ glibc-2.14-2/NEWS
392 @@ -16,19 +16,9 @@ Version 2.14
393 12393, 12420, 12432, 12445, 12449, 12453, 12454, 12460, 12469, 12489,
394 12509, 12510, 12511, 12518, 12527, 12541, 12545, 12551, 12582, 12583,
395 12587, 12597, 12601, 12611, 12625, 12626, 12631, 12650, 12653, 12655,
396 - 12660, 12671, 12681, 12684, 12685, 12711, 12713, 12714, 12717, 12723,
397 - 12724, 12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792,
398 - 12795, 12811, 12813, 12814
400 -* The RPC implementation in libc is obsoleted. Old programs keep working
401 - but new programs cannot be linked with the routines in libc anymore.
402 - Programs in need of RPC functionality must be linked against TI-RPC.
403 - The TI-RPC implementation is IPv6 enabled and there are other benefits.
405 - Visible changes of this change include (obviously) the inability to link
406 - programs using RPC functions without referencing the TI-RPC library and the
407 - removal of the RPC headers from the glibc headers.
408 - Implemented by Ulrich Drepper.
409 + 12660, 12671, 12681, 12685, 12711, 12713, 12714, 12717, 12723, 12724,
410 + 12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792, 12795,
411 + 12811, 12813, 12814
413 * New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at,
414 syncfs, setns, sendmmsg
415 --- glibc-2.14/config.h.in
416 +++ glibc-2.14-2/config.h.in
418 /* Define if `.ctors' and `.dtors' sections shouldn't be used. */
419 #undef NO_CTORS_DTORS_SECTIONS
421 +/* Define if Systemtap <sys/sdt.h> probes should be defined. */
422 +#undef USE_STAP_PROBE
427 --- glibc-2.14/configure
428 +++ glibc-2.14-2/configure
429 @@ -784,6 +784,7 @@ enable_all_warnings
431 enable_experimental_malloc
436 ac_precious_vars='build_alias
437 @@ -1444,6 +1445,7 @@ Optional Features:
438 --enable-experimental-malloc
439 enable experimental malloc features
440 --enable-nss-crypt enable libcrypt to use nss
441 + --enable-systemtap enable systemtap static probe points [default=no]
444 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
445 @@ -3823,6 +3825,51 @@ else
449 +# Check whether --enable-systemtap was given.
450 +if test "${enable_systemtap+set}" = set; then :
451 + enableval=$enable_systemtap; systemtap=$enableval
456 +if test x$systemtap != xno; then
457 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemtap static probe support" >&5
458 +$as_echo_n "checking for systemtap static probe support... " >&6; }
459 +if test "${libc_cv_sdt+set}" = set; then :
460 + $as_echo_n "(cached) " >&6
462 + old_CFLAGS="$CFLAGS"
463 + CFLAGS="-std=gnu99 $CFLAGS"
464 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
465 +/* end confdefs.h. */
466 +#include <sys/sdt.h>
467 +void foo (int i, void *p)
469 + asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
470 + :: STAP_PROBE_ASM_OPERANDS (2, i, p));
473 +if ac_fn_c_try_compile "$LINENO"; then :
478 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
479 + CFLAGS="$old_CFLAGS"
481 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sdt" >&5
482 +$as_echo "$libc_cv_sdt" >&6; }
483 + if test $libc_cv_sdt = yes; then
484 + $as_echo "#define USE_STAP_PROBE 1" >>confdefs.h
487 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
488 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
489 +as_fn_error $? "systemtap support needs sys/sdt.h with asm support
490 +See \`config.log' for more details" "$LINENO" 5; }
494 # The way shlib-versions is used to generate soversions.mk uses a
495 # fairly simplistic model for name recognition that can't distinguish
496 # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
497 --- glibc-2.14/configure.in
498 +++ glibc-2.14-2/configure.in
499 @@ -316,6 +316,29 @@ else
501 AC_SUBST(libc_cv_nss_crypt)
503 +AC_ARG_ENABLE([systemtap],
504 + [AS_HELP_STRING([--enable-systemtap],
505 + [enable systemtap static probe points @<:@default=no@:>@])],
506 + [systemtap=$enableval],
508 +if test x$systemtap != xno; then
509 + AC_CACHE_CHECK([for systemtap static probe support], libc_cv_sdt, [dnl
510 + old_CFLAGS="$CFLAGS"
511 + CFLAGS="-std=gnu99 $CFLAGS"
512 + AC_COMPILE_IFELSE([#include <sys/sdt.h>
513 +void foo (int i, void *p)
515 + asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
516 + :: STAP_PROBE_ASM_OPERANDS (2, i, p));
517 +}], [libc_cv_sdt=yes], [libc_cv_sdt=no])
518 + CFLAGS="$old_CFLAGS"])
519 + if test $libc_cv_sdt = yes; then
520 + AC_DEFINE([USE_STAP_PROBE])
522 + AC_MSG_FAILURE([systemtap support needs sys/sdt.h with asm support])
526 # The way shlib-versions is used to generate soversions.mk uses a
527 # fairly simplistic model for name recognition that can't distinguish
528 # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
529 --- glibc-2.14/csu/Makefile
530 +++ glibc-2.14-2/csu/Makefile
531 @@ -93,7 +93,8 @@ omit-deps += $(crtstuff)
532 $(crtstuff:%=$(objpfx)%.o): %.o: %.S $(objpfx)defs.h
533 $(compile.S) -g0 $(ASFLAGS-.os) -o $@
535 -CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
536 +CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \
537 + -fno-asynchronous-unwind-tables
539 vpath initfini.c $(sysdirs)
541 --- glibc-2.14/csu/elf-init.c
542 +++ glibc-2.14-2/csu/elf-init.c
543 @@ -63,6 +63,23 @@ extern void (*__init_array_end []) (int, char **, char **)
544 extern void (*__fini_array_start []) (void) attribute_hidden;
545 extern void (*__fini_array_end []) (void) attribute_hidden;
547 +#if defined HAVE_VISIBILITY_ATTRIBUTE \
548 + && (defined SHARED || defined LIBC_NONSHARED)
549 +# define hidden_undef_2(x) #x
550 +# define hidden_undef_1(x) hidden_undef_2 (x)
551 +# define hidden_undef(x) \
552 + __asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \
553 + __asm (".hidden " #x);
555 +# define hidden_undef(x)
558 +hidden_undef (__preinit_array_start)
559 +hidden_undef (__preinit_array_end)
560 +hidden_undef (__init_array_start)
561 +hidden_undef (__init_array_end)
562 +hidden_undef (__fini_array_start)
563 +hidden_undef (__fini_array_end)
565 /* These function symbols are provided for the .init/.fini section entry
566 points automagically by the linker. */
567 --- glibc-2.14/debug/tst-chk1.c
568 +++ glibc-2.14-2/debug/tst-chk1.c
570 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
573 +/* Hack: make sure GCC doesn't know __chk_fail () will not return. */
574 +#define __noreturn__
579 @@ -242,7 +245,7 @@ do_test (void)
580 if (memcmp (a.buf1, "aabcdabcjj", 10))
583 -#if __USE_FORTIFY_LEVEL < 2
584 +#if __USE_FORTIFY_LEVEL < 2 || !__GNUC_PREREQ (4, 0)
585 /* The following tests are supposed to crash with -D_FORTIFY_SOURCE=2
586 and sufficient GCC support, as the string operations overflow
587 from a.buf1 into a.buf2. */
588 @@ -357,7 +360,7 @@ do_test (void)
589 memset (a.buf1 + 9, 'j', l0 + 2);
592 -# if __USE_FORTIFY_LEVEL >= 2
593 +# if __USE_FORTIFY_LEVEL >= 2 && __GNUC_PREREQ (4, 0)
597 --- glibc-2.14/elf/Makefile
598 +++ glibc-2.14-2/elf/Makefile
599 @@ -90,6 +90,7 @@ distribute := rtld-Rules \
600 unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \
601 unload6mod1.c unload6mod2.c unload6mod3.c \
602 unload7mod1.c unload7mod2.c \
603 + unload8mod1.c unload8mod1x.c unload8mod2.c unload8mod3.c \
604 tst-audit1.c tst-audit2.c tst-audit3.c tst-audit4.c \
605 tst-auditmod1.c tst-auditmod3a.c tst-auditmod3b.c \
606 tst-auditmod4a.c tst-auditmod4b.c \
607 @@ -133,6 +134,7 @@ include ../Makeconfig
608 ifeq ($(unwind-find-fde),yes)
609 routines += unwind-dw2-fde-glibc
610 shared-only-routines += unwind-dw2-fde-glibc
611 +CFLAGS-unwind-dw2-fde-glibc.c += -fno-strict-aliasing
614 before-compile = $(objpfx)trusted-dirs.h
615 @@ -221,7 +223,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
616 tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
617 tst-dlmodcount tst-dlopenrpath tst-deep1 \
618 tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
619 - unload3 unload4 unload5 unload6 unload7 tst-global1 order2 \
620 + unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \
621 tst-audit1 tst-audit2 \
622 tst-stackguard1 tst-addr1 tst-thrlock \
623 tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
624 @@ -279,6 +281,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
625 unload4mod1 unload4mod2 unload4mod3 unload4mod4 \
626 unload6mod1 unload6mod2 unload6mod3 \
627 unload7mod1 unload7mod2 \
628 + unload8mod1 unload8mod1x unload8mod2 unload8mod3 \
629 order2mod1 order2mod2 order2mod3 order2mod4 \
630 tst-unique1mod1 tst-unique1mod2 \
631 tst-unique2mod1 tst-unique2mod2 \
632 @@ -500,7 +503,8 @@ CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
633 CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
634 CFLAGS-cache.c = $(SYSCONF-FLAGS)
636 -CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
637 +CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
638 + -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
640 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
641 generated += $(addsuffix .so,$(strip $(modules-names)))
642 @@ -568,6 +572,9 @@ $(objpfx)unload6mod2.so: $(libdl)
643 $(objpfx)unload6mod3.so: $(libdl)
644 $(objpfx)unload7mod1.so: $(libdl)
645 $(objpfx)unload7mod2.so: $(objpfx)unload7mod1.so
646 +$(objpfx)unload8mod1.so: $(objpfx)unload8mod2.so
647 +$(objpfx)unload8mod2.so: $(objpfx)unload8mod3.so
648 +$(objpfx)unload8mod3.so: $(libdl)
649 $(objpfx)tst-initordera2.so: $(objpfx)tst-initordera1.so
650 $(objpfx)tst-initorderb2.so: $(objpfx)tst-initorderb1.so $(objpfx)tst-initordera2.so
651 $(objpfx)tst-initordera3.so: $(objpfx)tst-initorderb2.so $(objpfx)tst-initorderb1.so
652 @@ -881,6 +888,9 @@ $(objpfx)unload7: $(libdl)
653 $(objpfx)unload7.out: $(objpfx)unload7mod1.so $(objpfx)unload7mod2.so
654 unload7-ENV = MALLOC_PERTURB_=85
656 +$(objpfx)unload8: $(libdl)
657 +$(objpfx)unload8.out: $(objpfx)unload8mod1.so $(objpfx)unload8mod1x.so
660 $(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a
661 $(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
662 --- glibc-2.14/elf/dl-close.c
663 +++ glibc-2.14-2/elf/dl-close.c
664 @@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
665 if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
666 || dl_close_state != not_pending)
668 - if (map->l_direct_opencount == 0)
670 - if (map->l_type == lt_loaded)
671 - dl_close_state = rerun;
672 - else if (map->l_type == lt_library)
674 - struct link_map **oldp = map->l_initfini;
675 - map->l_initfini = map->l_orig_initfini;
676 - _dl_scope_free (oldp);
679 + if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
680 + dl_close_state = rerun;
682 /* There are still references to this object. Do nothing more. */
683 if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
684 @@ -430,6 +421,13 @@ _dl_close_worker (struct link_map *map)
686 imap->l_scope_max = new_size;
688 + else if (new_list != NULL)
690 + /* We didn't change the scope array, so reset the search
692 + imap->l_searchlist.r_list = NULL;
693 + imap->l_searchlist.r_nlist = 0;
696 /* The loader is gone, so mark the object as not having one.
697 Note: l_idx != IDX_STILL_USED -> object will be removed. */
698 --- glibc-2.14/elf/dl-deps.c
699 +++ glibc-2.14-2/elf/dl-deps.c
700 @@ -478,6 +478,7 @@ _dl_map_object_deps (struct link_map *map,
701 nneeded * sizeof needed[0]);
702 atomic_write_barrier ();
703 l->l_initfini = l_initfini;
704 + l->l_free_initfini = 1;
707 /* If we have no auxiliary objects just go on to the next map. */
708 @@ -491,10 +492,6 @@ _dl_map_object_deps (struct link_map *map,
709 if (errno == 0 && errno_saved != 0)
710 __set_errno (errno_saved);
713 - _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
716 struct link_map **old_l_initfini = NULL;
717 if (map->l_initfini != NULL && map->l_type == lt_loaded)
719 @@ -681,6 +678,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
720 l_initfini[nlist] = NULL;
721 atomic_write_barrier ();
722 map->l_initfini = l_initfini;
723 + map->l_free_initfini = 1;
724 if (l_reldeps != NULL)
726 atomic_write_barrier ();
727 @@ -689,5 +687,9 @@ Filters not supported with LD_TRACE_PRELINKING"));
728 _dl_scope_free (old_l_reldeps);
730 if (old_l_initfini != NULL)
731 - map->l_orig_initfini = old_l_initfini;
732 + _dl_scope_free (old_l_initfini);
735 + _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
738 --- glibc-2.14/elf/dl-init.c
739 +++ glibc-2.14-2/elf/dl-init.c
741 /* Type of the initializer. */
742 typedef void (*init_t) (int, char **, char **);
744 -#ifndef HAVE_INLINED_SYSCALLS
745 /* Flag, nonzero during startup phase. */
746 extern int _dl_starting_up;
747 extern int _dl_starting_up_internal attribute_hidden;
752 @@ -133,9 +131,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
754 call_init (main_map->l_initfini[i], argc, argv, env);
756 -#ifndef HAVE_INLINED_SYSCALLS
757 /* Finished starting up. */
758 INTUSE(_dl_starting_up) = 0;
762 --- glibc-2.14/elf/dl-libc.c
763 +++ glibc-2.14-2/elf/dl-libc.c
764 @@ -265,13 +265,13 @@ libc_freeres_fn (free_mem)
766 for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
768 - /* Remove all additional names added to the objects. */
769 for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
771 struct libname_list *lnp = l->l_libname->next;
773 l->l_libname->next = NULL;
775 + /* Remove all additional names added to the objects. */
778 struct libname_list *old = lnp;
779 @@ -279,6 +279,10 @@ libc_freeres_fn (free_mem)
780 if (! old->dont_free)
784 + /* Free the initfini dependency list. */
785 + if (l->l_free_initfini)
786 + free (l->l_initfini);
789 if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
790 --- glibc-2.14/elf/dl-load.c
791 +++ glibc-2.14-2/elf/dl-load.c
792 @@ -250,8 +250,7 @@ is_trusted_path_normalize (const char *path, size_t len)
796 -is_dst (const char *start, const char *name, const char *str,
797 - int is_path, int secure)
798 +is_dst (const char *start, const char *name, const char *str, int is_path)
801 bool is_curly = false;
802 @@ -280,12 +279,6 @@ is_dst (const char *start, const char *name, const char *str,
803 && (!is_path || name[len] != ':'))
806 - if (__builtin_expect (secure, 0)
807 - && ((name[len] != '\0' && name[len] != '/'
808 - && (!is_path || name[len] != ':'))
809 - || (name != start + 1 && (!is_path || name[-2] != ':'))))
815 @@ -300,13 +293,10 @@ _dl_dst_count (const char *name, int is_path)
819 - /* $ORIGIN is not expanded for SUID/GUID programs (except if it
820 - is $ORIGIN alone) and it must always appear first in path. */
822 - if ((len = is_dst (start, name, "ORIGIN", is_path,
823 - INTUSE(__libc_enable_secure))) != 0
824 - || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
825 - || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
826 + if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0
827 + || (len = is_dst (start, name, "PLATFORM", is_path)) != 0
828 + || (len = is_dst (start, name, "LIB", is_path)) != 0)
831 name = strchr (name + len, '$');
832 @@ -339,9 +329,16 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
836 - if ((len = is_dst (start, name, "ORIGIN", is_path,
837 - INTUSE(__libc_enable_secure))) != 0)
838 + if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
840 + /* For SUID/GUID programs $ORIGIN must always appear
841 + first in a path element. */
842 + if (__builtin_expect (INTUSE(__libc_enable_secure), 0)
843 + && ((name[len] != '\0' && name[len] != '/'
844 + && (!is_path || name[len] != ':'))
845 + || (name != start + 1 && (!is_path || name[-2] != ':'))))
846 + repl = (const char *) -1;
850 repl = _dl_get_origin ();
851 @@ -352,9 +349,9 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
852 check_for_trusted = (INTUSE(__libc_enable_secure)
853 && l->l_type == lt_executable);
855 - else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
856 + else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0)
857 repl = GLRO(dl_platform);
858 - else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
859 + else if ((len = is_dst (start, name, "LIB", is_path)) != 0)
862 if (repl != NULL && repl != (const char *) -1)
863 @@ -374,6 +371,7 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
864 element, but keep an empty element at the end. */
865 if (wp == result && is_path && *name == ':' && name[1] != '\0')
867 + check_for_trusted = false;
870 /* No DST we recognize. */
871 --- glibc-2.14/elf/dl-support.c
872 +++ glibc-2.14-2/elf/dl-support.c
873 @@ -81,10 +81,8 @@ unsigned long long _dl_load_adds;
874 create a fake scope containing nothing. */
875 struct r_scope_elem _dl_initial_searchlist;
877 -#ifndef HAVE_INLINED_SYSCALLS
878 /* Nonzero during startup. */
879 int _dl_starting_up = 1;
882 /* Random data provided by the kernel. */
884 --- glibc-2.14/elf/ldconfig.c
885 +++ glibc-2.14-2/elf/ldconfig.c
886 @@ -1034,17 +1034,19 @@ search_dirs (void)
889 static void parse_conf_include (const char *config_file, unsigned int lineno,
890 - bool do_chroot, const char *pattern);
891 + const char *prefix, bool do_chroot,
892 + const char *pattern);
894 /* Parse configuration file. */
896 -parse_conf (const char *filename, bool do_chroot)
897 +parse_conf (const char *filename, const char *prefix, bool do_chroot)
904 + size_t prefix_len = prefix ? strlen (prefix) : 0;
906 if (do_chroot && opt_chroot)
908 @@ -1105,7 +1107,14 @@ parse_conf (const char *filename, bool do_chroot)
910 while ((dir = strsep (&cp, " \t")) != NULL)
912 - parse_conf_include (filename, lineno, do_chroot, dir);
913 + parse_conf_include (filename, lineno, prefix, do_chroot, dir);
915 + else if (prefix != NULL)
917 + size_t cp_len = strlen (cp);
918 + char new_cp [prefix_len + cp_len + 1];
919 + memcpy (mempcpy (new_cp, prefix, prefix_len), cp, cp_len + 1);
922 else if (!strncasecmp (cp, "hwcap", 5) && isblank (cp[5]))
924 @@ -1168,7 +1177,7 @@ parse_conf (const char *filename, bool do_chroot)
925 config files to read. */
927 parse_conf_include (const char *config_file, unsigned int lineno,
928 - bool do_chroot, const char *pattern)
929 + const char *prefix, bool do_chroot, const char *pattern)
931 if (opt_chroot && pattern[0] != '/')
932 error (EXIT_FAILURE, 0,
933 @@ -1200,7 +1209,7 @@ parse_conf_include (const char *config_file, unsigned int lineno,
936 for (size_t i = 0; i < gl.gl_pathc; ++i)
937 - parse_conf (gl.gl_pathv[i], false);
938 + parse_conf (gl.gl_pathv[i], prefix, false);
942 @@ -1243,6 +1252,8 @@ main (int argc, char **argv)
943 /* Set the text message domain. */
944 textdomain (_libc_intl_domainname);
946 + arch_startup (argc, argv);
948 /* Parse and process arguments. */
950 argp_parse (&argp, argc, argv, 0, &remaining, NULL);
951 @@ -1352,12 +1363,14 @@ main (int argc, char **argv)
955 - parse_conf (config_file, true);
956 + parse_conf (config_file, NULL, true);
958 /* Always add the standard search paths. */
959 add_system_dir (SLIBDIR);
960 if (strcmp (SLIBDIR, LIBDIR))
961 add_system_dir (LIBDIR);
963 + add_arch_dirs (config_file);
966 const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
967 --- glibc-2.14/elf/ldd.bash.in
968 +++ glibc-2.14-2/elf/ldd.bash.in
969 @@ -167,18 +167,6 @@ warning: you do not have execution permission for" "\`$file'" >&2
974 - # If the program exits with exit code 5, it means the process has been
975 - # invoked with __libc_enable_secure. Fall back to running it through
976 - # the dynamic linker.
979 - if [ $rc = 5 ]; then
980 - try_trace "$RTLD" "$file"
983 - [ $rc = 0 ] || result=1
986 # This can be a non-ELF binary or no binary at all.
988 @@ -186,7 +174,7 @@ warning: you do not have execution permission for" "\`$file'" >&2
994 try_trace "$RTLD" "$file" || result=1
997 --- glibc-2.14/elf/rtld-Rules
998 +++ glibc-2.14-2/elf/rtld-Rules
1000 # Subroutine makefile for compiling libc modules linked into dynamic linker.
1002 # Copyright (C) 2002,2003,2005,2006,2008,2010,2011
1003 -# Free Software Foundation, Inc.
1004 +# Free Software Foundation, Inc.
1005 # This file is part of the GNU C Library.
1007 # The GNU C Library is free software; you can redistribute it and/or
1008 @@ -131,6 +131,6 @@ ifdef rtld-depfiles
1011 # This here is the whole point of all the shenanigans.
1012 -rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1
1013 +rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld
1016 --- glibc-2.14/elf/rtld.c
1017 +++ glibc-2.14-2/elf/rtld.c
1018 @@ -107,7 +107,6 @@ static struct audit_list
1019 struct audit_list *next;
1022 -#ifndef HAVE_INLINED_SYSCALLS
1023 /* Set nonzero during loading and initialization of executable and
1024 libraries, cleared before the executable's entry point runs. This
1025 must not be initialized to nonzero, because the unused dynamic
1026 @@ -117,7 +116,6 @@ static struct audit_list
1028 int _dl_starting_up = 0;
1029 INTVARDEF(_dl_starting_up)
1032 /* This is the structure which defines all variables global to ld.so
1033 (except those which cannot be added for some reason). */
1034 @@ -923,10 +921,8 @@ dl_main (const ElfW(Phdr) *phdr,
1035 /* Process the environment variable which control the behaviour. */
1036 process_envvars (&mode);
1038 -#ifndef HAVE_INLINED_SYSCALLS
1039 /* Set up a flag which tells we are just starting. */
1040 INTUSE(_dl_starting_up) = 1;
1043 if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
1045 @@ -2263,6 +2259,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
1049 + l->l_free_initfini = 0;
1051 if (l != &GL(dl_rtld_map))
1052 _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
1053 @@ -2312,7 +2309,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
1055 /* Make sure no new search directories have been added. */
1056 assert (GLRO(dl_init_all_dirs) == GL(dl_all_dirs));
1058 if (! prelinked && rtld_multiple_ref)
1060 /* There was an explicit ref to the dynamic linker as a shared lib.
1061 --- glibc-2.14/elf/unload8.c
1062 +++ glibc-2.14-2/elf/unload8.c
1070 + void *h = dlopen ("$ORIGIN/unload8mod1.so", RTLD_LAZY);
1073 + puts ("dlopen unload8mod1.so failed");
1077 + void *h2 = dlopen ("$ORIGIN/unload8mod1x.so", RTLD_LAZY);
1080 + puts ("dlopen unload8mod1x.so failed");
1085 + int (*mod1) (void) = dlsym (h, "mod1");
1088 + puts ("dlsym failed");
1097 --- glibc-2.14/elf/unload8mod1.c
1098 +++ glibc-2.14-2/elf/unload8mod1.c
1100 +extern void mod2 (void);
1107 --- glibc-2.14/elf/unload8mod1x.c
1108 +++ glibc-2.14-2/elf/unload8mod1x.c
1111 --- glibc-2.14/elf/unload8mod2.c
1112 +++ glibc-2.14-2/elf/unload8mod2.c
1114 +extern void mod3 (void);
1121 --- glibc-2.14/elf/unload8mod3.c
1122 +++ glibc-2.14-2/elf/unload8mod3.c
1126 +#include <stdlib.h>
1142 + void *h = dlopen ("$ORIGIN/unload8mod2.so", RTLD_LAZY);
1145 + puts ("dlopen unload8mod2.so failed");
1149 + atexit (mod3_fini);
1151 --- glibc-2.14/extra-lib.mk
1152 +++ glibc-2.14-2/extra-lib.mk
1153 @@ -101,4 +101,4 @@ ifneq (,$(cpp-srcs-left))
1154 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
1157 -CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1
1158 +CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1 -DIN_LIB=$(lib)
1159 --- glibc-2.14/include/bits/stdlib-ldbl.h
1160 +++ glibc-2.14-2/include/bits/stdlib-ldbl.h
1162 +#include <stdlib/bits/stdlib-ldbl.h>
1163 --- glibc-2.14/include/bits/wchar-ldbl.h
1164 +++ glibc-2.14-2/include/bits/wchar-ldbl.h
1166 +#include <wcsmbs/bits/wchar-ldbl.h>
1167 --- glibc-2.14/include/features.h
1168 +++ glibc-2.14-2/include/features.h
1169 @@ -310,8 +310,13 @@
1172 #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
1173 - && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
1174 -# if _FORTIFY_SOURCE > 1
1175 + && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
1176 +# if !__GNUC_PREREQ (4, 1)
1177 +# ifdef __GNUC_RH_RELEASE__
1178 +# warning _FORTIFY_SOURCE supported only with GCC 4.1 and later
1180 +# define __USE_FORTIFY_LEVEL 0
1181 +# elif _FORTIFY_SOURCE > 1
1182 # define __USE_FORTIFY_LEVEL 2
1184 # define __USE_FORTIFY_LEVEL 1
1185 --- glibc-2.14/include/libc-symbols.h
1186 +++ glibc-2.14-2/include/libc-symbols.h
1187 @@ -635,7 +635,7 @@ for linking")
1188 # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
1189 # define libc_hidden_def(name) hidden_def (name)
1190 # define libc_hidden_weak(name) hidden_weak (name)
1191 -# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
1192 +# define libc_hidden_nolink(name, version) hidden_def (name)
1193 # define libc_hidden_ver(local, name) hidden_ver (local, name)
1194 # define libc_hidden_data_def(name) hidden_data_def (name)
1195 # define libc_hidden_data_weak(name) hidden_data_weak (name)
1196 --- glibc-2.14/include/link.h
1197 +++ glibc-2.14-2/include/link.h
1199 /* Data structure for communication from the run-time dynamic linker for
1200 loaded ELF shared objects.
1201 - Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
1202 + Copyright (C) 1995-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
1203 This file is part of the GNU C Library.
1205 The GNU C Library is free software; you can redistribute it and/or
1206 @@ -192,6 +192,9 @@ struct link_map
1207 during LD_TRACE_PRELINKING=1
1208 contains any DT_SYMBOLIC
1210 + unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
1211 + freed, ie. not allocated with
1212 + the dummy malloc in ld.so. */
1214 /* Collected information about own RPATH directories. */
1215 struct r_search_path_struct l_rpath_dirs;
1216 @@ -240,9 +243,6 @@ struct link_map
1218 /* List of object in order of the init and fini calls. */
1219 struct link_map **l_initfini;
1220 - /* The init and fini list generated at startup, saved when the
1221 - object is also loaded dynamically. */
1222 - struct link_map **l_orig_initfini;
1224 /* List of the dependencies introduced through symbol binding. */
1225 struct link_map_reldeps
1226 --- glibc-2.14/include/stap-probe.h
1227 +++ glibc-2.14-2/include/stap-probe.h
1229 +/* Macros for defining Systemtap <sys/sdt.h> static probe points.
1230 + Copyright (C) 2011 Free Software Foundation, Inc.
1231 + This file is part of the GNU C Library.
1233 + The GNU C Library is free software; you can redistribute it and/or
1234 + modify it under the terms of the GNU Lesser General Public
1235 + License as published by the Free Software Foundation; either
1236 + version 2.1 of the License, or (at your option) any later version.
1238 + The GNU C Library is distributed in the hope that it will be useful,
1239 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1240 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1241 + Lesser General Public License for more details.
1243 + You should have received a copy of the GNU Lesser General Public
1244 + License along with the GNU C Library; if not, write to the Free
1245 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1246 + 02111-1307 USA. */
1248 +#ifndef _STAP_PROBE_H
1249 +#define _STAP_PROBE_H 1
1251 +#ifdef USE_STAP_PROBE
1253 +# include <sys/sdt.h>
1255 +/* Our code uses one macro LIBC_PROBE (name, n, arg1, ..., argn).
1257 + Without USE_STAP_PROBE, that does nothing but evaluates all
1258 + its arguments (to prevent bit rot, unlike e.g. assert).
1260 + Systemtap's header defines the macros STAP_PROBE (provider, name) and
1261 + STAP_PROBEn (provider, name, arg1, ..., argn). For "provider" we paste
1262 + in the IN_LIB name (libc, libpthread, etc.) automagically. */
1264 +# ifndef NOT_IN_libc
1265 +# define IN_LIB libc
1266 +# elif !defined IN_LIB
1267 +/* This is intentionally defined with extra unquoted commas in it so
1268 + that macro substitution will bomb out when it is used. We don't
1269 + just use #error here, so that this header can be included by
1270 + other headers that use LIBC_PROBE inside their own macros. We
1271 + only want such headers to fail to compile if those macros are
1272 + actually used in a context where IN_LIB has not been defined. */
1273 +# define IN_LIB ,,,missing -DIN_LIB=... -- not extra-lib.mk?,,,
1276 +# define LIBC_PROBE(name, n, ...) \
1277 + LIBC_PROBE_1 (IN_LIB, name, n, ## __VA_ARGS__)
1279 +# define LIBC_PROBE_1(lib, name, n, ...) \
1280 + STAP_PROBE##n (lib, name, ## __VA_ARGS__)
1282 +# define STAP_PROBE0 STAP_PROBE
1284 +# define LIBC_PROBE_ASM(name, template) \
1285 + STAP_PROBE_ASM (IN_LIB, name, template)
1287 +# define LIBC_PROBE_ASM_OPERANDS STAP_PROBE_ASM_OPERANDS
1289 +#else /* Not USE_STAP_PROBE. */
1291 +# ifndef __ASSEMBLER__
1292 +# define LIBC_PROBE(name, n, ...) DUMMY_PROBE##n (__VA_ARGS__)
1294 +# define LIBC_PROBE(name, n, ...) /* Nothing. */
1297 +# define LIBC_PROBE_ASM(name, template) /* Nothing. */
1298 +# define LIBC_PROBE_ASM_OPERANDS(n, ...) /* Nothing. */
1300 +/* This silliness lets us evaluate all the arguments for each arity
1301 + of probe. My kingdom for a real macro system. */
1303 +# define DUMMY_PROBE0() do {} while (0)
1304 +# define DUMMY_PROBE1(a1) do {} while ((void) (a1), 0)
1305 +# define DUMMY_PROBE2(a1, a2) do {} while ((void) (a1), \
1307 +# define DUMMY_PROBE3(a1, a2, a3) do {} while ((void) (a1), \
1310 +# define DUMMY_PROBE4(a1, a2, a3, a4) do {} while ((void) (a1), \
1314 +# define DUMMY_PROBE5(a1, a2, a3, a4, a5) \
1315 + do {} while ((void) (a1), \
1320 +# define DUMMY_PROBE6(a1, a2, a3, a4, a5, a6) \
1321 + do {} while ((void) (a1), \
1327 +# define DUMMY_PROBE7(a1, a2, a3, a4, a5, a6, a7) \
1328 + do {} while ((void) (a1), \
1335 +# define DUMMY_PROBE8(a1, a2, a3, a4, a5, a6, a7, a8) \
1336 + do {} while ((void) (a1), \
1344 +# define DUMMY_PROBE9(a1, a2, a3, a4, a5, a6, a7, a8, a9) \
1345 + do {} while ((void) (a1), \
1354 +# define DUMMY_PROBE10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
1355 + do {} while ((void) (a1), \
1366 +#endif /* USE_STAP_PROBE. */
1368 +#endif /* stap-probe.h */
1369 --- glibc-2.14/include/sys/resource.h
1370 +++ glibc-2.14-2/include/sys/resource.h
1371 @@ -13,4 +13,5 @@ extern int __getrusage (enum __rusage_who __who, struct rusage *__usage)
1373 extern int __setrlimit (enum __rlimit_resource __resource,
1374 const struct rlimit *__rlimits);
1375 +libc_hidden_proto (__getrlimit)
1377 --- glibc-2.14/inet/Makefile
1378 +++ glibc-2.14-2/inet/Makefile
1379 @@ -57,6 +57,8 @@ tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
1383 +CFLAGS-tst-inet6_rth.c += -fno-strict-aliasing
1385 ifeq ($(have-thread-library),yes)
1387 CFLAGS-gethstbyad_r.c = -DUSE_NSCD=1 -fexceptions
1388 --- glibc-2.14/intl/locale.alias
1389 +++ glibc-2.14-2/intl/locale.alias
1390 @@ -57,8 +57,6 @@ korean ko_KR.eucKR
1391 korean.euc ko_KR.eucKR
1393 lithuanian lt_LT.ISO-8859-13
1394 -no_NO nb_NO.ISO-8859-1
1395 -no_NO.ISO-8859-1 nb_NO.ISO-8859-1
1396 norwegian nb_NO.ISO-8859-1
1397 nynorsk nn_NO.ISO-8859-1
1398 polish pl_PL.ISO-8859-2
1399 --- glibc-2.14/libio/stdio.h
1400 +++ glibc-2.14-2/libio/stdio.h
1401 @@ -165,10 +165,12 @@ typedef _G_fpos64_t fpos64_t;
1402 extern struct _IO_FILE *stdin; /* Standard input stream. */
1403 extern struct _IO_FILE *stdout; /* Standard output stream. */
1404 extern struct _IO_FILE *stderr; /* Standard error output stream. */
1406 /* C89/C99 say they're macros. Make them happy. */
1408 #define stdout stdout
1409 #define stderr stderr
1412 __BEGIN_NAMESPACE_STD
1413 /* Remove file FILENAME. */
1414 --- glibc-2.14/locale/iso-4217.def
1415 +++ glibc-2.14-2/locale/iso-4217.def
1418 * !!! The list has to be sorted !!!
1420 +DEFINE_INT_CURR("ADP") /* Andorran Peseta -> EUR */
1421 DEFINE_INT_CURR("AED") /* United Arab Emirates Dirham */
1422 DEFINE_INT_CURR("AFN") /* Afghanistan Afgani */
1423 DEFINE_INT_CURR("ALL") /* Albanian Lek */
1424 @@ -15,12 +16,14 @@ DEFINE_INT_CURR("AMD") /* Armenia Dram */
1425 DEFINE_INT_CURR("ANG") /* Netherlands Antilles */
1426 DEFINE_INT_CURR("AOA") /* Angolan Kwanza */
1427 DEFINE_INT_CURR("ARS") /* Argentine Peso */
1428 +DEFINE_INT_CURR("ATS") /* Austrian Schilling -> EUR */
1429 DEFINE_INT_CURR("AUD") /* Australian Dollar */
1430 DEFINE_INT_CURR("AWG") /* Aruba Guilder */
1431 DEFINE_INT_CURR("AZM") /* Azerbaijan Manat */
1432 DEFINE_INT_CURR("BAM") /* Bosnian and Herzegovina Convertible Mark */
1433 DEFINE_INT_CURR("BBD") /* Barbados Dollar */
1434 DEFINE_INT_CURR("BDT") /* Bangladesh Taka */
1435 +DEFINE_INT_CURR("BEF") /* Belgian Franc -> EUR */
1436 DEFINE_INT_CURR("BGN") /* Bulgarian Lev */
1437 DEFINE_INT_CURR("BHD") /* Bahraini Dinar */
1438 DEFINE_INT_CURR("BIF") /* Burundi Franc */
1439 @@ -44,6 +47,7 @@ DEFINE_INT_CURR("CUP") /* Cuban Peso */
1440 DEFINE_INT_CURR("CVE") /* Cape Verde Escudo */
1441 DEFINE_INT_CURR("CYP") /* Cypriot Pound */
1442 DEFINE_INT_CURR("CZK") /* Czech Koruna */
1443 +DEFINE_INT_CURR("DEM") /* German Mark -> EUR */
1444 DEFINE_INT_CURR("DJF") /* Djibouti Franc */
1445 DEFINE_INT_CURR("DKK") /* Danish Krone (Faroe Islands, Greenland) */
1446 DEFINE_INT_CURR("DOP") /* Dominican Republic */
1447 @@ -51,16 +55,20 @@ DEFINE_INT_CURR("DZD") /* Algerian Dinar */
1448 DEFINE_INT_CURR("EEK") /* Estonian Kroon */
1449 DEFINE_INT_CURR("EGP") /* Egyptian Pound */
1450 DEFINE_INT_CURR("ERN") /* Eritrean Nakfa */
1451 +DEFINE_INT_CURR("ESP") /* Spanish Peseta -> EUR */
1452 DEFINE_INT_CURR("ETB") /* Ethiopian Birr */
1453 DEFINE_INT_CURR("EUR") /* European Union Euro */
1454 +DEFINE_INT_CURR("FIM") /* Finnish Markka -> EUR */
1455 DEFINE_INT_CURR("FJD") /* Fiji Dollar */
1456 DEFINE_INT_CURR("FKP") /* Falkland Islands Pound (Malvinas) */
1457 +DEFINE_INT_CURR("FRF") /* French Franc -> EUR */
1458 DEFINE_INT_CURR("GBP") /* British Pound */
1459 DEFINE_INT_CURR("GEL") /* Georgia Lari */
1460 DEFINE_INT_CURR("GHC") /* Ghana Cedi */
1461 DEFINE_INT_CURR("GIP") /* Gibraltar Pound */
1462 DEFINE_INT_CURR("GMD") /* Gambian Dalasi */
1463 DEFINE_INT_CURR("GNF") /* Guinea Franc */
1464 +DEFINE_INT_CURR("GRD") /* Greek Drachma -> EUR */
1465 DEFINE_INT_CURR("GTQ") /* Guatemala Quetzal */
1466 DEFINE_INT_CURR("GYD") /* Guyana Dollar */
1467 DEFINE_INT_CURR("HKD") /* Hong Kong Dollar */
1468 @@ -69,12 +77,14 @@ DEFINE_INT_CURR("HRK") /* Croatia Kuna */
1469 DEFINE_INT_CURR("HTG") /* Haiti Gourde */
1470 DEFINE_INT_CURR("HUF") /* Hungarian Forint */
1471 DEFINE_INT_CURR("IDR") /* Indonesia Rupiah */
1472 +DEFINE_INT_CURR("IEP") /* Irish Pound -> EUR */
1473 DEFINE_INT_CURR("ILS") /* Israeli Shekel */
1474 DEFINE_INT_CURR("IMP") /* Isle of Man Pounds */
1475 DEFINE_INT_CURR("INR") /* Indian Rupee (Bhutan) */
1476 DEFINE_INT_CURR("IQD") /* Iraqi Dinar */
1477 DEFINE_INT_CURR("IRR") /* Iranian Rial */
1478 DEFINE_INT_CURR("ISK") /* Iceland Krona */
1479 +DEFINE_INT_CURR("ITL") /* Italian Lira -> EUR */
1480 DEFINE_INT_CURR("JEP") /* Jersey Pound */
1481 DEFINE_INT_CURR("JMD") /* Jamaican Dollar */
1482 DEFINE_INT_CURR("JOD") /* Jordanian Dinar */
1483 @@ -94,6 +104,7 @@ DEFINE_INT_CURR("LKR") /* Sri Lankan Rupee */
1484 DEFINE_INT_CURR("LRD") /* Liberian Dollar */
1485 DEFINE_INT_CURR("LSL") /* Lesotho Maloti */
1486 DEFINE_INT_CURR("LTL") /* Lithuanian Litas */
1487 +DEFINE_INT_CURR("LUF") /* Luxembourg Franc -> EUR */
1488 DEFINE_INT_CURR("LVL") /* Latvia Lat */
1489 DEFINE_INT_CURR("LYD") /* Libyan Arab Jamahiriya Dinar */
1490 DEFINE_INT_CURR("MAD") /* Moroccan Dirham */
1491 @@ -114,6 +125,7 @@ DEFINE_INT_CURR("MZM") /* Mozambique Metical */
1492 DEFINE_INT_CURR("NAD") /* Namibia Dollar */
1493 DEFINE_INT_CURR("NGN") /* Nigeria Naira */
1494 DEFINE_INT_CURR("NIO") /* Nicaragua Cordoba Oro */
1495 +DEFINE_INT_CURR("NLG") /* Netherlands Guilder -> EUR */
1496 DEFINE_INT_CURR("NOK") /* Norwegian Krone */
1497 DEFINE_INT_CURR("NPR") /* Nepalese Rupee */
1498 DEFINE_INT_CURR("NZD") /* New Zealand Dollar */
1499 @@ -124,6 +136,7 @@ DEFINE_INT_CURR("PGK") /* Papau New Guinea Kina */
1500 DEFINE_INT_CURR("PHP") /* Philippines Peso */
1501 DEFINE_INT_CURR("PKR") /* Pakistan Rupee */
1502 DEFINE_INT_CURR("PLN") /* Polish Zloty */
1503 +DEFINE_INT_CURR("PTE") /* Portugese Escudo -> EUR */
1504 DEFINE_INT_CURR("PYG") /* Paraguay Guarani */
1505 DEFINE_INT_CURR("QAR") /* Qatar Rial */
1506 DEFINE_INT_CURR("ROL") /* Romanian Leu */
1507 --- glibc-2.14/locale/programs/locarchive.c
1508 +++ glibc-2.14-2/locale/programs/locarchive.c
1509 @@ -134,7 +134,7 @@ create_archive (const char *archivefname, struct locarhandle *ah)
1510 size_t reserved = RESERVE_MMAP_SIZE;
1512 if (total < reserved
1513 - && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
1514 + && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
1515 -1, 0)) != MAP_FAILED))
1518 @@ -241,9 +241,9 @@ oldlocrecentcmp (const void *a, const void *b)
1519 /* forward decls for below */
1520 static uint32_t add_locale (struct locarhandle *ah, const char *name,
1521 locale_data_t data, bool replace);
1522 -static void add_alias (struct locarhandle *ah, const char *alias,
1523 - bool replace, const char *oldname,
1524 - uint32_t *locrec_offset_p);
1525 +void add_alias (struct locarhandle *ah, const char *alias,
1526 + bool replace, const char *oldname,
1527 + uint32_t *locrec_offset_p);
1531 @@ -396,7 +396,7 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
1532 size_t reserved = RESERVE_MMAP_SIZE;
1534 if (total < reserved
1535 - && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
1536 + && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
1537 -1, 0)) != MAP_FAILED))
1540 @@ -614,7 +614,7 @@ open_archive (struct locarhandle *ah, bool readonly)
1543 if (st.st_size < reserved
1544 - && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
1545 + && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
1546 -1, 0)) != MAP_FAILED))
1549 @@ -649,7 +649,7 @@ close_archive (struct locarhandle *ah)
1550 #include "../../intl/explodename.c"
1551 #include "../../intl/l10nflist.c"
1553 -static struct namehashent *
1554 +struct namehashent *
1555 insert_name (struct locarhandle *ah,
1556 const char *name, size_t name_len, bool replace)
1558 @@ -707,7 +707,7 @@ insert_name (struct locarhandle *ah,
1559 return &namehashtab[idx];
1564 add_alias (struct locarhandle *ah, const char *alias, bool replace,
1565 const char *oldname, uint32_t *locrec_offset_p)
1567 --- glibc-2.14/localedata/Makefile
1568 +++ glibc-2.14-2/localedata/Makefile
1569 @@ -227,6 +227,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-locales-dir
1571 input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
1572 $(LOCALEDEF) --alias-file=../intl/locale.alias \
1574 -i locales/$$input -c -f charmaps/$$charset \
1575 $(addprefix --prefix=,$(install_root)) $$locale; \
1577 --- glibc-2.14/localedata/SUPPORTED
1578 +++ glibc-2.14-2/localedata/SUPPORTED
1579 @@ -86,6 +86,7 @@ cy_GB.UTF-8/UTF-8 \
1583 +da_DK.ISO-8859-15/ISO-8859-15 \
1586 de_AT@euro/ISO-8859-15 \
1587 @@ -117,6 +118,7 @@ en_DK.UTF-8/UTF-8 \
1591 +en_GB.ISO-8859-15/ISO-8859-15 \
1595 @@ -132,6 +134,7 @@ en_SG.UTF-8/UTF-8 \
1599 +en_US.ISO-8859-15/ISO-8859-15 \
1603 @@ -313,6 +316,8 @@ nl_NL/ISO-8859-1 \
1604 nl_NL@euro/ISO-8859-15 \
1607 +no_NO.UTF-8/UTF-8 \
1612 @@ -374,6 +379,7 @@ sv_FI/ISO-8859-1 \
1613 sv_FI@euro/ISO-8859-15 \
1616 +sv_SE.ISO-8859-15/ISO-8859-15 \
1620 --- glibc-2.14/localedata/locales/cy_GB
1621 +++ glibc-2.14-2/localedata/locales/cy_GB
1622 @@ -248,8 +248,11 @@ mon "<U0049><U006F><U006E><U0061><U0077><U0072>";/
1623 d_t_fmt "<U0044><U0079><U0064><U0064><U0020><U0025><U0041><U0020><U0025><U0064><U0020><U006d><U0069><U0073><U0020><U0025><U0042><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
1624 d_fmt "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0079>"
1625 t_fmt "<U0025><U0054>"
1628 +am_pm "<U0041><U004D>";"<U0050><U004D>"
1629 +t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
1630 +date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
1631 +<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
1632 +<U0025><U005A><U0020><U0025><U0059>"
1636 --- glibc-2.14/localedata/locales/en_GB
1637 +++ glibc-2.14-2/localedata/locales/en_GB
1638 @@ -116,8 +116,8 @@ mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
1639 d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
1640 d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
1641 t_fmt "<U0025><U0054>"
1644 +am_pm "<U0041><U004D>";"<U0050><U004D>"
1645 +t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
1646 date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
1647 <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
1648 <U0025><U005A><U0020><U0025><U0059>"
1649 --- glibc-2.14/localedata/locales/no_NO
1650 +++ glibc-2.14-2/localedata/locales/no_NO
1655 +% Norwegian language locale for Norway
1656 +% Source: Norsk Standardiseringsforbund
1657 +% Address: University Library,
1658 +% Drammensveien 41, N-9242 Oslo, Norge
1659 +% Contact: Kolbjoern Aamboe
1660 +% Tel: +47 - 22859109
1661 +% Fax: +47 - 22434497
1662 +% Email: kolbjorn.aambo@usit.uio.no
1667 +% Application: general
1669 +% Repertoiremap: mnemonic.ds
1670 +% Charset: ISO-8859-1
1671 +% Distribution and use is free, also
1672 +% for commercial purposes.
1676 +END LC_IDENTIFICATION
1721 --- glibc-2.14/localedata/locales/zh_TW
1722 +++ glibc-2.14-2/localedata/locales/zh_TW
1727 -% Chinese language locale for Taiwan R.O.C.
1728 +% Chinese language locale for Taiwan
1729 % charmap: BIG5-CP950
1732 @@ -17,7 +17,7 @@ escape_char /
1733 % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
1736 -title "Chinese locale for Taiwan R.O.C."
1737 +title "Chinese locale for Taiwan"
1741 @@ -25,7 +25,7 @@ email "bug-glibc-locales@gnu.org"
1745 -territory "Taiwan R.O.C."
1750 --- glibc-2.14/login/programs/pt_chown.c
1751 +++ glibc-2.14-2/login/programs/pt_chown.c
1754 #include <sys/stat.h>
1758 # include <sys/capability.h>
1759 # include <sys/prctl.h>
1760 @@ -143,7 +144,7 @@ main (int argc, char *argv[])
1761 uid_t uid = getuid ();
1764 - if (argc == 1 && euid == 0)
1765 + if (argc == 1 && fcntl (PTY_FILENO, F_GETFD) == 0)
1768 /* Drop privileges. */
1769 @@ -176,6 +177,13 @@ main (int argc, char *argv[])
1771 /* We aren't going to be using privileges, so drop them right now. */
1774 + cap_t caps = cap_init ();
1776 + error (1, errno, "cap_init");
1777 + cap_set_proc (caps);
1781 /* Set locale via LC_ALL. */
1782 setlocale (LC_ALL, "");
1783 @@ -195,9 +203,5 @@ main (int argc, char *argv[])
1784 return EXIT_FAILURE;
1787 - /* Check if we are properly installed. */
1789 - error (FAIL_EXEC, 0, gettext ("needs to be installed setuid `root'"));
1791 return EXIT_SUCCESS;
1793 --- glibc-2.14/malloc/mcheck.c
1794 +++ glibc-2.14-2/malloc/mcheck.c
1796 # include <mcheck.h>
1797 # include <stdint.h>
1799 +# include <stdlib.h>
1800 # include <libintl.h>
1805 +extern __typeof (malloc) __libc_malloc;
1806 +extern __typeof (free) __libc_free;
1807 +extern __typeof (realloc) __libc_realloc;
1808 +libc_hidden_proto (__libc_malloc)
1809 +libc_hidden_proto (__libc_realloc)
1810 +libc_hidden_proto (__libc_free)
1811 +libc_hidden_proto (__libc_memalign)
1813 +# define __libc_malloc(sz) malloc (sz)
1814 +# define __libc_free(ptr) free (ptr)
1815 +# define __libc_realloc(ptr, sz) realloc (ptr, sz)
1816 +# define __libc_memalign(al, sz) memalign (al, sz)
1819 /* Old hook values. */
1820 static void (*old_free_hook) (__ptr_t ptr, __const __ptr_t);
1821 static __ptr_t (*old_malloc_hook) (__malloc_size_t size, const __ptr_t);
1822 @@ -199,7 +215,7 @@ freehook (__ptr_t ptr, const __ptr_t caller)
1823 if (old_free_hook != NULL)
1824 (*old_free_hook) (ptr, caller);
1827 + __libc_free (ptr);
1828 __free_hook = freehook;
1831 @@ -222,7 +238,7 @@ mallochook (__malloc_size_t size, const __ptr_t caller)
1832 hdr = (struct hdr *) (*old_malloc_hook) (sizeof (struct hdr) + size + 1,
1835 - hdr = (struct hdr *) malloc (sizeof (struct hdr) + size + 1);
1836 + hdr = (struct hdr *) __libc_malloc (sizeof (struct hdr) + size + 1);
1837 __malloc_hook = mallochook;
1840 @@ -259,7 +275,7 @@ memalignhook (__malloc_size_t alignment, __malloc_size_t size,
1841 if (old_memalign_hook != NULL)
1842 block = (*old_memalign_hook) (alignment, slop + size + 1, caller);
1844 - block = memalign (alignment, slop + size + 1);
1845 + block = __libc_memalign (alignment, slop + size + 1);
1846 __memalign_hook = memalignhook;
1849 @@ -320,8 +336,8 @@ reallochook (__ptr_t ptr, __malloc_size_t size, const __ptr_t caller)
1850 sizeof (struct hdr) + size + 1,
1853 - hdr = (struct hdr *) realloc ((__ptr_t) hdr,
1854 - sizeof (struct hdr) + size + 1);
1855 + hdr = (struct hdr *) __libc_realloc ((__ptr_t) hdr,
1856 + sizeof (struct hdr) + size + 1);
1857 __free_hook = freehook;
1858 __malloc_hook = mallochook;
1859 __memalign_hook = memalignhook;
1860 @@ -381,8 +397,8 @@ mcheck (func)
1861 if (__malloc_initialized <= 0 && !mcheck_used)
1863 /* We call malloc() once here to ensure it is initialized. */
1864 - void *p = malloc (0);
1866 + void *p = __libc_malloc (0);
1869 old_free_hook = __free_hook;
1870 __free_hook = freehook;
1871 --- glibc-2.14/manual/libc.texinfo
1872 +++ glibc-2.14-2/manual/libc.texinfo
1874 @c setchapternewpage odd
1876 @comment Tell install-info what to do.
1877 -@dircategory Software libraries
1878 +@dircategory Libraries
1880 * Libc: (libc). C library.
1882 --- glibc-2.14/misc/sys/cdefs.h
1883 +++ glibc-2.14-2/misc/sys/cdefs.h
1884 @@ -132,7 +132,10 @@
1885 #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
1886 #define __bos0(ptr) __builtin_object_size (ptr, 0)
1888 -#if __GNUC_PREREQ (4,3)
1889 +#if __GNUC_PREREQ (4,3) \
1890 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1891 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1892 + && __GNUC_RH_RELEASE__ >= 31)
1893 # define __warndecl(name, msg) \
1894 extern void name (void) __attribute__((__warning__ (msg)))
1895 # define __warnattr(msg) __attribute__((__warning__ (msg)))
1896 @@ -291,10 +294,16 @@
1898 /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
1899 inline semantics, unless -fgnu89-inline is used. */
1900 -#if !defined __cplusplus || __GNUC_PREREQ (4,3)
1901 +#if !defined __cplusplus || __GNUC_PREREQ (4,3) \
1902 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1903 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1904 + && __GNUC_RH_RELEASE__ >= 31)
1905 # if defined __GNUC_STDC_INLINE__ || defined __cplusplus
1906 # define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
1907 -# if __GNUC_PREREQ (4,3)
1908 +# if __GNUC_PREREQ (4,3) \
1909 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1910 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1911 + && __GNUC_RH_RELEASE__ >= 31)
1912 # define __extern_always_inline \
1913 extern __always_inline __attribute__ ((__gnu_inline__, __artificial__))
1915 @@ -314,7 +323,10 @@
1917 /* GCC 4.3 and above allow passing all anonymous arguments of an
1918 __extern_always_inline function to some other vararg function. */
1919 -#if __GNUC_PREREQ (4,3)
1920 +#if __GNUC_PREREQ (4,3) \
1921 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1922 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1923 + && __GNUC_RH_RELEASE__ >= 31)
1924 # define __va_arg_pack() __builtin_va_arg_pack ()
1925 # define __va_arg_pack_len() __builtin_va_arg_pack_len ()
1927 --- glibc-2.14/nis/Makefile
1928 +++ glibc-2.14-2/nis/Makefile
1929 @@ -23,9 +23,9 @@ subdir := nis
1933 +headers := $(wildcard rpcsvc/*.[hx])
1934 distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
1935 - nisplus-parser.h nis_xdr.h nss \
1936 - $(wildcard rpcsvc/*.[hx])
1937 + nisplus-parser.h nis_xdr.h nss
1939 # These are the databases available for the nis (and perhaps later nisplus)
1940 # service. This must be a superset of the services in nss.
1941 @@ -69,6 +69,8 @@ libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
1945 +CFLAGS-nis_findserv.c += -fno-strict-aliasing
1946 +CFLAGS-ypclnt.c += -fno-strict-aliasing
1948 $(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
1949 $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
1950 --- glibc-2.14/nis/nss
1951 +++ glibc-2.14-2/nis/nss
1953 # memory with every getXXent() call. Otherwise each getXXent() call
1954 # might result into a network communication with the server to get
1956 -#SETENT_BATCH_READ=TRUE
1957 +SETENT_BATCH_READ=TRUE
1960 # If set to TRUE, the passwd routines in the NIS NSS module will not
1961 --- glibc-2.14/nptl/ChangeLog
1962 +++ glibc-2.14-2/nptl/ChangeLog
1965 Patch partly by Robert Rex <robert.rex@exasol.com>.
1967 +2011-02-22 Rayson Ho <rho@redhat.com>
1969 + * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1971 + * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1972 + * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1973 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1974 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1975 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1976 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1977 + * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1978 + * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1980 +2011-02-09 Rayson Ho <rho@redhat.com>
1982 + * DESIGN-systemtap-probes.txt: New file.
1983 + * pthread_cond_broadcast.c: SystemTap probes.
1984 + * pthread_cond_init.c: Likewise.
1985 + * pthread_cond_signal.c: Likewise.
1986 + * pthread_cond_wait.c: Likewise.
1987 + * pthread_cond_destroy.c: Likewise.
1988 + * pthread_create.c: Likewise.
1989 + * pthread_join.c: Likewise.
1990 + * pthread_mutex_destroy.c: Likewise.
1991 + * pthread_mutex_init.c: Likewise.
1992 + * pthread_mutex_lock.c: Likewise.
1993 + * pthread_mutex_timedlock.c: Likewise.
1994 + * pthread_mutex_unlock.c: Likewise.
1995 + * pthread_rwlock_destroy.c: Likewise.
1996 + * pthread_rwlock_rdlock.c: Likewise.
1997 + * pthread_rwlock_unlock.c: Likewise.
1998 + * pthread_rwlock_wrlock.c: Likewise.
1999 + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2000 + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2001 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2002 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2003 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2004 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2005 + * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2006 + * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2008 +2010-07-23 Roland McGrath <roland@redhat.com>
2010 + * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
2012 2011-01-19 Roland McGrath <roland@redhat.com>
2014 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
2015 @@ -4739,6 +4784,11 @@
2016 Move definition inside libpthread, libc, librt check. Provide
2017 definition for rtld.
2019 +2004-09-02 Jakub Jelinek <jakub@redhat.com>
2021 + * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2022 + waiters, awake all waiters on the associated mutex.
2024 2004-09-02 Ulrich Drepper <drepper@redhat.com>
2026 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
2027 @@ -6813,6 +6863,11 @@
2029 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
2031 +2003-07-22 Jakub Jelinek <jakub@redhat.com>
2033 + * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
2034 + if __need_struct_pthread_size, instead define lll_lock_t.
2036 2003-07-25 Jakub Jelinek <jakub@redhat.com>
2038 * tst-cancel17.c (do_test): Check if aio_cancel failed.
2039 --- glibc-2.14/nptl/DESIGN-systemtap-probes.txt
2040 +++ glibc-2.14-2/nptl/DESIGN-systemtap-probes.txt
2042 +Systemtap is a dynamic tracing/instrumenting tool available on Linux. Probes
2043 +that are not fired at run time have close to zero overhead.
2045 +The following probes are available for NPTL:
2047 +Thread creation & Join Probes
2048 +=============================
2049 +pthread_create - probe for pthread_create
2050 + arg1 = pointer (pthread_t*) to thread
2051 + arg2 = pointer (pthread_attr_t*) to attr
2052 + arg3 = pointer (void *) to start_routine
2053 + arg4 = arguments to start_routine
2054 +pthread_start - probe for actual thread creation
2055 + arg1 = struct pthread (members include thread ID, process ID)
2056 + arg2 = address of start_routine
2057 + arg3 = pointer to the list of arguments
2058 +pthread_join - probe for pthread_join
2060 +pthread_join_ret - probe for pthread_join return
2062 + arg2 = return value
2064 +Lock-related Probes
2065 +===================
2066 +mutex_init - probe for pthread_mutex_init
2067 + arg1 = address of mutex lock
2068 +mutex_acquired - probe for succ. return of pthread_mutex_lock
2069 + arg1 = address of mutex lock
2070 +mutex_timedlock_acquired - probe for succ. return of pthread_mutex_timedlock
2071 + arg1 = address of mutex lock
2072 +mutex_entry - probe for entry to the pthread_mutex_lock function
2073 + arg1 = address of mutex lock
2074 +mutex_timedlock_entry - probe for entry to the pthread_mutex_timedlock function
2075 + arg1 = address of mutex lock, arg2 = address of timespec
2076 +mutex_release - probe for pthread_mutex_unlock after the successful release of a
2078 + arg1 = address of mutex lock
2079 +mutex_destroy - probe for pthread_mutex_destroy
2080 + arg1 = address of mutex lock
2082 +wrlock_entry - probe for entry to the pthread_rwlock_wrlock function
2083 + arg1 = address of rw lock
2084 +rdlock_entry - probe for entry to the pthread_rwlock_rdlock function
2085 + arg1 = address of rw lock
2087 +rwlock_destroy - probe for pthread_rwlock_destroy
2088 + arg1 = address of rw lock
2089 +wrlock_acquire_write - probe for pthread_rwlock_wrlock (after getting the lock)
2090 + arg1 = address of rw lock
2091 +rdlock_acquire_read - probe for pthread_rwlock_rdlock after successfully getting
2093 + arg1 = address of rw lock
2094 +rwlock_unlock - probe for pthread_rwlock_unlock
2095 + arg1 = address of rw lock
2097 +lll_lock_wait - probe in low-level (assembly language) locking code, only fired
2098 + when futex/FUTEX_WAIT is called (i.e. when trying to acquire a
2100 + arg1 = pointer to futex
2101 + arg2 = flags passed to the futex system call
2102 +lll_lock_wait_private - probe in low-level (assembly language) locking code,
2103 + only fired when futex/FUTEX_WAIT is called (i.e. when
2104 + trying to acquire a contented lock)
2105 + arg1 = pointer to futex
2107 +lll_futex_wake - probe in low-level (assembly language) locking code, only fired
2108 + when futex (FUTEX_WAKE) is called
2109 + arg1 = pointer to futex
2110 + arg2 = number of processes to wake
2111 + arg3 = additional flags
2113 +Condition variable Probes
2114 +=========================
2115 +cond_init - probe for pthread_cond_init
2118 +cond_destroy - probe for pthread_cond_destroy
2120 +cond_wait - probe for pthread_cond_wait
2123 +cond_timedwait - probe for pthread_cond_timedwait
2127 +cond_signal - probe for pthread_cond_signal
2129 +cond_broadcast - probe for pthread_cond_broadcast
2131 --- glibc-2.14/nptl/Makefile
2132 +++ glibc-2.14-2/nptl/Makefile
2133 @@ -342,7 +342,8 @@ endif
2134 extra-objs += $(crti-objs) $(crtn-objs)
2135 omit-deps += crti crtn
2137 -CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
2138 +CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \
2139 + -fno-asynchronous-unwind-tables
2142 CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
2143 @@ -529,15 +530,19 @@ $(addprefix $(objpfx), \
2144 $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
2145 $(objpfx)libpthread_nonshared.a
2146 $(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so
2147 -# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
2148 +# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
2149 # since otherwise libpthread.so comes before libc.so when linking.
2150 $(addprefix $(objpfx), $(tests-reverse)): \
2151 - $(objpfx)../libc.so $(objpfx)libpthread.so \
2152 + $(objpfx)linklibc.so $(objpfx)libpthread.so \
2153 $(objpfx)libpthread_nonshared.a
2154 $(objpfx)../libc.so: $(common-objpfx)libc.so ;
2155 $(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
2157 $(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
2159 +$(objpfx)linklibc.so: $(common-objpfx)libc.so
2160 + ln -s ../libc.so $@
2161 +generated += libclink.so
2163 $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
2165 --- glibc-2.14/nptl/Versions
2166 +++ glibc-2.14-2/nptl/Versions
2167 @@ -30,6 +30,7 @@ libc {
2168 __libc_alloca_cutoff;
2169 # Internal libc interface to libpthread
2170 __libc_dl_error_tsd;
2175 --- glibc-2.14/nptl/allocatestack.c
2176 +++ glibc-2.14-2/nptl/allocatestack.c
2177 @@ -999,7 +999,16 @@ setxid_mark_thread (struct xid_command *cmdp, struct pthread *t)
2179 /* If the thread is exiting right now, ignore it. */
2180 if ((ch & EXITING_BITMASK) != 0)
2183 + /* Release the futex if there is no other setxid in
2185 + if ((ch & SETXID_BITMASK) == 0)
2187 + t->setxid_futex = 1;
2188 + lll_futex_wake (&t->setxid_futex, 1, LLL_PRIVATE);
2193 while (atomic_compare_and_exchange_bool_acq (&t->cancelhandling,
2194 ch | SETXID_BITMASK, ch));
2195 --- glibc-2.14/nptl/nptl-init.c
2196 +++ glibc-2.14-2/nptl/nptl-init.c
2197 @@ -396,7 +396,7 @@ __pthread_initialize_minimal_internal (void)
2198 /* Determine the default allowed stack size. This is the size used
2199 in case the user does not specify one. */
2200 struct rlimit limit;
2201 - if (getrlimit (RLIMIT_STACK, &limit) != 0
2202 + if (__getrlimit (RLIMIT_STACK, &limit) != 0
2203 || limit.rlim_cur == RLIM_INFINITY)
2204 /* The system limit is not usable. Use an architecture-specific
2206 --- glibc-2.14/nptl/pthread_cond_broadcast.c
2207 +++ glibc-2.14-2/nptl/pthread_cond_broadcast.c
2209 #include <lowlevellock.h>
2210 #include <pthread.h>
2211 #include <pthreadP.h>
2212 +#include <stap-probe.h>
2214 #include <shlib-compat.h>
2215 #include <kernel-features.h>
2216 @@ -32,6 +33,8 @@ int
2217 __pthread_cond_broadcast (cond)
2218 pthread_cond_t *cond;
2220 + LIBC_PROBE (cond_broadcast, 1, cond);
2222 int pshared = (cond->__data.__mutex == (void *) ~0l)
2223 ? LLL_SHARED : LLL_PRIVATE;
2224 /* Make sure we are alone. */
2225 --- glibc-2.14/nptl/pthread_cond_destroy.c
2226 +++ glibc-2.14-2/nptl/pthread_cond_destroy.c
2229 #include <shlib-compat.h>
2230 #include "pthreadP.h"
2231 +#include <stap-probe.h>
2235 @@ -29,6 +30,8 @@ __pthread_cond_destroy (cond)
2236 int pshared = (cond->__data.__mutex == (void *) ~0l)
2237 ? LLL_SHARED : LLL_PRIVATE;
2239 + LIBC_PROBE (cond_destroy, 1, cond);
2241 /* Make sure we are alone. */
2242 lll_lock (cond->__data.__lock, pshared);
2244 --- glibc-2.14/nptl/pthread_cond_init.c
2245 +++ glibc-2.14-2/nptl/pthread_cond_init.c
2248 #include <shlib-compat.h>
2249 #include "pthreadP.h"
2250 +#include <stap-probe.h>
2254 @@ -42,6 +43,8 @@ __pthread_cond_init (cond, cond_attr)
2255 ? NULL : (void *) ~0l);
2256 cond->__data.__broadcast_seq = 0;
2258 + LIBC_PROBE (cond_init, 2, cond, cond_attr);
2262 versioned_symbol (libpthread, __pthread_cond_init,
2263 --- glibc-2.14/nptl/pthread_cond_signal.c
2264 +++ glibc-2.14-2/nptl/pthread_cond_signal.c
2267 #include <shlib-compat.h>
2268 #include <kernel-features.h>
2269 +#include <stap-probe.h>
2273 @@ -35,6 +36,8 @@ __pthread_cond_signal (cond)
2274 int pshared = (cond->__data.__mutex == (void *) ~0l)
2275 ? LLL_SHARED : LLL_PRIVATE;
2277 + LIBC_PROBE (cond_signal, 1, cond);
2279 /* Make sure we are alone. */
2280 lll_lock (cond->__data.__lock, pshared);
2282 --- glibc-2.14/nptl/pthread_cond_wait.c
2283 +++ glibc-2.14-2/nptl/pthread_cond_wait.c
2285 #include <pthreadP.h>
2287 #include <shlib-compat.h>
2288 +#include <stap-probe.h>
2291 struct _condvar_cleanup_buffer
2292 @@ -101,6 +102,8 @@ __pthread_cond_wait (cond, mutex)
2293 int pshared = (cond->__data.__mutex == (void *) ~0l)
2294 ? LLL_SHARED : LLL_PRIVATE;
2296 + LIBC_PROBE (cond_wait, 2, cond, mutex);
2298 /* Make sure we are alone. */
2299 lll_lock (cond->__data.__lock, pshared);
2301 --- glibc-2.14/nptl/pthread_create.c
2302 +++ glibc-2.14-2/nptl/pthread_create.c
2305 #include <shlib-compat.h>
2307 +#include <stap-probe.h>
2310 /* Local function to start thread and handle cleanup. */
2311 static int start_thread (void *arg);
2312 @@ -296,6 +298,8 @@ start_thread (void *arg)
2313 CANCEL_RESET (oldtype);
2316 + LIBC_PROBE (pthread_start, 3, (pthread_t) pd, pd->start_routine, pd->arg);
2318 /* Run the code the user provided. */
2319 #ifdef CALL_THREAD_FCT
2320 THREAD_SETMEM (pd, result, CALL_THREAD_FCT (pd));
2321 @@ -552,6 +556,8 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg)
2322 /* Pass the descriptor to the caller. */
2323 *newthread = (pthread_t) pd;
2325 + LIBC_PROBE (pthread_create, 4, newthread, attr, start_routine, arg);
2327 /* Start the thread. */
2328 return create_thread (pd, iattr, STACK_VARIABLES_ARGS);
2330 --- glibc-2.14/nptl/pthread_join.c
2331 +++ glibc-2.14-2/nptl/pthread_join.c
2334 #include "pthreadP.h"
2336 +#include <stap-probe.h>
2341 @@ -55,6 +57,8 @@ pthread_join (threadid, thread_return)
2342 struct pthread *self = THREAD_SELF;
2345 + LIBC_PROBE (pthread_join, 1, threadid);
2347 /* During the wait we change to asynchronous cancellation. If we
2348 are canceled the thread we are waiting for must be marked as
2349 un-wait-ed for again. */
2350 @@ -110,5 +114,7 @@ pthread_join (threadid, thread_return)
2354 + LIBC_PROBE (pthread_join_ret, 3, threadid, result, pd->result);
2358 --- glibc-2.14/nptl/pthread_mutex_destroy.c
2359 +++ glibc-2.14-2/nptl/pthread_mutex_destroy.c
2362 #include "pthreadP.h"
2364 +#include <stap-probe.h>
2368 __pthread_mutex_destroy (mutex)
2369 pthread_mutex_t *mutex;
2371 + LIBC_PROBE (mutex_destroy, 1, mutex);
2373 if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0
2374 && mutex->__data.__nusers != 0)
2376 --- glibc-2.14/nptl/pthread_mutex_init.c
2377 +++ glibc-2.14-2/nptl/pthread_mutex_init.c
2379 #include <kernel-features.h>
2380 #include "pthreadP.h"
2382 +#include <stap-probe.h>
2384 static const struct pthread_mutexattr default_attr =
2386 /* Default is a normal mutex, not shared between processes. */
2387 @@ -135,6 +137,8 @@ __pthread_mutex_init (mutex, mutexattr)
2388 // mutex->__spins = 0; already done by memset
2389 // mutex->__next = NULL; already done by memset
2391 + LIBC_PROBE (mutex_init, 1, mutex);
2395 strong_alias (__pthread_mutex_init, pthread_mutex_init)
2396 --- glibc-2.14/nptl/pthread_mutex_lock.c
2397 +++ glibc-2.14-2/nptl/pthread_mutex_lock.c
2399 #include <not-cancel.h>
2400 #include "pthreadP.h"
2401 #include <lowlevellock.h>
2402 +#include <stap-probe.h>
2405 #ifndef LLL_MUTEX_LOCK
2406 @@ -48,6 +49,9 @@ __pthread_mutex_lock (mutex)
2407 assert (sizeof (mutex->__size) >= sizeof (mutex->__data));
2409 unsigned int type = PTHREAD_MUTEX_TYPE (mutex);
2411 + LIBC_PROBE (mutex_entry, 1, mutex);
2413 if (__builtin_expect (type & ~PTHREAD_MUTEX_KIND_MASK_NP, 0))
2414 return __pthread_mutex_lock_full (mutex);
2416 @@ -127,6 +131,8 @@ __pthread_mutex_lock (mutex)
2417 ++mutex->__data.__nusers;
2420 + LIBC_PROBE (mutex_acquired, 1, mutex);
2425 @@ -467,6 +473,8 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex)
2426 ++mutex->__data.__nusers;
2429 + LIBC_PROBE (mutex_acquired, 1, mutex);
2433 #ifndef __pthread_mutex_lock
2434 --- glibc-2.14/nptl/pthread_mutex_timedlock.c
2435 +++ glibc-2.14-2/nptl/pthread_mutex_timedlock.c
2437 #include <lowlevellock.h>
2438 #include <not-cancel.h>
2440 +#include <stap-probe.h>
2444 pthread_mutex_timedlock (mutex, abstime)
2445 @@ -34,6 +36,8 @@ pthread_mutex_timedlock (mutex, abstime)
2446 pid_t id = THREAD_GETMEM (THREAD_SELF, tid);
2449 + LIBC_PROBE (mutex_timedlock_entry, 2, mutex, abstime);
2451 /* We must not check ABSTIME here. If the thread does not block
2452 abstime must not be checked for a valid value. */
2454 @@ -172,6 +176,8 @@ pthread_mutex_timedlock (mutex, abstime)
2456 ++mutex->__data.__count;
2458 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2463 @@ -242,6 +248,8 @@ pthread_mutex_timedlock (mutex, abstime)
2465 ++mutex->__data.__count;
2467 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2472 @@ -377,6 +385,8 @@ pthread_mutex_timedlock (mutex, abstime)
2474 ++mutex->__data.__count;
2476 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2481 @@ -477,6 +487,8 @@ pthread_mutex_timedlock (mutex, abstime)
2482 /* Record the ownership. */
2483 mutex->__data.__owner = id;
2484 ++mutex->__data.__nusers;
2486 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2490 --- glibc-2.14/nptl/pthread_mutex_unlock.c
2491 +++ glibc-2.14-2/nptl/pthread_mutex_unlock.c
2494 #include "pthreadP.h"
2495 #include <lowlevellock.h>
2496 +#include <stap-probe.h>
2500 @@ -50,6 +51,9 @@ __pthread_mutex_unlock_usercnt (mutex, decr)
2503 lll_unlock (mutex->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex));
2505 + LIBC_PROBE (mutex_release, 1, mutex);
2509 else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1))
2510 @@ -272,6 +276,9 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
2511 PTHREAD_MUTEX_PSHARED (mutex));
2513 int oldprio = newval >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT;
2515 + LIBC_PROBE (mutex_release, 1, mutex);
2517 return __pthread_tpp_change_priority (oldprio, -1);
2520 @@ -279,6 +286,7 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
2524 + LIBC_PROBE (mutex_release, 1, mutex);
2528 --- glibc-2.14/nptl/pthread_rwlock_destroy.c
2529 +++ glibc-2.14-2/nptl/pthread_rwlock_destroy.c
2533 #include "pthreadP.h"
2534 +#include <stap-probe.h>
2538 __pthread_rwlock_destroy (rwlock)
2539 pthread_rwlock_t *rwlock;
2541 + LIBC_PROBE (rwlock_destroy, 1, rwlock);
2543 /* Nothing to be done. For now. */
2546 --- glibc-2.14/nptl/pthread_rwlock_rdlock.c
2547 +++ glibc-2.14-2/nptl/pthread_rwlock_rdlock.c
2549 #include <lowlevellock.h>
2550 #include <pthread.h>
2551 #include <pthreadP.h>
2552 +#include <stap-probe.h>
2555 /* Acquire read lock for RWLOCK. */
2556 @@ -31,6 +32,8 @@ __pthread_rwlock_rdlock (rwlock)
2560 + LIBC_PROBE (rdlock_entry, 1, rwlock);
2562 /* Make sure we are alone. */
2563 lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
2565 @@ -49,6 +52,8 @@ __pthread_rwlock_rdlock (rwlock)
2566 --rwlock->__data.__nr_readers;
2570 + LIBC_PROBE (rdlock_acquire_read, 1, rwlock);
2574 --- glibc-2.14/nptl/pthread_rwlock_unlock.c
2575 +++ glibc-2.14-2/nptl/pthread_rwlock_unlock.c
2577 #include <lowlevellock.h>
2578 #include <pthread.h>
2579 #include <pthreadP.h>
2580 +#include <stap-probe.h>
2582 /* Unlock RWLOCK. */
2584 __pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
2586 + LIBC_PROBE (rwlock_unlock, 1, rwlock);
2588 lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
2589 if (rwlock->__data.__writer)
2590 rwlock->__data.__writer = 0;
2591 --- glibc-2.14/nptl/pthread_rwlock_wrlock.c
2592 +++ glibc-2.14-2/nptl/pthread_rwlock_wrlock.c
2594 #include <lowlevellock.h>
2595 #include <pthread.h>
2596 #include <pthreadP.h>
2597 +#include <stap-probe.h>
2600 /* Acquire write lock for RWLOCK. */
2601 @@ -31,6 +32,8 @@ __pthread_rwlock_wrlock (rwlock)
2605 + LIBC_PROBE (wrlock_entry, 1, rwlock);
2607 /* Make sure we are alone. */
2608 lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
2610 @@ -41,6 +44,8 @@ __pthread_rwlock_wrlock (rwlock)
2612 /* Mark self as writer. */
2613 rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);
2615 + LIBC_PROBE (wrlock_acquire_write, 1, rwlock);
2619 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
2620 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
2622 /* Typed memory objects are not available. */
2623 #define _POSIX_TYPED_MEMORY_OBJECTS -1
2625 +/* Streams are not available. */
2626 +#define _XOPEN_STREAMS -1
2628 #endif /* bits/posix_opt.h */
2629 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/Versions
2630 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/Versions
2634 + # Internal libc interface to libpthread
2638 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2639 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2641 #include <kernel-features.h>
2642 #include <lowlevellock.h>
2644 +#include <stap-probe.h>
2648 #ifdef __ASSUME_PRIVATE_FUTEX
2649 @@ -91,7 +93,8 @@ __lll_lock_wait_private:
2650 cmpl %edx, %eax /* NB: %edx == 2 */
2653 -1: movl $SYS_futex, %eax
2654 +1: LIBC_PROBE (lll_lock_wait_private, 1, %ebx)
2655 + movl $SYS_futex, %eax
2659 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2660 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2662 #include <kernel-features.h>
2663 #include <pthread-pi-defines.h>
2664 #include <pthread-errnos.h>
2665 +#include <stap-probe.h>
2669 @@ -49,6 +50,8 @@ __pthread_cond_broadcast:
2673 + LIBC_PROBE (cond_broadcast, 1, %edx)
2675 /* Get internal lock. */
2678 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2679 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2681 #include <kernel-features.h>
2682 #include <pthread-pi-defines.h>
2683 #include <pthread-errnos.h>
2685 +#include <stap-probe.h>
2689 @@ -45,6 +45,8 @@ __pthread_cond_signal:
2693 + LIBC_PROBE (cond_signal, 1, %edi)
2695 /* Get internal lock. */
2698 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2699 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2701 #include <pthread-errnos.h>
2702 #include <pthread-pi-defines.h>
2703 #include <kernel-features.h>
2705 +#include <stap-probe.h>
2709 @@ -61,6 +61,8 @@ __pthread_cond_timedwait:
2713 + LIBC_PROBE (cond_timedwait, 3, %ebx, 24(%esp), %ebp)
2715 cmpl $1000000000, 4(%ebp)
2718 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2719 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2721 #include <pthread-errnos.h>
2722 #include <pthread-pi-defines.h>
2723 #include <kernel-features.h>
2724 +#include <stap-probe.h>
2728 @@ -61,6 +62,8 @@ __pthread_cond_wait:
2732 + LIBC_PROBE (cond_wait, 2, 24(%esp), %ebx)
2734 /* Get internal lock. */
2737 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
2738 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
2740 #include <pthread-errnos.h>
2741 #include <kernel-features.h>
2743 +#include <stap-probe.h>
2747 @@ -41,6 +42,8 @@ __pthread_rwlock_rdlock:
2751 + LIBC_PROBE (rdlock_entry, 1, %ebx)
2756 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
2757 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
2759 #include <pthread-errnos.h>
2760 #include <kernel-features.h>
2762 +#include <stap-probe.h>
2766 @@ -41,6 +42,8 @@ __pthread_rwlock_wrlock:
2770 + LIBC_PROBE (wrlock_entry, 1, %ebx)
2775 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
2776 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
2778 #ifndef _LOWLEVELLOCK_H
2779 #define _LOWLEVELLOCK_H 1
2781 +#include <stap-probe.h>
2783 #ifndef __ASSEMBLER__
2785 # include <sys/param.h>
2786 @@ -226,6 +228,7 @@ LLL_STUB_UNWIND_INFO_END
2789 register __typeof (nr) _nr asm ("edx") = (nr); \
2790 + LIBC_PROBE (lll_futex_wake, 3, futex, nr, private); \
2791 __asm __volatile (LLL_EBX_LOAD \
2794 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/smp.h
2795 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/smp.h
2796 @@ -37,7 +37,7 @@ is_smp_system (void)
2799 /* Try reading the number using `sysctl' first. */
2800 - if (uname (&u.uts) == 0)
2801 + if (__uname (&u.uts) == 0)
2805 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/kernel-features.h
2806 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/kernel-features.h
2808 +#include_next <kernel-features.h>
2810 +/* NPTL can always assume all clone thread flags work. */
2811 +#ifndef __ASSUME_CLONE_THREAD_FLAGS
2812 +# define __ASSUME_CLONE_THREAD_FLAGS 1
2814 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2815 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2817 #include <kernel-features.h>
2818 #include <lowlevellock.h>
2820 +#include <stap-probe.h>
2824 #ifdef __ASSUME_PRIVATE_FUTEX
2825 @@ -91,7 +93,8 @@ __lll_lock_wait_private:
2826 cmpl %edx, %eax /* NB: %edx == 2 */
2829 -1: movl $SYS_futex, %eax
2830 +1: LIBC_PROBE (lll_lock_wait_private, 1, %rdi)
2831 + movl $SYS_futex, %eax
2835 @@ -130,7 +133,8 @@ __lll_lock_wait:
2836 cmpl %edx, %eax /* NB: %edx == 2 */
2839 -1: movl $SYS_futex, %eax
2840 +1: LIBC_PROBE (lll_lock_wait, 2, %rdi, %rsi)
2841 + movl $SYS_futex, %eax
2845 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2846 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2848 #ifndef _LOWLEVELLOCK_H
2849 #define _LOWLEVELLOCK_H 1
2851 +#include <stap-probe.h>
2853 #ifndef __ASSEMBLER__
2855 # include <sys/param.h>
2856 @@ -227,6 +229,7 @@ LLL_STUB_UNWIND_INFO_END
2859 register __typeof (nr) _nr __asm ("edx") = (nr); \
2860 + LIBC_PROBE (lll_futex_wake, 3, futex, nr, private); \
2861 __asm __volatile ("syscall" \
2863 : "0" (SYS_futex), "D" (futex), \
2864 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2865 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2867 #include <kernel-features.h>
2868 #include <pthread-pi-defines.h>
2869 #include <pthread-errnos.h>
2871 +#include <stap-probe.h>
2877 __pthread_cond_broadcast:
2879 + LIBC_PROBE (cond_broadcast, 1, %rdi)
2881 /* Get internal lock. */
2884 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2885 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2887 #include <pthread-pi-defines.h>
2888 #include <kernel-features.h>
2889 #include <pthread-errnos.h>
2890 +#include <stap-probe.h>
2896 __pthread_cond_signal:
2898 + LIBC_PROBE (cond_signal, 1, %rdi)
2900 /* Get internal lock. */
2903 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2904 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2906 #include <lowlevelcond.h>
2907 #include <pthread-pi-defines.h>
2908 #include <pthread-errnos.h>
2909 +#include <stap-probe.h>
2911 #include <kernel-features.h>
2913 @@ -71,6 +72,8 @@ __pthread_cond_timedwait:
2914 cfi_adjust_cfa_offset(FRAME_SIZE)
2917 + LIBC_PROBE (cond_timedwait, 3, %rdi, %rsi, %rdx)
2919 cmpq $1000000000, 8(%rdx)
2922 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2923 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2925 #include <lowlevelcond.h>
2926 #include <tcb-offsets.h>
2927 #include <pthread-pi-defines.h>
2928 +#include <stap-probe.h>
2930 #include <kernel-features.h>
2932 @@ -65,6 +66,8 @@ __pthread_cond_wait:
2933 +--------------------------+
2936 + LIBC_PROBE (cond_wait, 2, %rdi, %rsi)
2938 cmpq $-1, dep_mutex(%rdi)
2940 /* Prepare structure passed to cancellation handler. */
2941 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
2942 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
2944 #include <lowlevelrwlock.h>
2945 #include <pthread-errnos.h>
2946 #include <kernel-features.h>
2948 +#include <stap-probe.h>
2954 __pthread_rwlock_rdlock:
2957 + LIBC_PROBE (rdlock_entry, 1, %rdi)
2962 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
2963 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
2965 #include <lowlevelrwlock.h>
2966 #include <pthread-errnos.h>
2967 #include <kernel-features.h>
2969 +#include <stap-probe.h>
2975 __pthread_rwlock_wrlock:
2978 + LIBC_PROBE (wrlock_entry, 1, %rdi)
2983 --- glibc-2.14/nscd/nscd.conf
2984 +++ glibc-2.14-2/nscd/nscd.conf
2986 # logfile /var/log/nscd.log
2989 -# server-user nobody
2991 # stat-user somebody
2994 --- glibc-2.14/nscd/nscd.init
2995 +++ glibc-2.14-2/nscd/nscd.init
2997 # slow naming services like NIS, NIS+, LDAP, or hesiod.
2998 # processname: /usr/sbin/nscd
2999 # config: /etc/nscd.conf
3000 +# config: /etc/sysconfig/nscd
3005 # Source function library.
3006 . /etc/init.d/functions
3008 -# nscd does not run on any kernel lower than 2.2.0 because of threading
3009 -# problems, so we require that in first place.
3010 -case $(uname -r) in
3015 - # these are of course also okay
3022 +# Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS.
3023 +[ -r /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd
3027 @@ -50,7 +39,7 @@ start () {
3028 [ -d /var/run/nscd ] || mkdir /var/run/nscd
3029 [ -d /var/db/nscd ] || mkdir /var/db/nscd
3030 echo -n $"Starting $prog: "
3031 - daemon /usr/sbin/nscd
3032 + daemon /usr/sbin/nscd $NSCD_OPTIONS
3035 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
3036 @@ -83,11 +72,11 @@ restart() {
3037 # See how we were called.
3041 + [ -e /var/lock/subsys/nscd ] || start
3046 + [ ! -e /var/lock/subsys/nscd ] || stop
3050 @@ -99,14 +88,17 @@ case "$1" in
3053 try-restart | condrestart)
3054 - [ -e /var/lock/subsys/nscd ] && restart
3055 + [ ! -e /var/lock/subsys/nscd ] || restart
3058 force-reload | reload)
3059 echo -n $"Reloading $prog: "
3060 - killproc /usr/sbin/nscd -HUP
3064 + /usr/sbin/nscd -i passwd || RETVAL=$?
3065 + /usr/sbin/nscd -i group || RETVAL=$?
3066 + /usr/sbin/nscd -i hosts || RETVAL=$?
3067 + /usr/sbin/nscd -i services || RETVAL=$?
3071 echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
3072 --- glibc-2.14/nscd/nscd_getserv_r.c
3073 +++ glibc-2.14-2/nscd/nscd_getserv_r.c
3074 @@ -124,6 +124,7 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
3075 s_name = (char *) (&found->data[0].servdata + 1);
3076 serv_resp = found->data[0].servdata;
3077 s_proto = s_name + serv_resp.s_name_len;
3078 + alloca_aliases_len = 1;
3079 aliases_len = (uint32_t *) (s_proto + serv_resp.s_proto_len);
3080 aliases_list = ((char *) aliases_len
3081 + serv_resp.s_aliases_cnt * sizeof (uint32_t));
3082 @@ -154,7 +155,9 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
3083 + (serv_resp.s_aliases_cnt
3084 * sizeof (uint32_t)));
3085 if (alloca_aliases_len)
3086 - tmp = __alloca (serv_resp.s_aliases_cnt * sizeof (uint32_t));
3087 + tmp = alloca_account (serv_resp.s_aliases_cnt
3088 + * sizeof (uint32_t),
3092 tmp = malloc (serv_resp.s_aliases_cnt * sizeof (uint32_t));
3093 @@ -249,8 +252,9 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
3094 + (serv_resp.s_aliases_cnt
3095 * sizeof (uint32_t)));
3096 if (alloca_aliases_len)
3097 - aliases_len = alloca (serv_resp.s_aliases_cnt
3098 - * sizeof (uint32_t));
3099 + aliases_len = alloca_account (serv_resp.s_aliases_cnt
3100 + * sizeof (uint32_t),
3104 aliases_len = malloc (serv_resp.s_aliases_cnt
3105 @@ -368,7 +372,11 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
3111 + if (!alloca_aliases_len)
3112 + free (aliases_len);
3117 if (!alloca_aliases_len)
3118 --- glibc-2.14/nss/Makefile
3119 +++ glibc-2.14-2/nss/Makefile
3120 @@ -75,6 +75,7 @@ endif
3124 +CFLAGS-files-hosts.c += -fno-strict-aliasing
3126 ifeq (yes,$(build-static-nss))
3127 $(objpfx)getent: $(objpfx)libnss_files.a
3128 --- glibc-2.14/nss/nss_files/files-XXX.c
3129 +++ glibc-2.14-2/nss/nss_files/files-XXX.c
3131 /* Common code for file-based databases in nss_files module.
3132 - Copyright (C) 1996-1999,2001,2002,2004,2007,2008
3133 + Copyright (C) 1996-1999,2001,2002,2004,2007,2008,2010
3134 Free Software Foundation, Inc.
3135 This file is part of the GNU C Library.
3137 @@ -190,7 +190,7 @@ internal_getent (struct STRUCTURE *result,
3140 struct parser_data *data = (void *) buffer;
3141 - int linebuflen = buffer + buflen - data->linebuffer;
3142 + size_t linebuflen = buffer + buflen - data->linebuffer;
3145 if (buflen < sizeof *data + 2)
3146 --- glibc-2.14/posix/Makefile
3147 +++ glibc-2.14-2/posix/Makefile
3148 @@ -325,15 +325,8 @@ $(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
3149 mv -f $@/$$spec.new $@/$$spec; \
3150 done < $(objpfx)getconf.speclist
3152 -$(objpfx)getconf.speclist: $(objpfx)getconf
3153 -ifeq (no,$(cross-compiling))
3154 - LC_ALL=C GETCONF_DIR=/dev/null \
3155 - $(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
3156 - LC_ALL=C GETCONF_DIR=/dev/null \
3157 - $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new
3158 - LC_ALL=C GETCONF_DIR=/dev/null \
3159 - $(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new
3163 +$(objpfx)getconf.speclist: getconf.speclist.h
3164 + $(CC) -E $(CFLAGS) $(CPPFLAGS) $< \
3165 + | sed -n -e '/START_OF_STRINGS/,$${/\(POSIX_V[67]\|_XBS5\)_/{s/^[^"]*"//;s/".*$$//;p}}' \
3168 --- glibc-2.14/posix/gai.conf
3169 +++ glibc-2.14-2/posix/gai.conf
3172 # precedence <mask> <value>
3173 # Add another rule to the RFC 3484 precedence table. See section 2.1
3174 -# and 10.3 in RFC 3484. The default is:
3175 +# and 10.3 in RFC 3484. The RFC requires:
3177 #precedence ::1/128 50
3180 # Add another rule to the RFC 3484 scope table for IPv4 addresses.
3181 # By default the scope IDs described in section 3.2 in RFC 3484 are
3182 # used. Changing these defaults should hardly ever be necessary.
3183 -# The defaults are equivalent to:
3184 +# The definitions in RFC 1918 are equivalent to:
3186 #scopev4 ::ffff:169.254.0.0/112 2
3187 #scopev4 ::ffff:127.0.0.0/104 2
3189 #scopev4 ::ffff:169.254.0.0/112 2
3190 #scopev4 ::ffff:127.0.0.0/104 2
3191 #scopev4 ::ffff:0.0.0.0/96 14
3193 +# This is what the Red Hat setting currently uses.
3194 --- glibc-2.14/posix/getconf.speclist.h
3195 +++ glibc-2.14-2/posix/getconf.speclist.h
3197 +#include <unistd.h>
3198 +const char *START_OF_STRINGS =
3199 +#if _POSIX_V7_ILP32_OFF32 == 1
3200 +"POSIX_V7_ILP32_OFF32"
3202 +#if _POSIX_V7_ILP32_OFFBIG == 1
3203 +"POSIX_V7_ILP32_OFFBIG"
3205 +#if _POSIX_V7_LP64_OFF64 == 1
3206 +"POSIX_V7_LP64_OFF64"
3208 +#if _POSIX_V7_LPBIG_OFFBIG == 1
3209 +"POSIX_V7_LPBIG_OFFBIG"
3211 +#if _POSIX_V6_ILP32_OFF32 == 1
3212 +"POSIX_V6_ILP32_OFF32"
3214 +#if _POSIX_V6_ILP32_OFFBIG == 1
3215 +"POSIX_V6_ILP32_OFFBIG"
3217 +#if _POSIX_V6_LP64_OFF64 == 1
3218 +"POSIX_V6_LP64_OFF64"
3220 +#if _POSIX_V6_LPBIG_OFFBIG == 1
3221 +"POSIX_V6_LPBIG_OFFBIG"
3223 +#if _XBS5_ILP32_OFF32 == 1
3226 +#if _XBS5_ILP32_OFFBIG == 1
3227 +"XBS5_ILP32_OFFBIG"
3229 +#if _XBS5_LP64_OFF64 == 1
3232 +#if _XBS5_LPBIG_OFFBIG == 1
3233 +"XBS5_LPBIG_OFFBIG"
3236 --- glibc-2.14/posix/regcomp.c
3237 +++ glibc-2.14-2/posix/regcomp.c
3238 @@ -2745,40 +2745,29 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3240 /* Local function for parse_bracket_exp used in _LIBC environement.
3241 Seek the collating symbol entry correspondings to NAME.
3242 - Return the index of the symbol in the SYMB_TABLE. */
3243 + Return the index of the symbol in the SYMB_TABLE,
3244 + or -1 if not found. */
3247 __attribute ((always_inline))
3248 - seek_collating_symbol_entry (name, name_len)
3249 - const unsigned char *name;
3251 + seek_collating_symbol_entry (const unsigned char *name, size_t name_len)
3253 - int32_t hash = elem_hash ((const char *) name, name_len);
3254 - int32_t elem = hash % table_size;
3255 - if (symb_table[2 * elem] != 0)
3257 - int32_t second = hash % (table_size - 2) + 1;
3261 - /* First compare the hashing value. */
3262 - if (symb_table[2 * elem] == hash
3263 - /* Compare the length of the name. */
3264 - && name_len == extra[symb_table[2 * elem + 1]]
3265 - /* Compare the name. */
3266 - && memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
3269 - /* Yep, this is the entry. */
3277 - while (symb_table[2 * elem] != 0);
3280 + for (elem = 0; elem < table_size; elem++)
3281 + if (symb_table[2 * elem] != 0)
3283 + int32_t idx = symb_table[2 * elem + 1];
3284 + /* Skip the name of collating element name. */
3285 + idx += 1 + extra[idx];
3286 + if (/* Compare the length of the name. */
3287 + name_len == extra[idx]
3288 + /* Compare the name. */
3289 + && memcmp (name, &extra[idx + 1], name_len) == 0)
3290 + /* Yep, this is the entry. */
3296 /* Local function for parse_bracket_exp used in _LIBC environment.
3297 @@ -2787,8 +2776,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3299 auto inline unsigned int
3300 __attribute ((always_inline))
3301 - lookup_collation_sequence_value (br_elem)
3302 - bracket_elem_t *br_elem;
3303 + lookup_collation_sequence_value (bracket_elem_t *br_elem)
3305 if (br_elem->type == SB_CHAR)
3307 @@ -2816,7 +2804,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3309 elem = seek_collating_symbol_entry (br_elem->opr.name,
3311 - if (symb_table[2 * elem] != 0)
3314 /* We found the entry. */
3315 idx = symb_table[2 * elem + 1];
3316 @@ -2834,7 +2822,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3317 /* Return the collation sequence value. */
3318 return *(unsigned int *) (extra + idx);
3320 - else if (symb_table[2 * elem] == 0 && sym_name_len == 1)
3321 + else if (sym_name_len == 1)
3323 /* No valid character. Match it as a single byte
3325 @@ -2856,11 +2844,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3327 auto inline reg_errcode_t
3328 __attribute ((always_inline))
3329 - build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
3330 - re_charset_t *mbcset;
3333 - bracket_elem_t *start_elem, *end_elem;
3334 + build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
3335 + bracket_elem_t *start_elem, bracket_elem_t *end_elem)
3338 uint32_t start_collseq;
3339 @@ -2939,25 +2924,22 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3341 auto inline reg_errcode_t
3342 __attribute ((always_inline))
3343 - build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
3344 - re_charset_t *mbcset;
3345 - int *coll_sym_alloc;
3347 - const unsigned char *name;
3348 + build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
3349 + int *coll_sym_alloc, const unsigned char *name)
3352 size_t name_len = strlen ((const char *) name);
3355 elem = seek_collating_symbol_entry (name, name_len);
3356 - if (symb_table[2 * elem] != 0)
3359 /* We found the entry. */
3360 idx = symb_table[2 * elem + 1];
3361 /* Skip the name of collating element name. */
3362 idx += 1 + extra[idx];
3364 - else if (symb_table[2 * elem] == 0 && name_len == 1)
3365 + else if (name_len == 1)
3367 /* No valid character, treat it as a normal
3369 --- glibc-2.14/resolv/Makefile
3370 +++ glibc-2.14-2/resolv/Makefile
3371 @@ -77,6 +77,7 @@ CPPFLAGS += -Dgethostbyname=res_gethostbyname \
3372 -Dgetnetbyaddr=res_getnetbyaddr
3374 CFLAGS-res_hconf.c = -fexceptions
3375 +CFLAGS-res_send.c += -fno-strict-aliasing
3377 # The BIND code elicits some harmless warnings.
3378 +cflags += -Wno-strict-prototypes -Wno-write-strings
3379 --- glibc-2.14/resolv/res_send.c
3380 +++ glibc-2.14-2/resolv/res_send.c
3381 @@ -549,7 +549,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
3382 ns, ansp, ansp2, nansp2, resplen2);
3385 - if (n == 0 && (buf2 == NULL || resplen2 == 0))
3389 /* Use datagrams. */
3390 @@ -559,7 +559,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
3391 ansp2, nansp2, resplen2);
3394 - if (n == 0 && (buf2 == NULL || resplen2 == 0))
3398 // XXX Check whether both requests failed or
3399 @@ -1275,14 +1275,10 @@ send_dg(res_state statp,
3400 (*thisresplenp > *thisanssizp)
3401 ? *thisanssizp : *thisresplenp);
3403 - if (recvresp1 || (buf2 != NULL && recvresp2)) {
3405 + if (recvresp1 || (buf2 != NULL && recvresp2))
3410 - /* No data from the first reply. */
3412 /* We are waiting for a possible second reply. */
3413 if (hp->id == anhp->id)
3415 @@ -1348,7 +1344,7 @@ send_dg(res_state statp,
3419 - /* poll should not have returned > 0 in this case. */
3420 + /* poll should not have returned > 0 in this case. */
3424 --- glibc-2.14/resource/getrlimit.c
3425 +++ glibc-2.14-2/resource/getrlimit.c
3426 @@ -28,6 +28,7 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
3427 __set_errno (ENOSYS);
3430 +libc_hidden_def (__getrlimit)
3431 weak_alias (__getrlimit, getrlimit)
3433 stub_warning (getrlimit)
3434 --- glibc-2.14/scripts/check-local-headers.sh
3435 +++ glibc-2.14-2/scripts/check-local-headers.sh
3436 @@ -31,6 +31,8 @@ fgrep -v "$includedir/asm" |
3437 fgrep -v "$includedir/linux" |
3438 fgrep -v "$includedir/selinux" |
3439 fgrep -v "$includedir/sys/capability.h" |
3440 +fgrep -v "$includedir/sys/sdt.h" |
3441 +fgrep -v "$includedir/sys/sdt-config.h" |
3442 fgrep -v "$includedir/gd" |
3443 fgrep -v "$includedir/nss3"; then
3444 # If we found a match something is wrong.
3445 --- glibc-2.14/stdio-common/vfprintf.c
3446 +++ glibc-2.14-2/stdio-common/vfprintf.c
3447 @@ -1161,41 +1161,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
3448 else if (!is_long && spec != L_('S')) \
3452 - /* Search for the end of the string, but don't search past \
3453 - the length (in bytes) specified by the precision. Also \
3454 - don't use incomplete characters. */ \
3455 - if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX) == 1) \
3456 - len = __strnlen (string, prec); \
3459 - /* In case we have a multibyte character set the \
3460 - situation is more complicated. We must not copy \
3461 - bytes at the end which form an incomplete character. */\
3462 - size_t ignore_size = (unsigned) prec > 1024 ? 1024 : prec;\
3463 - wchar_t ignore[ignore_size]; \
3464 - const char *str2 = string; \
3465 - const char *strend = string + prec; \
3466 - if (strend < string) \
3467 - strend = (const char *) UINTPTR_MAX; \
3470 - memset (&ps, '\0', sizeof (ps)); \
3472 - while (str2 != NULL && str2 < strend) \
3473 - if (__mbsnrtowcs (ignore, &str2, strend - str2, \
3474 - ignore_size, &ps) == (size_t) -1) \
3480 - if (str2 == NULL) \
3481 - len = strlen (string); \
3483 - len = str2 - string - (ps.__count & 7); \
3486 + /* Search for the end of the string, but don't search past \
3487 + the length (in bytes) specified by the precision. */ \
3488 + len = __strnlen (string, prec); \
3490 len = strlen (string); \
3492 --- glibc-2.14/streams/Makefile
3493 +++ glibc-2.14-2/streams/Makefile
3498 -headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
3499 +#headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
3500 routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach
3503 --- glibc-2.14/sunrpc/Makefile
3504 +++ glibc-2.14-2/sunrpc/Makefile
3505 @@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
3507 headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
3508 $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
3509 -headers = rpc/netdb.h
3510 +headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
3511 install-others = $(inst_sysconfdir)/rpc
3512 generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
3513 $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
3514 @@ -152,6 +152,10 @@ CFLAGS-openchild.c = -fexceptions
3516 CPPFLAGS += -D_RPC_THREAD_SAFE_
3518 +CFLAGS-clnt_tcp.c += -fno-strict-aliasing
3519 +CFLAGS-clnt_udp.c += -fno-strict-aliasing
3520 +CFLAGS-clnt_unix.c += -fno-strict-aliasing
3522 $(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
3523 $(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
3524 $(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
3525 --- glibc-2.14/sysdeps/generic/dl-cache.h
3526 +++ glibc-2.14-2/sysdeps/generic/dl-cache.h
3528 # define add_system_dir(dir) add_dir (dir)
3531 +#ifndef arch_startup
3532 +# define arch_startup(argc, argv) do { } while (0)
3535 +#ifndef add_arch_dirs
3536 +# define add_arch_dirs(config_file) do { } while (0)
3539 #define CACHEMAGIC "ld.so-1.7.0"
3541 /* libc5 and glibc 2.0/2.1 use the same format. For glibc 2.2 another
3542 --- glibc-2.14/sysdeps/i386/Makefile
3543 +++ glibc-2.14-2/sysdeps/i386/Makefile
3545 # Every i386 port in use uses gas syntax (I think).
3546 asm-CPPFLAGS += -DGAS_SYNTAX
3548 +sysdep-ASFLAGS += -U__i686
3550 # The i386 `long double' is a distinct type we support.
3551 long-double-fcts = yes
3553 @@ -65,6 +67,14 @@ endif
3555 ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
3556 defines += -DNO_TLS_DIRECT_SEG_REFS
3558 +# .a libraries are not performance critical and so we
3559 +# build them without direct TLS segment references
3561 +CPPFLAGS-.o += -DNO_TLS_DIRECT_SEG_REFS
3562 +CFLAGS-.o += -mno-tls-direct-seg-refs
3563 +CPPFLAGS-.oS += -DNO_TLS_DIRECT_SEG_REFS
3564 +CFLAGS-.oS += -mno-tls-direct-seg-refs
3567 ifeq ($(subdir),elf)
3568 --- glibc-2.14/sysdeps/i386/__longjmp.S
3569 +++ glibc-2.14-2/sysdeps/i386/__longjmp.S
3571 /* longjmp for i386.
3572 - Copyright (C) 1995-1998,2000,2002,2005,2006,2009
3573 + Copyright (C) 1995-1998,2000,2002,2005,2006,2009,2011
3574 Free Software Foundation, Inc.
3575 This file is part of the GNU C Library.
3579 #include <jmpbuf-offsets.h>
3580 #include <asm-syntax.h>
3581 +#include <stap-probe.h>
3585 @@ -33,6 +34,7 @@ ENTRY (__longjmp)
3586 movl (JB_SP*4)(%eax), %ecx
3589 + LIBC_PROBE (longjmp, 3, 4@%eax, -4@8(%esp), 4@%edx)
3590 cfi_def_cfa(%eax, 0)
3591 cfi_register(%eip, %edx)
3592 cfi_register(%esp, %ecx)
3593 @@ -50,6 +52,7 @@ ENTRY (__longjmp)
3597 + LIBC_PROBE (longjmp_target, 3, 4@%eax, -4@8(%esp), 4@%edx)
3598 movl 8(%esp), %eax /* Second argument is return value. */
3601 @@ -57,12 +60,14 @@ ENTRY (__longjmp)
3602 movl 8(%esp), %eax /* Second argument is return value. */
3603 /* Save the return address now. */
3604 movl (JB_PC*4)(%ecx), %edx
3605 + LIBC_PROBE (longjmp, 3, 4@%ecx, -4@%eax, 4@%edx)
3606 /* Restore registers. */
3607 movl (JB_BX*4)(%ecx), %ebx
3608 movl (JB_SI*4)(%ecx), %esi
3609 movl (JB_DI*4)(%ecx), %edi
3610 movl (JB_BP*4)(%ecx), %ebp
3611 movl (JB_SP*4)(%ecx), %esp
3612 + LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%ecx, 4@%edx)
3614 /* Jump to saved PC. */
3616 --- glibc-2.14/sysdeps/i386/bsd-_setjmp.S
3617 +++ glibc-2.14-2/sysdeps/i386/bsd-_setjmp.S
3619 /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. i386 version.
3620 - Copyright (C) 1994-1997,2000-2002,2005, 2006 Free Software Foundation, Inc.
3621 + Copyright (C) 1994-1997,2000-2002,2005,2006,2011
3622 + Free Software Foundation, Inc.
3623 This file is part of the GNU C Library.
3625 The GNU C Library is free software; you can redistribute it and/or
3627 #include <jmpbuf-offsets.h>
3630 +#include <stap-probe.h>
3632 #define PARMS LINKAGE /* no space for saved regs */
3633 #define JMPBUF PARMS
3634 @@ -47,6 +49,7 @@ ENTRY (BP_SYM (_setjmp))
3636 movl %ecx, (JB_SP*4)(%edx)
3637 movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
3638 + LIBC_PROBE (setjmp, 3, 4@%edx, -4@$0, 4@%ecx)
3642 --- glibc-2.14/sysdeps/i386/bsd-setjmp.S
3643 +++ glibc-2.14-2/sysdeps/i386/bsd-setjmp.S
3645 /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. i386 version.
3646 - Copyright (C) 1994-1997,2000,2001,2005, 2006 Free Software Foundation, Inc.
3647 + Copyright (C) 1994-1997,2000,2001,2005,2006,2011
3648 + Free Software Foundation, Inc.
3649 This file is part of the GNU C Library.
3651 The GNU C Library is free software; you can redistribute it and/or
3653 #include <jmpbuf-offsets.h>
3656 +#include <stap-probe.h>
3658 #define PARMS LINKAGE /* no space for saved regs */
3659 #define JMPBUF PARMS
3660 @@ -49,6 +51,7 @@ ENTRY (BP_SYM (setjmp))
3662 movl %ecx, (JB_SP*4)(%eax)
3663 movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
3664 + LIBC_PROBE (setjmp, 3, 4@%eax, -4@$1, 4@%ecx)
3668 --- glibc-2.14/sysdeps/i386/i686/Makefile
3669 +++ glibc-2.14-2/sysdeps/i386/i686/Makefile
3670 @@ -9,19 +9,3 @@ stack-align-test-flags += -msse
3671 ifeq ($(subdir),string)
3672 sysdep_routines += cacheinfo
3675 -ifeq (yes,$(config-asflags-i686))
3676 -CFLAGS-.o += -Wa,-mtune=i686
3677 -CFLAGS-.os += -Wa,-mtune=i686
3678 -CFLAGS-.op += -Wa,-mtune=i686
3679 -CFLAGS-.og += -Wa,-mtune=i686
3680 -CFLAGS-.ob += -Wa,-mtune=i686
3681 -CFLAGS-.oS += -Wa,-mtune=i686
3683 -ASFLAGS-.o += -Wa,-mtune=i686
3684 -ASFLAGS-.os += -Wa,-mtune=i686
3685 -ASFLAGS-.op += -Wa,-mtune=i686
3686 -ASFLAGS-.og += -Wa,-mtune=i686
3687 -ASFLAGS-.ob += -Wa,-mtune=i686
3688 -ASFLAGS-.oS += -Wa,-mtune=i686
3690 --- glibc-2.14/sysdeps/i386/i686/multiarch/strspn.S
3691 +++ glibc-2.14-2/sysdeps/i386/i686/multiarch/strspn.S
3692 @@ -76,8 +76,8 @@ END(strspn)
3693 # define ENTRY(name) \
3694 .type __strspn_ia32, @function; \
3695 .globl __strspn_ia32; \
3697 - __strspn_ia32: cfi_startproc; \
3699 +__strspn_ia32: cfi_startproc; \
3702 # define END(name) \
3703 --- glibc-2.14/sysdeps/i386/setjmp.S
3704 +++ glibc-2.14-2/sysdeps/i386/setjmp.S
3707 - Copyright (C) 1995,1996,1997,2000,2001,2005,2006
3708 + Copyright (C) 1995,1996,1997,2000,2001,2005,2006,2011
3709 Free Software Foundation, Inc.
3710 This file is part of the GNU C Library.
3713 #include <asm-syntax.h>
3716 +#include <stap-probe.h>
3718 #define PARMS LINKAGE /* no space for saved regs */
3719 #define JMPBUF PARMS
3720 @@ -44,6 +45,7 @@ ENTRY (BP_SYM (__sigsetjmp))
3722 movl %ecx, (JB_SP*4)(%eax)
3723 movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
3724 + LIBC_PROBE (setjmp, 3, 4@%eax, -4@SIGMSK(%esp), 4@%ecx)
3728 --- glibc-2.14/sysdeps/ia64/Makefile
3729 +++ glibc-2.14-2/sysdeps/ia64/Makefile
3730 @@ -12,8 +12,8 @@ elide-routines.os += hp-timing
3732 ifeq (yes,$(build-shared))
3734 -sysdep_routines += ia64libgcc
3735 -shared-only-routines += ia64libgcc
3736 +sysdep_routines += libgcc-compat
3737 +shared-only-routines += libgcc-compat
3741 --- glibc-2.14/sysdeps/ia64/ia64libgcc.S
3742 +++ glibc-2.14-2/sysdeps/ia64/ia64libgcc.S
3744 -/* From the Intel IA-64 Optimization Guide, choose the minimum latency
3747 -#include <sysdep.h>
3750 -#include <shlib-compat.h>
3752 -#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
3755 - Compute a 80-bit IEEE double-extended quotient.
3756 - farg0 holds the dividend. farg1 holds the divisor. */
3759 - cmp.eq p7, p0 = r0, r0
3760 - frcpa.s0 f10, p6 = farg0, farg1
3762 -(p6) cmp.ne p7, p0 = r0, r0
3763 - .pred.rel.mutex p6, p7
3764 -(p6) fnma.s1 f11 = farg1, f10, f1
3765 -(p6) fma.s1 f12 = farg0, f10, f0
3767 -(p6) fma.s1 f13 = f11, f11, f0
3768 -(p6) fma.s1 f14 = f11, f11, f11
3770 -(p6) fma.s1 f11 = f13, f13, f11
3771 -(p6) fma.s1 f13 = f14, f10, f10
3773 -(p6) fma.s1 f10 = f13, f11, f10
3774 -(p6) fnma.s1 f11 = farg1, f12, farg0
3776 -(p6) fma.s1 f11 = f11, f10, f12
3777 -(p6) fnma.s1 f12 = farg1, f10, f1
3779 -(p6) fma.s1 f10 = f12, f10, f10
3780 -(p6) fnma.s1 f12 = farg1, f11, farg0
3782 -(p6) fma.s0 fret0 = f12, f10, f11
3783 -(p7) mov fret0 = f10
3786 - .symver ___divtf3, __divtf3@GLIBC_2.2
3789 - Compute a 64-bit IEEE double quotient.
3790 - farg0 holds the dividend. farg1 holds the divisor. */
3793 - cmp.eq p7, p0 = r0, r0
3794 - frcpa.s0 f10, p6 = farg0, farg1
3796 -(p6) cmp.ne p7, p0 = r0, r0
3797 - .pred.rel.mutex p6, p7
3798 -(p6) fmpy.s1 f11 = farg0, f10
3799 -(p6) fnma.s1 f12 = farg1, f10, f1
3801 -(p6) fma.s1 f11 = f12, f11, f11
3802 -(p6) fmpy.s1 f13 = f12, f12
3804 -(p6) fma.s1 f10 = f12, f10, f10
3805 -(p6) fma.s1 f11 = f13, f11, f11
3807 -(p6) fmpy.s1 f12 = f13, f13
3808 -(p6) fma.s1 f10 = f13, f10, f10
3810 -(p6) fma.d.s1 f11 = f12, f11, f11
3811 -(p6) fma.s1 f10 = f12, f10, f10
3813 -(p6) fnma.d.s1 f8 = farg1, f11, farg0
3815 -(p6) fma.d fret0 = f8, f10, f11
3816 -(p7) mov fret0 = f10
3820 - .symver ___divdf3, __divdf3@GLIBC_2.2
3823 - Compute a 32-bit IEEE float quotient.
3824 - farg0 holds the dividend. farg1 holds the divisor. */
3827 - cmp.eq p7, p0 = r0, r0
3828 - frcpa.s0 f10, p6 = farg0, farg1
3830 -(p6) cmp.ne p7, p0 = r0, r0
3831 - .pred.rel.mutex p6, p7
3832 -(p6) fmpy.s1 f8 = farg0, f10
3833 -(p6) fnma.s1 f9 = farg1, f10, f1
3835 -(p6) fma.s1 f8 = f9, f8, f8
3836 -(p6) fmpy.s1 f9 = f9, f9
3838 -(p6) fma.s1 f8 = f9, f8, f8
3839 -(p6) fmpy.s1 f9 = f9, f9
3841 -(p6) fma.d.s1 f10 = f9, f8, f8
3843 -(p6) fnorm.s.s0 fret0 = f10
3844 -(p7) mov fret0 = f10
3848 - .symver ___divsf3, __divsf3@GLIBC_2.2
3851 - Compute a 64-bit integer quotient.
3852 - in0 holds the dividend. in1 holds the divisor. */
3856 - /* Transfer inputs to FP registers. */
3860 - /* Convert the inputs to FP, so that they won't be treated as
3865 - /* Compute the reciprocal approximation. */
3866 - frcpa.s1 f10, p6 = f8, f9
3868 - /* 3 Newton-Raphson iterations. */
3869 -(p6) fnma.s1 f11 = f9, f10, f1
3870 -(p6) fmpy.s1 f12 = f8, f10
3872 -(p6) fmpy.s1 f13 = f11, f11
3873 -(p6) fma.s1 f12 = f11, f12, f12
3875 -(p6) fma.s1 f10 = f11, f10, f10
3876 -(p6) fma.s1 f11 = f13, f12, f12
3878 -(p6) fma.s1 f10 = f13, f10, f10
3879 -(p6) fnma.s1 f12 = f9, f11, f8
3881 -(p6) fma.s1 f10 = f12, f10, f11
3883 - /* Round quotient to an integer. */
3884 - fcvt.fx.trunc.s1 f10 = f10
3886 - /* Transfer result to GP registers. */
3887 - getf.sig ret0 = f10
3891 - .symver ___divdi3, __divdi3@GLIBC_2.2
3894 - Compute a 64-bit integer modulus.
3895 - in0 holds the dividend (a). in1 holds the divisor (b). */
3899 - /* Transfer inputs to FP registers. */
3900 - setf.sig f14 = in0
3903 - /* Convert the inputs to FP, so that they won't be treated as
3908 - /* Compute the reciprocal approximation. */
3909 - frcpa.s1 f10, p6 = f8, f9
3911 - /* 3 Newton-Raphson iterations. */
3912 -(p6) fmpy.s1 f12 = f8, f10
3913 -(p6) fnma.s1 f11 = f9, f10, f1
3915 -(p6) fma.s1 f12 = f11, f12, f12
3916 -(p6) fmpy.s1 f13 = f11, f11
3918 -(p6) fma.s1 f10 = f11, f10, f10
3919 -(p6) fma.s1 f11 = f13, f12, f12
3922 -(p6) fma.s1 f10 = f13, f10, f10
3923 -(p6) fnma.s1 f12 = f9, f11, f8
3926 -(p6) fma.s1 f10 = f12, f10, f11
3928 - fcvt.fx.trunc.s1 f10 = f10
3930 - /* r = q * (-b) + a */
3931 - xma.l f10 = f10, f9, f14
3933 - /* Transfer result to GP registers. */
3934 - getf.sig ret0 = f10
3938 - .symver ___moddi3, __moddi3@GLIBC_2.2
3941 - Compute a 64-bit unsigned integer quotient.
3942 - in0 holds the dividend. in1 holds the divisor. */
3946 - /* Transfer inputs to FP registers. */
3950 - /* Convert the inputs to FP, to avoid FP software-assist faults. */
3951 - fcvt.xuf.s1 f8 = f8
3952 - fcvt.xuf.s1 f9 = f9
3954 - /* Compute the reciprocal approximation. */
3955 - frcpa.s1 f10, p6 = f8, f9
3957 - /* 3 Newton-Raphson iterations. */
3958 -(p6) fnma.s1 f11 = f9, f10, f1
3959 -(p6) fmpy.s1 f12 = f8, f10
3961 -(p6) fmpy.s1 f13 = f11, f11
3962 -(p6) fma.s1 f12 = f11, f12, f12
3964 -(p6) fma.s1 f10 = f11, f10, f10
3965 -(p6) fma.s1 f11 = f13, f12, f12
3967 -(p6) fma.s1 f10 = f13, f10, f10
3968 -(p6) fnma.s1 f12 = f9, f11, f8
3970 -(p6) fma.s1 f10 = f12, f10, f11
3972 - /* Round quotient to an unsigned integer. */
3973 - fcvt.fxu.trunc.s1 f10 = f10
3975 - /* Transfer result to GP registers. */
3976 - getf.sig ret0 = f10
3980 - .symver ___udivdi3, __udivdi3@GLIBC_2.2
3983 - Compute a 64-bit unsigned integer modulus.
3984 - in0 holds the dividend (a). in1 holds the divisor (b). */
3988 - /* Transfer inputs to FP registers. */
3989 - setf.sig f14 = in0
3992 - /* Convert the inputs to FP, to avoid FP software assist faults. */
3993 - fcvt.xuf.s1 f8 = f14
3994 - fcvt.xuf.s1 f9 = f9
3996 - /* Compute the reciprocal approximation. */
3997 - frcpa.s1 f10, p6 = f8, f9
3999 - /* 3 Newton-Raphson iterations. */
4000 -(p6) fmpy.s1 f12 = f8, f10
4001 -(p6) fnma.s1 f11 = f9, f10, f1
4003 -(p6) fma.s1 f12 = f11, f12, f12
4004 -(p6) fmpy.s1 f13 = f11, f11
4006 -(p6) fma.s1 f10 = f11, f10, f10
4007 -(p6) fma.s1 f11 = f13, f12, f12
4010 -(p6) fma.s1 f10 = f13, f10, f10
4011 -(p6) fnma.s1 f12 = f9, f11, f8
4014 -(p6) fma.s1 f10 = f12, f10, f11
4016 - /* Round quotient to an unsigned integer. */
4017 - fcvt.fxu.trunc.s1 f10 = f10
4019 - /* r = q * (-b) + a */
4020 - xma.l f10 = f10, f9, f14
4022 - /* Transfer result to GP registers. */
4023 - getf.sig ret0 = f10
4027 - .symver ___umoddi3, __umoddi3@GLIBC_2.2
4030 - Compute a 128-bit multiply of 128-bit multiplicands.
4031 - in0/in1 holds one multiplicand (a), in2/in3 holds the other one (b). */
4036 - movl r19 = 0xffffffff
4039 - and r14 = r19, in0
4041 - setf.sig f10 = r14
4042 - and r14 = r19, in2
4043 - xmpy.l f9 = f6, f7
4046 - shr.u r14 = in0, 32
4049 - shr.u r14 = in2, 32
4052 - xmpy.l f11 = f10, f6
4053 - xmpy.l f6 = f7, f6
4055 - getf.sig r16 = f11
4056 - xmpy.l f7 = f7, f8
4058 - shr.u r14 = r16, 32
4059 - and r16 = r19, r16
4063 - setf.sig f11 = r14
4067 - xma.l f11 = f10, f8, f11
4068 - xma.l f6 = f6, f7, f9
4070 - getf.sig r18 = f11
4072 - add r18 = r18, r17
4074 - and r15 = r19, r18
4075 - cmp.ltu p7, p6 = r18, r17
4078 -(p7) adds r14 = 1, r19
4080 -(p7) add r21 = r21, r14
4081 - shr.u r14 = r18, 32
4084 - add r20 = r21, r14
4086 - add ret0 = r15, r16
4087 - add ret1 = r22, r20
4091 - .symver ___multi3, __multi3@GLIBC_2.2
4094 --- glibc-2.14/sysdeps/ia64/libgcc-compat.c
4095 +++ glibc-2.14-2/sysdeps/ia64/libgcc-compat.c
4097 +/* pre-.hidden libgcc compatibility
4098 + Copyright (C) 2002 Free Software Foundation, Inc.
4099 + This file is part of the GNU C Library.
4101 + The GNU C Library is free software; you can redistribute it and/or
4102 + modify it under the terms of the GNU Lesser General Public
4103 + License as published by the Free Software Foundation; either
4104 + version 2.1 of the License, or (at your option) any later version.
4106 + The GNU C Library is distributed in the hope that it will be useful,
4107 + but WITHOUT ANY WARRANTY; without even the implied warranty of
4108 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4109 + Lesser General Public License for more details.
4111 + You should have received a copy of the GNU Lesser General Public
4112 + License along with the GNU C Library; if not, write to the Free
4113 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4114 + 02111-1307 USA. */
4117 +#include <stdint.h>
4118 +#include <shlib-compat.h>
4120 +#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
4122 +typedef int int128_t __attribute__((__mode__(TI)));
4124 +extern long double __divtf3 (long double, long double) attribute_hidden;
4125 +long double INTUSE (__divtf3) (long double x, long double y)
4127 + return __divtf3 (x, y);
4129 +symbol_version (INTUSE (__divtf3), __divtf3, GLIBC_2.2);
4131 +extern double __divdf3 (double, double) attribute_hidden;
4132 +double INTUSE (__divdf3) (double x, double y)
4134 + return __divdf3 (x, y);
4136 +symbol_version (INTUSE (__divdf3), __divdf3, GLIBC_2.2);
4138 +extern float __divsf3 (float, float) attribute_hidden;
4139 +float INTUSE (__divsf3) (float x, float y)
4141 + return __divsf3 (x, y);
4143 +symbol_version (INTUSE (__divsf3), __divsf3, GLIBC_2.2);
4145 +extern int64_t __divdi3 (int64_t, int64_t) attribute_hidden;
4146 +int64_t INTUSE (__divdi3) (int64_t x, int64_t y)
4148 + return __divdi3 (x, y);
4150 +symbol_version (INTUSE (__divdi3), __divdi3, GLIBC_2.2);
4152 +extern int64_t __moddi3 (int64_t, int64_t) attribute_hidden;
4153 +int64_t INTUSE (__moddi3) (int64_t x, int64_t y)
4155 + return __moddi3 (x, y);
4157 +symbol_version (INTUSE (__moddi3), __moddi3, GLIBC_2.2);
4159 +extern uint64_t __udivdi3 (uint64_t, uint64_t) attribute_hidden;
4160 +uint64_t INTUSE (__udivdi3) (uint64_t x, uint64_t y)
4162 + return __udivdi3 (x, y);
4164 +symbol_version (INTUSE (__udivdi3), __udivdi3, GLIBC_2.2);
4166 +extern uint64_t __umoddi3 (uint64_t, uint64_t) attribute_hidden;
4167 +uint64_t INTUSE (__umoddi3) (uint64_t x, uint64_t y)
4169 + return __umoddi3 (x, y);
4171 +symbol_version (INTUSE (__umoddi3), __umoddi3, GLIBC_2.2);
4173 +extern int128_t __multi3 (int128_t, int128_t) attribute_hidden;
4174 +int128_t INTUSE (__multi3) (int128_t x, int128_t y)
4176 + return __multi3 (x, y);
4178 +symbol_version (INTUSE (__multi3), __multi3, GLIBC_2.2);
4181 --- glibc-2.14/sysdeps/mach/hurd/getrlimit.c
4182 +++ glibc-2.14-2/sysdeps/mach/hurd/getrlimit.c
4183 @@ -44,4 +44,5 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
4187 +libc_hidden_def (__getrlimit)
4188 weak_alias (__getrlimit, getrlimit)
4189 --- glibc-2.14/sysdeps/posix/getaddrinfo.c
4190 +++ glibc-2.14-2/sysdeps/posix/getaddrinfo.c
4191 @@ -1335,10 +1335,12 @@ static const struct scopeentry
4192 /* Link-local addresses: scope 2. */
4193 { { { 169, 254, 0, 0 } }, htonl_c (0xffff0000), 2 },
4194 { { { 127, 0, 0, 0 } }, htonl_c (0xff000000), 2 },
4196 /* Site-local addresses: scope 5. */
4197 { { { 10, 0, 0, 0 } }, htonl_c (0xff000000), 5 },
4198 { { { 172, 16, 0, 0 } }, htonl_c (0xfff00000), 5 },
4199 { { { 192, 168, 0, 0 } }, htonl_c (0xffff0000), 5 },
4201 /* Default: scope 14. */
4202 { { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 }
4204 --- glibc-2.14/sysdeps/powerpc/powerpc64/Makefile
4205 +++ glibc-2.14-2/sysdeps/powerpc/powerpc64/Makefile
4206 @@ -33,6 +33,7 @@ ifneq ($(elf),no)
4207 # we use -fpic instead which is much better.
4208 CFLAGS-initfini.s += -fpic -O1
4210 +CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
4213 ifeq ($(subdir),elf)
4214 --- glibc-2.14/sysdeps/powerpc/powerpc64/elf/Makefile
4215 +++ glibc-2.14-2/sysdeps/powerpc/powerpc64/elf/Makefile
4216 @@ -9,3 +9,5 @@ CFLAGS-rtld-mempcpy.os = $(no-special-regs)
4217 CFLAGS-rtld-memmove.os = $(no-special-regs)
4218 CFLAGS-rtld-memchr.os = $(no-special-regs)
4219 CFLAGS-rtld-strnlen.os = $(no-special-regs)
4221 +CFLAGS-gmon-start.c = -fno-strict-aliasing
4222 --- glibc-2.14/sysdeps/unix/nice.c
4223 +++ glibc-2.14-2/sysdeps/unix/nice.c
4224 @@ -42,7 +42,12 @@ nice (int incr)
4228 - result = setpriority (PRIO_PROCESS, 0, prio + incr);
4230 + if (prio < PRIO_MIN)
4232 + else if (prio >= PRIO_MAX)
4233 + prio = PRIO_MAX - 1;
4234 + result = setpriority (PRIO_PROCESS, 0, prio);
4237 if (errno == EACCES)
4238 --- glibc-2.14/sysdeps/unix/sysv/linux/check_pf.c
4239 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/check_pf.c
4242 #include <sys/socket.h>
4244 -#include <asm/types.h>
4245 -#include <linux/netlink.h>
4246 -#include <linux/rtnetlink.h>
4248 #include <not-cancel.h>
4249 #include <kernel-features.h>
4251 +#include "netlinkaccess.h"
4253 #ifndef IFA_F_HOMEADDRESS
4254 # define IFA_F_HOMEADDRESS 0
4255 --- glibc-2.14/sysdeps/unix/sysv/linux/futimesat.c
4256 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/futimesat.c
4257 @@ -37,14 +37,14 @@ futimesat (fd, file, tvp)
4262 + return __futimes (fd, tvp);
4264 #ifdef __NR_futimesat
4265 # ifndef __ASSUME_ATFCTS
4266 if (__have_atfcts >= 0)
4270 - return __futimes (fd, tvp);
4272 result = INLINE_SYSCALL (futimesat, 3, fd, file, tvp);
4273 # ifndef __ASSUME_ATFCTS
4274 if (result == -1 && errno == ENOSYS)
4275 @@ -58,22 +58,7 @@ futimesat (fd, file, tvp)
4276 #ifndef __ASSUME_ATFCTS
4281 - static const char procfd[] = "/proc/self/fd/%d";
4282 - /* Buffer for the path name we are going to use. It consists of
4283 - - the string /proc/self/fd/
4284 - - the file descriptor number.
4285 - The final NUL is included in the sizeof. A bit of overhead
4286 - due to the format elements compensates for possible negative
4288 - size_t buflen = sizeof (procfd) + sizeof (int) * 3;
4289 - buf = alloca (buflen);
4291 - __snprintf (buf, buflen, procfd, fd);
4294 - else if (fd != AT_FDCWD && file[0] != '/')
4295 + if (fd != AT_FDCWD && file[0] != '/')
4297 size_t filelen = strlen (file);
4298 if (__builtin_expect (filelen == 0, 0))
4299 --- glibc-2.14/sysdeps/unix/sysv/linux/getpagesize.c
4300 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/getpagesize.c
4305 -#ifdef __ASSUME_AT_PAGESIZE
4306 +#if 0 && defined __ASSUME_AT_PAGESIZE
4307 assert (GLRO(dl_pagesize) != 0);
4308 return GLRO(dl_pagesize);
4310 --- glibc-2.14/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
4311 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
4313 -/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
4314 +/* Copyright (C) 2001,2004,2005,2006,2009,2011
4315 + Free Software Foundation, Inc.
4316 This file is part of the GNU C Library.
4318 The GNU C Library is free software; you can redistribute it and/or
4321 #include <jmpbuf-offsets.h>
4322 #include <asm-syntax.h>
4323 +#include <stap-probe.h>
4326 .section .rodata.str1.1,"aMS",@progbits,1
4327 @@ -79,7 +81,9 @@ ENTRY (____longjmp_chk)
4328 cfi_adjust_cfa_offset(-12)
4331 -.Lok: /* We add unwind information for the target here. */
4333 + LIBC_PROBE (longjmp, 3, 4@%ecx, -4@8(%esp), 4@%edx)
4334 + /* We add unwind information for the target here. */
4335 cfi_def_cfa(%ecx, 0)
4336 cfi_register(%eip, %edx)
4337 cfi_register(%esp, %edi)
4338 @@ -102,5 +106,6 @@ ENTRY (____longjmp_chk)
4341 /* Jump to saved PC. */
4342 + LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%eax, 4@%edx)
4344 END (____longjmp_chk)
4345 --- glibc-2.14/sysdeps/unix/sysv/linux/i386/dl-cache.h
4346 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/i386/dl-cache.h
4348 +/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
4349 + Copyright (C) 2004 Free Software Foundation, Inc.
4350 + This file is part of the GNU C Library.
4352 + The GNU C Library is free software; you can redistribute it and/or
4353 + modify it under the terms of the GNU Lesser General Public
4354 + License as published by the Free Software Foundation; either
4355 + version 2.1 of the License, or (at your option) any later version.
4357 + The GNU C Library is distributed in the hope that it will be useful,
4358 + but WITHOUT ANY WARRANTY; without even the implied warranty of
4359 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4360 + Lesser General Public License for more details.
4362 + You should have received a copy of the GNU Lesser General Public
4363 + License along with the GNU C Library; if not, write to the Free
4364 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4365 + 02111-1307 USA. */
4370 + unsigned int fl1, fl2;
4372 + /* See if we can use cpuid. */
4373 + __asm__ ("pushfl; pushfl; popl %0; movl %0,%1; xorl %2,%0;"
4374 + "pushl %0; popfl; pushfl; popl %0; popfl"
4375 + : "=&r" (fl1), "=&r" (fl2)
4376 + : "i" (0x00200000));
4377 + if (((fl1 ^ fl2) & 0x00200000) == 0)
4380 + /* Host supports cpuid. See if cpuid gives capabilities, try
4381 + CPUID(0). Preserve %ebx and %ecx; cpuid insn clobbers these, we
4382 + don't need their CPUID values here, and %ebx may be the PIC
4384 + __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
4385 + : "=a" (fl1) : "0" (0) : "edx", "cc");
4389 + /* Invoke CPUID(1), return %edx; caller can examine bits to
4390 + determine what's supported. */
4391 + __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
4392 + : "=d" (fl2), "=a" (fl1) : "1" (1) : "cc");
4393 + return (fl2 & (1 << 30)) != 0;
4396 +#define arch_startup(argc, argv) \
4398 + /* On IA-64, try to execute 64-bit ldconfig if possible. \
4399 + This is because the badly designed /emul/ia32-linux hack \
4400 + will cause 32-bit ldconfig to do all sorts of weird things. */ \
4402 + execv ("/emul/ia32-linux/../../sbin/ldconfig", \
4403 + (char *const *) argv); \
4406 +#include_next <dl-cache.h>
4407 --- glibc-2.14/sysdeps/unix/sysv/linux/i386/getrlimit.c
4408 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/i386/getrlimit.c
4409 @@ -79,4 +79,5 @@ __new_getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
4412 weak_alias (__new_getrlimit, __getrlimit);
4413 +libc_hidden_weak (__getrlimit)
4414 versioned_symbol (libc, __new_getrlimit, getrlimit, GLIBC_2_2);
4415 --- glibc-2.14/sysdeps/unix/sysv/linux/ia64/dl-cache.h
4416 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/ia64/dl-cache.h
4418 #define _dl_cache_check_flags(flags) \
4419 ((flags) == _DL_CACHE_DEFAULT_ID)
4421 +#define EMUL_HACK "/emul/ia32-linux"
4423 +#define arch_startup(argc, argv) unlink (EMUL_HACK LD_SO_CACHE)
4425 +#define add_arch_dirs(config_file) \
4427 + int save_verbose = opt_verbose; \
4428 + opt_verbose = 0; \
4430 + parse_conf (config_file, EMUL_HACK, true); \
4432 + /* Always add the standard search paths. */ \
4433 + add_system_dir (EMUL_HACK SLIBDIR); \
4434 + if (strcmp (SLIBDIR, LIBDIR)) \
4435 + add_system_dir (EMUL_HACK LIBDIR); \
4437 + char emul_config_file[strlen (config_file) \
4438 + + sizeof EMUL_HACK]; \
4439 + strcpy (mempcpy (emul_config_file, EMUL_HACK, \
4440 + strlen (EMUL_HACK)), config_file); \
4442 + if (! access (emul_config_file, R_OK)) \
4443 + parse_conf (emul_config_file, EMUL_HACK, true); \
4445 + opt_verbose = save_verbose; \
4448 #include_next <dl-cache.h>
4449 --- glibc-2.14/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c
4450 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c
4452 +#ifdef IS_IN_ldconfig
4453 +#include <sysdeps/i386/dl-procinfo.c>
4455 +#include <sysdeps/generic/dl-procinfo.c>
4457 --- glibc-2.14/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h
4458 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h
4460 +#ifdef IS_IN_ldconfig
4461 +#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
4463 +#include <sysdeps/generic/dl-procinfo.h>
4465 --- glibc-2.14/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
4466 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
4468 -s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_
4469 +s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 /emul/ia32-linux\2\3"_
4470 --- glibc-2.14/sysdeps/unix/sysv/linux/netlinkaccess.h
4471 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/netlinkaccess.h
4474 #include <kernel-features.h>
4477 +/* 2.6.19 kernel headers helpfully removed some macros and
4478 + moved lots of stuff into new headers, some of which aren't
4479 + included by linux/rtnetlink.h. */
4480 +#include <linux/if_addr.h>
4484 +# define IFA_RTA(r) \
4485 + ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifaddrmsg))))
4486 +# define IFA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifaddrmsg))
4490 +# define IFLA_RTA(r) \
4491 + ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifinfomsg))))
4492 +# define IFLA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifinfomsg))
4497 --- glibc-2.14/sysdeps/unix/sysv/linux/paths.h
4498 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/paths.h
4500 #define _PATH_TTY "/dev/tty"
4501 #define _PATH_UNIX "/boot/vmlinux"
4502 #define _PATH_UTMP "/var/run/utmp"
4503 -#define _PATH_VI "/usr/bin/vi"
4504 +#define _PATH_VI "/bin/vi"
4505 #define _PATH_WTMP "/var/log/wtmp"
4507 /* Provide trailing slash, since mostly used for building pathnames. */
4508 --- glibc-2.14/sysdeps/unix/sysv/linux/tcsetattr.c
4509 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/tcsetattr.c
4510 @@ -49,6 +49,7 @@ tcsetattr (fd, optional_actions, termios_p)
4512 struct __kernel_termios k_termios;
4513 unsigned long int cmd;
4516 switch (optional_actions)
4518 @@ -80,6 +81,35 @@ tcsetattr (fd, optional_actions, termios_p)
4519 memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
4520 __KERNEL_NCCS * sizeof (cc_t));
4522 - return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
4523 + retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
4525 + if (retval == 0 && cmd == TCSETS)
4527 + /* The Linux kernel has a bug which silently ignore the invalid
4528 + c_cflag on pty. We have to check it here. */
4530 + retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
4533 + /* We cannot verify if the setting is ok. We don't return
4535 + __set_errno (save);
4538 + else if ((termios_p->c_cflag & (PARENB | CREAD))
4539 + != (k_termios.c_cflag & (PARENB | CREAD))
4540 + || ((termios_p->c_cflag & CSIZE)
4541 + && ((termios_p->c_cflag & CSIZE)
4542 + != (k_termios.c_cflag & CSIZE))))
4544 + /* It looks like the Linux kernel silently changed the
4545 + PARENB/CREAD/CSIZE bits in c_cflag. Report it as an
4547 + __set_errno (EINVAL);
4554 libc_hidden_def (tcsetattr)
4555 --- glibc-2.14/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
4556 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
4559 #include <jmpbuf-offsets.h>
4560 #include <asm-syntax.h>
4561 +#include <stap-probe.h>
4563 .section .rodata.str1.1,"aMS",@progbits,1
4564 .type longjmp_msg,@object
4565 @@ -94,7 +95,9 @@ ENTRY(____longjmp_chk)
4569 -.Lok: /* We add unwind information for the target here. */
4571 + LIBC_PROBE (longjmp, 3, 8@%rdi, -4@%esi, 8@%rdx)
4572 + /* We add unwind information for the target here. */
4573 cfi_def_cfa(%rdi, 0)
4574 cfi_register(%rsp,%r8)
4575 cfi_register(%rbp,%r9)
4576 @@ -113,5 +116,6 @@ ENTRY(____longjmp_chk)
4580 + LIBC_PROBE (longjmp_target, 3, 8@%rdi, -4@%eax, 8@%rdx)
4582 END (____longjmp_chk)
4583 --- glibc-2.14/sysdeps/x86_64/__longjmp.S
4584 +++ glibc-2.14-2/sysdeps/x86_64/__longjmp.S
4586 -/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
4587 +/* Copyright (C) 2001,2004,2005,2006,2009,2011 Free Software Foundation, Inc.
4588 This file is part of the GNU C Library.
4590 The GNU C Library is free software; you can redistribute it and/or
4593 #include <jmpbuf-offsets.h>
4594 #include <asm-syntax.h>
4595 +#include <stap-probe.h>
4597 /* Jump to the position specified by ENV, causing the
4598 setjmp call there to return VAL, or 1 if VAL is 0.
4599 @@ -34,6 +35,7 @@ ENTRY(__longjmp)
4603 + LIBC_PROBE (longjmp, 3, 8@%rdi, -4@%esi, 8@%rdx)
4604 /* We add unwind information for the target here. */
4605 cfi_def_cfa(%rdi, 0)
4606 cfi_register(%rsp,%r8)
4607 @@ -53,5 +55,6 @@ ENTRY(__longjmp)
4611 + LIBC_PROBE (longjmp_target, 3, 8@%rdi, -4@%eax, 8@%rdx)
4614 --- glibc-2.14/sysdeps/x86_64/setjmp.S
4615 +++ glibc-2.14-2/sysdeps/x86_64/setjmp.S
4617 /* setjmp for x86-64.
4618 - Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
4619 + Copyright (C) 2001,2003,2005,2006,2011 Free Software Foundation, Inc.
4620 This file is part of the GNU C Library.
4622 The GNU C Library is free software; you can redistribute it and/or
4625 #include <jmpbuf-offsets.h>
4626 #include <asm-syntax.h>
4627 +#include <stap-probe.h>
4630 /* Save registers. */
4631 @@ -41,6 +42,7 @@ ENTRY (__sigsetjmp)
4633 movq %rdx, (JB_RSP*8)(%rdi)
4634 movq (%rsp), %rax /* Save PC we are returning to now. */
4635 + LIBC_PROBE (setjmp, 3, 8@%rdi, -4@%esi, 8@%rax)
4639 --- glibc-2.14/timezone/zic.c
4640 +++ glibc-2.14-2/timezone/zic.c
4641 @@ -1921,7 +1921,7 @@ const int zonecount;
4642 if (stdrp != NULL && stdrp->r_hiyear == 2037)
4645 - if (stdrp == NULL && zp->z_nrules != 0)
4646 + if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_stdoff != 0))
4648 abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar;
4649 doabbr(result, zp->z_format, abbrvar, FALSE, TRUE);