1 diff -Nrup a/ChangeLog b/ChangeLog
2 --- a/ChangeLog 2012-01-01 05:16:32.000000000 -0700
3 +++ b/ChangeLog 2012-01-01 20:41:26.621439845 -0700
6 * sysdeps/mach/hurd/sys/param.h (DEV_BSIZE): New macro.
8 +2011-09-02 Andreas Schwab <schwab@redhat.com>
10 + * nscd/selinux.c (avc_create_thread): Set PR_SET_KEEPCAPS before
11 + spawning AVC thread.
13 2011-09-08 Andreas Schwab <schwab@redhat.com>
15 * elf/dl-load.c (lose): Check for non-null L.
16 @@ -2804,6 +2809,11 @@
17 * sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix cfi
20 +2011-08-31 Andreas Schwab <schwab@redhat.com>
22 + * include/link.h (FORCED_DYNAMIC_TLS_OFFSET) [NO_TLS_OFFSET == 0]:
25 2011-08-24 David S. Miller <davem@davemloft.net>
27 * sysdeps/sparc/sparc64/strcmp.S: Rewrite.
28 @@ -3609,6 +3619,14 @@
29 * config.make.in: Likewise.
30 * malloc/Makefile: Likewise.
32 +2011-06-28 Andreas Schwab <schwab@redhat.com>
34 + * iconvdata/gb18030.c: Update tables.
35 + (BODY for FROM_LOOP): Handle non-BMP characters specially.
37 + * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't use gethostbyaddr
38 + to determine canonical name.
40 2011-06-27 Andreas Schwab <schwab@redhat.com>
42 * iconvdata/gb18030.c (BODY for TO_LOOP): Fix encoding of non-BMP
43 @@ -3740,6 +3758,10 @@
45 * inet/getnetgrent_r.c: Use DL_CALL_FCT in several places.
47 +2011-06-21 Andreas Schwab <schwab@redhat.com>
49 + * iconvdata/gb18030.c: Regenerate tables.
51 2011-06-20 David S. Miller <davem@davemloft.net>
53 * sysdeps/sparc/sparc32/dl-plt.h: Protect against multiple
54 @@ -4362,6 +4384,13 @@
55 * libio/Makefile (tests): Add bug-fclose1.
56 * libio/bug-fclose1.c: New file.
58 +2011-05-13 Andreas Schwab <schwab@redhat.com>
60 + * elf/dl-load.c (is_dst): Remove parameter secure, all callers
61 + changed. Move check for valid use of $ORIGIN ...
62 + (_dl_dst_substitute): ... here. Reset check_for_trusted when a
63 + path element is skipped.
65 2011-05-12 Ulrich Drepper <drepper@gmail.com>
68 @@ -4639,13 +4668,6 @@
69 * stdlib/bug-getcontext.c: New file.
70 * stdlib/Makefile: Add rules to build and run bug-getcontext.
72 -2011-04-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
74 - * sysdeps/s390/s390-64/utf16-utf32-z9.c: Wrap the z9-109
75 - instructions into .machine "z9-109".
76 - * sysdeps/s390/s390-64/utf8-utf16-z9.c: Likewise.
77 - * sysdeps/s390/s390-64/utf8-utf32-z9.c: Likewise.
79 2011-04-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
81 * sysdeps/s390/s390-32/elf/start.S (_start): Skip extra zeroes
82 @@ -4883,6 +4905,31 @@
83 * sysdeps/unix/sysv/linux/Versions [GLIBC_2.14] (clock_adjtime):
86 +2011-04-06 Andreas Schwab <schwab@redhat.com>
88 + * scripts/check-local-headers.sh: Ignore systemtap headers.
90 +2011-02-21 Roland McGrath <roland@redhat.com>
92 + * sysdeps/x86_64/__longjmp.S: Add a static probe here.
93 + * sysdeps/x86_64/setjmp.S: Likewise.
94 + * sysdeps/i386/bsd-setjmp.S: Likewise.
95 + * sysdeps/i386/bsd-_setjmp.S: Likewise.
96 + * sysdeps/i386/setjmp.S: Likewise.
97 + * sysdeps/i386/__longjmp.S: Likewise.
98 + * sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S: Likewise.
99 + * sysdeps/unix/sysv/linux/i386/____longjmp_chk.S: Likewise.
101 +2011-02-08 Roland McGrath <roland@redhat.com>
103 + * include/stap-probe.h: New file.
104 + * configure.in: Handle --enable-systemtap.
105 + * configure: Regenerated.
106 + * config.h.in (USE_STAP_PROBE): New #undef.
107 + * extra-lib.mk (CPPFLAGS-$(lib)): Add -DIN_LIB=$(lib).
108 + * elf/Makefile (CPPFLAGS-.os): Add -DIN_LIB=rtld.
109 + * elf/rtld-Rules (rtld-CPPFLAGS): Likewise.
111 2011-03-22 Ulrich Drepper <drepper@gmail.com>
113 * sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word): Increment
114 @@ -4943,6 +4990,16 @@
115 $LDFLAGS and -nostdlib -nostartfiles to linking step. Change main
118 +2011-03-18 Andreas Schwab <schwab@redhat.com>
120 + * elf/ldd.bash.in: Never run file directly.
122 +2011-03-07 Andreas Schwab <schwab@redhat.com>
124 + * include/link.h (struct link_map): Remove l_orig_initfini.
125 + * elf/dl-close.c (_dl_close_worker): Revert its use.
126 + * elf/dl-deps.c (_dl_map_object_deps): Likewise.
128 2011-03-06 Ulrich Drepper <drepper@gmail.com>
130 * elf/dl-load.c (_dl_map_object): If we are looking for the first
131 @@ -5159,6 +5216,12 @@
132 * shadow/sgetspent.c: Check return value of __sgetspent_r instead
135 +2011-02-03 Andreas Schwab <schwab@redhat.com>
137 + * login/programs/pt_chown.c (main): Check for valid file
138 + descriptor instead of privileges. Be careful to drop all
139 + capabilities when not needed.
141 2011-01-19 Ulrich Drepper <drepper@gmail.com>
144 @@ -5846,6 +5909,26 @@
145 * sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS):
146 Mask out sign-bit copies when constructing f_fsid.
148 +2010-09-27 Andreas Schwab <schwab@redhat.com>
150 + * include/link.h (struct link_map): Add l_free_initfini.
151 + * elf/dl-deps.c (_dl_map_object_deps): Set it when assigning
153 + * elf/rtld.c (dl_main): Clear it on all objects loaded on startup.
154 + * elf/dl-libc.c (free_mem): Free l_initfini if l_free_initfini is
158 + * posix/regcomp.c (parse_bracket_exp): When looking up collating
159 + elements compare against the byte sequence of it, not its name.
162 + * stdio-common/vfprintf.c (process_string_arg): Revert 2000-07-22
165 + * nss/nss_files/files-XXX.c (internal_getent): Declare linebuflen
168 2010-09-24 Petr Baudis <pasky@suse.cz>
170 * debug/stack_chk_fail_local.c: Add missing licence exception.
171 @@ -6638,6 +6721,17 @@
172 call returning > 0 value.
173 * sysdeps/unix/sysv/linux/getlogin.c (getlogin): Likewise.
175 +2010-07-01 Andreas Schwab <schwab@redhat.com>
177 + * include/sys/resource.h (__getrlimit): Add hidden proto.
178 + * sysdeps/unix/sysv/linux/i386/getrlimit.c: Add libc_hidden_weak.
179 + * sysdeps/mach/hurd/getrlimit.c: Add libc_hidden_def.
180 + * resource/getrlimit.c: Likewise.
182 +2010-06-21 Andreas Schwab <schwab@redhat.com>
184 + * sysdeps/i386/i686/Makefile: Don't pass -mtune to assembler.
186 2010-06-07 Andreas Schwab <schwab@redhat.com>
188 * dlfcn/Makefile: Remove explicit dependencies on libc.so and
189 @@ -6690,6 +6784,21 @@
190 * hurd/hurd/fd.h (__file_name_lookup_at): Update comment.
191 * sysdeps/mach/hurd/linkat.c (linkat): Pass O_NOLINK in FLAGS.
193 +2010-06-11 Andreas Schwab <schwab@redhat.com>
195 + * elf/rtld.c (_dl_starting_up): Always define.
196 + (dl_main): Always set _dl_starting_up.
197 + * elf/dl-support.c (_dl_starting_up): Always define.
198 + * elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
200 +2010-06-10 Andreas Schwab <schwab@redhat.com>
202 + * sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
204 + * nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
205 + * sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
206 + * nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
208 2010-05-28 Luis Machado <luisgpm@br.ibm.com>
210 * sysdeps/powerpc/powerpc32/power7/memcpy.S: Exchange srdi for srwi.
211 diff -Nrup a/ChangeLog.15 b/ChangeLog.15
212 --- a/ChangeLog.15 2012-01-01 05:16:32.000000000 -0700
213 +++ b/ChangeLog.15 2012-01-01 20:41:26.623439845 -0700
216 2004-11-26 Jakub Jelinek <jakub@redhat.com>
218 + * posix/Makefile (generated: Add getconf.speclist.
219 + ($(inst_libexecdir)/getconf): Use getconf.speclist instead of
221 + ($(objpfx)getconf.speclist): New rule.
222 + * posix/getconf.speclist.h: New file.
224 +2004-11-26 Jakub Jelinek <jakub@redhat.com>
226 * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add GETCONF_DIR.
228 2004-11-26 Kaz Kojima <kkojima@rr.iij4u.or.jp>
229 @@ -1103,6 +1111,13 @@
230 * sysdeps/generic/tempname.c (__path_search): Add missing argument
233 +2004-11-02 Jakub Jelinek <jakub@redhat.com>
235 + * include/features.h (__USE_FORTIFY_LEVEL): Also set for Red Hat
236 + GCC 3.4.x-RH >= 3.4.2-8.
237 + * debug/tst-chk1.c (do_test): Deal with GCC 3.4.x-RH not
238 + being able to recognize subobjects.
240 2004-10-31 Mariusz Mazur <mmazur@kernel.pl>
242 * sysdeps/unix/sysv/linux/alpha/setregid.c: New file.
243 @@ -1443,6 +1458,11 @@
244 * sysdeps/generic/readonly-area.c (__readonly_str): Renamed to ...
245 (__readonly_area): ... this.
247 +2004-10-19 Jakub Jelinek <jakub@redhat.com>
249 + * include/features.h (__USE_FORTIFY_LEVEL): Enable even with
250 + Red Hat gcc4 4.0.0 and above.
252 2004-10-18 Jakub Jelinek <jakub@redhat.com>
254 * sysdeps/generic/strcpy_chk.c (__strcpy_chk): Speed up by checking
255 @@ -3182,6 +3202,23 @@
257 * locale/localename.c (__current_locale_name): Likewise.
259 +2004-08-31 Jakub Jelinek <jakub@redhat.com>
261 + * elf/ldconfig.c (parse_conf): Add prefix argument, prepend it
262 + before arguments to add_dir and pass to parse_conf_include.
263 + (parse_conf_include): Add prefix argument, pass it down to
265 + (main): Call arch_startup. Adjust parse_conf caller.
266 + Call add_arch_dirs.
267 + * sysdeps/generic/dl-cache.h (arch_startup, add_arch_dirs): Define.
268 + * sysdeps/unix/sysv/linux/i386/dl-cache.h: New file.
269 + * sysdeps/unix/sysv/linux/ia64/dl-cache.h (EMUL_HACK, arch_startup,
270 + add_arch_dirs): Define.
271 + * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Prepend
272 + /emul/ia32-linux before the 32-bit ld.so pathname.
273 + * sysdeps/unix/sysv/linux/ia64/dl-procinfo.c: New file.
274 + * sysdeps/unix/sysv/linux/ia64/dl-procinfo.h: New file.
276 2004-08-30 Roland McGrath <roland@frob.com>
278 * scripts/extract-abilist.awk: If `lastversion' variable defined, omit
279 diff -Nrup a/ChangeLog.16 b/ChangeLog.16
280 --- a/ChangeLog.16 2012-01-01 05:16:32.000000000 -0700
281 +++ b/ChangeLog.16 2012-01-01 20:41:26.626439845 -0700
282 @@ -2042,6 +2042,9 @@
283 (__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT
286 + * sysdeps/unix/sysv/linux/futimesat.c (futimesat): If
287 + file == NULL, use __futimes unconditionally.
289 2006-02-02 Ulrich Drepper <drepper@redhat.com>
291 * sysdeps/unix/sysv/linux/futimesat.c [__NR_futimesat]
292 @@ -2101,6 +2104,11 @@
293 * sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Fix a typo.
294 * sysdeps/s390/fpu/libm-test-ulps: Remove llrint ulps.
296 +2006-01-30 Jakub Jelinek <jakub@redhat.com>
298 + * include/bits/stdlib-ldbl.h: New file.
299 + * include/bits/wchar-ldbl.h: New file.
301 2006-01-19 Thomas Schwinge <tschwinge@gnu.org>
303 * libio/genops.c: Include <stdbool.h>.
304 diff -Nrup a/ChangeLog.17 b/ChangeLog.17
305 --- a/ChangeLog.17 2012-01-01 05:16:32.000000000 -0700
306 +++ b/ChangeLog.17 2012-01-01 20:41:26.629439844 -0700
309 * Makerules (libc-abis): Fix search for libc-abis in add-ons.
311 +2010-04-06 Ulrich Drepper <drepper@redhat.com>
313 + * sysdeps/posix/getaddrinfo.c (default_scopes): Assign global
314 + scope to RFC 1918 addresses.
315 + * posix/gai.conf: Document difference from RFC 3484.
317 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
319 * sysdeps/gnu/unwind-resume.c: New, moved from nptl/sysdeps/pthread/.
320 @@ -2953,6 +2959,11 @@ d2009-10-30 Ulrich Drepper <drepper@re
321 * sysdeps/generic/ldsodefs.h (struct rtld_global): The map element in
322 the unique symbol hash table should not be const.
324 +2009-07-22 Jakub Jelinek <jakub@redhat.com>
326 + * Makeconfig (ASFLAGS): Append $(sysdep-ASFLAGS).
327 + * sysdeps/i386/Makefile (sysdep-ASFLAGS): Add -U__i686.
329 2009-07-21 Ulrich Drepper <drepper@redhat.com>
331 * sysdeps/x86_64/multiarch/strstr.c: Minor cleanups. Remove
332 @@ -3218,6 +3229,11 @@ d2009-10-30 Ulrich Drepper <drepper@re
333 out common code into new function get_common_indeces. Determine
334 extended family and model for Intel processors.
336 +2009-06-26 Andreas Schwab <aschwab@redhat.com>
338 + * timezone/zic.c (stringzone): Don't try to generate a POSIX TZ
339 + string when the timezone ends in DST.
341 2009-06-26 Ulrich Drepper <drepper@redhat.com>
343 * resolv/resolv.h: Define RES_SNGLKUPREOP.
344 @@ -11818,6 +11834,10 @@ d2009-10-30 Ulrich Drepper <drepper@re
346 * stdlib/stdlib.h: Remove obsolete part of comment for realpath.
348 +2007-04-16 Jakub Jelinek <jakub@redhat.com>
350 + * locale/programs/locarchive.c (add_alias, insert_name): Remove static.
352 2007-04-16 Ulrich Drepper <drepper@redhat.com>
355 @@ -13075,6 +13095,15 @@ d2009-10-30 Ulrich Drepper <drepper@re
356 separators also if no non-zero digits found.
357 * stdlib/Makefile (tests): Add tst-strtod3.
359 +2006-12-10 Jakub Jelinek <jakub@redhat.com>
361 + * sysdeps/unix/sysv/linux/netlinkaccess.h: Include linux/if_addr.h
362 + if IFA_MAX is not defined.
363 + (IFA_RTA, IFA_PAYLOAD, IFLA_RTA, IFLA_PAYLOAD): Define if not
365 + * sysdeps/unix/sysv/linux/check_pf.c: Include netlinkaccess.h
366 + instead of asm/types.h, linux/netlink.h and linux/rtnetlink.h.
368 2006-12-09 Ulrich Drepper <drepper@redhat.com>
371 diff -Nrup a/Makeconfig b/Makeconfig
372 --- a/Makeconfig 2012-01-01 05:16:32.000000000 -0700
373 +++ b/Makeconfig 2012-01-01 20:41:26.630439843 -0700
374 @@ -803,12 +803,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)
390 diff -Nrup a/NEWS b/NEWS
391 --- a/NEWS 2012-01-01 05:16:32.000000000 -0700
392 +++ b/NEWS 2012-01-01 20:41:26.631439843 -0700
393 @@ -84,16 +84,6 @@ Version 2.14
394 12724, 12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792,
395 12795, 12811, 12813, 12814, 12841
397 -* The RPC implementation in libc is obsoleted. Old programs keep working
398 - but new programs cannot be linked with the routines in libc anymore.
399 - Programs in need of RPC functionality must be linked against TI-RPC.
400 - The TI-RPC implementation is IPv6 enabled and there are other benefits.
402 - Visible changes of this change include (obviously) the inability to link
403 - programs using RPC functions without referencing the TI-RPC library and the
404 - removal of the RPC headers from the glibc headers.
405 - Implemented by Ulrich Drepper.
407 * New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at,
408 syncfs, setns, sendmmsg
410 diff -Nrup a/config.h.in b/config.h.in
411 --- a/config.h.in 2012-01-01 05:16:32.000000000 -0700
412 +++ b/config.h.in 2012-01-01 20:41:26.632439843 -0700
414 /* Define if `.ctors' and `.dtors' sections shouldn't be used. */
415 #undef NO_CTORS_DTORS_SECTIONS
417 +/* Define if Systemtap <sys/sdt.h> probes should be defined. */
418 +#undef USE_STAP_PROBE
423 diff -Nrup a/configure b/configure
424 --- a/configure 2012-01-01 20:40:50.423446105 -0700
425 +++ b/configure 2012-01-01 20:41:26.634439843 -0700
426 @@ -791,6 +791,7 @@ enable_kernel
433 ac_precious_vars='build_alias
434 @@ -1450,6 +1451,7 @@ Optional Features:
435 --enable-multi-arch enable single DSO with optimizations for multiple
437 --enable-nss-crypt enable libcrypt to use nss
438 + --enable-systemtap enable systemtap static probe points [default=no]
441 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
442 @@ -3804,6 +3806,51 @@ else
446 +# Check whether --enable-systemtap was given.
447 +if test "${enable_systemtap+set}" = set; then :
448 + enableval=$enable_systemtap; systemtap=$enableval
453 +if test x$systemtap != xno; then
454 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemtap static probe support" >&5
455 +$as_echo_n "checking for systemtap static probe support... " >&6; }
456 +if test "${libc_cv_sdt+set}" = set; then :
457 + $as_echo_n "(cached) " >&6
459 + old_CFLAGS="$CFLAGS"
460 + CFLAGS="-std=gnu99 $CFLAGS"
461 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
462 +/* end confdefs.h. */
463 +#include <sys/sdt.h>
464 +void foo (int i, void *p)
466 + asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
467 + :: STAP_PROBE_ASM_OPERANDS (2, i, p));
470 +if ac_fn_c_try_compile "$LINENO"; then :
475 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
476 + CFLAGS="$old_CFLAGS"
478 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sdt" >&5
479 +$as_echo "$libc_cv_sdt" >&6; }
480 + if test $libc_cv_sdt = yes; then
481 + $as_echo "#define USE_STAP_PROBE 1" >>confdefs.h
484 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
485 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
486 +as_fn_error $? "systemtap support needs sys/sdt.h with asm support
487 +See \`config.log' for more details" "$LINENO" 5; }
491 # The way shlib-versions is used to generate soversions.mk uses a
492 # fairly simplistic model for name recognition that can't distinguish
493 # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
494 diff -Nrup a/configure.in b/configure.in
495 --- a/configure.in 2012-01-01 05:16:32.000000000 -0700
496 +++ b/configure.in 2012-01-01 20:41:26.635439843 -0700
497 @@ -290,6 +290,29 @@ else
499 AC_SUBST(libc_cv_nss_crypt)
501 +AC_ARG_ENABLE([systemtap],
502 + [AS_HELP_STRING([--enable-systemtap],
503 + [enable systemtap static probe points @<:@default=no@:>@])],
504 + [systemtap=$enableval],
506 +if test x$systemtap != xno; then
507 + AC_CACHE_CHECK([for systemtap static probe support], libc_cv_sdt, [dnl
508 + old_CFLAGS="$CFLAGS"
509 + CFLAGS="-std=gnu99 $CFLAGS"
510 + AC_COMPILE_IFELSE([#include <sys/sdt.h>
511 +void foo (int i, void *p)
513 + asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
514 + :: STAP_PROBE_ASM_OPERANDS (2, i, p));
515 +}], [libc_cv_sdt=yes], [libc_cv_sdt=no])
516 + CFLAGS="$old_CFLAGS"])
517 + if test $libc_cv_sdt = yes; then
518 + AC_DEFINE([USE_STAP_PROBE])
520 + AC_MSG_FAILURE([systemtap support needs sys/sdt.h with asm support])
524 # The way shlib-versions is used to generate soversions.mk uses a
525 # fairly simplistic model for name recognition that can't distinguish
526 # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
527 diff -Nrup a/csu/Makefile b/csu/Makefile
528 --- a/csu/Makefile 2012-01-01 05:16:32.000000000 -0700
529 +++ b/csu/Makefile 2012-01-01 20:41:26.635439843 -0700
530 @@ -93,7 +93,8 @@ omit-deps += $(crtstuff)
531 $(crtstuff:%=$(objpfx)%.o): %.o: %.S $(objpfx)defs.h
532 $(compile.S) -g0 $(ASFLAGS-.os) -o $@
534 -CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
535 +CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \
536 + -fno-asynchronous-unwind-tables
538 vpath initfini.c $(sysdirs)
540 diff -Nrup a/csu/elf-init.c b/csu/elf-init.c
541 --- a/csu/elf-init.c 2012-01-01 05:16:32.000000000 -0700
542 +++ b/csu/elf-init.c 2012-01-01 20:41:26.636439843 -0700
543 @@ -64,6 +64,23 @@ extern void (*__init_array_end []) (int,
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 diff -Nrup a/debug/tst-chk1.c b/debug/tst-chk1.c
568 --- a/debug/tst-chk1.c 2012-01-01 05:16:32.000000000 -0700
569 +++ b/debug/tst-chk1.c 2012-01-01 20:41:26.636439843 -0700
571 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
574 +/* Hack: make sure GCC doesn't know __chk_fail () will not return. */
575 +#define __noreturn__
580 @@ -243,7 +246,7 @@ do_test (void)
581 if (memcmp (a.buf1, "aabcdabcjj", 10))
584 -#if __USE_FORTIFY_LEVEL < 2
585 +#if __USE_FORTIFY_LEVEL < 2 || !__GNUC_PREREQ (4, 0)
586 /* The following tests are supposed to crash with -D_FORTIFY_SOURCE=2
587 and sufficient GCC support, as the string operations overflow
588 from a.buf1 into a.buf2. */
589 @@ -358,7 +361,7 @@ do_test (void)
590 memset (a.buf1 + 9, 'j', l0 + 2);
593 -# if __USE_FORTIFY_LEVEL >= 2
594 +# if __USE_FORTIFY_LEVEL >= 2 && __GNUC_PREREQ (4, 0)
598 diff -Nrup a/elf/Makefile b/elf/Makefile
599 --- a/elf/Makefile 2012-01-01 05:16:32.000000000 -0700
600 +++ b/elf/Makefile 2012-01-01 20:41:26.637439843 -0700
601 @@ -135,6 +135,7 @@ include ../Makeconfig
602 ifeq ($(unwind-find-fde),yes)
603 routines += unwind-dw2-fde-glibc
604 shared-only-routines += unwind-dw2-fde-glibc
605 +CFLAGS-unwind-dw2-fde-glibc.c += -fno-strict-aliasing
608 before-compile = $(objpfx)trusted-dirs.h
609 @@ -505,7 +506,8 @@ CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'
610 CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
611 CFLAGS-cache.c = $(SYSCONF-FLAGS)
613 -CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
614 +CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
615 + -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
617 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
618 generated += $(addsuffix .so,$(strip $(modules-names)))
619 diff -Nrup a/elf/dl-close.c b/elf/dl-close.c
620 --- a/elf/dl-close.c 2012-01-01 05:16:32.000000000 -0700
621 +++ b/elf/dl-close.c 2012-01-01 20:41:26.638439843 -0700
622 @@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
623 if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
624 || dl_close_state != not_pending)
626 - if (map->l_direct_opencount == 0)
628 - if (map->l_type == lt_loaded)
629 - dl_close_state = rerun;
630 - else if (map->l_type == lt_library)
632 - struct link_map **oldp = map->l_initfini;
633 - map->l_initfini = map->l_orig_initfini;
634 - _dl_scope_free (oldp);
637 + if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
638 + dl_close_state = rerun;
640 /* There are still references to this object. Do nothing more. */
641 if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
642 diff -Nrup a/elf/dl-deps.c b/elf/dl-deps.c
643 --- a/elf/dl-deps.c 2012-01-01 05:16:32.000000000 -0700
644 +++ b/elf/dl-deps.c 2012-01-01 20:41:26.638439843 -0700
645 @@ -489,6 +489,7 @@ _dl_map_object_deps (struct link_map *ma
646 nneeded * sizeof needed[0]);
647 atomic_write_barrier ();
648 l->l_initfini = l_initfini;
649 + l->l_free_initfini = 1;
652 /* If we have no auxiliary objects just go on to the next map. */
653 @@ -689,6 +690,7 @@ Filters not supported with LD_TRACE_PREL
654 l_initfini[nlist] = NULL;
655 atomic_write_barrier ();
656 map->l_initfini = l_initfini;
657 + map->l_free_initfini = 1;
658 if (l_reldeps != NULL)
660 atomic_write_barrier ();
661 @@ -697,7 +699,7 @@ Filters not supported with LD_TRACE_PREL
662 _dl_scope_free (old_l_reldeps);
664 if (old_l_initfini != NULL)
665 - map->l_orig_initfini = old_l_initfini;
666 + _dl_scope_free (old_l_initfini);
669 _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
670 diff -Nrup a/elf/dl-init.c b/elf/dl-init.c
671 --- a/elf/dl-init.c 2012-01-01 05:16:32.000000000 -0700
672 +++ b/elf/dl-init.c 2012-01-01 20:41:26.639439843 -0700
674 /* Type of the initializer. */
675 typedef void (*init_t) (int, char **, char **);
677 -#ifndef HAVE_INLINED_SYSCALLS
678 /* Flag, nonzero during startup phase. */
679 extern int _dl_starting_up;
680 extern int _dl_starting_up_internal attribute_hidden;
685 @@ -133,9 +131,7 @@ _dl_init (struct link_map *main_map, int
687 call_init (main_map->l_initfini[i], argc, argv, env);
689 -#ifndef HAVE_INLINED_SYSCALLS
690 /* Finished starting up. */
691 INTUSE(_dl_starting_up) = 0;
695 diff -Nrup a/elf/dl-libc.c b/elf/dl-libc.c
696 --- a/elf/dl-libc.c 2012-01-01 05:16:32.000000000 -0700
697 +++ b/elf/dl-libc.c 2012-01-01 20:41:26.639439843 -0700
698 @@ -270,13 +270,13 @@ libc_freeres_fn (free_mem)
700 for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
702 - /* Remove all additional names added to the objects. */
703 for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
705 struct libname_list *lnp = l->l_libname->next;
707 l->l_libname->next = NULL;
709 + /* Remove all additional names added to the objects. */
712 struct libname_list *old = lnp;
713 @@ -284,6 +284,10 @@ libc_freeres_fn (free_mem)
714 if (! old->dont_free)
718 + /* Free the initfini dependency list. */
719 + if (l->l_free_initfini)
720 + free (l->l_initfini);
723 if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
724 diff -Nrup a/elf/dl-load.c b/elf/dl-load.c
725 --- a/elf/dl-load.c 2012-01-01 05:16:32.000000000 -0700
726 +++ b/elf/dl-load.c 2012-01-01 20:41:26.640439842 -0700
727 @@ -250,8 +250,7 @@ is_trusted_path_normalize (const char *p
731 -is_dst (const char *start, const char *name, const char *str,
732 - int is_path, int secure)
733 +is_dst (const char *start, const char *name, const char *str, int is_path)
736 bool is_curly = false;
737 @@ -280,12 +279,6 @@ is_dst (const char *start, const char *n
738 && (!is_path || name[len] != ':'))
741 - if (__builtin_expect (secure, 0)
742 - && ((name[len] != '\0' && name[len] != '/'
743 - && (!is_path || name[len] != ':'))
744 - || (name != start + 1 && (!is_path || name[-2] != ':'))))
750 @@ -300,13 +293,10 @@ _dl_dst_count (const char *name, int is_
754 - /* $ORIGIN is not expanded for SUID/GUID programs (except if it
755 - is $ORIGIN alone) and it must always appear first in path. */
757 - if ((len = is_dst (start, name, "ORIGIN", is_path,
758 - INTUSE(__libc_enable_secure))) != 0
759 - || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
760 - || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
761 + if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0
762 + || (len = is_dst (start, name, "PLATFORM", is_path)) != 0
763 + || (len = is_dst (start, name, "LIB", is_path)) != 0)
766 name = strchr (name + len, '$');
767 @@ -339,9 +329,16 @@ _dl_dst_substitute (struct link_map *l,
771 - if ((len = is_dst (start, name, "ORIGIN", is_path,
772 - INTUSE(__libc_enable_secure))) != 0)
773 + if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
775 + /* For SUID/GUID programs $ORIGIN must always appear
776 + first in a path element. */
777 + if (__builtin_expect (INTUSE(__libc_enable_secure), 0)
778 + && ((name[len] != '\0' && name[len] != '/'
779 + && (!is_path || name[len] != ':'))
780 + || (name != start + 1 && (!is_path || name[-2] != ':'))))
781 + repl = (const char *) -1;
785 repl = _dl_get_origin ();
786 @@ -352,9 +349,9 @@ _dl_dst_substitute (struct link_map *l,
787 check_for_trusted = (INTUSE(__libc_enable_secure)
788 && l->l_type == lt_executable);
790 - else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
791 + else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0)
792 repl = GLRO(dl_platform);
793 - else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
794 + else if ((len = is_dst (start, name, "LIB", is_path)) != 0)
797 if (repl != NULL && repl != (const char *) -1)
798 @@ -374,6 +371,7 @@ _dl_dst_substitute (struct link_map *l,
799 element, but keep an empty element at the end. */
800 if (wp == result && is_path && *name == ':' && name[1] != '\0')
802 + check_for_trusted = false;
805 /* No DST we recognize. */
806 diff -Nrup a/elf/dl-support.c b/elf/dl-support.c
807 --- a/elf/dl-support.c 2012-01-01 05:16:32.000000000 -0700
808 +++ b/elf/dl-support.c 2012-01-01 20:41:26.641439841 -0700
809 @@ -82,10 +82,8 @@ unsigned long long _dl_load_adds;
810 create a fake scope containing nothing. */
811 struct r_scope_elem _dl_initial_searchlist;
813 -#ifndef HAVE_INLINED_SYSCALLS
814 /* Nonzero during startup. */
815 int _dl_starting_up = 1;
818 /* Random data provided by the kernel. */
820 diff -Nrup a/elf/ldconfig.c b/elf/ldconfig.c
821 --- a/elf/ldconfig.c 2012-01-01 05:16:32.000000000 -0700
822 +++ b/elf/ldconfig.c 2012-01-01 20:41:26.641439841 -0700
823 @@ -1034,17 +1034,19 @@ search_dirs (void)
826 static void parse_conf_include (const char *config_file, unsigned int lineno,
827 - bool do_chroot, const char *pattern);
828 + const char *prefix, bool do_chroot,
829 + const char *pattern);
831 /* Parse configuration file. */
833 -parse_conf (const char *filename, bool do_chroot)
834 +parse_conf (const char *filename, const char *prefix, bool do_chroot)
841 + size_t prefix_len = prefix ? strlen (prefix) : 0;
843 if (do_chroot && opt_chroot)
845 @@ -1105,7 +1107,14 @@ parse_conf (const char *filename, bool d
847 while ((dir = strsep (&cp, " \t")) != NULL)
849 - parse_conf_include (filename, lineno, do_chroot, dir);
850 + parse_conf_include (filename, lineno, prefix, do_chroot, dir);
852 + else if (prefix != NULL)
854 + size_t cp_len = strlen (cp);
855 + char new_cp [prefix_len + cp_len + 1];
856 + memcpy (mempcpy (new_cp, prefix, prefix_len), cp, cp_len + 1);
859 else if (!strncasecmp (cp, "hwcap", 5) && isblank (cp[5]))
861 @@ -1168,7 +1177,7 @@ parse_conf (const char *filename, bool d
862 config files to read. */
864 parse_conf_include (const char *config_file, unsigned int lineno,
865 - bool do_chroot, const char *pattern)
866 + const char *prefix, bool do_chroot, const char *pattern)
868 if (opt_chroot && pattern[0] != '/')
869 error (EXIT_FAILURE, 0,
870 @@ -1200,7 +1209,7 @@ parse_conf_include (const char *config_f
873 for (size_t i = 0; i < gl.gl_pathc; ++i)
874 - parse_conf (gl.gl_pathv[i], false);
875 + parse_conf (gl.gl_pathv[i], prefix, false);
879 @@ -1243,6 +1252,8 @@ main (int argc, char **argv)
880 /* Set the text message domain. */
881 textdomain (_libc_intl_domainname);
883 + arch_startup (argc, argv);
885 /* Parse and process arguments. */
887 argp_parse (&argp, argc, argv, 0, &remaining, NULL);
888 @@ -1352,12 +1363,14 @@ main (int argc, char **argv)
892 - parse_conf (config_file, true);
893 + parse_conf (config_file, NULL, true);
895 /* Always add the standard search paths. */
896 add_system_dir (SLIBDIR);
897 if (strcmp (SLIBDIR, LIBDIR))
898 add_system_dir (LIBDIR);
900 + add_arch_dirs (config_file);
903 const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
904 diff -Nrup a/elf/ldd.bash.in b/elf/ldd.bash.in
905 --- a/elf/ldd.bash.in 2012-01-01 05:16:32.000000000 -0700
906 +++ b/elf/ldd.bash.in 2012-01-01 20:41:26.642439841 -0700
907 @@ -167,18 +167,6 @@ warning: you do not have execution permi
912 - # If the program exits with exit code 5, it means the process has been
913 - # invoked with __libc_enable_secure. Fall back to running it through
914 - # the dynamic linker.
917 - if [ $rc = 5 ]; then
918 - try_trace "$RTLD" "$file"
921 - [ $rc = 0 ] || result=1
924 # This can be a non-ELF binary or no binary at all.
926 @@ -186,7 +174,7 @@ warning: you do not have execution permi
932 try_trace "$RTLD" "$file" || result=1
935 diff -Nrup a/elf/rtld-Rules b/elf/rtld-Rules
936 --- a/elf/rtld-Rules 2012-01-01 05:16:32.000000000 -0700
937 +++ b/elf/rtld-Rules 2012-01-01 20:41:26.642439841 -0700
939 # Subroutine makefile for compiling libc modules linked into dynamic linker.
941 # Copyright (C) 2002,2003,2005,2006,2008,2010,2011
942 -# Free Software Foundation, Inc.
943 +# Free Software Foundation, Inc.
944 # This file is part of the GNU C Library.
946 # The GNU C Library is free software; you can redistribute it and/or
947 @@ -131,6 +131,6 @@ ifdef rtld-depfiles
950 # This here is the whole point of all the shenanigans.
951 -rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1
952 +rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld
955 diff -Nrup a/elf/rtld.c b/elf/rtld.c
956 --- a/elf/rtld.c 2012-01-01 05:16:32.000000000 -0700
957 +++ b/elf/rtld.c 2012-01-01 20:41:26.643439841 -0700
958 @@ -107,7 +107,6 @@ static struct audit_list
959 struct audit_list *next;
962 -#ifndef HAVE_INLINED_SYSCALLS
963 /* Set nonzero during loading and initialization of executable and
964 libraries, cleared before the executable's entry point runs. This
965 must not be initialized to nonzero, because the unused dynamic
966 @@ -117,7 +116,6 @@ static struct audit_list
968 int _dl_starting_up = 0;
969 INTVARDEF(_dl_starting_up)
972 /* This is the structure which defines all variables global to ld.so
973 (except those which cannot be added for some reason). */
974 @@ -929,10 +927,8 @@ dl_main (const ElfW(Phdr) *phdr,
975 /* Process the environment variable which control the behaviour. */
976 process_envvars (&mode);
978 -#ifndef HAVE_INLINED_SYSCALLS
979 /* Set up a flag which tells we are just starting. */
980 INTUSE(_dl_starting_up) = 1;
983 if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
985 @@ -1397,7 +1393,9 @@ of this helper program; chances are you
986 char *copy = malloc (len);
988 _dl_fatal_printf ("out of memory\n");
989 - l->l_libname->name = l->l_name = memcpy (copy, dsoname, len);
990 + l->l_libname->name = memcpy (copy, dsoname, len);
991 + if (GLRO(dl_debug_mask))
995 /* Add the vDSO to the object list. */
996 @@ -2276,6 +2274,7 @@ ERROR: ld.so: object '%s' cannot be load
1000 + l->l_free_initfini = 0;
1002 if (l != &GL(dl_rtld_map))
1003 _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
1004 @@ -2327,7 +2326,6 @@ ERROR: ld.so: object '%s' cannot be load
1006 /* Make sure no new search directories have been added. */
1007 assert (GLRO(dl_init_all_dirs) == GL(dl_all_dirs));
1009 if (! prelinked && rtld_multiple_ref)
1011 /* There was an explicit ref to the dynamic linker as a shared lib.
1012 diff -Nrup a/extra-lib.mk b/extra-lib.mk
1013 --- a/extra-lib.mk 2012-01-01 05:16:32.000000000 -0700
1014 +++ b/extra-lib.mk 2012-01-01 20:41:26.644439841 -0700
1015 @@ -101,4 +101,4 @@ ifneq (,$(cpp-srcs-left))
1016 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
1019 -CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1
1020 +CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1 -DIN_LIB=$(lib)
1021 diff -Nrup a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
1022 --- a/include/bits/stdlib-ldbl.h 1969-12-31 17:00:00.000000000 -0700
1023 +++ b/include/bits/stdlib-ldbl.h 2012-01-01 20:41:26.644439841 -0700
1025 +#include <stdlib/bits/stdlib-ldbl.h>
1026 diff -Nrup a/include/bits/wchar-ldbl.h b/include/bits/wchar-ldbl.h
1027 --- a/include/bits/wchar-ldbl.h 1969-12-31 17:00:00.000000000 -0700
1028 +++ b/include/bits/wchar-ldbl.h 2012-01-01 20:41:26.644439841 -0700
1030 +#include <wcsmbs/bits/wchar-ldbl.h>
1031 diff -Nrup a/include/features.h b/include/features.h
1032 --- a/include/features.h 2012-01-01 05:16:32.000000000 -0700
1033 +++ b/include/features.h 2012-01-01 20:41:26.644439841 -0700
1034 @@ -310,8 +310,13 @@
1037 #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
1038 - && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
1039 -# if _FORTIFY_SOURCE > 1
1040 + && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
1041 +# if !__GNUC_PREREQ (4, 1)
1042 +# ifdef __GNUC_RH_RELEASE__
1043 +# warning _FORTIFY_SOURCE supported only with GCC 4.1 and later
1045 +# define __USE_FORTIFY_LEVEL 0
1046 +# elif _FORTIFY_SOURCE > 1
1047 # define __USE_FORTIFY_LEVEL 2
1049 # define __USE_FORTIFY_LEVEL 1
1050 diff -Nrup a/include/libc-symbols.h b/include/libc-symbols.h
1051 --- a/include/libc-symbols.h 2012-01-01 05:16:32.000000000 -0700
1052 +++ b/include/libc-symbols.h 2012-01-01 20:41:26.645439841 -0700
1053 @@ -626,7 +626,7 @@ for linking")
1054 # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
1055 # define libc_hidden_def(name) hidden_def (name)
1056 # define libc_hidden_weak(name) hidden_weak (name)
1057 -# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
1058 +# define libc_hidden_nolink(name, version) hidden_def (name)
1059 # define libc_hidden_ver(local, name) hidden_ver (local, name)
1060 # define libc_hidden_data_def(name) hidden_data_def (name)
1061 # define libc_hidden_data_weak(name) hidden_data_weak (name)
1062 diff -Nrup a/include/link.h b/include/link.h
1063 --- a/include/link.h 2012-01-01 05:16:32.000000000 -0700
1064 +++ b/include/link.h 2012-01-01 20:41:26.646439841 -0700
1066 /* Data structure for communication from the run-time dynamic linker for
1067 loaded ELF shared objects.
1068 - Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
1069 + Copyright (C) 1995-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
1070 This file is part of the GNU C Library.
1072 The GNU C Library is free software; you can redistribute it and/or
1073 @@ -192,6 +192,9 @@ struct link_map
1074 during LD_TRACE_PRELINKING=1
1075 contains any DT_SYMBOLIC
1077 + unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
1078 + freed, ie. not allocated with
1079 + the dummy malloc in ld.so. */
1081 /* Collected information about own RPATH directories. */
1082 struct r_search_path_struct l_rpath_dirs;
1083 @@ -240,9 +243,6 @@ struct link_map
1085 /* List of object in order of the init and fini calls. */
1086 struct link_map **l_initfini;
1087 - /* The init and fini list generated at startup, saved when the
1088 - object is also loaded dynamically. */
1089 - struct link_map **l_orig_initfini;
1091 /* List of the dependencies introduced through symbol binding. */
1092 struct link_map_reldeps
1093 @@ -290,7 +290,7 @@ struct link_map
1095 #ifndef FORCED_DYNAMIC_TLS_OFFSET
1096 # if NO_TLS_OFFSET == 0
1097 -# define FORCED_DYNAMIC_TLS_OFFSET 1
1098 +# define FORCED_DYNAMIC_TLS_OFFSET -1
1099 # elif NO_TLS_OFFSET == -1
1100 # define FORCED_DYNAMIC_TLS_OFFSET -2
1102 diff -Nrup a/include/stap-probe.h b/include/stap-probe.h
1103 --- a/include/stap-probe.h 1969-12-31 17:00:00.000000000 -0700
1104 +++ b/include/stap-probe.h 2012-01-01 20:41:26.646439841 -0700
1106 +/* Macros for defining Systemtap <sys/sdt.h> static probe points.
1107 + Copyright (C) 2011 Free Software Foundation, Inc.
1108 + This file is part of the GNU C Library.
1110 + The GNU C Library is free software; you can redistribute it and/or
1111 + modify it under the terms of the GNU Lesser General Public
1112 + License as published by the Free Software Foundation; either
1113 + version 2.1 of the License, or (at your option) any later version.
1115 + The GNU C Library is distributed in the hope that it will be useful,
1116 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1117 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1118 + Lesser General Public License for more details.
1120 + You should have received a copy of the GNU Lesser General Public
1121 + License along with the GNU C Library; if not, write to the Free
1122 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1123 + 02111-1307 USA. */
1125 +#ifndef _STAP_PROBE_H
1126 +#define _STAP_PROBE_H 1
1128 +#ifdef USE_STAP_PROBE
1130 +# include <sys/sdt.h>
1132 +/* Our code uses one macro LIBC_PROBE (name, n, arg1, ..., argn).
1134 + Without USE_STAP_PROBE, that does nothing but evaluates all
1135 + its arguments (to prevent bit rot, unlike e.g. assert).
1137 + Systemtap's header defines the macros STAP_PROBE (provider, name) and
1138 + STAP_PROBEn (provider, name, arg1, ..., argn). For "provider" we paste
1139 + in the IN_LIB name (libc, libpthread, etc.) automagically. */
1141 +# ifndef NOT_IN_libc
1142 +# define IN_LIB libc
1143 +# elif !defined IN_LIB
1144 +/* This is intentionally defined with extra unquoted commas in it so
1145 + that macro substitution will bomb out when it is used. We don't
1146 + just use #error here, so that this header can be included by
1147 + other headers that use LIBC_PROBE inside their own macros. We
1148 + only want such headers to fail to compile if those macros are
1149 + actually used in a context where IN_LIB has not been defined. */
1150 +# define IN_LIB ,,,missing -DIN_LIB=... -- not extra-lib.mk?,,,
1153 +# define LIBC_PROBE(name, n, ...) \
1154 + LIBC_PROBE_1 (IN_LIB, name, n, ## __VA_ARGS__)
1156 +# define LIBC_PROBE_1(lib, name, n, ...) \
1157 + STAP_PROBE##n (lib, name, ## __VA_ARGS__)
1159 +# define STAP_PROBE0 STAP_PROBE
1161 +# define LIBC_PROBE_ASM(name, template) \
1162 + STAP_PROBE_ASM (IN_LIB, name, template)
1164 +# define LIBC_PROBE_ASM_OPERANDS STAP_PROBE_ASM_OPERANDS
1166 +#else /* Not USE_STAP_PROBE. */
1168 +# ifndef __ASSEMBLER__
1169 +# define LIBC_PROBE(name, n, ...) DUMMY_PROBE##n (__VA_ARGS__)
1171 +# define LIBC_PROBE(name, n, ...) /* Nothing. */
1174 +# define LIBC_PROBE_ASM(name, template) /* Nothing. */
1175 +# define LIBC_PROBE_ASM_OPERANDS(n, ...) /* Nothing. */
1177 +/* This silliness lets us evaluate all the arguments for each arity
1178 + of probe. My kingdom for a real macro system. */
1180 +# define DUMMY_PROBE0() do {} while (0)
1181 +# define DUMMY_PROBE1(a1) do {} while ((void) (a1), 0)
1182 +# define DUMMY_PROBE2(a1, a2) do {} while ((void) (a1), \
1184 +# define DUMMY_PROBE3(a1, a2, a3) do {} while ((void) (a1), \
1187 +# define DUMMY_PROBE4(a1, a2, a3, a4) do {} while ((void) (a1), \
1191 +# define DUMMY_PROBE5(a1, a2, a3, a4, a5) \
1192 + do {} while ((void) (a1), \
1197 +# define DUMMY_PROBE6(a1, a2, a3, a4, a5, a6) \
1198 + do {} while ((void) (a1), \
1204 +# define DUMMY_PROBE7(a1, a2, a3, a4, a5, a6, a7) \
1205 + do {} while ((void) (a1), \
1212 +# define DUMMY_PROBE8(a1, a2, a3, a4, a5, a6, a7, a8) \
1213 + do {} while ((void) (a1), \
1221 +# define DUMMY_PROBE9(a1, a2, a3, a4, a5, a6, a7, a8, a9) \
1222 + do {} while ((void) (a1), \
1231 +# define DUMMY_PROBE10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
1232 + do {} while ((void) (a1), \
1243 +#endif /* USE_STAP_PROBE. */
1245 +#endif /* stap-probe.h */
1246 diff -Nrup a/include/sys/resource.h b/include/sys/resource.h
1247 --- a/include/sys/resource.h 2012-01-01 05:16:32.000000000 -0700
1248 +++ b/include/sys/resource.h 2012-01-01 20:41:26.647439841 -0700
1249 @@ -13,4 +13,5 @@ extern int __getrusage (enum __rusage_wh
1251 extern int __setrlimit (enum __rlimit_resource __resource,
1252 const struct rlimit *__rlimits);
1253 +libc_hidden_proto (__getrlimit)
1255 diff -Nrup a/inet/Makefile b/inet/Makefile
1256 --- a/inet/Makefile 2012-01-01 05:16:32.000000000 -0700
1257 +++ b/inet/Makefile 2012-01-01 20:41:26.647439841 -0700
1258 @@ -57,6 +57,8 @@ tests := htontest test_ifindex tst-ntoa
1262 +CFLAGS-tst-inet6_rth.c += -fno-strict-aliasing
1264 ifeq ($(have-thread-library),yes)
1266 CFLAGS-gethstbyad_r.c = -DUSE_NSCD=1 -fexceptions
1267 diff -Nrup a/intl/locale.alias b/intl/locale.alias
1268 --- a/intl/locale.alias 2012-01-01 05:16:32.000000000 -0700
1269 +++ b/intl/locale.alias 2012-01-01 20:41:26.647439841 -0700
1270 @@ -57,8 +57,6 @@ korean ko_KR.eucKR
1271 korean.euc ko_KR.eucKR
1273 lithuanian lt_LT.ISO-8859-13
1274 -no_NO nb_NO.ISO-8859-1
1275 -no_NO.ISO-8859-1 nb_NO.ISO-8859-1
1276 norwegian nb_NO.ISO-8859-1
1277 nynorsk nn_NO.ISO-8859-1
1278 polish pl_PL.ISO-8859-2
1279 diff -Nrup a/libio/stdio.h b/libio/stdio.h
1280 --- a/libio/stdio.h 2012-01-01 05:16:32.000000000 -0700
1281 +++ b/libio/stdio.h 2012-01-01 20:41:26.648439841 -0700
1282 @@ -169,10 +169,12 @@ typedef _G_fpos64_t fpos64_t;
1283 extern struct _IO_FILE *stdin; /* Standard input stream. */
1284 extern struct _IO_FILE *stdout; /* Standard output stream. */
1285 extern struct _IO_FILE *stderr; /* Standard error output stream. */
1287 /* C89/C99 say they're macros. Make them happy. */
1289 #define stdout stdout
1290 #define stderr stderr
1293 __BEGIN_NAMESPACE_STD
1294 /* Remove file FILENAME. */
1295 diff -Nrup a/locale/iso-4217.def b/locale/iso-4217.def
1296 --- a/locale/iso-4217.def 2012-01-01 05:16:32.000000000 -0700
1297 +++ b/locale/iso-4217.def 2012-01-01 20:41:26.649439841 -0700
1300 * !!! The list has to be sorted !!!
1302 +DEFINE_INT_CURR("ADP") /* Andorran Peseta -> EUR */
1303 DEFINE_INT_CURR("AED") /* United Arab Emirates Dirham */
1304 DEFINE_INT_CURR("AFN") /* Afghanistan Afgani */
1305 DEFINE_INT_CURR("ALL") /* Albanian Lek */
1306 @@ -15,12 +16,14 @@ DEFINE_INT_CURR("AMD") /* Armenia Dram
1307 DEFINE_INT_CURR("ANG") /* Netherlands Antilles */
1308 DEFINE_INT_CURR("AOA") /* Angolan Kwanza */
1309 DEFINE_INT_CURR("ARS") /* Argentine Peso */
1310 +DEFINE_INT_CURR("ATS") /* Austrian Schilling -> EUR */
1311 DEFINE_INT_CURR("AUD") /* Australian Dollar */
1312 DEFINE_INT_CURR("AWG") /* Aruba Guilder */
1313 DEFINE_INT_CURR("AZM") /* Azerbaijan Manat */
1314 DEFINE_INT_CURR("BAM") /* Bosnian and Herzegovina Convertible Mark */
1315 DEFINE_INT_CURR("BBD") /* Barbados Dollar */
1316 DEFINE_INT_CURR("BDT") /* Bangladesh Taka */
1317 +DEFINE_INT_CURR("BEF") /* Belgian Franc -> EUR */
1318 DEFINE_INT_CURR("BGN") /* Bulgarian Lev */
1319 DEFINE_INT_CURR("BHD") /* Bahraini Dinar */
1320 DEFINE_INT_CURR("BIF") /* Burundi Franc */
1321 @@ -44,6 +47,7 @@ DEFINE_INT_CURR("CUP") /* Cuban Peso *
1322 DEFINE_INT_CURR("CVE") /* Cape Verde Escudo */
1323 DEFINE_INT_CURR("CYP") /* Cypriot Pound */
1324 DEFINE_INT_CURR("CZK") /* Czech Koruna */
1325 +DEFINE_INT_CURR("DEM") /* German Mark -> EUR */
1326 DEFINE_INT_CURR("DJF") /* Djibouti Franc */
1327 DEFINE_INT_CURR("DKK") /* Danish Krone (Faroe Islands, Greenland) */
1328 DEFINE_INT_CURR("DOP") /* Dominican Republic */
1329 @@ -51,16 +55,20 @@ DEFINE_INT_CURR("DZD") /* Algerian Dina
1330 DEFINE_INT_CURR("EEK") /* Estonian Kroon */
1331 DEFINE_INT_CURR("EGP") /* Egyptian Pound */
1332 DEFINE_INT_CURR("ERN") /* Eritrean Nakfa */
1333 +DEFINE_INT_CURR("ESP") /* Spanish Peseta -> EUR */
1334 DEFINE_INT_CURR("ETB") /* Ethiopian Birr */
1335 DEFINE_INT_CURR("EUR") /* European Union Euro */
1336 +DEFINE_INT_CURR("FIM") /* Finnish Markka -> EUR */
1337 DEFINE_INT_CURR("FJD") /* Fiji Dollar */
1338 DEFINE_INT_CURR("FKP") /* Falkland Islands Pound (Malvinas) */
1339 +DEFINE_INT_CURR("FRF") /* French Franc -> EUR */
1340 DEFINE_INT_CURR("GBP") /* British Pound */
1341 DEFINE_INT_CURR("GEL") /* Georgia Lari */
1342 DEFINE_INT_CURR("GHC") /* Ghana Cedi */
1343 DEFINE_INT_CURR("GIP") /* Gibraltar Pound */
1344 DEFINE_INT_CURR("GMD") /* Gambian Dalasi */
1345 DEFINE_INT_CURR("GNF") /* Guinea Franc */
1346 +DEFINE_INT_CURR("GRD") /* Greek Drachma -> EUR */
1347 DEFINE_INT_CURR("GTQ") /* Guatemala Quetzal */
1348 DEFINE_INT_CURR("GYD") /* Guyana Dollar */
1349 DEFINE_INT_CURR("HKD") /* Hong Kong Dollar */
1350 @@ -69,12 +77,14 @@ DEFINE_INT_CURR("HRK") /* Croatia Kuna
1351 DEFINE_INT_CURR("HTG") /* Haiti Gourde */
1352 DEFINE_INT_CURR("HUF") /* Hungarian Forint */
1353 DEFINE_INT_CURR("IDR") /* Indonesia Rupiah */
1354 +DEFINE_INT_CURR("IEP") /* Irish Pound -> EUR */
1355 DEFINE_INT_CURR("ILS") /* Israeli Shekel */
1356 DEFINE_INT_CURR("IMP") /* Isle of Man Pounds */
1357 DEFINE_INT_CURR("INR") /* Indian Rupee (Bhutan) */
1358 DEFINE_INT_CURR("IQD") /* Iraqi Dinar */
1359 DEFINE_INT_CURR("IRR") /* Iranian Rial */
1360 DEFINE_INT_CURR("ISK") /* Iceland Krona */
1361 +DEFINE_INT_CURR("ITL") /* Italian Lira -> EUR */
1362 DEFINE_INT_CURR("JEP") /* Jersey Pound */
1363 DEFINE_INT_CURR("JMD") /* Jamaican Dollar */
1364 DEFINE_INT_CURR("JOD") /* Jordanian Dinar */
1365 @@ -94,6 +104,7 @@ DEFINE_INT_CURR("LKR") /* Sri Lankan Ru
1366 DEFINE_INT_CURR("LRD") /* Liberian Dollar */
1367 DEFINE_INT_CURR("LSL") /* Lesotho Maloti */
1368 DEFINE_INT_CURR("LTL") /* Lithuanian Litas */
1369 +DEFINE_INT_CURR("LUF") /* Luxembourg Franc -> EUR */
1370 DEFINE_INT_CURR("LVL") /* Latvia Lat */
1371 DEFINE_INT_CURR("LYD") /* Libyan Arab Jamahiriya Dinar */
1372 DEFINE_INT_CURR("MAD") /* Moroccan Dirham */
1373 @@ -114,6 +125,7 @@ DEFINE_INT_CURR("MZM") /* Mozambique Me
1374 DEFINE_INT_CURR("NAD") /* Namibia Dollar */
1375 DEFINE_INT_CURR("NGN") /* Nigeria Naira */
1376 DEFINE_INT_CURR("NIO") /* Nicaragua Cordoba Oro */
1377 +DEFINE_INT_CURR("NLG") /* Netherlands Guilder -> EUR */
1378 DEFINE_INT_CURR("NOK") /* Norwegian Krone */
1379 DEFINE_INT_CURR("NPR") /* Nepalese Rupee */
1380 DEFINE_INT_CURR("NZD") /* New Zealand Dollar */
1381 @@ -124,6 +136,7 @@ DEFINE_INT_CURR("PGK") /* Papau New Gui
1382 DEFINE_INT_CURR("PHP") /* Philippines Peso */
1383 DEFINE_INT_CURR("PKR") /* Pakistan Rupee */
1384 DEFINE_INT_CURR("PLN") /* Polish Zloty */
1385 +DEFINE_INT_CURR("PTE") /* Portugese Escudo -> EUR */
1386 DEFINE_INT_CURR("PYG") /* Paraguay Guarani */
1387 DEFINE_INT_CURR("QAR") /* Qatar Rial */
1388 DEFINE_INT_CURR("ROL") /* Romanian Leu */
1389 diff -Nrup a/locale/programs/locarchive.c b/locale/programs/locarchive.c
1390 --- a/locale/programs/locarchive.c 2012-01-01 05:16:32.000000000 -0700
1391 +++ b/locale/programs/locarchive.c 2012-01-01 20:41:26.649439841 -0700
1392 @@ -253,9 +253,9 @@ oldlocrecentcmp (const void *a, const vo
1393 /* forward decls for below */
1394 static uint32_t add_locale (struct locarhandle *ah, const char *name,
1395 locale_data_t data, bool replace);
1396 -static void add_alias (struct locarhandle *ah, const char *alias,
1397 - bool replace, const char *oldname,
1398 - uint32_t *locrec_offset_p);
1399 +void add_alias (struct locarhandle *ah, const char *alias,
1400 + bool replace, const char *oldname,
1401 + uint32_t *locrec_offset_p);
1405 @@ -636,7 +636,7 @@ close_archive (struct locarhandle *ah)
1406 #include "../../intl/explodename.c"
1407 #include "../../intl/l10nflist.c"
1409 -static struct namehashent *
1410 +struct namehashent *
1411 insert_name (struct locarhandle *ah,
1412 const char *name, size_t name_len, bool replace)
1414 @@ -694,7 +694,7 @@ insert_name (struct locarhandle *ah,
1415 return &namehashtab[idx];
1420 add_alias (struct locarhandle *ah, const char *alias, bool replace,
1421 const char *oldname, uint32_t *locrec_offset_p)
1423 diff -Nrup a/localedata/ChangeLog b/localedata/ChangeLog
1424 --- a/localedata/ChangeLog 2012-01-01 05:16:32.000000000 -0700
1425 +++ b/localedata/ChangeLog 2012-01-01 20:41:26.651439841 -0700
1427 * tests-mbwc/tst_funcs.h (TST_DECL_VARS, TST_HEAD_LOCALE):
1428 Remove unused variable.
1430 +2011-06-28 Andreas Schwab <schwab@redhat.com>
1432 + * charmaps/GB18030: Correct some entries.
1434 +2011-06-21 Andreas Schwab <schwab@redhat.com>
1436 + * charmaps/GB18030: Readd lost characters.
1438 2011-05-21 Ulrich Drepper <drepper@gmail.com>
1441 diff -Nrup a/localedata/Makefile b/localedata/Makefile
1442 --- a/localedata/Makefile 2012-01-01 05:16:32.000000000 -0700
1443 +++ b/localedata/Makefile 2012-01-01 20:41:26.652439840 -0700
1444 @@ -224,6 +224,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo
1446 input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
1447 $(LOCALEDEF) --alias-file=../intl/locale.alias \
1449 -i locales/$$input -c -f charmaps/$$charset \
1450 $(addprefix --prefix=,$(install_root)) $$locale; \
1452 diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED
1453 --- a/localedata/SUPPORTED 2012-01-01 05:16:32.000000000 -0700
1454 +++ b/localedata/SUPPORTED 2012-01-01 20:41:26.652439840 -0700
1455 @@ -88,6 +88,7 @@ cy_GB.UTF-8/UTF-8 \
1459 +da_DK.ISO-8859-15/ISO-8859-15 \
1462 de_AT@euro/ISO-8859-15 \
1463 @@ -119,6 +120,7 @@ en_DK.UTF-8/UTF-8 \
1467 +en_GB.ISO-8859-15/ISO-8859-15 \
1471 @@ -134,6 +136,7 @@ en_SG.UTF-8/UTF-8 \
1475 +en_US.ISO-8859-15/ISO-8859-15 \
1479 @@ -316,6 +319,8 @@ nl_NL/ISO-8859-1 \
1480 nl_NL@euro/ISO-8859-15 \
1483 +no_NO.UTF-8/UTF-8 \
1488 @@ -377,6 +382,7 @@ sv_FI/ISO-8859-1 \
1489 sv_FI@euro/ISO-8859-15 \
1492 +sv_SE.ISO-8859-15/ISO-8859-15 \
1496 diff -Nrup a/localedata/locales/cy_GB b/localedata/locales/cy_GB
1497 --- a/localedata/locales/cy_GB 2012-01-01 05:16:32.000000000 -0700
1498 +++ b/localedata/locales/cy_GB 2012-01-01 20:41:26.653439839 -0700
1499 @@ -248,8 +248,11 @@ mon "<U0049><U006F><U006E><U0061
1500 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>"
1501 d_fmt "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0079>"
1502 t_fmt "<U0025><U0054>"
1505 +am_pm "<U0041><U004D>";"<U0050><U004D>"
1506 +t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
1507 +date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
1508 +<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
1509 +<U0025><U005A><U0020><U0025><U0059>"
1513 diff -Nrup a/localedata/locales/en_GB b/localedata/locales/en_GB
1514 --- a/localedata/locales/en_GB 2012-01-01 05:16:32.000000000 -0700
1515 +++ b/localedata/locales/en_GB 2012-01-01 20:41:26.653439839 -0700
1516 @@ -116,8 +116,8 @@ mon "<U004A><U0061><U006E><U0075
1517 d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
1518 d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
1519 t_fmt "<U0025><U0054>"
1522 +am_pm "<U0041><U004D>";"<U0050><U004D>"
1523 +t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
1524 date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
1525 <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
1526 <U0025><U005A><U0020><U0025><U0059>"
1527 diff -Nrup a/localedata/locales/no_NO b/localedata/locales/no_NO
1528 --- a/localedata/locales/no_NO 1969-12-31 17:00:00.000000000 -0700
1529 +++ b/localedata/locales/no_NO 2012-01-01 20:41:26.653439839 -0700
1534 +% Norwegian language locale for Norway
1535 +% Source: Norsk Standardiseringsforbund
1536 +% Address: University Library,
1537 +% Drammensveien 41, N-9242 Oslo, Norge
1538 +% Contact: Kolbjoern Aamboe
1539 +% Tel: +47 - 22859109
1540 +% Fax: +47 - 22434497
1541 +% Email: kolbjorn.aambo@usit.uio.no
1546 +% Application: general
1548 +% Repertoiremap: mnemonic.ds
1549 +% Charset: ISO-8859-1
1550 +% Distribution and use is free, also
1551 +% for commercial purposes.
1555 +END LC_IDENTIFICATION
1600 diff -Nrup a/localedata/locales/zh_TW b/localedata/locales/zh_TW
1601 --- a/localedata/locales/zh_TW 2012-01-01 05:16:32.000000000 -0700
1602 +++ b/localedata/locales/zh_TW 2012-01-01 20:41:26.653439839 -0700
1607 -% Chinese language locale for Taiwan R.O.C.
1608 +% Chinese language locale for Taiwan
1609 % charmap: BIG5-CP950
1612 @@ -17,7 +17,7 @@ escape_char /
1613 % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
1616 -title "Chinese locale for Taiwan R.O.C."
1617 +title "Chinese locale for Taiwan"
1621 @@ -25,7 +25,7 @@ email "bug-glibc-locales@gnu.org"
1625 -territory "Taiwan R.O.C."
1630 diff -Nrup a/login/programs/pt_chown.c b/login/programs/pt_chown.c
1631 --- a/login/programs/pt_chown.c 2012-01-01 05:16:32.000000000 -0700
1632 +++ b/login/programs/pt_chown.c 2012-01-01 20:41:26.654439839 -0700
1635 #include <sys/stat.h>
1639 # include <sys/capability.h>
1640 # include <sys/prctl.h>
1641 @@ -143,7 +144,7 @@ main (int argc, char *argv[])
1642 uid_t uid = getuid ();
1645 - if (argc == 1 && euid == 0)
1646 + if (argc == 1 && fcntl (PTY_FILENO, F_GETFD) == 0)
1649 /* Drop privileges. */
1650 @@ -176,6 +177,13 @@ main (int argc, char *argv[])
1652 /* We aren't going to be using privileges, so drop them right now. */
1655 + cap_t caps = cap_init ();
1657 + error (1, errno, "cap_init");
1658 + cap_set_proc (caps);
1662 /* Set locale via LC_ALL. */
1663 setlocale (LC_ALL, "");
1664 @@ -195,9 +203,5 @@ main (int argc, char *argv[])
1665 return EXIT_FAILURE;
1668 - /* Check if we are properly installed. */
1670 - error (FAIL_EXEC, 0, gettext ("needs to be installed setuid `root'"));
1672 return EXIT_SUCCESS;
1674 diff -Nrup a/malloc/mcheck.c b/malloc/mcheck.c
1675 --- a/malloc/mcheck.c 2012-01-01 05:16:32.000000000 -0700
1676 +++ b/malloc/mcheck.c 2012-01-01 20:41:26.654439839 -0700
1678 # include <mcheck.h>
1679 # include <stdint.h>
1681 +# include <stdlib.h>
1682 # include <libintl.h>
1687 +extern __typeof (malloc) __libc_malloc;
1688 +extern __typeof (free) __libc_free;
1689 +extern __typeof (realloc) __libc_realloc;
1690 +libc_hidden_proto (__libc_malloc)
1691 +libc_hidden_proto (__libc_realloc)
1692 +libc_hidden_proto (__libc_free)
1693 +libc_hidden_proto (__libc_memalign)
1695 +# define __libc_malloc(sz) malloc (sz)
1696 +# define __libc_free(ptr) free (ptr)
1697 +# define __libc_realloc(ptr, sz) realloc (ptr, sz)
1698 +# define __libc_memalign(al, sz) memalign (al, sz)
1701 /* Old hook values. */
1702 static void (*old_free_hook) (__ptr_t ptr, __const __ptr_t);
1703 static __ptr_t (*old_malloc_hook) (__malloc_size_t size, const __ptr_t);
1704 @@ -199,7 +215,7 @@ freehook (__ptr_t ptr, const __ptr_t cal
1705 if (old_free_hook != NULL)
1706 (*old_free_hook) (ptr, caller);
1709 + __libc_free (ptr);
1710 __free_hook = freehook;
1713 @@ -222,7 +238,7 @@ mallochook (__malloc_size_t size, const
1714 hdr = (struct hdr *) (*old_malloc_hook) (sizeof (struct hdr) + size + 1,
1717 - hdr = (struct hdr *) malloc (sizeof (struct hdr) + size + 1);
1718 + hdr = (struct hdr *) __libc_malloc (sizeof (struct hdr) + size + 1);
1719 __malloc_hook = mallochook;
1722 @@ -259,7 +275,7 @@ memalignhook (__malloc_size_t alignment,
1723 if (old_memalign_hook != NULL)
1724 block = (*old_memalign_hook) (alignment, slop + size + 1, caller);
1726 - block = memalign (alignment, slop + size + 1);
1727 + block = __libc_memalign (alignment, slop + size + 1);
1728 __memalign_hook = memalignhook;
1731 @@ -320,8 +336,8 @@ reallochook (__ptr_t ptr, __malloc_size_
1732 sizeof (struct hdr) + size + 1,
1735 - hdr = (struct hdr *) realloc ((__ptr_t) hdr,
1736 - sizeof (struct hdr) + size + 1);
1737 + hdr = (struct hdr *) __libc_realloc ((__ptr_t) hdr,
1738 + sizeof (struct hdr) + size + 1);
1739 __free_hook = freehook;
1740 __malloc_hook = mallochook;
1741 __memalign_hook = memalignhook;
1742 @@ -381,8 +397,8 @@ mcheck (func)
1743 if (__malloc_initialized <= 0 && !mcheck_used)
1745 /* We call malloc() once here to ensure it is initialized. */
1746 - void *p = malloc (0);
1748 + void *p = __libc_malloc (0);
1751 old_free_hook = __free_hook;
1752 __free_hook = freehook;
1753 diff -Nrup a/manual/libc.texinfo b/manual/libc.texinfo
1754 --- a/manual/libc.texinfo 2012-01-01 05:16:32.000000000 -0700
1755 +++ b/manual/libc.texinfo 2012-01-01 20:41:26.655439839 -0700
1757 @c setchapternewpage odd
1759 @comment Tell install-info what to do.
1760 -@dircategory Software libraries
1761 +@dircategory Libraries
1763 * Libc: (libc). C library.
1765 diff -Nrup a/misc/sys/cdefs.h b/misc/sys/cdefs.h
1766 --- a/misc/sys/cdefs.h 2012-01-01 05:16:32.000000000 -0700
1767 +++ b/misc/sys/cdefs.h 2012-01-01 20:41:26.655439839 -0700
1768 @@ -146,7 +146,10 @@
1769 #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
1770 #define __bos0(ptr) __builtin_object_size (ptr, 0)
1772 -#if __GNUC_PREREQ (4,3)
1773 +#if __GNUC_PREREQ (4,3) \
1774 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1775 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1776 + && __GNUC_RH_RELEASE__ >= 31)
1777 # define __warndecl(name, msg) \
1778 extern void name (void) __attribute__((__warning__ (msg)))
1779 # define __warnattr(msg) __attribute__((__warning__ (msg)))
1780 @@ -316,10 +319,16 @@
1782 /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
1783 inline semantics, unless -fgnu89-inline is used. */
1784 -#if !defined __cplusplus || __GNUC_PREREQ (4,3)
1785 +#if !defined __cplusplus || __GNUC_PREREQ (4,3) \
1786 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1787 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1788 + && __GNUC_RH_RELEASE__ >= 31)
1789 # if defined __GNUC_STDC_INLINE__ || defined __cplusplus
1790 # define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
1791 -# if __GNUC_PREREQ (4,3)
1792 +# if __GNUC_PREREQ (4,3) \
1793 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1794 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1795 + && __GNUC_RH_RELEASE__ >= 31)
1796 # define __extern_always_inline \
1797 extern __always_inline __attribute__ ((__gnu_inline__, __artificial__))
1799 @@ -339,7 +348,10 @@
1801 /* GCC 4.3 and above allow passing all anonymous arguments of an
1802 __extern_always_inline function to some other vararg function. */
1803 -#if __GNUC_PREREQ (4,3)
1804 +#if __GNUC_PREREQ (4,3) \
1805 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1806 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1807 + && __GNUC_RH_RELEASE__ >= 31)
1808 # define __va_arg_pack() __builtin_va_arg_pack ()
1809 # define __va_arg_pack_len() __builtin_va_arg_pack_len ()
1811 diff -Nrup a/nis/Makefile b/nis/Makefile
1812 --- a/nis/Makefile 2012-01-01 05:16:32.000000000 -0700
1813 +++ b/nis/Makefile 2012-01-01 20:41:26.656439839 -0700
1814 @@ -23,9 +23,9 @@ subdir := nis
1818 +headers := $(wildcard rpcsvc/*.[hx])
1819 distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
1820 - nisplus-parser.h nis_xdr.h nss \
1821 - $(wildcard rpcsvc/*.[hx])
1822 + nisplus-parser.h nis_xdr.h nss
1824 # These are the databases available for the nis (and perhaps later nisplus)
1825 # service. This must be a superset of the services in nss.
1826 @@ -69,6 +69,8 @@ libnss_nisplus-inhibit-o = $(filter-out
1830 +CFLAGS-nis_findserv.c += -fno-strict-aliasing
1831 +CFLAGS-ypclnt.c += -fno-strict-aliasing
1833 $(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
1834 $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
1835 diff -Nrup a/nis/nss b/nis/nss
1836 --- a/nis/nss 2012-01-01 05:16:32.000000000 -0700
1837 +++ b/nis/nss 2012-01-01 20:41:26.656439839 -0700
1839 # memory with every getXXent() call. Otherwise each getXXent() call
1840 # might result into a network communication with the server to get
1842 -#SETENT_BATCH_READ=TRUE
1843 +SETENT_BATCH_READ=TRUE
1846 # If set to TRUE, the passwd routines in the NIS NSS module will not
1847 diff -Nrup a/nptl/ChangeLog b/nptl/ChangeLog
1848 --- a/nptl/ChangeLog 2012-01-01 05:16:32.000000000 -0700
1849 +++ b/nptl/ChangeLog 2012-01-01 20:41:26.659439839 -0700
1850 @@ -210,6 +210,51 @@
1852 Patch partly by Robert Rex <robert.rex@exasol.com>.
1854 +2011-02-22 Rayson Ho <rho@redhat.com>
1856 + * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1858 + * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1859 + * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1860 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1861 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1862 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1863 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1864 + * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1865 + * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1867 +2011-02-09 Rayson Ho <rho@redhat.com>
1869 + * DESIGN-systemtap-probes.txt: New file.
1870 + * pthread_cond_broadcast.c: SystemTap probes.
1871 + * pthread_cond_init.c: Likewise.
1872 + * pthread_cond_signal.c: Likewise.
1873 + * pthread_cond_wait.c: Likewise.
1874 + * pthread_cond_destroy.c: Likewise.
1875 + * pthread_create.c: Likewise.
1876 + * pthread_join.c: Likewise.
1877 + * pthread_mutex_destroy.c: Likewise.
1878 + * pthread_mutex_init.c: Likewise.
1879 + * pthread_mutex_lock.c: Likewise.
1880 + * pthread_mutex_timedlock.c: Likewise.
1881 + * pthread_mutex_unlock.c: Likewise.
1882 + * pthread_rwlock_destroy.c: Likewise.
1883 + * pthread_rwlock_rdlock.c: Likewise.
1884 + * pthread_rwlock_unlock.c: Likewise.
1885 + * pthread_rwlock_wrlock.c: Likewise.
1886 + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1887 + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1888 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1889 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1890 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1891 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1892 + * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1893 + * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1895 +2010-07-23 Roland McGrath <roland@redhat.com>
1897 + * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1899 2011-01-19 Roland McGrath <roland@redhat.com>
1901 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1902 @@ -4939,6 +4984,11 @@
1903 Move definition inside libpthread, libc, librt check. Provide
1904 definition for rtld.
1906 +2004-09-02 Jakub Jelinek <jakub@redhat.com>
1908 + * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1909 + waiters, awake all waiters on the associated mutex.
1911 2004-09-02 Ulrich Drepper <drepper@redhat.com>
1913 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1914 @@ -7013,6 +7063,11 @@
1916 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
1918 +2003-07-22 Jakub Jelinek <jakub@redhat.com>
1920 + * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
1921 + if __need_struct_pthread_size, instead define lll_lock_t.
1923 2003-07-25 Jakub Jelinek <jakub@redhat.com>
1925 * tst-cancel17.c (do_test): Check if aio_cancel failed.
1926 diff -Nrup a/nptl/DESIGN-systemtap-probes.txt b/nptl/DESIGN-systemtap-probes.txt
1927 --- a/nptl/DESIGN-systemtap-probes.txt 1969-12-31 17:00:00.000000000 -0700
1928 +++ b/nptl/DESIGN-systemtap-probes.txt 2012-01-01 20:41:26.660439839 -0700
1930 +Systemtap is a dynamic tracing/instrumenting tool available on Linux. Probes
1931 +that are not fired at run time have close to zero overhead.
1933 +The following probes are available for NPTL:
1935 +Thread creation & Join Probes
1936 +=============================
1937 +pthread_create - probe for pthread_create
1938 + arg1 = pointer (pthread_t*) to thread
1939 + arg2 = pointer (pthread_attr_t*) to attr
1940 + arg3 = pointer (void *) to start_routine
1941 + arg4 = arguments to start_routine
1942 +pthread_start - probe for actual thread creation
1943 + arg1 = struct pthread (members include thread ID, process ID)
1944 + arg2 = address of start_routine
1945 + arg3 = pointer to the list of arguments
1946 +pthread_join - probe for pthread_join
1948 +pthread_join_ret - probe for pthread_join return
1950 + arg2 = return value
1952 +Lock-related Probes
1953 +===================
1954 +mutex_init - probe for pthread_mutex_init
1955 + arg1 = address of mutex lock
1956 +mutex_acquired - probe for succ. return of pthread_mutex_lock
1957 + arg1 = address of mutex lock
1958 +mutex_timedlock_acquired - probe for succ. return of pthread_mutex_timedlock
1959 + arg1 = address of mutex lock
1960 +mutex_entry - probe for entry to the pthread_mutex_lock function
1961 + arg1 = address of mutex lock
1962 +mutex_timedlock_entry - probe for entry to the pthread_mutex_timedlock function
1963 + arg1 = address of mutex lock, arg2 = address of timespec
1964 +mutex_release - probe for pthread_mutex_unlock after the successful release of a
1966 + arg1 = address of mutex lock
1967 +mutex_destroy - probe for pthread_mutex_destroy
1968 + arg1 = address of mutex lock
1970 +wrlock_entry - probe for entry to the pthread_rwlock_wrlock function
1971 + arg1 = address of rw lock
1972 +rdlock_entry - probe for entry to the pthread_rwlock_rdlock function
1973 + arg1 = address of rw lock
1975 +rwlock_destroy - probe for pthread_rwlock_destroy
1976 + arg1 = address of rw lock
1977 +wrlock_acquire_write - probe for pthread_rwlock_wrlock (after getting the lock)
1978 + arg1 = address of rw lock
1979 +rdlock_acquire_read - probe for pthread_rwlock_rdlock after successfully getting
1981 + arg1 = address of rw lock
1982 +rwlock_unlock - probe for pthread_rwlock_unlock
1983 + arg1 = address of rw lock
1985 +lll_lock_wait - probe in low-level (assembly language) locking code, only fired
1986 + when futex/FUTEX_WAIT is called (i.e. when trying to acquire a
1988 + arg1 = pointer to futex
1989 + arg2 = flags passed to the futex system call
1990 +lll_lock_wait_private - probe in low-level (assembly language) locking code,
1991 + only fired when futex/FUTEX_WAIT is called (i.e. when
1992 + trying to acquire a contented lock)
1993 + arg1 = pointer to futex
1995 +lll_futex_wake - probe in low-level (assembly language) locking code, only fired
1996 + when futex (FUTEX_WAKE) is called
1997 + arg1 = pointer to futex
1998 + arg2 = number of processes to wake
1999 + arg3 = additional flags
2001 +Condition variable Probes
2002 +=========================
2003 +cond_init - probe for pthread_cond_init
2006 +cond_destroy - probe for pthread_cond_destroy
2008 +cond_wait - probe for pthread_cond_wait
2011 +cond_timedwait - probe for pthread_cond_timedwait
2015 +cond_signal - probe for pthread_cond_signal
2017 +cond_broadcast - probe for pthread_cond_broadcast
2019 diff -Nrup a/nptl/Makefile b/nptl/Makefile
2020 --- a/nptl/Makefile 2012-01-01 05:16:32.000000000 -0700
2021 +++ b/nptl/Makefile 2012-01-01 20:41:26.660439839 -0700
2022 @@ -342,7 +342,8 @@ endif
2023 extra-objs += $(crti-objs) $(crtn-objs)
2024 omit-deps += crti crtn
2026 -CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
2027 +CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \
2028 + -fno-asynchronous-unwind-tables
2031 CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
2032 @@ -529,15 +530,19 @@ $(addprefix $(objpfx), \
2033 $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
2034 $(objpfx)libpthread_nonshared.a
2035 $(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so
2036 -# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
2037 +# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
2038 # since otherwise libpthread.so comes before libc.so when linking.
2039 $(addprefix $(objpfx), $(tests-reverse)): \
2040 - $(objpfx)../libc.so $(objpfx)libpthread.so \
2041 + $(objpfx)linklibc.so $(objpfx)libpthread.so \
2042 $(objpfx)libpthread_nonshared.a
2043 $(objpfx)../libc.so: $(common-objpfx)libc.so ;
2044 $(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
2046 $(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
2048 +$(objpfx)linklibc.so: $(common-objpfx)libc.so
2049 + ln -s ../libc.so $@
2050 +generated += libclink.so
2052 $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
2054 diff -Nrup a/nptl/Versions b/nptl/Versions
2055 --- a/nptl/Versions 2012-01-01 05:16:32.000000000 -0700
2056 +++ b/nptl/Versions 2012-01-01 20:41:26.661439839 -0700
2057 @@ -30,6 +30,7 @@ libc {
2058 __libc_alloca_cutoff;
2059 # Internal libc interface to libpthread
2060 __libc_dl_error_tsd;
2065 diff -Nrup a/nptl/nptl-init.c b/nptl/nptl-init.c
2066 --- a/nptl/nptl-init.c 2012-01-01 05:16:32.000000000 -0700
2067 +++ b/nptl/nptl-init.c 2012-01-01 20:41:26.661439839 -0700
2068 @@ -415,7 +415,7 @@ __pthread_initialize_minimal_internal (v
2069 /* Determine the default allowed stack size. This is the size used
2070 in case the user does not specify one. */
2071 struct rlimit limit;
2072 - if (getrlimit (RLIMIT_STACK, &limit) != 0
2073 + if (__getrlimit (RLIMIT_STACK, &limit) != 0
2074 || limit.rlim_cur == RLIM_INFINITY)
2075 /* The system limit is not usable. Use an architecture-specific
2077 diff -Nrup a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c
2078 --- a/nptl/pthread_cond_broadcast.c 2012-01-01 05:16:32.000000000 -0700
2079 +++ b/nptl/pthread_cond_broadcast.c 2012-01-01 20:41:26.662439839 -0700
2081 #include <lowlevellock.h>
2082 #include <pthread.h>
2083 #include <pthreadP.h>
2084 +#include <stap-probe.h>
2086 #include <shlib-compat.h>
2087 #include <kernel-features.h>
2088 @@ -32,6 +33,8 @@ int
2089 __pthread_cond_broadcast (cond)
2090 pthread_cond_t *cond;
2092 + LIBC_PROBE (cond_broadcast, 1, cond);
2094 int pshared = (cond->__data.__mutex == (void *) ~0l)
2095 ? LLL_SHARED : LLL_PRIVATE;
2096 /* Make sure we are alone. */
2097 diff -Nrup a/nptl/pthread_cond_destroy.c b/nptl/pthread_cond_destroy.c
2098 --- a/nptl/pthread_cond_destroy.c 2012-01-01 05:16:32.000000000 -0700
2099 +++ b/nptl/pthread_cond_destroy.c 2012-01-01 20:41:26.662439839 -0700
2102 #include <shlib-compat.h>
2103 #include "pthreadP.h"
2104 +#include <stap-probe.h>
2108 @@ -29,6 +30,8 @@ __pthread_cond_destroy (cond)
2109 int pshared = (cond->__data.__mutex == (void *) ~0l)
2110 ? LLL_SHARED : LLL_PRIVATE;
2112 + LIBC_PROBE (cond_destroy, 1, cond);
2114 /* Make sure we are alone. */
2115 lll_lock (cond->__data.__lock, pshared);
2117 diff -Nrup a/nptl/pthread_cond_init.c b/nptl/pthread_cond_init.c
2118 --- a/nptl/pthread_cond_init.c 2012-01-01 05:16:32.000000000 -0700
2119 +++ b/nptl/pthread_cond_init.c 2012-01-01 20:41:26.662439839 -0700
2122 #include <shlib-compat.h>
2123 #include "pthreadP.h"
2124 +#include <stap-probe.h>
2128 @@ -42,6 +43,8 @@ __pthread_cond_init (cond, cond_attr)
2129 ? NULL : (void *) ~0l);
2130 cond->__data.__broadcast_seq = 0;
2132 + LIBC_PROBE (cond_init, 2, cond, cond_attr);
2136 versioned_symbol (libpthread, __pthread_cond_init,
2137 diff -Nrup a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c
2138 --- a/nptl/pthread_cond_signal.c 2012-01-01 05:16:32.000000000 -0700
2139 +++ b/nptl/pthread_cond_signal.c 2012-01-01 20:41:26.663439839 -0700
2142 #include <shlib-compat.h>
2143 #include <kernel-features.h>
2144 +#include <stap-probe.h>
2148 @@ -35,6 +36,8 @@ __pthread_cond_signal (cond)
2149 int pshared = (cond->__data.__mutex == (void *) ~0l)
2150 ? LLL_SHARED : LLL_PRIVATE;
2152 + LIBC_PROBE (cond_signal, 1, cond);
2154 /* Make sure we are alone. */
2155 lll_lock (cond->__data.__lock, pshared);
2157 diff -Nrup a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c
2158 --- a/nptl/pthread_cond_wait.c 2012-01-01 05:16:32.000000000 -0700
2159 +++ b/nptl/pthread_cond_wait.c 2012-01-01 20:41:26.663439839 -0700
2161 #include <pthreadP.h>
2163 #include <shlib-compat.h>
2164 +#include <stap-probe.h>
2167 struct _condvar_cleanup_buffer
2168 @@ -101,6 +102,8 @@ __pthread_cond_wait (cond, mutex)
2169 int pshared = (cond->__data.__mutex == (void *) ~0l)
2170 ? LLL_SHARED : LLL_PRIVATE;
2172 + LIBC_PROBE (cond_wait, 2, cond, mutex);
2174 /* Make sure we are alone. */
2175 lll_lock (cond->__data.__lock, pshared);
2177 diff -Nrup a/nptl/pthread_create.c b/nptl/pthread_create.c
2178 --- a/nptl/pthread_create.c 2012-01-01 05:16:32.000000000 -0700
2179 +++ b/nptl/pthread_create.c 2012-01-01 20:41:26.664439838 -0700
2182 #include <shlib-compat.h>
2184 +#include <stap-probe.h>
2187 /* Local function to start thread and handle cleanup. */
2188 static int start_thread (void *arg);
2189 @@ -300,6 +302,8 @@ start_thread (void *arg)
2190 CANCEL_RESET (oldtype);
2193 + LIBC_PROBE (pthread_start, 3, (pthread_t) pd, pd->start_routine, pd->arg);
2195 /* Run the code the user provided. */
2196 #ifdef CALL_THREAD_FCT
2197 THREAD_SETMEM (pd, result, CALL_THREAD_FCT (pd));
2198 @@ -557,6 +561,8 @@ __pthread_create_2_1 (newthread, attr, s
2199 /* Pass the descriptor to the caller. */
2200 *newthread = (pthread_t) pd;
2202 + LIBC_PROBE (pthread_create, 4, newthread, attr, start_routine, arg);
2204 /* Start the thread. */
2205 return create_thread (pd, iattr, STACK_VARIABLES_ARGS);
2207 diff -Nrup a/nptl/pthread_join.c b/nptl/pthread_join.c
2208 --- a/nptl/pthread_join.c 2012-01-01 05:16:32.000000000 -0700
2209 +++ b/nptl/pthread_join.c 2012-01-01 20:41:26.664439838 -0700
2212 #include "pthreadP.h"
2214 +#include <stap-probe.h>
2219 @@ -55,6 +57,8 @@ pthread_join (threadid, thread_return)
2220 struct pthread *self = THREAD_SELF;
2223 + LIBC_PROBE (pthread_join, 1, threadid);
2225 /* During the wait we change to asynchronous cancellation. If we
2226 are canceled the thread we are waiting for must be marked as
2227 un-wait-ed for again. */
2228 @@ -110,5 +114,7 @@ pthread_join (threadid, thread_return)
2232 + LIBC_PROBE (pthread_join_ret, 3, threadid, result, pd->result);
2236 diff -Nrup a/nptl/pthread_mutex_destroy.c b/nptl/pthread_mutex_destroy.c
2237 --- a/nptl/pthread_mutex_destroy.c 2012-01-01 05:16:32.000000000 -0700
2238 +++ b/nptl/pthread_mutex_destroy.c 2012-01-01 20:41:26.665439837 -0700
2241 #include "pthreadP.h"
2243 +#include <stap-probe.h>
2247 __pthread_mutex_destroy (mutex)
2248 pthread_mutex_t *mutex;
2250 + LIBC_PROBE (mutex_destroy, 1, mutex);
2252 if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0
2253 && mutex->__data.__nusers != 0)
2255 diff -Nrup a/nptl/pthread_mutex_init.c b/nptl/pthread_mutex_init.c
2256 --- a/nptl/pthread_mutex_init.c 2012-01-01 05:16:32.000000000 -0700
2257 +++ b/nptl/pthread_mutex_init.c 2012-01-01 20:41:26.665439837 -0700
2259 #include <kernel-features.h>
2260 #include "pthreadP.h"
2262 +#include <stap-probe.h>
2264 static const struct pthread_mutexattr default_attr =
2266 /* Default is a normal mutex, not shared between processes. */
2267 @@ -135,6 +137,8 @@ __pthread_mutex_init (mutex, mutexattr)
2268 // mutex->__spins = 0; already done by memset
2269 // mutex->__next = NULL; already done by memset
2271 + LIBC_PROBE (mutex_init, 1, mutex);
2275 strong_alias (__pthread_mutex_init, pthread_mutex_init)
2276 diff -Nrup a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c
2277 --- a/nptl/pthread_mutex_lock.c 2012-01-01 05:16:32.000000000 -0700
2278 +++ b/nptl/pthread_mutex_lock.c 2012-01-01 20:41:26.665439837 -0700
2280 #include <not-cancel.h>
2281 #include "pthreadP.h"
2282 #include <lowlevellock.h>
2283 +#include <stap-probe.h>
2286 #ifndef LLL_MUTEX_LOCK
2287 @@ -48,6 +49,9 @@ __pthread_mutex_lock (mutex)
2288 assert (sizeof (mutex->__size) >= sizeof (mutex->__data));
2290 unsigned int type = PTHREAD_MUTEX_TYPE (mutex);
2292 + LIBC_PROBE (mutex_entry, 1, mutex);
2294 if (__builtin_expect (type & ~PTHREAD_MUTEX_KIND_MASK_NP, 0))
2295 return __pthread_mutex_lock_full (mutex);
2297 @@ -127,6 +131,8 @@ __pthread_mutex_lock (mutex)
2298 ++mutex->__data.__nusers;
2301 + LIBC_PROBE (mutex_acquired, 1, mutex);
2306 @@ -467,6 +473,8 @@ __pthread_mutex_lock_full (pthread_mutex
2307 ++mutex->__data.__nusers;
2310 + LIBC_PROBE (mutex_acquired, 1, mutex);
2314 #ifndef __pthread_mutex_lock
2315 diff -Nrup a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
2316 --- a/nptl/pthread_mutex_timedlock.c 2012-01-01 05:16:32.000000000 -0700
2317 +++ b/nptl/pthread_mutex_timedlock.c 2012-01-01 20:41:26.666439837 -0700
2319 #include <lowlevellock.h>
2320 #include <not-cancel.h>
2322 +#include <stap-probe.h>
2326 pthread_mutex_timedlock (mutex, abstime)
2327 @@ -34,6 +36,8 @@ pthread_mutex_timedlock (mutex, abstime)
2328 pid_t id = THREAD_GETMEM (THREAD_SELF, tid);
2331 + LIBC_PROBE (mutex_timedlock_entry, 2, mutex, abstime);
2333 /* We must not check ABSTIME here. If the thread does not block
2334 abstime must not be checked for a valid value. */
2336 @@ -172,6 +176,8 @@ pthread_mutex_timedlock (mutex, abstime)
2338 ++mutex->__data.__count;
2340 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2345 @@ -242,6 +248,8 @@ pthread_mutex_timedlock (mutex, abstime)
2347 ++mutex->__data.__count;
2349 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2354 @@ -377,6 +385,8 @@ pthread_mutex_timedlock (mutex, abstime)
2356 ++mutex->__data.__count;
2358 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2363 @@ -477,6 +487,8 @@ pthread_mutex_timedlock (mutex, abstime)
2364 /* Record the ownership. */
2365 mutex->__data.__owner = id;
2366 ++mutex->__data.__nusers;
2368 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2372 diff -Nrup a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c
2373 --- a/nptl/pthread_mutex_unlock.c 2012-01-01 05:16:32.000000000 -0700
2374 +++ b/nptl/pthread_mutex_unlock.c 2012-01-01 20:41:26.666439837 -0700
2377 #include "pthreadP.h"
2378 #include <lowlevellock.h>
2379 +#include <stap-probe.h>
2383 @@ -50,6 +51,9 @@ __pthread_mutex_unlock_usercnt (mutex, d
2386 lll_unlock (mutex->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex));
2388 + LIBC_PROBE (mutex_release, 1, mutex);
2392 else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1))
2393 @@ -272,6 +276,9 @@ __pthread_mutex_unlock_full (pthread_mut
2394 PTHREAD_MUTEX_PSHARED (mutex));
2396 int oldprio = newval >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT;
2398 + LIBC_PROBE (mutex_release, 1, mutex);
2400 return __pthread_tpp_change_priority (oldprio, -1);
2403 @@ -279,6 +286,7 @@ __pthread_mutex_unlock_full (pthread_mut
2407 + LIBC_PROBE (mutex_release, 1, mutex);
2411 diff -Nrup a/nptl/pthread_rwlock_destroy.c b/nptl/pthread_rwlock_destroy.c
2412 --- a/nptl/pthread_rwlock_destroy.c 2012-01-01 05:16:32.000000000 -0700
2413 +++ b/nptl/pthread_rwlock_destroy.c 2012-01-01 20:41:26.667439837 -0700
2417 #include "pthreadP.h"
2418 +#include <stap-probe.h>
2422 __pthread_rwlock_destroy (rwlock)
2423 pthread_rwlock_t *rwlock;
2425 + LIBC_PROBE (rwlock_destroy, 1, rwlock);
2427 /* Nothing to be done. For now. */
2430 diff -Nrup a/nptl/pthread_rwlock_rdlock.c b/nptl/pthread_rwlock_rdlock.c
2431 --- a/nptl/pthread_rwlock_rdlock.c 2012-01-01 05:16:32.000000000 -0700
2432 +++ b/nptl/pthread_rwlock_rdlock.c 2012-01-01 20:41:26.667439837 -0700
2434 #include <lowlevellock.h>
2435 #include <pthread.h>
2436 #include <pthreadP.h>
2437 +#include <stap-probe.h>
2440 /* Acquire read lock for RWLOCK. */
2441 @@ -31,6 +32,8 @@ __pthread_rwlock_rdlock (rwlock)
2445 + LIBC_PROBE (rdlock_entry, 1, rwlock);
2447 /* Make sure we are alone. */
2448 lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
2450 @@ -49,6 +52,8 @@ __pthread_rwlock_rdlock (rwlock)
2451 --rwlock->__data.__nr_readers;
2455 + LIBC_PROBE (rdlock_acquire_read, 1, rwlock);
2459 diff -Nrup a/nptl/pthread_rwlock_unlock.c b/nptl/pthread_rwlock_unlock.c
2460 --- a/nptl/pthread_rwlock_unlock.c 2012-01-01 05:16:32.000000000 -0700
2461 +++ b/nptl/pthread_rwlock_unlock.c 2012-01-01 20:41:26.668439837 -0700
2463 #include <lowlevellock.h>
2464 #include <pthread.h>
2465 #include <pthreadP.h>
2466 +#include <stap-probe.h>
2468 /* Unlock RWLOCK. */
2470 __pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
2472 + LIBC_PROBE (rwlock_unlock, 1, rwlock);
2474 lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
2475 if (rwlock->__data.__writer)
2476 rwlock->__data.__writer = 0;
2477 diff -Nrup a/nptl/pthread_rwlock_wrlock.c b/nptl/pthread_rwlock_wrlock.c
2478 --- a/nptl/pthread_rwlock_wrlock.c 2012-01-01 05:16:32.000000000 -0700
2479 +++ b/nptl/pthread_rwlock_wrlock.c 2012-01-01 20:41:26.668439837 -0700
2481 #include <lowlevellock.h>
2482 #include <pthread.h>
2483 #include <pthreadP.h>
2484 +#include <stap-probe.h>
2487 /* Acquire write lock for RWLOCK. */
2488 @@ -31,6 +32,8 @@ __pthread_rwlock_wrlock (rwlock)
2492 + LIBC_PROBE (wrlock_entry, 1, rwlock);
2494 /* Make sure we are alone. */
2495 lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
2497 @@ -41,6 +44,8 @@ __pthread_rwlock_wrlock (rwlock)
2499 /* Mark self as writer. */
2500 rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);
2502 + LIBC_PROBE (wrlock_acquire_write, 1, rwlock);
2506 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
2507 --- a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-01-01 05:16:32.000000000 -0700
2508 +++ b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-01-01 20:41:26.668439837 -0700
2510 /* Typed memory objects are not available. */
2511 #define _POSIX_TYPED_MEMORY_OBJECTS -1
2513 +/* Streams are not available. */
2514 +#define _XOPEN_STREAMS -1
2516 #endif /* bits/posix_opt.h */
2517 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/Versions b/nptl/sysdeps/unix/sysv/linux/i386/Versions
2518 --- a/nptl/sysdeps/unix/sysv/linux/i386/Versions 1969-12-31 17:00:00.000000000 -0700
2519 +++ b/nptl/sysdeps/unix/sysv/linux/i386/Versions 2012-01-01 20:41:26.669439837 -0700
2523 + # Internal libc interface to libpthread
2527 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2528 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2012-01-01 05:16:32.000000000 -0700
2529 +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2012-01-01 20:41:26.669439837 -0700
2531 #include <kernel-features.h>
2532 #include <lowlevellock.h>
2534 +#include <stap-probe.h>
2538 #ifdef __ASSUME_PRIVATE_FUTEX
2539 @@ -91,7 +93,8 @@ __lll_lock_wait_private:
2540 cmpl %edx, %eax /* NB: %edx == 2 */
2543 -1: movl $SYS_futex, %eax
2544 +1: LIBC_PROBE (lll_lock_wait_private, 1, %ebx)
2545 + movl $SYS_futex, %eax
2549 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2550 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S 2012-01-01 05:16:32.000000000 -0700
2551 +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S 2012-01-01 20:41:26.670439837 -0700
2553 #include <kernel-features.h>
2554 #include <pthread-pi-defines.h>
2555 #include <pthread-errnos.h>
2556 +#include <stap-probe.h>
2560 @@ -49,6 +50,8 @@ __pthread_cond_broadcast:
2564 + LIBC_PROBE (cond_broadcast, 1, %edx)
2566 /* Get internal lock. */
2569 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2570 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S 2012-01-01 05:16:32.000000000 -0700
2571 +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S 2012-01-01 20:41:26.670439837 -0700
2573 #include <kernel-features.h>
2574 #include <pthread-pi-defines.h>
2575 #include <pthread-errnos.h>
2577 +#include <stap-probe.h>
2581 @@ -45,6 +45,8 @@ __pthread_cond_signal:
2585 + LIBC_PROBE (cond_signal, 1, %edi)
2587 /* Get internal lock. */
2590 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2591 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2012-01-01 05:16:32.000000000 -0700
2592 +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2012-01-01 20:41:26.670439837 -0700
2594 #include <pthread-errnos.h>
2595 #include <pthread-pi-defines.h>
2596 #include <kernel-features.h>
2598 +#include <stap-probe.h>
2602 @@ -61,6 +61,8 @@ __pthread_cond_timedwait:
2606 + LIBC_PROBE (cond_timedwait, 3, %ebx, 24(%esp), %ebp)
2608 cmpl $1000000000, 4(%ebp)
2611 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2612 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-01-01 05:16:32.000000000 -0700
2613 +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-01-01 20:41:26.671439837 -0700
2615 #include <pthread-errnos.h>
2616 #include <pthread-pi-defines.h>
2617 #include <kernel-features.h>
2618 +#include <stap-probe.h>
2622 @@ -61,6 +62,8 @@ __pthread_cond_wait:
2626 + LIBC_PROBE (cond_wait, 2, 24(%esp), %ebx)
2628 /* Get internal lock. */
2631 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
2632 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S 2012-01-01 05:16:32.000000000 -0700
2633 +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S 2012-01-01 20:41:26.671439837 -0700
2635 #include <pthread-errnos.h>
2636 #include <kernel-features.h>
2638 +#include <stap-probe.h>
2642 @@ -41,6 +42,8 @@ __pthread_rwlock_rdlock:
2646 + LIBC_PROBE (rdlock_entry, 1, %ebx)
2651 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
2652 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S 2012-01-01 05:16:32.000000000 -0700
2653 +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S 2012-01-01 20:41:26.672439837 -0700
2655 #include <pthread-errnos.h>
2656 #include <kernel-features.h>
2658 +#include <stap-probe.h>
2662 @@ -41,6 +42,8 @@ __pthread_rwlock_wrlock:
2666 + LIBC_PROBE (wrlock_entry, 1, %ebx)
2671 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
2672 --- a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2012-01-01 05:16:32.000000000 -0700
2673 +++ b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2012-01-01 20:41:26.672439837 -0700
2675 #ifndef _LOWLEVELLOCK_H
2676 #define _LOWLEVELLOCK_H 1
2678 +#include <stap-probe.h>
2680 #ifndef __ASSEMBLER__
2682 # include <sys/param.h>
2683 @@ -226,6 +228,7 @@ LLL_STUB_UNWIND_INFO_END
2686 register __typeof (nr) _nr asm ("edx") = (nr); \
2687 + LIBC_PROBE (lll_futex_wake, 3, futex, nr, private); \
2688 __asm __volatile (LLL_EBX_LOAD \
2691 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/smp.h b/nptl/sysdeps/unix/sysv/linux/i386/smp.h
2692 --- a/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2012-01-01 05:16:32.000000000 -0700
2693 +++ b/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2012-01-01 20:41:26.673439836 -0700
2694 @@ -37,7 +37,7 @@ is_smp_system (void)
2697 /* Try reading the number using `sysctl' first. */
2698 - if (uname (&u.uts) == 0)
2699 + if (__uname (&u.uts) == 0)
2703 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/kernel-features.h b/nptl/sysdeps/unix/sysv/linux/kernel-features.h
2704 --- a/nptl/sysdeps/unix/sysv/linux/kernel-features.h 1969-12-31 17:00:00.000000000 -0700
2705 +++ b/nptl/sysdeps/unix/sysv/linux/kernel-features.h 2012-01-01 20:41:26.673439836 -0700
2707 +#include_next <kernel-features.h>
2709 +/* NPTL can always assume all clone thread flags work. */
2710 +#ifndef __ASSUME_CLONE_THREAD_FLAGS
2711 +# define __ASSUME_CLONE_THREAD_FLAGS 1
2713 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2714 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2012-01-01 05:16:32.000000000 -0700
2715 +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2012-01-01 20:41:26.673439836 -0700
2717 #include <kernel-features.h>
2718 #include <lowlevellock.h>
2720 +#include <stap-probe.h>
2724 #ifdef __ASSUME_PRIVATE_FUTEX
2725 @@ -87,7 +89,8 @@ __lll_lock_wait_private:
2726 cmpl %edx, %eax /* NB: %edx == 2 */
2729 -1: movl $SYS_futex, %eax
2730 +1: LIBC_PROBE (lll_lock_wait_private, 1, %rdi)
2731 + movl $SYS_futex, %eax
2735 @@ -126,7 +129,8 @@ __lll_lock_wait:
2736 cmpl %edx, %eax /* NB: %edx == 2 */
2739 -1: movl $SYS_futex, %eax
2740 +1: LIBC_PROBE (lll_lock_wait, 2, %rdi, %rsi)
2741 + movl $SYS_futex, %eax
2745 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2746 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2012-01-01 05:16:32.000000000 -0700
2747 +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2012-01-01 20:41:26.674439835 -0700
2749 #ifndef _LOWLEVELLOCK_H
2750 #define _LOWLEVELLOCK_H 1
2752 +#include <stap-probe.h>
2754 #ifndef __ASSEMBLER__
2756 # include <sys/param.h>
2757 @@ -227,6 +229,7 @@ LLL_STUB_UNWIND_INFO_END
2760 register __typeof (nr) _nr __asm ("edx") = (nr); \
2761 + LIBC_PROBE (lll_futex_wake, 3, futex, nr, private); \
2762 __asm __volatile ("syscall" \
2764 : "0" (SYS_futex), "D" (futex), \
2765 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2766 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S 2012-01-01 05:16:32.000000000 -0700
2767 +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S 2012-01-01 20:41:26.674439835 -0700
2769 #include <kernel-features.h>
2770 #include <pthread-pi-defines.h>
2771 #include <pthread-errnos.h>
2773 +#include <stap-probe.h>
2779 __pthread_cond_broadcast:
2781 + LIBC_PROBE (cond_broadcast, 1, %rdi)
2783 /* Get internal lock. */
2786 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2787 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S 2012-01-01 05:16:32.000000000 -0700
2788 +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S 2012-01-01 20:41:26.675439835 -0700
2790 #include <pthread-pi-defines.h>
2791 #include <kernel-features.h>
2792 #include <pthread-errnos.h>
2793 +#include <stap-probe.h>
2799 __pthread_cond_signal:
2801 + LIBC_PROBE (cond_signal, 1, %rdi)
2803 /* Get internal lock. */
2806 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2807 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S 2012-01-01 05:16:32.000000000 -0700
2808 +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S 2012-01-01 20:41:26.675439835 -0700
2810 #include <lowlevelcond.h>
2811 #include <pthread-pi-defines.h>
2812 #include <pthread-errnos.h>
2813 +#include <stap-probe.h>
2815 #include <kernel-features.h>
2817 @@ -68,6 +69,8 @@ __pthread_cond_timedwait:
2818 cfi_adjust_cfa_offset(FRAME_SIZE)
2821 + LIBC_PROBE (cond_timedwait, 3, %rdi, %rsi, %rdx)
2823 cmpq $1000000000, 8(%rdx)
2826 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2827 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-01-01 05:16:32.000000000 -0700
2828 +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-01-01 20:41:26.676439836 -0700
2830 #include <tcb-offsets.h>
2831 #include <pthread-pi-defines.h>
2832 #include <pthread-errnos.h>
2833 +#include <stap-probe.h>
2835 #include <kernel-features.h>
2837 @@ -66,6 +67,8 @@ __pthread_cond_wait:
2838 +--------------------------+
2841 + LIBC_PROBE (cond_wait, 2, %rdi, %rsi)
2843 cmpq $-1, dep_mutex(%rdi)
2845 /* Prepare structure passed to cancellation handler. */
2846 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
2847 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S 2012-01-01 05:16:32.000000000 -0700
2848 +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S 2012-01-01 20:41:26.677439836 -0700
2850 #include <lowlevelrwlock.h>
2851 #include <pthread-errnos.h>
2852 #include <kernel-features.h>
2854 +#include <stap-probe.h>
2860 __pthread_rwlock_rdlock:
2863 + LIBC_PROBE (rdlock_entry, 1, %rdi)
2868 diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
2869 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S 2012-01-01 05:16:32.000000000 -0700
2870 +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S 2012-01-01 20:41:26.677439836 -0700
2872 #include <lowlevelrwlock.h>
2873 #include <pthread-errnos.h>
2874 #include <kernel-features.h>
2876 +#include <stap-probe.h>
2882 __pthread_rwlock_wrlock:
2885 + LIBC_PROBE (wrlock_entry, 1, %rdi)
2890 diff -Nrup a/nscd/nscd.conf b/nscd/nscd.conf
2891 --- a/nscd/nscd.conf 2012-01-01 05:16:32.000000000 -0700
2892 +++ b/nscd/nscd.conf 2012-01-01 20:41:26.677439836 -0700
2894 # logfile /var/log/nscd.log
2897 -# server-user nobody
2899 # stat-user somebody
2902 diff -Nrup a/nscd/nscd.init b/nscd/nscd.init
2903 --- a/nscd/nscd.init 2012-01-01 05:16:32.000000000 -0700
2904 +++ b/nscd/nscd.init 2012-01-01 20:41:26.678439836 -0700
2906 # slow naming services like NIS, NIS+, LDAP, or hesiod.
2907 # processname: /usr/sbin/nscd
2908 # config: /etc/nscd.conf
2909 +# config: /etc/sysconfig/nscd
2914 # Source function library.
2915 . /etc/init.d/functions
2917 -# nscd does not run on any kernel lower than 2.2.0 because of threading
2918 -# problems, so we require that in first place.
2919 -case $(uname -r) in
2924 - # these are of course also okay
2931 +# Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS.
2932 +[ -r /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd
2936 @@ -50,7 +39,7 @@ start () {
2937 [ -d /var/run/nscd ] || mkdir /var/run/nscd
2938 [ -d /var/db/nscd ] || mkdir /var/db/nscd
2939 echo -n $"Starting $prog: "
2940 - daemon /usr/sbin/nscd
2941 + daemon /usr/sbin/nscd $NSCD_OPTIONS
2944 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
2945 @@ -83,11 +72,11 @@ restart() {
2946 # See how we were called.
2950 + [ -e /var/lock/subsys/nscd ] || start
2955 + [ ! -e /var/lock/subsys/nscd ] || stop
2959 @@ -99,14 +88,17 @@ case "$1" in
2962 try-restart | condrestart)
2963 - [ -e /var/lock/subsys/nscd ] && restart
2964 + [ ! -e /var/lock/subsys/nscd ] || restart
2967 force-reload | reload)
2968 echo -n $"Reloading $prog: "
2969 - killproc /usr/sbin/nscd -HUP
2973 + /usr/sbin/nscd -i passwd || RETVAL=$?
2974 + /usr/sbin/nscd -i group || RETVAL=$?
2975 + /usr/sbin/nscd -i hosts || RETVAL=$?
2976 + /usr/sbin/nscd -i services || RETVAL=$?
2980 echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
2981 diff -Nrup a/nscd/selinux.c b/nscd/selinux.c
2982 --- a/nscd/selinux.c 2012-01-01 05:16:32.000000000 -0700
2983 +++ b/nscd/selinux.c 2012-01-01 20:41:26.678439836 -0700
2984 @@ -270,6 +270,18 @@ avc_create_thread (void (*run) (void))
2988 +#if defined HAVE_LIBAUDIT && defined HAVE_LIBCAP
2989 + if (server_user != NULL && getuid () == 0)
2991 + /* We need to preserve the capabilities in the AVC thread. */
2992 + if (prctl (PR_SET_KEEPCAPS, 1) == -1)
2994 + dbg_log (_("Failed to set keep-capabilities"));
2995 + error (EXIT_FAILURE, errno, _("prctl(KEEPCAPS) failed"));
3001 pthread_create (&avc_notify_thread, NULL, (void *(*) (void *)) run, NULL);
3003 diff -Nrup a/nss/Makefile b/nss/Makefile
3004 --- a/nss/Makefile 2012-01-01 05:16:32.000000000 -0700
3005 +++ b/nss/Makefile 2012-01-01 20:41:26.679439836 -0700
3006 @@ -88,6 +88,7 @@ endif
3010 +CFLAGS-files-hosts.c += -fno-strict-aliasing
3012 ifeq (yes,$(build-static-nss))
3013 $(objpfx)getent: $(objpfx)libnss_files.a
3014 diff -Nrup a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
3015 --- a/nss/nss_files/files-XXX.c 2012-01-01 05:16:32.000000000 -0700
3016 +++ b/nss/nss_files/files-XXX.c 2012-01-01 20:41:26.679439836 -0700
3017 @@ -190,7 +190,7 @@ internal_getent (struct STRUCTURE *resul
3020 struct parser_data *data = (void *) buffer;
3021 - int linebuflen = buffer + buflen - data->linebuffer;
3022 + size_t linebuflen = buffer + buflen - data->linebuffer;
3025 if (buflen < sizeof *data + 2)
3026 diff -Nrup a/posix/Makefile b/posix/Makefile
3027 --- a/posix/Makefile 2012-01-01 05:16:32.000000000 -0700
3028 +++ b/posix/Makefile 2012-01-01 20:41:26.680439836 -0700
3029 @@ -320,15 +320,8 @@ $(inst_libexecdir)/getconf: $(inst_bindi
3030 mv -f $@/$$spec.new $@/$$spec; \
3031 done < $(objpfx)getconf.speclist
3033 -$(objpfx)getconf.speclist: $(objpfx)getconf
3034 -ifeq (no,$(cross-compiling))
3035 - LC_ALL=C GETCONF_DIR=/dev/null \
3036 - $(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
3037 - LC_ALL=C GETCONF_DIR=/dev/null \
3038 - $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new
3039 - LC_ALL=C GETCONF_DIR=/dev/null \
3040 - $(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new
3044 +$(objpfx)getconf.speclist: getconf.speclist.h
3045 + $(CC) -E $(CFLAGS) $(CPPFLAGS) $< \
3046 + | sed -n -e '/START_OF_STRINGS/,$${/\(POSIX_V[67]\|XBS5\)_/{s/^[^"]*"//;s/".*$$//;p}}' \
3049 diff -Nrup a/posix/gai.conf b/posix/gai.conf
3050 --- a/posix/gai.conf 2012-01-01 05:16:32.000000000 -0700
3051 +++ b/posix/gai.conf 2012-01-01 20:41:26.680439836 -0700
3054 # precedence <mask> <value>
3055 # Add another rule to the RFC 3484 precedence table. See section 2.1
3056 -# and 10.3 in RFC 3484. The default is:
3057 +# and 10.3 in RFC 3484. The RFC requires:
3059 #precedence ::1/128 50
3062 # Add another rule to the RFC 3484 scope table for IPv4 addresses.
3063 # By default the scope IDs described in section 3.2 in RFC 3484 are
3064 # used. Changing these defaults should hardly ever be necessary.
3065 -# The defaults are equivalent to:
3066 +# The definitions in RFC 1918 are equivalent to:
3068 #scopev4 ::ffff:169.254.0.0/112 2
3069 #scopev4 ::ffff:127.0.0.0/104 2
3071 #scopev4 ::ffff:169.254.0.0/112 2
3072 #scopev4 ::ffff:127.0.0.0/104 2
3073 #scopev4 ::ffff:0.0.0.0/96 14
3075 +# This is what the Red Hat setting currently uses.
3076 diff -Nrup a/posix/getconf.speclist.h b/posix/getconf.speclist.h
3077 --- a/posix/getconf.speclist.h 1969-12-31 17:00:00.000000000 -0700
3078 +++ b/posix/getconf.speclist.h 2012-01-01 20:41:26.680439836 -0700
3080 +#include <unistd.h>
3081 +const char *START_OF_STRINGS =
3082 +#if _POSIX_V7_ILP32_OFF32 == 1
3083 +"POSIX_V7_ILP32_OFF32"
3085 +#if _POSIX_V7_ILP32_OFFBIG == 1
3086 +"POSIX_V7_ILP32_OFFBIG"
3088 +#if _POSIX_V7_LP64_OFF64 == 1
3089 +"POSIX_V7_LP64_OFF64"
3091 +#if _POSIX_V7_LPBIG_OFFBIG == 1
3092 +"POSIX_V7_LPBIG_OFFBIG"
3094 +#if _POSIX_V6_ILP32_OFF32 == 1
3095 +"POSIX_V6_ILP32_OFF32"
3097 +#if _POSIX_V6_ILP32_OFFBIG == 1
3098 +"POSIX_V6_ILP32_OFFBIG"
3100 +#if _POSIX_V6_LP64_OFF64 == 1
3101 +"POSIX_V6_LP64_OFF64"
3103 +#if _POSIX_V6_LPBIG_OFFBIG == 1
3104 +"POSIX_V6_LPBIG_OFFBIG"
3106 +#if _XBS5_ILP32_OFF32 == 1
3109 +#if _XBS5_ILP32_OFFBIG == 1
3110 +"XBS5_ILP32_OFFBIG"
3112 +#if _XBS5_LP64_OFF64 == 1
3115 +#if _XBS5_LPBIG_OFFBIG == 1
3116 +"XBS5_LPBIG_OFFBIG"
3119 diff -Nrup a/posix/regcomp.c b/posix/regcomp.c
3120 --- a/posix/regcomp.c 2012-01-01 05:16:32.000000000 -0700
3121 +++ b/posix/regcomp.c 2012-01-01 20:41:26.681439836 -0700
3122 @@ -2745,40 +2745,29 @@ parse_bracket_exp (re_string_t *regexp,
3124 /* Local function for parse_bracket_exp used in _LIBC environement.
3125 Seek the collating symbol entry correspondings to NAME.
3126 - Return the index of the symbol in the SYMB_TABLE. */
3127 + Return the index of the symbol in the SYMB_TABLE,
3128 + or -1 if not found. */
3131 __attribute ((always_inline))
3132 - seek_collating_symbol_entry (name, name_len)
3133 - const unsigned char *name;
3135 + seek_collating_symbol_entry (const unsigned char *name, size_t name_len)
3137 - int32_t hash = elem_hash ((const char *) name, name_len);
3138 - int32_t elem = hash % table_size;
3139 - if (symb_table[2 * elem] != 0)
3141 - int32_t second = hash % (table_size - 2) + 1;
3146 - /* First compare the hashing value. */
3147 - if (symb_table[2 * elem] == hash
3148 - /* Compare the length of the name. */
3149 - && name_len == extra[symb_table[2 * elem + 1]]
3150 - /* Compare the name. */
3151 - && memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
3154 - /* Yep, this is the entry. */
3161 - while (symb_table[2 * elem] != 0);
3164 + for (elem = 0; elem < table_size; elem++)
3165 + if (symb_table[2 * elem] != 0)
3167 + int32_t idx = symb_table[2 * elem + 1];
3168 + /* Skip the name of collating element name. */
3169 + idx += 1 + extra[idx];
3170 + if (/* Compare the length of the name. */
3171 + name_len == extra[idx]
3172 + /* Compare the name. */
3173 + && memcmp (name, &extra[idx + 1], name_len) == 0)
3174 + /* Yep, this is the entry. */
3180 /* Local function for parse_bracket_exp used in _LIBC environment.
3181 @@ -2787,8 +2776,7 @@ parse_bracket_exp (re_string_t *regexp,
3183 auto inline unsigned int
3184 __attribute ((always_inline))
3185 - lookup_collation_sequence_value (br_elem)
3186 - bracket_elem_t *br_elem;
3187 + lookup_collation_sequence_value (bracket_elem_t *br_elem)
3189 if (br_elem->type == SB_CHAR)
3191 @@ -2816,7 +2804,7 @@ parse_bracket_exp (re_string_t *regexp,
3193 elem = seek_collating_symbol_entry (br_elem->opr.name,
3195 - if (symb_table[2 * elem] != 0)
3198 /* We found the entry. */
3199 idx = symb_table[2 * elem + 1];
3200 @@ -2834,7 +2822,7 @@ parse_bracket_exp (re_string_t *regexp,
3201 /* Return the collation sequence value. */
3202 return *(unsigned int *) (extra + idx);
3204 - else if (symb_table[2 * elem] == 0 && sym_name_len == 1)
3205 + else if (sym_name_len == 1)
3207 /* No valid character. Match it as a single byte
3209 @@ -2856,11 +2844,8 @@ parse_bracket_exp (re_string_t *regexp,
3211 auto inline reg_errcode_t
3212 __attribute ((always_inline))
3213 - build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
3214 - re_charset_t *mbcset;
3217 - bracket_elem_t *start_elem, *end_elem;
3218 + build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
3219 + bracket_elem_t *start_elem, bracket_elem_t *end_elem)
3222 uint32_t start_collseq;
3223 @@ -2939,25 +2924,22 @@ parse_bracket_exp (re_string_t *regexp,
3225 auto inline reg_errcode_t
3226 __attribute ((always_inline))
3227 - build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
3228 - re_charset_t *mbcset;
3229 - int *coll_sym_alloc;
3231 - const unsigned char *name;
3232 + build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
3233 + int *coll_sym_alloc, const unsigned char *name)
3236 size_t name_len = strlen ((const char *) name);
3239 elem = seek_collating_symbol_entry (name, name_len);
3240 - if (symb_table[2 * elem] != 0)
3243 /* We found the entry. */
3244 idx = symb_table[2 * elem + 1];
3245 /* Skip the name of collating element name. */
3246 idx += 1 + extra[idx];
3248 - else if (symb_table[2 * elem] == 0 && name_len == 1)
3249 + else if (name_len == 1)
3251 /* No valid character, treat it as a normal
3253 diff -Nrup a/resolv/Makefile b/resolv/Makefile
3254 --- a/resolv/Makefile 2012-01-01 05:16:32.000000000 -0700
3255 +++ b/resolv/Makefile 2012-01-01 20:41:26.682439836 -0700
3256 @@ -81,6 +81,7 @@ ifeq (yes,$(have-ssp))
3257 CFLAGS-libresolv += -fstack-protector
3259 CFLAGS-res_hconf.c = -fexceptions
3260 +CFLAGS-res_send.c += -fno-strict-aliasing
3262 # The BIND code elicits some harmless warnings.
3263 +cflags += -Wno-strict-prototypes -Wno-write-strings
3264 diff -Nrup a/resource/getrlimit.c b/resource/getrlimit.c
3265 --- a/resource/getrlimit.c 2012-01-01 05:16:32.000000000 -0700
3266 +++ b/resource/getrlimit.c 2012-01-01 20:41:26.682439836 -0700
3267 @@ -28,6 +28,7 @@ __getrlimit (enum __rlimit_resource reso
3268 __set_errno (ENOSYS);
3271 +libc_hidden_def (__getrlimit)
3272 weak_alias (__getrlimit, getrlimit)
3274 stub_warning (getrlimit)
3275 diff -Nrup a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh
3276 --- a/scripts/check-local-headers.sh 2012-01-01 05:16:32.000000000 -0700
3277 +++ b/scripts/check-local-headers.sh 2012-01-01 20:41:26.683439836 -0700
3278 @@ -29,7 +29,7 @@ exec ${AWK} -v includedir="$includedir"
3281 exclude = "^" includedir \
3282 - "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h)"
3283 + "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
3285 /^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
3287 diff -Nrup a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
3288 --- a/stdio-common/vfprintf.c 2012-01-01 05:16:32.000000000 -0700
3289 +++ b/stdio-common/vfprintf.c 2012-01-01 20:41:26.683439836 -0700
3290 @@ -1161,41 +1161,9 @@ vfprintf (FILE *s, const CHAR_T *format,
3291 else if (!is_long && spec != L_('S')) \
3295 - /* Search for the end of the string, but don't search past \
3296 - the length (in bytes) specified by the precision. Also \
3297 - don't use incomplete characters. */ \
3298 - if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX) == 1) \
3299 - len = __strnlen (string, prec); \
3302 - /* In case we have a multibyte character set the \
3303 - situation is more complicated. We must not copy \
3304 - bytes at the end which form an incomplete character. */\
3305 - size_t ignore_size = (unsigned) prec > 1024 ? 1024 : prec;\
3306 - wchar_t ignore[ignore_size]; \
3307 - const char *str2 = string; \
3308 - const char *strend = string + prec; \
3309 - if (strend < string) \
3310 - strend = (const char *) UINTPTR_MAX; \
3313 - memset (&ps, '\0', sizeof (ps)); \
3315 - while (str2 != NULL && str2 < strend) \
3316 - if (__mbsnrtowcs (ignore, &str2, strend - str2, \
3317 - ignore_size, &ps) == (size_t) -1) \
3323 - if (str2 == NULL) \
3324 - len = strlen (string); \
3326 - len = str2 - string - (ps.__count & 7); \
3329 + /* Search for the end of the string, but don't search past \
3330 + the length (in bytes) specified by the precision. */ \
3331 + len = __strnlen (string, prec); \
3333 len = strlen (string); \
3335 diff -Nrup a/streams/Makefile b/streams/Makefile
3336 --- a/streams/Makefile 2012-01-01 05:16:32.000000000 -0700
3337 +++ b/streams/Makefile 2012-01-01 20:41:26.684439835 -0700
3342 -headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
3343 +#headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
3344 routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach
3347 diff -Nrup a/sunrpc/Makefile b/sunrpc/Makefile
3348 --- a/sunrpc/Makefile 2012-01-01 05:16:32.000000000 -0700
3349 +++ b/sunrpc/Makefile 2012-01-01 20:41:26.684439835 -0700
3350 @@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth
3352 headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
3353 $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
3354 -headers = rpc/netdb.h
3355 +headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
3356 install-others = $(inst_sysconfdir)/rpc
3357 generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
3358 $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
3359 @@ -152,6 +152,10 @@ CFLAGS-openchild.c = -fexceptions
3361 CPPFLAGS += -D_RPC_THREAD_SAFE_
3363 +CFLAGS-clnt_tcp.c += -fno-strict-aliasing
3364 +CFLAGS-clnt_udp.c += -fno-strict-aliasing
3365 +CFLAGS-clnt_unix.c += -fno-strict-aliasing
3367 $(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
3368 $(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
3369 $(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
3370 diff -Nrup a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
3371 --- a/sysdeps/generic/dl-cache.h 2012-01-01 05:16:32.000000000 -0700
3372 +++ b/sysdeps/generic/dl-cache.h 2012-01-01 20:41:26.685439835 -0700
3374 # define add_system_dir(dir) add_dir (dir)
3377 +#ifndef arch_startup
3378 +# define arch_startup(argc, argv) do { } while (0)
3381 +#ifndef add_arch_dirs
3382 +# define add_arch_dirs(config_file) do { } while (0)
3385 #define CACHEMAGIC "ld.so-1.7.0"
3387 /* libc5 and glibc 2.0/2.1 use the same format. For glibc 2.2 another
3388 diff -Nrup a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
3389 --- a/sysdeps/i386/Makefile 2012-01-01 05:16:32.000000000 -0700
3390 +++ b/sysdeps/i386/Makefile 2012-01-01 20:41:26.685439835 -0700
3392 # Every i386 port in use uses gas syntax (I think).
3393 asm-CPPFLAGS += -DGAS_SYNTAX
3395 +sysdep-ASFLAGS += -U__i686
3397 # The i386 `long double' is a distinct type we support.
3398 long-double-fcts = yes
3400 @@ -68,6 +70,14 @@ endif
3402 ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
3403 defines += -DNO_TLS_DIRECT_SEG_REFS
3405 +# .a libraries are not performance critical and so we
3406 +# build them without direct TLS segment references
3408 +CPPFLAGS-.o += -DNO_TLS_DIRECT_SEG_REFS
3409 +CFLAGS-.o += -mno-tls-direct-seg-refs
3410 +CPPFLAGS-.oS += -DNO_TLS_DIRECT_SEG_REFS
3411 +CFLAGS-.oS += -mno-tls-direct-seg-refs
3414 ifeq ($(subdir),elf)
3415 diff -Nrup a/sysdeps/i386/__longjmp.S b/sysdeps/i386/__longjmp.S
3416 --- a/sysdeps/i386/__longjmp.S 2012-01-01 05:16:32.000000000 -0700
3417 +++ b/sysdeps/i386/__longjmp.S 2012-01-01 20:41:26.686439835 -0700
3419 /* longjmp for i386.
3420 - Copyright (C) 1995-1998,2000,2002,2005,2006,2009
3421 + Copyright (C) 1995-1998,2000,2002,2005,2006,2009,2011
3422 Free Software Foundation, Inc.
3423 This file is part of the GNU C Library.
3427 #include <jmpbuf-offsets.h>
3428 #include <asm-syntax.h>
3429 +#include <stap-probe.h>
3433 @@ -33,6 +34,7 @@ ENTRY (__longjmp)
3434 movl (JB_SP*4)(%eax), %ecx
3437 + LIBC_PROBE (longjmp, 3, 4@%eax, -4@8(%esp), 4@%edx)
3438 cfi_def_cfa(%eax, 0)
3439 cfi_register(%eip, %edx)
3440 cfi_register(%esp, %ecx)
3441 @@ -50,6 +52,7 @@ ENTRY (__longjmp)
3445 + LIBC_PROBE (longjmp_target, 3, 4@%eax, -4@8(%esp), 4@%edx)
3446 movl 8(%esp), %eax /* Second argument is return value. */
3449 @@ -57,12 +60,14 @@ ENTRY (__longjmp)
3450 movl 8(%esp), %eax /* Second argument is return value. */
3451 /* Save the return address now. */
3452 movl (JB_PC*4)(%ecx), %edx
3453 + LIBC_PROBE (longjmp, 3, 4@%ecx, -4@%eax, 4@%edx)
3454 /* Restore registers. */
3455 movl (JB_BX*4)(%ecx), %ebx
3456 movl (JB_SI*4)(%ecx), %esi
3457 movl (JB_DI*4)(%ecx), %edi
3458 movl (JB_BP*4)(%ecx), %ebp
3459 movl (JB_SP*4)(%ecx), %esp
3460 + LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%ecx, 4@%edx)
3462 /* Jump to saved PC. */
3464 diff -Nrup a/sysdeps/i386/bsd-_setjmp.S b/sysdeps/i386/bsd-_setjmp.S
3465 --- a/sysdeps/i386/bsd-_setjmp.S 2012-01-01 05:16:32.000000000 -0700
3466 +++ b/sysdeps/i386/bsd-_setjmp.S 2012-01-01 20:41:26.686439835 -0700
3468 /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. i386 version.
3469 - Copyright (C) 1994-1997,2000-2002,2005, 2006 Free Software Foundation, Inc.
3470 + Copyright (C) 1994-1997,2000-2002,2005,2006,2011
3471 + Free Software Foundation, Inc.
3472 This file is part of the GNU C Library.
3474 The GNU C Library is free software; you can redistribute it and/or
3476 #include <jmpbuf-offsets.h>
3479 +#include <stap-probe.h>
3481 #define PARMS LINKAGE /* no space for saved regs */
3482 #define JMPBUF PARMS
3483 @@ -47,6 +49,7 @@ ENTRY (BP_SYM (_setjmp))
3485 movl %ecx, (JB_SP*4)(%edx)
3486 movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
3487 + LIBC_PROBE (setjmp, 3, 4@%edx, -4@$0, 4@%ecx)
3491 diff -Nrup a/sysdeps/i386/bsd-setjmp.S b/sysdeps/i386/bsd-setjmp.S
3492 --- a/sysdeps/i386/bsd-setjmp.S 2012-01-01 05:16:32.000000000 -0700
3493 +++ b/sysdeps/i386/bsd-setjmp.S 2012-01-01 20:41:26.687439834 -0700
3495 /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. i386 version.
3496 - Copyright (C) 1994-1997,2000,2001,2005, 2006 Free Software Foundation, Inc.
3497 + Copyright (C) 1994-1997,2000,2001,2005,2006,2011
3498 + Free Software Foundation, Inc.
3499 This file is part of the GNU C Library.
3501 The GNU C Library is free software; you can redistribute it and/or
3503 #include <jmpbuf-offsets.h>
3506 +#include <stap-probe.h>
3508 #define PARMS LINKAGE /* no space for saved regs */
3509 #define JMPBUF PARMS
3510 @@ -49,6 +51,7 @@ ENTRY (BP_SYM (setjmp))
3512 movl %ecx, (JB_SP*4)(%eax)
3513 movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
3514 + LIBC_PROBE (setjmp, 3, 4@%eax, -4@$1, 4@%ecx)
3518 diff -Nrup a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile
3519 --- a/sysdeps/i386/i686/Makefile 2012-01-01 05:16:32.000000000 -0700
3520 +++ b/sysdeps/i386/i686/Makefile 2012-01-01 20:41:26.687439834 -0700
3521 @@ -9,19 +9,3 @@ stack-align-test-flags += -msse
3522 ifeq ($(subdir),string)
3523 sysdep_routines += cacheinfo
3526 -ifeq (yes,$(config-asflags-i686))
3527 -CFLAGS-.o += -Wa,-mtune=i686
3528 -CFLAGS-.os += -Wa,-mtune=i686
3529 -CFLAGS-.op += -Wa,-mtune=i686
3530 -CFLAGS-.og += -Wa,-mtune=i686
3531 -CFLAGS-.ob += -Wa,-mtune=i686
3532 -CFLAGS-.oS += -Wa,-mtune=i686
3534 -ASFLAGS-.o += -Wa,-mtune=i686
3535 -ASFLAGS-.os += -Wa,-mtune=i686
3536 -ASFLAGS-.op += -Wa,-mtune=i686
3537 -ASFLAGS-.og += -Wa,-mtune=i686
3538 -ASFLAGS-.ob += -Wa,-mtune=i686
3539 -ASFLAGS-.oS += -Wa,-mtune=i686
3541 diff -Nrup a/sysdeps/i386/setjmp.S b/sysdeps/i386/setjmp.S
3542 --- a/sysdeps/i386/setjmp.S 2012-01-01 05:16:32.000000000 -0700
3543 +++ b/sysdeps/i386/setjmp.S 2012-01-01 20:41:26.687439834 -0700
3546 - Copyright (C) 1995,1996,1997,2000,2001,2005,2006
3547 + Copyright (C) 1995,1996,1997,2000,2001,2005,2006,2011
3548 Free Software Foundation, Inc.
3549 This file is part of the GNU C Library.
3552 #include <asm-syntax.h>
3555 +#include <stap-probe.h>
3557 #define PARMS LINKAGE /* no space for saved regs */
3558 #define JMPBUF PARMS
3559 @@ -44,6 +45,7 @@ ENTRY (BP_SYM (__sigsetjmp))
3561 movl %ecx, (JB_SP*4)(%eax)
3562 movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
3563 + LIBC_PROBE (setjmp, 3, 4@%eax, -4@SIGMSK(%esp), 4@%ecx)
3567 diff -Nrup a/sysdeps/ia64/Makefile b/sysdeps/ia64/Makefile
3568 --- a/sysdeps/ia64/Makefile 2012-01-01 05:16:32.000000000 -0700
3569 +++ b/sysdeps/ia64/Makefile 2012-01-01 20:41:26.688439833 -0700
3570 @@ -12,8 +12,8 @@ elide-routines.os += hp-timing
3572 ifeq (yes,$(build-shared))
3574 -sysdep_routines += ia64libgcc
3575 -shared-only-routines += ia64libgcc
3576 +sysdep_routines += libgcc-compat
3577 +shared-only-routines += libgcc-compat
3581 diff -Nrup a/sysdeps/ia64/ia64libgcc.S b/sysdeps/ia64/ia64libgcc.S
3582 --- a/sysdeps/ia64/ia64libgcc.S 2012-01-01 05:16:32.000000000 -0700
3583 +++ b/sysdeps/ia64/ia64libgcc.S 1969-12-31 17:00:00.000000000 -0700
3585 -/* From the Intel IA-64 Optimization Guide, choose the minimum latency
3588 -#include <sysdep.h>
3591 -#include <shlib-compat.h>
3593 -#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
3596 - Compute a 80-bit IEEE double-extended quotient.
3597 - farg0 holds the dividend. farg1 holds the divisor. */
3600 - cmp.eq p7, p0 = r0, r0
3601 - frcpa.s0 f10, p6 = farg0, farg1
3603 -(p6) cmp.ne p7, p0 = r0, r0
3604 - .pred.rel.mutex p6, p7
3605 -(p6) fnma.s1 f11 = farg1, f10, f1
3606 -(p6) fma.s1 f12 = farg0, f10, f0
3608 -(p6) fma.s1 f13 = f11, f11, f0
3609 -(p6) fma.s1 f14 = f11, f11, f11
3611 -(p6) fma.s1 f11 = f13, f13, f11
3612 -(p6) fma.s1 f13 = f14, f10, f10
3614 -(p6) fma.s1 f10 = f13, f11, f10
3615 -(p6) fnma.s1 f11 = farg1, f12, farg0
3617 -(p6) fma.s1 f11 = f11, f10, f12
3618 -(p6) fnma.s1 f12 = farg1, f10, f1
3620 -(p6) fma.s1 f10 = f12, f10, f10
3621 -(p6) fnma.s1 f12 = farg1, f11, farg0
3623 -(p6) fma.s0 fret0 = f12, f10, f11
3624 -(p7) mov fret0 = f10
3627 - .symver ___divtf3, __divtf3@GLIBC_2.2
3630 - Compute a 64-bit IEEE double quotient.
3631 - farg0 holds the dividend. farg1 holds the divisor. */
3634 - cmp.eq p7, p0 = r0, r0
3635 - frcpa.s0 f10, p6 = farg0, farg1
3637 -(p6) cmp.ne p7, p0 = r0, r0
3638 - .pred.rel.mutex p6, p7
3639 -(p6) fmpy.s1 f11 = farg0, f10
3640 -(p6) fnma.s1 f12 = farg1, f10, f1
3642 -(p6) fma.s1 f11 = f12, f11, f11
3643 -(p6) fmpy.s1 f13 = f12, f12
3645 -(p6) fma.s1 f10 = f12, f10, f10
3646 -(p6) fma.s1 f11 = f13, f11, f11
3648 -(p6) fmpy.s1 f12 = f13, f13
3649 -(p6) fma.s1 f10 = f13, f10, f10
3651 -(p6) fma.d.s1 f11 = f12, f11, f11
3652 -(p6) fma.s1 f10 = f12, f10, f10
3654 -(p6) fnma.d.s1 f8 = farg1, f11, farg0
3656 -(p6) fma.d fret0 = f8, f10, f11
3657 -(p7) mov fret0 = f10
3661 - .symver ___divdf3, __divdf3@GLIBC_2.2
3664 - Compute a 32-bit IEEE float quotient.
3665 - farg0 holds the dividend. farg1 holds the divisor. */
3668 - cmp.eq p7, p0 = r0, r0
3669 - frcpa.s0 f10, p6 = farg0, farg1
3671 -(p6) cmp.ne p7, p0 = r0, r0
3672 - .pred.rel.mutex p6, p7
3673 -(p6) fmpy.s1 f8 = farg0, f10
3674 -(p6) fnma.s1 f9 = farg1, f10, f1
3676 -(p6) fma.s1 f8 = f9, f8, f8
3677 -(p6) fmpy.s1 f9 = f9, f9
3679 -(p6) fma.s1 f8 = f9, f8, f8
3680 -(p6) fmpy.s1 f9 = f9, f9
3682 -(p6) fma.d.s1 f10 = f9, f8, f8
3684 -(p6) fnorm.s.s0 fret0 = f10
3685 -(p7) mov fret0 = f10
3689 - .symver ___divsf3, __divsf3@GLIBC_2.2
3692 - Compute a 64-bit integer quotient.
3693 - in0 holds the dividend. in1 holds the divisor. */
3697 - /* Transfer inputs to FP registers. */
3701 - /* Convert the inputs to FP, so that they won't be treated as
3706 - /* Compute the reciprocal approximation. */
3707 - frcpa.s1 f10, p6 = f8, f9
3709 - /* 3 Newton-Raphson iterations. */
3710 -(p6) fnma.s1 f11 = f9, f10, f1
3711 -(p6) fmpy.s1 f12 = f8, f10
3713 -(p6) fmpy.s1 f13 = f11, f11
3714 -(p6) fma.s1 f12 = f11, f12, f12
3716 -(p6) fma.s1 f10 = f11, f10, f10
3717 -(p6) fma.s1 f11 = f13, f12, f12
3719 -(p6) fma.s1 f10 = f13, f10, f10
3720 -(p6) fnma.s1 f12 = f9, f11, f8
3722 -(p6) fma.s1 f10 = f12, f10, f11
3724 - /* Round quotient to an integer. */
3725 - fcvt.fx.trunc.s1 f10 = f10
3727 - /* Transfer result to GP registers. */
3728 - getf.sig ret0 = f10
3732 - .symver ___divdi3, __divdi3@GLIBC_2.2
3735 - Compute a 64-bit integer modulus.
3736 - in0 holds the dividend (a). in1 holds the divisor (b). */
3740 - /* Transfer inputs to FP registers. */
3741 - setf.sig f14 = in0
3744 - /* Convert the inputs to FP, so that they won't be treated as
3749 - /* Compute the reciprocal approximation. */
3750 - frcpa.s1 f10, p6 = f8, f9
3752 - /* 3 Newton-Raphson iterations. */
3753 -(p6) fmpy.s1 f12 = f8, f10
3754 -(p6) fnma.s1 f11 = f9, f10, f1
3756 -(p6) fma.s1 f12 = f11, f12, f12
3757 -(p6) fmpy.s1 f13 = f11, f11
3759 -(p6) fma.s1 f10 = f11, f10, f10
3760 -(p6) fma.s1 f11 = f13, f12, f12
3763 -(p6) fma.s1 f10 = f13, f10, f10
3764 -(p6) fnma.s1 f12 = f9, f11, f8
3767 -(p6) fma.s1 f10 = f12, f10, f11
3769 - fcvt.fx.trunc.s1 f10 = f10
3771 - /* r = q * (-b) + a */
3772 - xma.l f10 = f10, f9, f14
3774 - /* Transfer result to GP registers. */
3775 - getf.sig ret0 = f10
3779 - .symver ___moddi3, __moddi3@GLIBC_2.2
3782 - Compute a 64-bit unsigned integer quotient.
3783 - in0 holds the dividend. in1 holds the divisor. */
3787 - /* Transfer inputs to FP registers. */
3791 - /* Convert the inputs to FP, to avoid FP software-assist faults. */
3792 - fcvt.xuf.s1 f8 = f8
3793 - fcvt.xuf.s1 f9 = f9
3795 - /* Compute the reciprocal approximation. */
3796 - frcpa.s1 f10, p6 = f8, f9
3798 - /* 3 Newton-Raphson iterations. */
3799 -(p6) fnma.s1 f11 = f9, f10, f1
3800 -(p6) fmpy.s1 f12 = f8, f10
3802 -(p6) fmpy.s1 f13 = f11, f11
3803 -(p6) fma.s1 f12 = f11, f12, f12
3805 -(p6) fma.s1 f10 = f11, f10, f10
3806 -(p6) fma.s1 f11 = f13, f12, f12
3808 -(p6) fma.s1 f10 = f13, f10, f10
3809 -(p6) fnma.s1 f12 = f9, f11, f8
3811 -(p6) fma.s1 f10 = f12, f10, f11
3813 - /* Round quotient to an unsigned integer. */
3814 - fcvt.fxu.trunc.s1 f10 = f10
3816 - /* Transfer result to GP registers. */
3817 - getf.sig ret0 = f10
3821 - .symver ___udivdi3, __udivdi3@GLIBC_2.2
3824 - Compute a 64-bit unsigned integer modulus.
3825 - in0 holds the dividend (a). in1 holds the divisor (b). */
3829 - /* Transfer inputs to FP registers. */
3830 - setf.sig f14 = in0
3833 - /* Convert the inputs to FP, to avoid FP software assist faults. */
3834 - fcvt.xuf.s1 f8 = f14
3835 - fcvt.xuf.s1 f9 = f9
3837 - /* Compute the reciprocal approximation. */
3838 - frcpa.s1 f10, p6 = f8, f9
3840 - /* 3 Newton-Raphson iterations. */
3841 -(p6) fmpy.s1 f12 = f8, f10
3842 -(p6) fnma.s1 f11 = f9, f10, f1
3844 -(p6) fma.s1 f12 = f11, f12, f12
3845 -(p6) fmpy.s1 f13 = f11, f11
3847 -(p6) fma.s1 f10 = f11, f10, f10
3848 -(p6) fma.s1 f11 = f13, f12, f12
3851 -(p6) fma.s1 f10 = f13, f10, f10
3852 -(p6) fnma.s1 f12 = f9, f11, f8
3855 -(p6) fma.s1 f10 = f12, f10, f11
3857 - /* Round quotient to an unsigned integer. */
3858 - fcvt.fxu.trunc.s1 f10 = f10
3860 - /* r = q * (-b) + a */
3861 - xma.l f10 = f10, f9, f14
3863 - /* Transfer result to GP registers. */
3864 - getf.sig ret0 = f10
3868 - .symver ___umoddi3, __umoddi3@GLIBC_2.2
3871 - Compute a 128-bit multiply of 128-bit multiplicands.
3872 - in0/in1 holds one multiplicand (a), in2/in3 holds the other one (b). */
3877 - movl r19 = 0xffffffff
3880 - and r14 = r19, in0
3882 - setf.sig f10 = r14
3883 - and r14 = r19, in2
3884 - xmpy.l f9 = f6, f7
3887 - shr.u r14 = in0, 32
3890 - shr.u r14 = in2, 32
3893 - xmpy.l f11 = f10, f6
3894 - xmpy.l f6 = f7, f6
3896 - getf.sig r16 = f11
3897 - xmpy.l f7 = f7, f8
3899 - shr.u r14 = r16, 32
3900 - and r16 = r19, r16
3904 - setf.sig f11 = r14
3908 - xma.l f11 = f10, f8, f11
3909 - xma.l f6 = f6, f7, f9
3911 - getf.sig r18 = f11
3913 - add r18 = r18, r17
3915 - and r15 = r19, r18
3916 - cmp.ltu p7, p6 = r18, r17
3919 -(p7) adds r14 = 1, r19
3921 -(p7) add r21 = r21, r14
3922 - shr.u r14 = r18, 32
3925 - add r20 = r21, r14
3927 - add ret0 = r15, r16
3928 - add ret1 = r22, r20
3932 - .symver ___multi3, __multi3@GLIBC_2.2
3935 diff -Nrup a/sysdeps/ia64/libgcc-compat.c b/sysdeps/ia64/libgcc-compat.c
3936 --- a/sysdeps/ia64/libgcc-compat.c 1969-12-31 17:00:00.000000000 -0700
3937 +++ b/sysdeps/ia64/libgcc-compat.c 2012-01-01 20:41:26.694439833 -0700
3939 +/* pre-.hidden libgcc compatibility
3940 + Copyright (C) 2002 Free Software Foundation, Inc.
3941 + This file is part of the GNU C Library.
3943 + The GNU C Library is free software; you can redistribute it and/or
3944 + modify it under the terms of the GNU Lesser General Public
3945 + License as published by the Free Software Foundation; either
3946 + version 2.1 of the License, or (at your option) any later version.
3948 + The GNU C Library is distributed in the hope that it will be useful,
3949 + but WITHOUT ANY WARRANTY; without even the implied warranty of
3950 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3951 + Lesser General Public License for more details.
3953 + You should have received a copy of the GNU Lesser General Public
3954 + License along with the GNU C Library; if not, write to the Free
3955 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
3956 + 02111-1307 USA. */
3959 +#include <stdint.h>
3960 +#include <shlib-compat.h>
3962 +#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
3964 +typedef int int128_t __attribute__((__mode__(TI)));
3966 +extern long double __divtf3 (long double, long double) attribute_hidden;
3967 +long double INTUSE (__divtf3) (long double x, long double y)
3969 + return __divtf3 (x, y);
3971 +symbol_version (INTUSE (__divtf3), __divtf3, GLIBC_2.2);
3973 +extern double __divdf3 (double, double) attribute_hidden;
3974 +double INTUSE (__divdf3) (double x, double y)
3976 + return __divdf3 (x, y);
3978 +symbol_version (INTUSE (__divdf3), __divdf3, GLIBC_2.2);
3980 +extern float __divsf3 (float, float) attribute_hidden;
3981 +float INTUSE (__divsf3) (float x, float y)
3983 + return __divsf3 (x, y);
3985 +symbol_version (INTUSE (__divsf3), __divsf3, GLIBC_2.2);
3987 +extern int64_t __divdi3 (int64_t, int64_t) attribute_hidden;
3988 +int64_t INTUSE (__divdi3) (int64_t x, int64_t y)
3990 + return __divdi3 (x, y);
3992 +symbol_version (INTUSE (__divdi3), __divdi3, GLIBC_2.2);
3994 +extern int64_t __moddi3 (int64_t, int64_t) attribute_hidden;
3995 +int64_t INTUSE (__moddi3) (int64_t x, int64_t y)
3997 + return __moddi3 (x, y);
3999 +symbol_version (INTUSE (__moddi3), __moddi3, GLIBC_2.2);
4001 +extern uint64_t __udivdi3 (uint64_t, uint64_t) attribute_hidden;
4002 +uint64_t INTUSE (__udivdi3) (uint64_t x, uint64_t y)
4004 + return __udivdi3 (x, y);
4006 +symbol_version (INTUSE (__udivdi3), __udivdi3, GLIBC_2.2);
4008 +extern uint64_t __umoddi3 (uint64_t, uint64_t) attribute_hidden;
4009 +uint64_t INTUSE (__umoddi3) (uint64_t x, uint64_t y)
4011 + return __umoddi3 (x, y);
4013 +symbol_version (INTUSE (__umoddi3), __umoddi3, GLIBC_2.2);
4015 +extern int128_t __multi3 (int128_t, int128_t) attribute_hidden;
4016 +int128_t INTUSE (__multi3) (int128_t x, int128_t y)
4018 + return __multi3 (x, y);
4020 +symbol_version (INTUSE (__multi3), __multi3, GLIBC_2.2);
4023 diff -Nrup a/sysdeps/mach/hurd/getrlimit.c b/sysdeps/mach/hurd/getrlimit.c
4024 --- a/sysdeps/mach/hurd/getrlimit.c 2012-01-01 05:16:32.000000000 -0700
4025 +++ b/sysdeps/mach/hurd/getrlimit.c 2012-01-01 20:41:26.694439833 -0700
4026 @@ -44,4 +44,5 @@ __getrlimit (enum __rlimit_resource reso
4030 +libc_hidden_def (__getrlimit)
4031 weak_alias (__getrlimit, getrlimit)
4032 diff -Nrup a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
4033 --- a/sysdeps/posix/getaddrinfo.c 2012-01-01 05:16:32.000000000 -0700
4034 +++ b/sysdeps/posix/getaddrinfo.c 2012-01-01 20:41:26.695439833 -0700
4035 @@ -565,8 +565,8 @@ gaih_inet (const char *name, const struc
4037 /* If we do not have to look for IPv6 addresses, use
4038 the simple, old functions, which do not support
4039 - IPv6 scope ids. */
4040 - if (req->ai_family == AF_INET)
4041 + IPv6 scope ids, nor retrieving the canonical name. */
4042 + if (req->ai_family == AF_INET && (req->ai_flags & AI_CANONNAME) == 0)
4044 size_t tmpbuflen = 512;
4045 assert (tmpbuf == NULL);
4046 @@ -1105,68 +1105,10 @@ gaih_inet (const char *name, const struc
4047 /* Only the first entry gets the canonical name. */
4048 if (at2 == at && (req->ai_flags & AI_CANONNAME) != 0)
4050 - char *tmpbuf2 = NULL;
4051 - bool malloc_tmpbuf2 = false;
4055 - struct hostent *h = NULL;
4057 - struct hostent th;
4058 - size_t tmpbuf2len = 512;
4062 - if (__libc_use_alloca (alloca_used + 2 * tmpbuf2len))
4063 - tmpbuf2 = extend_alloca_account (tmpbuf2, tmpbuf2len,
4068 - char *newp = realloc (malloc_tmpbuf2 ? tmpbuf2 : NULL,
4072 - if (malloc_tmpbuf2)
4074 - result = -EAI_MEMORY;
4075 - goto free_and_return;
4079 - tmpbuf2len = 2 * tmpbuf2len;
4080 - malloc_tmpbuf2 = true;
4083 - rc = __gethostbyaddr_r (at2->addr,
4084 - ((at2->family == AF_INET6)
4085 - ? sizeof (struct in6_addr)
4086 - : sizeof (struct in_addr)),
4087 - at2->family, &th, tmpbuf2,
4088 - tmpbuf2len, &h, &herrno);
4090 - while (rc == ERANGE && herrno == NETDB_INTERNAL);
4092 - if (rc != 0 && herrno == NETDB_INTERNAL)
4094 - if (malloc_tmpbuf2)
4097 - __set_h_errno (herrno);
4098 - result = -EAI_SYSTEM;
4099 - goto free_and_return;
4103 - canon = h->h_name;
4106 - assert (orig_name != NULL);
4107 - /* If the canonical name cannot be determined, use
4108 - the passed in string. */
4109 - canon = orig_name;
4112 + /* If the canonical name cannot be determined, use
4113 + the passed in string. */
4114 + canon = orig_name;
4117 if (req->ai_flags & AI_CANONIDN)
4118 @@ -1181,9 +1123,6 @@ gaih_inet (const char *name, const struc
4119 int rc = __idna_to_unicode_lzlz (canon, &out, idn_flags);
4120 if (rc != IDNA_SUCCESS)
4122 - if (malloc_tmpbuf2)
4125 if (rc == IDNA_MALLOC_ERROR)
4126 result = -EAI_MEMORY;
4127 else if (rc == IDNA_DLOPEN_ERROR)
4128 @@ -1213,17 +1152,11 @@ gaih_inet (const char *name, const struc
4129 canon = strdup (canon);
4132 - if (malloc_tmpbuf2)
4135 result = -EAI_MEMORY;
4136 goto free_and_return;
4141 - if (malloc_tmpbuf2)
4145 family = at2->family;
4146 @@ -1360,10 +1293,12 @@ static const struct scopeentry
4147 /* Link-local addresses: scope 2. */
4148 { { { 169, 254, 0, 0 } }, htonl_c (0xffff0000), 2 },
4149 { { { 127, 0, 0, 0 } }, htonl_c (0xff000000), 2 },
4151 /* Site-local addresses: scope 5. */
4152 { { { 10, 0, 0, 0 } }, htonl_c (0xff000000), 5 },
4153 { { { 172, 16, 0, 0 } }, htonl_c (0xfff00000), 5 },
4154 { { { 192, 168, 0, 0 } }, htonl_c (0xffff0000), 5 },
4156 /* Default: scope 14. */
4157 { { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 }
4159 diff -Nrup a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
4160 --- a/sysdeps/powerpc/powerpc64/Makefile 2012-01-01 05:16:32.000000000 -0700
4161 +++ b/sysdeps/powerpc/powerpc64/Makefile 2012-01-01 20:41:26.695439833 -0700
4162 @@ -33,6 +33,7 @@ ifneq ($(elf),no)
4163 # we use -fpic instead which is much better.
4164 CFLAGS-initfini.s += -fpic -O1
4166 +CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
4169 ifeq ($(subdir),elf)
4170 diff -Nrup a/sysdeps/powerpc/powerpc64/elf/Makefile b/sysdeps/powerpc/powerpc64/elf/Makefile
4171 --- a/sysdeps/powerpc/powerpc64/elf/Makefile 2012-01-01 05:16:32.000000000 -0700
4172 +++ b/sysdeps/powerpc/powerpc64/elf/Makefile 2012-01-01 20:41:26.696439833 -0700
4173 @@ -9,3 +9,5 @@ CFLAGS-rtld-mempcpy.os = $(no-special-re
4174 CFLAGS-rtld-memmove.os = $(no-special-regs)
4175 CFLAGS-rtld-memchr.os = $(no-special-regs)
4176 CFLAGS-rtld-strnlen.os = $(no-special-regs)
4178 +CFLAGS-gmon-start.c = -fno-strict-aliasing
4179 diff -Nrup a/sysdeps/s390/s390-64/utf16-utf32-z9.c b/sysdeps/s390/s390-64/utf16-utf32-z9.c
4180 --- a/sysdeps/s390/s390-64/utf16-utf32-z9.c 2012-01-01 05:16:32.000000000 -0700
4181 +++ b/sysdeps/s390/s390-64/utf16-utf32-z9.c 2012-01-01 20:41:26.696439833 -0700
4182 @@ -169,10 +169,7 @@ gconv_end (struct __gconv_step *data)
4183 register unsigned long long outlen asm("11") = outend - outptr; \
4186 - asm volatile (".machine push \n\t" \
4187 - ".machine \"z9-109\" \n\t" \
4188 - "0: " INSTRUCTION " \n\t" \
4189 - ".machine pop \n\t" \
4190 + asm volatile ("0: " INSTRUCTION " \n\t" \
4193 : "+a" (pOutput), "+a" (pInput), "+d" (cc), \
4194 diff -Nrup a/sysdeps/s390/s390-64/utf8-utf16-z9.c b/sysdeps/s390/s390-64/utf8-utf16-z9.c
4195 --- a/sysdeps/s390/s390-64/utf8-utf16-z9.c 2012-01-01 05:16:32.000000000 -0700
4196 +++ b/sysdeps/s390/s390-64/utf8-utf16-z9.c 2012-01-01 20:41:26.697439833 -0700
4197 @@ -151,10 +151,7 @@ gconv_end (struct __gconv_step *data)
4198 register unsigned long long outlen asm("11") = outend - outptr; \
4201 - asm volatile (".machine push \n\t" \
4202 - ".machine \"z9-109\" \n\t" \
4203 - "0: " INSTRUCTION " \n\t" \
4204 - ".machine pop \n\t" \
4205 + asm volatile ("0: " INSTRUCTION " \n\t" \
4208 : "+a" (pOutput), "+a" (pInput), "+d" (cc), \
4209 diff -Nrup a/sysdeps/s390/s390-64/utf8-utf32-z9.c b/sysdeps/s390/s390-64/utf8-utf32-z9.c
4210 --- a/sysdeps/s390/s390-64/utf8-utf32-z9.c 2012-01-01 05:16:32.000000000 -0700
4211 +++ b/sysdeps/s390/s390-64/utf8-utf32-z9.c 2012-01-01 20:41:26.697439833 -0700
4212 @@ -155,10 +155,7 @@ gconv_end (struct __gconv_step *data)
4213 register unsigned long long outlen asm("11") = outend - outptr; \
4216 - asm volatile (".machine push \n\t" \
4217 - ".machine \"z9-109\" \n\t" \
4218 - "0: " INSTRUCTION " \n\t" \
4219 - ".machine pop \n\t" \
4220 + asm volatile ("0: " INSTRUCTION " \n\t" \
4223 : "+a" (pOutput), "+a" (pInput), "+d" (cc), \
4224 diff -Nrup a/sysdeps/unix/nice.c b/sysdeps/unix/nice.c
4225 --- a/sysdeps/unix/nice.c 2012-01-01 05:16:32.000000000 -0700
4226 +++ b/sysdeps/unix/nice.c 2012-01-01 20:41:26.698439833 -0700
4227 @@ -42,7 +42,12 @@ nice (int incr)
4231 - result = setpriority (PRIO_PROCESS, 0, prio + incr);
4233 + if (prio < PRIO_MIN)
4235 + else if (prio >= PRIO_MAX)
4236 + prio = PRIO_MAX - 1;
4237 + result = setpriority (PRIO_PROCESS, 0, prio);
4240 if (errno == EACCES)
4241 diff -Nrup a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
4242 --- a/sysdeps/unix/sysv/linux/check_pf.c 2012-01-01 05:16:32.000000000 -0700
4243 +++ b/sysdeps/unix/sysv/linux/check_pf.c 2012-01-01 20:41:26.698439833 -0700
4246 #include <sys/socket.h>
4248 -#include <asm/types.h>
4249 -#include <linux/netlink.h>
4250 -#include <linux/rtnetlink.h>
4252 #include <not-cancel.h>
4253 #include <kernel-features.h>
4254 #include <bits/libc-lock.h>
4256 #include <nscd/nscd-client.h>
4258 +#include "netlinkaccess.h"
4261 #ifndef IFA_F_HOMEADDRESS
4262 # define IFA_F_HOMEADDRESS 0
4263 diff -Nrup a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futimesat.c
4264 --- a/sysdeps/unix/sysv/linux/futimesat.c 2012-01-01 05:16:32.000000000 -0700
4265 +++ b/sysdeps/unix/sysv/linux/futimesat.c 2012-01-01 20:41:26.699439832 -0700
4266 @@ -37,14 +37,14 @@ futimesat (fd, file, tvp)
4271 + return __futimes (fd, tvp);
4273 #ifdef __NR_futimesat
4274 # ifndef __ASSUME_ATFCTS
4275 if (__have_atfcts >= 0)
4279 - return __futimes (fd, tvp);
4281 result = INLINE_SYSCALL (futimesat, 3, fd, file, tvp);
4282 # ifndef __ASSUME_ATFCTS
4283 if (result == -1 && errno == ENOSYS)
4284 @@ -58,22 +58,7 @@ futimesat (fd, file, tvp)
4285 #ifndef __ASSUME_ATFCTS
4290 - static const char procfd[] = "/proc/self/fd/%d";
4291 - /* Buffer for the path name we are going to use. It consists of
4292 - - the string /proc/self/fd/
4293 - - the file descriptor number.
4294 - The final NUL is included in the sizeof. A bit of overhead
4295 - due to the format elements compensates for possible negative
4297 - size_t buflen = sizeof (procfd) + sizeof (int) * 3;
4298 - buf = alloca (buflen);
4300 - __snprintf (buf, buflen, procfd, fd);
4303 - else if (fd != AT_FDCWD && file[0] != '/')
4304 + if (fd != AT_FDCWD && file[0] != '/')
4306 size_t filelen = strlen (file);
4307 if (__builtin_expect (filelen == 0, 0))
4308 diff -Nrup a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
4309 --- a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S 2012-01-01 05:16:32.000000000 -0700
4310 +++ b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S 2012-01-01 20:41:26.699439832 -0700
4312 -/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
4313 +/* Copyright (C) 2001,2004,2005,2006,2009,2011
4314 + Free Software Foundation, Inc.
4315 This file is part of the GNU C Library.
4317 The GNU C Library is free software; you can redistribute it and/or
4320 #include <jmpbuf-offsets.h>
4321 #include <asm-syntax.h>
4322 +#include <stap-probe.h>
4325 .section .rodata.str1.1,"aMS",@progbits,1
4326 @@ -79,7 +81,9 @@ ENTRY (____longjmp_chk)
4327 cfi_adjust_cfa_offset(-12)
4330 -.Lok: /* We add unwind information for the target here. */
4332 + LIBC_PROBE (longjmp, 3, 4@%ecx, -4@8(%esp), 4@%edx)
4333 + /* We add unwind information for the target here. */
4334 cfi_def_cfa(%ecx, 0)
4335 cfi_register(%eip, %edx)
4336 cfi_register(%esp, %edi)
4337 @@ -102,5 +106,6 @@ ENTRY (____longjmp_chk)
4340 /* Jump to saved PC. */
4341 + LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%eax, 4@%edx)
4343 END (____longjmp_chk)
4344 diff -Nrup a/sysdeps/unix/sysv/linux/i386/dl-cache.h b/sysdeps/unix/sysv/linux/i386/dl-cache.h
4345 --- a/sysdeps/unix/sysv/linux/i386/dl-cache.h 1969-12-31 17:00:00.000000000 -0700
4346 +++ b/sysdeps/unix/sysv/linux/i386/dl-cache.h 2012-01-01 20:41:26.700439831 -0700
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 diff -Nrup a/sysdeps/unix/sysv/linux/i386/getrlimit.c b/sysdeps/unix/sysv/linux/i386/getrlimit.c
4408 --- a/sysdeps/unix/sysv/linux/i386/getrlimit.c 2012-01-01 05:16:32.000000000 -0700
4409 +++ b/sysdeps/unix/sysv/linux/i386/getrlimit.c 2012-01-01 20:41:26.700439831 -0700
4410 @@ -79,4 +79,5 @@ __new_getrlimit (enum __rlimit_resource
4413 weak_alias (__new_getrlimit, __getrlimit);
4414 +libc_hidden_weak (__getrlimit)
4415 versioned_symbol (libc, __new_getrlimit, getrlimit, GLIBC_2_2);
4416 diff -Nrup a/sysdeps/unix/sysv/linux/ia64/dl-cache.h b/sysdeps/unix/sysv/linux/ia64/dl-cache.h
4417 --- a/sysdeps/unix/sysv/linux/ia64/dl-cache.h 2012-01-01 05:16:32.000000000 -0700
4418 +++ b/sysdeps/unix/sysv/linux/ia64/dl-cache.h 2012-01-01 20:41:26.701439831 -0700
4420 #define _dl_cache_check_flags(flags) \
4421 ((flags) == _DL_CACHE_DEFAULT_ID)
4423 +#define EMUL_HACK "/emul/ia32-linux"
4425 +#define arch_startup(argc, argv) unlink (EMUL_HACK LD_SO_CACHE)
4427 +#define add_arch_dirs(config_file) \
4429 + int save_verbose = opt_verbose; \
4430 + opt_verbose = 0; \
4432 + parse_conf (config_file, EMUL_HACK, true); \
4434 + /* Always add the standard search paths. */ \
4435 + add_system_dir (EMUL_HACK SLIBDIR); \
4436 + if (strcmp (SLIBDIR, LIBDIR)) \
4437 + add_system_dir (EMUL_HACK LIBDIR); \
4439 + char emul_config_file[strlen (config_file) \
4440 + + sizeof EMUL_HACK]; \
4441 + strcpy (mempcpy (emul_config_file, EMUL_HACK, \
4442 + strlen (EMUL_HACK)), config_file); \
4444 + if (! access (emul_config_file, R_OK)) \
4445 + parse_conf (emul_config_file, EMUL_HACK, true); \
4447 + opt_verbose = save_verbose; \
4450 #include_next <dl-cache.h>
4451 diff -Nrup a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c
4452 --- a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c 1969-12-31 17:00:00.000000000 -0700
4453 +++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c 2012-01-01 20:41:26.701439831 -0700
4455 +#ifdef IS_IN_ldconfig
4456 +#include <sysdeps/i386/dl-procinfo.c>
4458 +#include <sysdeps/generic/dl-procinfo.c>
4460 diff -Nrup a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h
4461 --- a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h 1969-12-31 17:00:00.000000000 -0700
4462 +++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h 2012-01-01 20:41:26.701439831 -0700
4464 +#ifdef IS_IN_ldconfig
4465 +#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
4467 +#include <sysdeps/generic/dl-procinfo.h>
4469 diff -Nrup a/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
4470 --- a/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed 2012-01-01 05:16:32.000000000 -0700
4471 +++ b/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed 2012-01-01 20:41:26.701439831 -0700
4473 -s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_
4474 +s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 /emul/ia32-linux\2\3"_
4475 diff -Nrup a/sysdeps/unix/sysv/linux/netlinkaccess.h b/sysdeps/unix/sysv/linux/netlinkaccess.h
4476 --- a/sysdeps/unix/sysv/linux/netlinkaccess.h 2012-01-01 05:16:32.000000000 -0700
4477 +++ b/sysdeps/unix/sysv/linux/netlinkaccess.h 2012-01-01 20:41:26.702439831 -0700
4480 #include <kernel-features.h>
4483 +/* 2.6.19 kernel headers helpfully removed some macros and
4484 + moved lots of stuff into new headers, some of which aren't
4485 + included by linux/rtnetlink.h. */
4486 +#include <linux/if_addr.h>
4490 +# define IFA_RTA(r) \
4491 + ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifaddrmsg))))
4492 +# define IFA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifaddrmsg))
4496 +# define IFLA_RTA(r) \
4497 + ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifinfomsg))))
4498 +# define IFLA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifinfomsg))
4503 diff -Nrup a/sysdeps/unix/sysv/linux/paths.h b/sysdeps/unix/sysv/linux/paths.h
4504 --- a/sysdeps/unix/sysv/linux/paths.h 2012-01-01 05:16:32.000000000 -0700
4505 +++ b/sysdeps/unix/sysv/linux/paths.h 2012-01-01 20:41:26.702439831 -0700
4507 #define _PATH_TTY "/dev/tty"
4508 #define _PATH_UNIX "/boot/vmlinux"
4509 #define _PATH_UTMP "/var/run/utmp"
4510 -#define _PATH_VI "/usr/bin/vi"
4511 +#define _PATH_VI "/bin/vi"
4512 #define _PATH_WTMP "/var/log/wtmp"
4514 /* Provide trailing slash, since mostly used for building pathnames. */
4515 diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c
4516 --- a/sysdeps/unix/sysv/linux/tcsetattr.c 2012-01-01 05:16:32.000000000 -0700
4517 +++ b/sysdeps/unix/sysv/linux/tcsetattr.c 2012-01-01 20:41:26.703439831 -0700
4518 @@ -49,6 +49,7 @@ tcsetattr (fd, optional_actions, termios
4520 struct __kernel_termios k_termios;
4521 unsigned long int cmd;
4524 switch (optional_actions)
4526 @@ -80,6 +81,35 @@ tcsetattr (fd, optional_actions, termios
4527 memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
4528 __KERNEL_NCCS * sizeof (cc_t));
4530 - return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
4531 + retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
4533 + if (retval == 0 && cmd == TCSETS)
4535 + /* The Linux kernel has a bug which silently ignore the invalid
4536 + c_cflag on pty. We have to check it here. */
4538 + retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
4541 + /* We cannot verify if the setting is ok. We don't return
4543 + __set_errno (save);
4546 + else if ((termios_p->c_cflag & (PARENB | CREAD))
4547 + != (k_termios.c_cflag & (PARENB | CREAD))
4548 + || ((termios_p->c_cflag & CSIZE)
4549 + && ((termios_p->c_cflag & CSIZE)
4550 + != (k_termios.c_cflag & CSIZE))))
4552 + /* It looks like the Linux kernel silently changed the
4553 + PARENB/CREAD/CSIZE bits in c_cflag. Report it as an
4555 + __set_errno (EINVAL);
4562 libc_hidden_def (tcsetattr)
4563 diff -Nrup a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
4564 --- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S 2012-01-01 05:16:32.000000000 -0700
4565 +++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S 2012-01-01 20:41:26.703439831 -0700
4568 #include <jmpbuf-offsets.h>
4569 #include <asm-syntax.h>
4570 +#include <stap-probe.h>
4572 .section .rodata.str1.1,"aMS",@progbits,1
4573 .type longjmp_msg,@object
4574 @@ -94,7 +95,9 @@ ENTRY(____longjmp_chk)
4578 -.Lok: /* We add unwind information for the target here. */
4580 + LIBC_PROBE (longjmp, 3, 8@%rdi, -4@%esi, 8@%rdx)
4581 + /* We add unwind information for the target here. */
4582 cfi_def_cfa(%rdi, 0)
4583 cfi_register(%rsp,%r8)
4584 cfi_register(%rbp,%r9)
4585 @@ -113,5 +116,6 @@ ENTRY(____longjmp_chk)
4589 + LIBC_PROBE (longjmp_target, 3, 8@%rdi, -4@%eax, 8@%rdx)
4591 END (____longjmp_chk)
4592 diff -Nrup a/sysdeps/x86_64/__longjmp.S b/sysdeps/x86_64/__longjmp.S
4593 --- a/sysdeps/x86_64/__longjmp.S 2012-01-01 05:16:32.000000000 -0700
4594 +++ b/sysdeps/x86_64/__longjmp.S 2012-01-01 20:41:26.703439831 -0700
4596 -/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
4597 +/* Copyright (C) 2001,2004,2005,2006,2009,2011 Free Software Foundation, Inc.
4598 This file is part of the GNU C Library.
4600 The GNU C Library is free software; you can redistribute it and/or
4603 #include <jmpbuf-offsets.h>
4604 #include <asm-syntax.h>
4605 +#include <stap-probe.h>
4607 /* Jump to the position specified by ENV, causing the
4608 setjmp call there to return VAL, or 1 if VAL is 0.
4609 @@ -34,6 +35,7 @@ ENTRY(__longjmp)
4613 + LIBC_PROBE (longjmp, 3, 8@%rdi, -4@%esi, 8@%rdx)
4614 /* We add unwind information for the target here. */
4615 cfi_def_cfa(%rdi, 0)
4616 cfi_register(%rsp,%r8)
4617 @@ -53,5 +55,6 @@ ENTRY(__longjmp)
4621 + LIBC_PROBE (longjmp_target, 3, 8@%rdi, -4@%eax, 8@%rdx)
4624 diff -Nrup a/sysdeps/x86_64/setjmp.S b/sysdeps/x86_64/setjmp.S
4625 --- a/sysdeps/x86_64/setjmp.S 2012-01-01 05:16:32.000000000 -0700
4626 +++ b/sysdeps/x86_64/setjmp.S 2012-01-01 20:41:26.704439831 -0700
4628 /* setjmp for x86-64.
4629 - Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
4630 + Copyright (C) 2001,2003,2005,2006,2011 Free Software Foundation, Inc.
4631 This file is part of the GNU C Library.
4633 The GNU C Library is free software; you can redistribute it and/or
4636 #include <jmpbuf-offsets.h>
4637 #include <asm-syntax.h>
4638 +#include <stap-probe.h>
4641 /* Save registers. */
4642 @@ -41,6 +42,7 @@ ENTRY (__sigsetjmp)
4644 movq %rdx, (JB_RSP*8)(%rdi)
4645 movq (%rsp), %rax /* Save PC we are returning to now. */
4646 + LIBC_PROBE (setjmp, 3, 8@%rdi, -4@%esi, 8@%rax)
4650 diff -Nrup a/timezone/zic.c b/timezone/zic.c
4651 --- a/timezone/zic.c 2012-01-01 05:16:32.000000000 -0700
4652 +++ b/timezone/zic.c 2012-01-01 20:41:26.705439831 -0700
4653 @@ -1921,7 +1921,7 @@ const int zonecount;
4654 if (stdrp != NULL && stdrp->r_hiyear == 2037)
4657 - if (stdrp == NULL && zp->z_nrules != 0)
4658 + if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_stdoff != 0))
4660 abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar;
4661 doabbr(result, zp->z_format, abbrvar, FALSE, TRUE);