1 --- elfutils/backends/ChangeLog
2 +++ elfutils/backends/ChangeLog
4 * ppc_attrs.c (ppc_check_object_attribute): Handle tag
5 GNU_Power_ABI_Struct_Return.
7 +2009-01-23 Roland McGrath <roland@redhat.com>
9 + * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
11 2008-10-04 Ulrich Drepper <drepper@redhat.com>
13 * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
15 * sparc_init.c: Likewise.
16 * x86_64_init.c: Likewise.
18 +2005-11-22 Roland McGrath <roland@redhat.com>
20 + * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
21 + (libebl_%.so rule): Use it in place of -Wl,--as-needed.
23 2005-11-19 Roland McGrath <roland@redhat.com>
25 * ppc64_reloc.def: REL30 -> ADDR30.
27 * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
28 (CLEANFILES): Add libebl_$(m).so.
30 + * Makefile.am (WEXTRA): New variable, substituted by configure.
31 + (AM_CFLAGS): Use it in place of -Wextra.
33 * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
34 * ppc64_reloc.def: Likewise.
36 --- elfutils/backends/Makefile.am
37 +++ elfutils/backends/Makefile.am
38 @@ -112,7 +112,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
39 $(LINK) -shared -o $(@:.map=.so) \
40 -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
41 -Wl,--version-script,$(@:.so=.map) \
42 - -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
43 + -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
46 libebl_i386.so: $(cpu_i386)
47 --- elfutils/backends/Makefile.in
48 +++ elfutils/backends/Makefile.in
49 @@ -83,7 +83,8 @@ host_triplet = @host@
50 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
51 $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
52 $(noinst_HEADERS) ChangeLog
53 -@MUDFLAP_TRUE@am__append_1 = -fmudflap
54 +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
55 +@MUDFLAP_TRUE@am__append_2 = -fmudflap
57 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
58 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
59 @@ -266,6 +267,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
60 INSTALL_SCRIPT = @INSTALL_SCRIPT@
61 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
63 +LD_AS_NEEDED = @LD_AS_NEEDED@
66 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
67 @@ -295,6 +297,7 @@ SHELL = @SHELL@
73 XGETTEXT_015 = @XGETTEXT_015@
74 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
75 @@ -357,10 +360,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
76 -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
77 -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
78 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
79 - $($(*F)_no_Werror),,-Werror) $(if \
80 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
81 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
82 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
84 + $(am__append_1) $(am__append_2)
85 @MUDFLAP_FALSE@libmudflap =
86 @MUDFLAP_TRUE@libmudflap = -lmudflap
87 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
88 @@ -834,7 +836,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
89 $(LINK) -shared -o $(@:.map=.so) \
90 -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
91 -Wl,--version-script,$(@:.so=.map) \
92 - -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
93 + -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
96 libebl_i386.so: $(cpu_i386)
97 --- elfutils/ChangeLog
98 +++ elfutils/ChangeLog
101 2012-01-24 Mark Wielaard <mjw@redhat.com>
103 + * configure.ac: Wrap AC_COMPILE_IFELSE sources in AC_LANG_SOURCE.
105 * COPYING: Fix address. Updated version from gnulib.
107 2012-01-23 Mark Wielaard <mjw@redhat.com>
110 2011-10-08 Mike Frysinger <vapier@gentoo.org>
112 + * configure.ac (--disable-werror): Handle it, controlling BUILD_WERROR
115 * configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly.
117 2011-10-02 Ulrich Drepper <drepper@gmail.com>
120 * configure.ac (LOCALEDIR, DATADIRNAME): Removed.
122 +2009-11-22 Roland McGrath <roland@redhat.com>
124 + * configure.ac: Use sed and expr instead of modern bash extensions.
126 2009-09-21 Ulrich Drepper <drepper@redhat.com>
128 * configure.ac: Update for more modern autoconf.
131 * configure.ac (zip_LIBS): Check for liblzma too.
133 +2009-08-17 Roland McGrath <roland@redhat.com>
135 + * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
137 2009-04-19 Roland McGrath <roland@redhat.com>
139 * configure.ac (eu_version): Round down here, not in version.h macros.
142 2009-01-23 Roland McGrath <roland@redhat.com>
144 + * configure.ac: Check for __builtin_popcount.
146 * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
148 * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
150 * configure.ac: Add dummy automake conditional to get dependencies
151 for non-generic linker right. See src/Makefile.am.
153 +2005-11-22 Roland McGrath <roland@redhat.com>
155 + * configure.ac: Check for --as-needed linker option.
157 2005-11-18 Roland McGrath <roland@redhat.com>
159 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
161 * Makefile.am (all_SUBDIRS): Add libdwfl.
162 * configure.ac: Write libdwfl/Makefile.
164 +2005-05-31 Roland McGrath <roland@redhat.com>
166 + * configure.ac (WEXTRA): Check for -Wextra and set this substitution.
168 + * configure.ac: Check for struct stat st_?tim members.
169 + * src/strip.c (process_file): Use st_?time if st_?tim are not there.
171 + * configure.ac: Check for futimes function.
172 + * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
173 + (handle_ar) [! HAVE_FUTIMES]: Likewise.
175 2005-05-19 Roland McGrath <roland@redhat.com>
177 * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
178 --- elfutils/config/ChangeLog
179 +++ elfutils/config/ChangeLog
182 * known-dwarf.awk: Use gawk.
184 +2011-10-08 Mike Frysinger <vapier@gentoo.org>
186 + * eu.am [BUILD_WERROR]: Conditionalize -Werror use on this.
188 2010-07-02 Ulrich Drepper <drepper@redhat.com>
190 * elfutils.spec.in: Add more BuildRequires.
191 --- elfutils/config/eu.am
192 +++ elfutils/config/eu.am
194 ## Common automake fragments for elfutils subdirectory makefiles.
196 -## Copyright (C) 2010 Red Hat, Inc.
197 +## Copyright (C) 2010-2011 Red Hat, Inc.
199 ## This file is part of elfutils.
202 ## not, see <http://www.gnu.org/licenses/>.
206 +LD_AS_NEEDED = @LD_AS_NEEDED@
208 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
209 AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
210 AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
211 - $(if $($(*F)_no_Werror),,-Werror) \
212 - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
213 + $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
214 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
218 +AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror)
222 AM_CFLAGS += -fmudflap
223 libmudflap = -lmudflap
224 --- elfutils/config/Makefile.in
225 +++ elfutils/config/Makefile.in
226 @@ -140,6 +140,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
227 INSTALL_SCRIPT = @INSTALL_SCRIPT@
228 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
230 +LD_AS_NEEDED = @LD_AS_NEEDED@
233 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
234 @@ -169,6 +170,7 @@ SHELL = @SHELL@
239 XGETTEXT = @XGETTEXT@
240 XGETTEXT_015 = @XGETTEXT_015@
241 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
242 --- elfutils/config.h.in
243 +++ elfutils/config.h.in
245 /* Defined if libdw should support GNU ref_alt FORM, dwz multi files. */
248 +/* Have __builtin_popcount. */
249 +#undef HAVE_BUILTIN_POPCOUNT
251 /* $libdir subdirectory containing libebl modules. */
255 /* Define for large files, on AIX-style hosts. */
258 +/* Stubbed out if missing compiler support. */
261 #include <eu-config.h>
262 --- elfutils/configure
263 +++ elfutils/configure
264 @@ -618,6 +618,8 @@ ZLIB_TRUE
273 @@ -635,6 +637,8 @@ NEVER_TRUE
282 @@ -755,6 +759,7 @@ enable_debugpred
290 @@ -1412,6 +1417,7 @@ Optional Features:
291 --enable-gprof build binaries with gprof support
292 --enable-gcov build binaries with gcov support
293 --enable-valgrind run all tests under valgrind
294 + --disable-werror do not build with -Werror
295 --enable-tests-rpath build $ORIGIN-using rpath into tests
296 --enable-libebl-subdir=DIR
297 install libebl_CPU modules in $(libdir)/DIR
298 @@ -4012,6 +4018,130 @@ if test "x$ac_cv_c99" != xyes; then :
299 as_fn_error $? "gcc with C99 support required" "$LINENO" 5
302 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra option to $CC" >&5
303 +$as_echo_n "checking for -Wextra option to $CC... " >&6; }
304 +if ${ac_cv_cc_wextra+:} false; then :
305 + $as_echo_n "(cached) " >&6
307 + old_CFLAGS="$CFLAGS"
308 +CFLAGS="$CFLAGS -Wextra"
309 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
310 +/* end confdefs.h. */
313 +if ac_fn_c_try_compile "$LINENO"; then :
314 + ac_cv_cc_wextra=yes
318 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
319 +CFLAGS="$old_CFLAGS"
321 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_wextra" >&5
322 +$as_echo "$ac_cv_cc_wextra" >&6; }
324 +if test "x$ac_cv_cc_wextra" = xyes; then :
330 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline option to $CC" >&5
331 +$as_echo_n "checking for -fgnu89-inline option to $CC... " >&6; }
332 +if ${ac_cv_cc_gnu89_inline+:} false; then :
333 + $as_echo_n "(cached) " >&6
335 + old_CFLAGS="$CFLAGS"
336 +CFLAGS="$CFLAGS -fgnu89-inline -Werror"
337 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
338 +/* end confdefs.h. */
342 + inline void bar (void) {}
345 +extern inline void baz (void) {}
348 +if ac_fn_c_try_compile "$LINENO"; then :
349 + ac_cv_cc_gnu89_inline=yes
351 + ac_cv_cc_gnu89_inline=no
353 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
354 +CFLAGS="$old_CFLAGS"
356 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_gnu89_inline" >&5
357 +$as_echo "$ac_cv_cc_gnu89_inline" >&6; }
358 +if test "x$ac_cv_cc_gnu89_inline" = xyes; then :
359 + WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"
362 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker option" >&5
363 +$as_echo_n "checking for --as-needed linker option... " >&6; }
364 +if ${ac_cv_as_needed+:} false; then :
365 + $as_echo_n "(cached) " >&6
367 + cat > conftest.c <<EOF
368 +int main (void) { return 0; }
370 +if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
371 + -fPIC -shared -o conftest.so conftest.c
372 + -Wl,--as-needed 1>&5'
373 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
374 + (eval $ac_try) 2>&5
376 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
377 + test $ac_status = 0; }; }
379 + ac_cv_as_needed=yes
385 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_as_needed" >&5
386 +$as_echo "$ac_cv_as_needed" >&6; }
387 +if test "x$ac_cv_as_needed" = xyes; then :
388 + LD_AS_NEEDED=-Wl,--as-needed
394 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
395 +$as_echo_n "checking for __builtin_popcount... " >&6; }
396 +if ${ac_cv_popcount+:} false; then :
397 + $as_echo_n "(cached) " >&6
399 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
400 +/* end confdefs.h. */
405 +exit (__builtin_popcount (127));
410 +if ac_fn_c_try_link "$LINENO"; then :
415 +rm -f core conftest.err conftest.$ac_objext \
416 + conftest$ac_exeext conftest.$ac_ext
418 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_popcount" >&5
419 +$as_echo "$ac_cv_popcount" >&6; }
420 +if test "x$ac_cv_popcount" = xyes; then :
422 +$as_echo "#define HAVE_BUILTIN_POPCOUNT 1" >>confdefs.h
426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5
427 $as_echo_n "checking for __thread support... " >&6; }
428 if ${ac_cv_tls+:} false; then :
429 @@ -4048,7 +4178,13 @@ fi
430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
431 $as_echo "$ac_cv_tls" >&6; }
432 if test "x$ac_cv_tls" != xyes; then :
433 - as_fn_error $? "__thread support required" "$LINENO" 5
434 + if test "$use_locks" = yes; then :
435 + as_fn_error $? "--enable-thread-safety requires __thread support" "$LINENO" 5
438 +$as_echo "#define __thread /* empty: no multi-thread support */" >>confdefs.h
443 # Check whether --enable-largefile was given.
444 @@ -4458,6 +4594,22 @@ else
448 +# Check whether --enable-werror was given.
449 +if test "${enable_werror+set}" = set; then :
450 + enableval=$enable_werror; enable_werror=$enableval
455 + if test "$enable_werror" = yes; then
457 + BUILD_WERROR_FALSE='#'
459 + BUILD_WERROR_TRUE='#'
460 + BUILD_WERROR_FALSE=
464 # Check whether --enable-tests-rpath was given.
465 if test "${enable_tests_rpath+set}" = set; then :
466 enableval=$enable_tests_rpath; tests_use_rpath=$enableval
467 @@ -5178,7 +5330,7 @@ case "$eu_version" in
470 # Round up to the next release API (x.y) version.
471 -eu_version=$(( (eu_version + 999) / 1000 ))
472 +eu_version=`expr \( $eu_version + 999 \) / 1000`
474 cat >confcache <<\_ACEOF
475 # This file is a shell script that caches the results of configure
476 @@ -5353,6 +5505,10 @@ if test -z "${BUILD_STATIC_TRUE}" && tes
477 as_fn_error $? "conditional \"BUILD_STATIC\" was never defined.
478 Usually this means the macro was only invoked conditionally." "$LINENO" 5
480 +if test -z "${BUILD_WERROR_TRUE}" && test -z "${BUILD_WERROR_FALSE}"; then
481 + as_fn_error $? "conditional \"BUILD_WERROR\" was never defined.
482 +Usually this means the macro was only invoked conditionally." "$LINENO" 5
484 if test -z "${TESTS_RPATH_TRUE}" && test -z "${TESTS_RPATH_FALSE}"; then
485 as_fn_error $? "conditional \"TESTS_RPATH\" was never defined.
486 Usually this means the macro was only invoked conditionally." "$LINENO" 5
487 --- elfutils/configure.ac
488 +++ elfutils/configure.ac
489 @@ -90,6 +90,54 @@ CFLAGS="$old_CFLAGS"])
490 AS_IF([test "x$ac_cv_c99" != xyes],
491 AC_MSG_ERROR([gcc with C99 support required]))
493 +AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
494 +old_CFLAGS="$CFLAGS"
495 +CFLAGS="$CFLAGS -Wextra"
496 +AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo (void) { }])],
497 + ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
498 +CFLAGS="$old_CFLAGS"])
500 +AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
502 +AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
503 +old_CFLAGS="$CFLAGS"
504 +CFLAGS="$CFLAGS -fgnu89-inline -Werror"
505 +AC_COMPILE_IFELSE([AC_LANG_SOURCE([
508 + inline void bar (void) {}
511 +extern inline void baz (void) {}
512 +])], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
513 +CFLAGS="$old_CFLAGS"])
514 +AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
515 + [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
517 +AC_CACHE_CHECK([for --as-needed linker option],
518 + ac_cv_as_needed, [dnl
519 +cat > conftest.c <<EOF
520 +int main (void) { return 0; }
522 +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
523 + -fPIC -shared -o conftest.so conftest.c
524 + -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
526 + ac_cv_as_needed=yes
531 +AS_IF([test "x$ac_cv_as_needed" = xyes],
532 + [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
533 +AC_SUBST(LD_AS_NEEDED)
535 +AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
536 +AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
537 + ac_cv_popcount=yes, ac_cv_popcount=no)])
538 +AS_IF([test "x$ac_cv_popcount" = xyes],
539 + [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
541 AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
542 # Use the same flags that we use for our DSOs, so the test is representative.
543 # Some old compiler/linker/libc combinations fail some ways and not others.
544 @@ -105,7 +153,10 @@ static __thread int a; int foo (int b) {
545 CFLAGS="$save_CFLAGS"
546 LDFLAGS="$save_LDFLAGS"])
547 AS_IF([test "x$ac_cv_tls" != xyes],
548 - AC_MSG_ERROR([__thread support required]))
549 + [AS_IF([test "$use_locks" = yes],
550 + [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
551 + [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
552 + [Stubbed out if missing compiler support.])])])
554 dnl This test must come as early as possible after the compiler configuration
555 dnl tests, because the choice of the file model can (in principle) affect
556 @@ -204,6 +255,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_
557 AM_CONDITIONAL(BUILD_STATIC, [dnl
558 test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes])
560 +AC_ARG_ENABLE([werror],
561 +AS_HELP_STRING([--disable-werror],[do not build with -Werror]),
562 + [enable_werror=$enableval], [enable_werror=yes])
563 +AM_CONDITIONAL(BUILD_WERROR, test "$enable_werror" = yes)
565 AC_ARG_ENABLE([tests-rpath],
566 AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
567 [tests_use_rpath=$enableval], [tests_use_rpath=no])
568 @@ -315,6 +371,6 @@ case "$eu_version" in
571 # Round up to the next release API (x.y) version.
572 -eu_version=$(( (eu_version + 999) / 1000 ))
573 +eu_version=`expr \( $eu_version + 999 \) / 1000`
576 --- elfutils/lib/ChangeLog
577 +++ elfutils/lib/ChangeLog
580 2009-01-23 Roland McGrath <roland@redhat.com>
582 + * eu-config.h [! HAVE_BUILTIN_POPCOUNT]
583 + (__builtin_popcount): New inline function.
585 * eu-config.h: Add multiple inclusion protection.
587 2009-01-17 Ulrich Drepper <drepper@redhat.com>
589 * Makefile.am (libeu_a_SOURCES): Add it.
590 * system.h: Declare crc32_file.
592 +2005-02-07 Roland McGrath <roland@redhat.com>
594 + * Makefile.am (WEXTRA): New variable, substituted by configure.
595 + (AM_CFLAGS): Use it in place of -Wextra.
597 2005-04-30 Ulrich Drepper <drepper@redhat.com>
599 * Makefile.am: Use -ffunction-sections for xmalloc.c.
600 --- elfutils/lib/eu-config.h
601 +++ elfutils/lib/eu-config.h
602 @@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr
603 /* This macro is used by the tests conditionalize for standalone building. */
604 #define ELFUTILS_HEADER(name) <lib##name.h>
606 +#ifndef HAVE_BUILTIN_POPCOUNT
607 +# define __builtin_popcount hakmem_popcount
608 +static inline unsigned int __attribute__ ((unused))
609 +hakmem_popcount (unsigned int x)
612 + unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
613 + return ((n + (n >> 3)) & 030707070707) % 63;
615 +#endif /* HAVE_BUILTIN_POPCOUNT */
619 # define OLD_VERSION(name, version) \
620 --- elfutils/lib/Makefile.in
621 +++ elfutils/lib/Makefile.in
622 @@ -82,7 +82,8 @@ host_triplet = @host@
623 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
624 $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
625 $(noinst_HEADERS) ChangeLog
626 -@MUDFLAP_TRUE@am__append_1 = -fmudflap
627 +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
628 +@MUDFLAP_TRUE@am__append_2 = -fmudflap
630 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
631 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
632 @@ -193,6 +194,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
633 INSTALL_SCRIPT = @INSTALL_SCRIPT@
634 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
636 +LD_AS_NEEDED = @LD_AS_NEEDED@
639 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
640 @@ -222,6 +224,7 @@ SHELL = @SHELL@
645 XGETTEXT = @XGETTEXT@
646 XGETTEXT_015 = @XGETTEXT_015@
647 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
648 @@ -283,10 +286,9 @@ zip_LIBS = @zip_LIBS@
649 AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
650 -I$(srcdir)/../libelf
651 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
652 - $($(*F)_no_Werror),,-Werror) $(if \
653 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
654 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
655 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
656 - $(am__append_1) -fpic
657 + $(am__append_1) $(am__append_2) -fpic
658 @MUDFLAP_FALSE@libmudflap =
659 @MUDFLAP_TRUE@libmudflap = -lmudflap
660 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
661 --- elfutils/libasm/ChangeLog
662 +++ elfutils/libasm/ChangeLog
664 * asm_error.c: Add new error ASM_E_IOERROR.
665 * libasmP.h: Add ASM_E_IOERROR definition.
667 +2005-05-31 Roland McGrath <roland@redhat.com>
669 + * Makefile.am (WEXTRA): New variable, substituted by configure.
670 + (AM_CFLAGS): Use it in place of -Wextra.
672 2005-02-15 Ulrich Drepper <drepper@redhat.com>
674 * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
675 --- elfutils/libasm/Makefile.in
676 +++ elfutils/libasm/Makefile.in
677 @@ -83,10 +83,11 @@ host_triplet = @host@
678 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
679 $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
680 $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog
681 -@MUDFLAP_TRUE@am__append_1 = -fmudflap
682 +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
683 +@MUDFLAP_TRUE@am__append_2 = -fmudflap
684 @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
685 @MUDFLAP_TRUE@am_libasm_pic_a_OBJECTS =
686 -@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_2 = -lpthread
687 +@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_3 = -lpthread
689 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
690 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
691 @@ -245,6 +246,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
692 INSTALL_SCRIPT = @INSTALL_SCRIPT@
693 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
695 +LD_AS_NEEDED = @LD_AS_NEEDED@
698 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
699 @@ -274,6 +276,7 @@ SHELL = @SHELL@
704 XGETTEXT = @XGETTEXT@
705 XGETTEXT_015 = @XGETTEXT_015@
706 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
707 @@ -336,10 +339,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
708 -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
709 -I$(top_srcdir)/libdw
710 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
711 - $($(*F)_no_Werror),,-Werror) $(if \
712 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
713 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
714 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
716 + $(am__append_1) $(am__append_2)
717 @MUDFLAP_FALSE@libmudflap =
718 @MUDFLAP_TRUE@libmudflap = -lmudflap
719 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
720 @@ -368,7 +370,7 @@ libasm_a_SOURCES = asm_begin.c asm_abort
722 @MUDFLAP_FALSE@libasm_pic_a_SOURCES =
723 @MUDFLAP_FALSE@am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os)
724 -@MUDFLAP_FALSE@libasm_so_LDLIBS = $(am__append_2)
725 +@MUDFLAP_FALSE@libasm_so_LDLIBS = $(am__append_3)
726 @MUDFLAP_FALSE@libasm_so_SOURCES =
727 noinst_HEADERS = libasmP.h symbolhash.h
728 EXTRA_DIST = libasm.map
729 --- elfutils/libcpu/ChangeLog
730 +++ elfutils/libcpu/ChangeLog
733 2009-01-23 Roland McGrath <roland@redhat.com>
735 + * i386_disasm.c (i386_disasm): Add abort after assert-constant for old
736 + compilers that don't realize it's noreturn.
738 * Makefile.am (i386_parse_CFLAGS): Use quotes around command
739 substitution that can produce leading whitespace.
742 * defs/i386.doc: New file.
743 * defs/x86_64: New file.
745 +2005-04-04 Roland McGrath <roland@redhat.com>
747 + * Makefile.am (WEXTRA): New variable, substituted by configure.
748 + (AM_CFLAGS): Use it instead of -Wextra.
750 2005-02-15 Ulrich Drepper <drepper@redhat.com>
752 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
753 --- elfutils/libcpu/i386_disasm.c
754 +++ elfutils/libcpu/i386_disasm.c
755 @@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con
758 assert (! "INVALID not handled");
763 --- elfutils/libcpu/Makefile.in
764 +++ elfutils/libcpu/Makefile.in
765 @@ -84,7 +84,8 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
766 $(srcdir)/Makefile.am i386_lex.c i386_parse.c \
767 $(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \
768 $(am__noinst_HEADERS_DIST) ChangeLog
769 -@MUDFLAP_TRUE@am__append_1 = -fmudflap
770 +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
771 +@MUDFLAP_TRUE@am__append_2 = -fmudflap
772 @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = i386_gendis$(EXEEXT)
774 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
775 @@ -220,6 +221,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
776 INSTALL_SCRIPT = @INSTALL_SCRIPT@
777 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
779 +LD_AS_NEEDED = @LD_AS_NEEDED@
782 LEX_OUTPUT_ROOT = lex.$(<F:lex.l=)
783 @@ -249,6 +251,7 @@ SHELL = @SHELL@
788 XGETTEXT = @XGETTEXT@
789 XGETTEXT_015 = @XGETTEXT_015@
790 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
791 @@ -311,10 +314,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
792 -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
793 -I$(srcdir)/../libdw -I$(srcdir)/../libasm
794 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
795 - $($(*F)_no_Werror),,-Werror) $(if \
796 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
797 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
798 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
799 - $(am__append_1) -fpic -fdollars-in-identifiers
800 + $(am__append_1) $(am__append_2) -fpic -fdollars-in-identifiers
801 @MUDFLAP_FALSE@libmudflap =
802 @MUDFLAP_TRUE@libmudflap = -lmudflap
803 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
804 --- elfutils/libdw/ChangeLog
805 +++ elfutils/libdw/ChangeLog
808 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
810 +2011-07-20 Mark Wielaard <mjw@redhat.com>
812 + * dwarf_begin_elf.c: Add fallback for be64toh if not defined.
814 2011-07-14 Mark Wielaard <mjw@redhat.com>
816 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
819 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
821 +2009-08-17 Roland McGrath <roland@redhat.com>
823 + * libdw.h: Disable extern inlines for GCC 4.2.
825 2009-08-10 Roland McGrath <roland@redhat.com>
827 * dwarf_getscopevar.c: Use dwarf_diename.
828 @@ -1304,6 +1312,11 @@
830 2005-05-31 Roland McGrath <roland@redhat.com>
832 + * Makefile.am (WEXTRA): New variable, substituted by configure.
833 + (AM_CFLAGS): Use it in place of -Wextra.
835 +2005-05-31 Roland McGrath <roland@redhat.com>
837 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
840 --- elfutils/libdw/dwarf_begin_elf.c
841 +++ elfutils/libdw/dwarf_begin_elf.c
845 # define crc32 loser_crc32
847 +# include <byteswap.h>
848 +# if __BYTE_ORDER == __LITTLE_ENDIAN
849 +# define be64toh(x) bswap_64 (x)
851 +# define be64toh(x) (x)
857 --- elfutils/libdw/libdw.h
858 +++ elfutils/libdw/libdw.h
859 @@ -831,7 +831,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
862 /* Inline optimizations. */
864 +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
865 /* Return attribute code of given attribute. */
866 __libdw_extern_inline unsigned int
867 dwarf_whatattr (Dwarf_Attribute *attr)
868 --- elfutils/libdw/Makefile.in
869 +++ elfutils/libdw/Makefile.in
870 @@ -84,8 +84,9 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
871 $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
872 $(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \
874 -@MUDFLAP_TRUE@am__append_1 = -fmudflap
875 -@BUILD_STATIC_TRUE@am__append_2 = -fpic
876 +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
877 +@MUDFLAP_TRUE@am__append_2 = -fmudflap
878 +@BUILD_STATIC_TRUE@am__append_3 = -fpic
879 @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
880 @MUDFLAP_TRUE@am_libdw_pic_a_OBJECTS =
882 @@ -291,6 +292,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
883 INSTALL_SCRIPT = @INSTALL_SCRIPT@
884 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
886 +LD_AS_NEEDED = @LD_AS_NEEDED@
889 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
890 @@ -320,6 +322,7 @@ SHELL = @SHELL@
895 XGETTEXT = @XGETTEXT@
896 XGETTEXT_015 = @XGETTEXT_015@
897 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
898 @@ -381,10 +384,9 @@ zip_LIBS = @zip_LIBS@
899 AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
900 -I$(srcdir)/../libelf
901 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
902 - $($(*F)_no_Werror),,-Werror) $(if \
903 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
904 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
905 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
906 - $(am__append_1) $(am__append_2)
907 + $(am__append_1) $(am__append_2) $(am__append_3)
908 @MUDFLAP_FALSE@libmudflap =
909 @MUDFLAP_TRUE@libmudflap = -lmudflap
910 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
911 --- elfutils/libdwfl/ChangeLog
912 +++ elfutils/libdwfl/ChangeLog
913 @@ -1624,6 +1624,11 @@
915 2005-07-21 Roland McGrath <roland@redhat.com>
917 + * Makefile.am (WEXTRA): New variable, substituted by configure.
918 + (AM_CFLAGS): Use it in place of -Wextra.
920 +2005-07-21 Roland McGrath <roland@redhat.com>
922 * Makefile.am (noinst_HEADERS): Add loc2c.c.
924 * test2.c (main): Check sscanf result to quiet warning.
925 --- elfutils/libdwfl/Makefile.in
926 +++ elfutils/libdwfl/Makefile.in
927 @@ -82,11 +82,12 @@ host_triplet = @host@
928 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
929 $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
930 $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog
931 -@MUDFLAP_TRUE@am__append_1 = -fmudflap
932 -@MUDFLAP_FALSE@am__append_2 = libdwfl_pic.a
933 -@ZLIB_TRUE@am__append_3 = gzip.c
934 -@BZLIB_TRUE@am__append_4 = bzip2.c
935 -@LZMA_TRUE@am__append_5 = lzma.c
936 +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
937 +@MUDFLAP_TRUE@am__append_2 = -fmudflap
938 +@MUDFLAP_FALSE@am__append_3 = libdwfl_pic.a
939 +@ZLIB_TRUE@am__append_4 = gzip.c
940 +@BZLIB_TRUE@am__append_5 = bzip2.c
941 +@LZMA_TRUE@am__append_6 = lzma.c
942 @MUDFLAP_TRUE@am_libdwfl_pic_a_OBJECTS =
944 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
945 @@ -280,6 +281,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
946 INSTALL_SCRIPT = @INSTALL_SCRIPT@
947 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
949 +LD_AS_NEEDED = @LD_AS_NEEDED@
952 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
953 @@ -309,6 +311,7 @@ SHELL = @SHELL@
958 XGETTEXT = @XGETTEXT@
959 XGETTEXT_015 = @XGETTEXT_015@
960 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
961 @@ -371,10 +374,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
962 -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
964 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
965 - $($(*F)_no_Werror),,-Werror) $(if \
966 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
967 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
968 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
970 + $(am__append_1) $(am__append_2)
971 @MUDFLAP_FALSE@libmudflap =
972 @MUDFLAP_TRUE@libmudflap = -lmudflap
973 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
974 @@ -382,7 +384,7 @@ COMPILE.os = $(filter-out -fprofile-arcs
976 CLEANFILES = *.gcno *.gcda $(am_libdwfl_pic_a_OBJECTS)
977 textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
978 -noinst_LIBRARIES = libdwfl.a $(am__append_2)
979 +noinst_LIBRARIES = libdwfl.a $(am__append_3)
980 pkginclude_HEADERS = libdwfl.h
981 libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c \
982 dwfl_version.c dwfl_module.c dwfl_report_elf.c relocate.c \
983 @@ -403,8 +405,8 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en
984 dwfl_module_getsym.c dwfl_module_addrname.c \
985 dwfl_module_addrsym.c dwfl_module_return_value_location.c \
986 dwfl_module_register_names.c dwfl_segment_report_module.c \
987 - link_map.c core-file.c open.c image-header.c $(am__append_3) \
988 - $(am__append_4) $(am__append_5)
989 + link_map.c core-file.c open.c image-header.c $(am__append_4) \
990 + $(am__append_5) $(am__append_6)
991 @MUDFLAP_FALSE@libdwfl = $(libdw)
992 @MUDFLAP_TRUE@libdwfl = libdwfl.a $(libdw) $(libebl) $(libelf) $(libeu)
993 @MUDFLAP_FALSE@libdw = ../libdw/libdw.so
994 --- elfutils/libebl/ChangeLog
995 +++ elfutils/libebl/ChangeLog
997 * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
998 tracking works right.
1000 +2005-05-31 Roland McGrath <roland@redhat.com>
1002 + * Makefile.am (WEXTRA): New variable, substituted by configure.
1003 + (AM_CFLAGS): Use it in place of -Wextra.
1005 2005-05-21 Ulrich Drepper <drepper@redhat.com>
1007 * libebl_x86_64.map: Add x86_64_core_note.
1008 --- elfutils/libebl/Makefile.in
1009 +++ elfutils/libebl/Makefile.in
1010 @@ -82,7 +82,8 @@ host_triplet = @host@
1011 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
1012 $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
1013 $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog
1014 -@MUDFLAP_TRUE@am__append_1 = -fmudflap
1015 +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
1016 +@MUDFLAP_TRUE@am__append_2 = -fmudflap
1018 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
1019 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
1020 @@ -242,6 +243,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
1021 INSTALL_SCRIPT = @INSTALL_SCRIPT@
1022 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
1024 +LD_AS_NEEDED = @LD_AS_NEEDED@
1027 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
1028 @@ -271,6 +273,7 @@ SHELL = @SHELL@
1033 XGETTEXT = @XGETTEXT@
1034 XGETTEXT_015 = @XGETTEXT_015@
1035 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
1036 @@ -333,10 +336,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
1037 -I$(srcdir)/../libelf -I$(srcdir)/../libdw \
1038 -I$(srcdir)/../libasm
1039 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
1040 - $($(*F)_no_Werror),,-Werror) $(if \
1041 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
1042 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
1043 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
1044 - $(am__append_1) -fpic
1045 + $(am__append_1) $(am__append_2) -fpic
1046 @MUDFLAP_FALSE@libmudflap =
1047 @MUDFLAP_TRUE@libmudflap = -lmudflap
1048 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
1049 --- elfutils/libelf/ChangeLog
1050 +++ elfutils/libelf/ChangeLog
1053 * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
1055 +2011-03-10 Roland McGrath <roland@redhat.com>
1057 + * gnuhash_xlate.h (elf_cvt_gnuhash): Avoid post-increment in bswap_32
1058 + argument, since some implementations are buggy macros.
1060 2011-02-26 Mark Wielaard <mjw@redhat.com>
1062 * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
1063 @@ -723,6 +728,11 @@
1065 * elf.h: Update from glibc.
1067 +2005-05-31 Roland McGrath <roland@redhat.com>
1069 + * Makefile.am (WEXTRA): New variable, substituted by configure.
1070 + (AM_CFLAGS): Use it in place of -Wextra.
1072 2005-05-08 Roland McGrath <roland@redhat.com>
1074 * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
1075 --- elfutils/libelf/common.h
1076 +++ elfutils/libelf/common.h
1077 @@ -139,7 +139,7 @@ libelf_release_all (Elf *elf)
1078 (Var) = (sizeof (Var) == 1 \
1079 ? (unsigned char) (Var) \
1080 : (sizeof (Var) == 2 \
1081 - ? bswap_16 (Var) \
1082 + ? (unsigned short int) bswap_16 (Var) \
1083 : (sizeof (Var) == 4 \
1086 @@ -148,7 +148,7 @@ libelf_release_all (Elf *elf)
1087 (Dst) = (sizeof (Var) == 1 \
1088 ? (unsigned char) (Var) \
1089 : (sizeof (Var) == 2 \
1090 - ? bswap_16 (Var) \
1091 + ? (unsigned short int) bswap_16 (Var) \
1092 : (sizeof (Var) == 4 \
1095 --- elfutils/libelf/gnuhash_xlate.h
1096 +++ elfutils/libelf/gnuhash_xlate.h
1098 /* Conversion functions for versioning information.
1099 - Copyright (C) 2006, 2007 Red Hat, Inc.
1100 + Copyright (C) 2006-2011 Red Hat, Inc.
1101 This file is part of elfutils.
1102 Written by Ulrich Drepper <drepper@redhat.com>, 2006.
1104 @@ -68,7 +68,9 @@ elf_cvt_gnuhash (void *dest, const void
1105 dest32 = (Elf32_Word *) &dest64[bitmask_words];
1108 - *dest32++ = bswap_32 (*src32++);
1109 + *dest32 = bswap_32 (*src32);
1115 --- elfutils/libelf/Makefile.in
1116 +++ elfutils/libelf/Makefile.in
1117 @@ -84,11 +84,12 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
1118 $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
1119 $(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \
1121 -@MUDFLAP_TRUE@am__append_1 = -fmudflap
1122 -@BUILD_STATIC_TRUE@am__append_2 = -fpic
1123 +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
1124 +@MUDFLAP_TRUE@am__append_2 = -fmudflap
1125 +@BUILD_STATIC_TRUE@am__append_3 = -fpic
1126 @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
1127 @MUDFLAP_TRUE@am_libelf_pic_a_OBJECTS =
1128 -@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_3 = -lpthread
1129 +@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_4 = -lpthread
1131 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
1132 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
1133 @@ -288,6 +289,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
1134 INSTALL_SCRIPT = @INSTALL_SCRIPT@
1135 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
1137 +LD_AS_NEEDED = @LD_AS_NEEDED@
1140 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
1141 @@ -317,6 +319,7 @@ SHELL = @SHELL@
1146 XGETTEXT = @XGETTEXT@
1147 XGETTEXT_015 = @XGETTEXT_015@
1148 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
1149 @@ -377,10 +380,9 @@ top_srcdir = @top_srcdir@
1150 zip_LIBS = @zip_LIBS@
1151 AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
1152 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
1153 - $($(*F)_no_Werror),,-Werror) $(if \
1154 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
1155 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
1156 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
1157 - $(am__append_1) $(am__append_2)
1158 + $(am__append_1) $(am__append_2) $(am__append_3)
1159 @MUDFLAP_FALSE@libmudflap =
1160 @MUDFLAP_TRUE@libmudflap = -lmudflap
1161 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
1162 @@ -445,7 +447,7 @@ libelf_a_SOURCES = elf_version.c elf_has
1164 @MUDFLAP_FALSE@libelf_pic_a_SOURCES =
1165 @MUDFLAP_FALSE@am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
1166 -@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_3)
1167 +@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_4)
1168 @MUDFLAP_FALSE@libelf_so_SOURCES =
1169 noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
1170 version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h
1171 --- elfutils/m4/Makefile.in
1172 +++ elfutils/m4/Makefile.in
1173 @@ -139,6 +139,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
1174 INSTALL_SCRIPT = @INSTALL_SCRIPT@
1175 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
1177 +LD_AS_NEEDED = @LD_AS_NEEDED@
1180 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
1181 @@ -168,6 +169,7 @@ SHELL = @SHELL@
1186 XGETTEXT = @XGETTEXT@
1187 XGETTEXT_015 = @XGETTEXT_015@
1188 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
1189 --- elfutils/Makefile.in
1190 +++ elfutils/Makefile.in
1191 @@ -256,6 +256,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
1192 INSTALL_SCRIPT = @INSTALL_SCRIPT@
1193 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
1195 +LD_AS_NEEDED = @LD_AS_NEEDED@
1198 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
1199 @@ -285,6 +286,7 @@ SHELL = @SHELL@
1204 XGETTEXT = @XGETTEXT@
1205 XGETTEXT_015 = @XGETTEXT_015@
1206 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
1207 --- elfutils/src/addr2line.c
1208 +++ elfutils/src/addr2line.c
1209 @@ -448,10 +448,10 @@ handle_address (const char *string, Dwfl
1210 bool parsed = false;
1213 - if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
1214 + if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
1215 && string[i] == '\0')
1216 parsed = adjust_to_section (name, &addr, dwfl);
1217 - switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
1218 + switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
1222 --- elfutils/src/ChangeLog
1223 +++ elfutils/src/ChangeLog
1224 @@ -766,8 +766,16 @@
1225 * readelf.c (attr_callback): Use print_block only when we don't use
1228 +2009-08-17 Roland McGrath <roland@redhat.com>
1230 + * ld.h: Disable extern inlines for GCC 4.2.
1232 2009-08-14 Roland McGrath <roland@redhat.com>
1234 + * strings.c (read_block): Conditionalize posix_fadvise use
1235 + on [POSIX_FADV_SEQUENTIAL].
1236 + From Petr Salinger <Petr.Salinger@seznam.cz>.
1238 * ar.c (do_oper_extract): Use pathconf instead of statfs.
1240 2009-08-01 Ulrich Drepper <drepper@redhat.com>
1242 * readelf.c (print_debug_frame_section): Use t instead of j formats
1243 for ptrdiff_t OFFSET.
1245 + * addr2line.c (handle_address): Use %a instead of %m for compatibility.
1247 2009-01-21 Ulrich Drepper <drepper@redhat.com>
1249 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
1250 @@ -1114,6 +1124,11 @@
1251 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
1254 +2008-03-01 Roland McGrath <roland@redhat.com>
1256 + * readelf.c (dump_archive_index): Tweak portability hack
1257 + to match [__GNUC__ < 4] too.
1259 2008-02-29 Roland McGrath <roland@redhat.com>
1261 * readelf.c (print_attributes): Add a cast.
1262 @@ -1365,6 +1380,8 @@
1264 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
1266 + * Makefile.am (readelf_no_Werror): New variable.
1268 2007-10-15 Roland McGrath <roland@redhat.com>
1270 * make-debug-archive.in: New file.
1271 @@ -1804,6 +1821,10 @@
1272 * elflint.c (valid_e_machine): Add EM_ALPHA.
1273 Reported by Christian Aichinger <Greek0@gmx.net>.
1275 + * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
1276 + MADV_SEQUENTIAL if undefined. Don't call posix_madvise
1277 + if neither is defined.
1279 2006-08-08 Ulrich Drepper <drepper@redhat.com>
1281 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
1282 @@ -1880,6 +1901,10 @@
1283 * Makefile.am: Add hacks to create dependency files for non-generic
1286 +2006-04-05 Roland McGrath <roland@redhat.com>
1288 + * strings.c (MAP_POPULATE): Define to 0 if undefined.
1290 2006-06-12 Ulrich Drepper <drepper@redhat.com>
1292 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
1293 @@ -2228,6 +2253,11 @@
1294 * readelf.c (print_debug_loc_section): Fix indentation for larger
1297 +2005-05-31 Roland McGrath <roland@redhat.com>
1299 + * Makefile.am (WEXTRA): New variable, substituted by configure.
1300 + (AM_CFLAGS): Use it in place of -Wextra.
1302 2005-05-30 Roland McGrath <roland@redhat.com>
1304 * readelf.c (print_debug_line_section): Print section offset of each
1305 --- elfutils/src/findtextrel.c
1306 +++ elfutils/src/findtextrel.c
1307 @@ -496,7 +496,11 @@ ptrcompare (const void *p1, const void *
1311 -check_rel (size_t nsegments, struct segments segments[nsegments],
1312 +check_rel (size_t nsegments, struct segments segments[
1317 GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
1318 const char *fname, bool more_than_one, void **knownsrcs)
1320 --- elfutils/src/ld.h
1321 +++ elfutils/src/ld.h
1322 @@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void);
1324 /* Checked whether the symbol is undefined and referenced from a DSO. */
1325 extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
1326 +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
1327 #ifdef __GNUC_STDC_INLINE__
1328 __attribute__ ((__gnu_inline__))
1330 @@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scnin
1332 return sym->defined && sym->in_dso;
1334 +#endif /* Optimizing and not GCC 4.2. */
1337 --- elfutils/src/Makefile.am
1338 +++ elfutils/src/Makefile.am
1339 @@ -95,6 +95,9 @@ addr2line_no_Wformat = yes
1340 # XXX While the file is not finished, don't warn about this
1341 ldgeneric_no_Wunused = yes
1343 +# Buggy old compilers.
1344 +readelf_no_Werror = yes
1346 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
1347 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \
1349 --- elfutils/src/Makefile.in
1350 +++ elfutils/src/Makefile.in
1351 @@ -85,7 +85,8 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
1352 $(srcdir)/Makefile.am ldlex.c ldscript.c \
1353 $(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \
1354 $(noinst_HEADERS) ChangeLog
1355 -@MUDFLAP_TRUE@am__append_1 = -fmudflap
1356 +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
1357 +@MUDFLAP_TRUE@am__append_2 = -fmudflap
1358 bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEEXT) size$(EXEEXT) \
1359 strip$(EXEEXT) ld$(EXEEXT) elflint$(EXEEXT) \
1360 findtextrel$(EXEEXT) addr2line$(EXEEXT) elfcmp$(EXEEXT) \
1361 @@ -94,9 +95,9 @@ bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEE
1362 @NATIVE_LD_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
1363 # We never build this library but we need to get the dependency files
1364 # of all the linker backends that might be used in a non-generic linker.
1365 -@NEVER_TRUE@am__append_2 = libdummy.a
1366 +@NEVER_TRUE@am__append_3 = libdummy.a
1367 # -ldl is always needed for libebl.
1368 -@NATIVE_LD_TRUE@am__append_3 = libld_elf.a
1369 +@NATIVE_LD_TRUE@am__append_4 = libld_elf.a
1370 @NATIVE_LD_TRUE@am_libld_elf_i386_pic_a_OBJECTS =
1372 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
1373 @@ -164,7 +165,7 @@ am_ld_OBJECTS = ld.$(OBJEXT) ldgeneric.$
1374 versionhash.$(OBJEXT)
1375 ld_OBJECTS = $(am_ld_OBJECTS)
1376 ld_DEPENDENCIES = $(libebl) $(libelf) $(libeu) $(am__DEPENDENCIES_1) \
1379 ld_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ld_LDFLAGS) $(LDFLAGS) -o \
1381 am_libld_elf_i386_so_OBJECTS =
1382 @@ -338,6 +339,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
1383 INSTALL_SCRIPT = @INSTALL_SCRIPT@
1384 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
1386 +LD_AS_NEEDED = @LD_AS_NEEDED@
1389 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
1390 @@ -367,6 +369,7 @@ SHELL = @SHELL@
1395 XGETTEXT = @XGETTEXT@
1396 XGETTEXT_015 = @XGETTEXT_015@
1397 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
1398 @@ -430,10 +433,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
1399 -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \
1400 -I$(srcdir)/../libasm
1401 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
1402 - $($(*F)_no_Werror),,-Werror) $(if \
1403 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
1404 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
1405 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
1407 + $(am__append_1) $(am__append_2)
1408 @MUDFLAP_FALSE@libmudflap =
1409 @MUDFLAP_TRUE@libmudflap = -lmudflap
1410 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
1411 @@ -449,8 +451,8 @@ AM_LFLAGS = -Pld -olex.yy.c
1412 native_ld = @native_ld@
1413 ld_dsos = libld_elf_i386_pic.a
1414 @NATIVE_LD_FALSE@noinst_LIBRARIES = libld_elf.a libar.a $(ld_dsos) \
1415 -@NATIVE_LD_FALSE@ $(am__append_2)
1416 -@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_2)
1417 +@NATIVE_LD_FALSE@ $(am__append_3)
1418 +@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_3)
1419 @NATIVE_LD_TRUE@native_ld_cflags = -DBASE_ELF_NAME=elf_$(base_cpu)
1420 @NEVER_TRUE@libdummy_a_SOURCES = i386_ld.c
1421 ld_SOURCES = ld.c ldgeneric.c ldlex.l ldscript.y symbolhash.c sectionhash.c \
1422 @@ -479,6 +481,9 @@ strings_no_Wformat = yes
1423 addr2line_no_Wformat = yes
1424 # XXX While the file is not finished, don't warn about this
1425 ldgeneric_no_Wunused = yes
1427 +# Buggy old compilers.
1428 +readelf_no_Werror = yes
1429 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
1430 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \
1432 @@ -486,7 +491,7 @@ nm_LDADD = $(libdw) $(libebl) $(libelf)
1433 size_LDADD = $(libelf) $(libeu) $(libmudflap)
1434 strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
1435 ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \
1438 ld_LDFLAGS = -rdynamic
1439 elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
1440 findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap)
1441 --- elfutils/src/readelf.c
1442 +++ elfutils/src/readelf.c
1443 @@ -4150,6 +4150,8 @@ struct listptr
1444 #define listptr_offset_size(p) ((p)->dwarf64 ? 8 : 4)
1445 #define listptr_address_size(p) ((p)->addr64 ? 8 : 4)
1447 +static const char *listptr_name;
1450 listptr_base (struct listptr *p)
1452 @@ -4171,9 +4173,9 @@ listptr_base (struct listptr *p)
1456 -compare_listptr (const void *a, const void *b, void *arg)
1457 +compare_listptr (const void *a, const void *b)
1459 - const char *name = arg;
1460 + const char *const name = listptr_name;
1461 struct listptr *p1 = (void *) a;
1462 struct listptr *p2 = (void *) b;
1464 @@ -4262,8 +4264,11 @@ static void
1465 sort_listptr (struct listptr_table *table, const char *name)
1468 - qsort_r (table->table, table->n, sizeof table->table[0],
1469 - &compare_listptr, (void *) name);
1471 + listptr_name = name;
1472 + qsort (table->table, table->n, sizeof table->table[0],
1473 + &compare_listptr);
1478 @@ -8986,7 +8991,7 @@ dump_archive_index (Elf *elf, const char
1479 if (unlikely (elf_rand (elf, as_off) == 0)
1480 || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
1482 -#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
1483 +#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
1486 error (EXIT_FAILURE, 0,
1487 --- elfutils/src/strings.c
1488 +++ elfutils/src/strings.c
1493 +#ifndef MAP_POPULATE
1494 +# define MAP_POPULATE 0
1498 /* Prototypes of local functions. */
1499 static int read_fd (int fd, const char *fname, off64_t fdlen);
1500 @@ -483,8 +487,13 @@ map_file (int fd, off64_t start_off, off
1502 if (mem != MAP_FAILED)
1504 +#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
1505 +# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
1507 +#ifdef POSIX_MADV_SEQUENTIAL
1508 /* We will go through the mapping sequentially. */
1509 (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
1513 if (errno != EINVAL && errno != ENOMEM)
1514 @@ -576,9 +585,11 @@ read_block (int fd, const char *fname, o
1515 elfmap_off = from & ~(ps - 1);
1516 elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
1518 +#ifdef POSIX_FADV_SEQUENTIAL
1519 if (unlikely (elfmap == MAP_FAILED))
1520 /* Let the kernel know we are going to read everything in sequence. */
1521 (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
1525 if (unlikely (elfmap == MAP_FAILED))
1526 --- elfutils/src/strip.c
1527 +++ elfutils/src/strip.c
1532 +#ifdef HAVE_FUTIMES
1533 +# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
1535 +# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
1538 typedef uint8_t GElf_Byte;
1540 /* Name and version of program. */
1541 @@ -318,8 +324,18 @@ process_file (const char *fname)
1543 /* If we have to preserve the timestamp, we need it in the
1544 format utimes() understands. */
1545 +#ifdef HAVE_STRUCT_STAT_ST_ATIM
1546 TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
1548 + tv[0].tv_sec = pre_st.st_atime;
1549 + tv[0].tv_usec = 0;
1551 +#ifdef HAVE_STRUCT_STAT_ST_MTIM
1552 TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
1554 + tv[1].tv_sec = pre_st.st_atime;
1555 + tv[1].tv_usec = 0;
1559 /* Open the file. */
1560 @@ -2060,7 +2076,7 @@ while computing checksum for debug infor
1561 /* If requested, preserve the timestamp. */
1564 - if (futimes (fd, tvp) != 0)
1565 + if (FUTIMES (fd, output_fname, tvp) != 0)
1567 error (0, errno, gettext ("\
1568 cannot set access and modification date of '%s'"),
1569 @@ -2117,7 +2133,7 @@ handle_ar (int fd, Elf *elf, const char
1573 - if (unlikely (futimes (fd, tvp) != 0))
1574 + if (unlikely (FUTIMES (fd, fname, tvp) != 0))
1576 error (0, errno, gettext ("\
1577 cannot set access and modification date of '%s'"), fname);
1578 --- elfutils/tests/ChangeLog
1579 +++ elfutils/tests/ChangeLog
1582 2008-01-21 Roland McGrath <roland@redhat.com>
1584 + * line2addr.c (main): Revert last change.
1586 * testfile45.S.bz2: Add tests for cltq, cqto.
1587 * testfile45.expect.bz2: Adjust.
1589 @@ -1355,6 +1357,11 @@
1590 * Makefile.am (TESTS): Add run-elflint-test.sh.
1591 (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
1593 +2005-05-31 Roland McGrath <roland@redhat.com>
1595 + * Makefile.am (WEXTRA): New variable, substituted by configure.
1596 + (AM_CFLAGS): Use it in place of -Wextra.
1598 2005-05-24 Ulrich Drepper <drepper@redhat.com>
1600 * get-files.c (main): Use correct format specifier.
1601 --- elfutils/tests/line2addr.c
1602 +++ elfutils/tests/line2addr.c
1603 @@ -124,7 +124,7 @@ main (int argc, char *argv[])
1605 struct args a = { .arg = argv[cnt] };
1607 - switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
1608 + switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
1612 --- elfutils/tests/Makefile.in
1613 +++ elfutils/tests/Makefile.in
1614 @@ -80,14 +80,15 @@ host_triplet = @host@
1615 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
1616 $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
1617 $(top_srcdir)/config/test-driver ChangeLog
1618 -@MUDFLAP_TRUE@am__append_1 = -fmudflap
1619 -@STANDALONE_FALSE@am__append_2 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
1620 +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
1621 +@MUDFLAP_TRUE@am__append_2 = -fmudflap
1622 +@STANDALONE_FALSE@am__append_3 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
1623 @STANDALONE_FALSE@ -I$(top_srcdir)/libdwfl \
1624 @STANDALONE_FALSE@ -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
1625 @STANDALONE_FALSE@ -I$(top_srcdir)/lib -I..
1627 -@STANDALONE_FALSE@am__append_3 = -Wl,-rpath-link,../libasm:../libdw:../libelf
1628 -@TESTS_RPATH_TRUE@am__append_4 = -Wl,-rpath,$(BUILD_RPATH)
1629 +@STANDALONE_FALSE@am__append_4 = -Wl,-rpath-link,../libasm:../libdw:../libelf
1630 +@TESTS_RPATH_TRUE@am__append_5 = -Wl,-rpath,$(BUILD_RPATH)
1631 check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \
1632 newfile$(EXEEXT) saridx$(EXEEXT) scnnames$(EXEEXT) \
1633 sectiondump$(EXEEXT) showptable$(EXEEXT) update1$(EXEEXT) \
1634 @@ -142,13 +143,13 @@
1635 run-readelf-mixed-corenote.sh run-dwfllines.sh \
1636 run-dwfl-report-elf-align.sh run-addr2line-test.sh \
1637 run-addr2line-i-test.sh run-varlocs.sh $(am__EXEEXT_1) \
1638 - $(am__append_7) $(am__EXEEXT_3) $(am__append_10)
1639 -@STANDALONE_FALSE@am__append_5 = msg_tst md5-sha1-test
1640 + $(am__append_8) $(am__EXEEXT_3) $(am__append_11)
1641 @STANDALONE_FALSE@am__append_6 = msg_tst md5-sha1-test
1642 -@LZMA_TRUE@am__append_7 = run-readelf-s.sh run-dwflsyms.sh
1643 -@HAVE_LIBASM_TRUE@am__append_8 = $(asm_TESTS)
1644 +@STANDALONE_FALSE@am__append_7 = msg_tst md5-sha1-test
1645 +@LZMA_TRUE@am__append_8 = run-readelf-s.sh run-dwflsyms.sh
1646 @HAVE_LIBASM_TRUE@am__append_9 = $(asm_TESTS)
1647 -@ENABLE_DWZ_TRUE@am__append_10 = run-readelf-dwz-multi.sh
1648 +@HAVE_LIBASM_TRUE@am__append_10 = $(asm_TESTS)
1649 +@ENABLE_DWZ_TRUE@am__append_11 = run-readelf-dwz-multi.sh
1651 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
1652 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
1653 @@ -722,6 +723,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
1654 INSTALL_SCRIPT = @INSTALL_SCRIPT@
1655 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
1657 +LD_AS_NEEDED = @LD_AS_NEEDED@
1660 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
1661 @@ -751,6 +753,7 @@ SHELL = @SHELL@
1666 XGETTEXT = @XGETTEXT@
1667 XGETTEXT_015 = @XGETTEXT_015@
1668 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
1669 @@ -809,12 +812,11 @@ top_build_prefix = @top_build_prefix@
1670 top_builddir = @top_builddir@
1671 top_srcdir = @top_srcdir@
1672 zip_LIBS = @zip_LIBS@
1673 -AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2)
1674 +AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_3)
1675 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
1676 - $($(*F)_no_Werror),,-Werror) $(if \
1677 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
1678 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
1679 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
1681 + $(am__append_1) $(am__append_2)
1682 @MUDFLAP_FALSE@libmudflap =
1683 @MUDFLAP_TRUE@libmudflap = -lmudflap
1684 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
1685 @@ -824,7 +826,7 @@ CLEANFILES = *.gcno *.gcda
1686 textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
1687 @MUDFLAP_FALSE@BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
1688 @MUDFLAP_TRUE@BUILD_RPATH = \$$ORIGIN/../backends
1689 -AM_LDFLAGS = $(am__append_3) $(am__append_4)
1690 +AM_LDFLAGS = $(am__append_4) $(am__append_5)
1691 @TESTS_RPATH_FALSE@tests_rpath = no
1692 @TESTS_RPATH_TRUE@tests_rpath = yes
1693 asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \