]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blob - glibc/patches/glibc-fedora.patch
Change file layout of the makefiles.
[people/pmueller/ipfire-3.x.git] / glibc / patches / glibc-fedora.patch
1 --- glibc-2.14/ChangeLog
2 +++ glibc-2.14-2/ChangeLog
3 @@ -1,3 +1,8 @@
4 +2011-05-31 Andreas Schwab <schwab@redhat.com>
5 +
6 + * nscd/nscd_getserv_r.c (nscd_getserv_r): Don't free non-malloced
7 + memory. Use alloca_account. Fix memory leak when retrying.
8 +
9 2011-05-31 Ulrich Drepper <drepper@gmail.com>
10
11 * version.h (RELEASE): Bump for 2.14 release.
12 @@ -10,11 +15,6 @@
13 * po/Makefile (po-sed-cmd): Add ksh to extensions.
14 (libc.pot): Work around missing support for .ksh extension in xgettext.
15
16 - [BZ #12684]
17 - * resolv/res_send.c (__libc_res_nsend): Only go to the next name server
18 - if both request failed.
19 - (send_dg): In case of server errors clear resplen or *resplen2.
20 -
21 [BZ #12454]
22 * elf/dl-deps.c (_dl_map_object_deps): Run initializer sorting only
23 when there are multiple maps.
24 @@ -400,6 +400,13 @@
25 * libio/Makefile (tests): Add bug-fclose1.
26 * libio/bug-fclose1.c: New file.
27
28 +2011-05-13 Andreas Schwab <schwab@redhat.com>
29 +
30 + * elf/dl-load.c (is_dst): Remove parameter secure, all callers
31 + changed. Move check for valid use of $ORIGIN ...
32 + (_dl_dst_substitute): ... here. Reset check_for_trusted when a
33 + path element is skipped.
34 +
35 2011-05-12 Ulrich Drepper <drepper@gmail.com>
36
37 [BZ #12511]
38 @@ -921,6 +928,31 @@
39 * sysdeps/unix/sysv/linux/Versions [GLIBC_2.14] (clock_adjtime):
40 Export.
41
42 +2011-04-06 Andreas Schwab <schwab@redhat.com>
43 +
44 + * scripts/check-local-headers.sh: Ignore systemtap headers.
45 +
46 +2011-02-21 Roland McGrath <roland@redhat.com>
47 +
48 + * sysdeps/x86_64/__longjmp.S: Add a static probe here.
49 + * sysdeps/x86_64/setjmp.S: Likewise.
50 + * sysdeps/i386/bsd-setjmp.S: Likewise.
51 + * sysdeps/i386/bsd-_setjmp.S: Likewise.
52 + * sysdeps/i386/setjmp.S: Likewise.
53 + * sysdeps/i386/__longjmp.S: Likewise.
54 + * sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S: Likewise.
55 + * sysdeps/unix/sysv/linux/i386/____longjmp_chk.S: Likewise.
56 +
57 +2011-02-08 Roland McGrath <roland@redhat.com>
58 +
59 + * include/stap-probe.h: New file.
60 + * configure.in: Handle --enable-systemtap.
61 + * configure: Regenerated.
62 + * config.h.in (USE_STAP_PROBE): New #undef.
63 + * extra-lib.mk (CPPFLAGS-$(lib)): Add -DIN_LIB=$(lib).
64 + * elf/Makefile (CPPFLAGS-.os): Add -DIN_LIB=rtld.
65 + * elf/rtld-Rules (rtld-CPPFLAGS): Likewise.
66 +
67 2011-03-22 Ulrich Drepper <drepper@gmail.com>
68
69 * sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word): Increment
70 @@ -981,6 +1013,16 @@
71 $LDFLAGS and -nostdlib -nostartfiles to linking step. Change main
72 to _start.
73
74 +2011-03-18 Andreas Schwab <schwab@redhat.com>
75 +
76 + * elf/ldd.bash.in: Never run file directly.
77 +
78 +2011-03-07 Andreas Schwab <schwab@redhat.com>
79 +
80 + * include/link.h (struct link_map): Remove l_orig_initfini.
81 + * elf/dl-close.c (_dl_close_worker): Revert its use.
82 + * elf/dl-deps.c (_dl_map_object_deps): Likewise.
83 +
84 2011-03-06 Ulrich Drepper <drepper@gmail.com>
85
86 * elf/dl-load.c (_dl_map_object): If we are looking for the first
87 @@ -1035,12 +1077,6 @@
88 * elf/noload.c: Include <memcheck.h>.
89 (main): Call mtrace. Close all opened handles.
90
91 -2011-02-17 Andreas Schwab <schwab@redhat.com>
92 -
93 - [BZ #12454]
94 - * elf/dl-deps.c (_dl_map_object_deps): Signal error early when
95 - dependencies are missing.
96 -
97 2011-02-22 Samuel Thibault <samuel.thibault@ens-lyon.org>
98
99 Fix __if_freereq crash: Unlike the generic version which uses free,
100 @@ -1197,6 +1233,12 @@
101 * shadow/sgetspent.c: Check return value of __sgetspent_r instead
102 of errno.
103
104 +2011-02-03 Andreas Schwab <schwab@redhat.com>
105 +
106 + * login/programs/pt_chown.c (main): Check for valid file
107 + descriptor instead of privileges. Be careful to drop all
108 + capabilities when not needed.
109 +
110 2011-01-19 Ulrich Drepper <drepper@gmail.com>
111
112 [BZ #11724]
113 @@ -1884,6 +1926,29 @@
114 * sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS):
115 Mask out sign-bit copies when constructing f_fsid.
116
117 +2010-09-27 Andreas Schwab <schwab@redhat.com>
118 +
119 + * include/link.h (struct link_map): Add l_free_initfini.
120 + * elf/dl-deps.c (_dl_map_object_deps): Set it when assigning
121 + l_initfini.
122 + * elf/rtld.c (dl_main): Clear it on all objects loaded on startup.
123 + * elf/dl-libc.c (free_mem): Free l_initfini if l_free_initfini is
124 + set.
125 +
126 + [BZ #11561]
127 + * posix/regcomp.c (parse_bracket_exp): When looking up collating
128 + elements compare against the byte sequence of it, not its name.
129 +
130 + [BZ #6530]
131 + * stdio-common/vfprintf.c (process_string_arg): Revert 2000-07-22
132 + change.
133 +
134 + * nss/nss_files/files-XXX.c (internal_getent): Declare linebuflen
135 + as size_t.
136 +
137 + * sysdeps/i386/i686/multiarch/strspn.S (ENTRY): Add missing
138 + backslash.
139 +
140 2010-09-24 Petr Baudis <pasky@suse.cz>
141
142 * debug/stack_chk_fail_local.c: Add missing licence exception.
143 @@ -2676,6 +2741,32 @@
144 call returning > 0 value.
145 * sysdeps/unix/sysv/linux/getlogin.c (getlogin): Likewise.
146
147 +2010-07-01 Andreas Schwab <schwab@redhat.com>
148 +
149 + * include/sys/resource.h (__getrlimit): Add hidden proto.
150 + * sysdeps/unix/sysv/linux/i386/getrlimit.c: Add libc_hidden_weak.
151 + * sysdeps/mach/hurd/getrlimit.c: Add libc_hidden_def.
152 + * resource/getrlimit.c: Likewise.
153 +
154 +2010-06-28 Andreas Schwab <schwab@redhat.com>
155 +
156 + * allocatestack.c (setxid_mark_thread): Ensure that the exiting
157 + thread is woken up.
158 +
159 + * elf/Makefile: Add rules to build and run unload8 test.
160 + * elf/unload8.c: New file.
161 + * elf/unload8mod1.c: New file.
162 + * elf/unload8mod1x.c: New file.
163 + * elf/unload8mod2.c: New file.
164 + * elf/unload8mod3.c: New file.
165 +
166 + * elf/dl-close.c (_dl_close_worker): Reset private search list if
167 + it wasn't used.
168 +
169 +2010-06-21 Andreas Schwab <schwab@redhat.com>
170 +
171 + * sysdeps/i386/i686/Makefile: Don't pass -mtune to assembler.
172 +
173 2010-06-07 Andreas Schwab <schwab@redhat.com>
174
175 * dlfcn/Makefile: Remove explicit dependencies on libc.so and
176 @@ -2728,6 +2819,24 @@
177 * hurd/hurd/fd.h (__file_name_lookup_at): Update comment.
178 * sysdeps/mach/hurd/linkat.c (linkat): Pass O_NOLINK in FLAGS.
179
180 +2010-06-11 Andreas Schwab <schwab@redhat.com>
181 +
182 + * elf/rtld.c (_dl_starting_up): Always define.
183 + (dl_main): Always set _dl_starting_up.
184 + * elf/dl-support.c (_dl_starting_up): Always define.
185 + * elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
186 +
187 +2010-06-10 Andreas Schwab <schwab@redhat.com>
188 +
189 + * sysdeps/unix/sysv/linux/getpagesize.c: Don't assume AT_PAGESIZE
190 + is always available.
191 +
192 + * sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
193 + GLIBC_PRIVATE.
194 + * nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
195 + * sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
196 + * nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
197 +
198 2010-05-28 Luis Machado <luisgpm@br.ibm.com>
199
200 * sysdeps/powerpc/powerpc32/power7/memcpy.S: Exchange srdi for srwi.
201 --- glibc-2.14/ChangeLog.15
202 +++ glibc-2.14-2/ChangeLog.15
203 @@ -477,6 +477,14 @@
204
205 2004-11-26 Jakub Jelinek <jakub@redhat.com>
206
207 + * posix/Makefile (generated: Add getconf.speclist.
208 + ($(inst_libexecdir)/getconf): Use getconf.speclist instead of
209 + getconf output.
210 + ($(objpfx)getconf.speclist): New rule.
211 + * posix/getconf.speclist.h: New file.
212 +
213 +2004-11-26 Jakub Jelinek <jakub@redhat.com>
214 +
215 * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add GETCONF_DIR.
216
217 2004-11-26 Kaz Kojima <kkojima@rr.iij4u.or.jp>
218 @@ -1103,6 +1111,13 @@
219 * sysdeps/generic/tempname.c (__path_search): Add missing argument
220 TRY_TMPDIR.
221
222 +2004-11-02 Jakub Jelinek <jakub@redhat.com>
223 +
224 + * include/features.h (__USE_FORTIFY_LEVEL): Also set for Red Hat
225 + GCC 3.4.x-RH >= 3.4.2-8.
226 + * debug/tst-chk1.c (do_test): Deal with GCC 3.4.x-RH not
227 + being able to recognize subobjects.
228 +
229 2004-10-31 Mariusz Mazur <mmazur@kernel.pl>
230
231 * sysdeps/unix/sysv/linux/alpha/setregid.c: New file.
232 @@ -1443,6 +1458,11 @@
233 * sysdeps/generic/readonly-area.c (__readonly_str): Renamed to ...
234 (__readonly_area): ... this.
235
236 +2004-10-19 Jakub Jelinek <jakub@redhat.com>
237 +
238 + * include/features.h (__USE_FORTIFY_LEVEL): Enable even with
239 + Red Hat gcc4 4.0.0 and above.
240 +
241 2004-10-18 Jakub Jelinek <jakub@redhat.com>
242
243 * sysdeps/generic/strcpy_chk.c (__strcpy_chk): Speed up by checking
244 @@ -3182,6 +3202,23 @@
245 before return type.
246 * locale/localename.c (__current_locale_name): Likewise.
247
248 +2004-08-31 Jakub Jelinek <jakub@redhat.com>
249 +
250 + * elf/ldconfig.c (parse_conf): Add prefix argument, prepend it
251 + before arguments to add_dir and pass to parse_conf_include.
252 + (parse_conf_include): Add prefix argument, pass it down to
253 + parse_conf.
254 + (main): Call arch_startup. Adjust parse_conf caller.
255 + Call add_arch_dirs.
256 + * sysdeps/generic/dl-cache.h (arch_startup, add_arch_dirs): Define.
257 + * sysdeps/unix/sysv/linux/i386/dl-cache.h: New file.
258 + * sysdeps/unix/sysv/linux/ia64/dl-cache.h (EMUL_HACK, arch_startup,
259 + add_arch_dirs): Define.
260 + * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Prepend
261 + /emul/ia32-linux before the 32-bit ld.so pathname.
262 + * sysdeps/unix/sysv/linux/ia64/dl-procinfo.c: New file.
263 + * sysdeps/unix/sysv/linux/ia64/dl-procinfo.h: New file.
264 +
265 2004-08-30 Roland McGrath <roland@frob.com>
266
267 * scripts/extract-abilist.awk: If `lastversion' variable defined, omit
268 --- glibc-2.14/ChangeLog.16
269 +++ glibc-2.14-2/ChangeLog.16
270 @@ -2042,6 +2042,9 @@
271 (__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT
272 followed by __THROW.
273
274 + * sysdeps/unix/sysv/linux/futimesat.c (futimesat): If
275 + file == NULL, use __futimes unconditionally.
276 +
277 2006-02-02 Ulrich Drepper <drepper@redhat.com>
278
279 * sysdeps/unix/sysv/linux/futimesat.c [__NR_futimesat]
280 @@ -2101,6 +2104,11 @@
281 * sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Fix a typo.
282 * sysdeps/s390/fpu/libm-test-ulps: Remove llrint ulps.
283
284 +2006-01-30 Jakub Jelinek <jakub@redhat.com>
285 +
286 + * include/bits/stdlib-ldbl.h: New file.
287 + * include/bits/wchar-ldbl.h: New file.
288 +
289 2006-01-19 Thomas Schwinge <tschwinge@gnu.org>
290
291 * libio/genops.c: Include <stdbool.h>.
292 --- glibc-2.14/ChangeLog.17
293 +++ glibc-2.14-2/ChangeLog.17
294 @@ -256,6 +256,12 @@
295
296 * Makerules (libc-abis): Fix search for libc-abis in add-ons.
297
298 +2010-04-06 Ulrich Drepper <drepper@redhat.com>
299 +
300 + * sysdeps/posix/getaddrinfo.c (default_scopes): Assign global
301 + scope to RFC 1918 addresses.
302 + * posix/gai.conf: Document difference from RFC 3484.
303 +
304 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
305
306 * sysdeps/gnu/unwind-resume.c: New, moved from nptl/sysdeps/pthread/.
307 @@ -1010,6 +1016,13 @@
308 * sysdeps/x86_64/fpu/fegetenv.c: Likewise
309 * sysdeps/s390/fpu/fegetenv.c: Likewise. Remove unused headers.
310
311 +2009-10-27 Aurelien Jarno <aurelien@aurel32.net>
312 +
313 + [BZ #10855]
314 + * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory
315 + used later with MMAP_FIXED | MMAP_SHARED to cope with different
316 + alignment restrictions.
317 +
318 2010-02-05 H.J. Lu <hongjiu.lu@intel.com>
319
320 [BZ #11230]
321 @@ -2953,6 +2966,11 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
322 * sysdeps/generic/ldsodefs.h (struct rtld_global): The map element in
323 the unique symbol hash table should not be const.
324
325 +2009-07-22 Jakub Jelinek <jakub@redhat.com>
326 +
327 + * Makeconfig (ASFLAGS): Append $(sysdep-ASFLAGS).
328 + * sysdeps/i386/Makefile (sysdep-ASFLAGS): Add -U__i686.
329 +
330 2009-07-21 Ulrich Drepper <drepper@redhat.com>
331
332 * sysdeps/x86_64/multiarch/strstr.c: Minor cleanups. Remove
333 @@ -3218,6 +3236,11 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
334 out common code into new function get_common_indeces. Determine
335 extended family and model for Intel processors.
336
337 +2009-06-26 Andreas Schwab <aschwab@redhat.com>
338 +
339 + * timezone/zic.c (stringzone): Don't try to generate a POSIX TZ
340 + string when the timezone ends in DST.
341 +
342 2009-06-26 Ulrich Drepper <drepper@redhat.com>
343
344 * resolv/resolv.h: Define RES_SNGLKUPREOP.
345 @@ -11818,6 +11841,10 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
346 [BZ #4368]
347 * stdlib/stdlib.h: Remove obsolete part of comment for realpath.
348
349 +2007-04-16 Jakub Jelinek <jakub@redhat.com>
350 +
351 + * locale/programs/locarchive.c (add_alias, insert_name): Remove static.
352 +
353 2007-04-16 Ulrich Drepper <drepper@redhat.com>
354
355 [BZ #4364]
356 @@ -13075,6 +13102,15 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
357 separators also if no non-zero digits found.
358 * stdlib/Makefile (tests): Add tst-strtod3.
359
360 +2006-12-10 Jakub Jelinek <jakub@redhat.com>
361 +
362 + * sysdeps/unix/sysv/linux/netlinkaccess.h: Include linux/if_addr.h
363 + if IFA_MAX is not defined.
364 + (IFA_RTA, IFA_PAYLOAD, IFLA_RTA, IFLA_PAYLOAD): Define if not
365 + defined.
366 + * sysdeps/unix/sysv/linux/check_pf.c: Include netlinkaccess.h
367 + instead of asm/types.h, linux/netlink.h and linux/rtnetlink.h.
368 +
369 2006-12-09 Ulrich Drepper <drepper@redhat.com>
370
371 [BZ #3632]
372 --- glibc-2.14/Makeconfig
373 +++ glibc-2.14-2/Makeconfig
374 @@ -791,12 +791,12 @@ endif
375 # The assembler can generate debug information too.
376 ifndef ASFLAGS
377 ifeq ($(have-cpp-asm-debuginfo),yes)
378 -ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
379 +ASFLAGS = $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
380 else
381 -ASFLAGS :=
382 +ASFLAGS =
383 endif
384 endif
385 -ASFLAGS += $(ASFLAGS-config) $(asflags-cpu)
386 +ASFLAGS += $(ASFLAGS-config) $(asflags-cpu) $(sysdep-ASFLAGS)
387
388 ifndef BUILD_CC
389 BUILD_CC = $(CC)
390 --- glibc-2.14/NEWS
391 +++ glibc-2.14-2/NEWS
392 @@ -16,19 +16,9 @@ Version 2.14
393 12393, 12420, 12432, 12445, 12449, 12453, 12454, 12460, 12469, 12489,
394 12509, 12510, 12511, 12518, 12527, 12541, 12545, 12551, 12582, 12583,
395 12587, 12597, 12601, 12611, 12625, 12626, 12631, 12650, 12653, 12655,
396 - 12660, 12671, 12681, 12684, 12685, 12711, 12713, 12714, 12717, 12723,
397 - 12724, 12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792,
398 - 12795, 12811, 12813, 12814
399 -
400 -* The RPC implementation in libc is obsoleted. Old programs keep working
401 - but new programs cannot be linked with the routines in libc anymore.
402 - Programs in need of RPC functionality must be linked against TI-RPC.
403 - The TI-RPC implementation is IPv6 enabled and there are other benefits.
404 -
405 - Visible changes of this change include (obviously) the inability to link
406 - programs using RPC functions without referencing the TI-RPC library and the
407 - removal of the RPC headers from the glibc headers.
408 - Implemented by Ulrich Drepper.
409 + 12660, 12671, 12681, 12685, 12711, 12713, 12714, 12717, 12723, 12724,
410 + 12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792, 12795,
411 + 12811, 12813, 12814
412
413 * New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at,
414 syncfs, setns, sendmmsg
415 --- glibc-2.14/config.h.in
416 +++ glibc-2.14-2/config.h.in
417 @@ -204,6 +204,9 @@
418 /* Define if `.ctors' and `.dtors' sections shouldn't be used. */
419 #undef NO_CTORS_DTORS_SECTIONS
420
421 +/* Define if Systemtap <sys/sdt.h> probes should be defined. */
422 +#undef USE_STAP_PROBE
423 +
424 /*
425 \f */
426
427 --- glibc-2.14/configure
428 +++ glibc-2.14-2/configure
429 @@ -784,6 +784,7 @@ enable_all_warnings
430 enable_multi_arch
431 enable_experimental_malloc
432 enable_nss_crypt
433 +enable_systemtap
434 with_cpu
435 '
436 ac_precious_vars='build_alias
437 @@ -1444,6 +1445,7 @@ Optional Features:
438 --enable-experimental-malloc
439 enable experimental malloc features
440 --enable-nss-crypt enable libcrypt to use nss
441 + --enable-systemtap enable systemtap static probe points [default=no]
442
443 Optional Packages:
444 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
445 @@ -3823,6 +3825,51 @@ else
446 fi
447
448
449 +# Check whether --enable-systemtap was given.
450 +if test "${enable_systemtap+set}" = set; then :
451 + enableval=$enable_systemtap; systemtap=$enableval
452 +else
453 + systemtap=no
454 +fi
455 +
456 +if test x$systemtap != xno; then
457 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemtap static probe support" >&5
458 +$as_echo_n "checking for systemtap static probe support... " >&6; }
459 +if test "${libc_cv_sdt+set}" = set; then :
460 + $as_echo_n "(cached) " >&6
461 +else
462 + old_CFLAGS="$CFLAGS"
463 + CFLAGS="-std=gnu99 $CFLAGS"
464 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
465 +/* end confdefs.h. */
466 +#include <sys/sdt.h>
467 +void foo (int i, void *p)
468 +{
469 + asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
470 + :: STAP_PROBE_ASM_OPERANDS (2, i, p));
471 +}
472 +_ACEOF
473 +if ac_fn_c_try_compile "$LINENO"; then :
474 + libc_cv_sdt=yes
475 +else
476 + libc_cv_sdt=no
477 +fi
478 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
479 + CFLAGS="$old_CFLAGS"
480 +fi
481 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sdt" >&5
482 +$as_echo "$libc_cv_sdt" >&6; }
483 + if test $libc_cv_sdt = yes; then
484 + $as_echo "#define USE_STAP_PROBE 1" >>confdefs.h
485 +
486 + else
487 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
488 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
489 +as_fn_error $? "systemtap support needs sys/sdt.h with asm support
490 +See \`config.log' for more details" "$LINENO" 5; }
491 + fi
492 +fi
493 +
494 # The way shlib-versions is used to generate soversions.mk uses a
495 # fairly simplistic model for name recognition that can't distinguish
496 # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
497 --- glibc-2.14/configure.in
498 +++ glibc-2.14-2/configure.in
499 @@ -316,6 +316,29 @@ else
500 fi
501 AC_SUBST(libc_cv_nss_crypt)
502
503 +AC_ARG_ENABLE([systemtap],
504 + [AS_HELP_STRING([--enable-systemtap],
505 + [enable systemtap static probe points @<:@default=no@:>@])],
506 + [systemtap=$enableval],
507 + [systemtap=no])
508 +if test x$systemtap != xno; then
509 + AC_CACHE_CHECK([for systemtap static probe support], libc_cv_sdt, [dnl
510 + old_CFLAGS="$CFLAGS"
511 + CFLAGS="-std=gnu99 $CFLAGS"
512 + AC_COMPILE_IFELSE([#include <sys/sdt.h>
513 +void foo (int i, void *p)
514 +{
515 + asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
516 + :: STAP_PROBE_ASM_OPERANDS (2, i, p));
517 +}], [libc_cv_sdt=yes], [libc_cv_sdt=no])
518 + CFLAGS="$old_CFLAGS"])
519 + if test $libc_cv_sdt = yes; then
520 + AC_DEFINE([USE_STAP_PROBE])
521 + else
522 + AC_MSG_FAILURE([systemtap support needs sys/sdt.h with asm support])
523 + fi
524 +fi
525 +
526 # The way shlib-versions is used to generate soversions.mk uses a
527 # fairly simplistic model for name recognition that can't distinguish
528 # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
529 --- glibc-2.14/csu/Makefile
530 +++ glibc-2.14-2/csu/Makefile
531 @@ -93,7 +93,8 @@ omit-deps += $(crtstuff)
532 $(crtstuff:%=$(objpfx)%.o): %.o: %.S $(objpfx)defs.h
533 $(compile.S) -g0 $(ASFLAGS-.os) -o $@
534
535 -CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
536 +CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \
537 + -fno-asynchronous-unwind-tables
538
539 vpath initfini.c $(sysdirs)
540
541 --- glibc-2.14/csu/elf-init.c
542 +++ glibc-2.14-2/csu/elf-init.c
543 @@ -63,6 +63,23 @@ extern void (*__init_array_end []) (int, char **, char **)
544 extern void (*__fini_array_start []) (void) attribute_hidden;
545 extern void (*__fini_array_end []) (void) attribute_hidden;
546
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);
554 +#else
555 +# define hidden_undef(x)
556 +#endif
557 +
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)
564
565 /* These function symbols are provided for the .init/.fini section entry
566 points automagically by the linker. */
567 --- glibc-2.14/debug/tst-chk1.c
568 +++ glibc-2.14-2/debug/tst-chk1.c
569 @@ -17,6 +17,9 @@
570 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
571 02111-1307 USA. */
572
573 +/* Hack: make sure GCC doesn't know __chk_fail () will not return. */
574 +#define __noreturn__
575 +
576 #include <assert.h>
577 #include <fcntl.h>
578 #include <locale.h>
579 @@ -242,7 +245,7 @@ do_test (void)
580 if (memcmp (a.buf1, "aabcdabcjj", 10))
581 FAIL ();
582
583 -#if __USE_FORTIFY_LEVEL < 2
584 +#if __USE_FORTIFY_LEVEL < 2 || !__GNUC_PREREQ (4, 0)
585 /* The following tests are supposed to crash with -D_FORTIFY_SOURCE=2
586 and sufficient GCC support, as the string operations overflow
587 from a.buf1 into a.buf2. */
588 @@ -357,7 +360,7 @@ do_test (void)
589 memset (a.buf1 + 9, 'j', l0 + 2);
590 CHK_FAIL_END
591
592 -# if __USE_FORTIFY_LEVEL >= 2
593 +# if __USE_FORTIFY_LEVEL >= 2 && __GNUC_PREREQ (4, 0)
594 # define O 0
595 # else
596 # define O 1
597 --- glibc-2.14/elf/Makefile
598 +++ glibc-2.14-2/elf/Makefile
599 @@ -90,6 +90,7 @@ distribute := rtld-Rules \
600 unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \
601 unload6mod1.c unload6mod2.c unload6mod3.c \
602 unload7mod1.c unload7mod2.c \
603 + unload8mod1.c unload8mod1x.c unload8mod2.c unload8mod3.c \
604 tst-audit1.c tst-audit2.c tst-audit3.c tst-audit4.c \
605 tst-auditmod1.c tst-auditmod3a.c tst-auditmod3b.c \
606 tst-auditmod4a.c tst-auditmod4b.c \
607 @@ -133,6 +134,7 @@ include ../Makeconfig
608 ifeq ($(unwind-find-fde),yes)
609 routines += unwind-dw2-fde-glibc
610 shared-only-routines += unwind-dw2-fde-glibc
611 +CFLAGS-unwind-dw2-fde-glibc.c += -fno-strict-aliasing
612 endif
613
614 before-compile = $(objpfx)trusted-dirs.h
615 @@ -221,7 +223,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
616 tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
617 tst-dlmodcount tst-dlopenrpath tst-deep1 \
618 tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
619 - unload3 unload4 unload5 unload6 unload7 tst-global1 order2 \
620 + unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \
621 tst-audit1 tst-audit2 \
622 tst-stackguard1 tst-addr1 tst-thrlock \
623 tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
624 @@ -279,6 +281,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
625 unload4mod1 unload4mod2 unload4mod3 unload4mod4 \
626 unload6mod1 unload6mod2 unload6mod3 \
627 unload7mod1 unload7mod2 \
628 + unload8mod1 unload8mod1x unload8mod2 unload8mod3 \
629 order2mod1 order2mod2 order2mod3 order2mod4 \
630 tst-unique1mod1 tst-unique1mod2 \
631 tst-unique2mod1 tst-unique2mod2 \
632 @@ -500,7 +503,8 @@ CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
633 CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
634 CFLAGS-cache.c = $(SYSCONF-FLAGS)
635
636 -CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
637 +CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
638 + -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
639
640 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
641 generated += $(addsuffix .so,$(strip $(modules-names)))
642 @@ -568,6 +572,9 @@ $(objpfx)unload6mod2.so: $(libdl)
643 $(objpfx)unload6mod3.so: $(libdl)
644 $(objpfx)unload7mod1.so: $(libdl)
645 $(objpfx)unload7mod2.so: $(objpfx)unload7mod1.so
646 +$(objpfx)unload8mod1.so: $(objpfx)unload8mod2.so
647 +$(objpfx)unload8mod2.so: $(objpfx)unload8mod3.so
648 +$(objpfx)unload8mod3.so: $(libdl)
649 $(objpfx)tst-initordera2.so: $(objpfx)tst-initordera1.so
650 $(objpfx)tst-initorderb2.so: $(objpfx)tst-initorderb1.so $(objpfx)tst-initordera2.so
651 $(objpfx)tst-initordera3.so: $(objpfx)tst-initorderb2.so $(objpfx)tst-initorderb1.so
652 @@ -881,6 +888,9 @@ $(objpfx)unload7: $(libdl)
653 $(objpfx)unload7.out: $(objpfx)unload7mod1.so $(objpfx)unload7mod2.so
654 unload7-ENV = MALLOC_PERTURB_=85
655
656 +$(objpfx)unload8: $(libdl)
657 +$(objpfx)unload8.out: $(objpfx)unload8mod1.so $(objpfx)unload8mod1x.so
658 +
659 ifdef libdl
660 $(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a
661 $(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
662 --- glibc-2.14/elf/dl-close.c
663 +++ glibc-2.14-2/elf/dl-close.c
664 @@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
665 if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
666 || dl_close_state != not_pending)
667 {
668 - if (map->l_direct_opencount == 0)
669 - {
670 - if (map->l_type == lt_loaded)
671 - dl_close_state = rerun;
672 - else if (map->l_type == lt_library)
673 - {
674 - struct link_map **oldp = map->l_initfini;
675 - map->l_initfini = map->l_orig_initfini;
676 - _dl_scope_free (oldp);
677 - }
678 - }
679 + if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
680 + dl_close_state = rerun;
681
682 /* There are still references to this object. Do nothing more. */
683 if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
684 @@ -430,6 +421,13 @@ _dl_close_worker (struct link_map *map)
685
686 imap->l_scope_max = new_size;
687 }
688 + else if (new_list != NULL)
689 + {
690 + /* We didn't change the scope array, so reset the search
691 + list. */
692 + imap->l_searchlist.r_list = NULL;
693 + imap->l_searchlist.r_nlist = 0;
694 + }
695
696 /* The loader is gone, so mark the object as not having one.
697 Note: l_idx != IDX_STILL_USED -> object will be removed. */
698 --- glibc-2.14/elf/dl-deps.c
699 +++ glibc-2.14-2/elf/dl-deps.c
700 @@ -478,6 +478,7 @@ _dl_map_object_deps (struct link_map *map,
701 nneeded * sizeof needed[0]);
702 atomic_write_barrier ();
703 l->l_initfini = l_initfini;
704 + l->l_free_initfini = 1;
705 }
706
707 /* If we have no auxiliary objects just go on to the next map. */
708 @@ -491,10 +492,6 @@ _dl_map_object_deps (struct link_map *map,
709 if (errno == 0 && errno_saved != 0)
710 __set_errno (errno_saved);
711
712 - if (errno_reason)
713 - _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
714 - NULL, errstring);
715 -
716 struct link_map **old_l_initfini = NULL;
717 if (map->l_initfini != NULL && map->l_type == lt_loaded)
718 {
719 @@ -681,6 +678,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
720 l_initfini[nlist] = NULL;
721 atomic_write_barrier ();
722 map->l_initfini = l_initfini;
723 + map->l_free_initfini = 1;
724 if (l_reldeps != NULL)
725 {
726 atomic_write_barrier ();
727 @@ -689,5 +687,9 @@ Filters not supported with LD_TRACE_PRELINKING"));
728 _dl_scope_free (old_l_reldeps);
729 }
730 if (old_l_initfini != NULL)
731 - map->l_orig_initfini = old_l_initfini;
732 + _dl_scope_free (old_l_initfini);
733 +
734 + if (errno_reason)
735 + _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
736 + NULL, errstring);
737 }
738 --- glibc-2.14/elf/dl-init.c
739 +++ glibc-2.14-2/elf/dl-init.c
740 @@ -24,11 +24,9 @@
741 /* Type of the initializer. */
742 typedef void (*init_t) (int, char **, char **);
743
744 -#ifndef HAVE_INLINED_SYSCALLS
745 /* Flag, nonzero during startup phase. */
746 extern int _dl_starting_up;
747 extern int _dl_starting_up_internal attribute_hidden;
748 -#endif
749
750
751 static void
752 @@ -133,9 +131,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
753 while (i-- > 0)
754 call_init (main_map->l_initfini[i], argc, argv, env);
755
756 -#ifndef HAVE_INLINED_SYSCALLS
757 /* Finished starting up. */
758 INTUSE(_dl_starting_up) = 0;
759 -#endif
760 }
761 INTDEF (_dl_init)
762 --- glibc-2.14/elf/dl-libc.c
763 +++ glibc-2.14-2/elf/dl-libc.c
764 @@ -265,13 +265,13 @@ libc_freeres_fn (free_mem)
765
766 for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
767 {
768 - /* Remove all additional names added to the objects. */
769 for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
770 {
771 struct libname_list *lnp = l->l_libname->next;
772
773 l->l_libname->next = NULL;
774
775 + /* Remove all additional names added to the objects. */
776 while (lnp != NULL)
777 {
778 struct libname_list *old = lnp;
779 @@ -279,6 +279,10 @@ libc_freeres_fn (free_mem)
780 if (! old->dont_free)
781 free (old);
782 }
783 +
784 + /* Free the initfini dependency list. */
785 + if (l->l_free_initfini)
786 + free (l->l_initfini);
787 }
788
789 if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
790 --- glibc-2.14/elf/dl-load.c
791 +++ glibc-2.14-2/elf/dl-load.c
792 @@ -250,8 +250,7 @@ is_trusted_path_normalize (const char *path, size_t len)
793
794
795 static size_t
796 -is_dst (const char *start, const char *name, const char *str,
797 - int is_path, int secure)
798 +is_dst (const char *start, const char *name, const char *str, int is_path)
799 {
800 size_t len;
801 bool is_curly = false;
802 @@ -280,12 +279,6 @@ is_dst (const char *start, const char *name, const char *str,
803 && (!is_path || name[len] != ':'))
804 return 0;
805
806 - if (__builtin_expect (secure, 0)
807 - && ((name[len] != '\0' && name[len] != '/'
808 - && (!is_path || name[len] != ':'))
809 - || (name != start + 1 && (!is_path || name[-2] != ':'))))
810 - return 0;
811 -
812 return len;
813 }
814
815 @@ -300,13 +293,10 @@ _dl_dst_count (const char *name, int is_path)
816 {
817 size_t len;
818
819 - /* $ORIGIN is not expanded for SUID/GUID programs (except if it
820 - is $ORIGIN alone) and it must always appear first in path. */
821 ++name;
822 - if ((len = is_dst (start, name, "ORIGIN", is_path,
823 - INTUSE(__libc_enable_secure))) != 0
824 - || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
825 - || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
826 + if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0
827 + || (len = is_dst (start, name, "PLATFORM", is_path)) != 0
828 + || (len = is_dst (start, name, "LIB", is_path)) != 0)
829 ++cnt;
830
831 name = strchr (name + len, '$');
832 @@ -339,9 +329,16 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
833 size_t len;
834
835 ++name;
836 - if ((len = is_dst (start, name, "ORIGIN", is_path,
837 - INTUSE(__libc_enable_secure))) != 0)
838 + if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
839 {
840 + /* For SUID/GUID programs $ORIGIN must always appear
841 + first in a path element. */
842 + if (__builtin_expect (INTUSE(__libc_enable_secure), 0)
843 + && ((name[len] != '\0' && name[len] != '/'
844 + && (!is_path || name[len] != ':'))
845 + || (name != start + 1 && (!is_path || name[-2] != ':'))))
846 + repl = (const char *) -1;
847 + else
848 #ifndef SHARED
849 if (l == NULL)
850 repl = _dl_get_origin ();
851 @@ -352,9 +349,9 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
852 check_for_trusted = (INTUSE(__libc_enable_secure)
853 && l->l_type == lt_executable);
854 }
855 - else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
856 + else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0)
857 repl = GLRO(dl_platform);
858 - else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
859 + else if ((len = is_dst (start, name, "LIB", is_path)) != 0)
860 repl = DL_DST_LIB;
861
862 if (repl != NULL && repl != (const char *) -1)
863 @@ -374,6 +371,7 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
864 element, but keep an empty element at the end. */
865 if (wp == result && is_path && *name == ':' && name[1] != '\0')
866 ++name;
867 + check_for_trusted = false;
868 }
869 else
870 /* No DST we recognize. */
871 --- glibc-2.14/elf/dl-support.c
872 +++ glibc-2.14-2/elf/dl-support.c
873 @@ -81,10 +81,8 @@ unsigned long long _dl_load_adds;
874 create a fake scope containing nothing. */
875 struct r_scope_elem _dl_initial_searchlist;
876
877 -#ifndef HAVE_INLINED_SYSCALLS
878 /* Nonzero during startup. */
879 int _dl_starting_up = 1;
880 -#endif
881
882 /* Random data provided by the kernel. */
883 void *_dl_random;
884 --- glibc-2.14/elf/ldconfig.c
885 +++ glibc-2.14-2/elf/ldconfig.c
886 @@ -1034,17 +1034,19 @@ search_dirs (void)
887
888
889 static void parse_conf_include (const char *config_file, unsigned int lineno,
890 - bool do_chroot, const char *pattern);
891 + const char *prefix, bool do_chroot,
892 + const char *pattern);
893
894 /* Parse configuration file. */
895 static void
896 -parse_conf (const char *filename, bool do_chroot)
897 +parse_conf (const char *filename, const char *prefix, bool do_chroot)
898 {
899 FILE *file = NULL;
900 char *line = NULL;
901 const char *canon;
902 size_t len = 0;
903 unsigned int lineno;
904 + size_t prefix_len = prefix ? strlen (prefix) : 0;
905
906 if (do_chroot && opt_chroot)
907 {
908 @@ -1105,7 +1107,14 @@ parse_conf (const char *filename, bool do_chroot)
909 cp += 8;
910 while ((dir = strsep (&cp, " \t")) != NULL)
911 if (dir[0] != '\0')
912 - parse_conf_include (filename, lineno, do_chroot, dir);
913 + parse_conf_include (filename, lineno, prefix, do_chroot, dir);
914 + }
915 + else if (prefix != NULL)
916 + {
917 + size_t cp_len = strlen (cp);
918 + char new_cp [prefix_len + cp_len + 1];
919 + memcpy (mempcpy (new_cp, prefix, prefix_len), cp, cp_len + 1);
920 + add_dir (new_cp);
921 }
922 else if (!strncasecmp (cp, "hwcap", 5) && isblank (cp[5]))
923 {
924 @@ -1168,7 +1177,7 @@ parse_conf (const char *filename, bool do_chroot)
925 config files to read. */
926 static void
927 parse_conf_include (const char *config_file, unsigned int lineno,
928 - bool do_chroot, const char *pattern)
929 + const char *prefix, bool do_chroot, const char *pattern)
930 {
931 if (opt_chroot && pattern[0] != '/')
932 error (EXIT_FAILURE, 0,
933 @@ -1200,7 +1209,7 @@ parse_conf_include (const char *config_file, unsigned int lineno,
934 {
935 case 0:
936 for (size_t i = 0; i < gl.gl_pathc; ++i)
937 - parse_conf (gl.gl_pathv[i], false);
938 + parse_conf (gl.gl_pathv[i], prefix, false);
939 globfree64 (&gl);
940 break;
941
942 @@ -1243,6 +1252,8 @@ main (int argc, char **argv)
943 /* Set the text message domain. */
944 textdomain (_libc_intl_domainname);
945
946 + arch_startup (argc, argv);
947 +
948 /* Parse and process arguments. */
949 int remaining;
950 argp_parse (&argp, argc, argv, 0, &remaining, NULL);
951 @@ -1352,12 +1363,14 @@ main (int argc, char **argv)
952
953 if (!opt_only_cline)
954 {
955 - parse_conf (config_file, true);
956 + parse_conf (config_file, NULL, true);
957
958 /* Always add the standard search paths. */
959 add_system_dir (SLIBDIR);
960 if (strcmp (SLIBDIR, LIBDIR))
961 add_system_dir (LIBDIR);
962 +
963 + add_arch_dirs (config_file);
964 }
965
966 const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
967 --- glibc-2.14/elf/ldd.bash.in
968 +++ glibc-2.14-2/elf/ldd.bash.in
969 @@ -167,18 +167,6 @@ warning: you do not have execution permission for" "\`$file'" >&2
970 fi
971 done
972 case $ret in
973 - 0)
974 - # If the program exits with exit code 5, it means the process has been
975 - # invoked with __libc_enable_secure. Fall back to running it through
976 - # the dynamic linker.
977 - try_trace "$file"
978 - rc=$?
979 - if [ $rc = 5 ]; then
980 - try_trace "$RTLD" "$file"
981 - rc=$?
982 - fi
983 - [ $rc = 0 ] || result=1
984 - ;;
985 1)
986 # This can be a non-ELF binary or no binary at all.
987 nonelf "$file" || {
988 @@ -186,7 +174,7 @@ warning: you do not have execution permission for" "\`$file'" >&2
989 result=1
990 }
991 ;;
992 - 2)
993 + 0|2)
994 try_trace "$RTLD" "$file" || result=1
995 ;;
996 *)
997 --- glibc-2.14/elf/rtld-Rules
998 +++ glibc-2.14-2/elf/rtld-Rules
999 @@ -1,7 +1,7 @@
1000 # Subroutine makefile for compiling libc modules linked into dynamic linker.
1001
1002 # Copyright (C) 2002,2003,2005,2006,2008,2010,2011
1003 -# Free Software Foundation, Inc.
1004 +# Free Software Foundation, Inc.
1005 # This file is part of the GNU C Library.
1006
1007 # The GNU C Library is free software; you can redistribute it and/or
1008 @@ -131,6 +131,6 @@ ifdef rtld-depfiles
1009 endif
1010
1011 # This here is the whole point of all the shenanigans.
1012 -rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1
1013 +rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld
1014
1015 endif
1016 --- glibc-2.14/elf/rtld.c
1017 +++ glibc-2.14-2/elf/rtld.c
1018 @@ -107,7 +107,6 @@ static struct audit_list
1019 struct audit_list *next;
1020 } *audit_list;
1021
1022 -#ifndef HAVE_INLINED_SYSCALLS
1023 /* Set nonzero during loading and initialization of executable and
1024 libraries, cleared before the executable's entry point runs. This
1025 must not be initialized to nonzero, because the unused dynamic
1026 @@ -117,7 +116,6 @@ static struct audit_list
1027 never be called. */
1028 int _dl_starting_up = 0;
1029 INTVARDEF(_dl_starting_up)
1030 -#endif
1031
1032 /* This is the structure which defines all variables global to ld.so
1033 (except those which cannot be added for some reason). */
1034 @@ -923,10 +921,8 @@ dl_main (const ElfW(Phdr) *phdr,
1035 /* Process the environment variable which control the behaviour. */
1036 process_envvars (&mode);
1037
1038 -#ifndef HAVE_INLINED_SYSCALLS
1039 /* Set up a flag which tells we are just starting. */
1040 INTUSE(_dl_starting_up) = 1;
1041 -#endif
1042
1043 if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
1044 {
1045 @@ -2263,6 +2259,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
1046 lnp->dont_free = 1;
1047 lnp = lnp->next;
1048 }
1049 + l->l_free_initfini = 0;
1050
1051 if (l != &GL(dl_rtld_map))
1052 _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
1053 @@ -2312,7 +2309,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
1054
1055 /* Make sure no new search directories have been added. */
1056 assert (GLRO(dl_init_all_dirs) == GL(dl_all_dirs));
1057 -
1058 if (! prelinked && rtld_multiple_ref)
1059 {
1060 /* There was an explicit ref to the dynamic linker as a shared lib.
1061 --- glibc-2.14/elf/unload8.c
1062 +++ glibc-2.14-2/elf/unload8.c
1063 @@ -0,0 +1,33 @@
1064 +#include <dlfcn.h>
1065 +#include <stdio.h>
1066 +
1067 +int
1068 +main (void)
1069 +{
1070 + void *h = dlopen ("$ORIGIN/unload8mod1.so", RTLD_LAZY);
1071 + if (h == NULL)
1072 + {
1073 + puts ("dlopen unload8mod1.so failed");
1074 + return 1;
1075 + }
1076 +
1077 + void *h2 = dlopen ("$ORIGIN/unload8mod1x.so", RTLD_LAZY);
1078 + if (h2 == NULL)
1079 + {
1080 + puts ("dlopen unload8mod1x.so failed");
1081 + return 1;
1082 + }
1083 + dlclose (h2);
1084 +
1085 + int (*mod1) (void) = dlsym (h, "mod1");
1086 + if (mod1 == NULL)
1087 + {
1088 + puts ("dlsym failed");
1089 + return 1;
1090 + }
1091 +
1092 + mod1 ();
1093 + dlclose (h);
1094 +
1095 + return 0;
1096 +}
1097 --- glibc-2.14/elf/unload8mod1.c
1098 +++ glibc-2.14-2/elf/unload8mod1.c
1099 @@ -0,0 +1,7 @@
1100 +extern void mod2 (void);
1101 +
1102 +void
1103 +mod1 (void)
1104 +{
1105 + mod2 ();
1106 +}
1107 --- glibc-2.14/elf/unload8mod1x.c
1108 +++ glibc-2.14-2/elf/unload8mod1x.c
1109 @@ -0,0 +1 @@
1110 +int mod1x;
1111 --- glibc-2.14/elf/unload8mod2.c
1112 +++ glibc-2.14-2/elf/unload8mod2.c
1113 @@ -0,0 +1,7 @@
1114 +extern void mod3 (void);
1115 +
1116 +void
1117 +mod2 (void)
1118 +{
1119 + mod3 ();
1120 +}
1121 --- glibc-2.14/elf/unload8mod3.c
1122 +++ glibc-2.14-2/elf/unload8mod3.c
1123 @@ -0,0 +1,27 @@
1124 +#include <dlfcn.h>
1125 +#include <stdio.h>
1126 +#include <stdlib.h>
1127 +
1128 +void
1129 +mod3_fini2 (void)
1130 +{
1131 +}
1132 +
1133 +void
1134 +mod3_fini (void)
1135 +{
1136 + mod3_fini2 ();
1137 +}
1138 +
1139 +void
1140 +mod3 (void)
1141 +{
1142 + void *h = dlopen ("$ORIGIN/unload8mod2.so", RTLD_LAZY);
1143 + if (h == NULL)
1144 + {
1145 + puts ("dlopen unload8mod2.so failed");
1146 + exit (1);
1147 + }
1148 +
1149 + atexit (mod3_fini);
1150 +}
1151 --- glibc-2.14/extra-lib.mk
1152 +++ glibc-2.14-2/extra-lib.mk
1153 @@ -101,4 +101,4 @@ ifneq (,$(cpp-srcs-left))
1154 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
1155 endif
1156
1157 -CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1
1158 +CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1 -DIN_LIB=$(lib)
1159 --- glibc-2.14/include/bits/stdlib-ldbl.h
1160 +++ glibc-2.14-2/include/bits/stdlib-ldbl.h
1161 @@ -0,0 +1 @@
1162 +#include <stdlib/bits/stdlib-ldbl.h>
1163 --- glibc-2.14/include/bits/wchar-ldbl.h
1164 +++ glibc-2.14-2/include/bits/wchar-ldbl.h
1165 @@ -0,0 +1 @@
1166 +#include <wcsmbs/bits/wchar-ldbl.h>
1167 --- glibc-2.14/include/features.h
1168 +++ glibc-2.14-2/include/features.h
1169 @@ -310,8 +310,13 @@
1170 #endif
1171
1172 #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
1173 - && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
1174 -# if _FORTIFY_SOURCE > 1
1175 + && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
1176 +# if !__GNUC_PREREQ (4, 1)
1177 +# ifdef __GNUC_RH_RELEASE__
1178 +# warning _FORTIFY_SOURCE supported only with GCC 4.1 and later
1179 +# endif
1180 +# define __USE_FORTIFY_LEVEL 0
1181 +# elif _FORTIFY_SOURCE > 1
1182 # define __USE_FORTIFY_LEVEL 2
1183 # else
1184 # define __USE_FORTIFY_LEVEL 1
1185 --- glibc-2.14/include/libc-symbols.h
1186 +++ glibc-2.14-2/include/libc-symbols.h
1187 @@ -635,7 +635,7 @@ for linking")
1188 # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
1189 # define libc_hidden_def(name) hidden_def (name)
1190 # define libc_hidden_weak(name) hidden_weak (name)
1191 -# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
1192 +# define libc_hidden_nolink(name, version) hidden_def (name)
1193 # define libc_hidden_ver(local, name) hidden_ver (local, name)
1194 # define libc_hidden_data_def(name) hidden_data_def (name)
1195 # define libc_hidden_data_weak(name) hidden_data_weak (name)
1196 --- glibc-2.14/include/link.h
1197 +++ glibc-2.14-2/include/link.h
1198 @@ -1,6 +1,6 @@
1199 /* Data structure for communication from the run-time dynamic linker for
1200 loaded ELF shared objects.
1201 - Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
1202 + Copyright (C) 1995-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
1203 This file is part of the GNU C Library.
1204
1205 The GNU C Library is free software; you can redistribute it and/or
1206 @@ -192,6 +192,9 @@ struct link_map
1207 during LD_TRACE_PRELINKING=1
1208 contains any DT_SYMBOLIC
1209 libraries. */
1210 + unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
1211 + freed, ie. not allocated with
1212 + the dummy malloc in ld.so. */
1213
1214 /* Collected information about own RPATH directories. */
1215 struct r_search_path_struct l_rpath_dirs;
1216 @@ -240,9 +243,6 @@ struct link_map
1217
1218 /* List of object in order of the init and fini calls. */
1219 struct link_map **l_initfini;
1220 - /* The init and fini list generated at startup, saved when the
1221 - object is also loaded dynamically. */
1222 - struct link_map **l_orig_initfini;
1223
1224 /* List of the dependencies introduced through symbol binding. */
1225 struct link_map_reldeps
1226 --- glibc-2.14/include/stap-probe.h
1227 +++ glibc-2.14-2/include/stap-probe.h
1228 @@ -0,0 +1,140 @@
1229 +/* Macros for defining Systemtap <sys/sdt.h> static probe points.
1230 + Copyright (C) 2011 Free Software Foundation, Inc.
1231 + This file is part of the GNU C Library.
1232 +
1233 + The GNU C Library is free software; you can redistribute it and/or
1234 + modify it under the terms of the GNU Lesser General Public
1235 + License as published by the Free Software Foundation; either
1236 + version 2.1 of the License, or (at your option) any later version.
1237 +
1238 + The GNU C Library is distributed in the hope that it will be useful,
1239 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1240 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1241 + Lesser General Public License for more details.
1242 +
1243 + You should have received a copy of the GNU Lesser General Public
1244 + License along with the GNU C Library; if not, write to the Free
1245 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1246 + 02111-1307 USA. */
1247 +
1248 +#ifndef _STAP_PROBE_H
1249 +#define _STAP_PROBE_H 1
1250 +
1251 +#ifdef USE_STAP_PROBE
1252 +
1253 +# include <sys/sdt.h>
1254 +
1255 +/* Our code uses one macro LIBC_PROBE (name, n, arg1, ..., argn).
1256 +
1257 + Without USE_STAP_PROBE, that does nothing but evaluates all
1258 + its arguments (to prevent bit rot, unlike e.g. assert).
1259 +
1260 + Systemtap's header defines the macros STAP_PROBE (provider, name) and
1261 + STAP_PROBEn (provider, name, arg1, ..., argn). For "provider" we paste
1262 + in the IN_LIB name (libc, libpthread, etc.) automagically. */
1263 +
1264 +# ifndef NOT_IN_libc
1265 +# define IN_LIB libc
1266 +# elif !defined IN_LIB
1267 +/* This is intentionally defined with extra unquoted commas in it so
1268 + that macro substitution will bomb out when it is used. We don't
1269 + just use #error here, so that this header can be included by
1270 + other headers that use LIBC_PROBE inside their own macros. We
1271 + only want such headers to fail to compile if those macros are
1272 + actually used in a context where IN_LIB has not been defined. */
1273 +# define IN_LIB ,,,missing -DIN_LIB=... -- not extra-lib.mk?,,,
1274 +# endif
1275 +
1276 +# define LIBC_PROBE(name, n, ...) \
1277 + LIBC_PROBE_1 (IN_LIB, name, n, ## __VA_ARGS__)
1278 +
1279 +# define LIBC_PROBE_1(lib, name, n, ...) \
1280 + STAP_PROBE##n (lib, name, ## __VA_ARGS__)
1281 +
1282 +# define STAP_PROBE0 STAP_PROBE
1283 +
1284 +# define LIBC_PROBE_ASM(name, template) \
1285 + STAP_PROBE_ASM (IN_LIB, name, template)
1286 +
1287 +# define LIBC_PROBE_ASM_OPERANDS STAP_PROBE_ASM_OPERANDS
1288 +
1289 +#else /* Not USE_STAP_PROBE. */
1290 +
1291 +# ifndef __ASSEMBLER__
1292 +# define LIBC_PROBE(name, n, ...) DUMMY_PROBE##n (__VA_ARGS__)
1293 +# else
1294 +# define LIBC_PROBE(name, n, ...) /* Nothing. */
1295 +# endif
1296 +
1297 +# define LIBC_PROBE_ASM(name, template) /* Nothing. */
1298 +# define LIBC_PROBE_ASM_OPERANDS(n, ...) /* Nothing. */
1299 +
1300 +/* This silliness lets us evaluate all the arguments for each arity
1301 + of probe. My kingdom for a real macro system. */
1302 +
1303 +# define DUMMY_PROBE0() do {} while (0)
1304 +# define DUMMY_PROBE1(a1) do {} while ((void) (a1), 0)
1305 +# define DUMMY_PROBE2(a1, a2) do {} while ((void) (a1), \
1306 + (void) (a2), 0)
1307 +# define DUMMY_PROBE3(a1, a2, a3) do {} while ((void) (a1), \
1308 + (void) (a2), \
1309 + (void) (a3), 0)
1310 +# define DUMMY_PROBE4(a1, a2, a3, a4) do {} while ((void) (a1), \
1311 + (void) (a2), \
1312 + (void) (a3), \
1313 + (void) (a4), 0)
1314 +# define DUMMY_PROBE5(a1, a2, a3, a4, a5) \
1315 + do {} while ((void) (a1), \
1316 + (void) (a2), \
1317 + (void) (a3), \
1318 + (void) (a4), \
1319 + (void) (a5), 0)
1320 +# define DUMMY_PROBE6(a1, a2, a3, a4, a5, a6) \
1321 + do {} while ((void) (a1), \
1322 + (void) (a2), \
1323 + (void) (a3), \
1324 + (void) (a4), \
1325 + (void) (a5), \
1326 + (void) (a6), 0)
1327 +# define DUMMY_PROBE7(a1, a2, a3, a4, a5, a6, a7) \
1328 + do {} while ((void) (a1), \
1329 + (void) (a2), \
1330 + (void) (a3), \
1331 + (void) (a4), \
1332 + (void) (a5), \
1333 + (void) (a6), \
1334 + (void) (a7), 0)
1335 +# define DUMMY_PROBE8(a1, a2, a3, a4, a5, a6, a7, a8) \
1336 + do {} while ((void) (a1), \
1337 + (void) (a2), \
1338 + (void) (a3), \
1339 + (void) (a4), \
1340 + (void) (a5), \
1341 + (void) (a6), \
1342 + (void) (a7), \
1343 + (void) (a8), 0)
1344 +# define DUMMY_PROBE9(a1, a2, a3, a4, a5, a6, a7, a8, a9) \
1345 + do {} while ((void) (a1), \
1346 + (void) (a2), \
1347 + (void) (a3), \
1348 + (void) (a4), \
1349 + (void) (a5), \
1350 + (void) (a6), \
1351 + (void) (a7), \
1352 + (void) (a8), \
1353 + (void) (a9), 0)
1354 +# define DUMMY_PROBE10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
1355 + do {} while ((void) (a1), \
1356 + (void) (a2), \
1357 + (void) (a3), \
1358 + (void) (a4), \
1359 + (void) (a5), \
1360 + (void) (a6), \
1361 + (void) (a7), \
1362 + (void) (a8), \
1363 + (void) (a9), \
1364 + (void) (a10), 0)
1365 +
1366 +#endif /* USE_STAP_PROBE. */
1367 +
1368 +#endif /* stap-probe.h */
1369 --- glibc-2.14/include/sys/resource.h
1370 +++ glibc-2.14-2/include/sys/resource.h
1371 @@ -13,4 +13,5 @@ extern int __getrusage (enum __rusage_who __who, struct rusage *__usage)
1372
1373 extern int __setrlimit (enum __rlimit_resource __resource,
1374 const struct rlimit *__rlimits);
1375 +libc_hidden_proto (__getrlimit)
1376 #endif
1377 --- glibc-2.14/inet/Makefile
1378 +++ glibc-2.14-2/inet/Makefile
1379 @@ -57,6 +57,8 @@ tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
1380
1381 include ../Rules
1382
1383 +CFLAGS-tst-inet6_rth.c += -fno-strict-aliasing
1384 +
1385 ifeq ($(have-thread-library),yes)
1386
1387 CFLAGS-gethstbyad_r.c = -DUSE_NSCD=1 -fexceptions
1388 --- glibc-2.14/intl/locale.alias
1389 +++ glibc-2.14-2/intl/locale.alias
1390 @@ -57,8 +57,6 @@ korean ko_KR.eucKR
1391 korean.euc ko_KR.eucKR
1392 ko_KR ko_KR.eucKR
1393 lithuanian lt_LT.ISO-8859-13
1394 -no_NO nb_NO.ISO-8859-1
1395 -no_NO.ISO-8859-1 nb_NO.ISO-8859-1
1396 norwegian nb_NO.ISO-8859-1
1397 nynorsk nn_NO.ISO-8859-1
1398 polish pl_PL.ISO-8859-2
1399 --- glibc-2.14/libio/stdio.h
1400 +++ glibc-2.14-2/libio/stdio.h
1401 @@ -165,10 +165,12 @@ typedef _G_fpos64_t fpos64_t;
1402 extern struct _IO_FILE *stdin; /* Standard input stream. */
1403 extern struct _IO_FILE *stdout; /* Standard output stream. */
1404 extern struct _IO_FILE *stderr; /* Standard error output stream. */
1405 +#ifdef __STDC__
1406 /* C89/C99 say they're macros. Make them happy. */
1407 #define stdin stdin
1408 #define stdout stdout
1409 #define stderr stderr
1410 +#endif
1411
1412 __BEGIN_NAMESPACE_STD
1413 /* Remove file FILENAME. */
1414 --- glibc-2.14/locale/iso-4217.def
1415 +++ glibc-2.14-2/locale/iso-4217.def
1416 @@ -8,6 +8,7 @@
1417 *
1418 * !!! The list has to be sorted !!!
1419 */
1420 +DEFINE_INT_CURR("ADP") /* Andorran Peseta -> EUR */
1421 DEFINE_INT_CURR("AED") /* United Arab Emirates Dirham */
1422 DEFINE_INT_CURR("AFN") /* Afghanistan Afgani */
1423 DEFINE_INT_CURR("ALL") /* Albanian Lek */
1424 @@ -15,12 +16,14 @@ DEFINE_INT_CURR("AMD") /* Armenia Dram */
1425 DEFINE_INT_CURR("ANG") /* Netherlands Antilles */
1426 DEFINE_INT_CURR("AOA") /* Angolan Kwanza */
1427 DEFINE_INT_CURR("ARS") /* Argentine Peso */
1428 +DEFINE_INT_CURR("ATS") /* Austrian Schilling -> EUR */
1429 DEFINE_INT_CURR("AUD") /* Australian Dollar */
1430 DEFINE_INT_CURR("AWG") /* Aruba Guilder */
1431 DEFINE_INT_CURR("AZM") /* Azerbaijan Manat */
1432 DEFINE_INT_CURR("BAM") /* Bosnian and Herzegovina Convertible Mark */
1433 DEFINE_INT_CURR("BBD") /* Barbados Dollar */
1434 DEFINE_INT_CURR("BDT") /* Bangladesh Taka */
1435 +DEFINE_INT_CURR("BEF") /* Belgian Franc -> EUR */
1436 DEFINE_INT_CURR("BGN") /* Bulgarian Lev */
1437 DEFINE_INT_CURR("BHD") /* Bahraini Dinar */
1438 DEFINE_INT_CURR("BIF") /* Burundi Franc */
1439 @@ -44,6 +47,7 @@ DEFINE_INT_CURR("CUP") /* Cuban Peso */
1440 DEFINE_INT_CURR("CVE") /* Cape Verde Escudo */
1441 DEFINE_INT_CURR("CYP") /* Cypriot Pound */
1442 DEFINE_INT_CURR("CZK") /* Czech Koruna */
1443 +DEFINE_INT_CURR("DEM") /* German Mark -> EUR */
1444 DEFINE_INT_CURR("DJF") /* Djibouti Franc */
1445 DEFINE_INT_CURR("DKK") /* Danish Krone (Faroe Islands, Greenland) */
1446 DEFINE_INT_CURR("DOP") /* Dominican Republic */
1447 @@ -51,16 +55,20 @@ DEFINE_INT_CURR("DZD") /* Algerian Dinar */
1448 DEFINE_INT_CURR("EEK") /* Estonian Kroon */
1449 DEFINE_INT_CURR("EGP") /* Egyptian Pound */
1450 DEFINE_INT_CURR("ERN") /* Eritrean Nakfa */
1451 +DEFINE_INT_CURR("ESP") /* Spanish Peseta -> EUR */
1452 DEFINE_INT_CURR("ETB") /* Ethiopian Birr */
1453 DEFINE_INT_CURR("EUR") /* European Union Euro */
1454 +DEFINE_INT_CURR("FIM") /* Finnish Markka -> EUR */
1455 DEFINE_INT_CURR("FJD") /* Fiji Dollar */
1456 DEFINE_INT_CURR("FKP") /* Falkland Islands Pound (Malvinas) */
1457 +DEFINE_INT_CURR("FRF") /* French Franc -> EUR */
1458 DEFINE_INT_CURR("GBP") /* British Pound */
1459 DEFINE_INT_CURR("GEL") /* Georgia Lari */
1460 DEFINE_INT_CURR("GHC") /* Ghana Cedi */
1461 DEFINE_INT_CURR("GIP") /* Gibraltar Pound */
1462 DEFINE_INT_CURR("GMD") /* Gambian Dalasi */
1463 DEFINE_INT_CURR("GNF") /* Guinea Franc */
1464 +DEFINE_INT_CURR("GRD") /* Greek Drachma -> EUR */
1465 DEFINE_INT_CURR("GTQ") /* Guatemala Quetzal */
1466 DEFINE_INT_CURR("GYD") /* Guyana Dollar */
1467 DEFINE_INT_CURR("HKD") /* Hong Kong Dollar */
1468 @@ -69,12 +77,14 @@ DEFINE_INT_CURR("HRK") /* Croatia Kuna */
1469 DEFINE_INT_CURR("HTG") /* Haiti Gourde */
1470 DEFINE_INT_CURR("HUF") /* Hungarian Forint */
1471 DEFINE_INT_CURR("IDR") /* Indonesia Rupiah */
1472 +DEFINE_INT_CURR("IEP") /* Irish Pound -> EUR */
1473 DEFINE_INT_CURR("ILS") /* Israeli Shekel */
1474 DEFINE_INT_CURR("IMP") /* Isle of Man Pounds */
1475 DEFINE_INT_CURR("INR") /* Indian Rupee (Bhutan) */
1476 DEFINE_INT_CURR("IQD") /* Iraqi Dinar */
1477 DEFINE_INT_CURR("IRR") /* Iranian Rial */
1478 DEFINE_INT_CURR("ISK") /* Iceland Krona */
1479 +DEFINE_INT_CURR("ITL") /* Italian Lira -> EUR */
1480 DEFINE_INT_CURR("JEP") /* Jersey Pound */
1481 DEFINE_INT_CURR("JMD") /* Jamaican Dollar */
1482 DEFINE_INT_CURR("JOD") /* Jordanian Dinar */
1483 @@ -94,6 +104,7 @@ DEFINE_INT_CURR("LKR") /* Sri Lankan Rupee */
1484 DEFINE_INT_CURR("LRD") /* Liberian Dollar */
1485 DEFINE_INT_CURR("LSL") /* Lesotho Maloti */
1486 DEFINE_INT_CURR("LTL") /* Lithuanian Litas */
1487 +DEFINE_INT_CURR("LUF") /* Luxembourg Franc -> EUR */
1488 DEFINE_INT_CURR("LVL") /* Latvia Lat */
1489 DEFINE_INT_CURR("LYD") /* Libyan Arab Jamahiriya Dinar */
1490 DEFINE_INT_CURR("MAD") /* Moroccan Dirham */
1491 @@ -114,6 +125,7 @@ DEFINE_INT_CURR("MZM") /* Mozambique Metical */
1492 DEFINE_INT_CURR("NAD") /* Namibia Dollar */
1493 DEFINE_INT_CURR("NGN") /* Nigeria Naira */
1494 DEFINE_INT_CURR("NIO") /* Nicaragua Cordoba Oro */
1495 +DEFINE_INT_CURR("NLG") /* Netherlands Guilder -> EUR */
1496 DEFINE_INT_CURR("NOK") /* Norwegian Krone */
1497 DEFINE_INT_CURR("NPR") /* Nepalese Rupee */
1498 DEFINE_INT_CURR("NZD") /* New Zealand Dollar */
1499 @@ -124,6 +136,7 @@ DEFINE_INT_CURR("PGK") /* Papau New Guinea Kina */
1500 DEFINE_INT_CURR("PHP") /* Philippines Peso */
1501 DEFINE_INT_CURR("PKR") /* Pakistan Rupee */
1502 DEFINE_INT_CURR("PLN") /* Polish Zloty */
1503 +DEFINE_INT_CURR("PTE") /* Portugese Escudo -> EUR */
1504 DEFINE_INT_CURR("PYG") /* Paraguay Guarani */
1505 DEFINE_INT_CURR("QAR") /* Qatar Rial */
1506 DEFINE_INT_CURR("ROL") /* Romanian Leu */
1507 --- glibc-2.14/locale/programs/locarchive.c
1508 +++ glibc-2.14-2/locale/programs/locarchive.c
1509 @@ -134,7 +134,7 @@ create_archive (const char *archivefname, struct locarhandle *ah)
1510 size_t reserved = RESERVE_MMAP_SIZE;
1511 int xflags = 0;
1512 if (total < reserved
1513 - && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
1514 + && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
1515 -1, 0)) != MAP_FAILED))
1516 xflags = MAP_FIXED;
1517 else
1518 @@ -241,9 +241,9 @@ oldlocrecentcmp (const void *a, const void *b)
1519 /* forward decls for below */
1520 static uint32_t add_locale (struct locarhandle *ah, const char *name,
1521 locale_data_t data, bool replace);
1522 -static void add_alias (struct locarhandle *ah, const char *alias,
1523 - bool replace, const char *oldname,
1524 - uint32_t *locrec_offset_p);
1525 +void add_alias (struct locarhandle *ah, const char *alias,
1526 + bool replace, const char *oldname,
1527 + uint32_t *locrec_offset_p);
1528
1529
1530 static bool
1531 @@ -396,7 +396,7 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
1532 size_t reserved = RESERVE_MMAP_SIZE;
1533 int xflags = 0;
1534 if (total < reserved
1535 - && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
1536 + && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
1537 -1, 0)) != MAP_FAILED))
1538 xflags = MAP_FIXED;
1539 else
1540 @@ -614,7 +614,7 @@ open_archive (struct locarhandle *ah, bool readonly)
1541 int xflags = 0;
1542 void *p;
1543 if (st.st_size < reserved
1544 - && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
1545 + && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
1546 -1, 0)) != MAP_FAILED))
1547 xflags = MAP_FIXED;
1548 else
1549 @@ -649,7 +649,7 @@ close_archive (struct locarhandle *ah)
1550 #include "../../intl/explodename.c"
1551 #include "../../intl/l10nflist.c"
1552
1553 -static struct namehashent *
1554 +struct namehashent *
1555 insert_name (struct locarhandle *ah,
1556 const char *name, size_t name_len, bool replace)
1557 {
1558 @@ -707,7 +707,7 @@ insert_name (struct locarhandle *ah,
1559 return &namehashtab[idx];
1560 }
1561
1562 -static void
1563 +void
1564 add_alias (struct locarhandle *ah, const char *alias, bool replace,
1565 const char *oldname, uint32_t *locrec_offset_p)
1566 {
1567 --- glibc-2.14/localedata/Makefile
1568 +++ glibc-2.14-2/localedata/Makefile
1569 @@ -227,6 +227,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-locales-dir
1570 echo -n '...'; \
1571 input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
1572 $(LOCALEDEF) --alias-file=../intl/locale.alias \
1573 + --no-archive \
1574 -i locales/$$input -c -f charmaps/$$charset \
1575 $(addprefix --prefix=,$(install_root)) $$locale; \
1576 echo ' done'; \
1577 --- glibc-2.14/localedata/SUPPORTED
1578 +++ glibc-2.14-2/localedata/SUPPORTED
1579 @@ -86,6 +86,7 @@ cy_GB.UTF-8/UTF-8 \
1580 cy_GB/ISO-8859-14 \
1581 da_DK.UTF-8/UTF-8 \
1582 da_DK/ISO-8859-1 \
1583 +da_DK.ISO-8859-15/ISO-8859-15 \
1584 de_AT.UTF-8/UTF-8 \
1585 de_AT/ISO-8859-1 \
1586 de_AT@euro/ISO-8859-15 \
1587 @@ -117,6 +118,7 @@ en_DK.UTF-8/UTF-8 \
1588 en_DK/ISO-8859-1 \
1589 en_GB.UTF-8/UTF-8 \
1590 en_GB/ISO-8859-1 \
1591 +en_GB.ISO-8859-15/ISO-8859-15 \
1592 en_HK.UTF-8/UTF-8 \
1593 en_HK/ISO-8859-1 \
1594 en_IE.UTF-8/UTF-8 \
1595 @@ -132,6 +134,7 @@ en_SG.UTF-8/UTF-8 \
1596 en_SG/ISO-8859-1 \
1597 en_US.UTF-8/UTF-8 \
1598 en_US/ISO-8859-1 \
1599 +en_US.ISO-8859-15/ISO-8859-15 \
1600 en_ZA.UTF-8/UTF-8 \
1601 en_ZA/ISO-8859-1 \
1602 en_ZM/UTF-8 \
1603 @@ -313,6 +316,8 @@ nl_NL/ISO-8859-1 \
1604 nl_NL@euro/ISO-8859-15 \
1605 nn_NO.UTF-8/UTF-8 \
1606 nn_NO/ISO-8859-1 \
1607 +no_NO.UTF-8/UTF-8 \
1608 +no_NO/ISO-8859-1 \
1609 nr_ZA/UTF-8 \
1610 nso_ZA/UTF-8 \
1611 oc_FR.UTF-8/UTF-8 \
1612 @@ -374,6 +379,7 @@ sv_FI/ISO-8859-1 \
1613 sv_FI@euro/ISO-8859-15 \
1614 sv_SE.UTF-8/UTF-8 \
1615 sv_SE/ISO-8859-1 \
1616 +sv_SE.ISO-8859-15/ISO-8859-15 \
1617 sw_KE/UTF-8 \
1618 sw_TZ/UTF-8 \
1619 ta_IN/UTF-8 \
1620 --- glibc-2.14/localedata/locales/cy_GB
1621 +++ glibc-2.14-2/localedata/locales/cy_GB
1622 @@ -248,8 +248,11 @@ mon "<U0049><U006F><U006E><U0061><U0077><U0072>";/
1623 d_t_fmt "<U0044><U0079><U0064><U0064><U0020><U0025><U0041><U0020><U0025><U0064><U0020><U006d><U0069><U0073><U0020><U0025><U0042><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
1624 d_fmt "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0079>"
1625 t_fmt "<U0025><U0054>"
1626 -am_pm "";""
1627 -t_fmt_ampm ""
1628 +am_pm "<U0041><U004D>";"<U0050><U004D>"
1629 +t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
1630 +date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
1631 +<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
1632 +<U0025><U005A><U0020><U0025><U0059>"
1633 END LC_TIME
1634
1635 LC_MESSAGES
1636 --- glibc-2.14/localedata/locales/en_GB
1637 +++ glibc-2.14-2/localedata/locales/en_GB
1638 @@ -116,8 +116,8 @@ mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
1639 d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
1640 d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
1641 t_fmt "<U0025><U0054>"
1642 -am_pm "";""
1643 -t_fmt_ampm ""
1644 +am_pm "<U0041><U004D>";"<U0050><U004D>"
1645 +t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
1646 date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
1647 <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
1648 <U0025><U005A><U0020><U0025><U0059>"
1649 --- glibc-2.14/localedata/locales/no_NO
1650 +++ glibc-2.14-2/localedata/locales/no_NO
1651 @@ -0,0 +1,69 @@
1652 +escape_char /
1653 +comment_char %
1654 +
1655 +% Norwegian language locale for Norway
1656 +% Source: Norsk Standardiseringsforbund
1657 +% Address: University Library,
1658 +% Drammensveien 41, N-9242 Oslo, Norge
1659 +% Contact: Kolbjoern Aamboe
1660 +% Tel: +47 - 22859109
1661 +% Fax: +47 - 22434497
1662 +% Email: kolbjorn.aambo@usit.uio.no
1663 +% Language: no
1664 +% Territory: NO
1665 +% Revision: 4.3
1666 +% Date: 1996-10-15
1667 +% Application: general
1668 +% Users: general
1669 +% Repertoiremap: mnemonic.ds
1670 +% Charset: ISO-8859-1
1671 +% Distribution and use is free, also
1672 +% for commercial purposes.
1673 +
1674 +LC_IDENTIFICATION
1675 +copy "nb_NO"
1676 +END LC_IDENTIFICATION
1677 +
1678 +LC_COLLATE
1679 +copy "nb_NO"
1680 +END LC_COLLATE
1681 +
1682 +LC_CTYPE
1683 +copy "nb_NO"
1684 +END LC_CTYPE
1685 +
1686 +LC_MONETARY
1687 +copy "nb_NO"
1688 +END LC_MONETARY
1689 +
1690 +LC_NUMERIC
1691 +copy "nb_NO"
1692 +END LC_NUMERIC
1693 +
1694 +LC_TIME
1695 +copy "nb_NO"
1696 +END LC_TIME
1697 +
1698 +LC_MESSAGES
1699 +copy "nb_NO"
1700 +END LC_MESSAGES
1701 +
1702 +LC_PAPER
1703 +copy "nb_NO"
1704 +END LC_PAPER
1705 +
1706 +LC_TELEPHONE
1707 +copy "nb_NO"
1708 +END LC_TELEPHONE
1709 +
1710 +LC_MEASUREMENT
1711 +copy "nb_NO"
1712 +END LC_MEASUREMENT
1713 +
1714 +LC_NAME
1715 +copy "nb_NO"
1716 +END LC_NAME
1717 +
1718 +LC_ADDRESS
1719 +copy "nb_NO"
1720 +END LC_ADDRESS
1721 --- glibc-2.14/localedata/locales/zh_TW
1722 +++ glibc-2.14-2/localedata/locales/zh_TW
1723 @@ -1,7 +1,7 @@
1724 comment_char %
1725 escape_char /
1726 %
1727 -% Chinese language locale for Taiwan R.O.C.
1728 +% Chinese language locale for Taiwan
1729 % charmap: BIG5-CP950
1730 %
1731 % Original Author:
1732 @@ -17,7 +17,7 @@ escape_char /
1733 % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
1734
1735 LC_IDENTIFICATION
1736 -title "Chinese locale for Taiwan R.O.C."
1737 +title "Chinese locale for Taiwan"
1738 source ""
1739 address ""
1740 contact ""
1741 @@ -25,7 +25,7 @@ email "bug-glibc-locales@gnu.org"
1742 tel ""
1743 fax ""
1744 language "Chinese"
1745 -territory "Taiwan R.O.C."
1746 +territory "Taiwan"
1747 revision "0.2"
1748 date "2000-08-02"
1749 %
1750 --- glibc-2.14/login/programs/pt_chown.c
1751 +++ glibc-2.14-2/login/programs/pt_chown.c
1752 @@ -29,6 +29,7 @@
1753 #include <string.h>
1754 #include <sys/stat.h>
1755 #include <unistd.h>
1756 +#include <fcntl.h>
1757 #ifdef HAVE_LIBCAP
1758 # include <sys/capability.h>
1759 # include <sys/prctl.h>
1760 @@ -143,7 +144,7 @@ main (int argc, char *argv[])
1761 uid_t uid = getuid ();
1762 int remaining;
1763
1764 - if (argc == 1 && euid == 0)
1765 + if (argc == 1 && fcntl (PTY_FILENO, F_GETFD) == 0)
1766 {
1767 #ifdef HAVE_LIBCAP
1768 /* Drop privileges. */
1769 @@ -176,6 +177,13 @@ main (int argc, char *argv[])
1770
1771 /* We aren't going to be using privileges, so drop them right now. */
1772 setuid (uid);
1773 +#ifdef HAVE_LIBCAP
1774 + cap_t caps = cap_init ();
1775 + if (caps == NULL)
1776 + error (1, errno, "cap_init");
1777 + cap_set_proc (caps);
1778 + cap_free (caps);
1779 +#endif
1780
1781 /* Set locale via LC_ALL. */
1782 setlocale (LC_ALL, "");
1783 @@ -195,9 +203,5 @@ main (int argc, char *argv[])
1784 return EXIT_FAILURE;
1785 }
1786
1787 - /* Check if we are properly installed. */
1788 - if (euid != 0)
1789 - error (FAIL_EXEC, 0, gettext ("needs to be installed setuid `root'"));
1790 -
1791 return EXIT_SUCCESS;
1792 }
1793 --- glibc-2.14/malloc/mcheck.c
1794 +++ glibc-2.14-2/malloc/mcheck.c
1795 @@ -25,10 +25,26 @@
1796 # include <mcheck.h>
1797 # include <stdint.h>
1798 # include <stdio.h>
1799 +# include <stdlib.h>
1800 # include <libintl.h>
1801 # include <errno.h>
1802 #endif
1803
1804 +#ifdef _LIBC
1805 +extern __typeof (malloc) __libc_malloc;
1806 +extern __typeof (free) __libc_free;
1807 +extern __typeof (realloc) __libc_realloc;
1808 +libc_hidden_proto (__libc_malloc)
1809 +libc_hidden_proto (__libc_realloc)
1810 +libc_hidden_proto (__libc_free)
1811 +libc_hidden_proto (__libc_memalign)
1812 +#else
1813 +# define __libc_malloc(sz) malloc (sz)
1814 +# define __libc_free(ptr) free (ptr)
1815 +# define __libc_realloc(ptr, sz) realloc (ptr, sz)
1816 +# define __libc_memalign(al, sz) memalign (al, sz)
1817 +#endif
1818 +
1819 /* Old hook values. */
1820 static void (*old_free_hook) (__ptr_t ptr, __const __ptr_t);
1821 static __ptr_t (*old_malloc_hook) (__malloc_size_t size, const __ptr_t);
1822 @@ -199,7 +215,7 @@ freehook (__ptr_t ptr, const __ptr_t caller)
1823 if (old_free_hook != NULL)
1824 (*old_free_hook) (ptr, caller);
1825 else
1826 - free (ptr);
1827 + __libc_free (ptr);
1828 __free_hook = freehook;
1829 }
1830
1831 @@ -222,7 +238,7 @@ mallochook (__malloc_size_t size, const __ptr_t caller)
1832 hdr = (struct hdr *) (*old_malloc_hook) (sizeof (struct hdr) + size + 1,
1833 caller);
1834 else
1835 - hdr = (struct hdr *) malloc (sizeof (struct hdr) + size + 1);
1836 + hdr = (struct hdr *) __libc_malloc (sizeof (struct hdr) + size + 1);
1837 __malloc_hook = mallochook;
1838 if (hdr == NULL)
1839 return NULL;
1840 @@ -259,7 +275,7 @@ memalignhook (__malloc_size_t alignment, __malloc_size_t size,
1841 if (old_memalign_hook != NULL)
1842 block = (*old_memalign_hook) (alignment, slop + size + 1, caller);
1843 else
1844 - block = memalign (alignment, slop + size + 1);
1845 + block = __libc_memalign (alignment, slop + size + 1);
1846 __memalign_hook = memalignhook;
1847 if (block == NULL)
1848 return NULL;
1849 @@ -320,8 +336,8 @@ reallochook (__ptr_t ptr, __malloc_size_t size, const __ptr_t caller)
1850 sizeof (struct hdr) + size + 1,
1851 caller);
1852 else
1853 - hdr = (struct hdr *) realloc ((__ptr_t) hdr,
1854 - sizeof (struct hdr) + size + 1);
1855 + hdr = (struct hdr *) __libc_realloc ((__ptr_t) hdr,
1856 + sizeof (struct hdr) + size + 1);
1857 __free_hook = freehook;
1858 __malloc_hook = mallochook;
1859 __memalign_hook = memalignhook;
1860 @@ -381,8 +397,8 @@ mcheck (func)
1861 if (__malloc_initialized <= 0 && !mcheck_used)
1862 {
1863 /* We call malloc() once here to ensure it is initialized. */
1864 - void *p = malloc (0);
1865 - free (p);
1866 + void *p = __libc_malloc (0);
1867 + __libc_free (p);
1868
1869 old_free_hook = __free_hook;
1870 __free_hook = freehook;
1871 --- glibc-2.14/manual/libc.texinfo
1872 +++ glibc-2.14-2/manual/libc.texinfo
1873 @@ -5,7 +5,7 @@
1874 @c setchapternewpage odd
1875
1876 @comment Tell install-info what to do.
1877 -@dircategory Software libraries
1878 +@dircategory Libraries
1879 @direntry
1880 * Libc: (libc). C library.
1881 @end direntry
1882 --- glibc-2.14/misc/sys/cdefs.h
1883 +++ glibc-2.14-2/misc/sys/cdefs.h
1884 @@ -132,7 +132,10 @@
1885 #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
1886 #define __bos0(ptr) __builtin_object_size (ptr, 0)
1887
1888 -#if __GNUC_PREREQ (4,3)
1889 +#if __GNUC_PREREQ (4,3) \
1890 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1891 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1892 + && __GNUC_RH_RELEASE__ >= 31)
1893 # define __warndecl(name, msg) \
1894 extern void name (void) __attribute__((__warning__ (msg)))
1895 # define __warnattr(msg) __attribute__((__warning__ (msg)))
1896 @@ -291,10 +294,16 @@
1897
1898 /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
1899 inline semantics, unless -fgnu89-inline is used. */
1900 -#if !defined __cplusplus || __GNUC_PREREQ (4,3)
1901 +#if !defined __cplusplus || __GNUC_PREREQ (4,3) \
1902 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1903 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1904 + && __GNUC_RH_RELEASE__ >= 31)
1905 # if defined __GNUC_STDC_INLINE__ || defined __cplusplus
1906 # define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
1907 -# if __GNUC_PREREQ (4,3)
1908 +# if __GNUC_PREREQ (4,3) \
1909 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1910 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1911 + && __GNUC_RH_RELEASE__ >= 31)
1912 # define __extern_always_inline \
1913 extern __always_inline __attribute__ ((__gnu_inline__, __artificial__))
1914 # else
1915 @@ -314,7 +323,10 @@
1916
1917 /* GCC 4.3 and above allow passing all anonymous arguments of an
1918 __extern_always_inline function to some other vararg function. */
1919 -#if __GNUC_PREREQ (4,3)
1920 +#if __GNUC_PREREQ (4,3) \
1921 + || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
1922 + && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
1923 + && __GNUC_RH_RELEASE__ >= 31)
1924 # define __va_arg_pack() __builtin_va_arg_pack ()
1925 # define __va_arg_pack_len() __builtin_va_arg_pack_len ()
1926 #endif
1927 --- glibc-2.14/nis/Makefile
1928 +++ glibc-2.14-2/nis/Makefile
1929 @@ -23,9 +23,9 @@ subdir := nis
1930
1931 aux := nis_hash
1932
1933 +headers := $(wildcard rpcsvc/*.[hx])
1934 distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
1935 - nisplus-parser.h nis_xdr.h nss \
1936 - $(wildcard rpcsvc/*.[hx])
1937 + nisplus-parser.h nis_xdr.h nss
1938
1939 # These are the databases available for the nis (and perhaps later nisplus)
1940 # service. This must be a superset of the services in nss.
1941 @@ -69,6 +69,8 @@ libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
1942
1943 include ../Rules
1944
1945 +CFLAGS-nis_findserv.c += -fno-strict-aliasing
1946 +CFLAGS-ypclnt.c += -fno-strict-aliasing
1947
1948 $(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
1949 $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
1950 --- glibc-2.14/nis/nss
1951 +++ glibc-2.14-2/nis/nss
1952 @@ -25,7 +25,7 @@
1953 # memory with every getXXent() call. Otherwise each getXXent() call
1954 # might result into a network communication with the server to get
1955 # the next entry.
1956 -#SETENT_BATCH_READ=TRUE
1957 +SETENT_BATCH_READ=TRUE
1958 #
1959 # ADJUNCT_AS_SHADOW
1960 # If set to TRUE, the passwd routines in the NIS NSS module will not
1961 --- glibc-2.14/nptl/ChangeLog
1962 +++ glibc-2.14-2/nptl/ChangeLog
1963 @@ -10,6 +10,51 @@
1964 clearing memory.
1965 Patch partly by Robert Rex <robert.rex@exasol.com>.
1966
1967 +2011-02-22 Rayson Ho <rho@redhat.com>
1968 +
1969 + * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1970 + probes for i386.
1971 + * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1972 + * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1973 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1974 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1975 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1976 + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1977 + * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1978 + * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1979 +
1980 +2011-02-09 Rayson Ho <rho@redhat.com>
1981 +
1982 + * DESIGN-systemtap-probes.txt: New file.
1983 + * pthread_cond_broadcast.c: SystemTap probes.
1984 + * pthread_cond_init.c: Likewise.
1985 + * pthread_cond_signal.c: Likewise.
1986 + * pthread_cond_wait.c: Likewise.
1987 + * pthread_cond_destroy.c: Likewise.
1988 + * pthread_create.c: Likewise.
1989 + * pthread_join.c: Likewise.
1990 + * pthread_mutex_destroy.c: Likewise.
1991 + * pthread_mutex_init.c: Likewise.
1992 + * pthread_mutex_lock.c: Likewise.
1993 + * pthread_mutex_timedlock.c: Likewise.
1994 + * pthread_mutex_unlock.c: Likewise.
1995 + * pthread_rwlock_destroy.c: Likewise.
1996 + * pthread_rwlock_rdlock.c: Likewise.
1997 + * pthread_rwlock_unlock.c: Likewise.
1998 + * pthread_rwlock_wrlock.c: Likewise.
1999 + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2000 + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2001 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2002 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2003 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2004 + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2005 + * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2006 + * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2007 +
2008 +2010-07-23 Roland McGrath <roland@redhat.com>
2009 +
2010 + * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
2011 +
2012 2011-01-19 Roland McGrath <roland@redhat.com>
2013
2014 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
2015 @@ -4739,6 +4784,11 @@
2016 Move definition inside libpthread, libc, librt check. Provide
2017 definition for rtld.
2018
2019 +2004-09-02 Jakub Jelinek <jakub@redhat.com>
2020 +
2021 + * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2022 + waiters, awake all waiters on the associated mutex.
2023 +
2024 2004-09-02 Ulrich Drepper <drepper@redhat.com>
2025
2026 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
2027 @@ -6813,6 +6863,11 @@
2028
2029 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
2030
2031 +2003-07-22 Jakub Jelinek <jakub@redhat.com>
2032 +
2033 + * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
2034 + if __need_struct_pthread_size, instead define lll_lock_t.
2035 +
2036 2003-07-25 Jakub Jelinek <jakub@redhat.com>
2037
2038 * tst-cancel17.c (do_test): Check if aio_cancel failed.
2039 --- glibc-2.14/nptl/DESIGN-systemtap-probes.txt
2040 +++ glibc-2.14-2/nptl/DESIGN-systemtap-probes.txt
2041 @@ -0,0 +1,89 @@
2042 +Systemtap is a dynamic tracing/instrumenting tool available on Linux. Probes
2043 +that are not fired at run time have close to zero overhead.
2044 +
2045 +The following probes are available for NPTL:
2046 +
2047 +Thread creation & Join Probes
2048 +=============================
2049 +pthread_create - probe for pthread_create
2050 + arg1 = pointer (pthread_t*) to thread
2051 + arg2 = pointer (pthread_attr_t*) to attr
2052 + arg3 = pointer (void *) to start_routine
2053 + arg4 = arguments to start_routine
2054 +pthread_start - probe for actual thread creation
2055 + arg1 = struct pthread (members include thread ID, process ID)
2056 + arg2 = address of start_routine
2057 + arg3 = pointer to the list of arguments
2058 +pthread_join - probe for pthread_join
2059 + arg1 = thread ID
2060 +pthread_join_ret - probe for pthread_join return
2061 + arg1 = thread ID
2062 + arg2 = return value
2063 +
2064 +Lock-related Probes
2065 +===================
2066 +mutex_init - probe for pthread_mutex_init
2067 + arg1 = address of mutex lock
2068 +mutex_acquired - probe for succ. return of pthread_mutex_lock
2069 + arg1 = address of mutex lock
2070 +mutex_timedlock_acquired - probe for succ. return of pthread_mutex_timedlock
2071 + arg1 = address of mutex lock
2072 +mutex_entry - probe for entry to the pthread_mutex_lock function
2073 + arg1 = address of mutex lock
2074 +mutex_timedlock_entry - probe for entry to the pthread_mutex_timedlock function
2075 + arg1 = address of mutex lock, arg2 = address of timespec
2076 +mutex_release - probe for pthread_mutex_unlock after the successful release of a
2077 + mutex lock
2078 + arg1 = address of mutex lock
2079 +mutex_destroy - probe for pthread_mutex_destroy
2080 + arg1 = address of mutex lock
2081 +
2082 +wrlock_entry - probe for entry to the pthread_rwlock_wrlock function
2083 + arg1 = address of rw lock
2084 +rdlock_entry - probe for entry to the pthread_rwlock_rdlock function
2085 + arg1 = address of rw lock
2086 +
2087 +rwlock_destroy - probe for pthread_rwlock_destroy
2088 + arg1 = address of rw lock
2089 +wrlock_acquire_write - probe for pthread_rwlock_wrlock (after getting the lock)
2090 + arg1 = address of rw lock
2091 +rdlock_acquire_read - probe for pthread_rwlock_rdlock after successfully getting
2092 + the lock
2093 + arg1 = address of rw lock
2094 +rwlock_unlock - probe for pthread_rwlock_unlock
2095 + arg1 = address of rw lock
2096 +
2097 +lll_lock_wait - probe in low-level (assembly language) locking code, only fired
2098 + when futex/FUTEX_WAIT is called (i.e. when trying to acquire a
2099 + contented lock)
2100 + arg1 = pointer to futex
2101 + arg2 = flags passed to the futex system call
2102 +lll_lock_wait_private - probe in low-level (assembly language) locking code,
2103 + only fired when futex/FUTEX_WAIT is called (i.e. when
2104 + trying to acquire a contented lock)
2105 + arg1 = pointer to futex
2106 +
2107 +lll_futex_wake - probe in low-level (assembly language) locking code, only fired
2108 + when futex (FUTEX_WAKE) is called
2109 + arg1 = pointer to futex
2110 + arg2 = number of processes to wake
2111 + arg3 = additional flags
2112 +
2113 +Condition variable Probes
2114 +=========================
2115 +cond_init - probe for pthread_cond_init
2116 + arg1 = condition
2117 + arg2 = attr
2118 +cond_destroy - probe for pthread_cond_destroy
2119 + arg1 = cond
2120 +cond_wait - probe for pthread_cond_wait
2121 + arg1 = condition
2122 + arg2 = mutex lock
2123 +cond_timedwait - probe for pthread_cond_timedwait
2124 + arg1 = condition
2125 + arg2 = mutex lock
2126 + arg3 = timespec
2127 +cond_signal - probe for pthread_cond_signal
2128 + arg1 = condition
2129 +cond_broadcast - probe for pthread_cond_broadcast
2130 + arg1 = condition
2131 --- glibc-2.14/nptl/Makefile
2132 +++ glibc-2.14-2/nptl/Makefile
2133 @@ -342,7 +342,8 @@ endif
2134 extra-objs += $(crti-objs) $(crtn-objs)
2135 omit-deps += crti crtn
2136
2137 -CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
2138 +CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \
2139 + -fno-asynchronous-unwind-tables
2140 endif
2141
2142 CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
2143 @@ -529,15 +530,19 @@ $(addprefix $(objpfx), \
2144 $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
2145 $(objpfx)libpthread_nonshared.a
2146 $(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so
2147 -# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
2148 +# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
2149 # since otherwise libpthread.so comes before libc.so when linking.
2150 $(addprefix $(objpfx), $(tests-reverse)): \
2151 - $(objpfx)../libc.so $(objpfx)libpthread.so \
2152 + $(objpfx)linklibc.so $(objpfx)libpthread.so \
2153 $(objpfx)libpthread_nonshared.a
2154 $(objpfx)../libc.so: $(common-objpfx)libc.so ;
2155 $(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
2156
2157 $(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
2158 +
2159 +$(objpfx)linklibc.so: $(common-objpfx)libc.so
2160 + ln -s ../libc.so $@
2161 +generated += libclink.so
2162 else
2163 $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
2164 endif
2165 --- glibc-2.14/nptl/Versions
2166 +++ glibc-2.14-2/nptl/Versions
2167 @@ -30,6 +30,7 @@ libc {
2168 __libc_alloca_cutoff;
2169 # Internal libc interface to libpthread
2170 __libc_dl_error_tsd;
2171 + __getrlimit;
2172 }
2173 }
2174
2175 --- glibc-2.14/nptl/allocatestack.c
2176 +++ glibc-2.14-2/nptl/allocatestack.c
2177 @@ -999,7 +999,16 @@ setxid_mark_thread (struct xid_command *cmdp, struct pthread *t)
2178
2179 /* If the thread is exiting right now, ignore it. */
2180 if ((ch & EXITING_BITMASK) != 0)
2181 - return;
2182 + {
2183 + /* Release the futex if there is no other setxid in
2184 + progress. */
2185 + if ((ch & SETXID_BITMASK) == 0)
2186 + {
2187 + t->setxid_futex = 1;
2188 + lll_futex_wake (&t->setxid_futex, 1, LLL_PRIVATE);
2189 + }
2190 + return;
2191 + }
2192 }
2193 while (atomic_compare_and_exchange_bool_acq (&t->cancelhandling,
2194 ch | SETXID_BITMASK, ch));
2195 --- glibc-2.14/nptl/nptl-init.c
2196 +++ glibc-2.14-2/nptl/nptl-init.c
2197 @@ -396,7 +396,7 @@ __pthread_initialize_minimal_internal (void)
2198 /* Determine the default allowed stack size. This is the size used
2199 in case the user does not specify one. */
2200 struct rlimit limit;
2201 - if (getrlimit (RLIMIT_STACK, &limit) != 0
2202 + if (__getrlimit (RLIMIT_STACK, &limit) != 0
2203 || limit.rlim_cur == RLIM_INFINITY)
2204 /* The system limit is not usable. Use an architecture-specific
2205 default. */
2206 --- glibc-2.14/nptl/pthread_cond_broadcast.c
2207 +++ glibc-2.14-2/nptl/pthread_cond_broadcast.c
2208 @@ -23,6 +23,7 @@
2209 #include <lowlevellock.h>
2210 #include <pthread.h>
2211 #include <pthreadP.h>
2212 +#include <stap-probe.h>
2213
2214 #include <shlib-compat.h>
2215 #include <kernel-features.h>
2216 @@ -32,6 +33,8 @@ int
2217 __pthread_cond_broadcast (cond)
2218 pthread_cond_t *cond;
2219 {
2220 + LIBC_PROBE (cond_broadcast, 1, cond);
2221 +
2222 int pshared = (cond->__data.__mutex == (void *) ~0l)
2223 ? LLL_SHARED : LLL_PRIVATE;
2224 /* Make sure we are alone. */
2225 --- glibc-2.14/nptl/pthread_cond_destroy.c
2226 +++ glibc-2.14-2/nptl/pthread_cond_destroy.c
2227 @@ -20,6 +20,7 @@
2228 #include <errno.h>
2229 #include <shlib-compat.h>
2230 #include "pthreadP.h"
2231 +#include <stap-probe.h>
2232
2233
2234 int
2235 @@ -29,6 +30,8 @@ __pthread_cond_destroy (cond)
2236 int pshared = (cond->__data.__mutex == (void *) ~0l)
2237 ? LLL_SHARED : LLL_PRIVATE;
2238
2239 + LIBC_PROBE (cond_destroy, 1, cond);
2240 +
2241 /* Make sure we are alone. */
2242 lll_lock (cond->__data.__lock, pshared);
2243
2244 --- glibc-2.14/nptl/pthread_cond_init.c
2245 +++ glibc-2.14-2/nptl/pthread_cond_init.c
2246 @@ -20,6 +20,7 @@
2247
2248 #include <shlib-compat.h>
2249 #include "pthreadP.h"
2250 +#include <stap-probe.h>
2251
2252
2253 int
2254 @@ -42,6 +43,8 @@ __pthread_cond_init (cond, cond_attr)
2255 ? NULL : (void *) ~0l);
2256 cond->__data.__broadcast_seq = 0;
2257
2258 + LIBC_PROBE (cond_init, 2, cond, cond_attr);
2259 +
2260 return 0;
2261 }
2262 versioned_symbol (libpthread, __pthread_cond_init,
2263 --- glibc-2.14/nptl/pthread_cond_signal.c
2264 +++ glibc-2.14-2/nptl/pthread_cond_signal.c
2265 @@ -26,6 +26,7 @@
2266
2267 #include <shlib-compat.h>
2268 #include <kernel-features.h>
2269 +#include <stap-probe.h>
2270
2271
2272 int
2273 @@ -35,6 +36,8 @@ __pthread_cond_signal (cond)
2274 int pshared = (cond->__data.__mutex == (void *) ~0l)
2275 ? LLL_SHARED : LLL_PRIVATE;
2276
2277 + LIBC_PROBE (cond_signal, 1, cond);
2278 +
2279 /* Make sure we are alone. */
2280 lll_lock (cond->__data.__lock, pshared);
2281
2282 --- glibc-2.14/nptl/pthread_cond_wait.c
2283 +++ glibc-2.14-2/nptl/pthread_cond_wait.c
2284 @@ -25,6 +25,7 @@
2285 #include <pthreadP.h>
2286
2287 #include <shlib-compat.h>
2288 +#include <stap-probe.h>
2289
2290
2291 struct _condvar_cleanup_buffer
2292 @@ -101,6 +102,8 @@ __pthread_cond_wait (cond, mutex)
2293 int pshared = (cond->__data.__mutex == (void *) ~0l)
2294 ? LLL_SHARED : LLL_PRIVATE;
2295
2296 + LIBC_PROBE (cond_wait, 2, cond, mutex);
2297 +
2298 /* Make sure we are alone. */
2299 lll_lock (cond->__data.__lock, pshared);
2300
2301 --- glibc-2.14/nptl/pthread_create.c
2302 +++ glibc-2.14-2/nptl/pthread_create.c
2303 @@ -31,6 +31,8 @@
2304
2305 #include <shlib-compat.h>
2306
2307 +#include <stap-probe.h>
2308 +
2309
2310 /* Local function to start thread and handle cleanup. */
2311 static int start_thread (void *arg);
2312 @@ -296,6 +298,8 @@ start_thread (void *arg)
2313 CANCEL_RESET (oldtype);
2314 }
2315
2316 + LIBC_PROBE (pthread_start, 3, (pthread_t) pd, pd->start_routine, pd->arg);
2317 +
2318 /* Run the code the user provided. */
2319 #ifdef CALL_THREAD_FCT
2320 THREAD_SETMEM (pd, result, CALL_THREAD_FCT (pd));
2321 @@ -552,6 +556,8 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg)
2322 /* Pass the descriptor to the caller. */
2323 *newthread = (pthread_t) pd;
2324
2325 + LIBC_PROBE (pthread_create, 4, newthread, attr, start_routine, arg);
2326 +
2327 /* Start the thread. */
2328 return create_thread (pd, iattr, STACK_VARIABLES_ARGS);
2329 }
2330 --- glibc-2.14/nptl/pthread_join.c
2331 +++ glibc-2.14-2/nptl/pthread_join.c
2332 @@ -23,6 +23,8 @@
2333 #include <atomic.h>
2334 #include "pthreadP.h"
2335
2336 +#include <stap-probe.h>
2337 +
2338
2339 static void
2340 cleanup (void *arg)
2341 @@ -55,6 +57,8 @@ pthread_join (threadid, thread_return)
2342 struct pthread *self = THREAD_SELF;
2343 int result = 0;
2344
2345 + LIBC_PROBE (pthread_join, 1, threadid);
2346 +
2347 /* During the wait we change to asynchronous cancellation. If we
2348 are canceled the thread we are waiting for must be marked as
2349 un-wait-ed for again. */
2350 @@ -110,5 +114,7 @@ pthread_join (threadid, thread_return)
2351 __free_tcb (pd);
2352 }
2353
2354 + LIBC_PROBE (pthread_join_ret, 3, threadid, result, pd->result);
2355 +
2356 return result;
2357 }
2358 --- glibc-2.14/nptl/pthread_mutex_destroy.c
2359 +++ glibc-2.14-2/nptl/pthread_mutex_destroy.c
2360 @@ -20,11 +20,15 @@
2361 #include <errno.h>
2362 #include "pthreadP.h"
2363
2364 +#include <stap-probe.h>
2365 +
2366
2367 int
2368 __pthread_mutex_destroy (mutex)
2369 pthread_mutex_t *mutex;
2370 {
2371 + LIBC_PROBE (mutex_destroy, 1, mutex);
2372 +
2373 if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0
2374 && mutex->__data.__nusers != 0)
2375 return EBUSY;
2376 --- glibc-2.14/nptl/pthread_mutex_init.c
2377 +++ glibc-2.14-2/nptl/pthread_mutex_init.c
2378 @@ -24,6 +24,8 @@
2379 #include <kernel-features.h>
2380 #include "pthreadP.h"
2381
2382 +#include <stap-probe.h>
2383 +
2384 static const struct pthread_mutexattr default_attr =
2385 {
2386 /* Default is a normal mutex, not shared between processes. */
2387 @@ -135,6 +137,8 @@ __pthread_mutex_init (mutex, mutexattr)
2388 // mutex->__spins = 0; already done by memset
2389 // mutex->__next = NULL; already done by memset
2390
2391 + LIBC_PROBE (mutex_init, 1, mutex);
2392 +
2393 return 0;
2394 }
2395 strong_alias (__pthread_mutex_init, pthread_mutex_init)
2396 --- glibc-2.14/nptl/pthread_mutex_lock.c
2397 +++ glibc-2.14-2/nptl/pthread_mutex_lock.c
2398 @@ -24,6 +24,7 @@
2399 #include <not-cancel.h>
2400 #include "pthreadP.h"
2401 #include <lowlevellock.h>
2402 +#include <stap-probe.h>
2403
2404
2405 #ifndef LLL_MUTEX_LOCK
2406 @@ -48,6 +49,9 @@ __pthread_mutex_lock (mutex)
2407 assert (sizeof (mutex->__size) >= sizeof (mutex->__data));
2408
2409 unsigned int type = PTHREAD_MUTEX_TYPE (mutex);
2410 +
2411 + LIBC_PROBE (mutex_entry, 1, mutex);
2412 +
2413 if (__builtin_expect (type & ~PTHREAD_MUTEX_KIND_MASK_NP, 0))
2414 return __pthread_mutex_lock_full (mutex);
2415
2416 @@ -127,6 +131,8 @@ __pthread_mutex_lock (mutex)
2417 ++mutex->__data.__nusers;
2418 #endif
2419
2420 + LIBC_PROBE (mutex_acquired, 1, mutex);
2421 +
2422 return 0;
2423 }
2424
2425 @@ -467,6 +473,8 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex)
2426 ++mutex->__data.__nusers;
2427 #endif
2428
2429 + LIBC_PROBE (mutex_acquired, 1, mutex);
2430 +
2431 return 0;
2432 }
2433 #ifndef __pthread_mutex_lock
2434 --- glibc-2.14/nptl/pthread_mutex_timedlock.c
2435 +++ glibc-2.14-2/nptl/pthread_mutex_timedlock.c
2436 @@ -24,6 +24,8 @@
2437 #include <lowlevellock.h>
2438 #include <not-cancel.h>
2439
2440 +#include <stap-probe.h>
2441 +
2442
2443 int
2444 pthread_mutex_timedlock (mutex, abstime)
2445 @@ -34,6 +36,8 @@ pthread_mutex_timedlock (mutex, abstime)
2446 pid_t id = THREAD_GETMEM (THREAD_SELF, tid);
2447 int result = 0;
2448
2449 + LIBC_PROBE (mutex_timedlock_entry, 2, mutex, abstime);
2450 +
2451 /* We must not check ABSTIME here. If the thread does not block
2452 abstime must not be checked for a valid value. */
2453
2454 @@ -172,6 +176,8 @@ pthread_mutex_timedlock (mutex, abstime)
2455
2456 ++mutex->__data.__count;
2457
2458 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2459 +
2460 return 0;
2461 }
2462 }
2463 @@ -242,6 +248,8 @@ pthread_mutex_timedlock (mutex, abstime)
2464
2465 ++mutex->__data.__count;
2466
2467 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2468 +
2469 return 0;
2470 }
2471 }
2472 @@ -377,6 +385,8 @@ pthread_mutex_timedlock (mutex, abstime)
2473
2474 ++mutex->__data.__count;
2475
2476 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2477 +
2478 return 0;
2479 }
2480 }
2481 @@ -477,6 +487,8 @@ pthread_mutex_timedlock (mutex, abstime)
2482 /* Record the ownership. */
2483 mutex->__data.__owner = id;
2484 ++mutex->__data.__nusers;
2485 +
2486 + LIBC_PROBE (mutex_timedlock_acquired, 1, mutex);
2487 }
2488
2489 out:
2490 --- glibc-2.14/nptl/pthread_mutex_unlock.c
2491 +++ glibc-2.14-2/nptl/pthread_mutex_unlock.c
2492 @@ -22,6 +22,7 @@
2493 #include <stdlib.h>
2494 #include "pthreadP.h"
2495 #include <lowlevellock.h>
2496 +#include <stap-probe.h>
2497
2498 static int
2499 internal_function
2500 @@ -50,6 +51,9 @@ __pthread_mutex_unlock_usercnt (mutex, decr)
2501
2502 /* Unlock. */
2503 lll_unlock (mutex->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex));
2504 +
2505 + LIBC_PROBE (mutex_release, 1, mutex);
2506 +
2507 return 0;
2508 }
2509 else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1))
2510 @@ -272,6 +276,9 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
2511 PTHREAD_MUTEX_PSHARED (mutex));
2512
2513 int oldprio = newval >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT;
2514 +
2515 + LIBC_PROBE (mutex_release, 1, mutex);
2516 +
2517 return __pthread_tpp_change_priority (oldprio, -1);
2518
2519 default:
2520 @@ -279,6 +286,7 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
2521 return EINVAL;
2522 }
2523
2524 + LIBC_PROBE (mutex_release, 1, mutex);
2525 return 0;
2526 }
2527
2528 --- glibc-2.14/nptl/pthread_rwlock_destroy.c
2529 +++ glibc-2.14-2/nptl/pthread_rwlock_destroy.c
2530 @@ -18,12 +18,15 @@
2531 02111-1307 USA. */
2532
2533 #include "pthreadP.h"
2534 +#include <stap-probe.h>
2535
2536
2537 int
2538 __pthread_rwlock_destroy (rwlock)
2539 pthread_rwlock_t *rwlock;
2540 {
2541 + LIBC_PROBE (rwlock_destroy, 1, rwlock);
2542 +
2543 /* Nothing to be done. For now. */
2544 return 0;
2545 }
2546 --- glibc-2.14/nptl/pthread_rwlock_rdlock.c
2547 +++ glibc-2.14-2/nptl/pthread_rwlock_rdlock.c
2548 @@ -22,6 +22,7 @@
2549 #include <lowlevellock.h>
2550 #include <pthread.h>
2551 #include <pthreadP.h>
2552 +#include <stap-probe.h>
2553
2554
2555 /* Acquire read lock for RWLOCK. */
2556 @@ -31,6 +32,8 @@ __pthread_rwlock_rdlock (rwlock)
2557 {
2558 int result = 0;
2559
2560 + LIBC_PROBE (rdlock_entry, 1, rwlock);
2561 +
2562 /* Make sure we are alone. */
2563 lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
2564
2565 @@ -49,6 +52,8 @@ __pthread_rwlock_rdlock (rwlock)
2566 --rwlock->__data.__nr_readers;
2567 result = EAGAIN;
2568 }
2569 + else
2570 + LIBC_PROBE (rdlock_acquire_read, 1, rwlock);
2571
2572 break;
2573 }
2574 --- glibc-2.14/nptl/pthread_rwlock_unlock.c
2575 +++ glibc-2.14-2/nptl/pthread_rwlock_unlock.c
2576 @@ -22,11 +22,14 @@
2577 #include <lowlevellock.h>
2578 #include <pthread.h>
2579 #include <pthreadP.h>
2580 +#include <stap-probe.h>
2581
2582 /* Unlock RWLOCK. */
2583 int
2584 __pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
2585 {
2586 + LIBC_PROBE (rwlock_unlock, 1, rwlock);
2587 +
2588 lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
2589 if (rwlock->__data.__writer)
2590 rwlock->__data.__writer = 0;
2591 --- glibc-2.14/nptl/pthread_rwlock_wrlock.c
2592 +++ glibc-2.14-2/nptl/pthread_rwlock_wrlock.c
2593 @@ -22,6 +22,7 @@
2594 #include <lowlevellock.h>
2595 #include <pthread.h>
2596 #include <pthreadP.h>
2597 +#include <stap-probe.h>
2598
2599
2600 /* Acquire write lock for RWLOCK. */
2601 @@ -31,6 +32,8 @@ __pthread_rwlock_wrlock (rwlock)
2602 {
2603 int result = 0;
2604
2605 + LIBC_PROBE (wrlock_entry, 1, rwlock);
2606 +
2607 /* Make sure we are alone. */
2608 lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
2609
2610 @@ -41,6 +44,8 @@ __pthread_rwlock_wrlock (rwlock)
2611 {
2612 /* Mark self as writer. */
2613 rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);
2614 +
2615 + LIBC_PROBE (wrlock_acquire_write, 1, rwlock);
2616 break;
2617 }
2618
2619 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
2620 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
2621 @@ -189,4 +189,7 @@
2622 /* Typed memory objects are not available. */
2623 #define _POSIX_TYPED_MEMORY_OBJECTS -1
2624
2625 +/* Streams are not available. */
2626 +#define _XOPEN_STREAMS -1
2627 +
2628 #endif /* bits/posix_opt.h */
2629 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/Versions
2630 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/Versions
2631 @@ -0,0 +1,6 @@
2632 +libc {
2633 + GLIBC_PRIVATE {
2634 + # Internal libc interface to libpthread
2635 + __uname;
2636 + }
2637 +}
2638 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2639 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2640 @@ -22,6 +22,8 @@
2641 #include <kernel-features.h>
2642 #include <lowlevellock.h>
2643
2644 +#include <stap-probe.h>
2645 +
2646 .text
2647
2648 #ifdef __ASSUME_PRIVATE_FUTEX
2649 @@ -91,7 +93,8 @@ __lll_lock_wait_private:
2650 cmpl %edx, %eax /* NB: %edx == 2 */
2651 jne 2f
2652
2653 -1: movl $SYS_futex, %eax
2654 +1: LIBC_PROBE (lll_lock_wait_private, 1, %ebx)
2655 + movl $SYS_futex, %eax
2656 ENTER_KERNEL
2657
2658 2: movl %edx, %eax
2659 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2660 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2661 @@ -24,6 +24,7 @@
2662 #include <kernel-features.h>
2663 #include <pthread-pi-defines.h>
2664 #include <pthread-errnos.h>
2665 +#include <stap-probe.h>
2666
2667 .text
2668
2669 @@ -49,6 +50,8 @@ __pthread_cond_broadcast:
2670
2671 movl 20(%esp), %ebx
2672
2673 + LIBC_PROBE (cond_broadcast, 1, %edx)
2674 +
2675 /* Get internal lock. */
2676 movl $1, %edx
2677 xorl %eax, %eax
2678 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2679 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2680 @@ -24,7 +24,7 @@
2681 #include <kernel-features.h>
2682 #include <pthread-pi-defines.h>
2683 #include <pthread-errnos.h>
2684 -
2685 +#include <stap-probe.h>
2686
2687 .text
2688
2689 @@ -45,6 +45,8 @@ __pthread_cond_signal:
2690
2691 movl 12(%esp), %edi
2692
2693 + LIBC_PROBE (cond_signal, 1, %edi)
2694 +
2695 /* Get internal lock. */
2696 movl $1, %edx
2697 xorl %eax, %eax
2698 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2699 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2700 @@ -24,7 +24,7 @@
2701 #include <pthread-errnos.h>
2702 #include <pthread-pi-defines.h>
2703 #include <kernel-features.h>
2704 -
2705 +#include <stap-probe.h>
2706
2707 .text
2708
2709 @@ -61,6 +61,8 @@ __pthread_cond_timedwait:
2710 movl 20(%esp), %ebx
2711 movl 28(%esp), %ebp
2712
2713 + LIBC_PROBE (cond_timedwait, 3, %ebx, 24(%esp), %ebp)
2714 +
2715 cmpl $1000000000, 4(%ebp)
2716 movl $EINVAL, %eax
2717 jae 18f
2718 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2719 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2720 @@ -25,6 +25,7 @@
2721 #include <pthread-errnos.h>
2722 #include <pthread-pi-defines.h>
2723 #include <kernel-features.h>
2724 +#include <stap-probe.h>
2725
2726
2727 .text
2728 @@ -61,6 +62,8 @@ __pthread_cond_wait:
2729 xorl %esi, %esi
2730 movl 20(%esp), %ebx
2731
2732 + LIBC_PROBE (cond_wait, 2, 24(%esp), %ebx)
2733 +
2734 /* Get internal lock. */
2735 movl $1, %edx
2736 xorl %eax, %eax
2737 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
2738 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
2739 @@ -23,6 +23,7 @@
2740 #include <pthread-errnos.h>
2741 #include <kernel-features.h>
2742
2743 +#include <stap-probe.h>
2744
2745 .text
2746
2747 @@ -41,6 +42,8 @@ __pthread_rwlock_rdlock:
2748 xorl %esi, %esi
2749 movl 12(%esp), %ebx
2750
2751 + LIBC_PROBE (rdlock_entry, 1, %ebx)
2752 +
2753 /* Get the lock. */
2754 movl $1, %edx
2755 xorl %eax, %eax
2756 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
2757 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
2758 @@ -23,6 +23,7 @@
2759 #include <pthread-errnos.h>
2760 #include <kernel-features.h>
2761
2762 +#include <stap-probe.h>
2763
2764 .text
2765
2766 @@ -41,6 +42,8 @@ __pthread_rwlock_wrlock:
2767 xorl %esi, %esi
2768 movl 12(%esp), %ebx
2769
2770 + LIBC_PROBE (wrlock_entry, 1, %ebx)
2771 +
2772 /* Get the lock. */
2773 movl $1, %edx
2774 xorl %eax, %eax
2775 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
2776 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
2777 @@ -20,6 +20,8 @@
2778 #ifndef _LOWLEVELLOCK_H
2779 #define _LOWLEVELLOCK_H 1
2780
2781 +#include <stap-probe.h>
2782 +
2783 #ifndef __ASSEMBLER__
2784 # include <time.h>
2785 # include <sys/param.h>
2786 @@ -226,6 +228,7 @@ LLL_STUB_UNWIND_INFO_END
2787 do { \
2788 int __ignore; \
2789 register __typeof (nr) _nr asm ("edx") = (nr); \
2790 + LIBC_PROBE (lll_futex_wake, 3, futex, nr, private); \
2791 __asm __volatile (LLL_EBX_LOAD \
2792 LLL_ENTER_KERNEL \
2793 LLL_EBX_LOAD \
2794 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/i386/smp.h
2795 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/i386/smp.h
2796 @@ -37,7 +37,7 @@ is_smp_system (void)
2797 char *cp;
2798
2799 /* Try reading the number using `sysctl' first. */
2800 - if (uname (&u.uts) == 0)
2801 + if (__uname (&u.uts) == 0)
2802 cp = u.uts.version;
2803 else
2804 {
2805 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/kernel-features.h
2806 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/kernel-features.h
2807 @@ -0,0 +1,6 @@
2808 +#include_next <kernel-features.h>
2809 +
2810 +/* NPTL can always assume all clone thread flags work. */
2811 +#ifndef __ASSUME_CLONE_THREAD_FLAGS
2812 +# define __ASSUME_CLONE_THREAD_FLAGS 1
2813 +#endif
2814 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2815 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2816 @@ -22,6 +22,8 @@
2817 #include <kernel-features.h>
2818 #include <lowlevellock.h>
2819
2820 +#include <stap-probe.h>
2821 +
2822 .text
2823
2824 #ifdef __ASSUME_PRIVATE_FUTEX
2825 @@ -91,7 +93,8 @@ __lll_lock_wait_private:
2826 cmpl %edx, %eax /* NB: %edx == 2 */
2827 jne 2f
2828
2829 -1: movl $SYS_futex, %eax
2830 +1: LIBC_PROBE (lll_lock_wait_private, 1, %rdi)
2831 + movl $SYS_futex, %eax
2832 syscall
2833
2834 2: movl %edx, %eax
2835 @@ -130,7 +133,8 @@ __lll_lock_wait:
2836 cmpl %edx, %eax /* NB: %edx == 2 */
2837 jne 2f
2838
2839 -1: movl $SYS_futex, %eax
2840 +1: LIBC_PROBE (lll_lock_wait, 2, %rdi, %rsi)
2841 + movl $SYS_futex, %eax
2842 syscall
2843
2844 2: movl %edx, %eax
2845 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2846 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2847 @@ -20,6 +20,8 @@
2848 #ifndef _LOWLEVELLOCK_H
2849 #define _LOWLEVELLOCK_H 1
2850
2851 +#include <stap-probe.h>
2852 +
2853 #ifndef __ASSEMBLER__
2854 # include <time.h>
2855 # include <sys/param.h>
2856 @@ -227,6 +229,7 @@ LLL_STUB_UNWIND_INFO_END
2857 do { \
2858 int __ignore; \
2859 register __typeof (nr) _nr __asm ("edx") = (nr); \
2860 + LIBC_PROBE (lll_futex_wake, 3, futex, nr, private); \
2861 __asm __volatile ("syscall" \
2862 : "=a" (__ignore) \
2863 : "0" (SYS_futex), "D" (futex), \
2864 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2865 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2866 @@ -25,7 +25,7 @@
2867 #include <kernel-features.h>
2868 #include <pthread-pi-defines.h>
2869 #include <pthread-errnos.h>
2870 -
2871 +#include <stap-probe.h>
2872
2873 .text
2874
2875 @@ -35,6 +35,8 @@
2876 .align 16
2877 __pthread_cond_broadcast:
2878
2879 + LIBC_PROBE (cond_broadcast, 1, %rdi)
2880 +
2881 /* Get internal lock. */
2882 movl $1, %esi
2883 xorl %eax, %eax
2884 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2885 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2886 @@ -24,6 +24,7 @@
2887 #include <pthread-pi-defines.h>
2888 #include <kernel-features.h>
2889 #include <pthread-errnos.h>
2890 +#include <stap-probe.h>
2891
2892
2893 .text
2894 @@ -34,6 +35,8 @@
2895 .align 16
2896 __pthread_cond_signal:
2897
2898 + LIBC_PROBE (cond_signal, 1, %rdi)
2899 +
2900 /* Get internal lock. */
2901 movq %rdi, %r8
2902 movl $1, %esi
2903 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2904 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2905 @@ -23,6 +23,7 @@
2906 #include <lowlevelcond.h>
2907 #include <pthread-pi-defines.h>
2908 #include <pthread-errnos.h>
2909 +#include <stap-probe.h>
2910
2911 #include <kernel-features.h>
2912
2913 @@ -71,6 +72,8 @@ __pthread_cond_timedwait:
2914 cfi_adjust_cfa_offset(FRAME_SIZE)
2915 cfi_remember_state
2916
2917 + LIBC_PROBE (cond_timedwait, 3, %rdi, %rsi, %rdx)
2918 +
2919 cmpq $1000000000, 8(%rdx)
2920 movl $EINVAL, %eax
2921 jae 48f
2922 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2923 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2924 @@ -23,6 +23,7 @@
2925 #include <lowlevelcond.h>
2926 #include <tcb-offsets.h>
2927 #include <pthread-pi-defines.h>
2928 +#include <stap-probe.h>
2929
2930 #include <kernel-features.h>
2931
2932 @@ -65,6 +66,8 @@ __pthread_cond_wait:
2933 +--------------------------+
2934 */
2935
2936 + LIBC_PROBE (cond_wait, 2, %rdi, %rsi)
2937 +
2938 cmpq $-1, dep_mutex(%rdi)
2939
2940 /* Prepare structure passed to cancellation handler. */
2941 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
2942 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
2943 @@ -22,7 +22,7 @@
2944 #include <lowlevelrwlock.h>
2945 #include <pthread-errnos.h>
2946 #include <kernel-features.h>
2947 -
2948 +#include <stap-probe.h>
2949
2950 .text
2951
2952 @@ -31,6 +31,9 @@
2953 .align 16
2954 __pthread_rwlock_rdlock:
2955 cfi_startproc
2956 +
2957 + LIBC_PROBE (rdlock_entry, 1, %rdi)
2958 +
2959 xorq %r10, %r10
2960
2961 /* Get the lock. */
2962 --- glibc-2.14/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
2963 +++ glibc-2.14-2/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
2964 @@ -22,7 +22,7 @@
2965 #include <lowlevelrwlock.h>
2966 #include <pthread-errnos.h>
2967 #include <kernel-features.h>
2968 -
2969 +#include <stap-probe.h>
2970
2971 .text
2972
2973 @@ -31,6 +31,9 @@
2974 .align 16
2975 __pthread_rwlock_wrlock:
2976 cfi_startproc
2977 +
2978 + LIBC_PROBE (wrlock_entry, 1, %rdi)
2979 +
2980 xorq %r10, %r10
2981
2982 /* Get the lock. */
2983 --- glibc-2.14/nscd/nscd.conf
2984 +++ glibc-2.14-2/nscd/nscd.conf
2985 @@ -33,7 +33,7 @@
2986 # logfile /var/log/nscd.log
2987 # threads 4
2988 # max-threads 32
2989 -# server-user nobody
2990 + server-user nscd
2991 # stat-user somebody
2992 debug-level 0
2993 # reload-count 5
2994 --- glibc-2.14/nscd/nscd.init
2995 +++ glibc-2.14-2/nscd/nscd.init
2996 @@ -9,6 +9,7 @@
2997 # slow naming services like NIS, NIS+, LDAP, or hesiod.
2998 # processname: /usr/sbin/nscd
2999 # config: /etc/nscd.conf
3000 +# config: /etc/sysconfig/nscd
3001 #
3002 ### BEGIN INIT INFO
3003 # Provides: nscd
3004 @@ -28,20 +29,8 @@
3005 # Source function library.
3006 . /etc/init.d/functions
3007
3008 -# nscd does not run on any kernel lower than 2.2.0 because of threading
3009 -# problems, so we require that in first place.
3010 -case $(uname -r) in
3011 - 2.[2-9].*)
3012 - # this is okay
3013 - ;;
3014 - [3-9]*)
3015 - # these are of course also okay
3016 - ;;
3017 - *)
3018 - #this is not
3019 - exit 1
3020 - ;;
3021 -esac
3022 +# Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS.
3023 +[ -r /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd
3024
3025 RETVAL=0
3026 prog=nscd
3027 @@ -50,7 +39,7 @@ start () {
3028 [ -d /var/run/nscd ] || mkdir /var/run/nscd
3029 [ -d /var/db/nscd ] || mkdir /var/db/nscd
3030 echo -n $"Starting $prog: "
3031 - daemon /usr/sbin/nscd
3032 + daemon /usr/sbin/nscd $NSCD_OPTIONS
3033 RETVAL=$?
3034 echo
3035 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
3036 @@ -83,11 +72,11 @@ restart() {
3037 # See how we were called.
3038 case "$1" in
3039 start)
3040 - start
3041 + [ -e /var/lock/subsys/nscd ] || start
3042 RETVAL=$?
3043 ;;
3044 stop)
3045 - stop
3046 + [ ! -e /var/lock/subsys/nscd ] || stop
3047 RETVAL=$?
3048 ;;
3049 status)
3050 @@ -99,14 +88,17 @@ case "$1" in
3051 RETVAL=$?
3052 ;;
3053 try-restart | condrestart)
3054 - [ -e /var/lock/subsys/nscd ] && restart
3055 + [ ! -e /var/lock/subsys/nscd ] || restart
3056 RETVAL=$?
3057 ;;
3058 force-reload | reload)
3059 echo -n $"Reloading $prog: "
3060 - killproc /usr/sbin/nscd -HUP
3061 - RETVAL=$?
3062 - echo
3063 + RETVAL=0
3064 + /usr/sbin/nscd -i passwd || RETVAL=$?
3065 + /usr/sbin/nscd -i group || RETVAL=$?
3066 + /usr/sbin/nscd -i hosts || RETVAL=$?
3067 + /usr/sbin/nscd -i services || RETVAL=$?
3068 + echo
3069 ;;
3070 *)
3071 echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
3072 --- glibc-2.14/nscd/nscd_getserv_r.c
3073 +++ glibc-2.14-2/nscd/nscd_getserv_r.c
3074 @@ -124,6 +124,7 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
3075 s_name = (char *) (&found->data[0].servdata + 1);
3076 serv_resp = found->data[0].servdata;
3077 s_proto = s_name + serv_resp.s_name_len;
3078 + alloca_aliases_len = 1;
3079 aliases_len = (uint32_t *) (s_proto + serv_resp.s_proto_len);
3080 aliases_list = ((char *) aliases_len
3081 + serv_resp.s_aliases_cnt * sizeof (uint32_t));
3082 @@ -154,7 +155,9 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
3083 + (serv_resp.s_aliases_cnt
3084 * sizeof (uint32_t)));
3085 if (alloca_aliases_len)
3086 - tmp = __alloca (serv_resp.s_aliases_cnt * sizeof (uint32_t));
3087 + tmp = alloca_account (serv_resp.s_aliases_cnt
3088 + * sizeof (uint32_t),
3089 + alloca_used);
3090 else
3091 {
3092 tmp = malloc (serv_resp.s_aliases_cnt * sizeof (uint32_t));
3093 @@ -249,8 +252,9 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
3094 + (serv_resp.s_aliases_cnt
3095 * sizeof (uint32_t)));
3096 if (alloca_aliases_len)
3097 - aliases_len = alloca (serv_resp.s_aliases_cnt
3098 - * sizeof (uint32_t));
3099 + aliases_len = alloca_account (serv_resp.s_aliases_cnt
3100 + * sizeof (uint32_t),
3101 + alloca_used);
3102 else
3103 {
3104 aliases_len = malloc (serv_resp.s_aliases_cnt
3105 @@ -368,7 +372,11 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
3106 }
3107
3108 if (retval != -1)
3109 - goto retry;
3110 + {
3111 + if (!alloca_aliases_len)
3112 + free (aliases_len);
3113 + goto retry;
3114 + }
3115 }
3116
3117 if (!alloca_aliases_len)
3118 --- glibc-2.14/nss/Makefile
3119 +++ glibc-2.14-2/nss/Makefile
3120 @@ -75,6 +75,7 @@ endif
3121
3122 include ../Rules
3123
3124 +CFLAGS-files-hosts.c += -fno-strict-aliasing
3125
3126 ifeq (yes,$(build-static-nss))
3127 $(objpfx)getent: $(objpfx)libnss_files.a
3128 --- glibc-2.14/nss/nss_files/files-XXX.c
3129 +++ glibc-2.14-2/nss/nss_files/files-XXX.c
3130 @@ -1,5 +1,5 @@
3131 /* Common code for file-based databases in nss_files module.
3132 - Copyright (C) 1996-1999,2001,2002,2004,2007,2008
3133 + Copyright (C) 1996-1999,2001,2002,2004,2007,2008,2010
3134 Free Software Foundation, Inc.
3135 This file is part of the GNU C Library.
3136
3137 @@ -190,7 +190,7 @@ internal_getent (struct STRUCTURE *result,
3138 {
3139 char *p;
3140 struct parser_data *data = (void *) buffer;
3141 - int linebuflen = buffer + buflen - data->linebuffer;
3142 + size_t linebuflen = buffer + buflen - data->linebuffer;
3143 int parse_result;
3144
3145 if (buflen < sizeof *data + 2)
3146 --- glibc-2.14/posix/Makefile
3147 +++ glibc-2.14-2/posix/Makefile
3148 @@ -325,15 +325,8 @@ $(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
3149 mv -f $@/$$spec.new $@/$$spec; \
3150 done < $(objpfx)getconf.speclist
3151
3152 -$(objpfx)getconf.speclist: $(objpfx)getconf
3153 -ifeq (no,$(cross-compiling))
3154 - LC_ALL=C GETCONF_DIR=/dev/null \
3155 - $(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
3156 - LC_ALL=C GETCONF_DIR=/dev/null \
3157 - $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new
3158 - LC_ALL=C GETCONF_DIR=/dev/null \
3159 - $(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new
3160 -else
3161 - > $@.new
3162 -endif
3163 +$(objpfx)getconf.speclist: getconf.speclist.h
3164 + $(CC) -E $(CFLAGS) $(CPPFLAGS) $< \
3165 + | sed -n -e '/START_OF_STRINGS/,$${/\(POSIX_V[67]\|_XBS5\)_/{s/^[^"]*"//;s/".*$$//;p}}' \
3166 + > $@.new
3167 mv -f $@.new $@
3168 --- glibc-2.14/posix/gai.conf
3169 +++ glibc-2.14-2/posix/gai.conf
3170 @@ -41,7 +41,7 @@
3171 #
3172 # precedence <mask> <value>
3173 # Add another rule to the RFC 3484 precedence table. See section 2.1
3174 -# and 10.3 in RFC 3484. The default is:
3175 +# and 10.3 in RFC 3484. The RFC requires:
3176 #
3177 #precedence ::1/128 50
3178 #precedence ::/0 40
3179 @@ -58,7 +58,7 @@
3180 # Add another rule to the RFC 3484 scope table for IPv4 addresses.
3181 # By default the scope IDs described in section 3.2 in RFC 3484 are
3182 # used. Changing these defaults should hardly ever be necessary.
3183 -# The defaults are equivalent to:
3184 +# The definitions in RFC 1918 are equivalent to:
3185 #
3186 #scopev4 ::ffff:169.254.0.0/112 2
3187 #scopev4 ::ffff:127.0.0.0/104 2
3188 @@ -75,3 +75,5 @@
3189 #scopev4 ::ffff:169.254.0.0/112 2
3190 #scopev4 ::ffff:127.0.0.0/104 2
3191 #scopev4 ::ffff:0.0.0.0/96 14
3192 +#
3193 +# This is what the Red Hat setting currently uses.
3194 --- glibc-2.14/posix/getconf.speclist.h
3195 +++ glibc-2.14-2/posix/getconf.speclist.h
3196 @@ -0,0 +1,39 @@
3197 +#include <unistd.h>
3198 +const char *START_OF_STRINGS =
3199 +#if _POSIX_V7_ILP32_OFF32 == 1
3200 +"POSIX_V7_ILP32_OFF32"
3201 +#endif
3202 +#if _POSIX_V7_ILP32_OFFBIG == 1
3203 +"POSIX_V7_ILP32_OFFBIG"
3204 +#endif
3205 +#if _POSIX_V7_LP64_OFF64 == 1
3206 +"POSIX_V7_LP64_OFF64"
3207 +#endif
3208 +#if _POSIX_V7_LPBIG_OFFBIG == 1
3209 +"POSIX_V7_LPBIG_OFFBIG"
3210 +#endif
3211 +#if _POSIX_V6_ILP32_OFF32 == 1
3212 +"POSIX_V6_ILP32_OFF32"
3213 +#endif
3214 +#if _POSIX_V6_ILP32_OFFBIG == 1
3215 +"POSIX_V6_ILP32_OFFBIG"
3216 +#endif
3217 +#if _POSIX_V6_LP64_OFF64 == 1
3218 +"POSIX_V6_LP64_OFF64"
3219 +#endif
3220 +#if _POSIX_V6_LPBIG_OFFBIG == 1
3221 +"POSIX_V6_LPBIG_OFFBIG"
3222 +#endif
3223 +#if _XBS5_ILP32_OFF32 == 1
3224 +"XBS5_ILP32_OFF32"
3225 +#endif
3226 +#if _XBS5_ILP32_OFFBIG == 1
3227 +"XBS5_ILP32_OFFBIG"
3228 +#endif
3229 +#if _XBS5_LP64_OFF64 == 1
3230 +"XBS5_LP64_OFF64"
3231 +#endif
3232 +#if _XBS5_LPBIG_OFFBIG == 1
3233 +"XBS5_LPBIG_OFFBIG"
3234 +#endif
3235 +"";
3236 --- glibc-2.14/posix/regcomp.c
3237 +++ glibc-2.14-2/posix/regcomp.c
3238 @@ -2745,40 +2745,29 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3239
3240 /* Local function for parse_bracket_exp used in _LIBC environement.
3241 Seek the collating symbol entry correspondings to NAME.
3242 - Return the index of the symbol in the SYMB_TABLE. */
3243 + Return the index of the symbol in the SYMB_TABLE,
3244 + or -1 if not found. */
3245
3246 auto inline int32_t
3247 __attribute ((always_inline))
3248 - seek_collating_symbol_entry (name, name_len)
3249 - const unsigned char *name;
3250 - size_t name_len;
3251 + seek_collating_symbol_entry (const unsigned char *name, size_t name_len)
3252 {
3253 - int32_t hash = elem_hash ((const char *) name, name_len);
3254 - int32_t elem = hash % table_size;
3255 - if (symb_table[2 * elem] != 0)
3256 - {
3257 - int32_t second = hash % (table_size - 2) + 1;
3258 -
3259 - do
3260 - {
3261 - /* First compare the hashing value. */
3262 - if (symb_table[2 * elem] == hash
3263 - /* Compare the length of the name. */
3264 - && name_len == extra[symb_table[2 * elem + 1]]
3265 - /* Compare the name. */
3266 - && memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
3267 - name_len) == 0)
3268 - {
3269 - /* Yep, this is the entry. */
3270 - break;
3271 - }
3272 + int32_t elem;
3273
3274 - /* Next entry. */
3275 - elem += second;
3276 - }
3277 - while (symb_table[2 * elem] != 0);
3278 - }
3279 - return elem;
3280 + for (elem = 0; elem < table_size; elem++)
3281 + if (symb_table[2 * elem] != 0)
3282 + {
3283 + int32_t idx = symb_table[2 * elem + 1];
3284 + /* Skip the name of collating element name. */
3285 + idx += 1 + extra[idx];
3286 + if (/* Compare the length of the name. */
3287 + name_len == extra[idx]
3288 + /* Compare the name. */
3289 + && memcmp (name, &extra[idx + 1], name_len) == 0)
3290 + /* Yep, this is the entry. */
3291 + return elem;
3292 + }
3293 + return -1;
3294 }
3295
3296 /* Local function for parse_bracket_exp used in _LIBC environment.
3297 @@ -2787,8 +2776,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3298
3299 auto inline unsigned int
3300 __attribute ((always_inline))
3301 - lookup_collation_sequence_value (br_elem)
3302 - bracket_elem_t *br_elem;
3303 + lookup_collation_sequence_value (bracket_elem_t *br_elem)
3304 {
3305 if (br_elem->type == SB_CHAR)
3306 {
3307 @@ -2816,7 +2804,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3308 int32_t elem, idx;
3309 elem = seek_collating_symbol_entry (br_elem->opr.name,
3310 sym_name_len);
3311 - if (symb_table[2 * elem] != 0)
3312 + if (elem != -1)
3313 {
3314 /* We found the entry. */
3315 idx = symb_table[2 * elem + 1];
3316 @@ -2834,7 +2822,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3317 /* Return the collation sequence value. */
3318 return *(unsigned int *) (extra + idx);
3319 }
3320 - else if (symb_table[2 * elem] == 0 && sym_name_len == 1)
3321 + else if (sym_name_len == 1)
3322 {
3323 /* No valid character. Match it as a single byte
3324 character. */
3325 @@ -2856,11 +2844,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3326
3327 auto inline reg_errcode_t
3328 __attribute ((always_inline))
3329 - build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
3330 - re_charset_t *mbcset;
3331 - int *range_alloc;
3332 - bitset_t sbcset;
3333 - bracket_elem_t *start_elem, *end_elem;
3334 + build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
3335 + bracket_elem_t *start_elem, bracket_elem_t *end_elem)
3336 {
3337 unsigned int ch;
3338 uint32_t start_collseq;
3339 @@ -2939,25 +2924,22 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3340
3341 auto inline reg_errcode_t
3342 __attribute ((always_inline))
3343 - build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
3344 - re_charset_t *mbcset;
3345 - int *coll_sym_alloc;
3346 - bitset_t sbcset;
3347 - const unsigned char *name;
3348 + build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
3349 + int *coll_sym_alloc, const unsigned char *name)
3350 {
3351 int32_t elem, idx;
3352 size_t name_len = strlen ((const char *) name);
3353 if (nrules != 0)
3354 {
3355 elem = seek_collating_symbol_entry (name, name_len);
3356 - if (symb_table[2 * elem] != 0)
3357 + if (elem != -1)
3358 {
3359 /* We found the entry. */
3360 idx = symb_table[2 * elem + 1];
3361 /* Skip the name of collating element name. */
3362 idx += 1 + extra[idx];
3363 }
3364 - else if (symb_table[2 * elem] == 0 && name_len == 1)
3365 + else if (name_len == 1)
3366 {
3367 /* No valid character, treat it as a normal
3368 character. */
3369 --- glibc-2.14/resolv/Makefile
3370 +++ glibc-2.14-2/resolv/Makefile
3371 @@ -77,6 +77,7 @@ CPPFLAGS += -Dgethostbyname=res_gethostbyname \
3372 -Dgetnetbyaddr=res_getnetbyaddr
3373
3374 CFLAGS-res_hconf.c = -fexceptions
3375 +CFLAGS-res_send.c += -fno-strict-aliasing
3376
3377 # The BIND code elicits some harmless warnings.
3378 +cflags += -Wno-strict-prototypes -Wno-write-strings
3379 --- glibc-2.14/resolv/res_send.c
3380 +++ glibc-2.14-2/resolv/res_send.c
3381 @@ -549,7 +549,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
3382 ns, ansp, ansp2, nansp2, resplen2);
3383 if (n < 0)
3384 return (-1);
3385 - if (n == 0 && (buf2 == NULL || resplen2 == 0))
3386 + if (n == 0)
3387 goto next_ns;
3388 } else {
3389 /* Use datagrams. */
3390 @@ -559,7 +559,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
3391 ansp2, nansp2, resplen2);
3392 if (n < 0)
3393 return (-1);
3394 - if (n == 0 && (buf2 == NULL || resplen2 == 0))
3395 + if (n == 0)
3396 goto next_ns;
3397 if (v_circuit)
3398 // XXX Check whether both requests failed or
3399 @@ -1275,14 +1275,10 @@ send_dg(res_state statp,
3400 (*thisresplenp > *thisanssizp)
3401 ? *thisanssizp : *thisresplenp);
3402
3403 - if (recvresp1 || (buf2 != NULL && recvresp2)) {
3404 - *resplen2 = 0;
3405 + if (recvresp1 || (buf2 != NULL && recvresp2))
3406 return resplen;
3407 - }
3408 if (buf2 != NULL)
3409 {
3410 - /* No data from the first reply. */
3411 - resplen = 0;
3412 /* We are waiting for a possible second reply. */
3413 if (hp->id == anhp->id)
3414 recvresp1 = 1;
3415 @@ -1348,7 +1344,7 @@ send_dg(res_state statp,
3416 goto err_out;
3417 }
3418 else {
3419 - /* poll should not have returned > 0 in this case. */
3420 + /* poll should not have returned > 0 in this case. */
3421 abort ();
3422 }
3423 }
3424 --- glibc-2.14/resource/getrlimit.c
3425 +++ glibc-2.14-2/resource/getrlimit.c
3426 @@ -28,6 +28,7 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
3427 __set_errno (ENOSYS);
3428 return -1;
3429 }
3430 +libc_hidden_def (__getrlimit)
3431 weak_alias (__getrlimit, getrlimit)
3432
3433 stub_warning (getrlimit)
3434 --- glibc-2.14/scripts/check-local-headers.sh
3435 +++ glibc-2.14-2/scripts/check-local-headers.sh
3436 @@ -31,6 +31,8 @@ fgrep -v "$includedir/asm" |
3437 fgrep -v "$includedir/linux" |
3438 fgrep -v "$includedir/selinux" |
3439 fgrep -v "$includedir/sys/capability.h" |
3440 +fgrep -v "$includedir/sys/sdt.h" |
3441 +fgrep -v "$includedir/sys/sdt-config.h" |
3442 fgrep -v "$includedir/gd" |
3443 fgrep -v "$includedir/nss3"; then
3444 # If we found a match something is wrong.
3445 --- glibc-2.14/stdio-common/vfprintf.c
3446 +++ glibc-2.14-2/stdio-common/vfprintf.c
3447 @@ -1161,41 +1161,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
3448 else if (!is_long && spec != L_('S')) \
3449 { \
3450 if (prec != -1) \
3451 - { \
3452 - /* Search for the end of the string, but don't search past \
3453 - the length (in bytes) specified by the precision. Also \
3454 - don't use incomplete characters. */ \
3455 - if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX) == 1) \
3456 - len = __strnlen (string, prec); \
3457 - else \
3458 - { \
3459 - /* In case we have a multibyte character set the \
3460 - situation is more complicated. We must not copy \
3461 - bytes at the end which form an incomplete character. */\
3462 - size_t ignore_size = (unsigned) prec > 1024 ? 1024 : prec;\
3463 - wchar_t ignore[ignore_size]; \
3464 - const char *str2 = string; \
3465 - const char *strend = string + prec; \
3466 - if (strend < string) \
3467 - strend = (const char *) UINTPTR_MAX; \
3468 - \
3469 - mbstate_t ps; \
3470 - memset (&ps, '\0', sizeof (ps)); \
3471 - \
3472 - while (str2 != NULL && str2 < strend) \
3473 - if (__mbsnrtowcs (ignore, &str2, strend - str2, \
3474 - ignore_size, &ps) == (size_t) -1) \
3475 - { \
3476 - done = -1; \
3477 - goto all_done; \
3478 - } \
3479 - \
3480 - if (str2 == NULL) \
3481 - len = strlen (string); \
3482 - else \
3483 - len = str2 - string - (ps.__count & 7); \
3484 - } \
3485 - } \
3486 + /* Search for the end of the string, but don't search past \
3487 + the length (in bytes) specified by the precision. */ \
3488 + len = __strnlen (string, prec); \
3489 else \
3490 len = strlen (string); \
3491 } \
3492 --- glibc-2.14/streams/Makefile
3493 +++ glibc-2.14-2/streams/Makefile
3494 @@ -21,7 +21,7 @@
3495 #
3496 subdir := streams
3497
3498 -headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
3499 +#headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
3500 routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach
3501
3502 include ../Rules
3503 --- glibc-2.14/sunrpc/Makefile
3504 +++ glibc-2.14-2/sunrpc/Makefile
3505 @@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
3506 des_crypt.h)
3507 headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
3508 $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
3509 -headers = rpc/netdb.h
3510 +headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
3511 install-others = $(inst_sysconfdir)/rpc
3512 generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
3513 $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
3514 @@ -152,6 +152,10 @@ CFLAGS-openchild.c = -fexceptions
3515
3516 CPPFLAGS += -D_RPC_THREAD_SAFE_
3517
3518 +CFLAGS-clnt_tcp.c += -fno-strict-aliasing
3519 +CFLAGS-clnt_udp.c += -fno-strict-aliasing
3520 +CFLAGS-clnt_unix.c += -fno-strict-aliasing
3521 +
3522 $(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
3523 $(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
3524 $(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
3525 --- glibc-2.14/sysdeps/generic/dl-cache.h
3526 +++ glibc-2.14-2/sysdeps/generic/dl-cache.h
3527 @@ -36,6 +36,14 @@
3528 # define add_system_dir(dir) add_dir (dir)
3529 #endif
3530
3531 +#ifndef arch_startup
3532 +# define arch_startup(argc, argv) do { } while (0)
3533 +#endif
3534 +
3535 +#ifndef add_arch_dirs
3536 +# define add_arch_dirs(config_file) do { } while (0)
3537 +#endif
3538 +
3539 #define CACHEMAGIC "ld.so-1.7.0"
3540
3541 /* libc5 and glibc 2.0/2.1 use the same format. For glibc 2.2 another
3542 --- glibc-2.14/sysdeps/i386/Makefile
3543 +++ glibc-2.14-2/sysdeps/i386/Makefile
3544 @@ -2,6 +2,8 @@
3545 # Every i386 port in use uses gas syntax (I think).
3546 asm-CPPFLAGS += -DGAS_SYNTAX
3547
3548 +sysdep-ASFLAGS += -U__i686
3549 +
3550 # The i386 `long double' is a distinct type we support.
3551 long-double-fcts = yes
3552
3553 @@ -65,6 +67,14 @@ endif
3554
3555 ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
3556 defines += -DNO_TLS_DIRECT_SEG_REFS
3557 +else
3558 +# .a libraries are not performance critical and so we
3559 +# build them without direct TLS segment references
3560 +# always.
3561 +CPPFLAGS-.o += -DNO_TLS_DIRECT_SEG_REFS
3562 +CFLAGS-.o += -mno-tls-direct-seg-refs
3563 +CPPFLAGS-.oS += -DNO_TLS_DIRECT_SEG_REFS
3564 +CFLAGS-.oS += -mno-tls-direct-seg-refs
3565 endif
3566
3567 ifeq ($(subdir),elf)
3568 --- glibc-2.14/sysdeps/i386/__longjmp.S
3569 +++ glibc-2.14-2/sysdeps/i386/__longjmp.S
3570 @@ -1,5 +1,5 @@
3571 /* longjmp for i386.
3572 - Copyright (C) 1995-1998,2000,2002,2005,2006,2009
3573 + Copyright (C) 1995-1998,2000,2002,2005,2006,2009,2011
3574 Free Software Foundation, Inc.
3575 This file is part of the GNU C Library.
3576
3577 @@ -21,6 +21,7 @@
3578 #include <sysdep.h>
3579 #include <jmpbuf-offsets.h>
3580 #include <asm-syntax.h>
3581 +#include <stap-probe.h>
3582
3583 .text
3584 ENTRY (__longjmp)
3585 @@ -33,6 +34,7 @@ ENTRY (__longjmp)
3586 movl (JB_SP*4)(%eax), %ecx
3587 PTR_DEMANGLE (%edx)
3588 PTR_DEMANGLE (%ecx)
3589 + LIBC_PROBE (longjmp, 3, 4@%eax, -4@8(%esp), 4@%edx)
3590 cfi_def_cfa(%eax, 0)
3591 cfi_register(%eip, %edx)
3592 cfi_register(%esp, %ecx)
3593 @@ -50,6 +52,7 @@ ENTRY (__longjmp)
3594 cfi_restore(%edi)
3595 cfi_restore(%ebp)
3596
3597 + LIBC_PROBE (longjmp_target, 3, 4@%eax, -4@8(%esp), 4@%edx)
3598 movl 8(%esp), %eax /* Second argument is return value. */
3599 movl %ecx, %esp
3600 #else
3601 @@ -57,12 +60,14 @@ ENTRY (__longjmp)
3602 movl 8(%esp), %eax /* Second argument is return value. */
3603 /* Save the return address now. */
3604 movl (JB_PC*4)(%ecx), %edx
3605 + LIBC_PROBE (longjmp, 3, 4@%ecx, -4@%eax, 4@%edx)
3606 /* Restore registers. */
3607 movl (JB_BX*4)(%ecx), %ebx
3608 movl (JB_SI*4)(%ecx), %esi
3609 movl (JB_DI*4)(%ecx), %edi
3610 movl (JB_BP*4)(%ecx), %ebp
3611 movl (JB_SP*4)(%ecx), %esp
3612 + LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%ecx, 4@%edx)
3613 #endif
3614 /* Jump to saved PC. */
3615 jmp *%edx
3616 --- glibc-2.14/sysdeps/i386/bsd-_setjmp.S
3617 +++ glibc-2.14-2/sysdeps/i386/bsd-_setjmp.S
3618 @@ -1,5 +1,6 @@
3619 /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. i386 version.
3620 - Copyright (C) 1994-1997,2000-2002,2005, 2006 Free Software Foundation, Inc.
3621 + Copyright (C) 1994-1997,2000-2002,2005,2006,2011
3622 + Free Software Foundation, Inc.
3623 This file is part of the GNU C Library.
3624
3625 The GNU C Library is free software; you can redistribute it and/or
3626 @@ -25,6 +26,7 @@
3627 #include <jmpbuf-offsets.h>
3628 #include "bp-sym.h"
3629 #include "bp-asm.h"
3630 +#include <stap-probe.h>
3631
3632 #define PARMS LINKAGE /* no space for saved regs */
3633 #define JMPBUF PARMS
3634 @@ -47,6 +49,7 @@ ENTRY (BP_SYM (_setjmp))
3635 #endif
3636 movl %ecx, (JB_SP*4)(%edx)
3637 movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
3638 + LIBC_PROBE (setjmp, 3, 4@%edx, -4@$0, 4@%ecx)
3639 #ifdef PTR_MANGLE
3640 PTR_MANGLE (%ecx)
3641 #endif
3642 --- glibc-2.14/sysdeps/i386/bsd-setjmp.S
3643 +++ glibc-2.14-2/sysdeps/i386/bsd-setjmp.S
3644 @@ -1,5 +1,6 @@
3645 /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. i386 version.
3646 - Copyright (C) 1994-1997,2000,2001,2005, 2006 Free Software Foundation, Inc.
3647 + Copyright (C) 1994-1997,2000,2001,2005,2006,2011
3648 + Free Software Foundation, Inc.
3649 This file is part of the GNU C Library.
3650
3651 The GNU C Library is free software; you can redistribute it and/or
3652 @@ -25,6 +26,7 @@
3653 #include <jmpbuf-offsets.h>
3654 #include "bp-sym.h"
3655 #include "bp-asm.h"
3656 +#include <stap-probe.h>
3657
3658 #define PARMS LINKAGE /* no space for saved regs */
3659 #define JMPBUF PARMS
3660 @@ -49,6 +51,7 @@ ENTRY (BP_SYM (setjmp))
3661 #endif
3662 movl %ecx, (JB_SP*4)(%eax)
3663 movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
3664 + LIBC_PROBE (setjmp, 3, 4@%eax, -4@$1, 4@%ecx)
3665 #ifdef PTR_MANGLE
3666 PTR_MANGLE (%ecx)
3667 #endif
3668 --- glibc-2.14/sysdeps/i386/i686/Makefile
3669 +++ glibc-2.14-2/sysdeps/i386/i686/Makefile
3670 @@ -9,19 +9,3 @@ stack-align-test-flags += -msse
3671 ifeq ($(subdir),string)
3672 sysdep_routines += cacheinfo
3673 endif
3674 -
3675 -ifeq (yes,$(config-asflags-i686))
3676 -CFLAGS-.o += -Wa,-mtune=i686
3677 -CFLAGS-.os += -Wa,-mtune=i686
3678 -CFLAGS-.op += -Wa,-mtune=i686
3679 -CFLAGS-.og += -Wa,-mtune=i686
3680 -CFLAGS-.ob += -Wa,-mtune=i686
3681 -CFLAGS-.oS += -Wa,-mtune=i686
3682 -
3683 -ASFLAGS-.o += -Wa,-mtune=i686
3684 -ASFLAGS-.os += -Wa,-mtune=i686
3685 -ASFLAGS-.op += -Wa,-mtune=i686
3686 -ASFLAGS-.og += -Wa,-mtune=i686
3687 -ASFLAGS-.ob += -Wa,-mtune=i686
3688 -ASFLAGS-.oS += -Wa,-mtune=i686
3689 -endif
3690 --- glibc-2.14/sysdeps/i386/i686/multiarch/strspn.S
3691 +++ glibc-2.14-2/sysdeps/i386/i686/multiarch/strspn.S
3692 @@ -76,8 +76,8 @@ END(strspn)
3693 # define ENTRY(name) \
3694 .type __strspn_ia32, @function; \
3695 .globl __strspn_ia32; \
3696 - .p2align 4
3697 - __strspn_ia32: cfi_startproc; \
3698 + .p2align 4; \
3699 +__strspn_ia32: cfi_startproc; \
3700 CALL_MCOUNT
3701 # undef END
3702 # define END(name) \
3703 --- glibc-2.14/sysdeps/i386/setjmp.S
3704 +++ glibc-2.14-2/sysdeps/i386/setjmp.S
3705 @@ -1,5 +1,5 @@
3706 /* setjmp for i386.
3707 - Copyright (C) 1995,1996,1997,2000,2001,2005,2006
3708 + Copyright (C) 1995,1996,1997,2000,2001,2005,2006,2011
3709 Free Software Foundation, Inc.
3710 This file is part of the GNU C Library.
3711
3712 @@ -23,6 +23,7 @@
3713 #include <asm-syntax.h>
3714 #include "bp-sym.h"
3715 #include "bp-asm.h"
3716 +#include <stap-probe.h>
3717
3718 #define PARMS LINKAGE /* no space for saved regs */
3719 #define JMPBUF PARMS
3720 @@ -44,6 +45,7 @@ ENTRY (BP_SYM (__sigsetjmp))
3721 #endif
3722 movl %ecx, (JB_SP*4)(%eax)
3723 movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
3724 + LIBC_PROBE (setjmp, 3, 4@%eax, -4@SIGMSK(%esp), 4@%ecx)
3725 #ifdef PTR_MANGLE
3726 PTR_MANGLE (%ecx)
3727 #endif
3728 --- glibc-2.14/sysdeps/ia64/Makefile
3729 +++ glibc-2.14-2/sysdeps/ia64/Makefile
3730 @@ -12,8 +12,8 @@ elide-routines.os += hp-timing
3731
3732 ifeq (yes,$(build-shared))
3733 # Compatibility
3734 -sysdep_routines += ia64libgcc
3735 -shared-only-routines += ia64libgcc
3736 +sysdep_routines += libgcc-compat
3737 +shared-only-routines += libgcc-compat
3738 endif
3739 endif
3740
3741 --- glibc-2.14/sysdeps/ia64/ia64libgcc.S
3742 +++ glibc-2.14-2/sysdeps/ia64/ia64libgcc.S
3743 @@ -1,350 +0,0 @@
3744 -/* From the Intel IA-64 Optimization Guide, choose the minimum latency
3745 - alternative. */
3746 -
3747 -#include <sysdep.h>
3748 -#undef ret
3749 -
3750 -#include <shlib-compat.h>
3751 -
3752 -#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
3753 -
3754 -/* __divtf3
3755 - Compute a 80-bit IEEE double-extended quotient.
3756 - farg0 holds the dividend. farg1 holds the divisor. */
3757 -
3758 -ENTRY(___divtf3)
3759 - cmp.eq p7, p0 = r0, r0
3760 - frcpa.s0 f10, p6 = farg0, farg1
3761 - ;;
3762 -(p6) cmp.ne p7, p0 = r0, r0
3763 - .pred.rel.mutex p6, p7
3764 -(p6) fnma.s1 f11 = farg1, f10, f1
3765 -(p6) fma.s1 f12 = farg0, f10, f0
3766 - ;;
3767 -(p6) fma.s1 f13 = f11, f11, f0
3768 -(p6) fma.s1 f14 = f11, f11, f11
3769 - ;;
3770 -(p6) fma.s1 f11 = f13, f13, f11
3771 -(p6) fma.s1 f13 = f14, f10, f10
3772 - ;;
3773 -(p6) fma.s1 f10 = f13, f11, f10
3774 -(p6) fnma.s1 f11 = farg1, f12, farg0
3775 - ;;
3776 -(p6) fma.s1 f11 = f11, f10, f12
3777 -(p6) fnma.s1 f12 = farg1, f10, f1
3778 - ;;
3779 -(p6) fma.s1 f10 = f12, f10, f10
3780 -(p6) fnma.s1 f12 = farg1, f11, farg0
3781 - ;;
3782 -(p6) fma.s0 fret0 = f12, f10, f11
3783 -(p7) mov fret0 = f10
3784 - br.ret.sptk rp
3785 -END(___divtf3)
3786 - .symver ___divtf3, __divtf3@GLIBC_2.2
3787 -
3788 -/* __divdf3
3789 - Compute a 64-bit IEEE double quotient.
3790 - farg0 holds the dividend. farg1 holds the divisor. */
3791 -
3792 -ENTRY(___divdf3)
3793 - cmp.eq p7, p0 = r0, r0
3794 - frcpa.s0 f10, p6 = farg0, farg1
3795 - ;;
3796 -(p6) cmp.ne p7, p0 = r0, r0
3797 - .pred.rel.mutex p6, p7
3798 -(p6) fmpy.s1 f11 = farg0, f10
3799 -(p6) fnma.s1 f12 = farg1, f10, f1
3800 - ;;
3801 -(p6) fma.s1 f11 = f12, f11, f11
3802 -(p6) fmpy.s1 f13 = f12, f12
3803 - ;;
3804 -(p6) fma.s1 f10 = f12, f10, f10
3805 -(p6) fma.s1 f11 = f13, f11, f11
3806 - ;;
3807 -(p6) fmpy.s1 f12 = f13, f13
3808 -(p6) fma.s1 f10 = f13, f10, f10
3809 - ;;
3810 -(p6) fma.d.s1 f11 = f12, f11, f11
3811 -(p6) fma.s1 f10 = f12, f10, f10
3812 - ;;
3813 -(p6) fnma.d.s1 f8 = farg1, f11, farg0
3814 - ;;
3815 -(p6) fma.d fret0 = f8, f10, f11
3816 -(p7) mov fret0 = f10
3817 - br.ret.sptk rp
3818 - ;;
3819 -END(___divdf3)
3820 - .symver ___divdf3, __divdf3@GLIBC_2.2
3821 -
3822 -/* __divsf3
3823 - Compute a 32-bit IEEE float quotient.
3824 - farg0 holds the dividend. farg1 holds the divisor. */
3825 -
3826 -ENTRY(___divsf3)
3827 - cmp.eq p7, p0 = r0, r0
3828 - frcpa.s0 f10, p6 = farg0, farg1
3829 - ;;
3830 -(p6) cmp.ne p7, p0 = r0, r0
3831 - .pred.rel.mutex p6, p7
3832 -(p6) fmpy.s1 f8 = farg0, f10
3833 -(p6) fnma.s1 f9 = farg1, f10, f1
3834 - ;;
3835 -(p6) fma.s1 f8 = f9, f8, f8
3836 -(p6) fmpy.s1 f9 = f9, f9
3837 - ;;
3838 -(p6) fma.s1 f8 = f9, f8, f8
3839 -(p6) fmpy.s1 f9 = f9, f9
3840 - ;;
3841 -(p6) fma.d.s1 f10 = f9, f8, f8
3842 - ;;
3843 -(p6) fnorm.s.s0 fret0 = f10
3844 -(p7) mov fret0 = f10
3845 - br.ret.sptk rp
3846 - ;;
3847 -END(___divsf3)
3848 - .symver ___divsf3, __divsf3@GLIBC_2.2
3849 -
3850 -/* __divdi3
3851 - Compute a 64-bit integer quotient.
3852 - in0 holds the dividend. in1 holds the divisor. */
3853 -
3854 -ENTRY(___divdi3)
3855 - .regstk 2,0,0,0
3856 - /* Transfer inputs to FP registers. */
3857 - setf.sig f8 = in0
3858 - setf.sig f9 = in1
3859 - ;;
3860 - /* Convert the inputs to FP, so that they won't be treated as
3861 - unsigned. */
3862 - fcvt.xf f8 = f8
3863 - fcvt.xf f9 = f9
3864 - ;;
3865 - /* Compute the reciprocal approximation. */
3866 - frcpa.s1 f10, p6 = f8, f9
3867 - ;;
3868 - /* 3 Newton-Raphson iterations. */
3869 -(p6) fnma.s1 f11 = f9, f10, f1
3870 -(p6) fmpy.s1 f12 = f8, f10
3871 - ;;
3872 -(p6) fmpy.s1 f13 = f11, f11
3873 -(p6) fma.s1 f12 = f11, f12, f12
3874 - ;;
3875 -(p6) fma.s1 f10 = f11, f10, f10
3876 -(p6) fma.s1 f11 = f13, f12, f12
3877 - ;;
3878 -(p6) fma.s1 f10 = f13, f10, f10
3879 -(p6) fnma.s1 f12 = f9, f11, f8
3880 - ;;
3881 -(p6) fma.s1 f10 = f12, f10, f11
3882 - ;;
3883 - /* Round quotient to an integer. */
3884 - fcvt.fx.trunc.s1 f10 = f10
3885 - ;;
3886 - /* Transfer result to GP registers. */
3887 - getf.sig ret0 = f10
3888 - br.ret.sptk rp
3889 - ;;
3890 -END(___divdi3)
3891 - .symver ___divdi3, __divdi3@GLIBC_2.2
3892 -
3893 -/* __moddi3
3894 - Compute a 64-bit integer modulus.
3895 - in0 holds the dividend (a). in1 holds the divisor (b). */
3896 -
3897 -ENTRY(___moddi3)
3898 - .regstk 2,0,0,0
3899 - /* Transfer inputs to FP registers. */
3900 - setf.sig f14 = in0
3901 - setf.sig f9 = in1
3902 - ;;
3903 - /* Convert the inputs to FP, so that they won't be treated as
3904 - unsigned. */
3905 - fcvt.xf f8 = f14
3906 - fcvt.xf f9 = f9
3907 - ;;
3908 - /* Compute the reciprocal approximation. */
3909 - frcpa.s1 f10, p6 = f8, f9
3910 - ;;
3911 - /* 3 Newton-Raphson iterations. */
3912 -(p6) fmpy.s1 f12 = f8, f10
3913 -(p6) fnma.s1 f11 = f9, f10, f1
3914 - ;;
3915 -(p6) fma.s1 f12 = f11, f12, f12
3916 -(p6) fmpy.s1 f13 = f11, f11
3917 - ;;
3918 -(p6) fma.s1 f10 = f11, f10, f10
3919 -(p6) fma.s1 f11 = f13, f12, f12
3920 - ;;
3921 - sub in1 = r0, in1
3922 -(p6) fma.s1 f10 = f13, f10, f10
3923 -(p6) fnma.s1 f12 = f9, f11, f8
3924 - ;;
3925 - setf.sig f9 = in1
3926 -(p6) fma.s1 f10 = f12, f10, f11
3927 - ;;
3928 - fcvt.fx.trunc.s1 f10 = f10
3929 - ;;
3930 - /* r = q * (-b) + a */
3931 - xma.l f10 = f10, f9, f14
3932 - ;;
3933 - /* Transfer result to GP registers. */
3934 - getf.sig ret0 = f10
3935 - br.ret.sptk rp
3936 - ;;
3937 -END(___moddi3)
3938 - .symver ___moddi3, __moddi3@GLIBC_2.2
3939 -
3940 -/* __udivdi3
3941 - Compute a 64-bit unsigned integer quotient.
3942 - in0 holds the dividend. in1 holds the divisor. */
3943 -
3944 -ENTRY(___udivdi3)
3945 - .regstk 2,0,0,0
3946 - /* Transfer inputs to FP registers. */
3947 - setf.sig f8 = in0
3948 - setf.sig f9 = in1
3949 - ;;
3950 - /* Convert the inputs to FP, to avoid FP software-assist faults. */
3951 - fcvt.xuf.s1 f8 = f8
3952 - fcvt.xuf.s1 f9 = f9
3953 - ;;
3954 - /* Compute the reciprocal approximation. */
3955 - frcpa.s1 f10, p6 = f8, f9
3956 - ;;
3957 - /* 3 Newton-Raphson iterations. */
3958 -(p6) fnma.s1 f11 = f9, f10, f1
3959 -(p6) fmpy.s1 f12 = f8, f10
3960 - ;;
3961 -(p6) fmpy.s1 f13 = f11, f11
3962 -(p6) fma.s1 f12 = f11, f12, f12
3963 - ;;
3964 -(p6) fma.s1 f10 = f11, f10, f10
3965 -(p6) fma.s1 f11 = f13, f12, f12
3966 - ;;
3967 -(p6) fma.s1 f10 = f13, f10, f10
3968 -(p6) fnma.s1 f12 = f9, f11, f8
3969 - ;;
3970 -(p6) fma.s1 f10 = f12, f10, f11
3971 - ;;
3972 - /* Round quotient to an unsigned integer. */
3973 - fcvt.fxu.trunc.s1 f10 = f10
3974 - ;;
3975 - /* Transfer result to GP registers. */
3976 - getf.sig ret0 = f10
3977 - br.ret.sptk rp
3978 - ;;
3979 -END(___udivdi3)
3980 - .symver ___udivdi3, __udivdi3@GLIBC_2.2
3981 -
3982 -/* __umoddi3
3983 - Compute a 64-bit unsigned integer modulus.
3984 - in0 holds the dividend (a). in1 holds the divisor (b). */
3985 -
3986 -ENTRY(___umoddi3)
3987 - .regstk 2,0,0,0
3988 - /* Transfer inputs to FP registers. */
3989 - setf.sig f14 = in0
3990 - setf.sig f9 = in1
3991 - ;;
3992 - /* Convert the inputs to FP, to avoid FP software assist faults. */
3993 - fcvt.xuf.s1 f8 = f14
3994 - fcvt.xuf.s1 f9 = f9
3995 - ;;
3996 - /* Compute the reciprocal approximation. */
3997 - frcpa.s1 f10, p6 = f8, f9
3998 - ;;
3999 - /* 3 Newton-Raphson iterations. */
4000 -(p6) fmpy.s1 f12 = f8, f10
4001 -(p6) fnma.s1 f11 = f9, f10, f1
4002 - ;;
4003 -(p6) fma.s1 f12 = f11, f12, f12
4004 -(p6) fmpy.s1 f13 = f11, f11
4005 - ;;
4006 -(p6) fma.s1 f10 = f11, f10, f10
4007 -(p6) fma.s1 f11 = f13, f12, f12
4008 - ;;
4009 - sub in1 = r0, in1
4010 -(p6) fma.s1 f10 = f13, f10, f10
4011 -(p6) fnma.s1 f12 = f9, f11, f8
4012 - ;;
4013 - setf.sig f9 = in1
4014 -(p6) fma.s1 f10 = f12, f10, f11
4015 - ;;
4016 - /* Round quotient to an unsigned integer. */
4017 - fcvt.fxu.trunc.s1 f10 = f10
4018 - ;;
4019 - /* r = q * (-b) + a */
4020 - xma.l f10 = f10, f9, f14
4021 - ;;
4022 - /* Transfer result to GP registers. */
4023 - getf.sig ret0 = f10
4024 - br.ret.sptk rp
4025 - ;;
4026 -END(___umoddi3)
4027 - .symver ___umoddi3, __umoddi3@GLIBC_2.2
4028 -
4029 -/* __multi3
4030 - Compute a 128-bit multiply of 128-bit multiplicands.
4031 - in0/in1 holds one multiplicand (a), in2/in3 holds the other one (b). */
4032 -
4033 -ENTRY(___multi3)
4034 - .regstk 4,0,0,0
4035 - setf.sig f6 = in1
4036 - movl r19 = 0xffffffff
4037 - setf.sig f7 = in2
4038 - ;;
4039 - and r14 = r19, in0
4040 - ;;
4041 - setf.sig f10 = r14
4042 - and r14 = r19, in2
4043 - xmpy.l f9 = f6, f7
4044 - ;;
4045 - setf.sig f6 = r14
4046 - shr.u r14 = in0, 32
4047 - ;;
4048 - setf.sig f7 = r14
4049 - shr.u r14 = in2, 32
4050 - ;;
4051 - setf.sig f8 = r14
4052 - xmpy.l f11 = f10, f6
4053 - xmpy.l f6 = f7, f6
4054 - ;;
4055 - getf.sig r16 = f11
4056 - xmpy.l f7 = f7, f8
4057 - ;;
4058 - shr.u r14 = r16, 32
4059 - and r16 = r19, r16
4060 - getf.sig r17 = f6
4061 - setf.sig f6 = in0
4062 - ;;
4063 - setf.sig f11 = r14
4064 - getf.sig r21 = f7
4065 - setf.sig f7 = in3
4066 - ;;
4067 - xma.l f11 = f10, f8, f11
4068 - xma.l f6 = f6, f7, f9
4069 - ;;
4070 - getf.sig r18 = f11
4071 - ;;
4072 - add r18 = r18, r17
4073 - ;;
4074 - and r15 = r19, r18
4075 - cmp.ltu p7, p6 = r18, r17
4076 - ;;
4077 - getf.sig r22 = f6
4078 -(p7) adds r14 = 1, r19
4079 - ;;
4080 -(p7) add r21 = r21, r14
4081 - shr.u r14 = r18, 32
4082 - shl r15 = r15, 32
4083 - ;;
4084 - add r20 = r21, r14
4085 - ;;
4086 - add ret0 = r15, r16
4087 - add ret1 = r22, r20
4088 - br.ret.sptk rp
4089 - ;;
4090 -END(___multi3)
4091 - .symver ___multi3, __multi3@GLIBC_2.2
4092 -
4093 -#endif
4094 --- glibc-2.14/sysdeps/ia64/libgcc-compat.c
4095 +++ glibc-2.14-2/sysdeps/ia64/libgcc-compat.c
4096 @@ -0,0 +1,84 @@
4097 +/* pre-.hidden libgcc compatibility
4098 + Copyright (C) 2002 Free Software Foundation, Inc.
4099 + This file is part of the GNU C Library.
4100 +
4101 + The GNU C Library is free software; you can redistribute it and/or
4102 + modify it under the terms of the GNU Lesser General Public
4103 + License as published by the Free Software Foundation; either
4104 + version 2.1 of the License, or (at your option) any later version.
4105 +
4106 + The GNU C Library is distributed in the hope that it will be useful,
4107 + but WITHOUT ANY WARRANTY; without even the implied warranty of
4108 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4109 + Lesser General Public License for more details.
4110 +
4111 + You should have received a copy of the GNU Lesser General Public
4112 + License along with the GNU C Library; if not, write to the Free
4113 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4114 + 02111-1307 USA. */
4115 +
4116 +
4117 +#include <stdint.h>
4118 +#include <shlib-compat.h>
4119 +
4120 +#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
4121 +
4122 +typedef int int128_t __attribute__((__mode__(TI)));
4123 +
4124 +extern long double __divtf3 (long double, long double) attribute_hidden;
4125 +long double INTUSE (__divtf3) (long double x, long double y)
4126 +{
4127 + return __divtf3 (x, y);
4128 +}
4129 +symbol_version (INTUSE (__divtf3), __divtf3, GLIBC_2.2);
4130 +
4131 +extern double __divdf3 (double, double) attribute_hidden;
4132 +double INTUSE (__divdf3) (double x, double y)
4133 +{
4134 + return __divdf3 (x, y);
4135 +}
4136 +symbol_version (INTUSE (__divdf3), __divdf3, GLIBC_2.2);
4137 +
4138 +extern float __divsf3 (float, float) attribute_hidden;
4139 +float INTUSE (__divsf3) (float x, float y)
4140 +{
4141 + return __divsf3 (x, y);
4142 +}
4143 +symbol_version (INTUSE (__divsf3), __divsf3, GLIBC_2.2);
4144 +
4145 +extern int64_t __divdi3 (int64_t, int64_t) attribute_hidden;
4146 +int64_t INTUSE (__divdi3) (int64_t x, int64_t y)
4147 +{
4148 + return __divdi3 (x, y);
4149 +}
4150 +symbol_version (INTUSE (__divdi3), __divdi3, GLIBC_2.2);
4151 +
4152 +extern int64_t __moddi3 (int64_t, int64_t) attribute_hidden;
4153 +int64_t INTUSE (__moddi3) (int64_t x, int64_t y)
4154 +{
4155 + return __moddi3 (x, y);
4156 +}
4157 +symbol_version (INTUSE (__moddi3), __moddi3, GLIBC_2.2);
4158 +
4159 +extern uint64_t __udivdi3 (uint64_t, uint64_t) attribute_hidden;
4160 +uint64_t INTUSE (__udivdi3) (uint64_t x, uint64_t y)
4161 +{
4162 + return __udivdi3 (x, y);
4163 +}
4164 +symbol_version (INTUSE (__udivdi3), __udivdi3, GLIBC_2.2);
4165 +
4166 +extern uint64_t __umoddi3 (uint64_t, uint64_t) attribute_hidden;
4167 +uint64_t INTUSE (__umoddi3) (uint64_t x, uint64_t y)
4168 +{
4169 + return __umoddi3 (x, y);
4170 +}
4171 +symbol_version (INTUSE (__umoddi3), __umoddi3, GLIBC_2.2);
4172 +
4173 +extern int128_t __multi3 (int128_t, int128_t) attribute_hidden;
4174 +int128_t INTUSE (__multi3) (int128_t x, int128_t y)
4175 +{
4176 + return __multi3 (x, y);
4177 +}
4178 +symbol_version (INTUSE (__multi3), __multi3, GLIBC_2.2);
4179 +
4180 +#endif
4181 --- glibc-2.14/sysdeps/mach/hurd/getrlimit.c
4182 +++ glibc-2.14-2/sysdeps/mach/hurd/getrlimit.c
4183 @@ -44,4 +44,5 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
4184
4185 return 0;
4186 }
4187 +libc_hidden_def (__getrlimit)
4188 weak_alias (__getrlimit, getrlimit)
4189 --- glibc-2.14/sysdeps/posix/getaddrinfo.c
4190 +++ glibc-2.14-2/sysdeps/posix/getaddrinfo.c
4191 @@ -1335,10 +1335,12 @@ static const struct scopeentry
4192 /* Link-local addresses: scope 2. */
4193 { { { 169, 254, 0, 0 } }, htonl_c (0xffff0000), 2 },
4194 { { { 127, 0, 0, 0 } }, htonl_c (0xff000000), 2 },
4195 +#if 0
4196 /* Site-local addresses: scope 5. */
4197 { { { 10, 0, 0, 0 } }, htonl_c (0xff000000), 5 },
4198 { { { 172, 16, 0, 0 } }, htonl_c (0xfff00000), 5 },
4199 { { { 192, 168, 0, 0 } }, htonl_c (0xffff0000), 5 },
4200 +#endif
4201 /* Default: scope 14. */
4202 { { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 }
4203 };
4204 --- glibc-2.14/sysdeps/powerpc/powerpc64/Makefile
4205 +++ glibc-2.14-2/sysdeps/powerpc/powerpc64/Makefile
4206 @@ -33,6 +33,7 @@ ifneq ($(elf),no)
4207 # we use -fpic instead which is much better.
4208 CFLAGS-initfini.s += -fpic -O1
4209 endif
4210 +CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
4211 endif
4212
4213 ifeq ($(subdir),elf)
4214 --- glibc-2.14/sysdeps/powerpc/powerpc64/elf/Makefile
4215 +++ glibc-2.14-2/sysdeps/powerpc/powerpc64/elf/Makefile
4216 @@ -9,3 +9,5 @@ CFLAGS-rtld-mempcpy.os = $(no-special-regs)
4217 CFLAGS-rtld-memmove.os = $(no-special-regs)
4218 CFLAGS-rtld-memchr.os = $(no-special-regs)
4219 CFLAGS-rtld-strnlen.os = $(no-special-regs)
4220 +
4221 +CFLAGS-gmon-start.c = -fno-strict-aliasing
4222 --- glibc-2.14/sysdeps/unix/nice.c
4223 +++ glibc-2.14-2/sysdeps/unix/nice.c
4224 @@ -42,7 +42,12 @@ nice (int incr)
4225 __set_errno (save);
4226 }
4227
4228 - result = setpriority (PRIO_PROCESS, 0, prio + incr);
4229 + prio += incr;
4230 + if (prio < PRIO_MIN)
4231 + prio = PRIO_MIN;
4232 + else if (prio >= PRIO_MAX)
4233 + prio = PRIO_MAX - 1;
4234 + result = setpriority (PRIO_PROCESS, 0, prio);
4235 if (result == -1)
4236 {
4237 if (errno == EACCES)
4238 --- glibc-2.14/sysdeps/unix/sysv/linux/check_pf.c
4239 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/check_pf.c
4240 @@ -27,13 +27,10 @@
4241 #include <unistd.h>
4242 #include <sys/socket.h>
4243
4244 -#include <asm/types.h>
4245 -#include <linux/netlink.h>
4246 -#include <linux/rtnetlink.h>
4247 -
4248 #include <not-cancel.h>
4249 #include <kernel-features.h>
4250
4251 +#include "netlinkaccess.h"
4252
4253 #ifndef IFA_F_HOMEADDRESS
4254 # define IFA_F_HOMEADDRESS 0
4255 --- glibc-2.14/sysdeps/unix/sysv/linux/futimesat.c
4256 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/futimesat.c
4257 @@ -37,14 +37,14 @@ futimesat (fd, file, tvp)
4258 {
4259 int result;
4260
4261 + if (file == NULL)
4262 + return __futimes (fd, tvp);
4263 +
4264 #ifdef __NR_futimesat
4265 # ifndef __ASSUME_ATFCTS
4266 if (__have_atfcts >= 0)
4267 # endif
4268 {
4269 - if (file == NULL)
4270 - return __futimes (fd, tvp);
4271 -
4272 result = INLINE_SYSCALL (futimesat, 3, fd, file, tvp);
4273 # ifndef __ASSUME_ATFCTS
4274 if (result == -1 && errno == ENOSYS)
4275 @@ -58,22 +58,7 @@ futimesat (fd, file, tvp)
4276 #ifndef __ASSUME_ATFCTS
4277 char *buf = NULL;
4278
4279 - if (file == NULL)
4280 - {
4281 - static const char procfd[] = "/proc/self/fd/%d";
4282 - /* Buffer for the path name we are going to use. It consists of
4283 - - the string /proc/self/fd/
4284 - - the file descriptor number.
4285 - The final NUL is included in the sizeof. A bit of overhead
4286 - due to the format elements compensates for possible negative
4287 - numbers. */
4288 - size_t buflen = sizeof (procfd) + sizeof (int) * 3;
4289 - buf = alloca (buflen);
4290 -
4291 - __snprintf (buf, buflen, procfd, fd);
4292 - file = buf;
4293 - }
4294 - else if (fd != AT_FDCWD && file[0] != '/')
4295 + if (fd != AT_FDCWD && file[0] != '/')
4296 {
4297 size_t filelen = strlen (file);
4298 if (__builtin_expect (filelen == 0, 0))
4299 --- glibc-2.14/sysdeps/unix/sysv/linux/getpagesize.c
4300 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/getpagesize.c
4301 @@ -28,7 +28,7 @@
4302 int
4303 __getpagesize ()
4304 {
4305 -#ifdef __ASSUME_AT_PAGESIZE
4306 +#if 0 && defined __ASSUME_AT_PAGESIZE
4307 assert (GLRO(dl_pagesize) != 0);
4308 return GLRO(dl_pagesize);
4309 #else
4310 --- glibc-2.14/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
4311 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
4312 @@ -1,4 +1,5 @@
4313 -/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
4314 +/* Copyright (C) 2001,2004,2005,2006,2009,2011
4315 + Free Software Foundation, Inc.
4316 This file is part of the GNU C Library.
4317
4318 The GNU C Library is free software; you can redistribute it and/or
4319 @@ -19,6 +20,7 @@
4320 #include <sysdep.h>
4321 #include <jmpbuf-offsets.h>
4322 #include <asm-syntax.h>
4323 +#include <stap-probe.h>
4324
4325
4326 .section .rodata.str1.1,"aMS",@progbits,1
4327 @@ -79,7 +81,9 @@ ENTRY (____longjmp_chk)
4328 cfi_adjust_cfa_offset(-12)
4329 movl 4(%esp), %ecx
4330
4331 -.Lok: /* We add unwind information for the target here. */
4332 +.Lok:
4333 + LIBC_PROBE (longjmp, 3, 4@%ecx, -4@8(%esp), 4@%edx)
4334 + /* We add unwind information for the target here. */
4335 cfi_def_cfa(%ecx, 0)
4336 cfi_register(%eip, %edx)
4337 cfi_register(%esp, %edi)
4338 @@ -102,5 +106,6 @@ ENTRY (____longjmp_chk)
4339 cfi_restore(%ebp)
4340
4341 /* Jump to saved PC. */
4342 + LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%eax, 4@%edx)
4343 jmp *%edx
4344 END (____longjmp_chk)
4345 --- glibc-2.14/sysdeps/unix/sysv/linux/i386/dl-cache.h
4346 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/i386/dl-cache.h
4347 @@ -0,0 +1,59 @@
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.
4351 +
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.
4356 +
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.
4361 +
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. */
4366 +
4367 +static inline int
4368 +is_ia64 (void)
4369 +{
4370 + unsigned int fl1, fl2;
4371 +
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)
4378 + return 0;
4379 +
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
4383 + register. */
4384 + __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
4385 + : "=a" (fl1) : "0" (0) : "edx", "cc");
4386 + if (fl1 == 0)
4387 + return 0;
4388 +
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;
4394 +}
4395 +
4396 +#define arch_startup(argc, argv) \
4397 + do { \
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. */ \
4401 + if (is_ia64 ()) \
4402 + execv ("/emul/ia32-linux/../../sbin/ldconfig", \
4403 + (char *const *) argv); \
4404 + } while (0)
4405 +
4406 +#include_next <dl-cache.h>
4407 --- glibc-2.14/sysdeps/unix/sysv/linux/i386/getrlimit.c
4408 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/i386/getrlimit.c
4409 @@ -79,4 +79,5 @@ __new_getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
4410 }
4411
4412 weak_alias (__new_getrlimit, __getrlimit);
4413 +libc_hidden_weak (__getrlimit)
4414 versioned_symbol (libc, __new_getrlimit, getrlimit, GLIBC_2_2);
4415 --- glibc-2.14/sysdeps/unix/sysv/linux/ia64/dl-cache.h
4416 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/ia64/dl-cache.h
4417 @@ -22,4 +22,31 @@
4418 #define _dl_cache_check_flags(flags) \
4419 ((flags) == _DL_CACHE_DEFAULT_ID)
4420
4421 +#define EMUL_HACK "/emul/ia32-linux"
4422 +
4423 +#define arch_startup(argc, argv) unlink (EMUL_HACK LD_SO_CACHE)
4424 +
4425 +#define add_arch_dirs(config_file) \
4426 + do { \
4427 + int save_verbose = opt_verbose; \
4428 + opt_verbose = 0; \
4429 + \
4430 + parse_conf (config_file, EMUL_HACK, true); \
4431 + \
4432 + /* Always add the standard search paths. */ \
4433 + add_system_dir (EMUL_HACK SLIBDIR); \
4434 + if (strcmp (SLIBDIR, LIBDIR)) \
4435 + add_system_dir (EMUL_HACK LIBDIR); \
4436 + \
4437 + char emul_config_file[strlen (config_file) \
4438 + + sizeof EMUL_HACK]; \
4439 + strcpy (mempcpy (emul_config_file, EMUL_HACK, \
4440 + strlen (EMUL_HACK)), config_file); \
4441 + \
4442 + if (! access (emul_config_file, R_OK)) \
4443 + parse_conf (emul_config_file, EMUL_HACK, true); \
4444 + \
4445 + opt_verbose = save_verbose; \
4446 + } while (0)
4447 +
4448 #include_next <dl-cache.h>
4449 --- glibc-2.14/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c
4450 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c
4451 @@ -0,0 +1,5 @@
4452 +#ifdef IS_IN_ldconfig
4453 +#include <sysdeps/i386/dl-procinfo.c>
4454 +#else
4455 +#include <sysdeps/generic/dl-procinfo.c>
4456 +#endif
4457 --- glibc-2.14/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h
4458 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h
4459 @@ -0,0 +1,5 @@
4460 +#ifdef IS_IN_ldconfig
4461 +#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
4462 +#else
4463 +#include <sysdeps/generic/dl-procinfo.h>
4464 +#endif
4465 --- glibc-2.14/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
4466 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
4467 @@ -1 +1 @@
4468 -s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_
4469 +s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 /emul/ia32-linux\2\3"_
4470 --- glibc-2.14/sysdeps/unix/sysv/linux/netlinkaccess.h
4471 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/netlinkaccess.h
4472 @@ -25,6 +25,24 @@
4473
4474 #include <kernel-features.h>
4475
4476 +#ifndef IFA_MAX
4477 +/* 2.6.19 kernel headers helpfully removed some macros and
4478 + moved lots of stuff into new headers, some of which aren't
4479 + included by linux/rtnetlink.h. */
4480 +#include <linux/if_addr.h>
4481 +#endif
4482 +
4483 +#ifndef IFA_RTA
4484 +# define IFA_RTA(r) \
4485 + ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifaddrmsg))))
4486 +# define IFA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifaddrmsg))
4487 +#endif
4488 +
4489 +#ifndef IFLA_RTA
4490 +# define IFLA_RTA(r) \
4491 + ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifinfomsg))))
4492 +# define IFLA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifinfomsg))
4493 +#endif
4494
4495 struct netlink_res
4496 {
4497 --- glibc-2.14/sysdeps/unix/sysv/linux/paths.h
4498 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/paths.h
4499 @@ -62,7 +62,7 @@
4500 #define _PATH_TTY "/dev/tty"
4501 #define _PATH_UNIX "/boot/vmlinux"
4502 #define _PATH_UTMP "/var/run/utmp"
4503 -#define _PATH_VI "/usr/bin/vi"
4504 +#define _PATH_VI "/bin/vi"
4505 #define _PATH_WTMP "/var/log/wtmp"
4506
4507 /* Provide trailing slash, since mostly used for building pathnames. */
4508 --- glibc-2.14/sysdeps/unix/sysv/linux/tcsetattr.c
4509 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/tcsetattr.c
4510 @@ -49,6 +49,7 @@ tcsetattr (fd, optional_actions, termios_p)
4511 {
4512 struct __kernel_termios k_termios;
4513 unsigned long int cmd;
4514 + int retval;
4515
4516 switch (optional_actions)
4517 {
4518 @@ -80,6 +81,35 @@ tcsetattr (fd, optional_actions, termios_p)
4519 memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
4520 __KERNEL_NCCS * sizeof (cc_t));
4521
4522 - return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
4523 + retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
4524 +
4525 + if (retval == 0 && cmd == TCSETS)
4526 + {
4527 + /* The Linux kernel has a bug which silently ignore the invalid
4528 + c_cflag on pty. We have to check it here. */
4529 + int save = errno;
4530 + retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
4531 + if (retval)
4532 + {
4533 + /* We cannot verify if the setting is ok. We don't return
4534 + an error (?). */
4535 + __set_errno (save);
4536 + retval = 0;
4537 + }
4538 + else if ((termios_p->c_cflag & (PARENB | CREAD))
4539 + != (k_termios.c_cflag & (PARENB | CREAD))
4540 + || ((termios_p->c_cflag & CSIZE)
4541 + && ((termios_p->c_cflag & CSIZE)
4542 + != (k_termios.c_cflag & CSIZE))))
4543 + {
4544 + /* It looks like the Linux kernel silently changed the
4545 + PARENB/CREAD/CSIZE bits in c_cflag. Report it as an
4546 + error. */
4547 + __set_errno (EINVAL);
4548 + retval = -1;
4549 + }
4550 + }
4551 +
4552 + return retval;
4553 }
4554 libc_hidden_def (tcsetattr)
4555 --- glibc-2.14/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
4556 +++ glibc-2.14-2/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
4557 @@ -19,6 +19,7 @@
4558 #include <sysdep.h>
4559 #include <jmpbuf-offsets.h>
4560 #include <asm-syntax.h>
4561 +#include <stap-probe.h>
4562
4563 .section .rodata.str1.1,"aMS",@progbits,1
4564 .type longjmp_msg,@object
4565 @@ -94,7 +95,9 @@ ENTRY(____longjmp_chk)
4566 movl %ebx, %esi
4567 cfi_restore (%rsi)
4568
4569 -.Lok: /* We add unwind information for the target here. */
4570 +.Lok:
4571 + LIBC_PROBE (longjmp, 3, 8@%rdi, -4@%esi, 8@%rdx)
4572 + /* We add unwind information for the target here. */
4573 cfi_def_cfa(%rdi, 0)
4574 cfi_register(%rsp,%r8)
4575 cfi_register(%rbp,%r9)
4576 @@ -113,5 +116,6 @@ ENTRY(____longjmp_chk)
4577 movl %esi, %eax
4578 movq %r8,%rsp
4579 movq %r9,%rbp
4580 + LIBC_PROBE (longjmp_target, 3, 8@%rdi, -4@%eax, 8@%rdx)
4581 jmpq *%rdx
4582 END (____longjmp_chk)
4583 --- glibc-2.14/sysdeps/x86_64/__longjmp.S
4584 +++ glibc-2.14-2/sysdeps/x86_64/__longjmp.S
4585 @@ -1,4 +1,4 @@
4586 -/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
4587 +/* Copyright (C) 2001,2004,2005,2006,2009,2011 Free Software Foundation, Inc.
4588 This file is part of the GNU C Library.
4589
4590 The GNU C Library is free software; you can redistribute it and/or
4591 @@ -19,6 +19,7 @@
4592 #include <sysdep.h>
4593 #include <jmpbuf-offsets.h>
4594 #include <asm-syntax.h>
4595 +#include <stap-probe.h>
4596
4597 /* Jump to the position specified by ENV, causing the
4598 setjmp call there to return VAL, or 1 if VAL is 0.
4599 @@ -34,6 +35,7 @@ ENTRY(__longjmp)
4600 PTR_DEMANGLE (%r9)
4601 PTR_DEMANGLE (%rdx)
4602 #endif
4603 + LIBC_PROBE (longjmp, 3, 8@%rdi, -4@%esi, 8@%rdx)
4604 /* We add unwind information for the target here. */
4605 cfi_def_cfa(%rdi, 0)
4606 cfi_register(%rsp,%r8)
4607 @@ -53,5 +55,6 @@ ENTRY(__longjmp)
4608 mov %esi, %eax
4609 movq %r8,%rsp
4610 movq %r9,%rbp
4611 + LIBC_PROBE (longjmp_target, 3, 8@%rdi, -4@%eax, 8@%rdx)
4612 jmpq *%rdx
4613 END (__longjmp)
4614 --- glibc-2.14/sysdeps/x86_64/setjmp.S
4615 +++ glibc-2.14-2/sysdeps/x86_64/setjmp.S
4616 @@ -1,5 +1,5 @@
4617 /* setjmp for x86-64.
4618 - Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
4619 + Copyright (C) 2001,2003,2005,2006,2011 Free Software Foundation, Inc.
4620 This file is part of the GNU C Library.
4621
4622 The GNU C Library is free software; you can redistribute it and/or
4623 @@ -20,6 +20,7 @@
4624 #include <sysdep.h>
4625 #include <jmpbuf-offsets.h>
4626 #include <asm-syntax.h>
4627 +#include <stap-probe.h>
4628
4629 ENTRY (__sigsetjmp)
4630 /* Save registers. */
4631 @@ -41,6 +42,7 @@ ENTRY (__sigsetjmp)
4632 #endif
4633 movq %rdx, (JB_RSP*8)(%rdi)
4634 movq (%rsp), %rax /* Save PC we are returning to now. */
4635 + LIBC_PROBE (setjmp, 3, 8@%rdi, -4@%esi, 8@%rax)
4636 #ifdef PTR_MANGLE
4637 PTR_MANGLE (%rax)
4638 #endif
4639 --- glibc-2.14/timezone/zic.c
4640 +++ glibc-2.14-2/timezone/zic.c
4641 @@ -1921,7 +1921,7 @@ const int zonecount;
4642 if (stdrp != NULL && stdrp->r_hiyear == 2037)
4643 return;
4644 }
4645 - if (stdrp == NULL && zp->z_nrules != 0)
4646 + if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_stdoff != 0))
4647 return;
4648 abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar;
4649 doabbr(result, zp->z_format, abbrvar, FALSE, TRUE);