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/ChangeLog
48 +++ elfutils/ChangeLog
51 * configure.ac (LOCALEDIR, DATADIRNAME): Removed.
53 +2009-11-22 Roland McGrath <roland@redhat.com>
55 + * configure.ac: Use sed and expr instead of modern bash extensions.
57 2009-09-21 Ulrich Drepper <drepper@redhat.com>
59 * configure.ac: Update for more modern autoconf.
62 * configure.ac (zip_LIBS): Check for liblzma too.
64 +2009-08-17 Roland McGrath <roland@redhat.com>
66 + * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
68 2009-04-19 Roland McGrath <roland@redhat.com>
70 * configure.ac (eu_version): Round down here, not in version.h macros.
73 2009-01-23 Roland McGrath <roland@redhat.com>
75 + * configure.ac: Check for __builtin_popcount.
77 * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
79 * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
81 * configure.ac: Add dummy automake conditional to get dependencies
82 for non-generic linker right. See src/Makefile.am.
84 +2005-11-22 Roland McGrath <roland@redhat.com>
86 + * configure.ac: Check for --as-needed linker option.
88 2005-11-18 Roland McGrath <roland@redhat.com>
90 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
92 * Makefile.am (all_SUBDIRS): Add libdwfl.
93 * configure.ac: Write libdwfl/Makefile.
95 +2005-05-31 Roland McGrath <roland@redhat.com>
97 + * configure.ac (WEXTRA): Check for -Wextra and set this substitution.
99 + * configure.ac: Check for struct stat st_?tim members.
100 + * src/strip.c (process_file): Use st_?time if st_?tim are not there.
102 + * configure.ac: Check for futimes function.
103 + * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
104 + (handle_ar) [! HAVE_FUTIMES]: Likewise.
106 2005-05-19 Roland McGrath <roland@redhat.com>
108 * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
109 --- elfutils/config/eu.am
110 +++ elfutils/config/eu.am
112 ## <http://www.openinventionnetwork.com>.
116 +LD_AS_NEEDED = @LD_AS_NEEDED@
118 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
119 INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
120 AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
121 $(if $($(*F)_no_Werror),,-Werror) \
122 - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
123 + $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
124 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
127 --- elfutils/configure.ac
128 +++ elfutils/configure.ac
129 @@ -73,6 +73,54 @@ CFLAGS="$old_CFLAGS"])
130 AS_IF([test "x$ac_cv_c99" != xyes],
131 AC_MSG_ERROR([gcc with C99 support required]))
133 +AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
134 +old_CFLAGS="$CFLAGS"
135 +CFLAGS="$CFLAGS -Wextra"
136 +AC_COMPILE_IFELSE([void foo (void) { }],
137 + ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
138 +CFLAGS="$old_CFLAGS"])
140 +AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
142 +AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
143 +old_CFLAGS="$CFLAGS"
144 +CFLAGS="$CFLAGS -fgnu89-inline -Werror"
148 + inline void bar (void) {}
151 +extern inline void baz (void) {}
152 +], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
153 +CFLAGS="$old_CFLAGS"])
154 +AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
155 + [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
157 +AC_CACHE_CHECK([for --as-needed linker option],
158 + ac_cv_as_needed, [dnl
159 +cat > conftest.c <<EOF
160 +int main (void) { return 0; }
162 +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
163 + -fPIC -shared -o conftest.so conftest.c
164 + -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
166 + ac_cv_as_needed=yes
171 +AS_IF([test "x$ac_cv_as_needed" = xyes],
172 + [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
173 +AC_SUBST(LD_AS_NEEDED)
175 +AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
176 +AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
177 + ac_cv_popcount=yes, ac_cv_popcount=no)])
178 +AS_IF([test "x$ac_cv_popcount" = xyes],
179 + [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
181 AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
182 # Use the same flags that we use for our DSOs, so the test is representative.
183 # Some old compiler/linker/libc combinations fail some ways and not others.
184 @@ -88,7 +136,10 @@ static __thread int a; int foo (int b) {
185 CFLAGS="$save_CFLAGS"
186 LDFLAGS="$save_LDFLAGS"])
187 AS_IF([test "x$ac_cv_tls" != xyes],
188 - AC_MSG_ERROR([__thread support required]))
189 + [AS_IF([test "$use_locks" = yes],
190 + [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
191 + [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
192 + [Stubbed out if missing compiler support.])])])
194 dnl This test must come as early as possible after the compiler configuration
195 dnl tests, because the choice of the file model can (in principle) affect
196 @@ -251,7 +302,7 @@ AC_SUBST([eu_version])
198 # 1.234<whatever> -> 1234<whatever>
199 case "$PACKAGE_VERSION" in
200 -[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;;
201 +[[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
202 *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
204 case "$eu_version" in
205 @@ -280,6 +331,6 @@ case "$eu_version" in
208 # Round up to the next release API (x.y) version.
209 -[eu_version=$[($eu_version + 999) / 1000]]
210 +eu_version=`expr \( $eu_version + 999 \) / 1000`
213 --- elfutils/lib/ChangeLog
214 +++ elfutils/lib/ChangeLog
217 2009-01-23 Roland McGrath <roland@redhat.com>
219 + * eu-config.h [! HAVE_BUILTIN_POPCOUNT]
220 + (__builtin_popcount): New inline function.
222 * eu-config.h: Add multiple inclusion protection.
224 2009-01-17 Ulrich Drepper <drepper@redhat.com>
226 * Makefile.am (libeu_a_SOURCES): Add it.
227 * system.h: Declare crc32_file.
229 +2005-02-07 Roland McGrath <roland@redhat.com>
231 + * Makefile.am (WEXTRA): New variable, substituted by configure.
232 + (AM_CFLAGS): Use it in place of -Wextra.
234 2005-04-30 Ulrich Drepper <drepper@redhat.com>
236 * Makefile.am: Use -ffunction-sections for xmalloc.c.
237 --- elfutils/lib/eu-config.h
238 +++ elfutils/lib/eu-config.h
239 @@ -182,6 +182,17 @@ asm (".section predict_data, \"aw\"; .pr
240 /* This macro is used by the tests conditionalize for standalone building. */
241 #define ELFUTILS_HEADER(name) <lib##name.h>
243 +#ifndef HAVE_BUILTIN_POPCOUNT
244 +# define __builtin_popcount hakmem_popcount
245 +static inline unsigned int __attribute__ ((unused))
246 +hakmem_popcount (unsigned int x)
249 + unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
250 + return ((n + (n >> 3)) & 030707070707) % 63;
252 +#endif /* HAVE_BUILTIN_POPCOUNT */
256 # define OLD_VERSION(name, version) \
257 --- elfutils/libasm/ChangeLog
258 +++ elfutils/libasm/ChangeLog
260 * asm_error.c: Add new error ASM_E_IOERROR.
261 * libasmP.h: Add ASM_E_IOERROR definition.
263 +2005-05-31 Roland McGrath <roland@redhat.com>
265 + * Makefile.am (WEXTRA): New variable, substituted by configure.
266 + (AM_CFLAGS): Use it in place of -Wextra.
268 2005-02-15 Ulrich Drepper <drepper@redhat.com>
270 * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
271 --- elfutils/libcpu/ChangeLog
272 +++ elfutils/libcpu/ChangeLog
275 2009-01-23 Roland McGrath <roland@redhat.com>
277 + * i386_disasm.c (i386_disasm): Add abort after assert-constant for old
278 + compilers that don't realize it's noreturn.
280 * Makefile.am (i386_parse_CFLAGS): Use quotes around command
281 substitution that can produce leading whitespace.
284 * defs/i386.doc: New file.
285 * defs/x86_64: New file.
287 +2005-04-04 Roland McGrath <roland@redhat.com>
289 + * Makefile.am (WEXTRA): New variable, substituted by configure.
290 + (AM_CFLAGS): Use it instead of -Wextra.
292 2005-02-15 Ulrich Drepper <drepper@redhat.com>
294 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
295 --- elfutils/libcpu/i386_disasm.c
296 +++ elfutils/libcpu/i386_disasm.c
297 @@ -791,6 +791,7 @@ i386_disasm (const uint8_t **startp, con
300 assert (! "INVALID not handled");
305 --- elfutils/libdw/ChangeLog
306 +++ elfutils/libdw/ChangeLog
309 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
311 +2009-08-17 Roland McGrath <roland@redhat.com>
313 + * libdw.h: Disable extern inlines for GCC 4.2.
315 2009-08-10 Roland McGrath <roland@redhat.com>
317 * dwarf_getscopevar.c: Use dwarf_diename.
318 @@ -1076,6 +1080,11 @@
320 2005-05-31 Roland McGrath <roland@redhat.com>
322 + * Makefile.am (WEXTRA): New variable, substituted by configure.
323 + (AM_CFLAGS): Use it in place of -Wextra.
325 +2005-05-31 Roland McGrath <roland@redhat.com>
327 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
330 --- elfutils/libdw/libdw.h
331 +++ elfutils/libdw/libdw.h
332 @@ -852,7 +852,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
335 /* Inline optimizations. */
337 +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
338 /* Return attribute code of given attribute. */
339 __libdw_extern_inline unsigned int
340 dwarf_whatattr (Dwarf_Attribute *attr)
341 --- elfutils/libdwfl/ChangeLog
342 +++ elfutils/libdwfl/ChangeLog
343 @@ -1350,6 +1350,11 @@
345 2005-07-21 Roland McGrath <roland@redhat.com>
347 + * Makefile.am (WEXTRA): New variable, substituted by configure.
348 + (AM_CFLAGS): Use it in place of -Wextra.
350 +2005-07-21 Roland McGrath <roland@redhat.com>
352 * Makefile.am (noinst_HEADERS): Add loc2c.c.
354 * test2.c (main): Check sscanf result to quiet warning.
355 --- elfutils/libebl/ChangeLog
356 +++ elfutils/libebl/ChangeLog
358 * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
359 tracking works right.
361 +2005-05-31 Roland McGrath <roland@redhat.com>
363 + * Makefile.am (WEXTRA): New variable, substituted by configure.
364 + (AM_CFLAGS): Use it in place of -Wextra.
366 2005-05-21 Ulrich Drepper <drepper@redhat.com>
368 * libebl_x86_64.map: Add x86_64_core_note.
369 --- elfutils/libelf/ChangeLog
370 +++ elfutils/libelf/ChangeLog
373 * elf.h: Update from glibc.
375 +2005-05-31 Roland McGrath <roland@redhat.com>
377 + * Makefile.am (WEXTRA): New variable, substituted by configure.
378 + (AM_CFLAGS): Use it in place of -Wextra.
380 2005-05-08 Roland McGrath <roland@redhat.com>
382 * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
383 --- elfutils/libelf/common.h
384 +++ elfutils/libelf/common.h
385 @@ -160,7 +160,7 @@ libelf_release_all (Elf *elf)
386 (Var) = (sizeof (Var) == 1 \
387 ? (unsigned char) (Var) \
388 : (sizeof (Var) == 2 \
390 + ? (unsigned short int) bswap_16 (Var) \
391 : (sizeof (Var) == 4 \
394 @@ -169,7 +169,7 @@ libelf_release_all (Elf *elf)
395 (Dst) = (sizeof (Var) == 1 \
396 ? (unsigned char) (Var) \
397 : (sizeof (Var) == 2 \
399 + ? (unsigned short int) bswap_16 (Var) \
400 : (sizeof (Var) == 4 \
403 --- elfutils/src/addr2line.c
404 +++ elfutils/src/addr2line.c
405 @@ -455,10 +455,10 @@ handle_address (const char *string, Dwfl
409 - if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
410 + if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
411 && string[i] == '\0')
412 parsed = adjust_to_section (name, &addr, dwfl);
413 - switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
414 + switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
418 --- elfutils/src/ChangeLog
419 +++ elfutils/src/ChangeLog
421 * readelf.c (attr_callback): Use print_block only when we don't use
424 +2009-08-17 Roland McGrath <roland@redhat.com>
426 + * ld.h: Disable extern inlines for GCC 4.2.
428 2009-08-14 Roland McGrath <roland@redhat.com>
430 + * strings.c (read_block): Conditionalize posix_fadvise use
431 + on [POSIX_FADV_SEQUENTIAL].
432 + From Petr Salinger <Petr.Salinger@seznam.cz>.
434 * ar.c (do_oper_extract): Use pathconf instead of statfs.
436 2009-08-01 Ulrich Drepper <drepper@redhat.com>
438 * readelf.c (print_debug_frame_section): Use t instead of j formats
439 for ptrdiff_t OFFSET.
441 + * addr2line.c (handle_address): Use %a instead of %m for compatibility.
443 2009-01-21 Ulrich Drepper <drepper@redhat.com>
445 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
447 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
450 +2008-03-01 Roland McGrath <roland@redhat.com>
452 + * readelf.c (dump_archive_index): Tweak portability hack
453 + to match [__GNUC__ < 4] too.
455 2008-02-29 Roland McGrath <roland@redhat.com>
457 * readelf.c (print_attributes): Add a cast.
460 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
462 + * Makefile.am (readelf_no_Werror): New variable.
464 2007-10-15 Roland McGrath <roland@redhat.com>
466 * make-debug-archive.in: New file.
467 @@ -1274,6 +1291,10 @@
468 * elflint.c (valid_e_machine): Add EM_ALPHA.
469 Reported by Christian Aichinger <Greek0@gmx.net>.
471 + * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
472 + MADV_SEQUENTIAL if undefined. Don't call posix_madvise
473 + if neither is defined.
475 2006-08-08 Ulrich Drepper <drepper@redhat.com>
477 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
478 @@ -1350,6 +1371,10 @@
479 * Makefile.am: Add hacks to create dependency files for non-generic
482 +2006-04-05 Roland McGrath <roland@redhat.com>
484 + * strings.c (MAP_POPULATE): Define to 0 if undefined.
486 2006-06-12 Ulrich Drepper <drepper@redhat.com>
488 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
489 @@ -1698,6 +1723,11 @@
490 * readelf.c (print_debug_loc_section): Fix indentation for larger
493 +2005-05-31 Roland McGrath <roland@redhat.com>
495 + * Makefile.am (WEXTRA): New variable, substituted by configure.
496 + (AM_CFLAGS): Use it in place of -Wextra.
498 2005-05-30 Roland McGrath <roland@redhat.com>
500 * readelf.c (print_debug_line_section): Print section offset of each
501 --- elfutils/src/findtextrel.c
502 +++ elfutils/src/findtextrel.c
503 @@ -504,7 +504,11 @@ ptrcompare (const void *p1, const void *
507 -check_rel (size_t nsegments, struct segments segments[nsegments],
508 +check_rel (size_t nsegments, struct segments segments[
513 GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
514 const char *fname, bool more_than_one, void **knownsrcs)
516 --- elfutils/src/ld.h
517 +++ elfutils/src/ld.h
518 @@ -1122,6 +1122,7 @@ extern bool dynamically_linked_p (void);
520 /* Checked whether the symbol is undefined and referenced from a DSO. */
521 extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
522 +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
523 #ifdef __GNUC_STDC_INLINE__
524 __attribute__ ((__gnu_inline__))
526 @@ -1139,5 +1140,6 @@ linked_from_dso_p (struct scninfo *scnin
528 return sym->defined && sym->in_dso;
530 +#endif /* Optimizing and not GCC 4.2. */
533 --- elfutils/src/Makefile.am
534 +++ elfutils/src/Makefile.am
535 @@ -99,6 +99,9 @@ addr2line_no_Wformat = yes
536 # XXX While the file is not finished, don't warn about this
537 ldgeneric_no_Wunused = yes
539 +# Buggy old compilers.
540 +readelf_no_Werror = yes
542 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
543 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
544 size_LDADD = $(libelf) $(libeu) $(libmudflap)
545 --- elfutils/src/readelf.c
546 +++ elfutils/src/readelf.c
547 @@ -4274,10 +4274,11 @@ struct listptr
548 #define listptr_offset_size(p) ((p)->dwarf64 ? 8 : 4)
549 #define listptr_address_size(p) ((p)->addr64 ? 8 : 4)
551 +static const char *listptr_name;
553 -compare_listptr (const void *a, const void *b, void *arg)
554 +compare_listptr (const void *a, const void *b)
556 - const char *name = arg;
557 + const char *const name = listptr_name;
558 struct listptr *p1 = (void *) a;
559 struct listptr *p2 = (void *) b;
561 @@ -4357,8 +4358,11 @@ static void
562 sort_listptr (struct listptr_table *table, const char *name)
565 - qsort_r (table->table, table->n, sizeof table->table[0],
566 - &compare_listptr, (void *) name);
568 + listptr_name = name;
569 + qsort (table->table, table->n, sizeof table->table[0],
575 @@ -8098,7 +8102,7 @@ dump_archive_index (Elf *elf, const char
576 if (unlikely (elf_rand (elf, as_off) == 0)
577 || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
579 -#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
580 +#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
583 error (EXIT_FAILURE, 0,
584 --- elfutils/src/strings.c
585 +++ elfutils/src/strings.c
590 +#ifndef MAP_POPULATE
591 +# define MAP_POPULATE 0
595 /* Prototypes of local functions. */
596 static int read_fd (int fd, const char *fname, off64_t fdlen);
597 @@ -491,8 +495,13 @@ map_file (int fd, off64_t start_off, off
599 if (mem != MAP_FAILED)
601 +#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
602 +# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
604 +#ifdef POSIX_MADV_SEQUENTIAL
605 /* We will go through the mapping sequentially. */
606 (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
610 if (errno != EINVAL && errno != ENOMEM)
611 @@ -584,9 +593,11 @@ read_block (int fd, const char *fname, o
612 elfmap_off = from & ~(ps - 1);
613 elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
615 +#ifdef POSIX_FADV_SEQUENTIAL
616 if (unlikely (elfmap == MAP_FAILED))
617 /* Let the kernel know we are going to read everything in sequence. */
618 (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
622 if (unlikely (elfmap == MAP_FAILED))
623 --- elfutils/src/strip.c
624 +++ elfutils/src/strip.c
630 +# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
632 +# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
636 /* Name and version of program. */
637 static void print_version (FILE *stream, struct argp_state *state);
638 @@ -311,8 +317,18 @@ process_file (const char *fname)
640 /* If we have to preserve the timestamp, we need it in the
641 format utimes() understands. */
642 +#ifdef HAVE_STRUCT_STAT_ST_ATIM
643 TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
645 + tv[0].tv_sec = pre_st.st_atime;
648 +#ifdef HAVE_STRUCT_STAT_ST_MTIM
649 TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
651 + tv[1].tv_sec = pre_st.st_atime;
657 @@ -1809,7 +1825,7 @@ while computing checksum for debug infor
658 /* If requested, preserve the timestamp. */
661 - if (futimes (fd, tvp) != 0)
662 + if (FUTIMES (fd, output_fname, tvp) != 0)
664 error (0, errno, gettext ("\
665 cannot set access and modification date of '%s'"),
666 @@ -1866,7 +1882,7 @@ handle_ar (int fd, Elf *elf, const char
670 - if (unlikely (futimes (fd, tvp) != 0))
671 + if (unlikely (FUTIMES (fd, fname, tvp) != 0))
673 error (0, errno, gettext ("\
674 cannot set access and modification date of '%s'"), fname);
675 --- elfutils/tests/ChangeLog
676 +++ elfutils/tests/ChangeLog
679 2008-01-21 Roland McGrath <roland@redhat.com>
681 + * line2addr.c (main): Revert last change.
683 * testfile45.S.bz2: Add tests for cltq, cqto.
684 * testfile45.expect.bz2: Adjust.
687 * Makefile.am (TESTS): Add run-elflint-test.sh.
688 (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
690 +2005-05-31 Roland McGrath <roland@redhat.com>
692 + * Makefile.am (WEXTRA): New variable, substituted by configure.
693 + (AM_CFLAGS): Use it in place of -Wextra.
695 2005-05-24 Ulrich Drepper <drepper@redhat.com>
697 * get-files.c (main): Use correct format specifier.
698 --- elfutils/tests/line2addr.c
699 +++ elfutils/tests/line2addr.c
700 @@ -132,7 +132,7 @@ main (int argc, char *argv[])
702 struct args a = { .arg = argv[cnt] };
704 - switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
705 + switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))