diff options
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils-0.160/redhat-portability.diff')
-rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/redhat-portability.diff | 1013 |
1 files changed, 1013 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.160/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.160/redhat-portability.diff new file mode 100644 index 0000000000..a358b11fe6 --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.160/redhat-portability.diff | |||
@@ -0,0 +1,1013 @@ | |||
1 | Index: elfutils-0.159/backends/ChangeLog | ||
2 | =================================================================== | ||
3 | --- elfutils-0.159.orig/backends/ChangeLog | ||
4 | +++ elfutils-0.159/backends/ChangeLog | ||
5 | @@ -364,6 +364,10 @@ | ||
6 | * ppc_attrs.c (ppc_check_object_attribute): Handle tag | ||
7 | GNU_Power_ABI_Struct_Return. | ||
8 | |||
9 | +2009-01-23 Roland McGrath <roland@redhat.com> | ||
10 | + | ||
11 | + * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED). | ||
12 | + | ||
13 | 2008-10-04 Ulrich Drepper <drepper@redhat.com> | ||
14 | |||
15 | * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and | ||
16 | @@ -691,6 +695,11 @@ | ||
17 | * sparc_init.c: Likewise. | ||
18 | * x86_64_init.c: Likewise. | ||
19 | |||
20 | +2005-11-22 Roland McGrath <roland@redhat.com> | ||
21 | + | ||
22 | + * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure. | ||
23 | + (libebl_%.so rule): Use it in place of -Wl,--as-needed. | ||
24 | + | ||
25 | 2005-11-19 Roland McGrath <roland@redhat.com> | ||
26 | |||
27 | * ppc64_reloc.def: REL30 -> ADDR30. | ||
28 | @@ -713,6 +722,9 @@ | ||
29 | * Makefile.am (uninstall): Don't try to remove $(pkgincludedir). | ||
30 | (CLEANFILES): Add libebl_$(m).so. | ||
31 | |||
32 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
33 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
34 | + | ||
35 | * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>. | ||
36 | * ppc64_reloc.def: Likewise. | ||
37 | |||
38 | Index: elfutils-0.159/backends/Makefile.am | ||
39 | =================================================================== | ||
40 | --- elfutils-0.159.orig/backends/Makefile.am | ||
41 | +++ elfutils-0.159/backends/Makefile.am | ||
42 | @@ -119,7 +119,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a | ||
43 | $(LINK) -shared -o $(@:.map=.so) \ | ||
44 | -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ | ||
45 | -Wl,--version-script,$(@:.so=.map) \ | ||
46 | - -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) | ||
47 | + -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) | ||
48 | $(textrel_check) | ||
49 | |||
50 | libebl_i386.so: $(cpu_i386) | ||
51 | Index: elfutils-0.159/ChangeLog | ||
52 | =================================================================== | ||
53 | --- elfutils-0.159.orig/ChangeLog | ||
54 | +++ elfutils-0.159/ChangeLog | ||
55 | @@ -148,6 +148,8 @@ | ||
56 | |||
57 | 2012-01-24 Mark Wielaard <mjw@redhat.com> | ||
58 | |||
59 | + * configure.ac: Wrap AC_COMPILE_IFELSE sources in AC_LANG_SOURCE. | ||
60 | + | ||
61 | * COPYING: Fix address. Updated version from gnulib. | ||
62 | |||
63 | 2012-01-23 Mark Wielaard <mjw@redhat.com> | ||
64 | @@ -166,6 +168,9 @@ | ||
65 | |||
66 | 2011-10-08 Mike Frysinger <vapier@gentoo.org> | ||
67 | |||
68 | + * configure.ac (--disable-werror): Handle it, controlling BUILD_WERROR | ||
69 | + automake option. | ||
70 | + | ||
71 | * configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly. | ||
72 | |||
73 | 2011-10-02 Ulrich Drepper <drepper@gmail.com> | ||
74 | @@ -187,6 +192,10 @@ | ||
75 | |||
76 | * configure.ac (LOCALEDIR, DATADIRNAME): Removed. | ||
77 | |||
78 | +2009-11-22 Roland McGrath <roland@redhat.com> | ||
79 | + | ||
80 | + * configure.ac: Use sed and expr instead of modern bash extensions. | ||
81 | + | ||
82 | 2009-09-21 Ulrich Drepper <drepper@redhat.com> | ||
83 | |||
84 | * configure.ac: Update for more modern autoconf. | ||
85 | @@ -195,6 +204,10 @@ | ||
86 | |||
87 | * configure.ac (zip_LIBS): Check for liblzma too. | ||
88 | |||
89 | +2009-08-17 Roland McGrath <roland@redhat.com> | ||
90 | + | ||
91 | + * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works. | ||
92 | + | ||
93 | 2009-04-19 Roland McGrath <roland@redhat.com> | ||
94 | |||
95 | * configure.ac (eu_version): Round down here, not in version.h macros. | ||
96 | @@ -206,6 +219,8 @@ | ||
97 | |||
98 | 2009-01-23 Roland McGrath <roland@redhat.com> | ||
99 | |||
100 | + * configure.ac: Check for __builtin_popcount. | ||
101 | + | ||
102 | * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3. | ||
103 | |||
104 | * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of | ||
105 | @@ -286,6 +301,10 @@ | ||
106 | * configure.ac: Add dummy automake conditional to get dependencies | ||
107 | for non-generic linker right. See src/Makefile.am. | ||
108 | |||
109 | +2005-11-22 Roland McGrath <roland@redhat.com> | ||
110 | + | ||
111 | + * configure.ac: Check for --as-needed linker option. | ||
112 | + | ||
113 | 2005-11-18 Roland McGrath <roland@redhat.com> | ||
114 | |||
115 | * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable. | ||
116 | @@ -333,6 +352,17 @@ | ||
117 | * Makefile.am (all_SUBDIRS): Add libdwfl. | ||
118 | * configure.ac: Write libdwfl/Makefile. | ||
119 | |||
120 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
121 | + | ||
122 | + * configure.ac (WEXTRA): Check for -Wextra and set this substitution. | ||
123 | + | ||
124 | + * configure.ac: Check for struct stat st_?tim members. | ||
125 | + * src/strip.c (process_file): Use st_?time if st_?tim are not there. | ||
126 | + | ||
127 | + * configure.ac: Check for futimes function. | ||
128 | + * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead. | ||
129 | + (handle_ar) [! HAVE_FUTIMES]: Likewise. | ||
130 | + | ||
131 | 2005-05-19 Roland McGrath <roland@redhat.com> | ||
132 | |||
133 | * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros. | ||
134 | Index: elfutils-0.159/config/ChangeLog | ||
135 | =================================================================== | ||
136 | --- elfutils-0.159.orig/config/ChangeLog | ||
137 | +++ elfutils-0.159/config/ChangeLog | ||
138 | @@ -58,6 +58,10 @@ | ||
139 | |||
140 | * known-dwarf.awk: Use gawk. | ||
141 | |||
142 | +2011-10-08 Mike Frysinger <vapier@gentoo.org> | ||
143 | + | ||
144 | + * eu.am [BUILD_WERROR]: Conditionalize -Werror use on this. | ||
145 | + | ||
146 | 2010-07-02 Ulrich Drepper <drepper@redhat.com> | ||
147 | |||
148 | * elfutils.spec.in: Add more BuildRequires. | ||
149 | Index: elfutils-0.159/config/eu.am | ||
150 | =================================================================== | ||
151 | --- elfutils-0.159.orig/config/eu.am | ||
152 | +++ elfutils-0.159/config/eu.am | ||
153 | @@ -1,6 +1,6 @@ | ||
154 | ## Common automake fragments for elfutils subdirectory makefiles. | ||
155 | ## | ||
156 | -## Copyright (C) 2010, 2014 Red Hat, Inc. | ||
157 | +## Copyright (C) 2010-2011, 2014 Red Hat, Inc. | ||
158 | ## | ||
159 | ## This file is part of elfutils. | ||
160 | ## | ||
161 | @@ -29,13 +29,21 @@ | ||
162 | ## not, see <http://www.gnu.org/licenses/>. | ||
163 | ## | ||
164 | |||
165 | +WEXTRA = @WEXTRA@ | ||
166 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
167 | + | ||
168 | DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"' | ||
169 | AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. | ||
170 | -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ | ||
171 | +AM_CFLAGS = -std=gnu99 -Wall -Wshadow \ | ||
172 | $(if $($(*F)_no_Werror),,-Werror) \ | ||
173 | - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ | ||
174 | + $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \ | ||
175 | + $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \ | ||
176 | $($(*F)_CFLAGS) | ||
177 | |||
178 | +if BUILD_WERROR | ||
179 | +AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror) | ||
180 | +endif | ||
181 | + | ||
182 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) | ||
183 | |||
184 | %.os: %.c %.o | ||
185 | Index: elfutils-0.159/configure.ac | ||
186 | =================================================================== | ||
187 | --- elfutils-0.159.orig/configure.ac | ||
188 | +++ elfutils-0.159/configure.ac | ||
189 | @@ -89,6 +89,54 @@ CFLAGS="$old_CFLAGS"]) | ||
190 | AS_IF([test "x$ac_cv_c99" != xyes], | ||
191 | AC_MSG_ERROR([gcc with C99 support required])) | ||
192 | |||
193 | +AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl | ||
194 | +old_CFLAGS="$CFLAGS" | ||
195 | +CFLAGS="$CFLAGS -Wextra" | ||
196 | +AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo (void) { }])], | ||
197 | + ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no) | ||
198 | +CFLAGS="$old_CFLAGS"]) | ||
199 | +AC_SUBST(WEXTRA) | ||
200 | +AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W]) | ||
201 | + | ||
202 | +AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl | ||
203 | +old_CFLAGS="$CFLAGS" | ||
204 | +CFLAGS="$CFLAGS -fgnu89-inline -Werror" | ||
205 | +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ | ||
206 | +void foo (void) | ||
207 | +{ | ||
208 | + inline void bar (void) {} | ||
209 | + bar (); | ||
210 | +} | ||
211 | +extern inline void baz (void) {} | ||
212 | +])], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no) | ||
213 | +CFLAGS="$old_CFLAGS"]) | ||
214 | +AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes], | ||
215 | + [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"]) | ||
216 | + | ||
217 | +AC_CACHE_CHECK([for --as-needed linker option], | ||
218 | + ac_cv_as_needed, [dnl | ||
219 | +cat > conftest.c <<EOF | ||
220 | +int main (void) { return 0; } | ||
221 | +EOF | ||
222 | +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS | ||
223 | + -fPIC -shared -o conftest.so conftest.c | ||
224 | + -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD]) | ||
225 | +then | ||
226 | + ac_cv_as_needed=yes | ||
227 | +else | ||
228 | + ac_cv_as_needed=no | ||
229 | +fi | ||
230 | +rm -f conftest*]) | ||
231 | +AS_IF([test "x$ac_cv_as_needed" = xyes], | ||
232 | + [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=]) | ||
233 | +AC_SUBST(LD_AS_NEEDED) | ||
234 | + | ||
235 | +AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl | ||
236 | +AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])], | ||
237 | + ac_cv_popcount=yes, ac_cv_popcount=no)]) | ||
238 | +AS_IF([test "x$ac_cv_popcount" = xyes], | ||
239 | + [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])]) | ||
240 | + | ||
241 | AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl | ||
242 | # Use the same flags that we use for our DSOs, so the test is representative. | ||
243 | # Some old compiler/linker/libc combinations fail some ways and not others. | ||
244 | @@ -104,7 +152,10 @@ static __thread int a; int foo (int b) { | ||
245 | CFLAGS="$save_CFLAGS" | ||
246 | LDFLAGS="$save_LDFLAGS"]) | ||
247 | AS_IF([test "x$ac_cv_tls" != xyes], | ||
248 | - AC_MSG_ERROR([__thread support required])) | ||
249 | + [AS_IF([test "$use_locks" = yes], | ||
250 | + [AC_MSG_ERROR([--enable-thread-safety requires __thread support])], | ||
251 | + [AC_DEFINE([__thread], [/* empty: no multi-thread support */], | ||
252 | + [Stubbed out if missing compiler support.])])]) | ||
253 | |||
254 | dnl This test must come as early as possible after the compiler configuration | ||
255 | dnl tests, because the choice of the file model can (in principle) affect | ||
256 | @@ -183,6 +234,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_ | ||
257 | AM_CONDITIONAL(BUILD_STATIC, [dnl | ||
258 | test "$use_gprof" = yes -o "$use_gcov" = yes]) | ||
259 | |||
260 | +AC_ARG_ENABLE([werror], | ||
261 | +AS_HELP_STRING([--disable-werror],[do not build with -Werror]), | ||
262 | + [enable_werror=$enableval], [enable_werror=yes]) | ||
263 | +AM_CONDITIONAL(BUILD_WERROR, test "$enable_werror" = yes) | ||
264 | + | ||
265 | AC_ARG_ENABLE([tests-rpath], | ||
266 | AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]), | ||
267 | [tests_use_rpath=$enableval], [tests_use_rpath=no]) | ||
268 | @@ -297,7 +353,7 @@ case "$eu_version" in | ||
269 | esac | ||
270 | |||
271 | # Round up to the next release API (x.y) version. | ||
272 | -eu_version=$(( (eu_version + 999) / 1000 )) | ||
273 | +eu_version=`expr \( $eu_version + 999 \) / 1000` | ||
274 | |||
275 | AC_CHECK_SIZEOF(long) | ||
276 | |||
277 | Index: elfutils-0.159/lib/ChangeLog | ||
278 | =================================================================== | ||
279 | --- elfutils-0.159.orig/lib/ChangeLog | ||
280 | +++ elfutils-0.159/lib/ChangeLog | ||
281 | @@ -65,6 +65,9 @@ | ||
282 | |||
283 | 2009-01-23 Roland McGrath <roland@redhat.com> | ||
284 | |||
285 | + * eu-config.h [! HAVE_BUILTIN_POPCOUNT] | ||
286 | + (__builtin_popcount): New inline function. | ||
287 | + | ||
288 | * eu-config.h: Add multiple inclusion protection. | ||
289 | |||
290 | 2009-01-17 Ulrich Drepper <drepper@redhat.com> | ||
291 | @@ -121,6 +124,11 @@ | ||
292 | * Makefile.am (libeu_a_SOURCES): Add it. | ||
293 | * system.h: Declare crc32_file. | ||
294 | |||
295 | +2005-02-07 Roland McGrath <roland@redhat.com> | ||
296 | + | ||
297 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
298 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
299 | + | ||
300 | 2005-04-30 Ulrich Drepper <drepper@redhat.com> | ||
301 | |||
302 | * Makefile.am: Use -ffunction-sections for xmalloc.c. | ||
303 | Index: elfutils-0.159/lib/eu-config.h | ||
304 | =================================================================== | ||
305 | --- elfutils-0.159.orig/lib/eu-config.h | ||
306 | +++ elfutils-0.159/lib/eu-config.h | ||
307 | @@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr | ||
308 | /* This macro is used by the tests conditionalize for standalone building. */ | ||
309 | #define ELFUTILS_HEADER(name) <lib##name.h> | ||
310 | |||
311 | +#ifndef HAVE_BUILTIN_POPCOUNT | ||
312 | +# define __builtin_popcount hakmem_popcount | ||
313 | +static inline unsigned int __attribute__ ((unused)) | ||
314 | +hakmem_popcount (unsigned int x) | ||
315 | +{ | ||
316 | + /* HAKMEM 169 */ | ||
317 | + unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111); | ||
318 | + return ((n + (n >> 3)) & 030707070707) % 63; | ||
319 | +} | ||
320 | +#endif /* HAVE_BUILTIN_POPCOUNT */ | ||
321 | + | ||
322 | |||
323 | #ifdef SHARED | ||
324 | # define OLD_VERSION(name, version) \ | ||
325 | Index: elfutils-0.159/libasm/ChangeLog | ||
326 | =================================================================== | ||
327 | --- elfutils-0.159.orig/libasm/ChangeLog | ||
328 | +++ elfutils-0.159/libasm/ChangeLog | ||
329 | @@ -79,6 +79,11 @@ | ||
330 | * asm_error.c: Add new error ASM_E_IOERROR. | ||
331 | * libasmP.h: Add ASM_E_IOERROR definition. | ||
332 | |||
333 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
334 | + | ||
335 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
336 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
337 | + | ||
338 | 2005-02-15 Ulrich Drepper <drepper@redhat.com> | ||
339 | |||
340 | * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. | ||
341 | Index: elfutils-0.159/libcpu/ChangeLog | ||
342 | =================================================================== | ||
343 | --- elfutils-0.159.orig/libcpu/ChangeLog | ||
344 | +++ elfutils-0.159/libcpu/ChangeLog | ||
345 | @@ -51,6 +51,9 @@ | ||
346 | |||
347 | 2009-01-23 Roland McGrath <roland@redhat.com> | ||
348 | |||
349 | + * i386_disasm.c (i386_disasm): Add abort after assert-constant for old | ||
350 | + compilers that don't realize it's noreturn. | ||
351 | + | ||
352 | * Makefile.am (i386_parse_CFLAGS): Use quotes around command | ||
353 | substitution that can produce leading whitespace. | ||
354 | |||
355 | @@ -380,6 +383,11 @@ | ||
356 | * defs/i386.doc: New file. | ||
357 | * defs/x86_64: New file. | ||
358 | |||
359 | +2005-04-04 Roland McGrath <roland@redhat.com> | ||
360 | + | ||
361 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
362 | + (AM_CFLAGS): Use it instead of -Wextra. | ||
363 | + | ||
364 | 2005-02-15 Ulrich Drepper <drepper@redhat.com> | ||
365 | |||
366 | * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. | ||
367 | Index: elfutils-0.159/libcpu/i386_disasm.c | ||
368 | =================================================================== | ||
369 | --- elfutils-0.159.orig/libcpu/i386_disasm.c | ||
370 | +++ elfutils-0.159/libcpu/i386_disasm.c | ||
371 | @@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con | ||
372 | |||
373 | default: | ||
374 | assert (! "INVALID not handled"); | ||
375 | + abort (); | ||
376 | } | ||
377 | } | ||
378 | else | ||
379 | Index: elfutils-0.159/libdw/ChangeLog | ||
380 | =================================================================== | ||
381 | --- elfutils-0.159.orig/libdw/ChangeLog | ||
382 | +++ elfutils-0.159/libdw/ChangeLog | ||
383 | @@ -420,6 +420,10 @@ | ||
384 | |||
385 | * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk. | ||
386 | |||
387 | +2011-07-20 Mark Wielaard <mjw@redhat.com> | ||
388 | + | ||
389 | + * dwarf_begin_elf.c: Add fallback for be64toh if not defined. | ||
390 | + | ||
391 | 2011-07-14 Mark Wielaard <mjw@redhat.com> | ||
392 | |||
393 | * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info. | ||
394 | @@ -779,6 +783,10 @@ | ||
395 | |||
396 | * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too. | ||
397 | |||
398 | +2009-08-17 Roland McGrath <roland@redhat.com> | ||
399 | + | ||
400 | + * libdw.h: Disable extern inlines for GCC 4.2. | ||
401 | + | ||
402 | 2009-08-10 Roland McGrath <roland@redhat.com> | ||
403 | |||
404 | * dwarf_getscopevar.c: Use dwarf_diename. | ||
405 | @@ -1547,6 +1555,11 @@ | ||
406 | |||
407 | 2005-05-31 Roland McGrath <roland@redhat.com> | ||
408 | |||
409 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
410 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
411 | + | ||
412 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
413 | + | ||
414 | * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to | ||
415 | formref offset. | ||
416 | |||
417 | Index: elfutils-0.159/libdw/dwarf_begin_elf.c | ||
418 | =================================================================== | ||
419 | --- elfutils-0.159.orig/libdw/dwarf_begin_elf.c | ||
420 | +++ elfutils-0.159/libdw/dwarf_begin_elf.c | ||
421 | @@ -47,6 +47,14 @@ | ||
422 | #if USE_ZLIB | ||
423 | # include <endian.h> | ||
424 | # define crc32 loser_crc32 | ||
425 | +# ifndef be64toh | ||
426 | +# include <byteswap.h> | ||
427 | +# if __BYTE_ORDER == __LITTLE_ENDIAN | ||
428 | +# define be64toh(x) bswap_64 (x) | ||
429 | +# else | ||
430 | +# define be64toh(x) (x) | ||
431 | +# endif | ||
432 | +# endif | ||
433 | # include <zlib.h> | ||
434 | # undef crc32 | ||
435 | #endif | ||
436 | Index: elfutils-0.159/libdw/libdw.h | ||
437 | =================================================================== | ||
438 | --- elfutils-0.159.orig/libdw/libdw.h | ||
439 | +++ elfutils-0.159/libdw/libdw.h | ||
440 | @@ -891,7 +891,7 @@ extern Dwarf_OOM dwarf_new_oom_handler ( | ||
441 | |||
442 | |||
443 | /* Inline optimizations. */ | ||
444 | -#ifdef __OPTIMIZE__ | ||
445 | +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2) | ||
446 | /* Return attribute code of given attribute. */ | ||
447 | __libdw_extern_inline unsigned int | ||
448 | dwarf_whatattr (Dwarf_Attribute *attr) | ||
449 | Index: elfutils-0.159/libdwfl/ChangeLog | ||
450 | =================================================================== | ||
451 | --- elfutils-0.159.orig/libdwfl/ChangeLog | ||
452 | +++ elfutils-0.159/libdwfl/ChangeLog | ||
453 | @@ -421,6 +421,21 @@ | ||
454 | (dwfl_module_addrsym) (i_to_symfile): New function. | ||
455 | (dwfl_module_addrsym) (search_table): Use it. | ||
456 | |||
457 | +2013-11-09 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
458 | + | ||
459 | + Older OS compatibility bits. | ||
460 | + * linux-core-attach.c (be64toh, le64toh, be32toh, le32toh): Provide | ||
461 | + fallbacks if not defined by system. | ||
462 | + | ||
463 | +2013-11-09 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
464 | + | ||
465 | + Handle T-stopped detach for old kernels. | ||
466 | + * linux-pid-attach.c (struct pid_arg): New field stopped. | ||
467 | + (ptrace_attach): New parameter stoppedp. Set it appropriately. | ||
468 | + (pid_set_initial_registers): Pass the new field. | ||
469 | + (pid_thread_detach): Handle the case of STOPPED for old kernels. | ||
470 | + (__libdwfl_attach_state_for_pid): Initialize STOPPED. | ||
471 | + | ||
472 | 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
473 | Mark Wielaard <mjw@redhat.com> | ||
474 | |||
475 | @@ -2186,6 +2201,11 @@ | ||
476 | |||
477 | 2005-07-21 Roland McGrath <roland@redhat.com> | ||
478 | |||
479 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
480 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
481 | + | ||
482 | +2005-07-21 Roland McGrath <roland@redhat.com> | ||
483 | + | ||
484 | * Makefile.am (noinst_HEADERS): Add loc2c.c. | ||
485 | |||
486 | * test2.c (main): Check sscanf result to quiet warning. | ||
487 | Index: elfutils-0.159/libdwfl/linux-core-attach.c | ||
488 | =================================================================== | ||
489 | --- elfutils-0.159.orig/libdwfl/linux-core-attach.c | ||
490 | +++ elfutils-0.159/libdwfl/linux-core-attach.c | ||
491 | @@ -29,6 +29,35 @@ | ||
492 | #include "libdwflP.h" | ||
493 | #include <fcntl.h> | ||
494 | #include "system.h" | ||
495 | +#include <endian.h> | ||
496 | +#include <byteswap.h> | ||
497 | +#if __BYTE_ORDER == __LITTLE_ENDIAN | ||
498 | +# ifndef be64toh | ||
499 | +# define be64toh(x) bswap_64 (x) | ||
500 | +# endif | ||
501 | +# ifndef le64toh | ||
502 | +# define le64toh(x) (x) | ||
503 | +# endif | ||
504 | +# ifndef be32toh | ||
505 | +# define be32toh(x) bswap_32 (x) | ||
506 | +# endif | ||
507 | +# ifndef le32toh | ||
508 | +# define le32toh(x) (x) | ||
509 | +# endif | ||
510 | +#else | ||
511 | +# ifndef be64toh | ||
512 | +# define be64toh(x) (x) | ||
513 | +# endif | ||
514 | +# ifndef le64toh | ||
515 | +# define le64toh(x) bswap_64 (x) | ||
516 | +# endif | ||
517 | +# ifndef be32toh | ||
518 | +# define be32toh(x) (x) | ||
519 | +# endif | ||
520 | +# ifndef le32toh | ||
521 | +# define le32toh(x) bswap_32 (x) | ||
522 | +# endif | ||
523 | +#endif | ||
524 | |||
525 | #ifndef MIN | ||
526 | # define MIN(a, b) ((a) < (b) ? (a) : (b)) | ||
527 | Index: elfutils-0.159/libdwfl/linux-pid-attach.c | ||
528 | =================================================================== | ||
529 | --- elfutils-0.159.orig/libdwfl/linux-pid-attach.c | ||
530 | +++ elfutils-0.159/libdwfl/linux-pid-attach.c | ||
531 | @@ -255,6 +255,11 @@ void | ||
532 | internal_function | ||
533 | __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped) | ||
534 | { | ||
535 | + // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special | ||
536 | + // handling of the detachment to keep the process State: T (stopped). | ||
537 | + if (tid_was_stopped) | ||
538 | + syscall (__NR_tkill, tid, SIGSTOP); | ||
539 | + | ||
540 | /* This handling is needed only on older Linux kernels such as | ||
541 | 2.6.32-358.23.2.el6.ppc64. Later kernels such as | ||
542 | 3.11.7-200.fc19.x86_64 remember the T (stopped) state | ||
543 | @@ -262,6 +267,15 @@ __libdwfl_ptrace_detach (pid_t tid, bool | ||
544 | PTRACE_DETACH. */ | ||
545 | ptrace (PTRACE_DETACH, tid, NULL, | ||
546 | (void *) (intptr_t) (tid_was_stopped ? SIGSTOP : 0)); | ||
547 | + | ||
548 | + if (tid_was_stopped) | ||
549 | + { | ||
550 | + // Wait till the SIGSTOP settles down. | ||
551 | + int i; | ||
552 | + for (i = 0; i < 100000; i++) | ||
553 | + if (linux_proc_pid_is_stopped (tid)) | ||
554 | + break; | ||
555 | + } | ||
556 | } | ||
557 | |||
558 | static void | ||
559 | Index: elfutils-0.159/libebl/ChangeLog | ||
560 | =================================================================== | ||
561 | --- elfutils-0.159.orig/libebl/ChangeLog | ||
562 | +++ elfutils-0.159/libebl/ChangeLog | ||
563 | @@ -748,6 +748,11 @@ | ||
564 | * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency | ||
565 | tracking works right. | ||
566 | |||
567 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
568 | + | ||
569 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
570 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
571 | + | ||
572 | 2005-05-21 Ulrich Drepper <drepper@redhat.com> | ||
573 | |||
574 | * libebl_x86_64.map: Add x86_64_core_note. | ||
575 | Index: elfutils-0.159/libelf/ChangeLog | ||
576 | =================================================================== | ||
577 | --- elfutils-0.159.orig/libelf/ChangeLog | ||
578 | +++ elfutils-0.159/libelf/ChangeLog | ||
579 | @@ -135,6 +135,11 @@ | ||
580 | |||
581 | * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check. | ||
582 | |||
583 | +2011-03-10 Roland McGrath <roland@redhat.com> | ||
584 | + | ||
585 | + * gnuhash_xlate.h (elf_cvt_gnuhash): Avoid post-increment in bswap_32 | ||
586 | + argument, since some implementations are buggy macros. | ||
587 | + | ||
588 | 2011-02-26 Mark Wielaard <mjw@redhat.com> | ||
589 | |||
590 | * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini. | ||
591 | @@ -812,6 +817,11 @@ | ||
592 | |||
593 | * elf.h: Update from glibc. | ||
594 | |||
595 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
596 | + | ||
597 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
598 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
599 | + | ||
600 | 2005-05-08 Roland McGrath <roland@redhat.com> | ||
601 | |||
602 | * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now. | ||
603 | Index: elfutils-0.159/libelf/common.h | ||
604 | =================================================================== | ||
605 | --- elfutils-0.159.orig/libelf/common.h | ||
606 | +++ elfutils-0.159/libelf/common.h | ||
607 | @@ -139,7 +139,7 @@ libelf_release_all (Elf *elf) | ||
608 | (Var) = (sizeof (Var) == 1 \ | ||
609 | ? (unsigned char) (Var) \ | ||
610 | : (sizeof (Var) == 2 \ | ||
611 | - ? bswap_16 (Var) \ | ||
612 | + ? (unsigned short int) bswap_16 (Var) \ | ||
613 | : (sizeof (Var) == 4 \ | ||
614 | ? bswap_32 (Var) \ | ||
615 | : bswap_64 (Var)))) | ||
616 | @@ -148,7 +148,7 @@ libelf_release_all (Elf *elf) | ||
617 | (Dst) = (sizeof (Var) == 1 \ | ||
618 | ? (unsigned char) (Var) \ | ||
619 | : (sizeof (Var) == 2 \ | ||
620 | - ? bswap_16 (Var) \ | ||
621 | + ? (unsigned short int) bswap_16 (Var) \ | ||
622 | : (sizeof (Var) == 4 \ | ||
623 | ? bswap_32 (Var) \ | ||
624 | : bswap_64 (Var)))) | ||
625 | Index: elfutils-0.159/libelf/gnuhash_xlate.h | ||
626 | =================================================================== | ||
627 | --- elfutils-0.159.orig/libelf/gnuhash_xlate.h | ||
628 | +++ elfutils-0.159/libelf/gnuhash_xlate.h | ||
629 | @@ -1,5 +1,5 @@ | ||
630 | /* Conversion functions for versioning information. | ||
631 | - Copyright (C) 2006, 2007 Red Hat, Inc. | ||
632 | + Copyright (C) 2006-2011 Red Hat, Inc. | ||
633 | This file is part of elfutils. | ||
634 | Written by Ulrich Drepper <drepper@redhat.com>, 2006. | ||
635 | |||
636 | @@ -68,7 +68,9 @@ elf_cvt_gnuhash (void *dest, const void | ||
637 | dest32 = (Elf32_Word *) &dest64[bitmask_words]; | ||
638 | while (len >= 4) | ||
639 | { | ||
640 | - *dest32++ = bswap_32 (*src32++); | ||
641 | + *dest32 = bswap_32 (*src32); | ||
642 | + ++dest32; | ||
643 | + ++src32; | ||
644 | len -= 4; | ||
645 | } | ||
646 | } | ||
647 | Index: elfutils-0.159/src/addr2line.c | ||
648 | =================================================================== | ||
649 | --- elfutils-0.159.orig/src/addr2line.c | ||
650 | +++ elfutils-0.159/src/addr2line.c | ||
651 | @@ -540,10 +540,10 @@ handle_address (const char *string, Dwfl | ||
652 | bool parsed = false; | ||
653 | int i, j; | ||
654 | char *name = NULL; | ||
655 | - if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 | ||
656 | + if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 | ||
657 | && string[i] == '\0') | ||
658 | parsed = adjust_to_section (name, &addr, dwfl); | ||
659 | - switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) | ||
660 | + switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) | ||
661 | { | ||
662 | default: | ||
663 | break; | ||
664 | Index: elfutils-0.159/src/ChangeLog | ||
665 | =================================================================== | ||
666 | --- elfutils-0.159.orig/src/ChangeLog | ||
667 | +++ elfutils-0.159/src/ChangeLog | ||
668 | @@ -1112,8 +1112,16 @@ | ||
669 | * readelf.c (attr_callback): Use print_block only when we don't use | ||
670 | print_ops. | ||
671 | |||
672 | +2009-08-17 Roland McGrath <roland@redhat.com> | ||
673 | + | ||
674 | + * ld.h: Disable extern inlines for GCC 4.2. | ||
675 | + | ||
676 | 2009-08-14 Roland McGrath <roland@redhat.com> | ||
677 | |||
678 | + * strings.c (read_block): Conditionalize posix_fadvise use | ||
679 | + on [POSIX_FADV_SEQUENTIAL]. | ||
680 | + From Petr Salinger <Petr.Salinger@seznam.cz>. | ||
681 | + | ||
682 | * ar.c (do_oper_extract): Use pathconf instead of statfs. | ||
683 | |||
684 | 2009-08-01 Ulrich Drepper <drepper@redhat.com> | ||
685 | @@ -1277,6 +1285,8 @@ | ||
686 | * readelf.c (print_debug_frame_section): Use t instead of j formats | ||
687 | for ptrdiff_t OFFSET. | ||
688 | |||
689 | + * addr2line.c (handle_address): Use %a instead of %m for compatibility. | ||
690 | + | ||
691 | 2009-01-21 Ulrich Drepper <drepper@redhat.com> | ||
692 | |||
693 | * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section | ||
694 | @@ -1460,6 +1470,11 @@ | ||
695 | that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really | ||
696 | is valid in RELRO. | ||
697 | |||
698 | +2008-03-01 Roland McGrath <roland@redhat.com> | ||
699 | + | ||
700 | + * readelf.c (dump_archive_index): Tweak portability hack | ||
701 | + to match [__GNUC__ < 4] too. | ||
702 | + | ||
703 | 2008-02-29 Roland McGrath <roland@redhat.com> | ||
704 | |||
705 | * readelf.c (print_attributes): Add a cast. | ||
706 | @@ -1711,6 +1726,8 @@ | ||
707 | |||
708 | * readelf.c (hex_dump): Fix rounding error in whitespace calculation. | ||
709 | |||
710 | + * Makefile.am (readelf_no_Werror): New variable. | ||
711 | + | ||
712 | 2007-10-15 Roland McGrath <roland@redhat.com> | ||
713 | |||
714 | * make-debug-archive.in: New file. | ||
715 | @@ -2150,6 +2167,10 @@ | ||
716 | * elflint.c (valid_e_machine): Add EM_ALPHA. | ||
717 | Reported by Christian Aichinger <Greek0@gmx.net>. | ||
718 | |||
719 | + * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to | ||
720 | + MADV_SEQUENTIAL if undefined. Don't call posix_madvise | ||
721 | + if neither is defined. | ||
722 | + | ||
723 | 2006-08-08 Ulrich Drepper <drepper@redhat.com> | ||
724 | |||
725 | * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB. | ||
726 | @@ -2226,6 +2247,10 @@ | ||
727 | * Makefile.am: Add hacks to create dependency files for non-generic | ||
728 | linker. | ||
729 | |||
730 | +2006-04-05 Roland McGrath <roland@redhat.com> | ||
731 | + | ||
732 | + * strings.c (MAP_POPULATE): Define to 0 if undefined. | ||
733 | + | ||
734 | 2006-06-12 Ulrich Drepper <drepper@redhat.com> | ||
735 | |||
736 | * ldgeneric.c (ld_generic_generate_sections): Don't create .interp | ||
737 | @@ -2574,6 +2599,11 @@ | ||
738 | * readelf.c (print_debug_loc_section): Fix indentation for larger | ||
739 | address size. | ||
740 | |||
741 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
742 | + | ||
743 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
744 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
745 | + | ||
746 | 2005-05-30 Roland McGrath <roland@redhat.com> | ||
747 | |||
748 | * readelf.c (print_debug_line_section): Print section offset of each | ||
749 | Index: elfutils-0.159/src/findtextrel.c | ||
750 | =================================================================== | ||
751 | --- elfutils-0.159.orig/src/findtextrel.c | ||
752 | +++ elfutils-0.159/src/findtextrel.c | ||
753 | @@ -496,7 +496,11 @@ ptrcompare (const void *p1, const void * | ||
754 | |||
755 | |||
756 | static void | ||
757 | -check_rel (size_t nsegments, struct segments segments[nsegments], | ||
758 | +check_rel (size_t nsegments, struct segments segments[ | ||
759 | +#if __GNUC__ >= 4 | ||
760 | + nsegments | ||
761 | +#endif | ||
762 | + ], | ||
763 | GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw, | ||
764 | const char *fname, bool more_than_one, void **knownsrcs) | ||
765 | { | ||
766 | Index: elfutils-0.159/src/ld.h | ||
767 | =================================================================== | ||
768 | --- elfutils-0.159.orig/src/ld.h | ||
769 | +++ elfutils-0.159/src/ld.h | ||
770 | @@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void); | ||
771 | |||
772 | /* Checked whether the symbol is undefined and referenced from a DSO. */ | ||
773 | extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx); | ||
774 | +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2) | ||
775 | #ifdef __GNUC_STDC_INLINE__ | ||
776 | __attribute__ ((__gnu_inline__)) | ||
777 | #endif | ||
778 | @@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scnin | ||
779 | |||
780 | return sym->defined && sym->in_dso; | ||
781 | } | ||
782 | +#endif /* Optimizing and not GCC 4.2. */ | ||
783 | |||
784 | #endif /* ld.h */ | ||
785 | Index: elfutils-0.159/src/Makefile.am | ||
786 | =================================================================== | ||
787 | --- elfutils-0.159.orig/src/Makefile.am | ||
788 | +++ elfutils-0.159/src/Makefile.am | ||
789 | @@ -89,6 +89,11 @@ endif | ||
790 | # XXX While the file is not finished, don't warn about this | ||
791 | ldgeneric_no_Wunused = yes | ||
792 | |||
793 | +# Buggy old compilers or libc headers. | ||
794 | +readelf_no_Werror = yes | ||
795 | +strings_no_Werror = yes | ||
796 | +addr2line_no_Wformat = yes | ||
797 | + | ||
798 | readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl | ||
799 | nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl \ | ||
800 | $(demanglelib) | ||
801 | Index: elfutils-0.159/src/readelf.c | ||
802 | =================================================================== | ||
803 | --- elfutils-0.159.orig/src/readelf.c | ||
804 | +++ elfutils-0.159/src/readelf.c | ||
805 | @@ -4239,10 +4239,12 @@ listptr_base (struct listptr *p) | ||
806 | return base; | ||
807 | } | ||
808 | |||
809 | +static const char *listptr_name; | ||
810 | + | ||
811 | static int | ||
812 | -compare_listptr (const void *a, const void *b, void *arg) | ||
813 | +compare_listptr (const void *a, const void *b) | ||
814 | { | ||
815 | - const char *name = arg; | ||
816 | + const char *const name = listptr_name; | ||
817 | struct listptr *p1 = (void *) a; | ||
818 | struct listptr *p2 = (void *) b; | ||
819 | |||
820 | @@ -4331,8 +4333,11 @@ static void | ||
821 | sort_listptr (struct listptr_table *table, const char *name) | ||
822 | { | ||
823 | if (table->n > 0) | ||
824 | - qsort_r (table->table, table->n, sizeof table->table[0], | ||
825 | - &compare_listptr, (void *) name); | ||
826 | + { | ||
827 | + listptr_name = name; | ||
828 | + qsort (table->table, table->n, sizeof table->table[0], | ||
829 | + &compare_listptr); | ||
830 | + } | ||
831 | } | ||
832 | |||
833 | static bool | ||
834 | @@ -9252,7 +9257,7 @@ dump_archive_index (Elf *elf, const char | ||
835 | if (unlikely (elf_rand (elf, as_off) == 0) | ||
836 | || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf)) | ||
837 | == NULL)) | ||
838 | -#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) | ||
839 | +#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4 | ||
840 | while (1) | ||
841 | #endif | ||
842 | error (EXIT_FAILURE, 0, | ||
843 | Index: elfutils-0.159/src/strings.c | ||
844 | =================================================================== | ||
845 | --- elfutils-0.159.orig/src/strings.c | ||
846 | +++ elfutils-0.159/src/strings.c | ||
847 | @@ -43,6 +43,10 @@ | ||
848 | |||
849 | #include <system.h> | ||
850 | |||
851 | +#ifndef MAP_POPULATE | ||
852 | +# define MAP_POPULATE 0 | ||
853 | +#endif | ||
854 | + | ||
855 | |||
856 | /* Prototypes of local functions. */ | ||
857 | static int read_fd (int fd, const char *fname, off64_t fdlen); | ||
858 | @@ -489,8 +493,13 @@ map_file (int fd, off64_t start_off, off | ||
859 | fd, start_off); | ||
860 | if (mem != MAP_FAILED) | ||
861 | { | ||
862 | +#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL | ||
863 | +# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL | ||
864 | +#endif | ||
865 | +#ifdef POSIX_MADV_SEQUENTIAL | ||
866 | /* We will go through the mapping sequentially. */ | ||
867 | (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL); | ||
868 | +#endif | ||
869 | break; | ||
870 | } | ||
871 | if (errno != EINVAL && errno != ENOMEM) | ||
872 | @@ -581,9 +590,11 @@ read_block (int fd, const char *fname, o | ||
873 | elfmap_off = from & ~(ps - 1); | ||
874 | elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size); | ||
875 | |||
876 | +#ifdef POSIX_FADV_SEQUENTIAL | ||
877 | if (unlikely (elfmap == MAP_FAILED)) | ||
878 | /* Let the kernel know we are going to read everything in sequence. */ | ||
879 | (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL); | ||
880 | +#endif | ||
881 | } | ||
882 | |||
883 | if (unlikely (elfmap == MAP_FAILED)) | ||
884 | Index: elfutils-0.159/src/strip.c | ||
885 | =================================================================== | ||
886 | --- elfutils-0.159.orig/src/strip.c | ||
887 | +++ elfutils-0.159/src/strip.c | ||
888 | @@ -45,6 +45,12 @@ | ||
889 | #include <libebl.h> | ||
890 | #include <system.h> | ||
891 | |||
892 | +#ifdef HAVE_FUTIMES | ||
893 | +# define FUTIMES(fd, fname, tvp) futimes (fd, tvp) | ||
894 | +#else | ||
895 | +# define FUTIMES(fd, fname, tvp) utimes (fname, tvp) | ||
896 | +#endif | ||
897 | + | ||
898 | typedef uint8_t GElf_Byte; | ||
899 | |||
900 | /* Name and version of program. */ | ||
901 | @@ -318,8 +324,18 @@ process_file (const char *fname) | ||
902 | |||
903 | /* If we have to preserve the timestamp, we need it in the | ||
904 | format utimes() understands. */ | ||
905 | +#ifdef HAVE_STRUCT_STAT_ST_ATIM | ||
906 | TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim); | ||
907 | +#else | ||
908 | + tv[0].tv_sec = pre_st.st_atime; | ||
909 | + tv[0].tv_usec = 0; | ||
910 | +#endif | ||
911 | +#ifdef HAVE_STRUCT_STAT_ST_MTIM | ||
912 | TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim); | ||
913 | +#else | ||
914 | + tv[1].tv_sec = pre_st.st_atime; | ||
915 | + tv[1].tv_usec = 0; | ||
916 | +#endif | ||
917 | } | ||
918 | |||
919 | /* Open the file. */ | ||
920 | @@ -2086,7 +2102,7 @@ while computing checksum for debug infor | ||
921 | /* If requested, preserve the timestamp. */ | ||
922 | if (tvp != NULL) | ||
923 | { | ||
924 | - if (futimes (fd, tvp) != 0) | ||
925 | + if (FUTIMES (fd, output_fname, tvp) != 0) | ||
926 | { | ||
927 | error (0, errno, gettext ("\ | ||
928 | cannot set access and modification date of '%s'"), | ||
929 | @@ -2143,7 +2159,7 @@ handle_ar (int fd, Elf *elf, const char | ||
930 | |||
931 | if (tvp != NULL) | ||
932 | { | ||
933 | - if (unlikely (futimes (fd, tvp) != 0)) | ||
934 | + if (unlikely (FUTIMES (fd, fname, tvp) != 0)) | ||
935 | { | ||
936 | error (0, errno, gettext ("\ | ||
937 | cannot set access and modification date of '%s'"), fname); | ||
938 | Index: elfutils-0.159/tests/backtrace.c | ||
939 | =================================================================== | ||
940 | --- elfutils-0.159.orig/tests/backtrace.c | ||
941 | +++ elfutils-0.159/tests/backtrace.c | ||
942 | @@ -36,6 +36,7 @@ | ||
943 | #include <fcntl.h> | ||
944 | #include <string.h> | ||
945 | #include <argp.h> | ||
946 | +#include <sys/syscall.h> | ||
947 | #include ELFUTILS_HEADER(dwfl) | ||
948 | |||
949 | #ifndef __linux__ | ||
950 | Index: elfutils-0.159/tests/ChangeLog | ||
951 | =================================================================== | ||
952 | --- elfutils-0.159.orig/tests/ChangeLog | ||
953 | +++ elfutils-0.159/tests/ChangeLog | ||
954 | @@ -283,6 +283,13 @@ | ||
955 | |||
956 | 2013-12-02 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
957 | |||
958 | + Handle T-stopped detach for old kernels. | ||
959 | + * backtrace.c: Include sys/syscall.h. | ||
960 | + (linux_proc_pid_is_stopped): New function. | ||
961 | + (ptrace_detach_stopped): Handle old kernels. | ||
962 | + | ||
963 | +2013-12-02 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
964 | + | ||
965 | * Makefile.am (check_PROGRAMS): Add backtrace, backtrace-child, | ||
966 | backtrace-data and backtrace-dwarf. | ||
967 | (BUILT_SOURCES, clean-local, backtrace-child-biarch): New. | ||
968 | @@ -1147,6 +1154,8 @@ | ||
969 | |||
970 | 2008-01-21 Roland McGrath <roland@redhat.com> | ||
971 | |||
972 | + * line2addr.c (main): Revert last change. | ||
973 | + | ||
974 | * testfile45.S.bz2: Add tests for cltq, cqto. | ||
975 | * testfile45.expect.bz2: Adjust. | ||
976 | |||
977 | @@ -1855,6 +1864,11 @@ | ||
978 | * Makefile.am (TESTS): Add run-elflint-test.sh. | ||
979 | (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2. | ||
980 | |||
981 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
982 | + | ||
983 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
984 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
985 | + | ||
986 | 2005-05-24 Ulrich Drepper <drepper@redhat.com> | ||
987 | |||
988 | * get-files.c (main): Use correct format specifier. | ||
989 | Index: elfutils-0.159/tests/line2addr.c | ||
990 | =================================================================== | ||
991 | --- elfutils-0.159.orig/tests/line2addr.c | ||
992 | +++ elfutils-0.159/tests/line2addr.c | ||
993 | @@ -124,7 +124,7 @@ main (int argc, char *argv[]) | ||
994 | { | ||
995 | struct args a = { .arg = argv[cnt] }; | ||
996 | |||
997 | - switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line)) | ||
998 | + switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line)) | ||
999 | { | ||
1000 | default: | ||
1001 | case 0: | ||
1002 | Index: elfutils-0.159/tests/Makefile.am | ||
1003 | =================================================================== | ||
1004 | --- elfutils-0.159.orig/tests/Makefile.am | ||
1005 | +++ elfutils-0.159/tests/Makefile.am | ||
1006 | @@ -356,6 +356,7 @@ get_lines_LDADD = $(libdw) $(libelf) | ||
1007 | get_files_LDADD = $(libdw) $(libelf) | ||
1008 | get_aranges_LDADD = $(libdw) $(libelf) | ||
1009 | allfcts_LDADD = $(libdw) $(libelf) | ||
1010 | +line2addr_no_Wformat = yes | ||
1011 | line2addr_LDADD = $(libdw) | ||
1012 | addrscopes_LDADD = $(libdw) | ||
1013 | funcscopes_LDADD = $(libdw) | ||