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 @@ -103,7 +103,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 @@ -165,6 +165,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
53 +LD_AS_NEEDED = @LD_AS_NEEDED@
56 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
57 @@ -194,6 +195,7 @@ SHELL = @SHELL@
63 XGETTEXT_015 = @XGETTEXT_015@
64 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
65 @@ -257,7 +259,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
66 -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
67 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
68 $($(*F)_no_Werror),,-Werror) $(if \
69 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
70 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
71 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
73 @MUDFLAP_FALSE@libmudflap =
74 @@ -698,7 +700,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
75 $(LINK) -shared -o $(@:.map=.so) \
76 -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
77 -Wl,--version-script,$(@:.so=.map) \
78 - -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
79 + -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
82 libebl_i386.so: $(cpu_i386)
83 --- elfutils/ChangeLog
84 +++ elfutils/ChangeLog
87 * configure.ac (LOCALEDIR, DATADIRNAME): Removed.
89 +2009-11-22 Roland McGrath <roland@redhat.com>
91 + * configure.ac: Use sed and expr instead of modern bash extensions.
93 2009-09-21 Ulrich Drepper <drepper@redhat.com>
95 * configure.ac: Update for more modern autoconf.
98 * configure.ac (zip_LIBS): Check for liblzma too.
100 +2009-08-17 Roland McGrath <roland@redhat.com>
102 + * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
104 2009-04-19 Roland McGrath <roland@redhat.com>
106 * configure.ac (eu_version): Round down here, not in version.h macros.
109 2009-01-23 Roland McGrath <roland@redhat.com>
111 + * configure.ac: Check for __builtin_popcount.
113 * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
115 * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
117 * configure.ac: Add dummy automake conditional to get dependencies
118 for non-generic linker right. See src/Makefile.am.
120 +2005-11-22 Roland McGrath <roland@redhat.com>
122 + * configure.ac: Check for --as-needed linker option.
124 2005-11-18 Roland McGrath <roland@redhat.com>
126 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
128 * Makefile.am (all_SUBDIRS): Add libdwfl.
129 * configure.ac: Write libdwfl/Makefile.
131 +2005-05-31 Roland McGrath <roland@redhat.com>
133 + * configure.ac (WEXTRA): Check for -Wextra and set this substitution.
135 + * configure.ac: Check for struct stat st_?tim members.
136 + * src/strip.c (process_file): Use st_?time if st_?tim are not there.
138 + * configure.ac: Check for futimes function.
139 + * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
140 + (handle_ar) [! HAVE_FUTIMES]: Likewise.
142 2005-05-19 Roland McGrath <roland@redhat.com>
144 * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
145 --- elfutils/config/eu.am
146 +++ elfutils/config/eu.am
148 ## <http://www.openinventionnetwork.com>.
152 +LD_AS_NEEDED = @LD_AS_NEEDED@
154 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
155 INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
156 AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
157 $(if $($(*F)_no_Werror),,-Werror) \
158 - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
159 + $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
160 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
163 --- elfutils/config/Makefile.in
164 +++ elfutils/config/Makefile.in
165 @@ -76,6 +76,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
166 INSTALL_SCRIPT = @INSTALL_SCRIPT@
167 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
169 +LD_AS_NEEDED = @LD_AS_NEEDED@
172 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
173 @@ -105,6 +106,7 @@ SHELL = @SHELL@
178 XGETTEXT = @XGETTEXT@
179 XGETTEXT_015 = @XGETTEXT_015@
180 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
181 --- elfutils/config.h.in
182 +++ elfutils/config.h.in
184 /* config.h.in. Generated from configure.ac by autoheader. */
186 +/* Have __builtin_popcount. */
187 +#undef HAVE_BUILTIN_POPCOUNT
189 /* $libdir subdirectory containing libebl modules. */
193 /* Define for large files, on AIX-style hosts. */
196 +/* Stubbed out if missing compiler support. */
199 #include <eu-config.h>
200 --- elfutils/configure
201 +++ elfutils/configure
202 @@ -602,6 +602,8 @@ NEVER_TRUE
211 @@ -3856,6 +3858,130 @@ if test "x$ac_cv_c99" != xyes; then :
212 as_fn_error $? "gcc with C99 support required" "$LINENO" 5
215 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra option to $CC" >&5
216 +$as_echo_n "checking for -Wextra option to $CC... " >&6; }
217 +if test "${ac_cv_cc_wextra+set}" = set; then :
218 + $as_echo_n "(cached) " >&6
220 + old_CFLAGS="$CFLAGS"
221 +CFLAGS="$CFLAGS -Wextra"
222 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
223 +/* end confdefs.h. */
226 +if ac_fn_c_try_compile "$LINENO"; then :
227 + ac_cv_cc_wextra=yes
231 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
232 +CFLAGS="$old_CFLAGS"
234 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_wextra" >&5
235 +$as_echo "$ac_cv_cc_wextra" >&6; }
237 +if test "x$ac_cv_cc_wextra" = xyes; then :
243 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline option to $CC" >&5
244 +$as_echo_n "checking for -fgnu89-inline option to $CC... " >&6; }
245 +if test "${ac_cv_cc_gnu89_inline+set}" = set; then :
246 + $as_echo_n "(cached) " >&6
248 + old_CFLAGS="$CFLAGS"
249 +CFLAGS="$CFLAGS -fgnu89-inline -Werror"
250 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
251 +/* end confdefs.h. */
255 + inline void bar (void) {}
258 +extern inline void baz (void) {}
261 +if ac_fn_c_try_compile "$LINENO"; then :
262 + ac_cv_cc_gnu89_inline=yes
264 + ac_cv_cc_gnu89_inline=no
266 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
267 +CFLAGS="$old_CFLAGS"
269 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_gnu89_inline" >&5
270 +$as_echo "$ac_cv_cc_gnu89_inline" >&6; }
271 +if test "x$ac_cv_cc_gnu89_inline" = xyes; then :
272 + WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"
275 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker option" >&5
276 +$as_echo_n "checking for --as-needed linker option... " >&6; }
277 +if test "${ac_cv_as_needed+set}" = set; then :
278 + $as_echo_n "(cached) " >&6
280 + cat > conftest.c <<EOF
281 +int main (void) { return 0; }
283 +if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
284 + -fPIC -shared -o conftest.so conftest.c
285 + -Wl,--as-needed 1>&5'
286 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
287 + (eval $ac_try) 2>&5
289 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
290 + test $ac_status = 0; }; }
292 + ac_cv_as_needed=yes
298 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_as_needed" >&5
299 +$as_echo "$ac_cv_as_needed" >&6; }
300 +if test "x$ac_cv_as_needed" = xyes; then :
301 + LD_AS_NEEDED=-Wl,--as-needed
307 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
308 +$as_echo_n "checking for __builtin_popcount... " >&6; }
309 +if test "${ac_cv_popcount+set}" = set; then :
310 + $as_echo_n "(cached) " >&6
312 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
313 +/* end confdefs.h. */
318 +exit (__builtin_popcount (127));
323 +if ac_fn_c_try_link "$LINENO"; then :
328 +rm -f core conftest.err conftest.$ac_objext \
329 + conftest$ac_exeext conftest.$ac_ext
331 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_popcount" >&5
332 +$as_echo "$ac_cv_popcount" >&6; }
333 +if test "x$ac_cv_popcount" = xyes; then :
335 +$as_echo "#define HAVE_BUILTIN_POPCOUNT 1" >>confdefs.h
339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5
340 $as_echo_n "checking for __thread support... " >&6; }
341 if test "${ac_cv_tls+set}" = set; then :
342 @@ -3892,7 +4018,13 @@ fi
343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
344 $as_echo "$ac_cv_tls" >&6; }
345 if test "x$ac_cv_tls" != xyes; then :
346 - as_fn_error $? "__thread support required" "$LINENO" 5
347 + if test "$use_locks" = yes; then :
348 + as_fn_error $? "--enable-thread-safety requires __thread support" "$LINENO" 5
351 +$as_echo "#define __thread /* empty: no multi-thread support */" >>confdefs.h
356 # Check whether --enable-largefile was given.
357 @@ -4878,7 +5010,7 @@ ac_config_files="$ac_config_files versio
359 # 1.234<whatever> -> 1234<whatever>
360 case "$PACKAGE_VERSION" in
361 -[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
362 +[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
363 *) as_fn_error $? "confused by version number '$PACKAGE_VERSION'" "$LINENO" 5 ;;
365 case "$eu_version" in
366 @@ -4907,7 +5039,7 @@ case "$eu_version" in
369 # Round up to the next release API (x.y) version.
370 -eu_version=$[($eu_version + 999) / 1000]
371 +eu_version=`expr \( $eu_version + 999 \) / 1000`
373 cat >confcache <<\_ACEOF
374 # This file is a shell script that caches the results of configure
375 --- elfutils/configure.ac
376 +++ elfutils/configure.ac
377 @@ -70,6 +70,54 @@ CFLAGS="$old_CFLAGS"])
378 AS_IF([test "x$ac_cv_c99" != xyes],
379 AC_MSG_ERROR([gcc with C99 support required]))
381 +AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
382 +old_CFLAGS="$CFLAGS"
383 +CFLAGS="$CFLAGS -Wextra"
384 +AC_COMPILE_IFELSE([void foo (void) { }],
385 + ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
386 +CFLAGS="$old_CFLAGS"])
388 +AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
390 +AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
391 +old_CFLAGS="$CFLAGS"
392 +CFLAGS="$CFLAGS -fgnu89-inline -Werror"
396 + inline void bar (void) {}
399 +extern inline void baz (void) {}
400 +], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
401 +CFLAGS="$old_CFLAGS"])
402 +AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
403 + [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
405 +AC_CACHE_CHECK([for --as-needed linker option],
406 + ac_cv_as_needed, [dnl
407 +cat > conftest.c <<EOF
408 +int main (void) { return 0; }
410 +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
411 + -fPIC -shared -o conftest.so conftest.c
412 + -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
414 + ac_cv_as_needed=yes
419 +AS_IF([test "x$ac_cv_as_needed" = xyes],
420 + [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
421 +AC_SUBST(LD_AS_NEEDED)
423 +AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
424 +AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
425 + ac_cv_popcount=yes, ac_cv_popcount=no)])
426 +AS_IF([test "x$ac_cv_popcount" = xyes],
427 + [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
429 AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
430 # Use the same flags that we use for our DSOs, so the test is representative.
431 # Some old compiler/linker/libc combinations fail some ways and not others.
432 @@ -85,7 +133,10 @@ static __thread int a; int foo (int b) {
433 CFLAGS="$save_CFLAGS"
434 LDFLAGS="$save_LDFLAGS"])
435 AS_IF([test "x$ac_cv_tls" != xyes],
436 - AC_MSG_ERROR([__thread support required]))
437 + [AS_IF([test "$use_locks" = yes],
438 + [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
439 + [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
440 + [Stubbed out if missing compiler support.])])])
442 dnl This test must come as early as possible after the compiler configuration
443 dnl tests, because the choice of the file model can (in principle) affect
444 @@ -248,7 +299,7 @@ AC_SUBST([eu_version])
446 # 1.234<whatever> -> 1234<whatever>
447 case "$PACKAGE_VERSION" in
448 -[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;;
449 +[[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
450 *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
452 case "$eu_version" in
453 @@ -277,6 +328,6 @@ case "$eu_version" in
456 # Round up to the next release API (x.y) version.
457 -[eu_version=$[($eu_version + 999) / 1000]]
458 +eu_version=`expr \( $eu_version + 999 \) / 1000`
461 --- elfutils/lib/ChangeLog
462 +++ elfutils/lib/ChangeLog
465 2009-01-23 Roland McGrath <roland@redhat.com>
467 + * eu-config.h [! HAVE_BUILTIN_POPCOUNT]
468 + (__builtin_popcount): New inline function.
470 * eu-config.h: Add multiple inclusion protection.
472 2009-01-17 Ulrich Drepper <drepper@redhat.com>
474 * Makefile.am (libeu_a_SOURCES): Add it.
475 * system.h: Declare crc32_file.
477 +2005-02-07 Roland McGrath <roland@redhat.com>
479 + * Makefile.am (WEXTRA): New variable, substituted by configure.
480 + (AM_CFLAGS): Use it in place of -Wextra.
482 2005-04-30 Ulrich Drepper <drepper@redhat.com>
484 * Makefile.am: Use -ffunction-sections for xmalloc.c.
485 --- elfutils/lib/eu-config.h
486 +++ elfutils/lib/eu-config.h
487 @@ -182,6 +182,17 @@ asm (".section predict_data, \"aw\"; .pr
488 /* This macro is used by the tests conditionalize for standalone building. */
489 #define ELFUTILS_HEADER(name) <lib##name.h>
491 +#ifndef HAVE_BUILTIN_POPCOUNT
492 +# define __builtin_popcount hakmem_popcount
493 +static inline unsigned int __attribute__ ((unused))
494 +hakmem_popcount (unsigned int x)
497 + unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
498 + return ((n + (n >> 3)) & 030707070707) % 63;
500 +#endif /* HAVE_BUILTIN_POPCOUNT */
504 # define OLD_VERSION(name, version) \
505 --- elfutils/lib/Makefile.in
506 +++ elfutils/lib/Makefile.in
507 @@ -99,6 +99,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
508 INSTALL_SCRIPT = @INSTALL_SCRIPT@
509 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
511 +LD_AS_NEEDED = @LD_AS_NEEDED@
514 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
515 @@ -128,6 +129,7 @@ SHELL = @SHELL@
520 XGETTEXT = @XGETTEXT@
521 XGETTEXT_015 = @XGETTEXT_015@
522 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
523 @@ -190,7 +192,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
524 -I$(srcdir)/../libelf
525 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
526 $($(*F)_no_Werror),,-Werror) $(if \
527 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
528 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
529 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
530 $(am__append_1) -fpic
531 @MUDFLAP_FALSE@libmudflap =
532 --- elfutils/libasm/ChangeLog
533 +++ elfutils/libasm/ChangeLog
535 * asm_error.c: Add new error ASM_E_IOERROR.
536 * libasmP.h: Add ASM_E_IOERROR definition.
538 +2005-05-31 Roland McGrath <roland@redhat.com>
540 + * Makefile.am (WEXTRA): New variable, substituted by configure.
541 + (AM_CFLAGS): Use it in place of -Wextra.
543 2005-02-15 Ulrich Drepper <drepper@redhat.com>
545 * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
546 --- elfutils/libasm/Makefile.in
547 +++ elfutils/libasm/Makefile.in
548 @@ -147,6 +147,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
549 INSTALL_SCRIPT = @INSTALL_SCRIPT@
550 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
552 +LD_AS_NEEDED = @LD_AS_NEEDED@
555 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
556 @@ -176,6 +177,7 @@ SHELL = @SHELL@
561 XGETTEXT = @XGETTEXT@
562 XGETTEXT_015 = @XGETTEXT_015@
563 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
564 @@ -239,7 +241,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
565 -I$(top_srcdir)/libdw
566 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
567 $($(*F)_no_Werror),,-Werror) $(if \
568 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
569 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
570 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
572 @MUDFLAP_FALSE@libmudflap =
573 --- elfutils/libcpu/ChangeLog
574 +++ elfutils/libcpu/ChangeLog
577 2009-01-23 Roland McGrath <roland@redhat.com>
579 + * i386_disasm.c (i386_disasm): Add abort after assert-constant for old
580 + compilers that don't realize it's noreturn.
582 * Makefile.am (i386_parse_CFLAGS): Use quotes around command
583 substitution that can produce leading whitespace.
586 * defs/i386.doc: New file.
587 * defs/x86_64: New file.
589 +2005-04-04 Roland McGrath <roland@redhat.com>
591 + * Makefile.am (WEXTRA): New variable, substituted by configure.
592 + (AM_CFLAGS): Use it instead of -Wextra.
594 2005-02-15 Ulrich Drepper <drepper@redhat.com>
596 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
597 --- elfutils/libcpu/i386_disasm.c
598 +++ elfutils/libcpu/i386_disasm.c
599 @@ -791,6 +791,7 @@ i386_disasm (const uint8_t **startp, con
602 assert (! "INVALID not handled");
607 --- elfutils/libcpu/Makefile.in
608 +++ elfutils/libcpu/Makefile.in
609 @@ -116,6 +116,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
610 INSTALL_SCRIPT = @INSTALL_SCRIPT@
611 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
613 +LD_AS_NEEDED = @LD_AS_NEEDED@
616 LEX_OUTPUT_ROOT = lex.$(<F:lex.l=)
617 @@ -145,6 +146,7 @@ SHELL = @SHELL@
622 XGETTEXT = @XGETTEXT@
623 XGETTEXT_015 = @XGETTEXT_015@
624 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
625 @@ -208,7 +210,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
626 -I$(srcdir)/../libdw -I$(srcdir)/../libasm
627 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
628 $($(*F)_no_Werror),,-Werror) $(if \
629 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
630 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
631 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
632 $(am__append_1) -fpic -fdollars-in-identifiers
633 @MUDFLAP_FALSE@libmudflap =
634 --- elfutils/libdw/ChangeLog
635 +++ elfutils/libdw/ChangeLog
638 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
640 +2009-08-17 Roland McGrath <roland@redhat.com>
642 + * libdw.h: Disable extern inlines for GCC 4.2.
644 2009-08-10 Roland McGrath <roland@redhat.com>
646 * dwarf_getscopevar.c: Use dwarf_diename.
647 @@ -1076,6 +1080,11 @@
649 2005-05-31 Roland McGrath <roland@redhat.com>
651 + * Makefile.am (WEXTRA): New variable, substituted by configure.
652 + (AM_CFLAGS): Use it in place of -Wextra.
654 +2005-05-31 Roland McGrath <roland@redhat.com>
656 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
659 --- elfutils/libdw/libdw.h
660 +++ elfutils/libdw/libdw.h
661 @@ -852,7 +852,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
664 /* Inline optimizations. */
666 +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
667 /* Return attribute code of given attribute. */
668 __libdw_extern_inline unsigned int
669 dwarf_whatattr (Dwarf_Attribute *attr)
670 --- elfutils/libdw/Makefile.in
671 +++ elfutils/libdw/Makefile.in
672 @@ -192,6 +192,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
673 INSTALL_SCRIPT = @INSTALL_SCRIPT@
674 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
676 +LD_AS_NEEDED = @LD_AS_NEEDED@
679 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
680 @@ -221,6 +222,7 @@ SHELL = @SHELL@
685 XGETTEXT = @XGETTEXT@
686 XGETTEXT_015 = @XGETTEXT_015@
687 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
688 @@ -283,7 +285,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
689 -I$(srcdir)/../libelf
690 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
691 $($(*F)_no_Werror),,-Werror) $(if \
692 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
693 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
694 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
695 $(am__append_1) $(am__append_2)
696 @MUDFLAP_FALSE@libmudflap =
697 --- elfutils/libdwfl/ChangeLog
698 +++ elfutils/libdwfl/ChangeLog
699 @@ -1366,6 +1366,11 @@
701 2005-07-21 Roland McGrath <roland@redhat.com>
703 + * Makefile.am (WEXTRA): New variable, substituted by configure.
704 + (AM_CFLAGS): Use it in place of -Wextra.
706 +2005-07-21 Roland McGrath <roland@redhat.com>
708 * Makefile.am (noinst_HEADERS): Add loc2c.c.
710 * test2.c (main): Check sscanf result to quiet warning.
711 --- elfutils/libdwfl/Makefile.in
712 +++ elfutils/libdwfl/Makefile.in
713 @@ -182,6 +182,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
714 INSTALL_SCRIPT = @INSTALL_SCRIPT@
715 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
717 +LD_AS_NEEDED = @LD_AS_NEEDED@
720 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
721 @@ -211,6 +212,7 @@ SHELL = @SHELL@
726 XGETTEXT = @XGETTEXT@
727 XGETTEXT_015 = @XGETTEXT_015@
728 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
729 @@ -274,7 +276,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
731 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
732 $($(*F)_no_Werror),,-Werror) $(if \
733 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
734 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
735 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
737 @MUDFLAP_FALSE@libmudflap =
738 --- elfutils/libebl/ChangeLog
739 +++ elfutils/libebl/ChangeLog
741 * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
742 tracking works right.
744 +2005-05-31 Roland McGrath <roland@redhat.com>
746 + * Makefile.am (WEXTRA): New variable, substituted by configure.
747 + (AM_CFLAGS): Use it in place of -Wextra.
749 2005-05-21 Ulrich Drepper <drepper@redhat.com>
751 * libebl_x86_64.map: Add x86_64_core_note.
752 --- elfutils/libebl/Makefile.in
753 +++ elfutils/libebl/Makefile.in
754 @@ -143,6 +143,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
755 INSTALL_SCRIPT = @INSTALL_SCRIPT@
756 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
758 +LD_AS_NEEDED = @LD_AS_NEEDED@
761 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
762 @@ -172,6 +173,7 @@ SHELL = @SHELL@
767 XGETTEXT = @XGETTEXT@
768 XGETTEXT_015 = @XGETTEXT_015@
769 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
770 @@ -235,7 +237,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
771 -I$(srcdir)/../libasm
772 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
773 $($(*F)_no_Werror),,-Werror) $(if \
774 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
775 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
776 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
777 $(am__append_1) -fpic
778 @MUDFLAP_FALSE@libmudflap =
779 --- elfutils/libelf/ChangeLog
780 +++ elfutils/libelf/ChangeLog
783 * elf.h: Update from glibc.
785 +2005-05-31 Roland McGrath <roland@redhat.com>
787 + * Makefile.am (WEXTRA): New variable, substituted by configure.
788 + (AM_CFLAGS): Use it in place of -Wextra.
790 2005-05-08 Roland McGrath <roland@redhat.com>
792 * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
793 --- elfutils/libelf/common.h
794 +++ elfutils/libelf/common.h
795 @@ -160,7 +160,7 @@ libelf_release_all (Elf *elf)
796 (Var) = (sizeof (Var) == 1 \
797 ? (unsigned char) (Var) \
798 : (sizeof (Var) == 2 \
800 + ? (unsigned short int) bswap_16 (Var) \
801 : (sizeof (Var) == 4 \
804 @@ -169,7 +169,7 @@ libelf_release_all (Elf *elf)
805 (Dst) = (sizeof (Var) == 1 \
806 ? (unsigned char) (Var) \
807 : (sizeof (Var) == 2 \
809 + ? (unsigned short int) bswap_16 (Var) \
810 : (sizeof (Var) == 4 \
813 --- elfutils/libelf/Makefile.in
814 +++ elfutils/libelf/Makefile.in
815 @@ -189,6 +189,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
816 INSTALL_SCRIPT = @INSTALL_SCRIPT@
817 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
819 +LD_AS_NEEDED = @LD_AS_NEEDED@
822 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
823 @@ -218,6 +219,7 @@ SHELL = @SHELL@
828 XGETTEXT = @XGETTEXT@
829 XGETTEXT_015 = @XGETTEXT_015@
830 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
831 @@ -279,7 +281,7 @@ zip_LIBS = @zip_LIBS@
832 INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
833 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
834 $($(*F)_no_Werror),,-Werror) $(if \
835 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
836 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
837 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
838 $(am__append_1) $(am__append_2)
839 @MUDFLAP_FALSE@libmudflap =
840 --- elfutils/m4/Makefile.in
841 +++ elfutils/m4/Makefile.in
842 @@ -75,6 +75,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
843 INSTALL_SCRIPT = @INSTALL_SCRIPT@
844 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
846 +LD_AS_NEEDED = @LD_AS_NEEDED@
849 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
850 @@ -104,6 +105,7 @@ SHELL = @SHELL@
855 XGETTEXT = @XGETTEXT@
856 XGETTEXT_015 = @XGETTEXT_015@
857 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
858 --- elfutils/Makefile.in
859 +++ elfutils/Makefile.in
860 @@ -155,6 +155,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
861 INSTALL_SCRIPT = @INSTALL_SCRIPT@
862 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
864 +LD_AS_NEEDED = @LD_AS_NEEDED@
867 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
868 @@ -184,6 +185,7 @@ SHELL = @SHELL@
873 XGETTEXT = @XGETTEXT@
874 XGETTEXT_015 = @XGETTEXT_015@
875 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
876 --- elfutils/src/addr2line.c
877 +++ elfutils/src/addr2line.c
878 @@ -455,10 +455,10 @@ handle_address (const char *string, Dwfl
882 - if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
883 + if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
884 && string[i] == '\0')
885 parsed = adjust_to_section (name, &addr, dwfl);
886 - switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
887 + switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
891 --- elfutils/src/ChangeLog
892 +++ elfutils/src/ChangeLog
894 * readelf.c (attr_callback): Use print_block only when we don't use
897 +2009-08-17 Roland McGrath <roland@redhat.com>
899 + * ld.h: Disable extern inlines for GCC 4.2.
901 2009-08-14 Roland McGrath <roland@redhat.com>
903 + * strings.c (read_block): Conditionalize posix_fadvise use
904 + on [POSIX_FADV_SEQUENTIAL].
905 + From Petr Salinger <Petr.Salinger@seznam.cz>.
907 * ar.c (do_oper_extract): Use pathconf instead of statfs.
909 2009-08-01 Ulrich Drepper <drepper@redhat.com>
911 * readelf.c (print_debug_frame_section): Use t instead of j formats
912 for ptrdiff_t OFFSET.
914 + * addr2line.c (handle_address): Use %a instead of %m for compatibility.
916 2009-01-21 Ulrich Drepper <drepper@redhat.com>
918 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
920 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
923 +2008-03-01 Roland McGrath <roland@redhat.com>
925 + * readelf.c (dump_archive_index): Tweak portability hack
926 + to match [__GNUC__ < 4] too.
928 2008-02-29 Roland McGrath <roland@redhat.com>
930 * readelf.c (print_attributes): Add a cast.
933 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
935 + * Makefile.am (readelf_no_Werror): New variable.
937 2007-10-15 Roland McGrath <roland@redhat.com>
939 * make-debug-archive.in: New file.
940 @@ -1298,6 +1315,10 @@
941 * elflint.c (valid_e_machine): Add EM_ALPHA.
942 Reported by Christian Aichinger <Greek0@gmx.net>.
944 + * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
945 + MADV_SEQUENTIAL if undefined. Don't call posix_madvise
946 + if neither is defined.
948 2006-08-08 Ulrich Drepper <drepper@redhat.com>
950 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
951 @@ -1374,6 +1395,10 @@
952 * Makefile.am: Add hacks to create dependency files for non-generic
955 +2006-04-05 Roland McGrath <roland@redhat.com>
957 + * strings.c (MAP_POPULATE): Define to 0 if undefined.
959 2006-06-12 Ulrich Drepper <drepper@redhat.com>
961 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
962 @@ -1722,6 +1747,11 @@
963 * readelf.c (print_debug_loc_section): Fix indentation for larger
966 +2005-05-31 Roland McGrath <roland@redhat.com>
968 + * Makefile.am (WEXTRA): New variable, substituted by configure.
969 + (AM_CFLAGS): Use it in place of -Wextra.
971 2005-05-30 Roland McGrath <roland@redhat.com>
973 * readelf.c (print_debug_line_section): Print section offset of each
974 --- elfutils/src/findtextrel.c
975 +++ elfutils/src/findtextrel.c
976 @@ -504,7 +504,11 @@ ptrcompare (const void *p1, const void *
980 -check_rel (size_t nsegments, struct segments segments[nsegments],
981 +check_rel (size_t nsegments, struct segments segments[
986 GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
987 const char *fname, bool more_than_one, void **knownsrcs)
989 --- elfutils/src/ld.h
990 +++ elfutils/src/ld.h
991 @@ -1122,6 +1122,7 @@ extern bool dynamically_linked_p (void);
993 /* Checked whether the symbol is undefined and referenced from a DSO. */
994 extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
995 +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
996 #ifdef __GNUC_STDC_INLINE__
997 __attribute__ ((__gnu_inline__))
999 @@ -1139,5 +1140,6 @@ linked_from_dso_p (struct scninfo *scnin
1001 return sym->defined && sym->in_dso;
1003 +#endif /* Optimizing and not GCC 4.2. */
1006 --- elfutils/src/Makefile.am
1007 +++ elfutils/src/Makefile.am
1008 @@ -99,6 +99,9 @@ addr2line_no_Wformat = yes
1009 # XXX While the file is not finished, don't warn about this
1010 ldgeneric_no_Wunused = yes
1012 +# Buggy old compilers.
1013 +readelf_no_Werror = yes
1015 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
1016 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
1017 size_LDADD = $(libelf) $(libeu) $(libmudflap)
1018 --- elfutils/src/Makefile.in
1019 +++ elfutils/src/Makefile.in
1020 @@ -228,6 +228,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 @@ -257,6 +258,7 @@ SHELL = @SHELL@
1033 XGETTEXT = @XGETTEXT@
1034 XGETTEXT_015 = @XGETTEXT_015@
1035 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
1036 @@ -321,7 +323,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
1037 -I$(srcdir)/../libasm
1038 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
1039 $($(*F)_no_Werror),,-Werror) $(if \
1040 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
1041 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
1042 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
1044 @MUDFLAP_FALSE@libmudflap =
1045 @@ -368,6 +370,9 @@ strings_no_Wformat = yes
1046 addr2line_no_Wformat = yes
1047 # XXX While the file is not finished, don't warn about this
1048 ldgeneric_no_Wunused = yes
1050 +# Buggy old compilers.
1051 +readelf_no_Werror = yes
1052 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
1053 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
1054 size_LDADD = $(libelf) $(libeu) $(libmudflap)
1055 --- elfutils/src/readelf.c
1056 +++ elfutils/src/readelf.c
1057 @@ -4274,10 +4274,11 @@ struct listptr
1058 #define listptr_offset_size(p) ((p)->dwarf64 ? 8 : 4)
1059 #define listptr_address_size(p) ((p)->addr64 ? 8 : 4)
1061 +static const char *listptr_name;
1063 -compare_listptr (const void *a, const void *b, void *arg)
1064 +compare_listptr (const void *a, const void *b)
1066 - const char *name = arg;
1067 + const char *const name = listptr_name;
1068 struct listptr *p1 = (void *) a;
1069 struct listptr *p2 = (void *) b;
1071 @@ -4357,8 +4358,11 @@ static void
1072 sort_listptr (struct listptr_table *table, const char *name)
1075 - qsort_r (table->table, table->n, sizeof table->table[0],
1076 - &compare_listptr, (void *) name);
1078 + listptr_name = name;
1079 + qsort (table->table, table->n, sizeof table->table[0],
1080 + &compare_listptr);
1085 @@ -8098,7 +8102,7 @@ dump_archive_index (Elf *elf, const char
1086 if (unlikely (elf_rand (elf, as_off) == 0)
1087 || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
1089 -#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
1090 +#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
1093 error (EXIT_FAILURE, 0,
1094 --- elfutils/src/strings.c
1095 +++ elfutils/src/strings.c
1100 +#ifndef MAP_POPULATE
1101 +# define MAP_POPULATE 0
1105 /* Prototypes of local functions. */
1106 static int read_fd (int fd, const char *fname, off64_t fdlen);
1107 @@ -491,8 +495,13 @@ map_file (int fd, off64_t start_off, off
1109 if (mem != MAP_FAILED)
1111 +#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
1112 +# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
1114 +#ifdef POSIX_MADV_SEQUENTIAL
1115 /* We will go through the mapping sequentially. */
1116 (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
1120 if (errno != EINVAL && errno != ENOMEM)
1121 @@ -584,9 +593,11 @@ read_block (int fd, const char *fname, o
1122 elfmap_off = from & ~(ps - 1);
1123 elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
1125 +#ifdef POSIX_FADV_SEQUENTIAL
1126 if (unlikely (elfmap == MAP_FAILED))
1127 /* Let the kernel know we are going to read everything in sequence. */
1128 (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
1132 if (unlikely (elfmap == MAP_FAILED))
1133 --- elfutils/src/strip.c
1134 +++ elfutils/src/strip.c
1139 +#ifdef HAVE_FUTIMES
1140 +# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
1142 +# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
1146 /* Name and version of program. */
1147 static void print_version (FILE *stream, struct argp_state *state);
1148 @@ -311,8 +317,18 @@ process_file (const char *fname)
1150 /* If we have to preserve the timestamp, we need it in the
1151 format utimes() understands. */
1152 +#ifdef HAVE_STRUCT_STAT_ST_ATIM
1153 TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
1155 + tv[0].tv_sec = pre_st.st_atime;
1156 + tv[0].tv_usec = 0;
1158 +#ifdef HAVE_STRUCT_STAT_ST_MTIM
1159 TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
1161 + tv[1].tv_sec = pre_st.st_atime;
1162 + tv[1].tv_usec = 0;
1166 /* Open the file. */
1167 @@ -1809,7 +1825,7 @@ while computing checksum for debug infor
1168 /* If requested, preserve the timestamp. */
1171 - if (futimes (fd, tvp) != 0)
1172 + if (FUTIMES (fd, output_fname, tvp) != 0)
1174 error (0, errno, gettext ("\
1175 cannot set access and modification date of '%s'"),
1176 @@ -1866,7 +1882,7 @@ handle_ar (int fd, Elf *elf, const char
1180 - if (unlikely (futimes (fd, tvp) != 0))
1181 + if (unlikely (FUTIMES (fd, fname, tvp) != 0))
1183 error (0, errno, gettext ("\
1184 cannot set access and modification date of '%s'"), fname);
1185 --- elfutils/tests/ChangeLog
1186 +++ elfutils/tests/ChangeLog
1189 2008-01-21 Roland McGrath <roland@redhat.com>
1191 + * line2addr.c (main): Revert last change.
1193 * testfile45.S.bz2: Add tests for cltq, cqto.
1194 * testfile45.expect.bz2: Adjust.
1196 @@ -913,6 +915,11 @@
1197 * Makefile.am (TESTS): Add run-elflint-test.sh.
1198 (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
1200 +2005-05-31 Roland McGrath <roland@redhat.com>
1202 + * Makefile.am (WEXTRA): New variable, substituted by configure.
1203 + (AM_CFLAGS): Use it in place of -Wextra.
1205 2005-05-24 Ulrich Drepper <drepper@redhat.com>
1207 * get-files.c (main): Use correct format specifier.
1208 --- elfutils/tests/line2addr.c
1209 +++ elfutils/tests/line2addr.c
1210 @@ -132,7 +132,7 @@ main (int argc, char *argv[])
1212 struct args a = { .arg = argv[cnt] };
1214 - switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
1215 + switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
1219 --- elfutils/tests/Makefile.in
1220 +++ elfutils/tests/Makefile.in
1221 @@ -372,6 +372,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
1222 INSTALL_SCRIPT = @INSTALL_SCRIPT@
1223 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
1225 +LD_AS_NEEDED = @LD_AS_NEEDED@
1228 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
1229 @@ -401,6 +402,7 @@ SHELL = @SHELL@
1234 XGETTEXT = @XGETTEXT@
1235 XGETTEXT_015 = @XGETTEXT_015@
1236 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
1237 @@ -462,7 +464,7 @@ zip_LIBS = @zip_LIBS@
1238 INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2)
1239 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
1240 $($(*F)_no_Werror),,-Werror) $(if \
1241 - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
1242 + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
1243 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
1245 @MUDFLAP_FALSE@libmudflap =