2 # Copyright (C) 2005, 2006, 2008 Red Hat, Inc.
3 # This file is part of Red Hat elfutils.
4 # Written by Ulrich Drepper <drepper@redhat.com>, 2005.
6 # Red Hat elfutils is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by the
8 # Free Software Foundation; version 2 of the License.
10 # Red Hat elfutils is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License along
16 # with Red Hat elfutils; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
19 # Red Hat elfutils is an included package of the Open Invention Network.
20 # An included package of the Open Invention Network is a package for which
21 # Open Invention Network licensees cross-license their patents. No patent
22 # license is granted, either expressly or impliedly, by designation as an
23 # included package. Should you wish to participate in the Open Invention
24 # Network licensing program, please visit www.openinventionnetwork.com
25 # <http://www.openinventionnetwork.com>.
27 . $srcdir/test-subr.sh
29 files="testfile `seq 2 9 | while read n; do echo testfile$n; done`"
32 testrun_compare ../src/strings -tx -f $files <<\EOF
33 testfile: f4 /lib/ld-linux.so.2
34 testfile: 1c9 __gmon_start__
35 testfile: 1d8 libc.so.6
36 testfile: 1e2 __cxa_finalize
37 testfile: 1f1 __deregister_frame_info
38 testfile: 209 _IO_stdin_used
39 testfile: 218 __libc_start_main
40 testfile: 22a __register_frame_info
41 testfile: 240 GLIBC_2.1.3
42 testfile: 24c GLIBC_2.0
45 testfile2: 114 /lib/ld.so.1
46 testfile2: 1f1 __gmon_start__
47 testfile2: 200 __deregister_frame_info
48 testfile2: 218 __register_frame_info
49 testfile2: 22e libc.so.6
50 testfile2: 238 __cxa_finalize
51 testfile2: 247 _IO_stdin_used
52 testfile2: 256 __libc_start_main
53 testfile2: 268 GLIBC_2.1.3
54 testfile2: 274 GLIBC_2.0
59 testfile3: f4 /lib/ld-linux.so.2
60 testfile3: 1c9 __gmon_start__
61 testfile3: 1d8 libc.so.6
62 testfile3: 1e2 __cxa_finalize
63 testfile3: 1f1 __deregister_frame_info
64 testfile3: 209 _IO_stdin_used
65 testfile3: 218 __libc_start_main
66 testfile3: 22a __register_frame_info
67 testfile3: 240 GLIBC_2.1.3
68 testfile3: 24c GLIBC_2.0
71 testfile4: f4 /lib/ld-linux.so.2
72 testfile4: 8e1 __gmon_start__
73 testfile4: 8f0 __terminate_func
75 testfile4: 908 __tf9type_info
76 testfile4: 917 __tf16__user_type_info
77 testfile4: 92e __tf19__pointer_type_info
78 testfile4: 948 __tf16__attr_type_info
79 testfile4: 95f __tf16__func_type_info
80 testfile4: 976 __vt_9type_info
81 testfile4: 986 __vt_19__pointer_type_info
82 testfile4: 9a1 __vt_16__attr_type_info
83 testfile4: 9b9 __vt_16__func_type_info
84 testfile4: 9d1 __vt_16__ptmf_type_info
85 testfile4: 9e9 __vt_16__ptmd_type_info
86 testfile4: a01 __vt_17__array_type_info
88 testfile4: a20 __vt_19__builtin_type_info
100 testfile4: a7e __tiUl
101 testfile4: a85 __tiUx
102 testfile4: a8c __tiUs
103 testfile4: a93 __tiUc
104 testfile4: a9a __tiSc
105 testfile4: aa1 __ti19__pointer_type_info
106 testfile4: abb __ti9type_info
107 testfile4: aca __ti16__attr_type_info
108 testfile4: ae1 __ti19__builtin_type_info
109 testfile4: afb __ti16__func_type_info
110 testfile4: b12 __ti16__ptmf_type_info
111 testfile4: b29 __ti16__ptmd_type_info
112 testfile4: b40 __ti17__array_type_info
113 testfile4: b58 __cplus_type_matcher
114 testfile4: b6d __vt_13bad_exception
115 testfile4: b82 __vt_9exception
116 testfile4: b92 _._13bad_exception
117 testfile4: ba5 __vt_8bad_cast
118 testfile4: bb4 _._8bad_cast
119 testfile4: bc1 __vt_10bad_typeid
120 testfile4: bd3 _._10bad_typeid
121 testfile4: be3 __ti9exception
122 testfile4: bf2 __ti13bad_exception
123 testfile4: c06 __vt_16__user_type_info
124 testfile4: c1e __vt_17__class_type_info
125 testfile4: c37 __vt_14__si_type_info
126 testfile4: c4d __ti8bad_cast
127 testfile4: c5b __ti10bad_typeid
128 testfile4: c6c __ti16__user_type_info
129 testfile4: c83 __ti14__si_type_info
130 testfile4: c98 __ti17__class_type_info
131 testfile4: cb0 libc.so.6
132 testfile4: cba __register_frame
133 testfile4: ccb pthread_create
134 testfile4: cda pthread_getspecific
135 testfile4: cee pthread_key_delete
136 testfile4: d01 __cxa_finalize
137 testfile4: d10 malloc
138 testfile4: d17 __frame_state_for
140 testfile4: d2f __register_frame_table
141 testfile4: d46 fprintf
142 testfile4: d4e pthread_once
143 testfile4: d5b __deregister_frame_info
144 testfile4: d73 pthread_key_create
145 testfile4: d86 memset
146 testfile4: d8d strcmp
147 testfile4: d94 pthread_mutex_unlock
148 testfile4: da9 __deregister_frame
149 testfile4: dbc pthread_mutex_lock
150 testfile4: dcf _IO_stdin_used
151 testfile4: dde __libc_start_main
152 testfile4: df0 strlen
153 testfile4: df7 __register_frame_info_table
154 testfile4: e13 __register_frame_info
155 testfile4: e29 pthread_setspecific
157 testfile4: e42 GLIBC_2.1.3
158 testfile4: e4e GLIBC_2.0
159 testfile4: 1308 PTRh<
162 testfile4: 1dd9 wT9L>
165 testfile4: 21c1 BZQRP
180 testfile4: 31a5 :zt 1
182 testfile4: 32f8 AXY_VR
192 testfile4: 47a5 0[^_]
199 testfile4: 4f9b u$;E u
222 testfile4: 6468 val is zero
223 testfile4: 6480 Internal Compiler Bug: No runtime type matcher.
224 testfile4: 64dc 19__pointer_type_info
225 testfile4: 64f2 16__attr_type_info
226 testfile4: 6505 19__builtin_type_info
227 testfile4: 651b 16__func_type_info
228 testfile4: 652e 16__ptmf_type_info
229 testfile4: 6541 16__ptmd_type_info
230 testfile4: 6554 17__array_type_info
231 testfile4: 6568 9exception
232 testfile4: 6573 13bad_exception
233 testfile4: 6583 9type_info
234 testfile4: 658e 8bad_cast
235 testfile4: 6598 10bad_typeid
236 testfile4: 65a5 16__user_type_info
237 testfile4: 65b8 14__si_type_info
238 testfile4: 65c9 17__class_type_info
240 testfile5: f4 /lib/ld-linux.so.2
241 testfile5: 1c9 __gmon_start__
242 testfile5: 1d8 libc.so.6
243 testfile5: 1e2 __cxa_finalize
244 testfile5: 1f1 __deregister_frame_info
245 testfile5: 209 _IO_stdin_used
246 testfile5: 218 __libc_start_main
247 testfile5: 22a __register_frame_info
248 testfile5: 240 GLIBC_2.1.3
249 testfile5: 24c GLIBC_2.0
252 testfile6: 114 /lib/ld-linux.so.2
253 testfile6: 3d9 libstdc++.so.5
254 testfile6: 3e8 _ZTVSt16invalid_argument
255 testfile6: 401 _ZNSaIcEC1Ev
256 testfile6: 40e _ZTSSt16invalid_argument
257 testfile6: 427 _ZTVN10__cxxabiv120__si_class_type_infoE
258 testfile6: 450 _ZNSsD1Ev
259 testfile6: 45a _ZdlPv
260 testfile6: 461 __cxa_end_catch
261 testfile6: 471 __gxx_personality_v0
262 testfile6: 486 _ZTISt9exception
263 testfile6: 497 _ZNSaIcED1Ev
264 testfile6: 4a4 _ZTISt11logic_error
265 testfile6: 4b8 _ZNSt16invalid_argumentD1Ev
266 testfile6: 4d4 _ZTVN10__cxxabiv117__class_type_infoE
267 testfile6: 4fa __cxa_throw
268 testfile6: 506 _ZNSt16invalid_argumentC1ERKSs
269 testfile6: 525 _ZNSsC1EPKcRKSaIcE
270 testfile6: 538 _ZNSt11logic_errorD2Ev
271 testfile6: 54f _ZTVN10__cxxabiv121__vmi_class_type_infoE
272 testfile6: 579 _ZNSt16invalid_argumentD0Ev
273 testfile6: 595 __cxa_begin_catch
274 testfile6: 5a7 __cxa_allocate_exception
275 testfile6: 5c0 _ZNKSt11logic_error4whatEv
276 testfile6: 5db _Jv_RegisterClasses
277 testfile6: 5ef _ZTISt16invalid_argument
278 testfile6: 608 __gmon_start__
279 testfile6: 617 libm.so.6
280 testfile6: 621 _IO_stdin_used
281 testfile6: 630 libgcc_s.so.1
282 testfile6: 63e _Unwind_Resume
283 testfile6: 64d libc.so.6
284 testfile6: 657 __libc_start_main
285 testfile6: 669 GCC_3.0
286 testfile6: 671 GLIBC_2.0
287 testfile6: 67b GLIBCPP_3.2
288 testfile6: 687 CXXABI_1.2
291 testfile6: ec8 N10__gnu_test9gnu_obj_1E
292 testfile6: ee1 N10__gnu_test9gnu_obj_2IiEE
293 testfile6: efd N10__gnu_test9gnu_obj_2IlEE
294 testfile6: f19 St16invalid_argument
295 testfile7: 114 /lib/ld-linux.so.2
296 testfile7: 3d9 libstdc++.so.5
297 testfile7: 3e8 _ZTVSt16invalid_argument
298 testfile7: 401 _ZNSaIcEC1Ev
299 testfile7: 40e _ZTSSt16invalid_argument
300 testfile7: 427 _ZTVN10__cxxabiv120__si_class_type_infoE
301 testfile7: 450 _ZNSsD1Ev
302 testfile7: 45a _ZdlPv
303 testfile7: 461 __cxa_end_catch
304 testfile7: 471 __gxx_personality_v0
305 testfile7: 486 _ZTISt9exception
306 testfile7: 497 _ZNSaIcED1Ev
307 testfile7: 4a4 _ZTISt11logic_error
308 testfile7: 4b8 _ZNSt16invalid_argumentD1Ev
309 testfile7: 4d4 _ZTVN10__cxxabiv117__class_type_infoE
310 testfile7: 4fa __cxa_throw
311 testfile7: 506 _ZNSt16invalid_argumentC1ERKSs
312 testfile7: 525 _ZNSsC1EPKcRKSaIcE
313 testfile7: 538 _ZNSt11logic_errorD2Ev
314 testfile7: 54f _ZTVN10__cxxabiv121__vmi_class_type_infoE
315 testfile7: 579 _ZNSt16invalid_argumentD0Ev
316 testfile7: 595 __cxa_begin_catch
317 testfile7: 5a7 __cxa_allocate_exception
318 testfile7: 5c0 _ZNKSt11logic_error4whatEv
319 testfile7: 5db _Jv_RegisterClasses
320 testfile7: 5ef _ZTISt16invalid_argument
321 testfile7: 608 __gmon_start__
322 testfile7: 617 libm.so.6
323 testfile7: 621 _IO_stdin_used
324 testfile7: 630 libgcc_s.so.1
325 testfile7: 63e _Unwind_Resume
326 testfile7: 64d libc.so.6
327 testfile7: 657 __libc_start_main
328 testfile7: 669 GCC_3.0
329 testfile7: 671 GLIBC_2.0
330 testfile7: 67b GLIBCPP_3.2
331 testfile7: 687 CXXABI_1.2
334 testfile7: ec8 N10__gnu_test9gnu_obj_1E
335 testfile7: ee1 N10__gnu_test9gnu_obj_2IiEE
336 testfile7: efd N10__gnu_test9gnu_obj_2IlEE
337 testfile7: f19 St16invalid_argument
346 testfile8: 7bbf preserve-dates
347 testfile8: 7bce remove-comment
348 testfile8: 7bdd Remove .comment section
349 testfile8: 7bf6 ${prefix}/share
350 testfile8: 7c06 elfutils
351 testfile8: 7c0f a.out
353 testfile8: 7c1a strip (Red Hat %s) %s
355 testfile8: 7c36 Ulrich Drepper
356 testfile8: 7c45 Written by %s.
357 testfile8: 7c55 cannot stat input file "%s"
358 testfile8: 7c71 %s: INTERNAL ERROR: %s
359 testfile8: 7c88 while opening "%s"
360 testfile8: 7c9b handle_elf
361 testfile8: 7ca6 ../../src/strip.c
362 testfile8: 7cb8 shdr_info[cnt].group_idx != 0
363 testfile8: 7cd6 illformed file `%s'
364 testfile8: 7cea elf_ndxscn (scn) == cnt
365 testfile8: 7d02 .shstrtab
366 testfile8: 7d0c while writing `%s': %s
367 testfile8: 7d23 ((sym->st_info) & 0xf) == 3
368 testfile8: 7d3f shndxdata != ((void *)0)
369 testfile8: 7d58 scn != ((void *)0)
370 testfile8: 7d6b .gnu_debuglink
371 testfile8: 7d7a .comment
372 testfile8: 7d83 cannot open `%s'
373 testfile8: 7da0 Place stripped output into FILE
374 testfile8: 7dc0 Extract the removed sections into FILE
375 testfile8: 7e00 Copy modified/access timestamps to the output
376 testfile8: 7e40 Only one input file allowed together with '-o' and '-f'
377 testfile8: 7e80 Copyright (C) %s Red Hat, Inc.
378 testfile8: 7e9f This is free software; see the source for copying conditions. There is NO
379 testfile8: 7eea warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
380 testfile8: 7f40 Report bugs to <drepper@redhat.com>.
381 testfile8: 7f80 %s: File format not recognized
382 testfile8: 7fa0 cannot set access and modification date of "%s"
383 testfile8: 7fe0 cannot create new file `%s': %s
384 testfile8: 8000 error while finishing `%s': %s
385 testfile8: 8020 shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0
386 testfile8: 8060 shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0
387 testfile8: 80a0 %s: error while creating ELF header: %s
388 testfile8: 80e0 %s: error while reading the file: %s
389 testfile8: 8120 sec < 0xff00 || shndxdata != ((void *)0)
390 testfile8: 8160 (versiondata->d_size / sizeof (GElf_Versym)) >= shdr_info[cnt].data->d_size / elsize
391 testfile8: 81c0 shdr_info[cnt].shdr.sh_type == 11
392 testfile8: 8200 (versiondata->d_size / sizeof (Elf32_Word)) >= shdr_info[cnt].data->d_size / elsize
393 testfile8: 8260 shdr_info[cnt].shdr.sh_type == 18
394 testfile8: 82a0 shdr_info[cnt].data != ((void *)0)
395 testfile8: 82e0 elf_ndxscn (shdr_info[cnt].newscn) == idx
396 testfile8: 8320 while create section header section: %s
397 testfile8: 8360 cannot allocate section data: %s
398 testfile8: 83a0 elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx
399 testfile8: 83e0 while generating output file: %s
400 testfile8: 8420 while preparing output for `%s'
401 testfile8: 8440 shdr_info[cnt].shdr.sh_type == 2
402 testfile8: 8480 shdr_info[idx].data != ((void *)0)
403 testfile8: 84c0 cannot determine number of sections: %s
404 testfile8: 8500 cannot get section header string table index
405 testfile8: 85c0 Discard symbols from object files.
406 testfile8: 85e3 [FILE...]
415 testfile9: 3419 preserve-dates
416 testfile9: 3428 remove-comment
417 testfile9: 3437 Remove .comment section
418 testfile9: 3450 ${prefix}/share
419 testfile9: 3460 elfutils
420 testfile9: 3469 a.out
422 testfile9: 3474 strip (Red Hat %s) %s
424 testfile9: 3490 Ulrich Drepper
425 testfile9: 349f Written by %s.
426 testfile9: 34af cannot stat input file "%s"
427 testfile9: 34cb %s: INTERNAL ERROR: %s
428 testfile9: 34e2 while opening "%s"
429 testfile9: 34f5 handle_elf
430 testfile9: 3500 ../../src/strip.c
431 testfile9: 3512 shdr_info[cnt].group_idx != 0
432 testfile9: 3530 illformed file `%s'
433 testfile9: 3544 elf_ndxscn (scn) == cnt
434 testfile9: 355c .shstrtab
435 testfile9: 3566 while writing `%s': %s
436 testfile9: 357d ((sym->st_info) & 0xf) == 3
437 testfile9: 3599 shndxdata != ((void *)0)
438 testfile9: 35b2 scn != ((void *)0)
439 testfile9: 35c5 .gnu_debuglink
440 testfile9: 35d4 .comment
441 testfile9: 35dd cannot open `%s'
442 testfile9: 3600 Place stripped output into FILE
443 testfile9: 3620 Extract the removed sections into FILE
444 testfile9: 3660 Copy modified/access timestamps to the output
445 testfile9: 36a0 Only one input file allowed together with '-o' and '-f'
446 testfile9: 36e0 Copyright (C) %s Red Hat, Inc.
447 testfile9: 36ff This is free software; see the source for copying conditions. There is NO
448 testfile9: 374a warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
449 testfile9: 37a0 Report bugs to <drepper@redhat.com>.
450 testfile9: 37e0 %s: File format not recognized
451 testfile9: 3800 cannot set access and modification date of "%s"
452 testfile9: 3840 cannot create new file `%s': %s
453 testfile9: 3860 error while finishing `%s': %s
454 testfile9: 3880 shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0
455 testfile9: 38c0 shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0
456 testfile9: 3900 %s: error while creating ELF header: %s
457 testfile9: 3940 %s: error while reading the file: %s
458 testfile9: 3980 sec < 0xff00 || shndxdata != ((void *)0)
459 testfile9: 39c0 (versiondata->d_size / sizeof (GElf_Versym)) >= shdr_info[cnt].data->d_size / elsize
460 testfile9: 3a20 shdr_info[cnt].shdr.sh_type == 11
461 testfile9: 3a60 (versiondata->d_size / sizeof (Elf32_Word)) >= shdr_info[cnt].data->d_size / elsize
462 testfile9: 3ac0 shdr_info[cnt].shdr.sh_type == 18
463 testfile9: 3b00 shdr_info[cnt].data != ((void *)0)
464 testfile9: 3b40 elf_ndxscn (shdr_info[cnt].newscn) == idx
465 testfile9: 3b80 while create section header section: %s
466 testfile9: 3bc0 cannot allocate section data: %s
467 testfile9: 3c00 elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx
468 testfile9: 3c40 while generating output file: %s
469 testfile9: 3c80 while preparing output for `%s'
470 testfile9: 3ca0 shdr_info[cnt].shdr.sh_type == 2
471 testfile9: 3ce0 shdr_info[idx].data != ((void *)0)
472 testfile9: 3d20 cannot determine number of sections: %s
473 testfile9: 3d60 cannot get section header string table index
474 testfile9: 3e20 Discard symbols from object files.
475 testfile9: 3e43 [FILE...]