1 From 4b0fe80b3951f044c1c1b14d1d7f5f0b8ab67507 Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Thu, 31 Dec 2015 06:35:34 +0000
4 Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
7 Signed-off-by: Khem Raj <raj.khem@gmail.com>
9 Upstream-Status: Pending
13 lib/crc32_file.c | 4 +++-
14 lib/fixedsizehash.h | 4 ++--
15 lib/system.h | 11 +++++++++++
17 libasm/asm_end.c | 2 +-
18 libasm/asm_newscn.c | 2 +-
19 libcpu/i386_gendis.c | 2 +-
20 libcpu/i386_lex.c | 2 +-
21 libcpu/i386_parse.c | 2 +-
22 libdw/Makefile.am | 2 +-
23 libdw/libdw_alloc.c | 3 ++-
24 libdwfl/Makefile.am | 2 ++
25 libdwfl/dwfl_build_id_find_elf.c | 3 ++-
26 libdwfl/dwfl_error.c | 4 +++-
27 libdwfl/dwfl_module_getdwarf.c | 1 +
28 libdwfl/find-debuginfo.c | 2 +-
29 libdwfl/libdwfl_crc32_file.c | 10 ++++++++++
30 libdwfl/linux-kernel-modules.c | 1 +
31 libebl/eblopenbackend.c | 2 +-
32 libebl/eblwstrtab.c | 2 +-
33 libelf/elf.h | 9 ++++++---
35 libelf/libelfP.h | 1 +
36 src/addr2line.c | 2 +-
42 src/findtextrel.c | 2 +-
45 src/ldgeneric.c | 2 +-
57 tests/addrscopes.c | 2 +-
58 tests/allregs.c | 2 +-
59 tests/backtrace-data.c | 2 +-
60 tests/backtrace-dwarf.c | 2 +-
61 tests/backtrace.c | 2 +-
62 tests/buildid.c | 2 +-
63 tests/debugaltlink.c | 2 +-
64 tests/debuglink.c | 2 +-
65 tests/deleted.c | 2 +-
66 tests/dwfl-addr-sect.c | 2 +-
67 tests/dwfl-bug-addr-overflow.c | 2 +-
68 tests/dwfl-bug-fd-leak.c | 2 +-
69 tests/dwfl-bug-getmodules.c | 2 +-
70 tests/dwfl-report-elf-align.c | 2 +-
71 tests/dwfllines.c | 2 +-
72 tests/dwflmodtest.c | 2 +-
73 tests/dwflsyms.c | 2 +-
74 tests/early-offscn.c | 2 +-
76 tests/find-prologues.c | 2 +-
77 tests/funcretval.c | 2 +-
78 tests/funcscopes.c | 2 +-
79 tests/getsrc_die.c | 2 +-
80 tests/line2addr.c | 2 +-
81 tests/low_high_pc.c | 2 +-
82 tests/md5-sha1-test.c | 2 +-
83 tests/rdwrmmap.c | 2 +-
85 tests/sectiondump.c | 2 +-
86 tests/varlocs.c | 2 +-
87 tests/vdsosyms.c | 2 +-
88 77 files changed, 109 insertions(+), 73 deletions(-)
90 Index: elfutils-0.164/Makefile.am
91 ===================================================================
92 --- elfutils-0.164.orig/Makefile.am
93 +++ elfutils-0.164/Makefile.am
94 @@ -24,7 +24,7 @@ pkginclude_HEADERS = version.h
96 # Add doc back when we have some real content.
97 SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
98 - backends src po tests
101 EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
102 COPYING COPYING-GPLV2 COPYING-LGPLV3
103 Index: elfutils-0.164/lib/color.c
104 ===================================================================
105 --- elfutils-0.164.orig/lib/color.c
106 +++ elfutils-0.164/lib/color.c
116 Index: elfutils-0.164/lib/crc32_file.c
117 ===================================================================
118 --- elfutils-0.164.orig/lib/crc32_file.c
119 +++ elfutils-0.164/lib/crc32_file.c
128 #include <sys/stat.h>
129 #include <sys/mman.h>
134 crc32_file (int fd, uint32_t *resp)
136 Index: elfutils-0.164/lib/fixedsizehash.h
137 ===================================================================
138 --- elfutils-0.164.orig/lib/fixedsizehash.h
139 +++ elfutils-0.164/lib/fixedsizehash.h
144 -#include <sys/cdefs.h>
145 #include <sys/param.h>
149 -#define CONCAT(t1,t2) __CONCAT (t1,t2)
150 +#define CONCAT1(x,y) x##y
151 +#define CONCAT(x,y) CONCAT1(x,y)
153 /* Before including this file the following macros must be defined:
155 Index: elfutils-0.164/lib/system.h
156 ===================================================================
157 --- elfutils-0.164.orig/lib/system.h
158 +++ elfutils-0.164/lib/system.h
161 # error "Unknown byte order"
163 +#ifndef TEMP_FAILURE_RETRY
164 +#define TEMP_FAILURE_RETRY(expression) \
166 + ({ long int __result; \
167 + do __result = (long int) (expression); \
168 + while (__result == -1L && errno == EINTR); \
172 +#define error(status, errno, ...) err(status, __VA_ARGS__)
174 extern void *xmalloc (size_t) __attribute__ ((__malloc__));
175 extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
176 Index: elfutils-0.164/lib/xmalloc.c
177 ===================================================================
178 --- elfutils-0.164.orig/lib/xmalloc.c
179 +++ elfutils-0.164/lib/xmalloc.c
189 Index: elfutils-0.164/libasm/asm_end.c
190 ===================================================================
191 --- elfutils-0.164.orig/libasm/asm_end.c
192 +++ elfutils-0.164/libasm/asm_end.c
202 Index: elfutils-0.164/libasm/asm_newscn.c
203 ===================================================================
204 --- elfutils-0.164.orig/libasm/asm_newscn.c
205 +++ elfutils-0.164/libasm/asm_newscn.c
215 Index: elfutils-0.164/libcpu/i386_gendis.c
216 ===================================================================
217 --- elfutils-0.164.orig/libcpu/i386_gendis.c
218 +++ elfutils-0.164/libcpu/i386_gendis.c
228 Index: elfutils-0.164/libcpu/i386_lex.c
229 ===================================================================
230 --- elfutils-0.164.orig/libcpu/i386_lex.c
231 +++ elfutils-0.164/libcpu/i386_lex.c
232 @@ -571,7 +571,7 @@ char *i386_text;
241 Index: elfutils-0.164/libcpu/i386_parse.c
242 ===================================================================
243 --- elfutils-0.164.orig/libcpu/i386_parse.c
244 +++ elfutils-0.164/libcpu/i386_parse.c
251 #include <inttypes.h>
254 Index: elfutils-0.164/libdw/Makefile.am
255 ===================================================================
256 --- elfutils-0.164.orig/libdw/Makefile.am
257 +++ elfutils-0.164/libdw/Makefile.am
258 @@ -117,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
259 -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
260 -Wl,--version-script,$<,--no-undefined \
261 -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
262 - -ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS)
263 + -ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS) -lfts -largp
265 $(AM_V_at)ln -fs $@ $@.$(VERSION)
267 Index: elfutils-0.164/libdw/libdw_alloc.c
268 ===================================================================
269 --- elfutils-0.164.orig/libdw/libdw_alloc.c
270 +++ elfutils-0.164/libdw/libdw_alloc.c
279 #include <sys/param.h>
285 Index: elfutils-0.164/libdwfl/Makefile.am
286 ===================================================================
287 --- elfutils-0.164.orig/libdwfl/Makefile.am
288 +++ elfutils-0.164/libdwfl/Makefile.am
289 @@ -86,6 +86,8 @@ libelf = ../libelf/libelf.so
290 libebl = ../libebl/libebl.a
291 libeu = ../lib/libeu.a
295 libdwfl_pic_a_SOURCES =
296 am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_SOURCES:.c=.os)
298 Index: elfutils-0.164/libdwfl/dwfl_build_id_find_elf.c
299 ===================================================================
300 --- elfutils-0.164.orig/libdwfl/dwfl_build_id_find_elf.c
301 +++ elfutils-0.164/libdwfl/dwfl_build_id_find_elf.c
303 not, see <http://www.gnu.org/licenses/>. */
305 #include "libdwflP.h"
307 #include <inttypes.h>
310 @@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module
312 if (*file_name != NULL)
314 - *file_name = canonicalize_file_name (name);
315 + *file_name = realpath (name, NULL);
316 if (*file_name == NULL)
319 Index: elfutils-0.164/libdwfl/dwfl_error.c
320 ===================================================================
321 --- elfutils-0.164.orig/libdwfl/dwfl_error.c
322 +++ elfutils-0.164/libdwfl/dwfl_error.c
323 @@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
325 dwfl_errmsg (int error)
327 + static __thread char s[64] = "";
328 if (error == 0 || error == -1)
330 int last_error = global_error;
331 @@ -154,7 +155,8 @@ dwfl_errmsg (int error)
332 switch (error &~ 0xffff)
334 case OTHER_ERROR (ERRNO):
335 - return strerror_r (error & 0xffff, "bad", 0);
336 + strerror_r (error & 0xffff, s, sizeof(s));
338 case OTHER_ERROR (LIBELF):
339 return elf_errmsg (error & 0xffff);
340 case OTHER_ERROR (LIBDW):
341 Index: elfutils-0.164/libdwfl/dwfl_module_getdwarf.c
342 ===================================================================
343 --- elfutils-0.164.orig/libdwfl/dwfl_module_getdwarf.c
344 +++ elfutils-0.164/libdwfl/dwfl_module_getdwarf.c
350 #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */
351 #include "../libelf/libelfP.h"
353 Index: elfutils-0.164/libdwfl/find-debuginfo.c
354 ===================================================================
355 --- elfutils-0.164.orig/libdwfl/find-debuginfo.c
356 +++ elfutils-0.164/libdwfl/find-debuginfo.c
357 @@ -372,7 +372,7 @@ dwfl_standard_find_debuginfo (Dwfl_Modul
358 /* If FILE_NAME is a symlink, the debug file might be associated
359 with the symlink target name instead. */
361 - char *canon = canonicalize_file_name (file_name);
362 + char *canon = realpath (file_name, NULL);
363 if (canon != NULL && strcmp (file_name, canon))
364 fd = find_debuginfo_in_path (mod, canon,
365 debuglink_file, debuglink_crc,
366 Index: elfutils-0.164/libdwfl/libdwfl_crc32_file.c
367 ===================================================================
368 --- elfutils-0.164.orig/libdwfl/libdwfl_crc32_file.c
369 +++ elfutils-0.164/libdwfl/libdwfl_crc32_file.c
372 #define crc32_file attribute_hidden __libdwfl_crc32_file
373 #define crc32 __libdwfl_crc32
375 +#ifndef TEMP_FAILURE_RETRY
376 +#define TEMP_FAILURE_RETRY(expression) \
378 + ({ long int __result; \
379 + do __result = (long int) (expression); \
380 + while (__result == -1L && errno == EINTR); \
384 #define LIB_SYSTEM_H 1
385 #include <libdwflP.h>
386 #include "../lib/crc32_file.c"
387 Index: elfutils-0.164/libdwfl/linux-kernel-modules.c
388 ===================================================================
389 --- elfutils-0.164.orig/libdwfl/linux-kernel-modules.c
390 +++ elfutils-0.164/libdwfl/linux-kernel-modules.c
394 #include "libdwflP.h"
396 #include <inttypes.h>
399 Index: elfutils-0.164/libebl/eblopenbackend.c
400 ===================================================================
401 --- elfutils-0.164.orig/libebl/eblopenbackend.c
402 +++ elfutils-0.164/libebl/eblopenbackend.c
412 Index: elfutils-0.164/libebl/eblwstrtab.c
413 ===================================================================
414 --- elfutils-0.164.orig/libebl/eblwstrtab.c
415 +++ elfutils-0.164/libebl/eblwstrtab.c
416 @@ -305,7 +305,7 @@ copystrings (struct Ebl_WStrent *nodep,
418 /* Process the current node. */
419 nodep->offset = *offsetp;
420 - *freep = wmempcpy (*freep, nodep->string, nodep->len);
421 + *freep = wmemcpy (*freep, nodep->string, nodep->len) + nodep->len;
422 *offsetp += nodep->len * sizeof (wchar_t);
424 for (subs = nodep->next; subs != NULL; subs = subs->next)
425 Index: elfutils-0.164/libelf/elf.h
426 ===================================================================
427 --- elfutils-0.164.orig/libelf/elf.h
428 +++ elfutils-0.164/libelf/elf.h
431 #include <features.h>
438 /* Standard ELF types. */
440 @@ -3552,7 +3554,8 @@ enum
442 #define R_TILEGX_NUM 130
451 Index: elfutils-0.164/libelf/libelf.h
452 ===================================================================
453 --- elfutils-0.164.orig/libelf/libelf.h
454 +++ elfutils-0.164/libelf/libelf.h
461 #include <sys/types.h>
463 Index: elfutils-0.164/libelf/libelfP.h
464 ===================================================================
465 --- elfutils-0.164.orig/libelf/libelfP.h
466 +++ elfutils-0.164/libelf/libelfP.h
475 Index: elfutils-0.164/src/addr2line.c
476 ===================================================================
477 --- elfutils-0.164.orig/src/addr2line.c
478 +++ elfutils-0.164/src/addr2line.c
486 #include <inttypes.h>
488 Index: elfutils-0.164/src/ar.c
489 ===================================================================
490 --- elfutils-0.164.orig/src/ar.c
491 +++ elfutils-0.164/src/ar.c
501 Index: elfutils-0.164/src/arlib.c
502 ===================================================================
503 --- elfutils-0.164.orig/src/arlib.c
504 +++ elfutils-0.164/src/arlib.c
514 Index: elfutils-0.164/src/arlib2.c
515 ===================================================================
516 --- elfutils-0.164.orig/src/arlib2.c
517 +++ elfutils-0.164/src/arlib2.c
527 Index: elfutils-0.164/src/elfcmp.c
528 ===================================================================
529 --- elfutils-0.164.orig/src/elfcmp.c
530 +++ elfutils-0.164/src/elfcmp.c
540 Index: elfutils-0.164/src/elflint.c
541 ===================================================================
542 --- elfutils-0.164.orig/src/elflint.c
543 +++ elfutils-0.164/src/elflint.c
546 #include <byteswap.h>
552 #include <inttypes.h>
553 Index: elfutils-0.164/src/findtextrel.c
554 ===================================================================
555 --- elfutils-0.164.orig/src/findtextrel.c
556 +++ elfutils-0.164/src/findtextrel.c
566 Index: elfutils-0.164/src/i386_ld.c
567 ===================================================================
568 --- elfutils-0.164.orig/src/i386_ld.c
569 +++ elfutils-0.164/src/i386_ld.c
579 Index: elfutils-0.164/src/ld.c
580 ===================================================================
581 --- elfutils-0.164.orig/src/ld.c
582 +++ elfutils-0.164/src/ld.c
592 Index: elfutils-0.164/src/ldgeneric.c
593 ===================================================================
594 --- elfutils-0.164.orig/src/ldgeneric.c
595 +++ elfutils-0.164/src/ldgeneric.c
605 Index: elfutils-0.164/src/ldlex.c
606 ===================================================================
607 --- elfutils-0.164.orig/src/ldlex.c
608 +++ elfutils-0.164/src/ldlex.c
609 @@ -1099,7 +1099,7 @@ char *ldtext;
615 #include <inttypes.h>
618 Index: elfutils-0.164/src/ldscript.c
619 ===================================================================
620 --- elfutils-0.164.orig/src/ldscript.c
621 +++ elfutils-0.164/src/ldscript.c
631 Index: elfutils-0.164/src/nm.c
632 ===================================================================
633 --- elfutils-0.164.orig/src/nm.c
634 +++ elfutils-0.164/src/nm.c
643 #include <inttypes.h>
644 Index: elfutils-0.164/src/objdump.c
645 ===================================================================
646 --- elfutils-0.164.orig/src/objdump.c
647 +++ elfutils-0.164/src/objdump.c
655 #include <inttypes.h>
657 Index: elfutils-0.164/src/ranlib.c
658 ===================================================================
659 --- elfutils-0.164.orig/src/ranlib.c
660 +++ elfutils-0.164/src/ranlib.c
670 Index: elfutils-0.164/src/readelf.c
671 ===================================================================
672 --- elfutils-0.164.orig/src/readelf.c
673 +++ elfutils-0.164/src/readelf.c
682 #include <inttypes.h>
683 Index: elfutils-0.164/src/size.c
684 ===================================================================
685 --- elfutils-0.164.orig/src/size.c
686 +++ elfutils-0.164/src/size.c
695 #include <inttypes.h>
696 Index: elfutils-0.164/src/stack.c
697 ===================================================================
698 --- elfutils-0.164.orig/src/stack.c
699 +++ elfutils-0.164/src/stack.c
707 #include <inttypes.h>
709 Index: elfutils-0.164/src/strings.c
710 ===================================================================
711 --- elfutils-0.164.orig/src/strings.c
712 +++ elfutils-0.164/src/strings.c
721 #include <inttypes.h>
722 Index: elfutils-0.164/src/strip.c
723 ===================================================================
724 --- elfutils-0.164.orig/src/strip.c
725 +++ elfutils-0.164/src/strip.c
728 #include <byteswap.h>
735 Index: elfutils-0.164/src/unstrip.c
736 ===================================================================
737 --- elfutils-0.164.orig/src/unstrip.c
738 +++ elfutils-0.164/src/unstrip.c
748 Index: elfutils-0.164/tests/addrscopes.c
749 ===================================================================
750 --- elfutils-0.164.orig/tests/addrscopes.c
751 +++ elfutils-0.164/tests/addrscopes.c
753 #include <stdio_ext.h>
761 Index: elfutils-0.164/tests/allregs.c
762 ===================================================================
763 --- elfutils-0.164.orig/tests/allregs.c
764 +++ elfutils-0.164/tests/allregs.c
774 Index: elfutils-0.164/tests/backtrace-data.c
775 ===================================================================
776 --- elfutils-0.164.orig/tests/backtrace-data.c
777 +++ elfutils-0.164/tests/backtrace-data.c
786 #if defined(__x86_64__) && defined(__linux__)
787 Index: elfutils-0.164/tests/backtrace-dwarf.c
788 ===================================================================
789 --- elfutils-0.164.orig/tests/backtrace-dwarf.c
790 +++ elfutils-0.164/tests/backtrace-dwarf.c
792 #include <stdio_ext.h>
798 #include <sys/ptrace.h>
799 #include <sys/types.h>
800 Index: elfutils-0.164/tests/backtrace.c
801 ===================================================================
802 --- elfutils-0.164.orig/tests/backtrace.c
803 +++ elfutils-0.164/tests/backtrace.c
813 Index: elfutils-0.164/tests/buildid.c
814 ===================================================================
815 --- elfutils-0.164.orig/tests/buildid.c
816 +++ elfutils-0.164/tests/buildid.c
818 #include ELFUTILS_HEADER(elf)
819 #include ELFUTILS_HEADER(dwelf)
825 #include <sys/types.h>
826 Index: elfutils-0.164/tests/debugaltlink.c
827 ===================================================================
828 --- elfutils-0.164.orig/tests/debugaltlink.c
829 +++ elfutils-0.164/tests/debugaltlink.c
831 #include ELFUTILS_HEADER(dw)
832 #include ELFUTILS_HEADER(dwelf)
838 #include <sys/types.h>
839 Index: elfutils-0.164/tests/debuglink.c
840 ===================================================================
841 --- elfutils-0.164.orig/tests/debuglink.c
842 +++ elfutils-0.164/tests/debuglink.c
845 #include ELFUTILS_HEADER(dwelf)
851 #include <sys/types.h>
852 Index: elfutils-0.164/tests/deleted.c
853 ===================================================================
854 --- elfutils-0.164.orig/tests/deleted.c
855 +++ elfutils-0.164/tests/deleted.c
864 #include <sys/prctl.h>
865 Index: elfutils-0.164/tests/dwfl-addr-sect.c
866 ===================================================================
867 --- elfutils-0.164.orig/tests/dwfl-addr-sect.c
868 +++ elfutils-0.164/tests/dwfl-addr-sect.c
870 #include <stdio_ext.h>
877 #include ELFUTILS_HEADER(dwfl)
878 Index: elfutils-0.164/tests/dwfl-bug-addr-overflow.c
879 ===================================================================
880 --- elfutils-0.164.orig/tests/dwfl-bug-addr-overflow.c
881 +++ elfutils-0.164/tests/dwfl-bug-addr-overflow.c
883 #include <inttypes.h>
885 #include <stdio_ext.h>
889 #include ELFUTILS_HEADER(dwfl)
891 Index: elfutils-0.164/tests/dwfl-bug-fd-leak.c
892 ===================================================================
893 --- elfutils-0.164.orig/tests/dwfl-bug-fd-leak.c
894 +++ elfutils-0.164/tests/dwfl-bug-fd-leak.c
903 #include <sys/resource.h>
904 Index: elfutils-0.164/tests/dwfl-bug-getmodules.c
905 ===================================================================
906 --- elfutils-0.164.orig/tests/dwfl-bug-getmodules.c
907 +++ elfutils-0.164/tests/dwfl-bug-getmodules.c
910 #include ELFUTILS_HEADER(dwfl)
915 static const Dwfl_Callbacks callbacks =
917 Index: elfutils-0.164/tests/dwfl-report-elf-align.c
918 ===================================================================
919 --- elfutils-0.164.orig/tests/dwfl-report-elf-align.c
920 +++ elfutils-0.164/tests/dwfl-report-elf-align.c
922 #include <inttypes.h>
924 #include <stdio_ext.h>
930 Index: elfutils-0.164/tests/dwfllines.c
931 ===================================================================
932 --- elfutils-0.164.orig/tests/dwfllines.c
933 +++ elfutils-0.164/tests/dwfllines.c
942 main (int argc, char *argv[])
943 Index: elfutils-0.164/tests/dwflmodtest.c
944 ===================================================================
945 --- elfutils-0.164.orig/tests/dwflmodtest.c
946 +++ elfutils-0.164/tests/dwflmodtest.c
948 #include <stdio_ext.h>
955 #include ELFUTILS_HEADER(dwfl)
956 Index: elfutils-0.164/tests/dwflsyms.c
957 ===================================================================
958 --- elfutils-0.164.orig/tests/dwflsyms.c
959 +++ elfutils-0.164/tests/dwflsyms.c
962 #include <stdio_ext.h>
969 Index: elfutils-0.164/tests/early-offscn.c
970 ===================================================================
971 --- elfutils-0.164.orig/tests/early-offscn.c
972 +++ elfutils-0.164/tests/early-offscn.c
982 Index: elfutils-0.164/tests/ecp.c
983 ===================================================================
984 --- elfutils-0.164.orig/tests/ecp.c
985 +++ elfutils-0.164/tests/ecp.c
995 Index: elfutils-0.164/tests/find-prologues.c
996 ===================================================================
997 --- elfutils-0.164.orig/tests/find-prologues.c
998 +++ elfutils-0.164/tests/find-prologues.c
1000 #include <stdio_ext.h>
1006 #include <fnmatch.h>
1008 Index: elfutils-0.164/tests/funcretval.c
1009 ===================================================================
1010 --- elfutils-0.164.orig/tests/funcretval.c
1011 +++ elfutils-0.164/tests/funcretval.c
1013 #include <stdio_ext.h>
1019 #include <fnmatch.h>
1021 Index: elfutils-0.164/tests/funcscopes.c
1022 ===================================================================
1023 --- elfutils-0.164.orig/tests/funcscopes.c
1024 +++ elfutils-0.164/tests/funcscopes.c
1026 #include <stdio_ext.h>
1032 #include <fnmatch.h>
1034 Index: elfutils-0.164/tests/getsrc_die.c
1035 ===================================================================
1036 --- elfutils-0.164.orig/tests/getsrc_die.c
1037 +++ elfutils-0.164/tests/getsrc_die.c
1045 #include <inttypes.h>
1047 Index: elfutils-0.164/tests/line2addr.c
1048 ===================================================================
1049 --- elfutils-0.164.orig/tests/line2addr.c
1050 +++ elfutils-0.164/tests/line2addr.c
1060 Index: elfutils-0.164/tests/low_high_pc.c
1061 ===================================================================
1062 --- elfutils-0.164.orig/tests/low_high_pc.c
1063 +++ elfutils-0.164/tests/low_high_pc.c
1065 #include <stdio_ext.h>
1071 #include <fnmatch.h>
1073 Index: elfutils-0.164/tests/md5-sha1-test.c
1074 ===================================================================
1075 --- elfutils-0.164.orig/tests/md5-sha1-test.c
1076 +++ elfutils-0.164/tests/md5-sha1-test.c
1086 Index: elfutils-0.164/tests/rdwrmmap.c
1087 ===================================================================
1088 --- elfutils-0.164.orig/tests/rdwrmmap.c
1089 +++ elfutils-0.164/tests/rdwrmmap.c
1099 Index: elfutils-0.164/tests/saridx.c
1100 ===================================================================
1101 --- elfutils-0.164.orig/tests/saridx.c
1102 +++ elfutils-0.164/tests/saridx.c
1112 Index: elfutils-0.164/tests/sectiondump.c
1113 ===================================================================
1114 --- elfutils-0.164.orig/tests/sectiondump.c
1115 +++ elfutils-0.164/tests/sectiondump.c
1124 #include <inttypes.h>
1125 Index: elfutils-0.164/tests/varlocs.c
1126 ===================================================================
1127 --- elfutils-0.164.orig/tests/varlocs.c
1128 +++ elfutils-0.164/tests/varlocs.c
1136 #include <sys/types.h>
1137 #include <sys/stat.h>
1138 Index: elfutils-0.164/tests/vdsosyms.c
1139 ===================================================================
1140 --- elfutils-0.164.orig/tests/vdsosyms.c
1141 +++ elfutils-0.164/tests/vdsosyms.c
1148 #include <inttypes.h>
1151 Index: elfutils-0.164/libelf/elf_getarsym.c
1152 ===================================================================
1153 --- elfutils-0.164.orig/libelf/elf_getarsym.c
1154 +++ elfutils-0.164/libelf/elf_getarsym.c
1155 @@ -302,7 +302,7 @@ elf_getarsym (Elf *elf, size_t *ptr)
1156 arsym[cnt].as_off = (*u32)[cnt];
1158 arsym[cnt].as_hash = _dl_elf_hash (str_data);
1159 - str_data = rawmemchr (str_data, '\0') + 1;
1160 + str_data = memchr (str_data, '\0', SIZE_MAX) + 1;
1163 /* At the end a special entry. */