1 #! /bin/sh 2 # Copyright (C) 2005, 2006, 2008 Red Hat, Inc. 3 # This file is part of elfutils. 4 # Written by Ulrich Drepper <drepper (at] redhat.com>, 2005. 5 # 6 # This file is free software; you can redistribute it and/or modify 7 # it under the terms of the GNU General Public License as published by 8 # the Free Software Foundation; either version 3 of the License, or 9 # (at your option) any later version. 10 # 11 # elfutils is distributed in the hope that it will be useful, but 12 # WITHOUT ANY WARRANTY; without even the implied warranty of 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 # GNU General Public License for more details. 15 # 16 # You should have received a copy of the GNU General Public License 17 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 19 . $srcdir/test-subr.sh 20 21 files="testfile `seq 2 9 | while read n; do echo testfile$n; done`" 22 testfiles $files 23 24 testrun_compare ${abs_top_builddir}/src/strings -tx -f $files <<\EOF 25 testfile: f4 /lib/ld-linux.so.2 26 testfile: 1c9 __gmon_start__ 27 testfile: 1d8 libc.so.6 28 testfile: 1e2 __cxa_finalize 29 testfile: 1f1 __deregister_frame_info 30 testfile: 209 _IO_stdin_used 31 testfile: 218 __libc_start_main 32 testfile: 22a __register_frame_info 33 testfile: 240 GLIBC_2.1.3 34 testfile: 24c GLIBC_2.0 35 testfile: 338 PTRh 36 testfile: 345 QVh, 37 testfile2: 114 /lib/ld.so.1 38 testfile2: 1f1 __gmon_start__ 39 testfile2: 200 __deregister_frame_info 40 testfile2: 218 __register_frame_info 41 testfile2: 22e libc.so.6 42 testfile2: 238 __cxa_finalize 43 testfile2: 247 _IO_stdin_used 44 testfile2: 256 __libc_start_main 45 testfile2: 268 GLIBC_2.1.3 46 testfile2: 274 GLIBC_2.0 47 testfile2: 488 }a[xN 48 testfile2: 4a8 }a[xN 49 testfile2: 50c }a[xN 50 testfile2: 540 }?Kx 51 testfile3: f4 /lib/ld-linux.so.2 52 testfile3: 1c9 __gmon_start__ 53 testfile3: 1d8 libc.so.6 54 testfile3: 1e2 __cxa_finalize 55 testfile3: 1f1 __deregister_frame_info 56 testfile3: 209 _IO_stdin_used 57 testfile3: 218 __libc_start_main 58 testfile3: 22a __register_frame_info 59 testfile3: 240 GLIBC_2.1.3 60 testfile3: 24c GLIBC_2.0 61 testfile3: 338 PTRh 62 testfile3: 345 QVh, 63 testfile4: f4 /lib/ld-linux.so.2 64 testfile4: 8e1 __gmon_start__ 65 testfile4: 8f0 __terminate_func 66 testfile4: 901 stderr 67 testfile4: 908 __tf9type_info 68 testfile4: 917 __tf16__user_type_info 69 testfile4: 92e __tf19__pointer_type_info 70 testfile4: 948 __tf16__attr_type_info 71 testfile4: 95f __tf16__func_type_info 72 testfile4: 976 __vt_9type_info 73 testfile4: 986 __vt_19__pointer_type_info 74 testfile4: 9a1 __vt_16__attr_type_info 75 testfile4: 9b9 __vt_16__func_type_info 76 testfile4: 9d1 __vt_16__ptmf_type_info 77 testfile4: 9e9 __vt_16__ptmd_type_info 78 testfile4: a01 __vt_17__array_type_info 79 testfile4: a1a __tiv 80 testfile4: a20 __vt_19__builtin_type_info 81 testfile4: a3b __tix 82 testfile4: a41 __til 83 testfile4: a47 __tii 84 testfile4: a4d __tis 85 testfile4: a53 __tib 86 testfile4: a59 __tic 87 testfile4: a5f __tiw 88 testfile4: a65 __tir 89 testfile4: a6b __tid 90 testfile4: a71 __tif 91 testfile4: a77 __tiUi 92 testfile4: a7e __tiUl 93 testfile4: a85 __tiUx 94 testfile4: a8c __tiUs 95 testfile4: a93 __tiUc 96 testfile4: a9a __tiSc 97 testfile4: aa1 __ti19__pointer_type_info 98 testfile4: abb __ti9type_info 99 testfile4: aca __ti16__attr_type_info 100 testfile4: ae1 __ti19__builtin_type_info 101 testfile4: afb __ti16__func_type_info 102 testfile4: b12 __ti16__ptmf_type_info 103 testfile4: b29 __ti16__ptmd_type_info 104 testfile4: b40 __ti17__array_type_info 105 testfile4: b58 __cplus_type_matcher 106 testfile4: b6d __vt_13bad_exception 107 testfile4: b82 __vt_9exception 108 testfile4: b92 _._13bad_exception 109 testfile4: ba5 __vt_8bad_cast 110 testfile4: bb4 _._8bad_cast 111 testfile4: bc1 __vt_10bad_typeid 112 testfile4: bd3 _._10bad_typeid 113 testfile4: be3 __ti9exception 114 testfile4: bf2 __ti13bad_exception 115 testfile4: c06 __vt_16__user_type_info 116 testfile4: c1e __vt_17__class_type_info 117 testfile4: c37 __vt_14__si_type_info 118 testfile4: c4d __ti8bad_cast 119 testfile4: c5b __ti10bad_typeid 120 testfile4: c6c __ti16__user_type_info 121 testfile4: c83 __ti14__si_type_info 122 testfile4: c98 __ti17__class_type_info 123 testfile4: cb0 libc.so.6 124 testfile4: cba __register_frame 125 testfile4: ccb pthread_create 126 testfile4: cda pthread_getspecific 127 testfile4: cee pthread_key_delete 128 testfile4: d01 __cxa_finalize 129 testfile4: d10 malloc 130 testfile4: d17 __frame_state_for 131 testfile4: d29 abort 132 testfile4: d2f __register_frame_table 133 testfile4: d46 fprintf 134 testfile4: d4e pthread_once 135 testfile4: d5b __deregister_frame_info 136 testfile4: d73 pthread_key_create 137 testfile4: d86 memset 138 testfile4: d8d strcmp 139 testfile4: d94 pthread_mutex_unlock 140 testfile4: da9 __deregister_frame 141 testfile4: dbc pthread_mutex_lock 142 testfile4: dcf _IO_stdin_used 143 testfile4: dde __libc_start_main 144 testfile4: df0 strlen 145 testfile4: df7 __register_frame_info_table 146 testfile4: e13 __register_frame_info 147 testfile4: e29 pthread_setspecific 148 testfile4: e3d free 149 testfile4: e42 GLIBC_2.1.3 150 testfile4: e4e GLIBC_2.0 151 testfile4: 1308 PTRh< 152 testfile4: 194b [^_] 153 testfile4: 19bf [^_] 154 testfile4: 1dd9 wT9L> 155 testfile4: 1f3b [^_] 156 testfile4: 1fae [^_] 157 testfile4: 21c1 BZQRP 158 testfile4: 237f [^_] 159 testfile4: 2431 JWRV 160 testfile4: 2454 [^_] 161 testfile4: 2506 JWRV 162 testfile4: 2529 [^_] 163 testfile4: 2b6c [^_] 164 testfile4: 2b9d ZYPV 165 testfile4: 2c28 [^_] 166 testfile4: 2c4d ZYPV 167 testfile4: 2ce2 [^_] 168 testfile4: 2dfb X^_] 169 testfile4: 2fc8 [^_] 170 testfile4: 307d tq;F 171 testfile4: 315a [^_] 172 testfile4: 31a5 :zt 1 173 testfile4: 3238 [^_] 174 testfile4: 32f8 AXY_VR 175 testfile4: 334a [^_] 176 testfile4: 37ab [^_] 177 testfile4: 38b8 sU;E 178 testfile4: 38f2 QRPV 179 testfile4: 3926 [^_] 180 testfile4: 3bfe QRWP 181 testfile4: 3e65 [^_] 182 testfile4: 4136 [^_] 183 testfile4: 472d [^_] 184 testfile4: 47a5 0[^_] 185 testfile4: 48ab [^_] 186 testfile4: 4ab1 _ZPV 187 testfile4: 4b53 _ZPV 188 testfile4: 4bd3 _ZPV 189 testfile4: 4e05 PQWj 190 testfile4: 4f75 [^_] 191 testfile4: 4f9b u$;E u 192 testfile4: 4feb [^_] 193 testfile4: 5080 [^_] 194 testfile4: 50a8 }$9u 195 testfile4: 5149 [^_] 196 testfile4: 51b0 [^_] 197 testfile4: 539b [^_] 198 testfile4: 53b5 E 9E 199 testfile4: 540d x!)E 200 testfile4: 5598 U$ B 201 testfile4: 571c [^_] 202 testfile4: 5819 [^_] 203 testfile4: 5922 [^_] 204 testfile4: 59c2 [^_] 205 testfile4: 5a62 [^_] 206 testfile4: 5b02 [^_] 207 testfile4: 5ba2 [^_] 208 testfile4: 5c42 [^_] 209 testfile4: 5ce2 [^_] 210 testfile4: 6112 [^_] 211 testfile4: 62bb [^_] 212 testfile4: 639b [^_] 213 testfile4: 6436 [^_] 214 testfile4: 6468 val is zero 215 testfile4: 6480 Internal Compiler Bug: No runtime type matcher. 216 testfile4: 64dc 19__pointer_type_info 217 testfile4: 64f2 16__attr_type_info 218 testfile4: 6505 19__builtin_type_info 219 testfile4: 651b 16__func_type_info 220 testfile4: 652e 16__ptmf_type_info 221 testfile4: 6541 16__ptmd_type_info 222 testfile4: 6554 17__array_type_info 223 testfile4: 6568 9exception 224 testfile4: 6573 13bad_exception 225 testfile4: 6583 9type_info 226 testfile4: 658e 8bad_cast 227 testfile4: 6598 10bad_typeid 228 testfile4: 65a5 16__user_type_info 229 testfile4: 65b8 14__si_type_info 230 testfile4: 65c9 17__class_type_info 231 testfile4: 6fc1 H. $ 232 testfile5: f4 /lib/ld-linux.so.2 233 testfile5: 1c9 __gmon_start__ 234 testfile5: 1d8 libc.so.6 235 testfile5: 1e2 __cxa_finalize 236 testfile5: 1f1 __deregister_frame_info 237 testfile5: 209 _IO_stdin_used 238 testfile5: 218 __libc_start_main 239 testfile5: 22a __register_frame_info 240 testfile5: 240 GLIBC_2.1.3 241 testfile5: 24c GLIBC_2.0 242 testfile5: 338 PTRh 243 testfile5: 345 QVhD 244 testfile6: 114 /lib/ld-linux.so.2 245 testfile6: 3d9 libstdc++.so.5 246 testfile6: 3e8 _ZTVSt16invalid_argument 247 testfile6: 401 _ZNSaIcEC1Ev 248 testfile6: 40e _ZTSSt16invalid_argument 249 testfile6: 427 _ZTVN10__cxxabiv120__si_class_type_infoE 250 testfile6: 450 _ZNSsD1Ev 251 testfile6: 45a _ZdlPv 252 testfile6: 461 __cxa_end_catch 253 testfile6: 471 __gxx_personality_v0 254 testfile6: 486 _ZTISt9exception 255 testfile6: 497 _ZNSaIcED1Ev 256 testfile6: 4a4 _ZTISt11logic_error 257 testfile6: 4b8 _ZNSt16invalid_argumentD1Ev 258 testfile6: 4d4 _ZTVN10__cxxabiv117__class_type_infoE 259 testfile6: 4fa __cxa_throw 260 testfile6: 506 _ZNSt16invalid_argumentC1ERKSs 261 testfile6: 525 _ZNSsC1EPKcRKSaIcE 262 testfile6: 538 _ZNSt11logic_errorD2Ev 263 testfile6: 54f _ZTVN10__cxxabiv121__vmi_class_type_infoE 264 testfile6: 579 _ZNSt16invalid_argumentD0Ev 265 testfile6: 595 __cxa_begin_catch 266 testfile6: 5a7 __cxa_allocate_exception 267 testfile6: 5c0 _ZNKSt11logic_error4whatEv 268 testfile6: 5db _Jv_RegisterClasses 269 testfile6: 5ef _ZTISt16invalid_argument 270 testfile6: 608 __gmon_start__ 271 testfile6: 617 libm.so.6 272 testfile6: 621 _IO_stdin_used 273 testfile6: 630 libgcc_s.so.1 274 testfile6: 63e _Unwind_Resume 275 testfile6: 64d libc.so.6 276 testfile6: 657 __libc_start_main 277 testfile6: 669 GCC_3.0 278 testfile6: 671 GLIBC_2.0 279 testfile6: 67b GLIBCPP_3.2 280 testfile6: 687 CXXABI_1.2 281 testfile6: 908 PTRh 282 testfile6: e48 gdb.1 283 testfile6: ec8 N10__gnu_test9gnu_obj_1E 284 testfile6: ee1 N10__gnu_test9gnu_obj_2IiEE 285 testfile6: efd N10__gnu_test9gnu_obj_2IlEE 286 testfile6: f19 St16invalid_argument 287 testfile7: 114 /lib/ld-linux.so.2 288 testfile7: 3d9 libstdc++.so.5 289 testfile7: 3e8 _ZTVSt16invalid_argument 290 testfile7: 401 _ZNSaIcEC1Ev 291 testfile7: 40e _ZTSSt16invalid_argument 292 testfile7: 427 _ZTVN10__cxxabiv120__si_class_type_infoE 293 testfile7: 450 _ZNSsD1Ev 294 testfile7: 45a _ZdlPv 295 testfile7: 461 __cxa_end_catch 296 testfile7: 471 __gxx_personality_v0 297 testfile7: 486 _ZTISt9exception 298 testfile7: 497 _ZNSaIcED1Ev 299 testfile7: 4a4 _ZTISt11logic_error 300 testfile7: 4b8 _ZNSt16invalid_argumentD1Ev 301 testfile7: 4d4 _ZTVN10__cxxabiv117__class_type_infoE 302 testfile7: 4fa __cxa_throw 303 testfile7: 506 _ZNSt16invalid_argumentC1ERKSs 304 testfile7: 525 _ZNSsC1EPKcRKSaIcE 305 testfile7: 538 _ZNSt11logic_errorD2Ev 306 testfile7: 54f _ZTVN10__cxxabiv121__vmi_class_type_infoE 307 testfile7: 579 _ZNSt16invalid_argumentD0Ev 308 testfile7: 595 __cxa_begin_catch 309 testfile7: 5a7 __cxa_allocate_exception 310 testfile7: 5c0 _ZNKSt11logic_error4whatEv 311 testfile7: 5db _Jv_RegisterClasses 312 testfile7: 5ef _ZTISt16invalid_argument 313 testfile7: 608 __gmon_start__ 314 testfile7: 617 libm.so.6 315 testfile7: 621 _IO_stdin_used 316 testfile7: 630 libgcc_s.so.1 317 testfile7: 63e _Unwind_Resume 318 testfile7: 64d libc.so.6 319 testfile7: 657 __libc_start_main 320 testfile7: 669 GCC_3.0 321 testfile7: 671 GLIBC_2.0 322 testfile7: 67b GLIBCPP_3.2 323 testfile7: 687 CXXABI_1.2 324 testfile7: 908 PTRh 325 testfile7: e48 gdb.1 326 testfile7: ec8 N10__gnu_test9gnu_obj_1E 327 testfile7: ee1 N10__gnu_test9gnu_obj_2IiEE 328 testfile7: efd N10__gnu_test9gnu_obj_2IlEE 329 testfile7: f19 St16invalid_argument 330 testfile8: 79 XZh; 331 testfile8: 87 YXh< 332 testfile8: 14f SQh[ 333 testfile8: 259 t5Wj 334 testfile8: 502 WRVQ 335 testfile8: 1fe7 ZYPj 336 testfile8: 2115 u'Pj 337 testfile8: 7bba FILE 338 testfile8: 7bbf preserve-dates 339 testfile8: 7bce remove-comment 340 testfile8: 7bdd Remove .comment section 341 testfile8: 7bf6 ${prefix}/share 342 testfile8: 7c06 elfutils 343 testfile8: 7c0f a.out 344 testfile8: 7c15 0.58 345 testfile8: 7c1a strip (Red Hat %s) %s 346 testfile8: 7c31 2002 347 testfile8: 7c36 Ulrich Drepper 348 testfile8: 7c45 Written by %s. 349 testfile8: 7c55 cannot stat input file "%s" 350 testfile8: 7c71 %s: INTERNAL ERROR: %s 351 testfile8: 7c88 while opening "%s" 352 testfile8: 7c9b handle_elf 353 testfile8: 7ca6 ../../src/strip.c 354 testfile8: 7cb8 shdr_info[cnt].group_idx != 0 355 testfile8: 7cd6 illformed file `%s' 356 testfile8: 7cea elf_ndxscn (scn) == cnt 357 testfile8: 7d02 .shstrtab 358 testfile8: 7d0c while writing `%s': %s 359 testfile8: 7d23 ((sym->st_info) & 0xf) == 3 360 testfile8: 7d3f shndxdata != ((void *)0) 361 testfile8: 7d58 scn != ((void *)0) 362 testfile8: 7d6b .gnu_debuglink 363 testfile8: 7d7a .comment 364 testfile8: 7d83 cannot open `%s' 365 testfile8: 7da0 Place stripped output into FILE 366 testfile8: 7dc0 Extract the removed sections into FILE 367 testfile8: 7e00 Copy modified/access timestamps to the output 368 testfile8: 7e40 Only one input file allowed together with '-o' and '-f' 369 testfile8: 7e80 Copyright (C) %s Red Hat, Inc. 370 testfile8: 7e9f This is free software; see the source for copying conditions. There is NO 371 testfile8: 7eea warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 372 testfile8: 7f40 Report bugs to <drepper@redhat.com>. 373 testfile8: 7f80 %s: File format not recognized 374 testfile8: 7fa0 cannot set access and modification date of "%s" 375 testfile8: 7fe0 cannot create new file `%s': %s 376 testfile8: 8000 error while finishing `%s': %s 377 testfile8: 8020 shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0 378 testfile8: 8060 shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0 379 testfile8: 80a0 %s: error while creating ELF header: %s 380 testfile8: 80e0 %s: error while reading the file: %s 381 testfile8: 8120 sec < 0xff00 || shndxdata != ((void *)0) 382 testfile8: 8160 (versiondata->d_size / sizeof (GElf_Versym)) >= shdr_info[cnt].data->d_size / elsize 383 testfile8: 81c0 shdr_info[cnt].shdr.sh_type == 11 384 testfile8: 8200 (versiondata->d_size / sizeof (Elf32_Word)) >= shdr_info[cnt].data->d_size / elsize 385 testfile8: 8260 shdr_info[cnt].shdr.sh_type == 18 386 testfile8: 82a0 shdr_info[cnt].data != ((void *)0) 387 testfile8: 82e0 elf_ndxscn (shdr_info[cnt].newscn) == idx 388 testfile8: 8320 while create section header section: %s 389 testfile8: 8360 cannot allocate section data: %s 390 testfile8: 83a0 elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx 391 testfile8: 83e0 while generating output file: %s 392 testfile8: 8420 while preparing output for `%s' 393 testfile8: 8440 shdr_info[cnt].shdr.sh_type == 2 394 testfile8: 8480 shdr_info[idx].data != ((void *)0) 395 testfile8: 84c0 cannot determine number of sections: %s 396 testfile8: 8500 cannot get section header string table index 397 testfile8: 85c0 Discard symbols from object files. 398 testfile8: 85e3 [FILE...] 399 testfile9: 79 XZh; 400 testfile9: 87 YXh< 401 testfile9: 14f SQh[ 402 testfile9: 259 t5Wj 403 testfile9: 502 WRVQ 404 testfile9: 1fe7 ZYPj 405 testfile9: 2115 u'Pj 406 testfile9: 3414 FILE 407 testfile9: 3419 preserve-dates 408 testfile9: 3428 remove-comment 409 testfile9: 3437 Remove .comment section 410 testfile9: 3450 ${prefix}/share 411 testfile9: 3460 elfutils 412 testfile9: 3469 a.out 413 testfile9: 346f 0.58 414 testfile9: 3474 strip (Red Hat %s) %s 415 testfile9: 348b 2002 416 testfile9: 3490 Ulrich Drepper 417 testfile9: 349f Written by %s. 418 testfile9: 34af cannot stat input file "%s" 419 testfile9: 34cb %s: INTERNAL ERROR: %s 420 testfile9: 34e2 while opening "%s" 421 testfile9: 34f5 handle_elf 422 testfile9: 3500 ../../src/strip.c 423 testfile9: 3512 shdr_info[cnt].group_idx != 0 424 testfile9: 3530 illformed file `%s' 425 testfile9: 3544 elf_ndxscn (scn) == cnt 426 testfile9: 355c .shstrtab 427 testfile9: 3566 while writing `%s': %s 428 testfile9: 357d ((sym->st_info) & 0xf) == 3 429 testfile9: 3599 shndxdata != ((void *)0) 430 testfile9: 35b2 scn != ((void *)0) 431 testfile9: 35c5 .gnu_debuglink 432 testfile9: 35d4 .comment 433 testfile9: 35dd cannot open `%s' 434 testfile9: 3600 Place stripped output into FILE 435 testfile9: 3620 Extract the removed sections into FILE 436 testfile9: 3660 Copy modified/access timestamps to the output 437 testfile9: 36a0 Only one input file allowed together with '-o' and '-f' 438 testfile9: 36e0 Copyright (C) %s Red Hat, Inc. 439 testfile9: 36ff This is free software; see the source for copying conditions. There is NO 440 testfile9: 374a warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 441 testfile9: 37a0 Report bugs to <drepper (at] redhat.com>. 442 testfile9: 37e0 %s: File format not recognized 443 testfile9: 3800 cannot set access and modification date of "%s" 444 testfile9: 3840 cannot create new file `%s': %s 445 testfile9: 3860 error while finishing `%s': %s 446 testfile9: 3880 shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0 447 testfile9: 38c0 shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0 448 testfile9: 3900 %s: error while creating ELF header: %s 449 testfile9: 3940 %s: error while reading the file: %s 450 testfile9: 3980 sec < 0xff00 || shndxdata != ((void *)0) 451 testfile9: 39c0 (versiondata->d_size / sizeof (GElf_Versym)) >= shdr_info[cnt].data->d_size / elsize 452 testfile9: 3a20 shdr_info[cnt].shdr.sh_type == 11 453 testfile9: 3a60 (versiondata->d_size / sizeof (Elf32_Word)) >= shdr_info[cnt].data->d_size / elsize 454 testfile9: 3ac0 shdr_info[cnt].shdr.sh_type == 18 455 testfile9: 3b00 shdr_info[cnt].data != ((void *)0) 456 testfile9: 3b40 elf_ndxscn (shdr_info[cnt].newscn) == idx 457 testfile9: 3b80 while create section header section: %s 458 testfile9: 3bc0 cannot allocate section data: %s 459 testfile9: 3c00 elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx 460 testfile9: 3c40 while generating output file: %s 461 testfile9: 3c80 while preparing output for `%s' 462 testfile9: 3ca0 shdr_info[cnt].shdr.sh_type == 2 463 testfile9: 3ce0 shdr_info[idx].data != ((void *)0) 464 testfile9: 3d20 cannot determine number of sections: %s 465 testfile9: 3d60 cannot get section header string table index 466 testfile9: 3e20 Discard symbols from object files. 467 testfile9: 3e43 [FILE...] 468 EOF 469 470 exit 0 471