summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/ChangeLog2114
-rw-r--r--src/tests/Makefile2932
-rw-r--r--src/tests/Makefile.am429
-rw-r--r--src/tests/Makefile.in2932
-rw-r--r--src/tests/addrcfi.c226
-rw-r--r--src/tests/addrscopes.c195
-rw-r--r--src/tests/aggregate_size.c83
-rw-r--r--src/tests/alldts.c267
-rw-r--r--src/tests/allfcts.c109
-rw-r--r--src/tests/allregs.c203
-rw-r--r--src/tests/arextract.c159
-rw-r--r--src/tests/arls.c107
-rw-r--r--src/tests/arsymtest.c136
-rw-r--r--src/tests/asm-tst1.c256
-rw-r--r--src/tests/asm-tst2.c278
-rw-r--r--src/tests/asm-tst3.c339
-rw-r--r--src/tests/asm-tst4.c104
-rw-r--r--src/tests/asm-tst5.c116
-rw-r--r--src/tests/asm-tst6.c150
-rw-r--r--src/tests/asm-tst7.c181
-rw-r--r--src/tests/asm-tst8.c189
-rw-r--r--src/tests/asm-tst9.c335
-rw-r--r--src/tests/backtrace-child.c240
-rw-r--r--src/tests/backtrace-data.c328
-rw-r--r--src/tests/backtrace-dwarf.c165
-rw-r--r--src/tests/backtrace-subr.sh152
-rw-r--r--src/tests/backtrace.aarch64.core.bz2bin0 -> 7865 bytes
-rwxr-xr-xsrc/tests/backtrace.aarch64.exec.bz2bin0 -> 370058 bytes
-rw-r--r--src/tests/backtrace.c479
-rw-r--r--src/tests/backtrace.i386.core.bz2bin0 -> 8777 bytes
-rw-r--r--src/tests/backtrace.i386.exec.bz2bin0 -> 383356 bytes
-rw-r--r--src/tests/backtrace.ppc.core.bz2bin0 -> 46357 bytes
-rw-r--r--src/tests/backtrace.ppc.exec.bz2bin0 -> 352898 bytes
-rw-r--r--src/tests/backtrace.s390.core.bz2bin0 -> 7375 bytes
-rw-r--r--src/tests/backtrace.s390.exec.bz2bin0 -> 352692 bytes
-rw-r--r--src/tests/backtrace.s390x.core.bz2bin0 -> 7740 bytes
-rw-r--r--src/tests/backtrace.s390x.exec.bz2bin0 -> 347228 bytes
-rw-r--r--src/tests/backtrace.x86_64.core.bz2bin0 -> 11115 bytes
-rw-r--r--src/tests/backtrace.x86_64.exec.bz2bin0 -> 401581 bytes
-rw-r--r--src/tests/buildid.c81
-rw-r--r--src/tests/cleanup-13.c316
-rwxr-xr-xsrc/tests/coverage.sh40
-rw-r--r--src/tests/debugaltlink.c83
-rw-r--r--src/tests/debuglink.c64
-rw-r--r--src/tests/deleted-lib.c27
-rw-r--r--src/tests/deleted.c50
-rw-r--r--src/tests/dwarf-getmacros.c144
-rw-r--r--src/tests/dwarf-getstring.c77
-rw-r--r--src/tests/dwfl-addr-sect.c80
-rw-r--r--src/tests/dwfl-bug-addr-overflow.c73
-rw-r--r--src/tests/dwfl-bug-fd-leak.c102
-rw-r--r--src/tests/dwfl-bug-getmodules.c66
-rw-r--r--src/tests/dwfl-bug-report.c48
-rw-r--r--src/tests/dwfl-report-elf-align.c72
-rw-r--r--src/tests/dwfllines.c164
-rw-r--r--src/tests/dwflmodtest.c287
-rw-r--r--src/tests/dwflsyms.c226
-rw-r--r--src/tests/early-offscn.c52
-rw-r--r--src/tests/ecp.c95
-rw-r--r--src/tests/find-prologues.c108
-rw-r--r--src/tests/funcretval.c106
-rw-r--r--src/tests/funcretval_test.c828
-rwxr-xr-xsrc/tests/funcretval_test_aarch64.bz2bin0 -> 15644 bytes
-rw-r--r--src/tests/funcscopes.c194
-rw-r--r--src/tests/get-aranges.c142
-rw-r--r--src/tests/get-files.c107
-rw-r--r--src/tests/get-lines.c137
-rw-r--r--src/tests/get-pubnames.c98
-rw-r--r--src/tests/hash.c45
-rw-r--r--src/tests/hello_aarch64.ko.bz2bin0 -> 12768 bytes
-rw-r--r--src/tests/hello_i386.ko.bz2bin0 -> 47401 bytes
-rw-r--r--src/tests/hello_ppc64.ko.bz2bin0 -> 68189 bytes
-rw-r--r--src/tests/hello_s390.ko.bz2bin0 -> 109190 bytes
-rw-r--r--src/tests/hello_x86_64.ko.bz2bin0 -> 35106 bytes
-rwxr-xr-xsrc/tests/libtestfile_multi_shared.so.bz2bin0 -> 2547 bytes
-rw-r--r--src/tests/line2addr.c148
-rw-r--r--src/tests/linkmap-cut-lib.so.bz2bin0 -> 2151 bytes
-rw-r--r--src/tests/linkmap-cut.bz2bin0 -> 2633 bytes
-rw-r--r--src/tests/linkmap-cut.core.bz2bin0 -> 21343 bytes
-rw-r--r--src/tests/low_high_pc.c109
-rw-r--r--src/tests/md5-sha1-test.c101
-rw-r--r--src/tests/msg_tst.c104
-rw-r--r--src/tests/newfile.c170
-rw-r--r--src/tests/newscn.c66
-rw-r--r--src/tests/rdwrmmap.c45
-rw-r--r--src/tests/rerequest_tag.c46
-rwxr-xr-xsrc/tests/run-addr2line-i-lex-test.sh71
-rwxr-xr-xsrc/tests/run-addr2line-i-test.sh147
-rwxr-xr-xsrc/tests/run-addr2line-test.sh74
-rwxr-xr-xsrc/tests/run-addrcfi.sh2650
-rwxr-xr-xsrc/tests/run-addrname-test.sh360
-rwxr-xr-xsrc/tests/run-addrscopes.sh43
-rwxr-xr-xsrc/tests/run-aggregate-size.sh105
-rwxr-xr-xsrc/tests/run-alldts.sh98
-rwxr-xr-xsrc/tests/run-allfcts-multi.sh56
-rwxr-xr-xsrc/tests/run-allfcts.sh94
-rwxr-xr-xsrc/tests/run-allregs.sh2799
-rwxr-xr-xsrc/tests/run-arextract.sh40
-rwxr-xr-xsrc/tests/run-arsymtest.sh47
-rwxr-xr-xsrc/tests/run-backtrace-core-aarch64.sh23
-rwxr-xr-xsrc/tests/run-backtrace-core-i386.sh20
-rwxr-xr-xsrc/tests/run-backtrace-core-ppc.sh20
-rwxr-xr-xsrc/tests/run-backtrace-core-s390.sh20
-rwxr-xr-xsrc/tests/run-backtrace-core-s390x.sh20
-rwxr-xr-xsrc/tests/run-backtrace-core-x86_64.sh20
-rwxr-xr-xsrc/tests/run-backtrace-data.sh28
-rwxr-xr-xsrc/tests/run-backtrace-demangle.sh46
-rwxr-xr-xsrc/tests/run-backtrace-dwarf.sh30
-rwxr-xr-xsrc/tests/run-backtrace-native-biarch.sh24
-rwxr-xr-xsrc/tests/run-backtrace-native-core-biarch.sh24
-rwxr-xr-xsrc/tests/run-backtrace-native-core.sh20
-rwxr-xr-xsrc/tests/run-backtrace-native.sh20
-rwxr-xr-xsrc/tests/run-bug1-test.sh34
-rwxr-xr-xsrc/tests/run-buildid.sh38
-rwxr-xr-xsrc/tests/run-debugaltlink.sh34
-rwxr-xr-xsrc/tests/run-debuglink.sh29
-rwxr-xr-xsrc/tests/run-deleted.sh48
-rwxr-xr-xsrc/tests/run-disasm-x86-64.sh28
-rwxr-xr-xsrc/tests/run-disasm-x86.sh28
-rwxr-xr-xsrc/tests/run-dwarf-getmacros.sh710
-rwxr-xr-xsrc/tests/run-dwarf-getstring.sh125
-rwxr-xr-xsrc/tests/run-dwfl-addr-sect.sh32
-rwxr-xr-xsrc/tests/run-dwfl-bug-offline-rel.sh28
-rwxr-xr-xsrc/tests/run-dwfl-report-elf-align.sh44
-rwxr-xr-xsrc/tests/run-dwfllines.sh88
-rwxr-xr-xsrc/tests/run-dwflsyms.sh826
-rwxr-xr-xsrc/tests/run-early-offscn.sh24
-rwxr-xr-xsrc/tests/run-ecp-test.sh28
-rwxr-xr-xsrc/tests/run-ecp-test2.sh26
-rwxr-xr-xsrc/tests/run-elf_cntl_gelf_getshdr.sh30
-rwxr-xr-xsrc/tests/run-elflint-self.sh21
-rwxr-xr-xsrc/tests/run-elflint-test.sh43
-rwxr-xr-xsrc/tests/run-find-prologues.sh85
-rwxr-xr-xsrc/tests/run-funcretval.sh153
-rwxr-xr-xsrc/tests/run-funcscopes.sh29
-rwxr-xr-xsrc/tests/run-get-aranges.sh68
-rwxr-xr-xsrc/tests/run-get-files.sh67
-rwxr-xr-xsrc/tests/run-get-lines.sh91
-rwxr-xr-xsrc/tests/run-get-pubnames.sh50
-rwxr-xr-xsrc/tests/run-line2addr.sh49
-rwxr-xr-xsrc/tests/run-linkmap-cut.sh32
-rwxr-xr-xsrc/tests/run-low_high_pc.sh34
-rwxr-xr-xsrc/tests/run-macro-test.sh52
-rwxr-xr-xsrc/tests/run-native-test.sh88
-rwxr-xr-xsrc/tests/run-nm-self.sh36
-rwxr-xr-xsrc/tests/run-prelink-addr-test.sh252
-rwxr-xr-xsrc/tests/run-ranlib-test.sh38
-rwxr-xr-xsrc/tests/run-ranlib-test2.sh37
-rwxr-xr-xsrc/tests/run-ranlib-test3.sh22
-rwxr-xr-xsrc/tests/run-ranlib-test4.sh23
-rwxr-xr-xsrc/tests/run-readelf-A.sh65
-rwxr-xr-xsrc/tests/run-readelf-aranges.sh161
-rwxr-xr-xsrc/tests/run-readelf-d.sh70
-rwxr-xr-xsrc/tests/run-readelf-dwz-multi.sh332
-rwxr-xr-xsrc/tests/run-readelf-gdb_index.sh130
-rwxr-xr-xsrc/tests/run-readelf-line.sh259
-rwxr-xr-xsrc/tests/run-readelf-loc.sh109
-rwxr-xr-xsrc/tests/run-readelf-macro.sh345
-rwxr-xr-xsrc/tests/run-readelf-mixed-corenote.sh493
-rwxr-xr-xsrc/tests/run-readelf-s.sh378
-rwxr-xr-xsrc/tests/run-readelf-self.sh21
-rwxr-xr-xsrc/tests/run-readelf-test1.sh45
-rwxr-xr-xsrc/tests/run-readelf-test2.sh28
-rwxr-xr-xsrc/tests/run-readelf-test3.sh31
-rwxr-xr-xsrc/tests/run-readelf-test4.sh33
-rwxr-xr-xsrc/tests/run-readelf-twofiles.sh24
-rwxr-xr-xsrc/tests/run-readelf-vmcoreinfo.sh114
-rwxr-xr-xsrc/tests/run-readelf-zdebug.sh539
-rwxr-xr-xsrc/tests/run-rerequest_tag.sh25
-rwxr-xr-xsrc/tests/run-show-abbrev.sh352
-rwxr-xr-xsrc/tests/run-show-die-info.sh985
-rwxr-xr-xsrc/tests/run-stack-d-test.sh112
-rwxr-xr-xsrc/tests/run-stack-i-test.sh70
-rwxr-xr-xsrc/tests/run-strings-test.sh470
-rwxr-xr-xsrc/tests/run-strip-groups.sh55
-rwxr-xr-xsrc/tests/run-strip-reloc.sh110
-rwxr-xr-xsrc/tests/run-strip-test.sh56
-rwxr-xr-xsrc/tests/run-strip-test2.sh22
-rwxr-xr-xsrc/tests/run-strip-test3.sh22
-rwxr-xr-xsrc/tests/run-strip-test4.sh5
-rwxr-xr-xsrc/tests/run-strip-test5.sh5
-rwxr-xr-xsrc/tests/run-strip-test6.sh5
-rwxr-xr-xsrc/tests/run-strip-test7.sh5
-rwxr-xr-xsrc/tests/run-strip-test8.sh5
-rwxr-xr-xsrc/tests/run-test-archive64.sh43
-rwxr-xr-xsrc/tests/run-test-flag-nobits.sh22
-rwxr-xr-xsrc/tests/run-typeiter.sh54
-rwxr-xr-xsrc/tests/run-unstrip-M.sh51
-rwxr-xr-xsrc/tests/run-unstrip-n.sh76
-rwxr-xr-xsrc/tests/run-unstrip-test.sh43
-rwxr-xr-xsrc/tests/run-unstrip-test2.sh5
-rwxr-xr-xsrc/tests/run-varlocs.sh128
-rw-r--r--src/tests/saridx.c257
-rw-r--r--src/tests/scnnames.c91
-rw-r--r--src/tests/sectiondump.c182
-rw-r--r--src/tests/show-abbrev.c131
-rw-r--r--src/tests/show-die-info.c358
-rw-r--r--src/tests/showptable.c139
-rwxr-xr-xsrc/tests/test-core-lib.so.bz2bin0 -> 2028 bytes
-rw-r--r--src/tests/test-core.core.bz2bin0 -> 14165 bytes
-rwxr-xr-xsrc/tests/test-core.exec.bz2bin0 -> 2565 bytes
-rw-r--r--src/tests/test-elf_cntl_gelf_getshdr.c103
-rw-r--r--src/tests/test-flag-nobits.c35
-rw-r--r--src/tests/test-nlist.c83
-rw-r--r--src/tests/test-offset-loop.alt.bz2bin0 -> 685 bytes
-rwxr-xr-xsrc/tests/test-offset-loop.bz2bin0 -> 3062 bytes
-rw-r--r--src/tests/test-subr.sh154
-rwxr-xr-xsrc/tests/test-wrapper.sh65
-rw-r--r--src/tests/testarchive64.a.bz2bin0 -> 834 bytes
-rw-r--r--src/tests/testcore-rtlib-ppc.bz2bin0 -> 200184 bytes
-rw-r--r--src/tests/testcore-rtlib.bz2bin0 -> 25566 bytes
-rwxr-xr-xsrc/tests/testfile-backtrace-demangle.bz2bin0 -> 3016 bytes
-rw-r--r--src/tests/testfile-backtrace-demangle.cc47
-rw-r--r--src/tests/testfile-backtrace-demangle.core.bz2bin0 -> 39510 bytes
-rwxr-xr-xsrc/tests/testfile-debug.bz2bin0 -> 5441 bytes
-rwxr-xr-xsrc/tests/testfile-dwfl-report-elf-align-shlib.so.bz2bin0 -> 1546 bytes
-rwxr-xr-xsrc/tests/testfile-dwzstr.bz2bin0 -> 2768 bytes
-rw-r--r--src/tests/testfile-dwzstr.multi.bz2bin0 -> 518 bytes
-rwxr-xr-xsrc/tests/testfile-inlines.bz2bin0 -> 2815 bytes
-rwxr-xr-xsrc/tests/testfile-lex-inlines.bz2bin0 -> 2599 bytes
-rwxr-xr-xsrc/tests/testfile-macinfo.bz2bin0 -> 6689 bytes
-rwxr-xr-xsrc/tests/testfile-macros-0xff.bz2bin0 -> 2844 bytes
-rwxr-xr-xsrc/tests/testfile-macros.bz2bin0 -> 7882 bytes
-rw-r--r--src/tests/testfile-sizes1.o.bz2bin0 -> 1012 bytes
-rw-r--r--src/tests/testfile-sizes2.o.bz2bin0 -> 1283 bytes
-rw-r--r--src/tests/testfile-sizes3.o.bz2bin0 -> 1147 bytes
-rwxr-xr-xsrc/tests/testfile-zdebug.bz2bin0 -> 6647 bytes
-rw-r--r--src/tests/testfile.bz2bin0 -> 8115 bytes
-rw-r--r--src/tests/testfile10.bz2bin0 -> 2635 bytes
-rw-r--r--src/tests/testfile11.bz2bin0 -> 30561 bytes
-rw-r--r--src/tests/testfile12.bz2bin0 -> 9948 bytes
-rw-r--r--src/tests/testfile13.bz2bin0 -> 1593 bytes
-rw-r--r--src/tests/testfile14.bz2bin0 -> 2903 bytes
-rw-r--r--src/tests/testfile15.bz2bin0 -> 3132 bytes
-rw-r--r--src/tests/testfile15.debug.bz2bin0 -> 28499 bytes
-rw-r--r--src/tests/testfile16.bz2bin0 -> 8413 bytes
-rw-r--r--src/tests/testfile16.debug.bz2bin0 -> 24257 bytes
-rw-r--r--src/tests/testfile17.bz2bin0 -> 1660 bytes
-rw-r--r--src/tests/testfile17.debug.bz2bin0 -> 9134 bytes
-rw-r--r--src/tests/testfile18.bz2bin0 -> 1721 bytes
-rw-r--r--src/tests/testfile19.bz2bin0 -> 458 bytes
-rw-r--r--src/tests/testfile19.index.bz2bin0 -> 501 bytes
-rw-r--r--src/tests/testfile2.bz2bin0 -> 6400 bytes
-rw-r--r--src/tests/testfile20.bz2bin0 -> 502 bytes
-rw-r--r--src/tests/testfile20.index.bz2bin0 -> 523 bytes
-rw-r--r--src/tests/testfile21.bz2bin0 -> 127 bytes
-rw-r--r--src/tests/testfile21.index.bz2bin0 -> 100 bytes
-rw-r--r--src/tests/testfile22.bz2bin0 -> 2555 bytes
-rw-r--r--src/tests/testfile23.bz2bin0 -> 956 bytes
-rw-r--r--src/tests/testfile24.bz2bin0 -> 2644 bytes
-rw-r--r--src/tests/testfile25.bz2bin0 -> 2575 bytes
-rw-r--r--src/tests/testfile26.bz2bin0 -> 2331 bytes
-rw-r--r--src/tests/testfile27.bz2bin0 -> 2371 bytes
-rw-r--r--src/tests/testfile28.bz2bin0 -> 171 bytes
-rw-r--r--src/tests/testfile28.rdwr.bz2bin0 -> 172 bytes
-rw-r--r--src/tests/testfile29.bz2bin0 -> 164 bytes
-rw-r--r--src/tests/testfile29.rdwr.bz2bin0 -> 164 bytes
-rw-r--r--src/tests/testfile3.bz2bin0 -> 8051 bytes
-rw-r--r--src/tests/testfile30.bz2bin0 -> 753 bytes
-rw-r--r--src/tests/testfile31.bz2bin0 -> 769 bytes
-rw-r--r--src/tests/testfile32.bz2bin0 -> 5778 bytes
-rw-r--r--src/tests/testfile33.bz2bin0 -> 35075 bytes
-rw-r--r--src/tests/testfile34.bz2bin0 -> 315 bytes
-rw-r--r--src/tests/testfile35.bz2bin0 -> 1643 bytes
-rw-r--r--src/tests/testfile35.debug.bz2bin0 -> 9106 bytes
-rw-r--r--src/tests/testfile36.bz2bin0 -> 714 bytes
-rw-r--r--src/tests/testfile36.debug.bz2bin0 -> 24909 bytes
-rw-r--r--src/tests/testfile37.bz2bin0 -> 3140 bytes
-rw-r--r--src/tests/testfile37.debug.bz2bin0 -> 28522 bytes
-rw-r--r--src/tests/testfile38.bz2bin0 -> 457 bytes
-rw-r--r--src/tests/testfile39.bz2bin0 -> 2992 bytes
-rw-r--r--src/tests/testfile4.bz2bin0 -> 41405 bytes
-rw-r--r--src/tests/testfile40.bz2bin0 -> 2302 bytes
-rw-r--r--src/tests/testfile40.debug.bz2bin0 -> 1398 bytes
-rw-r--r--src/tests/testfile41.bz2bin0 -> 295 bytes
-rw-r--r--src/tests/testfile42.bz2bin0 -> 16201 bytes
-rw-r--r--src/tests/testfile42_noshdrs.bz2bin0 -> 6746 bytes
-rw-r--r--src/tests/testfile43.bz2bin0 -> 739 bytes
-rw-r--r--src/tests/testfile44.S.bz2bin0 -> 18296 bytes
-rw-r--r--src/tests/testfile44.expect.bz2bin0 -> 60096 bytes
-rw-r--r--src/tests/testfile45.S.bz2bin0 -> 24742 bytes
-rw-r--r--src/tests/testfile45.expect.bz2bin0 -> 82002 bytes
-rw-r--r--src/tests/testfile46.bz2bin0 -> 322 bytes
-rw-r--r--src/tests/testfile47.bz2bin0 -> 793 bytes
-rw-r--r--src/tests/testfile48.bz2bin0 -> 408 bytes
-rw-r--r--src/tests/testfile48.debug.bz2bin0 -> 758 bytes
-rw-r--r--src/tests/testfile49.bz2bin0 -> 337 bytes
-rw-r--r--src/tests/testfile5.bz2bin0 -> 5646 bytes
-rw-r--r--src/tests/testfile50.bz2bin0 -> 229 bytes
-rwxr-xr-xsrc/tests/testfile51.bz2bin0 -> 4294 bytes
-rwxr-xr-xsrc/tests/testfile52-32.noshdrs.so.bz2bin0 -> 944 bytes
-rwxr-xr-xsrc/tests/testfile52-32.prelink.so.bz2bin0 -> 1839 bytes
-rwxr-xr-xsrc/tests/testfile52-32.so.bz2bin0 -> 1445 bytes
-rwxr-xr-xsrc/tests/testfile52-32.so.debug.bz2bin0 -> 1681 bytes
-rwxr-xr-xsrc/tests/testfile52-64.noshdrs.so.bz2bin0 -> 1044 bytes
-rwxr-xr-xsrc/tests/testfile52-64.prelink.so.bz2bin0 -> 1978 bytes
-rwxr-xr-xsrc/tests/testfile52-64.so.bz2bin0 -> 1558 bytes
-rwxr-xr-xsrc/tests/testfile52-64.so.debug.bz2bin0 -> 1693 bytes
-rwxr-xr-xsrc/tests/testfile53-32.bz2bin0 -> 1628 bytes
-rwxr-xr-xsrc/tests/testfile53-32.debug.bz2bin0 -> 1959 bytes
-rwxr-xr-xsrc/tests/testfile53-32.prelink.bz2bin0 -> 2192 bytes
-rwxr-xr-xsrc/tests/testfile53-64.bz2bin0 -> 1683 bytes
-rwxr-xr-xsrc/tests/testfile53-64.debug.bz2bin0 -> 1927 bytes
-rwxr-xr-xsrc/tests/testfile53-64.prelink.bz2bin0 -> 2180 bytes
-rwxr-xr-xsrc/tests/testfile54-32.noshdrs.so.bz2bin0 -> 416 bytes
-rwxr-xr-xsrc/tests/testfile54-32.prelink.so.bz2bin0 -> 1035 bytes
-rwxr-xr-xsrc/tests/testfile54-32.so.bz2bin0 -> 745 bytes
-rwxr-xr-xsrc/tests/testfile54-32.so.debug.bz2bin0 -> 1009 bytes
-rwxr-xr-xsrc/tests/testfile54-64.noshdrs.so.bz2bin0 -> 458 bytes
-rwxr-xr-xsrc/tests/testfile54-64.prelink.so.bz2bin0 -> 1127 bytes
-rwxr-xr-xsrc/tests/testfile54-64.so.bz2bin0 -> 799 bytes
-rwxr-xr-xsrc/tests/testfile54-64.so.debug.bz2bin0 -> 1052 bytes
-rwxr-xr-xsrc/tests/testfile55-32.bz2bin0 -> 1661 bytes
-rwxr-xr-xsrc/tests/testfile55-32.debug.bz2bin0 -> 1894 bytes
-rwxr-xr-xsrc/tests/testfile55-32.prelink.bz2bin0 -> 2163 bytes
-rwxr-xr-xsrc/tests/testfile55-64.bz2bin0 -> 1725 bytes
-rwxr-xr-xsrc/tests/testfile55-64.debug.bz2bin0 -> 1869 bytes
-rwxr-xr-xsrc/tests/testfile55-64.prelink.bz2bin0 -> 2259 bytes
-rw-r--r--src/tests/testfile56.bz2bin0 -> 2768 bytes
-rw-r--r--src/tests/testfile57.bz2bin0 -> 593 bytes
-rw-r--r--src/tests/testfile58.bz2bin0 -> 1680 bytes
-rwxr-xr-xsrc/tests/testfile59.bz2bin0 -> 3097 bytes
-rw-r--r--src/tests/testfile6.bz2bin0 -> 30577 bytes
-rwxr-xr-xsrc/tests/testfile60.bz2bin0 -> 2974 bytes
-rw-r--r--src/tests/testfile61.bz2bin0 -> 7906 bytes
-rw-r--r--src/tests/testfile62.bz2bin0 -> 3506 bytes
-rw-r--r--src/tests/testfile63.bz2bin0 -> 457 bytes
-rw-r--r--src/tests/testfile64.bz2bin0 -> 395 bytes
-rw-r--r--src/tests/testfile65.bz2bin0 -> 4674 bytes
-rwxr-xr-xsrc/tests/testfile66.bz2bin0 -> 741 bytes
-rw-r--r--src/tests/testfile66.core.bz2bin0 -> 56448 bytes
-rw-r--r--src/tests/testfile67.bz2bin0 -> 424 bytes
-rw-r--r--src/tests/testfile68.bz2bin0 -> 399 bytes
-rw-r--r--src/tests/testfile69.core.bz2bin0 -> 4416 bytes
-rwxr-xr-xsrc/tests/testfile69.so.bz2bin0 -> 2099 bytes
-rw-r--r--src/tests/testfile7.bz2bin0 -> 3107 bytes
-rw-r--r--src/tests/testfile70.core.bz2bin0 -> 2739 bytes
-rw-r--r--src/tests/testfile70.exec.bz2bin0 -> 2567 bytes
-rw-r--r--src/tests/testfile71.bz2bin0 -> 18164 bytes
-rw-r--r--src/tests/testfile8.bz2bin0 -> 31982 bytes
-rw-r--r--src/tests/testfile9.bz2bin0 -> 8367 bytes
-rw-r--r--src/tests/testfile_aarch64_core.bz2bin0 -> 61748 bytes
-rwxr-xr-xsrc/tests/testfile_class_func.bz2bin0 -> 2962 bytes
-rwxr-xr-xsrc/tests/testfile_const_type.bz2bin0 -> 3353 bytes
-rw-r--r--src/tests/testfile_const_type.c14
-rwxr-xr-xsrc/tests/testfile_entry_value.bz2bin0 -> 3309 bytes
-rw-r--r--src/tests/testfile_entry_value.c19
-rw-r--r--src/tests/testfile_i686_core.bz2bin0 -> 15980 bytes
-rwxr-xr-xsrc/tests/testfile_implicit_pointer.bz2bin0 -> 2952 bytes
-rw-r--r--src/tests/testfile_implicit_pointer.c12
-rwxr-xr-xsrc/tests/testfile_implicit_value.bz2bin0 -> 2973 bytes
-rw-r--r--src/tests/testfile_implicit_value.c12
-rwxr-xr-xsrc/tests/testfile_low_high_pc.bz2bin0 -> 2812 bytes
-rw-r--r--src/tests/testfile_multi.dwz.bz2bin0 -> 512 bytes
-rwxr-xr-xsrc/tests/testfile_multi_main.bz2bin0 -> 3086 bytes
-rwxr-xr-xsrc/tests/testfile_nested_funcs.bz2bin0 -> 3045 bytes
-rwxr-xr-xsrc/tests/testfile_parameter_ref.bz2bin0 -> 3329 bytes
-rw-r--r--src/tests/testfile_parameter_ref.c20
-rwxr-xr-xsrc/tests/testfileaarch64.bz2bin0 -> 3441 bytes
-rwxr-xr-xsrc/tests/testfilearm.bz2bin0 -> 3545 bytes
-rwxr-xr-xsrc/tests/testfilebasmin.bz2bin0 -> 1082 bytes
-rwxr-xr-xsrc/tests/testfilebaxmin.bz2bin0 -> 2987 bytes
-rwxr-xr-xsrc/tests/testfilebazdbg.bz2bin0 -> 2185 bytes
-rwxr-xr-xsrc/tests/testfilebazdbg.debug.bz2bin0 -> 2187 bytes
-rwxr-xr-xsrc/tests/testfilebazdbg_pl.bz2bin0 -> 2589 bytes
-rwxr-xr-xsrc/tests/testfilebazdbg_plr.bz2bin0 -> 2241 bytes
-rwxr-xr-xsrc/tests/testfilebazdbgppc64.bz2bin0 -> 2366 bytes
-rwxr-xr-xsrc/tests/testfilebazdbgppc64.debug.bz2bin0 -> 2295 bytes
-rwxr-xr-xsrc/tests/testfilebazdbgppc64_pl.bz2bin0 -> 2775 bytes
-rwxr-xr-xsrc/tests/testfilebazdbgppc64_plr.bz2bin0 -> 2399 bytes
-rwxr-xr-xsrc/tests/testfilebazdyn.bz2bin0 -> 2164 bytes
-rwxr-xr-xsrc/tests/testfilebazdynppc64.bz2bin0 -> 2327 bytes
-rwxr-xr-xsrc/tests/testfilebazmdb.bz2bin0 -> 3313 bytes
-rwxr-xr-xsrc/tests/testfilebazmdbppc64.bz2bin0 -> 3528 bytes
-rwxr-xr-xsrc/tests/testfilebazmin.bz2bin0 -> 3323 bytes
-rwxr-xr-xsrc/tests/testfilebazmin_pl.bz2bin0 -> 3749 bytes
-rwxr-xr-xsrc/tests/testfilebazmin_plr.bz2bin0 -> 3337 bytes
-rwxr-xr-xsrc/tests/testfilebazminppc64.bz2bin0 -> 3464 bytes
-rwxr-xr-xsrc/tests/testfilebazminppc64_pl.bz2bin0 -> 3900 bytes
-rwxr-xr-xsrc/tests/testfilebazminppc64_plr.bz2bin0 -> 3535 bytes
-rwxr-xr-xsrc/tests/testfilebaztab.bz2bin0 -> 3418 bytes
-rwxr-xr-xsrc/tests/testfilebaztabppc64.bz2bin0 -> 3697 bytes
-rwxr-xr-xsrc/tests/testfiledwarfinlines.bz2bin0 -> 4225 bytes
-rw-r--r--src/tests/testfiledwarfinlines.core.bz2bin0 -> 39713 bytes
-rwxr-xr-xsrc/tests/testfilefoobarbaz.bz2bin0 -> 3974 bytes
-rwxr-xr-xsrc/tests/testfilegdbindex5.bz2bin0 -> 3481 bytes
-rwxr-xr-xsrc/tests/testfilegdbindex7.bz2bin0 -> 3497 bytes
-rwxr-xr-xsrc/tests/testfileloc.bz2bin0 -> 3148 bytes
-rwxr-xr-xsrc/tests/testfilemacro.bz2bin0 -> 5601 bytes
-rwxr-xr-xsrc/tests/testfilenolines.bz2bin0 -> 2855 bytes
-rwxr-xr-xsrc/tests/testfileppc32.bz2bin0 -> 3344 bytes
-rw-r--r--src/tests/testfileppc32attrs.o.bz2bin0 -> 228 bytes
-rwxr-xr-xsrc/tests/testfileppc64.bz2bin0 -> 3351 bytes
-rwxr-xr-xsrc/tests/testfiles390.bz2bin0 -> 3132 bytes
-rwxr-xr-xsrc/tests/testfiles390x.bz2bin0 -> 3026 bytes
-rwxr-xr-xsrc/tests/testlib_dynseg.so.bz2bin0 -> 2275 bytes
-rw-r--r--src/tests/typeiter.c90
-rw-r--r--src/tests/typeiter2.c89
-rw-r--r--src/tests/update1.c127
-rw-r--r--src/tests/update2.c150
-rw-r--r--src/tests/update3.c205
-rw-r--r--src/tests/update4.c357
-rw-r--r--src/tests/varlocs.c826
-rw-r--r--src/tests/vdsosyms.c109
404 files changed, 37852 insertions, 0 deletions
diff --git a/src/tests/ChangeLog b/src/tests/ChangeLog
new file mode 100644
index 00000000..59048f65
--- /dev/null
+++ b/src/tests/ChangeLog
@@ -0,0 +1,2114 @@
+2014-12-19 Mark Wielaard <mjw@redhat.com>
+
+ * run-deleted.sh: Don't check libfunc on ppc64.
+
+2014-12-19 Mark Wielaard <mjw@redhat.com>
+
+ * vdsosyms.c (vdso_seen): Removed.
+ (vdso_syms): New global.
+ (module_callback): Set and check vdso_syms.
+ (main): Return value depends on vdso_syms.
+
+2014-12-19 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace-subr.sh (check_native_unsupported): Relax special ARM
+ grep a little.
+ * run-deleted.sh: Call check_native_unsupported.
+
+2014-12-18 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add testfile-macros-0xff.bz2.
+
+2014-12-12 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (deleted_lib_so_CFLAGS): Add
+ -fasynchronous-unwind-tables.
+
+2014-12-11 Josh Stone <jistone@redhat.com>
+
+ * run-addr2line-i-lex-test.sh: New test.
+ * testfile-lex-inlines.bz2: New testfile.
+ * Makefile.am (EXTRA_DIST): Add run-addr2line-i-lex-test.sh and
+ testfile-lex-inlines.bz2.
+ (TESTS): Add run-addr2line-i-lex-test.sh.
+
+2014-12-10 Josh Stone <jistone@redhat.com>
+
+ * run-addr2line-i-test.sh: Test 0x5f0 to make sure linkage_name is
+ preferred over the plain die name.
+
+2014-12-02 Petr Machata <pmachata@redhat.com>
+
+ * dwarf-getmacros.c (mac): Skip over DW_MACINFO_undef,
+ DW_MACRO_GNU_undef_indirect opcodes. Add a default branch.
+ (main): Initialize off to DWARF_GETMACROS_START when an extra
+ command line argument is passed.
+ * testfile-macros-0xff.bz2: New test case.
+ * testfile-macros-0xff.s: New file (source for the above).
+ * run-dwarf-getmacros.sh: Add two tests.
+
+2014-11-27 Mark Wielaard <mjw@redhat.com>
+
+ * vdsosyms.c (main): Call dwfl_linux_proc_attach.
+
+2014-11-21 Mark Wielaard <mjw@redhat.com>
+
+ * run-readelf-A.sh: New test.
+ * testfileppc32attrs.o.bz2: New test file.
+ * Makefile.am (TESTS): Add run-readelf-A.sh.
+ (EXTRA_DIST): Add run-readelf-A.sh and testfileppc32attrs.o.bz2.
+
+2014-11-10 Mark Wielaard <mjw@redhat.com>
+
+ * vdsosyms.c: New test.
+ * Makefile.am (check_PROGRAMS): Add vdsosyms.
+ (TESTS): Likewise.
+ (vdsosyms_LDADD): New variable.
+
+2014-09-10 Petr Machata <pmachata@redhat.com>
+
+ * dwarf-getmacros.c: Update to use the new macro iteration
+ interfaces.
+ * run-dwarf-getmacros.sh: Adjust, add a test that uses
+ testfile-macros.
+
+2014-10-06 Mark Wielaard <mjw@redhat.com>
+
+ * run-aggregate-size.sh: Add testfile-sizes3.o test case.
+ * testfile-sizes3.o.bz2: New test file.
+ * Makefile.am (EXTRA_DIST): Add testfile-sizes3.o.bz2.
+
+2014-10-02 Mark Wielaard <mjw@redhat.com>
+
+ * run-deleted.sh: Unset VALGRIND_CMD before running deleted.
+
+2014-10-02 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (check_PROGRAMS): Add aggregate_size.c.
+ (TESTS): Add run-aggregate-size.sh.
+ (EXTRA_DIST): Add run-aggregate-size.sh, testfile-sizes1.o.bz2
+ and testfile-sizes2.o.bz2.
+ (aggregate_size_LDADD): New variable.
+ * aggregate_size.c: New file.
+ * run-aggregate-size.sh: New test.
+ * testfile-sizes1.o.bz2: New test file.
+ * testfile-sizes2.o.bz2: Likewise.
+
+2014-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Support NT_FILE for locating files.
+ * Makefile.am (TESTS): Add run-linkmap-cut.sh.
+ (EXTRA_DIST): Add run-linkmap-cut.sh, linkmap-cut-lib.so.bz2,
+ linkmap-cut.bz2 and linkmap-cut.core.bz2 .
+ * linkmap-cut-lib.so.bz2: New file.
+ * linkmap-cut.bz2: New file.
+ * linkmap-cut.core.bz2: New file.
+ * run-linkmap-cut.sh: New file.
+ * run-unstrip-n.sh: Update its expected output.
+
+2014-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * Makefile.am (check_PROGRAMS): Add deleted and deleted-lib.so.
+ (TESTS, EXTRA_DIST): Add run-deleted.sh.
+ (deleted_LDADD, deleted_lib_so_LDFLAGS, deleted_lib_so_CFLAGS): New.
+ * deleted-lib.c: New file.
+ * deleted.c: New file.
+ * run-deleted.sh: New file.
+
+2014-06-15 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace.c (frame_callback): Error on seeing more than 16 frames.
+
+2014-06-13 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace.c (callback_verify): Accept "__libc_do_syscall" as first
+ frame symname.
+
+2014-06-13 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace-subr.sh (check_native_unsupported): New function.
+ (check_native): Call it.
+ (check_native_core): Likewise.
+ * run-backtrace-dwarf.sh: Likewise.
+
+2014-06-11 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace.c (main): Check that Dwfl was attached by calling
+ dwfl_pid and printing the error when it is not.
+
+2014-05-18 Mark Wielaard <mjw@redhat.com>
+
+ * testfile-backtrace-demangle.cc (cxxfunc): Make non-static.
+ (f): Likewise.
+ * testfile-backtrace-demangle.bz2: Regenerate.
+ * testfile-backtrace-demangle.core.bz2: Likewise.
+
+2014-05-02 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): run-readelf-dwz-multi.sh and
+ run-allfcts-multi.sh are now added unconditionally.
+
+2014-05-01 Mark Wielaard <mjw@redhat.com>
+
+ * run-readelf-dwz-multi.sh: Add tests with alt debug files in .dwz
+ subdir.
+
+2014-04-30 Mark Wielaard <mjw@redhat.com>
+
+ * buildid.c, buildid.sh, testfile42_noshdrs.bz2: New files.
+ * Makefile.am (check_PROGRAMS): Add buildid.
+ (TESTS): Add run-buildid.sh.
+ (EXTRA_DISTS): Add run-buildid.sh and testfile42_noshdrs.bz2.
+ (buildid_LDADD): New variable.
+
+2014-04-24 Florian Weimer <fweimer@redhat.com>
+
+ * allfcts.c (setup_alt): New function.
+ (main): Call it. Implementation additional error checking and
+ reporting.
+
+2014-04-24 Florian Weimer <fweimer@redhat.com>
+
+ * debugaltlink.c, run-debugaltlink.sh: New files.
+ * Makefile.am (check_PROGRAMS): Add debugaltlink.
+ (TESTS): Add run-debugaltlink.sh.
+ (debugaltlink_LDADD): New variable.
+
+2014-04-11 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (AM_CPPFLAGS): Add -I libdwelf.
+ (check_PROGRAMS): Add debuglink.
+ (TESTS): Add run-debuglink.sh
+ (EXTRA_DIST): Likewise.
+ (debuglink_LDADD): New.
+ * debuglink.c: New file.
+ * run-debuglink.sh: Likewise.
+
+2014-03-23 Mark Wielaard <mjw@redhat.com>
+
+ * run-nm-self.sh: Use test = not == for string comparisons.
+
+2014-04-22 Kurt Roeckx <kurt@roeckx.be>
+
+ * backtrace.c: Make Linux only.
+ * backtrace-child.c: Make Linux only.
+ * backtrace-data.c: Make Linux only.
+ * backtrace-dwarf.c: Make Linux only.
+ * backtrace-subr.sh: Skip core file unwinding tests when not supported.
+
+2014-03-14 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am: Remove MUDFLAP conditions. Remove libmudflap from all
+ LDADD lines.
+ * configure.ac: Remove MUDFLAP conditional.
+
+2014-04-09 Mark Wielaard <mjw@redhat.com>
+
+ * run-readelf-zdebug.sh: New test.
+ * testfile-debug.bz2: New testfile.
+ * testfile-zdebug.bz2: New testfile.
+ * Makefile.am (TESTS): Add run-readelf-zdebug.sh if ZLIB.
+ (EXTRA_DIST): Add run-readelf-zdebug.sh, testfile-debug.bz2 and
+ testfile-zdebug.bz2.
+
+2014-04-10 Mark Wielaard <mjw@redhat.com>
+
+ * testfile_i686_core.bz2: New test file.
+ * run-readelf-mixed-corenote.sh: Add testfile_i686_core test.
+ * Makefile.am (EXTRA_DIST): Add testfile_i686_core.bz2
+
+2014-04-09 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): Add run-backtrace-core-aarch64.sh.
+ (EXTRA_DIST): Add run-backtrace-core-aarch64.sh,
+ backtrace.aarch64.core.bz2 and backtrace.aarch64.exec.bz2.
+ * run-backtrace-core-aarch64.sh: New test.
+
+2014-03-11 Josh Stone <jistone@redhat.com>
+
+ * testfilebaxmin.bz2: New testfile.
+ * Makefile.am (EXTRA_DIST): Add testfilebaxmin.bz2.
+ * run-readelf-s.sh: Test testfilebaxmin.
+ * run-dwflsyms.sh: Likewise.
+
+2014-01-26 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace-subr.sh (check_unsupported): Special case arm*.
+
+2014-01-25 Mark Wielaard <mjw@redhat.com>
+
+ * run-addrcfi.sh (EM_ARM): Change reg13 (sp) from undefined to
+ location expression: call_frame_cfa stack_value.
+
+2014-01-22 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (line2addr_no_Wformat): Removed.
+
+2014-01-21 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): Add run-stack-i-test.sh.
+ (EXTRA_DIST): Likewise.
+ * run-stack-i-test.sh: New test.
+
+2014-01-20 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): Add run-stack-d-test.sh.
+ (EXTRA_DIST): Add run-stack-d-test.sh, testfiledwarfinlines.bz2
+ testfiledwarfinlines.core.bz2.
+ * run-stack-d-test.sh: New test.
+ * testfiledwarfinlines.bz2: New test file.
+ * testfiledwarfinlines.core.bz2: Likewise.
+
+2014-01-16 Mark Wielaard <mjw@redhat.com>
+
+ * run-nm-self.sh: Don't use testrun_on_self_quiet but just testrun
+ on one ET_REL, one ET_EXEC and one ET_DYN file.
+ * test-subr.sh (self_test_files): Add two ET_REL files, only add
+ two libebl ET_DYN backend files.
+
+2014-01-16 Mark Wielaard <mjw@redhat.com>
+
+ * run-backtrace-demangle.sh: Check exitcode and max number of frames.
+
+2014-01-18 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix false FAILs on testsuite with ulimit -c unlimited.
+ * backtrace-child.c (sigusr2): Call pthread_exit.
+ (main): Return, do not call abort.
+
+2014-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix corruption of non-C++ symbols by the demangler.
+ * Makefile.am (TESTS): Add run-backtrace-demangle.sh.
+ <!DEMANGLE>: Add ELFUTILS_DISABLE_DEMANGLE export.
+ (EXTRA_DIST): Add run-backtrace-demangle.sh,
+ testfile-backtrace-demangle.bz2, testfile-backtrace-demangle.cc,
+ testfile-backtrace-demangle.core.bz2.
+ * backtrace-demangle.cc: New file.
+ * run-backtrace-demangle.sh: New file.
+ * testfile-backtrace-demangle.bz2: New file.
+ * testfile-backtrace-demangle.cc: New file.
+ * testfile-backtrace-demangle.core.bz2: New file.
+
+2014-01-07 Matthias Klose <doko@ubuntu.com>
+
+ * backtrace-subr.sh (check_native_core): Check to see if core file
+ was created without ".PID" extension, if so mv core to core.PID.
+ Skip test if no core file was created or could be found.
+
+2014-01-04 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace-data.c (main): Don't assert if raise returns.
+ * backtrace-dwarf.c (report_pid): Call dwfl_linux_proc_attach with
+ assume_ptrace_attached true.
+ (ptrace_detach_stopped): Removed function.
+ (main): Don't call ptrace_detach_stopped.
+ * backtrace.c (ptrace_detach_stopped): Removed function.
+ (report_pid): Call dwfl_linux_proc_attach with assume_ptrace_attached
+ true.
+ (exec_dump): Don't call ptrace_detach_stopped.
+
+2014-01-04 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace-subr.sh (check_native_core): Skip, exit 77, the test
+ if we cannot adjust core ulimit.
+
+2014-01-04 Mark Wielaard <mjw@redhat.com>
+
+ * cleanup-13.c (force_unwind_stop): Removed.
+ (force_unwind): Just call abort. Don't setup _Unwind_Exception and
+ don't call _Unwind_ForcedUnwind.
+
+2014-01-03 Mark Wielaard <mjw@redhat.com>
+
+ * run-addrcfi.sh: Add case for EM_AARCH64.
+ * testfileaarch64.bz2: New testfile.
+ * Makefile.am (EXTRA_DIST): Add testfilesaarch64.bz2.
+
+2013-12-30 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace-dwarf.c (report_pid): Explicitly call
+ dwfl_linux_proc_attach and check for errors.
+ * backtrace.c (report_pid): Likewise.
+
+2013-12-21 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace.c (callback_verify): Only assert that case 5 is the last
+ instruction of backtracegen on x86_64 native.
+
+2013-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add testfile66.bz2, testfile66.core.bz2
+ and testfilebaz*ppc64*.bz2 files.
+ * dwflsyms.c (list_syms): Remove unused from parameter mod_name. Print
+ error on dwfl_module_getsymtab error.
+ (list_syms): Use dwfl_module_getsym and dwfl_module_getsym_info.
+ Compare values for non-ET_REL. Use dwfl_module_addrinfo.
+ Also print section of actual value if different from sym.
+ * run-addrname-test.sh (testfile66, testfile66.core): New tests.
+ Test addr2line -x by showing different sections for address and
+ found name in testfile66.
+ * run-dwflsyms.sh (testfile66, testfile66.core, hello_ppc64.ko,
+ testfilebaz*ppc64): New tests.
+ * testfile66.bz2, testfile66.core.bz2, testfilebazdbgppc64.bz2,
+ testfilebazdbgppc64.debug.bz2, testfilebazdbgppc64_pl.bz2,
+ testfilebazdbgppc64_plr.bz2, testfilebazdynppc64.bz2,
+ testfilebazmdbppc64.bz2, testfilebazminppc64.bz2,
+ testfilebazminppc64_pl.bz2, testfilebazminppc64_plr.bz2,
+ testfilebaztabppc64.bz2: New test files.
+
+2013-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ unwinder: s390 and s390x
+ * Makefile.am (TESTS): Add run-backtrace-core-s390x.sh and
+ run-backtrace-core-s390.sh.
+ (EXTRA_DIST): Add backtrace.s390x.core.bz2, backtrace.s390x.exec.bz2,
+ backtrace.s390.core.bz2, backtrace.s390.exec.bz2,
+ run-backtrace-core-s390x.sh and run-backtrace-core-s390.sh.
+ * backtrace.s390.core.bz2: New file.
+ * backtrace.s390.exec.bz2: New file.
+ * backtrace.s390x.core.bz2: New file.
+ * backtrace.s390x.exec.bz2: New file.
+ * run-backtrace-core-s390.sh: New file.
+ * run-backtrace-core-s390x.sh: New file.
+
+2013-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * backtrace-dwarf.c (executable, find_elf, dwfl_offline): Remove unused
+ code.
+
+2013-12-15 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ unwinder: ppc
+ * Makefile.am (TESTS): Add run-backtrace-core-ppc.sh.
+ (EXTRA_DIST): Add backtrace.ppc.core.bz2,
+ backtrace.ppc.exec.bz2 and run-backtrace-core-ppc.sh.
+ * backtrace.ppc.core.bz2: New file.
+ * backtrace.ppc.exec.bz2: New file.
+ * run-backtrace-core-ppc.sh: New file.
+
+2013-12-10 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (backtrace_child_biarch_SOURCES): New backtrace-child.c.
+
+2013-12-10 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (valgrind_cmd): Remove --trace-children=yes.
+ * backtrace-subr.sh (check_native_core): Disable valgrind while
+ dumping core.
+ * run-backtrace-data.sh: Disable valgrind.
+ * run-backtrace-dwarf.sh: Likewise.
+
+2013-12-09 Mark Wielaard <mjw@redhat.com>
+
+ * varlocs.c (print_expr): Update comment to explain empty location
+ associated with DW_OP_GNU_implicit_pointer.
+
+2013-12-05 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix test FAIL with -O2.
+ * backtrace-child.c (sigusr2): Add NOINLINE_NOCLONE and final asm stub.
+
+2013-12-05 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace-data.c (main): If unsupported also print to stderr.
+ * run-backtrace-dwarf.sh: Add check_unsupported and check_main.
+
+2013-12-04 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (backtrace-child-biarch): Add $(EXEEXT).
+
+2013-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * Makefile.am (check_PROGRAMS): Add backtrace, backtrace-child,
+ backtrace-data and backtrace-dwarf.
+ (BUILT_SOURCES, clean-local, backtrace-child-biarch): New.
+ (TESTS): Add run-backtrace-native.sh, run-backtrace-data.sh,
+ run-backtrace-dwarf.sh, run-backtrace-native-biarch.sh,
+ run-backtrace-native-core.sh, run-backtrace-native-core-biarch.sh,
+ run-backtrace-core-x86_64.sh and run-backtrace-core-i386.sh.
+ <!BIARCH> Add export of ELFUTILS_DISABLE_BIARCH.
+ (EXTRA_DIST): Add run-backtrace-data.sh, run-backtrace-dwarf.sh,
+ cleanup-13.c, run-backtrace-native.sh, run-backtrace-native-biarch.sh,
+ run-backtrace-native-core.sh, run-backtrace-native-core-biarch.sh,
+ run-backtrace-core-x86_64.sh, run-backtrace-core-i386.sh,
+ backtrace-subr.sh, backtrace.i386.core.bz2, backtrace.i386.exec.bz2,
+ backtrace.x86_64.core.bz2, backtrace.x86_64.exec.bz2.
+ (backtrace_LDADD, backtrace_child_CFLAGS, backtrace_child_LDFLAGS)
+ (backtrace_data_LDADD, backtrace_dwarf_CFLAGS, backtrace_dwarf_LDADD):
+ New.
+ * backtrace-child.c: New file.
+ * backtrace-data.c: New file.
+ * backtrace-dwarf.c: New file.
+ * backtrace-subr.sh: New file.
+ * backtrace.c: New file.
+ * cleanup-13.c: New file.
+ * backtrace.i386.core.bz2: New file.
+ * backtrace.i386.exec.bz2: New file.
+ * backtrace.x86_64.core.bz2: New file.
+ * backtrace.x86_64.exec.bz2: New file.
+ * run-backtrace-core-i386.sh: New file.
+ * run-backtrace-core-x86_64.sh: New file.
+ * run-backtrace-native-biarch.sh: New file.
+ * run-backtrace-native-core-biarch.sh: New file.
+ * run-backtrace-native-core.sh: New file.
+ * run-backtrace-native.sh: New file.
+ * run-backtrace-data.sh: New file.
+ * run-backtrace-dwarf.sh: New file.
+
+2013-11-27 Mark Wielaard <mjw@redhat.com>
+
+ * dwflsyms.c (gelf_bind_order): New function.
+ (elf_section_name): Likewise.
+ (addr_in_section): Likewise.
+ (list_syms): Use dwfl_module_getsym_elf and dwfl_module_addrsym_elf.
+ Refine assert using gelf_bind_order. Print elf_section_name. Check
+ bias with addr_in_section.
+ * run-dwflsyms.sh: Add section names to expected output.
+
+2013-11-26 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add run-funcretval.sh.
+
+2013-11-25 Petr Machata <pmachata@redhat.com>
+
+ * testfile_aarch64_core.bz2, hello_aarch64.ko.bz2: New files.
+ * funcretval_test.c, funcretval_test_aarch64.bz2: Likewise.
+ * Makefile.am (EXTRA_DIST): Add these.
+ (TESTS): Add run-funcretval.sh.
+ * run-allregs.sh: Use testfile_aarch64_core.bz2 for a regs_test.
+ * run-readelf-mixed-corenote.sh: ... and for a readelf -n test.
+ * run-strip-reloc.sh: Add a test on hello_aarch64.ko.bz2.
+ * run-funcretval.sh: New file.
+
+2013-11-18 Josh Stone <jistone@redhat.com>
+
+ * testfilebazdbg_plr.bz2: New testfile.
+ * testfilebazmin_plr.bz2: Likewise.
+ * Makefile.am (EXTRA_DIST): Add the above files.
+ * run-dwflsyms.sh: Add prelink -r tests.
+
+2013-11-15 Mark Wielaard <mjw@redhat.com>
+
+ * testfilebazmdb.bz2: Regenerated.
+ * testfilebazmin.bz2: Likewise.
+ * testfilebazdbg_pl.bz2: New testfile.
+ * testfilebazmin_pl.bz2: Likewise.
+ * Makefile.am (EXTRA_DIST): Add testfilebazdbg_pl.bz2 and
+ testfilebazmin_pl.bz2.
+ * dwflsyms.c (list_syms): Call dwfl_module_relocate_address and
+ print relative address of function symbols.
+ * run-dwflsyms.sh: Add prelink tests and adjust expected output.
+
+2013-11-01 Michael Forney <mforney@mforney.org>
+
+ * Makefile.am (TESTS_ENVIRONMENT): Use and export NM.
+ * run-arsymtest.sh: Use NM.
+
+2013-11-05 Mark Wielaard <mjw@redhat.com>
+
+ * allfcts.c (main): Correct dwarf_getfuncs return value check.
+
+2013-10-10 Mark Wielaard <mjw@redhat.com>
+ Josh Stone <jistone@redhat.com>
+
+ * run-allfcts-multi.sh: New test.
+ * test-offset-loop.bz2: New testfile.
+ * test-offset-loop.alt.bz2: New testfile.
+ * Makefile.am (TESTS): Add run-allcft-multi.sh if ENABLE_DWZ.
+ (EXTRA_DIST): Add run-allfcts-multi.sh, test-offset-loop.bz2 and
+ test-offset-loop.alt.bz2.
+
+2013-10-15 Mark Wielaard <mjw@redhat.com>
+
+ * run-unstrip-M.sh: New test.
+ * Makefile.am (TESTS): Add run-unstrip-M.sh.
+ (EXTRA_DIST): Likewise.
+
+2013-10-06 Mark Wielaard <mjw@redhat.com>
+
+ * run-addrcfi.sh: Remove nop from expected ppc and ppc64
+ location expression.
+
+2013-10-03 Josh Stone <jistone@redhat.com>
+
+ * typeiter2.c: New file, reversing typeiter.c.
+ * run-typeiter.sh: Also run typeiter2.
+ * Makefile.am (check_PROGRAMS): Add typeiter2.
+ (typeiter2_LDADD): New variable.
+
+2013-09-26 Petr Machata <pmachata@redhat.com>
+
+ * run-readelf-mixed-corenote.sh: Update output of testfile71
+ dump--readelf can newly decode the NT_FILE note.
+
+2013-09-26 Petr Machata <pmachata@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add testfile71.bz2.
+ * run-readelf-mixed-corenote.sh: New test for this file.
+ * testfile71.bz2: New file.
+
+2013-09-20 Mark Wielaard <mjw@redhat.com>
+
+ * allfcts.c (cb): Return DWARF_CB_ABORT.
+ (main): Iterate over all offsets returned by dwarf_getfuncs.
+ * run-allfcts.sh: Add nested_funcs and class_func testcases.
+ * testfile_nested_funcs.bz2: New test file.
+ * testfile_class_func.bz2: Likewise.
+ * Makefile.am (EXTRA_DIST): Add testfile_class_func.bz2 and
+ testfile_nested_funcs.bz2.
+
+2013-08-30 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (check_PROGRAMS): Add varlocs.
+ (TESTS): Add run-varlocs.sh.
+ (EXTRA_DIST): Add run-varlocs.sh, testfile_const_type.c,
+ testfile_const_type.bz2, testfile_implicit_pointer.c,
+ testfile_implicit_pointer.bz2, testfile_parameter_ref.c,
+ testfile_entry_value.c, testfile_entry_value.bz2,
+ testfile_implicit_value.c and testfile_implicit_value.bz2.
+ (varlocs_LDADD): New.
+ * run-varlocs: New test.
+ * testfile_const_type.c: New test source file.
+ * testfile_entry_value.c: Likewise.
+ * testfile_implicit_pointer.c: Likewise.
+ * testfile_implicit_value.c: Likewise.
+ * testfile_parameter_ref.c: Likewise.
+ * testfile_const_type.bz2: New test file.
+ * testfile_entry_value.bz2: Likewise.
+ * testfile_implicit_pointer.bz2: Likewise.
+ * testfile_implicit_value.bz2: Likewise.
+ * testfile_parameter_ref.bz2: Likewise.
+ * varlocs.c: New test source.
+
+2013-08-29 Mark Wielaard <mjw@redhat.com>
+
+ * run-addrcfi.sh: Add case for EM_ARM.
+ * testfilearm.bz2: New testfile.
+ * Makefile.am (EXTRA_DIST): Add testfilesarm.bz2.
+
+2013-08-28 Mark Wielaard <mjw@redhat.com>
+
+ * addrcfi.c (handle_cfi): Handle .debug_frame or .eh_frame
+ completely missing.
+ * run-addrcfi.sh: Add case for EM_S390 ELFCLASS32 and ELFCLASS64.
+ * testfiles390.bz2: New testfile.
+ * testfiles390x.bz2: Likewise.
+ * Makefile.am (EXTRA_DIST): Add testfiles390.bz2 and
+ testfiles390x.bz2.
+
+2013-08-28 Mark Wielaard <mjw@redhat.com>
+
+ * addrcfi.c (handle_cfi): Use printf not error.
+ * run-addrcfi.sh: Add case for EM_PPC and EM_PPC64.
+ * testfileppc32.bz2: New testfile.
+ * testfileppc64.bz2: Likewise.
+ * Makefile.am (EXTRA_DIST): Add testfileppc32.bz2 and
+ testfileppc64.bz2.
+
+2013-08-27 Mark Wielaard <mjw@redhat.com>
+
+ * run-addrcfi.sh: New test.
+ * Makefile.am (TESTS): Add run-addrcfi.sh.
+ (EXTRA_DIST): Likewise.
+ * addrcfi.c (op_name): New function.
+ (print_detail): Call and print op_name. Check ops, not result
+ to check if this is "same value" or "undefined".
+ (handle_cfi): Make sure cfa_ops doesn't point to NULL.
+
+2013-08-13 Mark Wielaard <mjw@redhat.com>
+
+ * run-addr2line-i-test.sh: New test.
+ * testfile-inlines.bz2: New testfile.
+ * Makefile.am (EXTRA_DIST): Add run-addr2line-i-test.sh and
+ testfile-inlines.bz2.
+ (TESTS): Add run-addr2line-i-test.sh.
+
+2013-08-12 Mark Wielaard <mjw@redhat.com>
+
+ * run-addr2line-test.sh: New test.
+ * Makefile.am (EXTRA_DIST): Add run-addr2line-test.sh.
+ (TESTS): Likewise.
+
+2013-07-23 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * run-unstrip-n.sh (test-core.*): Ignore libc.so.6 entry and order of
+ the entries.
+
+2013-07-02 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Fix typo, forgot extension in
+ testfilenolines.bz2.
+
+2013-05-30 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add test-core-lib.so.bz2,
+ test-core.core.bz2 and test-core.exec.bz2.
+ * run-addrname-test.sh: New test for these files.
+ * run-unstrip-n.sh: Update expected output. New test for these files.
+ * test-core-lib.so.bz2: New file.
+ * test-core.core.bz2: New file.
+ * test-core.exec.bz2: New file.
+
+2013-05-03 Mark Wielaard <mjw@redhat.com>
+
+ * testfilenolines.bz2: New test file.
+ * Makefile.am (EXTRA_DIST): Add testfilenolines.bz2.
+ * run-get-lines.sh: Run testrun_compare on testfilenolines.
+
+2013-04-30 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * dwfl-report-elf-align.c: Use false add_p_vaddr for dwfl_report_elf.
+
+2013-04-29 Mark Wielaard <mjw@redhat.com>
+
+ * test-subr.sh: Don't use pushd, just cd into test-dir.
+ (exit_cleanup): Don't use popd, just cd .. to get out.
+
+2013-04-27 Mark Wielaard <mjw@redhat.com>
+
+ * test-subr.sh (exit_cleanup): New function.
+ (trap): Use exit_cleanup as argument.
+ * run-native-test.sh (native_exit): New function.
+ (trap): For EXIT (0) use native_exit as argument.
+
+2013-04-27 Mark Wielaard <mjw@redhat.com>
+
+ * update1.c (main): Use unique tempfile name and unlink file.
+ * update2.c (main): Likewise.
+ * update3.c (main): Likewise.
+ * update4.c (main): Use unique tempfile name.
+
+2013-04-27 Mark Wielaard <mjw@redhat.com>
+
+ * run-alldts.sh: Add testfile-alldts to tempfiles.
+ * run-elf_cntl_gelf_getshdr.sh: Add test_shdr.out to tempfiles.
+ * run-macro-test.sh: Add readelf.macros.out to tempfiles.
+ * run-strip-reloc.sh: Add readelf.out, readelf.out1, readelf.out2
+ and out.stripped1, out.debug1, out.stripped2, out.debug2 to tempfiles.
+
+2013-04-26 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (installed_TESTS_ENVIRONMENT): Export environment,
+ remove wrapper.
+ (TESTS_ENVIRONMENT): Likewise.
+ (installed_LOG_COMPILER): New variable defining wrapper.
+ (LOG_COMPILER): Likewise.
+ * run-*.sh: Fixup location of input and output files.
+ * test-subr.sh: Create test_dir, pushd to execute test in.
+ (trap): Remove test_dir.
+ (testfiles): Use abs_srcdir.
+ (installed_testrun): Match on abs_builddir or abs_top_builddir.
+ (self_test_files): Adjust path.
+
+2013-04-24 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
+
+2013-03-25 Mark Wielaard <mjw@redhat.com>
+
+ * run-readelf-aranges.sh: New test.
+ * testfilefoobarbaz.bz2: New test file.
+ * Makefile.am (TESTS): Add run-readelf-aranges.sh.
+ (EXTRA_DIST): Add run-readelf-aranges.sh and testfilefoobarbaz.bz2.
+
+2013-03-25 Mark Wielaard <mjw@redhat.com>
+
+ * run-readelf-dwz-multi.sh: Expect high_pc also as address.
+
+2013-03-20 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * Makefile.am (check_PROGRAMS): Add dwfl-report-elf-align.
+ (TESTS): Add run-dwfl-report-elf-align.sh.
+ (EXTRA_DIST): Add run-dwfl-report-elf-align.sh and
+ testfile-dwfl-report-elf-align-shlib.so.bz2 .
+ (dwfl_report_elf_align_LDADD): New.
+ * dwfl-report-elf-align.c: New file.
+ * run-dwfl-report-elf-align.sh: New file.
+ * testfile-dwfl-report-elf-align-shlib.so.bz2: New file.
+
+2013-03-12 Mark Wielaard <mjw@redhat.com>
+
+ * run-dwfllines.sh: New test.
+ * dwfllines.c: New test program.
+ * Makefile.am (TESTS): Add run-dwfllines.sh.
+ (EXTRA_DIST): Likewise.
+ (dwfllines_LDADD): New variable.
+
+2013-02-22 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): Remove run-readelf-s.sh and run-dwflsyms.sh.
+ (LZMA): Add run-readelf-s.sh and run-dwflsyms.sh to TESTS.
+
+2013-02-15 Mark Wielaard <mjw@redhat.com>
+
+ * testfile-dwzstr.bz2: New testfile.
+ * testfile-dwzstr.multi.bz2: Likewise.
+ * run-readelf-dwz-multi.sh: Add readelf testfile-dwzstr test.
+ * Makefile.am (EXTRA_DIST): Add testfile-dwzstr.bz2 and
+ testfile-dwzstr.multi.bz2.
+
+2013-01-30 Mark Wielaard <mjw@redhat.com>
+
+ * testfileloc.bz2: New testfile.
+ * run-readelf-loc.sh: New test.
+ * Makefile.am (TESTS): Add run-readelf-loc.sh.
+ (EXTRA_DIST): Add run-readelf-loc.sh and testfileloc.bz2.
+
+2013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * run-readelf-mixed-corenote.sh: New testcase for readelf -n of s390
+ and s390x core notes.
+ * testfile67.bz2: New file.
+ * testfile68.bz2: New file.
+ * Makefile.am (EXTRA_DIST): Add testfile67.bz2 and testfile68.bz2 .
+
+2013-01-23 Mark Wielaard <mjw@redhat.com>
+
+ * testfilebasmin.bz2: New testfile.
+ * Makefile.am (EXTRA_DIST): Add testfilebasmin.bz2.
+ * run-readelf-s.sh: Test testfilebasmin.
+ * run-dwflsyms.sh: Likewise.
+
+2013-01-16 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (check_PROGRAMS): Add dwflsyms.
+ (TESTS): Add run-readelf-s.sh and run-dwflsyms.sh.
+ (EXTRA_DIST): Add run-readelf-s.sh, testfilebazdbg.bz2,
+ testfilebazdyn.bz2, testfilebazmin.bz2, testfilebazdbg.debug.bz2,
+ testfilebazmdb.bz2, testfilebaztab.bz2 and run-dwflsyms.sh.
+ (dwflsyms_LDADD): New variable.
+
+2013-01-07 Roland McGrath <roland@hack.frob.com>
+
+ * run-prelink-addr-test.sh: Use ln -snf.
+
+2012-12-03 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (valgrind_cmd): Add --run-libc-freeres=no.
+
+2012-11-29 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * run-addrname-test.sh: New test for PIE relocation.
+ * testfile70.core.bz2: New file.
+ * testfile70.exec.bz2: New file.
+ * Makefile.am (EXTRA_DIST): Add testfile70.core.bz2 and
+ testfile70.exec.bz2 .
+
+2012-10-27 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add testfile64.bz2, testfile65.bz2,
+ testfile69.core.bz2 and testfile69.so.bz2 .
+
+2012-10-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * run-addrname-test.sh: New test for DSO with build-id bias.
+ * testfile69.core.bz2: New file.
+ * testfile69.so.bz2: New file.
+
+2012-10-10 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * run-addrname-test.sh: New test for core vDSO bias.
+ * testfile65.bz2: New file.
+
+2012-10-10 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * run-addrname-test.sh: New test for symbol preferences.
+ * testfile64.bz2: New file.
+
+2012-10-01 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS_ENVIRONMENT): Define valgrind_cmd if USE_VALGRIND.
+ * test-wrapper.sh: Export VALGRIND_CMD if available.
+ * test-subr.sh (built_testrun): Use VALGRIND_CMD to invoke test prog.
+ (installed_testrun): Likewise.
+
+2012-09-24 Petr Machata <pmachata@redhat.com>
+
+ * testfile63.bz2: New testfile.
+ * run-readelf-mixed-corenote.sh: New test.
+ * Makefile.am (TEST): Add run-readelf-mixed-corenote.sh.
+ (EXTRA_DIST): Add testfile63.bz2 and run-readelf-mixed-corenote.sh.
+
+2012-09-24 Petr Machata <pmachata@redhat.com>
+
+ * testfile62.bz2: New testfile.
+ * run-readelf-vmcoreinfo.sh: New test.
+ * Makefile.am (TEST): Add run-readelf-vmcoreinfo.sh.
+ (EXTRA_DIST): Add testfile62.bz2 and run-readelf-vmcoreinfo.sh.
+
+2012-09-18 Petr Machata <pmachata@redhat.com>
+
+ * testfile61.bz2: New testfile.
+ * run-allregs.sh: Run reg_test testfile61.
+ * Makefile.am (EXTRA_DIST): Add testfile61.bz2.
+
+2012-08-24 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add testfile60.bz2.
+
+2012-08-22 Jeff Kenton <jkenton@tilera.com>
+
+ * testfile60.bz2: New testfile.
+ * run-allregs.sh: Run reg_test testfile60.
+
+2012-08-24 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): Only add run-readelf-dwz-multi.sh if
+ ENABLE_DWZ.
+
+2012-08-16 Mark Wielaard <mjw@redhat.com>
+
+ * allregs.c (dwarf_encoding_string): Rewritten using known-dwarf
+ macros.
+ * show-die-info.c (tagnames): Removed.
+ (attrs): Removed.
+ (dwarf_tag_string): New function using known-dwarf macros.
+ (dwarf_attr_string): Likewise.
+ (handle): Call dwarf_tag_string and dwarf_attr_string instead.
+ * run-readelf-dwz-multi.sh: Expect language C89, not ISO C89.
+
+2012-06-27 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): Add run-readelf-dwz-multi.sh.
+ (EXTRA_DIST): Add run-readelf-dwz-multi.sh,
+ libtestfile_multi_shared.so.bz2, testfile_multi.dwz.bz2 and
+ testfile_multi_main.bz2.
+ * run-readelf-dwz-multi.sh: New test.
+ * libtestfile_multi_shared.so.bz2: New testfile.
+ * testfile_multi.dwz.bz2: New testifle.
+ * testfile_multi_main.bz2: New testifle.
+
+2012-08-01 Petr Machata <pmachata@redhat.com>
+
+ * run-test-archive64.sh: New test.
+ * testarchive64.a.bz2: New testfile.
+ * Makefile.am (TESTS): Add run-test-archive64.sh.
+ (EXTRA_DIST): Likewise.
+
+2012-08-01 Mark Wielaard <mjw@redhat.com>
+
+ * run-nm-self.sh: New test.
+ * run-readelf-self.sh: Likewise.
+ * test-subr.sh (testrun_on_self_quiet): New function.
+ * Makefile.am (TESTS): Add run-nm-self.sh and run-readelf-self.sh.
+ (EXTRA_DIST): Likewise.
+
+2012-08-01 Mark Wielaard <mjw@redhat.com>
+
+ * test-subr.sh (self_test_files): New list of files.
+ (testrun_on_self): New function.
+ * run-elflint-self.sh: Use testrun_on_self.
+
+2012-07-19 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (check_PROGRAMS): Add test-elf_cntl_gelf_getshdr.
+ (TESTS): Add run-elf_cntl_gelf_getshdr.sh.
+ (EXTRA_DIST): Likewise.
+ (test_elf_cntl_gelf_getshdr_LDADD): New.
+ test-elf_cntl_gelf_getshdr.c: New test program.
+ run-elf_cntl_gelf_getshdr.sh: New test script.
+
+2012-07-19 Mark Wielaard <mjw@redhat.com>
+
+ * run-elflint-self.sh: runtests on ../backends/*so files.
+
+2012-07-19 Mark Wielaard <mjw@redhat.com>
+
+ * run-unstrip-n.sh: test_cleanup.
+ * Makefile.am (EXTRA_DIST): Add testcore-rtlib-ppc.bz2.
+
+2012-07-11 Mark Wielaard <mjw@redhat.com>
+
+ * run-readelf-macro.sh: New test.
+ * testfilemacro.bz2: New testfile.
+ * Makefile.am (TESTS): Add run-readelf-macro.sh.
+ (EXTRA_DIST): Add run-readelf-macro.sh and testfilemacro.bz2.
+
+2012-06-27 Mark Wielaard <mjw@redhat.com>
+
+ * run-readelf-gdb-index.sh: New test.
+ * testfilegdbindex5.bz2: New testfile.
+ * testfilegdbindex7.bz2: Likewise.
+ * Makefile.am (TESTS): Add run-readelf-gdb-index.sh.
+ (EXTRA_DIST): run-readelf-gdb_index.sh, testfilegdbindex5.bz2 and
+ testfilegdbindex7.bz2.
+
+2012-07-17 Mark Wielaard <mjw@redhat.com>
+
+ * testcore-rtlib-ppc.bz2: New testfile.
+ * run-unstrip-n.sh: Check new ppc core testfile.
+
+2012-06-26 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.am (check_PROGRAMS): Rename from noinst_PROGRAMS.
+
+2012-06-26 Mark Wielaard <mjw@redhat.com>
+
+ * run-macro-test.sh: New test.
+ * testfile-macinfo.bz2: New testfile.
+ * testfile-macros.bz2: Likewise.
+
+2012-05-07 Mark Wielaard <mjw@redhat.com>
+
+ * low_high_pc.c: Use proper inttypes in printf formats.
+
+2012-05-11 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS_ENVIRONMENT): Set LC_ALL and LANG to C.
+
+2012-05-07 Mark Wielaard <mjw@redhat.com>
+
+ * low_high_pc.c: Allow highpc == lowpc for CU DIEs for buggy GCC.
+
+2012-04-27 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): Add run-low_high_pc.sh
+ (EXTRA_DIST): Add run-low_high_pc.sh and testfile_low_high_pc.bz2
+ (noinst_PROGRAMS): Add low_high_pc.
+ (low_high_pc_LDADD): New variable.
+ * low_high_pc.c: New test.
+
+2012-04-26 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Remove run-show-ciefde.sh.
+ * run-show-ciefde.sh: Removed old libdwarf test.
+ * show-ciefde.c: Likewise.
+
+2012-04-02 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): Add run-unstrip-n.sh.
+ (EXTRA_DIST): Add testcore-rtlib.bz2 and run-unstrip-n.sh.
+ * run-unstrip-n.sh: New test.
+ * testcore-rtlib.bz2: New testfile.
+
+2012-04-02 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): Add run-readelf-d.sh.
+ (EXTRA_DIST): Add testlib_dynseg.so.bz2 and run-readelf-d.sh.
+ * run-readelf-d.sh: New test.
+ * run-elflint-test.sh: Check new testfile.
+
+2012-03-21 Tom Tromey <tromey@redhat.com>
+
+ * typeiter.c: New file.
+ * run-typeiter.sh: New file.
+ * testfile59.bz2: New file.
+ * Makefile.am (noinst_PROGRAMS): Add typeiter.
+ (TESTS): Add run-typeiter.sh.
+ (EXTRA_DIST): Add run-typeiter.sh, testfile59.bz2.
+ (typeiter_LDADD): New variable.
+
+2012-02-21 Kurt Roeckx <kurt@roeckx.be>
+
+ * run-alldts.sh: testrun ./alldts.
+
+2012-02-21 Roland McGrath <roland@hack.frob.com>
+
+ * test-wrapper.sh: Add ${libdir}/elfutils to LD_LIBRARY_PATH.
+ * test-subr.sh (installed_testrun): Likewise.
+
+2012-01-18 Roland McGrath <roland@hack.frob.com>
+
+ * asm-tst4.c (main): Don't set LD_LIBRARY_PATH in system invocation;
+ it will have been inherited correctly from the test harness.
+ * asm-tst5.c (main): Likewise.
+ * asm-tst6.c (main): Likewise.
+ Reported by Serge Pavlov <serge.pavlov.at.gnu@gmail.com>.
+
+2011-07-09 Roland McGrath <roland@hack.frob.com>
+
+ * sha1-tst.c: File removed.
+ * Makefile.am (noinst_PROGRAMS, TESTS): Remove it.
+ (sha1_tst_LDADD): Variable removed.
+
+ * md5-sha1-test.c: New file.
+ * Makefile.am [!STANDALONE] (noinst_PROGRAMS, TESTS): Add it.
+ (md5_sha1_test_LDADD): New variable.
+
+2011-05-30 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add run-readelf-twofiles.sh and
+ run-rerequest_tag.sh
+
+2011-05-24 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add hello_s390.ko.bz2.
+ * run-strip-reloc.sh: Add hello_s390.ko testcase.
+ * hello_s390.ko.bz2: New test file.
+
+2011-05-23 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (TESTS): Add run-strip-reloc.sh.
+ (EXTRA_DIST): Add run-strip-reloc.sh, hello_i386.ko.bz2
+ hello_x86_64.ko.bz2 and hello_ppc64.ko.bz2
+ * run-strip-reloc.sh: New test.
+ * hello_i386.ko.bz2: New test file.
+ * hello_x86_64.ko.bz2: Likewise.
+ * hello_ppc64.ko.bz2: Likewise.
+
+2011-05-18 Mark Wielaard <mjw@redhat.com>
+
+ * run-strip-groups.sh: New test.
+ * testfile58.bz2: New test file.
+ * Makefile.am (EXTRA_DIST): Add testfile58.bz2.
+ (TESTS): Add run-strip-groups.sh.
+ (EXTRA_DIST): Likewise.
+
+2011-03-28 Marek Polacek <mpolacek@redhat.com>
+
+ * alldts.c: New file.
+ * run-alldts.sh: Use it.
+ * Makefile.am (TESTS, EXTRA_DIST, noinst_PROGRAMS): Add them.
+ (alldts_LDADD): New variable.
+
+2011-03-02 Marek Polacek <mpolacek@redhat.com>
+
+ * dwarf-getstring.c: New test.
+ * run-dwarf-getstring.sh: And its wrapper.
+ * Makefile.am (EXTRA_DIST): Add and update all.
+
+2011-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * Makefile.am (TESTS): Add run-readelf-twofiles.sh.
+ * run-readelf-twofiles.sh: New file.
+
+2011-02-25 Mark Wielaard <mjw@redhat.com>
+
+ * Makefile.am (BUILD_RPATH): Be consistent in naming.
+
+2011-02-02 Josh Stone <jistone@redhat.com>
+
+ * run-prelink-addr-test.sh: Add testfile55, 32 and 64-bit.
+ * testfile55-64.bz2, testfile55-64.debug.bz2,
+ testfile55-64.prelink.bz2, testfile55-32.bz2,
+ testfile55-32.debug.bz2, testfile55-32.prelink.bz2: New.
+ * Makefile.am (EXTRA_DIST): Add and update all.
+
+2011-01-12 Roland McGrath <roland@redhat.com>
+
+ * run-prelink-addr-test.sh: Make symlinks to find .debug files
+ corresponding to .noshdrs files.
+
+2011-01-11 Josh Stone <jistone@redhat.com>
+
+ * run-prelink-addr-test.sh: Add testfile54, 32 and 64-bit.
+ * testfile54-32.so.bz2, testfile54-32.so.debug.bz2,
+ testfile54-32.prelink.so.bz2, testfile54-32.noshdrs.so.bz2,
+ testfile54-64.so.bz2, testfile54-64.so.debug.bz2,
+ testfile54-64.prelink.so.bz2, testfile54-64.noshdrs.so.bz2: New.
+ * Makefile.am (EXTRA_DIST): Add and update all.
+
+ * run-prelink-addr-test.sh: Run 32 and 64-bit testfile53 tests.
+ * testfile53.bz2, testfile53.debug.bz2,
+ testfile53.prelink.bz2: Deleted, so...
+ * testfile53-64.bz2, testfile53-64.debug.bz2,
+ testfile53-64.prelink.bz2: Recreated with 64-bit names.
+ * testfile53-32.bz2, testfile53-32.debug.bz2,
+ testfile53-32.prelink.bz2: New in 32-bit.
+ * Makefile.am (EXTRA_DIST): Add and update all.
+
+ * run-prelink-addr-test.sh: Run 32 and 64-bit testfile52 tests.
+ * testfile52.so.bz2, testfile52.so.debug.bz2,
+ testfile52.prelink.so.bz2: Deleted, so...
+ * testfile52-32.so.bz2, testfile52-32.so.debug.bz2,
+ testfile52-32.prelink.so.bz2: Recreated with 32-bit names.
+ * testfile52-32.noshdrs.so.bz2: New data file, stripped of headers.
+ * testfile52-64.so.bz2, testfile52-64.so.debug.bz2,
+ testfile52-64.prelink.so.bz2, testfile52-64.noshdrs.so.bz2: New files.
+ * Makefile.am (EXTRA_DIST): Add and update all.
+
+2011-01-10 Josh Stone <jistone@redhat.com>
+
+ * run-prelink-addr-test.sh: New test for prelinked addrs.
+ * Makefile.am (TESTS, EXTRA_DIST): Add it.
+ * testfile52.so.bz2, testfile52.so.debug.bz2: New data files.
+ * testfile52.prelink.so.bz2: New data file, shows REL->RELA.
+ * testfile53.bz2, testfile53.debug.bz2: New data files.
+ * testfile53.prelink.bz2: New data file, shows ET_EXEC remap.
+ * Makefile.am (EXTRA_DIST): Add them.
+
+2010-06-04 Roland McGrath <roland@redhat.com>
+
+ * run-unstrip-test.sh: Also test modifying the file in place.
+
+2010-04-22 Roland McGrath <roland@redhat.com>
+
+ * addrcfi.c (handle_cfi): Fix function name in error message.
+ Use dwarf_errmsg, not dwfl_errmsg, after dwarf_cfi_addrframe.
+
+2010-04-14 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add run-test-flag-nobits.sh here too.
+
+2010-04-10 Ulrich Drepper <drepper@redhat.com>
+
+ * msg_tst.c: Adjust expected error message.
+
+2010-04-01 Petr Machata <pmachata@redhat.com>
+
+ * test-flag-nobits.c: New test.
+ * run-test-flag-nobits.sh: And its wrapper.
+ * Makefile.am (noinst_PROGRAMS, TESTS): Add them.
+ (test_flag_nobits_LDADD): New variable.
+
+2010-02-15 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am: Use config/eu.am for common stuff.
+
+ * asm-tst9.c (main): Rename local to avoid shadowing another local.
+
+2009-07-22 Roland McGrath <roland@redhat.com>
+
+ * addrcfi.c: Update dwarf_frame_{cfa,register} calling convention.
+
+2009-07-08 Roland McGrath <roland@redhat.com>
+
+ * addrcfi.c: New file.
+ * Makefile.am (noinst_PROGRAMS): Add it.
+ (addrcfi_LDADD): New variable.
+
+2009-05-07 Petr Machata <pmachata@redhat.com>
+
+ * testfile51.bz2: New data file.
+ * dwarf-getmacros.c: New test core.
+ * run-dwarf-getmacros.sh: New test wrapper.
+ * Makefile.am (TESTS, EXTRA_DIST, noinst_PROGRAMS): Add them.
+ (dwarf_getmacros_LDADD): New variable.
+
+2009-04-23 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).
+ (rdwrmmap_LDADD): Add $(libmudflap).
+
+2009-04-21 Roland McGrath <roland@redhat.com>
+
+ * testfile50.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add it.
+ * run-dwfl-addr-sect.sh: Add a case using it.
+
+2008-12-31 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: Add tests for dppd, dpps, insertps, movntdqa,
+ mpsadbw, packusdw, pblendvb, pblendw, pcmpeqq, pcmpestri, pcmpestrm,
+ pcmpistri, pcmpistrm, pcmpgtq, phminposuw, pinsrb, pinsrd, pmaxsb,
+ pmaxsd, pmaxud, pmaxuw, pminsb, pminsd, pminud, pminuw, pmovsxbw,
+ pmovsxbd, pmovsxbq, pmovsxwd, pmovsxwq, pmovsxdq, pmovsxbw, pmovsxbd,
+ pmovsxbq, pmovsxwd, pmovsxwq, pmovsxdq, pmuldq, pmulld, popcnt, ptest,
+ roundss, roundps, roundpd, and roundsd.
+ * testfile45.S.bz2: Likewise.
+ * testfile44.expect.bz2: Adjust accordingly.
+ * testfile45.expect.bz2: Likewise.
+
+ * testfile44.S.bz2: Add tests for blendvpd and blendvps.
+ * testfile45.S.bz2: Likewise.
+ * testfile44.expect.bz2: Adjust accordingly.
+ * testfile45.expect.bz2: Likewise.
+
+2008-12-30 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: Add tests for blendpd and blendps.
+ * testfile45.S.bz2: Likewise.
+ * testfile44.expect.bz2: Adjust accordingly.
+ * testfile45.expect.bz2: Likewise.
+
+2008-12-19 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: Add tests for AMD 3DNOW.
+ * testfile45.S.bz2: Likewise.
+ * testfile44.expect.bz2: Adjust accordingly.
+ * testfile45.expect.bz2: Likewise.
+
+2008-11-26 Roland McGrath <roland@redhat.com>
+
+ * dwfl-bug-getmodules.c: New file.
+ * Makefile.am (noinst_PROGRAMS): Add it.
+ (dwfl_bug_getmodules_LDADD): New variable.
+
+2008-09-10 Roland McGrath <roland@redhat.com>
+
+ * test-subr.sh (LC_ALL): Export it set to "C".
+ * run-dwfl-addr-sect.sh: Don't do it here.
+ * run-strings-test.sh: Likewise.
+
+2008-08-21 Denys Vlasenko <dvlasenk@redhat.com>
+
+ * run-addrname-test.sh: Add a new case.
+ * testfile49.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add it.
+
+2008-04-10 Roland McGrath <roland@redhat.com>
+
+ * testfile48.bz2, testfile48.bz2.debug: New data files.
+ * Makefile.am (EXTRA_DIST): Add them.
+ * run-strip-test8.sh: Use them.
+
+ * testfile16.bz2, testfile16.debug.bz2: Replace data files.
+
+ * run-strip-test.sh: Fail if stripped output has ".debug_*" sections.
+ * run-strip-test8.sh: New file.
+ * testfile47.bz2: New data file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add them.
+
+2008-03-31 Roland McGrath <roland@redhat.com>
+
+ * run-early-offscn.sh: New file.
+ * early-offscn.c: New file.
+ * Makefile.am (noinst_PROGRAMS, TESTS, EXTRA_DIST): Add them.
+ (early_offscn_LDADD): New variable.
+
+2008-03-19 Roland McGrath <roland@redhat.com>
+
+ * run-addrname-test.sh: Add a new case.
+
+2008-02-22 Roland McGrath <roland@redhat.com>
+
+ * run-elflint-test.sh: Typo fix.
+
+2008-02-21 Roland McGrath <roland@redhat.com>
+
+ * run-disasm-x86.sh: Use uname instead of arch, keep tools required
+ for the build down to minimum.
+ * run-disasm-x86-64.sh: Likewise.
+
+2008-02-20 Roland McGrath <roland@redhat.com>
+
+ * testfile46.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add it.
+ * run-elflint-test.sh: Test on it.
+
+2008-02-01 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Hook up sha1-tst.c.
+ * sha1-tst.c: New file.
+
+2008-01-21 Roland McGrath <roland@redhat.com>
+
+ * testfile45.S.bz2: Add tests for cltq, cqto.
+ * testfile45.expect.bz2: Adjust.
+
+2008-01-14 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile45.S.bz2: Add more tests.
+ * testfile45.expect.bz2: Adjust.
+
+2008-01-11 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile45.expect.bz2: Adjust for adding of address for %rip based
+ address mode.
+
+2008-01-10 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile45.S.bz2: Add more tests.
+ * testfile45.expect.bz2: Adjust.
+
+2008-01-08 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (TESTS): Add run-disasm-x86-64.sh.
+ (EXTRA): Add testfile45.S.bz2, testfile45.expect.bz2,
+ run-disasm-x86-64.sh.
+ * run-disasm-x86-64.sh: New file.
+ * testfile45.S.bz2: New file.
+ * testfile45.expect.bz2: New file.
+ * testfile44.S.bz2: New tests.
+ * testfile44.expect.bz2: Adjust.
+
+2008-01-04 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: New tests.
+ * testfile44.expect.bz2: Adjust.
+
+2008-01-04 Roland McGrath <roland@redhat.com>
+
+ * dwfl-bug-fd-leak.c (main): Add a cast.
+
+2008-01-03 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: New tests.
+ * testfile44.expect.bz2: Adjust.
+
+2008-01-01 Ulrich Drepper <drepper@redhat.com>
+
+ * line2addr.c: Use %m modifier instead of %a to appease gcc.
+
+2008-01-01 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: New tests.
+ * testfile44.expect.bz2: Adjust.
+
+2007-12-31 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: New tests.
+ * testfile44.expect.bz2: Adjust.
+
+2007-12-30 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: New tests.
+ * testfile44.expect.bz2: Adjust.
+
+2007-12-29 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.s.bz2: New tests.
+ * testfile44.expect.bz2: Adjust.
+
+2007-12-28 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: New tests.
+ * testfile44.expect.bz2: Adjust.
+
+2007-12-27 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: New tests.
+ * testfile44.expect.bz2: Adjust.
+
+2007-12-26 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: New tests.
+ * testfile44.expect.bz2: Adjust
+
+2007-12-21 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile44.S.bz2: More tests.
+ * testfile44.expect.bz2: Adjust appropriately.
+
+2007-12-19 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (TESTS): Add run-disasm.sh.
+ (EXTRA_DIST): Add run-disasm.sh, testfile44.S.bz2, and
+ testfile44.expect.bz2.
+ * run-disasm.sh: New file.
+ * testfile44.S.bz2: New file.
+ * testfile44.expect.bz2: New file.
+
+2007-12-15 Roland McGrath <roland@redhat.com>
+
+ * run-allregs.sh: Change expected output for powerpc spefscr.
+
+2007-10-20 Roland McGrath <roland@redhat.com>
+
+ * run-dwfl-addr-sect.sh: Change expected output, no errors.
+
+2007-10-19 Roland McGrath <roland@redhat.com>
+
+ * dwfl-addr-sect.c (handle_address): Return int.
+ Don't exit on error, just return nonzero.
+ (main): Collect results.
+ * run-dwfl-addr-sect.sh: New file.
+ * testfile43.bz2: New data file.
+ * Makefile.am (EXTRA_DIST, TESTS): Add them.
+
+2007-10-18 Roland McGrath <roland@redhat.com>
+
+ * run-allregs.sh: Update expected ppc output for vrsave/vscr.
+
+2007-10-16 Roland McGrath <roland@redhat.com>
+
+ * test-subr.sh (remove_files): Don't pass -Bb to diff.
+
+2007-10-09 Roland McGrath <roland@redhat.com>
+
+ * dwflmodtest.c (print_module): Don't use %p in output.
+ * run-dwfl-bug-offline-rel.sh: Updated expected output.
+
+2007-10-08 Roland McGrath <roland@redhat.com>
+
+ * testfile42.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add it.
+ * run-elflint-test.sh: New test on that file.
+
+2007-10-04 Roland McGrath <roland@redhat.com>
+
+ * run-readelf-test4.sh: New file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add it.
+
+2007-10-03 Roland McGrath <roland@redhat.com>
+
+ * run-readelf-test3.sh: New file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add it.
+
+2007-10-01 Roland McGrath <roland@redhat.com>
+
+ * run-readelf-test2.sh: New file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add it.
+
+2007-09-11 Roland McGrath <roland@redhat.com>
+
+ * run-addrname-test.sh: Add a new case.
+ * testfile41.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add it.
+
+2007-08-23 Roland McGrath <roland@redhat.com>
+
+ * run-allregs.sh: Update expected x86-64 output for %rflags.
+
+2007-08-12 Roland McGrath <roland@redhat.com>
+
+ * run-strip-test7.sh: New file.
+ * testfile39.bz2: New data file.
+ * testfile40.bz2: New data file.
+ * testfile40.debug.bz2: New data file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add them.
+
+2007-08-09 Roland McGrath <roland@redhat.com>
+
+ * dwfl-bug-report.c: Fix header inclusion.
+
+2007-08-08 Roland McGrath <roland@redhat.com>
+
+ * run-addrname-test.sh: Add a new case using addr2line -S.
+ * testfile38.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add it.
+
+2007-07-16 Roland McGrath <roland@redhat.com>
+
+ * dwfl-bug-report.c: New file.
+ * Makefile.am (noinst_PROGRAMS, TESTS): Add it.
+ (dwfl_bug_report_LDADD): New variable.
+
+2007-06-06 Roland McGrath <roland@redhat.com>
+
+ * run-unstrip-test.sh: Declare testfile.unstrip for removal.
+
+2007-06-05 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add missing line continuation and
+ testfile37.bz and testfile37.debug.bz2.
+
+2007-05-23 Roland McGrath <roland@redhat.com>
+
+ * run-allregs.sh: Update expected Alpha results.
+
+2007-05-18 Roland McGrath <roland@redhat.com>
+
+ * run-strip-test4.sh (stripped, debugfile): Use new reference files.
+ * testfile37.bz2: New data file.
+ * testfile37.debug.bz2: New data file.
+ * run-unstrip-test2.sh: New file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add them.
+
+2007-05-10 Roland McGrath <roland@redhat.com>
+
+ * run-dwfl-bug-offline-rel.sh: New file.
+ * testfile36.bz2: New data file.
+ * testfile36.debug.bz2: New data file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add them.
+
+2007-04-28 Roland McGrath <roland@redhat.com>
+
+ * run-strip-test6.sh (stripped, debugfile): Use new reference files.
+ * testfile35.bz2: New data file.
+ * testfile35.debug.bz2: New data file.
+ * run-unstrip-test.sh: New file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add them.
+
+ * run-strip-test.sh: Do all elflint and cmp runs even when some fail.
+
+2007-04-26 Roland McGrath <roland@redhat.com>
+
+ * run-elflint-self.sh: Run all tests even if one fails.
+
+ * run-allregs.sh: Add expected output for alpha.
+
+2007-04-24 Roland McGrath <roland@redhat.com>
+
+ * run-strip-test.sh: When we saved the debug info, test unstrip too.
+
+2007-04-22 Roland McGrath <roland@redhat.com>
+
+ * run-allregs.sh: Update expected register info.
+
+2007-04-16 Roland McGrath <roland@redhat.com>
+
+ * dwfl-addr-sect.c: New file.
+ * Makefile.am (noinst_PROGRAMS): Add it.
+ (dwfl_addr_sect_LDADD): New variable.
+
+2007-04-05 Roland McGrath <roland@redhat.com>
+
+ * get-files.c: Test dwarf_getsrcdirs.
+ * run-get-files.sh: Update expected output.
+
+2007-04-01 Roland McGrath <roland@redhat.com>
+
+ * run-allregs.sh: Updated expected output for x86_64.
+
+2007-03-04 Roland McGrath <roland@redhat.com>
+
+ * dwfl-bug-fd-leak.c: New file.
+ * Makefile.am (noinst_PROGRAMS, TESTS): Add it.
+ (dwfl_bug_fd_leak_LDADD): New variable.
+
+ * dwflmodtest.c: Test dwfl_getmodules before and after getdwarf,
+ show what files have been located.
+
+2007-02-02 Roland McGrath <roland@redhat.com>
+
+ * run-addrname-test.sh: New file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add it.
+ * testfile34.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add it.
+
+2007-01-20 Roland McGrath <roland@redhat.com>
+
+ * testfile33.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add it.
+ * run-elflint-test.sh: Test on it too.
+
+2007-01-18 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (CFLAGS): Don't molest it.
+
+2007-01-11 Roland McGrath <roland@redhat.com>
+
+ * testfile32.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add it.
+ * run-elflint-test.sh: Test on it too.
+
+2007-02-04 Ulrich Drepper <drepper@redhat.com>
+
+ * arls.c: New file.
+ * Makefile (noinst_PROGRAMS): Add arls.
+
+ * run-ranlib-test2.sh: Fix type in comment.
+
+2007-01-10 Ulrich Drepper <drepper@redhat.com>
+
+ * run-elflint-self.sh (runtest): Show which file has the problem.
+
+2007-01-10 Roland McGrath <roland@redhat.com>
+
+ * dwfl-bug-addr-overflow.c: New file.
+ * Makefile.am (TESTS): Add it.
+ (dwfl_bug_addr_overflow_LDADD): New variable.
+
+2006-12-17 Roland McGrath <roland@redhat.com>
+
+ * msg_tst.c (libelf_msgs): Fix ELF_E_INVALID_PHDR msg.
+
+2006-09-05 Roland McGrath <roland@redhat.com>
+
+ * run-strings-test.sh: Export LC_ALL=C for the test.
+
+2006-08-29 Roland McGrath <roland@redhat.com>
+
+ * run-arextract.sh: Use testrun, tempfiles functions from test-subr.sh.
+ * run-arsymtest.sh: Likewise.
+
+ * run-native-test.sh (native.c compilation): Add some braces.
+
+2006-08-22 Roland McGrath <roland@redhat.com>
+
+ * allregs.c (dwarf_encoding_string): New function, swiped from readelf.
+ (struct reginfo): New members bits, type.
+ (one_register, match_register): Update to take new args,
+ record and display new info.
+ (main): Display new info.
+ * run-allregs.sh: Update expected results.
+
+2006-08-03 Roland McGrath <roland@redhat.com>
+
+ * run-allregs.sh: Add sparc cases.
+ * testfile30.bz2: New data file.
+ * testfile31.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add them.
+
+2006-07-21 Roland McGrath <roland@redhat.com>
+
+ * allregs.c (struct reginfo): Increase size of name.
+ (one_register): Assert that it's big enough.
+
+2006-04-04 Roland McGrath <roland@redhat.com>
+
+ * run-bug1-test.sh: Test a second case, to cover both byte orders.
+ * testfile29.bz2: New file.
+ * testfile29.rdwr.bz2: New file.
+ * Makefile.am (EXTRA_DIST): Add them.
+
+2006-04-04 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Add rules to run run-bug1-test.sh.
+ * rdwrmmap.c: New file.
+ * run-bug1-test.sh: New file.
+ * testfile28.bz2: New file.
+ * testfile28.rdwr.bz2: New file.
+
+2006-03-09 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (AM_LDFLAGS): Define to pass -rpath-link.
+
+2006-03-01 Roland McGrath <roland@redhat.com>
+
+ * show-die-info.c (tagnames, attrs): Update name tables for dwarf.h
+ changes matching 3.0 spec.
+
+2006-01-13 Roland McGrath <roland@redhat.com>
+
+ * run-native-test.sh: Do kill -9 and reap explicitly at end, since
+ bash 3.1 whines when it's done in the trap 0 handler.
+
+2006-01-11 Roland McGrath <roland@redhat.com>
+
+ * testfile26.bz2: New data file.
+ * testfile27.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add them.
+ * run-allregs.sh: Test s390 data.
+
+2005-12-14 Roland McGrath <roland@redhat.com>
+
+ * run-native-test.sh: Redirect output from native test process.
+
+2005-12-13 Roland McGrath <roland@redhat.com>
+
+ * allregs.c (main): Fail if we find no registers.
+
+ * run-native-test.sh: New file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add it.
+
+2005-12-10 Ulrich Drepper <drepper@redhat.com
+
+ * run-readelf-test1.sh: New file.
+ * Makefile.am (TESTS): Add run-readelf-test1.sh.
+ (EXTRA_DIST): Likewise.
+
+2005-12-07 Roland McGrath <roland@redhat.com>
+
+ * ecp.c (main): Use elf_end to clean up.
+
+2005-11-25 Roland McGrath <roland@redhat.com>
+
+ * coverage.sh: Given -v argument, print names of unused files.
+
+ * addrscopes.c (main): Use dwfl_end before return.
+ * allregs.c (main): Likewise.
+ * find-prologues.c (main): Likewise.
+ * funcretval.c (main): Likewise.
+ * funcscopes.c (main): Likewise.
+ * line2addr.c (main): Likewise.
+
+ * run-allregs.sh: New file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add it.
+
+ * allregs.c: Use libdwfl wrapper instead of direct libebl calls.
+ * Makefile.am (allregs_LDADD): Updated.
+
+ * allregs.c: New file.
+ * Makefile.am (noinst_PROGRAMS): Add it.
+ (allregs_LDADD): New variable.
+
+2005-11-18 Roland McGrath <roland@redhat.com>
+
+ * test-subr.sh (installed_testrun): Treat /usr/lib64 like /usr/lib.
+ * test-wrapper.sh: Likewise.
+
+2005-11-17 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (installed_TESTS_ENVIRONMENT): Set libdir, bindir in
+ environment for test-wrapper.sh.
+ * test-wrapper.sh: Set LD_LIBRARY_PATH from ${libdir} if not /usr/lib.
+ * test-subr.sh (installed_testrun): Likewise.
+ Use explicit path in ${bindir}.
+
+ * Makefile.am (installcheck-local): Fix typo in last change.
+
+2005-11-16 Roland McGrath <roland@redhat.com>
+
+ * configure.ac: New file, for standalone build/dist of test suite.
+ * Makefile.am [!STANDALONE] (INCLUDES): Don't define it.
+ (asm_TESTS): New variable, broken out of ...
+ (TESTS): ... here. Also remove msg_tst.
+ [!STANDALONE] (TESTS, noinst_PROGRAMS): Add in $(asm_TESTS), msg_tst.
+ (installed_TESTS_ENVIRONMENT): New variable.
+ [STANDALONE] (TESTS_ENVIRONMENT): Use that.
+ [!STANDALONE] (installcheck-local): Likewise.
+ [STANDALONE] (libdw, libelf, libasm, libebl): Define using -lfoo.
+ * addrscopes.c: Include <config.h>.
+ Use ELFUTILS_HEADER macro in #include of installed elfutils/ headers.
+ * allfcts.c: Likewise.
+ * asm-tst1.c: Likewise.
+ * asm-tst2.c: Likewise.
+ * asm-tst3.c: Likewise.
+ * asm-tst4.c: Likewise.
+ * asm-tst5.c: Likewise.
+ * asm-tst6.c: Likewise.
+ * asm-tst7.c: Likewise.
+ * asm-tst8.c: Likewise.
+ * asm-tst9.c: Likewise.
+ * dwflmodtest.c: Likewise.
+ * find-prologues.c: Likewise.
+ * funcscopes.c: Likewise.
+ * get-aranges.c: Likewise.
+ * get-files.c: Likewise.
+ * get-lines.c: Likewise.
+ * get-pubnames.c: Likewise.
+ * line2addr.c: Likewise.
+ * newscn.c: Likewise.
+ * show-abbrev.c: Likewise.
+ * show-die-info.c: Likewise.
+ * update3.c: Likewise.
+ * update4.c: Likewise.
+ * funcretval.c: Likewise.
+
+ * dwflmodtest.c (print_instance): Don't use INTUSE.
+ (options): Don't use N_ macro.
+
+2005-11-15 Roland McGrath <roland@redhat.com>
+
+ * coverage.sh: Look in backends.
+ * Makefile.am (BUILD_RPATH): Search ../backends, not ../libebl.
+ (TESTS_ENVIRONMENT): Likewise.
+
+ * funcretval.c (handle_function): Don't take DW_AT_type of FUNCDIE,
+ pass FUNCDIE direclty to dwfl_module_return_value_location.
+
+ * Makefile.am (BUILD_RPATH): New variable.
+ [TESTS_RPATH] (AM_LDFLAGS): Pass -rpath option using that value.
+ (tests_rpath): New variable.
+ (installcheck-local): Pass it to test-wrapper.sh.
+ * test-wrapper.sh: In "installed" format, take yes/no value
+ for elfutils_tests_rpath, which export. When running a test
+ binary for installcheck, exit 77.
+ * test-subr.sh (installed_testrun): When running a test binary
+ for installcheck, exit 77 if $elfutils_tests_rpath = yes.
+
+2005-11-14 Roland McGrath <roland@redhat.com>
+
+ * test-subr.sh: New file.
+ * test-wrapper.sh: New file.
+ * Makefile.am (EXTRA_DIST): Add them.
+ (AM_LDFLAGS): Variable removed.
+ (TESTS_ENVIRONMENT): New variable.
+ (installcheck-local): New target.
+ * run-addrscopes.sh: Use test-subr.sh.
+ * run-allfcts.sh: Likewise.
+ * run-ecp-test.sh: Likewise.
+ * run-ecp-test2.sh: Likewise.
+ * run-elflint-self.sh: Likewise.
+ * run-elflint-test.sh: Likewise.
+ * run-find-prologues.sh: Likewise.
+ * run-funcscopes.sh: Likewise.
+ * run-get-aranges.sh: Likewise.
+ * run-get-files.sh: Likewise.
+ * run-get-lines.sh: Likewise.
+ * run-get-pubnames.sh: Likewise.
+ * run-line2addr.sh: Likewise.
+ * run-ranlib-test.sh: Likewise.
+ * run-ranlib-test2.sh: Likewise.
+ * run-show-abbrev.sh: Likewise.
+ * run-show-ciefde.sh: Likewise.
+ * run-show-die-info.sh: Likewise.
+ * run-strings-test.sh: Likewise.
+ * run-strip-test.sh: Likewise.
+
+2005-11-13 Roland McGrath <roland@redhat.com>
+
+ * funcretval.c: New file.
+ * Makefile.am (noinst_PROGRAMS): Add it.
+ (funcretval_LDADD): New variable.
+
+2005-11-09 Ulrich Drepper <drepper@redhat.com>
+
+ * line2addr.c (handle_module): Add missing parameter to printf.
+
+2005-10-27 Roland McGrath <roland@redhat.com>
+
+ * allfcts.c (cb): Update for dwarf_func_* -> dwarf_decl_* changes.
+ * funcscopes.c (handle_function): Likewise.
+ * dwflmodtest.c (print_inline, print_func): Likewise.
+ * find-prologues.c (handle_function): Likewise.
+
+2005-10-27 Roland McGrath <roland@redhat.com>
+
+ * run-find-prologues.sh: New file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add it.
+
+ * find-prologues.c (handle_function): Skip inlines.
+
+2005-10-25 Roland McGrath <roland@redhat.com>
+
+ * find-prologues.c: New file.
+ * Makefile.am (noinst_PROGRAMS): Add it.
+ (find_prologues_LDADD): New variable.
+
+2005-09-02 Ulrich Drepper <drepper@redhat.com>
+
+ * run-strings-test.sh: Remove strings.out in the end.
+
+2005-08-31 Ulrich Drepper <drepper@redhat.com>
+
+ * run-addrscopes.sh: Use correct exit code if test cannot be performed.
+ * run-allfcts.sh: Likewise.
+ * run-ecp-test.sh: Likewise.
+ * run-ecp-test2.sh: Likewise.
+ * run-elflint-test.sh: Likewise.
+ * run-funcscopes.sh: Likewise.
+ * run-get-aranges.sh: Likewise.
+ * run-get-files.sh: Likewise.
+ * run-get-lines.sh: Likewise.
+ * run-get-pubnames.sh: Likewise.
+ * run-line2addr.sh: Likewise.
+ * run-ranlib-test2.sh: Likewise.
+ * run-show-abbrev.sh: Likewise.
+ * run-show-ciefde.sh: Likewise.
+ * run-show-die-info.sh: Likewise.
+ * run-strings-test.sh: Likewise.
+ * run-strip-test.sh: Likewise.
+
+2005-08-30 Ulrich Drepper <drepper@redhat.com>
+
+ * coverage.sh: Handle case where there is no .gcno file at all.
+
+2005-08-29 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (EXTRA_DIST): Add coverage.
+ [GCOV]: Generate coverage summary after the tests ran
+ * coverage.sh: New file.
+
+2005-08-28 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
+ (CLEANFILES): Add *.gcno *.gcda *.gconv.
+
+2005-08-28 Ulrich Drepper <drepper@redhat.com>
+
+ * run-strings-test.sh: New file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add it.
+
+2005-08-27 Roland McGrath <roland@redhat.com>
+
+ * addrscopes.c (handle_address): Apply bias to PC addresses.
+
+ * run-funcscopes.sh: New file.
+ * testfile25.bz2: New data file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add them.
+
+2005-08-26 Roland McGrath <roland@redhat.com>
+
+ * addrscopes.c (dwarf_diename_integrate): Removed.
+ (print_vars, handle_address): Use plain dwarf_diename.
+
+2005-08-25 Roland McGrath <roland@redhat.com>
+
+ * funcscopes.c: New file.
+ * Makefile.am (noinst_PROGRAMS): Add it.
+ (funcscopes_LDADD): New variable.
+
+ * run-addrscopes.sh: Add another case.
+ * testfile24.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add it.
+
+ * addrscopes.c (handle_address): Take new argument IGNORE_INLINES,
+ pass it to dwarf_getscopes.
+ (main): Pass it, true when '=' follows an address.
+
+2005-08-24 Roland McGrath <roland@redhat.com>
+
+ * line2addr.c (print_address): Omit () for DSOs.
+
+2005-08-24 Ulrich Drepper <drepper@redhat.com>
+
+ * run-line2addr.sh: Remove testfile23 in the end.
+
+ * Makefile.am [BUILD_STATIC] (libdw): Add $(libelf) and $(libebl).
+ [MUDFLAP] (AM_LDFLAGS): Define to find libebl modules.
+
+2005-08-22 Roland McGrath <roland@redhat.com>
+
+ * run-line2addr.sh: Add a case.
+ * testfile23.bz2: New data file.
+ * Makefile.am (EXTRA_DIST): Add it.
+
+2005-08-18 Roland McGrath <roland@redhat.com>
+
+ * run-addrscopes.sh: New file.
+ * testfile22.bz2: New data file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add them.
+
+ * addrscopes.c: New file.
+ * Makefile.am (noinst_PROGRAMS): Add it.
+ (addrscopes_LDADD): New variable.
+
+2005-08-15 Ulrich Drepper <drepper@redhat.com>
+
+ * run-elflint-self.sh: Don't run test if the file doesn't exist.
+
+2005-08-15 Roland McGrath <roland@redhat.com>
+
+ * dwflmodtest.c (print_instance, print_inline): New functions.
+ (print_func): Call print_inline.
+ (options, parse_opt): Grok -i/--inlines.
+
+2005-08-07 Roland McGrath <roland@redhat.com>
+
+ * dwflmodtest.c: Print function details only if -f flag is given.
+
+2005-08-06 Ulrich Drepper <drepper@redhat.com>
+
+ * run-elflint-self.sh: New file.
+ * Makefile.am (TESTS): Add run-elflint-self.sh.
+ (EXTRA_DIST): Likewise.
+
+ * Makefile.am: Link with statis libs if BUILD_STATIC.
+ (dwflmodtest_LDADD): Also link with -ldl.
+
+2005-08-02 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Add -ldl to asm_tst[1-9]_LDASS.
+ * asm-tst1.c: Adjust for new asm_begin interface. Open backend
+ library first.
+ * asm-tst2.c: Likewise.
+ * asm-tst3.c: Likewise.
+ * asm-tst4.c: Likewise.
+ * asm-tst5.c: Likewise.
+ * asm-tst6.c: Likewise.
+ * asm-tst7.c: Likewise.
+ * asm-tst8.c: Likewise.
+ * asm-tst9.c: Likewise.
+
+ * msg_tst.c: Add new error message.
+
+2005-07-28 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (dwflmodtest_LDADD): Add $(libebl).
+
+2005-06-01 Roland McGrath <roland@redhat.com>
+
+ * line2addr.c: Rewritten using libdwfl.
+ * run-line2addr.sh: Update test for changed arguments.
+ * Makefile.am (INCLUDES): Add libdwfl source directory to path.
+ (libdwfl): New variable.
+ (line2addr_LDADD): Use it.
+
+2005-07-28 Roland McGrath <roland@redhat.com>
+
+ * dwflmodtest.c: New file, moved from ../libdwfl/ptest.c to here.
+ * Makefile.am (noinst_PROGRAMS): Add dwflmodtest.
+ (dwflmodtest_LDADD): New variable.
+ (INCLUDES): Add -I$(top_srcdir)/libdwfl here.
+
+2005-07-21 Ulrich Drepper <drepper@redhat.com>
+
+ * testfile18.bz2: New file.
+ * run-elflint-test.sh: New file.
+ * Makefile.am (TESTS): Add run-elflint-test.sh.
+ (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
+
+2005-05-24 Ulrich Drepper <drepper@redhat.com>
+
+ * get-files.c (main): Use correct format specifier.
+
+2005-05-21 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Add -Wextra to CFLAGS.
+ * get-files.c: Remove warning this produced.
+ * get-pubnames.c: Likewise.
+ * newfile.c: Likewise.
+ * newscn.c: Likewise.
+ * scnnames.c: Likewise.
+ * showptable.c: Likewise.
+ * test-nlist.c: Likewise.
+ * update1.c: Likewise.
+ * update2.c: Likewise.
+ * update3.c: Likewise.
+ * update4.c: Likewise.
+
+2005-05-08 Ulrich Drepper <drepper@redhat.com>
+
+ * run-line2addr.sh: Remove testfile14 at the end.
+
+ * run-strip-test.sh: Remove debuginfo test input file as well.
+
+ * Makefile.am (EXTRA_DIST): Newly added files incorrectly used
+ .bz, not .bz2.
+
+2005-05-03 Roland McGrath <roland@redhat.com>
+
+ * run-strip-test.sh: Use variables for test file names.
+ Optionally produce separate debug file and check it.
+ * run-strip-test2.sh: Use run-strip-test.sh via ., no duplication.
+ * run-strip-test3.sh: Likewise.
+ * run-strip-test4.sh: New file.
+ * run-strip-test5.sh: New file.
+ * run-strip-test6.sh: New file.
+ * testfile15.bz: New file.
+ * testfile15.debug.bz: New file.
+ * testfile16.bz: New file.
+ * testfile16.debug.bz: New file.
+ * testfile17.bz: New file.
+ * testfile17.debug.bz: New file.
+ * Makefile.am (TESTS, EXTRA_DIST): Add them.
+
+2005-04-25 Ulrich Drepper <drepper@redhat.com>
+
+ * run-line2addr.sh: Also use testfile14. Adjust for correct
+ return of multiple matches.
+ * testfile14.bz2: New file.
+ * Makefile.am (EXTRA_DIST): Add testfile14.bz2.
+
+ * show-abbrev.c (main): Adjust for dwarf_getabbrev interface change.
+
+2005-04-04 Roland McGrath <roland@redhat.com>
+
+ * line2addr.c (main): Initialize LINES and NLINES before calling
+ dwarf_getsrc_file, and free LINES afterwards.
+
+ * allfcts.c (main): Use size_t for CUHL.
+
+2005-04-04 Ulrich Drepper <drepper@redhat.com>
+
+ * line2addr.c: New file.
+ * run-line2addr.sh: New file.
+ * Makefile.am: Add rules to build, run, and distribute new code.
+
+2005-04-02 Ulrich Drepper <drepper@redhat.com>
+
+ * allfcts.c: New file.
+ * run-allfcts.sh: New file.
+ * Makefile.am: Add rules to build, run, and distribute new code.
+
+2005-02-05 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. Link all test
+ programs with -lmudflap.
+
+2004-09-25 Ulrich Drepper <drepper@redhat.com>
+
+ * asm-tst4.c (main): Add LD_LIBRARY_PATH to elflint invocation.
+ * asm-tst5.c (main): Likewise.
+ * asm-tst6.c (main): Likewise.
+
+2004-01-17 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Support building with mudflap.
+
+2004-01-12 Ulrich Drepper <drepper@redhat.com>
+
+ * get-aranges.c: Rewrite to use libdw.
+ * Makefile.am: Reenable get-aranges test.
+
+2004-01-11 Ulrich Drepper <drepper@redhat.com>
+
+ * get-lines.c: New file.
+ * get-files.c: Adjust for libdw.
+ * run-get-files.sh: Adjust expected result.
+ * run-get-lines.sh: Likewise.
+ * Makefile.am: Run get-lines test. Don't run get-aranges and
+ get-ciefde test for now.
+
+ * show-abbrev.c: Adjust call to dwarf_getabbrevattr after interface
+ change. Print attribute offset information.
+ * run-show-abbrev.sh: Adjust expected output.
+
+2004-01-09 Ulrich Drepper <drepper@redhat.com>
+
+ * show-abbrev.c: Adjust call to dwarf_nextcu after interface change.
+ * show-die-info.c: Likewise.
+ * run-show-die-info.sh: Adjust expected output.
+
+2003-08-13 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.in: Depend on libebl.a, not libebl.so.
+
+2003-08-11 Ulrich Drepper <drepper@redhat.com>
+
+ * Moved to CVS archive.
diff --git a/src/tests/Makefile b/src/tests/Makefile
new file mode 100644
index 00000000..b810dd0c
--- /dev/null
+++ b/src/tests/Makefile
@@ -0,0 +1,2932 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# tests/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/elfutils
+pkgincludedir = $(includedir)/elfutils
+pkglibdir = $(libdir)/elfutils
+pkglibexecdir = $(libexecdir)/elfutils
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
+ $(top_srcdir)/config/test-driver ChangeLog
+am__append_1 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
+ -I$(top_srcdir)/libdwfl -I$(top_srcdir)/libdwelf \
+ -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
+ -I$(top_srcdir)/lib -I..
+
+am__append_2 = -Wl,-rpath-link,../libasm:../libdw:../libelf
+#am__append_3 = -Wl,-rpath,$(BUILD_RPATH)
+check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \
+ newfile$(EXEEXT) saridx$(EXEEXT) scnnames$(EXEEXT) \
+ sectiondump$(EXEEXT) showptable$(EXEEXT) update1$(EXEEXT) \
+ update2$(EXEEXT) update3$(EXEEXT) update4$(EXEEXT) \
+ test-nlist$(EXEEXT) show-die-info$(EXEEXT) get-files$(EXEEXT) \
+ get-lines$(EXEEXT) get-pubnames$(EXEEXT) get-aranges$(EXEEXT) \
+ allfcts$(EXEEXT) line2addr$(EXEEXT) addrscopes$(EXEEXT) \
+ funcscopes$(EXEEXT) show-abbrev$(EXEEXT) hash$(EXEEXT) \
+ newscn$(EXEEXT) ecp$(EXEEXT) dwflmodtest$(EXEEXT) \
+ find-prologues$(EXEEXT) funcretval$(EXEEXT) allregs$(EXEEXT) \
+ rdwrmmap$(EXEEXT) dwfl-bug-addr-overflow$(EXEEXT) \
+ arls$(EXEEXT) dwfl-bug-fd-leak$(EXEEXT) \
+ dwfl-addr-sect$(EXEEXT) dwfl-bug-report$(EXEEXT) \
+ early-offscn$(EXEEXT) dwfl-bug-getmodules$(EXEEXT) \
+ dwarf-getmacros$(EXEEXT) addrcfi$(EXEEXT) \
+ test-flag-nobits$(EXEEXT) dwarf-getstring$(EXEEXT) \
+ rerequest_tag$(EXEEXT) alldts$(EXEEXT) md5-sha1-test$(EXEEXT) \
+ typeiter$(EXEEXT) typeiter2$(EXEEXT) low_high_pc$(EXEEXT) \
+ test-elf_cntl_gelf_getshdr$(EXEEXT) dwflsyms$(EXEEXT) \
+ dwfllines$(EXEEXT) dwfl-report-elf-align$(EXEEXT) \
+ varlocs$(EXEEXT) backtrace$(EXEEXT) backtrace-child$(EXEEXT) \
+ backtrace-data$(EXEEXT) backtrace-dwarf$(EXEEXT) \
+ debuglink$(EXEEXT) debugaltlink$(EXEEXT) buildid$(EXEEXT) \
+ deleted$(EXEEXT) deleted-lib.so$(EXEEXT) \
+ aggregate_size$(EXEEXT) vdsosyms$(EXEEXT) $(am__EXEEXT_1) \
+ $(am__EXEEXT_2) $(am__EXEEXT_4)
+am__append_4 = backtrace-child-biarch
+TESTS = run-arextract.sh run-arsymtest.sh newfile$(EXEEXT) \
+ test-nlist$(EXEEXT) update1$(EXEEXT) update2$(EXEEXT) \
+ update3$(EXEEXT) update4$(EXEEXT) run-show-die-info.sh \
+ run-get-files.sh run-get-lines.sh run-get-pubnames.sh \
+ run-get-aranges.sh run-allfcts.sh run-show-abbrev.sh \
+ run-line2addr.sh hash$(EXEEXT) newscn$(EXEEXT) \
+ run-strip-test.sh run-strip-test2.sh run-strip-test3.sh \
+ run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
+ run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \
+ run-strip-reloc.sh run-unstrip-test.sh run-unstrip-test2.sh \
+ run-unstrip-M.sh run-ecp-test.sh run-ecp-test2.sh \
+ run-alldts.sh run-elflint-test.sh run-elflint-self.sh \
+ run-ranlib-test.sh run-ranlib-test2.sh run-ranlib-test3.sh \
+ run-ranlib-test4.sh run-addrscopes.sh run-strings-test.sh \
+ run-funcscopes.sh run-find-prologues.sh run-allregs.sh \
+ run-addrcfi.sh run-nm-self.sh run-readelf-self.sh \
+ run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
+ run-readelf-test4.sh run-readelf-twofiles.sh \
+ run-readelf-macro.sh run-readelf-loc.sh run-readelf-aranges.sh \
+ run-readelf-line.sh run-native-test.sh run-bug1-test.sh \
+ run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
+ dwfl-bug-addr-overflow$(EXEEXT) run-addrname-test.sh \
+ dwfl-bug-fd-leak$(EXEEXT) dwfl-bug-report$(EXEEXT) \
+ run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \
+ run-disasm-x86.sh run-disasm-x86-64.sh run-early-offscn.sh \
+ run-dwarf-getmacros.sh run-test-flag-nobits.sh \
+ run-prelink-addr-test.sh run-dwarf-getstring.sh \
+ run-rerequest_tag.sh run-typeiter.sh run-readelf-d.sh \
+ run-readelf-gdb_index.sh run-unstrip-n.sh run-low_high_pc.sh \
+ run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \
+ run-test-archive64.sh run-readelf-vmcoreinfo.sh \
+ run-readelf-mixed-corenote.sh run-dwfllines.sh \
+ run-dwfl-report-elf-align.sh run-addr2line-test.sh \
+ run-addr2line-i-test.sh run-addr2line-i-lex-test.sh \
+ run-varlocs.sh run-funcretval.sh run-backtrace-native.sh \
+ run-backtrace-data.sh run-backtrace-dwarf.sh \
+ run-backtrace-native-biarch.sh run-backtrace-native-core.sh \
+ run-backtrace-native-core-biarch.sh \
+ run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \
+ run-backtrace-core-ppc.sh run-backtrace-core-s390x.sh \
+ run-backtrace-core-s390.sh run-backtrace-core-aarch64.sh \
+ run-backtrace-demangle.sh run-stack-d-test.sh \
+ run-stack-i-test.sh run-readelf-dwz-multi.sh \
+ run-allfcts-multi.sh run-deleted.sh run-linkmap-cut.sh \
+ run-aggregate-size.sh vdsosyms$(EXEEXT) run-readelf-A.sh \
+ $(am__EXEEXT_2) $(am__append_7) $(am__append_8) \
+ $(am__EXEEXT_4)
+am__append_5 = msg_tst md5-sha1-test
+am__append_6 = msg_tst md5-sha1-test
+#am__append_7 = run-readelf-s.sh run-dwflsyms.sh
+am__append_8 = run-readelf-zdebug.sh
+am__append_9 = $(asm_TESTS)
+am__append_10 = $(asm_TESTS)
+subdir = tests
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/zip.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__EXEEXT_1 = backtrace-child-biarch$(EXEEXT)
+am__EXEEXT_2 = msg_tst$(EXEEXT) \
+ md5-sha1-test$(EXEEXT)
+am__EXEEXT_3 = asm-tst1$(EXEEXT) asm-tst2$(EXEEXT) asm-tst3$(EXEEXT) \
+ asm-tst4$(EXEEXT) asm-tst5$(EXEEXT) asm-tst6$(EXEEXT) \
+ asm-tst7$(EXEEXT) asm-tst8$(EXEEXT) asm-tst9$(EXEEXT)
+am__EXEEXT_4 = $(am__EXEEXT_3)
+addrcfi_SOURCES = addrcfi.c
+addrcfi_OBJECTS = addrcfi.$(OBJEXT)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = \
+ ../libelf/libelf.so
+#am__DEPENDENCIES_2 = \
+# ../libelf/libelf.a
+am__DEPENDENCIES_3 = ../libebl/libebl.a
+am__DEPENDENCIES_4 = \
+ ../libdw/libdw.so
+#am__DEPENDENCIES_4 = \
+# ../libdw/libdw.a \
+# $(am__DEPENDENCIES_1) \
+# $(am__DEPENDENCIES_2) \
+# $(am__DEPENDENCIES_3)
+addrcfi_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+addrscopes_SOURCES = addrscopes.c
+addrscopes_OBJECTS = addrscopes.$(OBJEXT)
+addrscopes_DEPENDENCIES = $(am__DEPENDENCIES_4)
+aggregate_size_SOURCES = aggregate_size.c
+aggregate_size_OBJECTS = aggregate_size.$(OBJEXT)
+aggregate_size_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+alldts_SOURCES = alldts.c
+alldts_OBJECTS = alldts.$(OBJEXT)
+alldts_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+allfcts_SOURCES = allfcts.c
+allfcts_OBJECTS = allfcts.$(OBJEXT)
+allfcts_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+allregs_SOURCES = allregs.c
+allregs_OBJECTS = allregs.$(OBJEXT)
+allregs_DEPENDENCIES = $(am__DEPENDENCIES_4)
+arextract_SOURCES = arextract.c
+arextract_OBJECTS = arextract.$(OBJEXT)
+arextract_DEPENDENCIES = $(am__DEPENDENCIES_2)
+arls_SOURCES = arls.c
+arls_OBJECTS = arls.$(OBJEXT)
+arls_DEPENDENCIES = $(am__DEPENDENCIES_2)
+arsymtest_SOURCES = arsymtest.c
+arsymtest_OBJECTS = arsymtest.$(OBJEXT)
+arsymtest_DEPENDENCIES = $(am__DEPENDENCIES_2)
+asm_tst1_SOURCES = asm-tst1.c
+asm_tst1_OBJECTS = asm-tst1.$(OBJEXT)
+am__DEPENDENCIES_5 = \
+ ../libasm/libasm.so
+#am__DEPENDENCIES_5 = \
+# ../libasm/libasm.a
+asm_tst1_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst2_SOURCES = asm-tst2.c
+asm_tst2_OBJECTS = asm-tst2.$(OBJEXT)
+asm_tst2_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst3_SOURCES = asm-tst3.c
+asm_tst3_OBJECTS = asm-tst3.$(OBJEXT)
+asm_tst3_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst4_SOURCES = asm-tst4.c
+asm_tst4_OBJECTS = asm-tst4.$(OBJEXT)
+asm_tst4_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst5_SOURCES = asm-tst5.c
+asm_tst5_OBJECTS = asm-tst5.$(OBJEXT)
+asm_tst5_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst6_SOURCES = asm-tst6.c
+asm_tst6_OBJECTS = asm-tst6.$(OBJEXT)
+asm_tst6_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst7_SOURCES = asm-tst7.c
+asm_tst7_OBJECTS = asm-tst7.$(OBJEXT)
+asm_tst7_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst8_SOURCES = asm-tst8.c
+asm_tst8_OBJECTS = asm-tst8.$(OBJEXT)
+asm_tst8_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst9_SOURCES = asm-tst9.c
+asm_tst9_OBJECTS = asm-tst9.$(OBJEXT)
+asm_tst9_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+backtrace_SOURCES = backtrace.c
+backtrace_OBJECTS = backtrace.$(OBJEXT)
+backtrace_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+backtrace_child_SOURCES = backtrace-child.c
+backtrace_child_OBJECTS = backtrace_child-backtrace-child.$(OBJEXT)
+backtrace_child_LDADD = $(LDADD)
+backtrace_child_LINK = $(CCLD) $(backtrace_child_CFLAGS) $(CFLAGS) \
+ $(backtrace_child_LDFLAGS) $(LDFLAGS) -o $@
+am_backtrace_child_biarch_OBJECTS = backtrace-child.$(OBJEXT)
+backtrace_child_biarch_OBJECTS = $(am_backtrace_child_biarch_OBJECTS)
+backtrace_child_biarch_LDADD = $(LDADD)
+backtrace_data_SOURCES = backtrace-data.c
+backtrace_data_OBJECTS = backtrace-data.$(OBJEXT)
+backtrace_data_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+backtrace_dwarf_SOURCES = backtrace-dwarf.c
+backtrace_dwarf_OBJECTS = backtrace_dwarf-backtrace-dwarf.$(OBJEXT)
+backtrace_dwarf_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+backtrace_dwarf_LINK = $(CCLD) $(backtrace_dwarf_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+buildid_SOURCES = buildid.c
+buildid_OBJECTS = buildid.$(OBJEXT)
+buildid_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+debugaltlink_SOURCES = debugaltlink.c
+debugaltlink_OBJECTS = debugaltlink.$(OBJEXT)
+debugaltlink_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+debuglink_SOURCES = debuglink.c
+debuglink_OBJECTS = debuglink.$(OBJEXT)
+debuglink_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+deleted_SOURCES = deleted.c
+deleted_OBJECTS = deleted.$(OBJEXT)
+deleted_DEPENDENCIES = ./deleted-lib.so
+deleted_lib_so_SOURCES = deleted-lib.c
+deleted_lib_so_OBJECTS = deleted_lib_so-deleted-lib.$(OBJEXT)
+deleted_lib_so_LDADD = $(LDADD)
+deleted_lib_so_LINK = $(CCLD) $(deleted_lib_so_CFLAGS) $(CFLAGS) \
+ $(deleted_lib_so_LDFLAGS) $(LDFLAGS) -o $@
+dwarf_getmacros_SOURCES = dwarf-getmacros.c
+dwarf_getmacros_OBJECTS = dwarf-getmacros.$(OBJEXT)
+dwarf_getmacros_DEPENDENCIES = $(am__DEPENDENCIES_4)
+dwarf_getstring_SOURCES = dwarf-getstring.c
+dwarf_getstring_OBJECTS = dwarf-getstring.$(OBJEXT)
+dwarf_getstring_DEPENDENCIES = $(am__DEPENDENCIES_4)
+dwfl_addr_sect_SOURCES = dwfl-addr-sect.c
+dwfl_addr_sect_OBJECTS = dwfl-addr-sect.$(OBJEXT)
+dwfl_addr_sect_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+dwfl_bug_addr_overflow_SOURCES = dwfl-bug-addr-overflow.c
+dwfl_bug_addr_overflow_OBJECTS = dwfl-bug-addr-overflow.$(OBJEXT)
+dwfl_bug_addr_overflow_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+dwfl_bug_fd_leak_SOURCES = dwfl-bug-fd-leak.c
+dwfl_bug_fd_leak_OBJECTS = dwfl-bug-fd-leak.$(OBJEXT)
+dwfl_bug_fd_leak_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+dwfl_bug_getmodules_SOURCES = dwfl-bug-getmodules.c
+dwfl_bug_getmodules_OBJECTS = dwfl-bug-getmodules.$(OBJEXT)
+dwfl_bug_getmodules_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+dwfl_bug_report_SOURCES = dwfl-bug-report.c
+dwfl_bug_report_OBJECTS = dwfl-bug-report.$(OBJEXT)
+dwfl_bug_report_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+dwfl_report_elf_align_SOURCES = dwfl-report-elf-align.c
+dwfl_report_elf_align_OBJECTS = dwfl-report-elf-align.$(OBJEXT)
+dwfl_report_elf_align_DEPENDENCIES = $(am__DEPENDENCIES_4)
+dwfllines_SOURCES = dwfllines.c
+dwfllines_OBJECTS = dwfllines.$(OBJEXT)
+dwfllines_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+dwflmodtest_SOURCES = dwflmodtest.c
+dwflmodtest_OBJECTS = dwflmodtest.$(OBJEXT)
+dwflmodtest_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+dwflsyms_SOURCES = dwflsyms.c
+dwflsyms_OBJECTS = dwflsyms.$(OBJEXT)
+dwflsyms_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+early_offscn_SOURCES = early-offscn.c
+early_offscn_OBJECTS = early-offscn.$(OBJEXT)
+early_offscn_DEPENDENCIES = $(am__DEPENDENCIES_2)
+ecp_SOURCES = ecp.c
+ecp_OBJECTS = ecp.$(OBJEXT)
+ecp_DEPENDENCIES = $(am__DEPENDENCIES_2)
+find_prologues_SOURCES = find-prologues.c
+find_prologues_OBJECTS = find-prologues.$(OBJEXT)
+find_prologues_DEPENDENCIES = $(am__DEPENDENCIES_4)
+funcretval_SOURCES = funcretval.c
+funcretval_OBJECTS = funcretval.$(OBJEXT)
+funcretval_DEPENDENCIES = $(am__DEPENDENCIES_4)
+funcscopes_SOURCES = funcscopes.c
+funcscopes_OBJECTS = funcscopes.$(OBJEXT)
+funcscopes_DEPENDENCIES = $(am__DEPENDENCIES_4)
+get_aranges_SOURCES = get-aranges.c
+get_aranges_OBJECTS = get-aranges.$(OBJEXT)
+get_aranges_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+get_files_SOURCES = get-files.c
+get_files_OBJECTS = get-files.$(OBJEXT)
+get_files_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+get_lines_SOURCES = get-lines.c
+get_lines_OBJECTS = get-lines.$(OBJEXT)
+get_lines_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+get_pubnames_SOURCES = get-pubnames.c
+get_pubnames_OBJECTS = get-pubnames.$(OBJEXT)
+get_pubnames_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+hash_SOURCES = hash.c
+hash_OBJECTS = hash.$(OBJEXT)
+hash_DEPENDENCIES = $(am__DEPENDENCIES_2)
+line2addr_SOURCES = line2addr.c
+line2addr_OBJECTS = line2addr.$(OBJEXT)
+line2addr_DEPENDENCIES = $(am__DEPENDENCIES_4)
+low_high_pc_SOURCES = low_high_pc.c
+low_high_pc_OBJECTS = low_high_pc.$(OBJEXT)
+low_high_pc_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+md5_sha1_test_SOURCES = md5-sha1-test.c
+md5_sha1_test_OBJECTS = md5-sha1-test.$(OBJEXT)
+md5_sha1_test_DEPENDENCIES = $(libeu)
+msg_tst_SOURCES = msg_tst.c
+msg_tst_OBJECTS = msg_tst.$(OBJEXT)
+msg_tst_DEPENDENCIES = $(am__DEPENDENCIES_2)
+newfile_SOURCES = newfile.c
+newfile_OBJECTS = newfile.$(OBJEXT)
+newfile_DEPENDENCIES = $(am__DEPENDENCIES_2)
+newscn_SOURCES = newscn.c
+newscn_OBJECTS = newscn.$(OBJEXT)
+newscn_DEPENDENCIES = $(am__DEPENDENCIES_2)
+rdwrmmap_SOURCES = rdwrmmap.c
+rdwrmmap_OBJECTS = rdwrmmap.$(OBJEXT)
+rdwrmmap_DEPENDENCIES = $(am__DEPENDENCIES_2)
+rerequest_tag_SOURCES = rerequest_tag.c
+rerequest_tag_OBJECTS = rerequest_tag.$(OBJEXT)
+rerequest_tag_DEPENDENCIES = $(am__DEPENDENCIES_4)
+saridx_SOURCES = saridx.c
+saridx_OBJECTS = saridx.$(OBJEXT)
+saridx_DEPENDENCIES = $(am__DEPENDENCIES_2)
+scnnames_SOURCES = scnnames.c
+scnnames_OBJECTS = scnnames.$(OBJEXT)
+scnnames_DEPENDENCIES = $(am__DEPENDENCIES_2)
+sectiondump_SOURCES = sectiondump.c
+sectiondump_OBJECTS = sectiondump.$(OBJEXT)
+sectiondump_DEPENDENCIES = $(am__DEPENDENCIES_2)
+show_abbrev_SOURCES = show-abbrev.c
+show_abbrev_OBJECTS = show-abbrev.$(OBJEXT)
+show_abbrev_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+show_die_info_SOURCES = show-die-info.c
+show_die_info_OBJECTS = show-die-info.$(OBJEXT)
+show_die_info_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+showptable_SOURCES = showptable.c
+showptable_OBJECTS = showptable.$(OBJEXT)
+showptable_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_elf_cntl_gelf_getshdr_SOURCES = test-elf_cntl_gelf_getshdr.c
+test_elf_cntl_gelf_getshdr_OBJECTS = \
+ test-elf_cntl_gelf_getshdr.$(OBJEXT)
+test_elf_cntl_gelf_getshdr_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_flag_nobits_SOURCES = test-flag-nobits.c
+test_flag_nobits_OBJECTS = test-flag-nobits.$(OBJEXT)
+test_flag_nobits_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_nlist_SOURCES = test-nlist.c
+test_nlist_OBJECTS = test-nlist.$(OBJEXT)
+test_nlist_DEPENDENCIES = $(am__DEPENDENCIES_2)
+typeiter_SOURCES = typeiter.c
+typeiter_OBJECTS = typeiter.$(OBJEXT)
+typeiter_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+typeiter2_SOURCES = typeiter2.c
+typeiter2_OBJECTS = typeiter2.$(OBJEXT)
+typeiter2_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+update1_SOURCES = update1.c
+update1_OBJECTS = update1.$(OBJEXT)
+update1_DEPENDENCIES = $(am__DEPENDENCIES_2)
+update2_SOURCES = update2.c
+update2_OBJECTS = update2.$(OBJEXT)
+update2_DEPENDENCIES = $(am__DEPENDENCIES_2)
+update3_SOURCES = update3.c
+update3_OBJECTS = update3.$(OBJEXT)
+update3_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+update4_SOURCES = update4.c
+update4_OBJECTS = update4.$(OBJEXT)
+update4_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+varlocs_SOURCES = varlocs.c
+varlocs_OBJECTS = varlocs.$(OBJEXT)
+varlocs_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+vdsosyms_SOURCES = vdsosyms.c
+vdsosyms_OBJECTS = vdsosyms.$(OBJEXT)
+vdsosyms_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = addrcfi.c addrscopes.c aggregate_size.c alldts.c allfcts.c \
+ allregs.c arextract.c arls.c arsymtest.c asm-tst1.c asm-tst2.c \
+ asm-tst3.c asm-tst4.c asm-tst5.c asm-tst6.c asm-tst7.c \
+ asm-tst8.c asm-tst9.c backtrace.c backtrace-child.c \
+ $(backtrace_child_biarch_SOURCES) backtrace-data.c \
+ backtrace-dwarf.c buildid.c debugaltlink.c debuglink.c \
+ deleted.c deleted-lib.c dwarf-getmacros.c dwarf-getstring.c \
+ dwfl-addr-sect.c dwfl-bug-addr-overflow.c dwfl-bug-fd-leak.c \
+ dwfl-bug-getmodules.c dwfl-bug-report.c \
+ dwfl-report-elf-align.c dwfllines.c dwflmodtest.c dwflsyms.c \
+ early-offscn.c ecp.c find-prologues.c funcretval.c \
+ funcscopes.c get-aranges.c get-files.c get-lines.c \
+ get-pubnames.c hash.c line2addr.c low_high_pc.c \
+ md5-sha1-test.c msg_tst.c newfile.c newscn.c rdwrmmap.c \
+ rerequest_tag.c saridx.c scnnames.c sectiondump.c \
+ show-abbrev.c show-die-info.c showptable.c \
+ test-elf_cntl_gelf_getshdr.c test-flag-nobits.c test-nlist.c \
+ typeiter.c typeiter2.c update1.c update2.c update3.c update4.c \
+ varlocs.c vdsosyms.c
+DIST_SOURCES = addrcfi.c addrscopes.c aggregate_size.c alldts.c \
+ allfcts.c allregs.c arextract.c arls.c arsymtest.c asm-tst1.c \
+ asm-tst2.c asm-tst3.c asm-tst4.c asm-tst5.c asm-tst6.c \
+ asm-tst7.c asm-tst8.c asm-tst9.c backtrace.c backtrace-child.c \
+ $(backtrace_child_biarch_SOURCES) backtrace-data.c \
+ backtrace-dwarf.c buildid.c debugaltlink.c debuglink.c \
+ deleted.c deleted-lib.c dwarf-getmacros.c dwarf-getstring.c \
+ dwfl-addr-sect.c dwfl-bug-addr-overflow.c dwfl-bug-fd-leak.c \
+ dwfl-bug-getmodules.c dwfl-bug-report.c \
+ dwfl-report-elf-align.c dwfllines.c dwflmodtest.c dwflsyms.c \
+ early-offscn.c ecp.c find-prologues.c funcretval.c \
+ funcscopes.c get-aranges.c get-files.c get-lines.c \
+ get-pubnames.c hash.c line2addr.c low_high_pc.c \
+ md5-sha1-test.c msg_tst.c newfile.c newscn.c rdwrmmap.c \
+ rerequest_tag.c saridx.c scnnames.c sectiondump.c \
+ show-abbrev.c show-die-info.c showptable.c \
+ test-elf_cntl_gelf_getshdr.c test-flag-nobits.c test-nlist.c \
+ typeiter.c typeiter2.c update1.c update2.c update3.c update4.c \
+ varlocs.c vdsosyms.c
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/missing aclocal-1.14
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AUTOCONF = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/missing autoconf
+AUTOHEADER = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/missing autoheader
+AUTOMAKE = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/missing automake-1.14
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CC_BIARCH = gcc -m32
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS =
+CYGPATH_W = echo
+DEBUGPRED = 0
+DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
+DEPDIR = .deps
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = /bin/grep -E
+EXEEXT =
+GETTEXT_MACRO_VERSION = 0.18
+GMSGFMT = /usr/bin/msgfmt
+GMSGFMT_015 = /usr/bin/msgfmt
+GREP = /bin/grep
+HAVE_VALGRIND =
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LDFLAGS =
+LEX = flex
+LEXLIB = -lfl
+LEX_OUTPUT_ROOT = lex.yy
+LIBEBL_SUBDIR = elfutils
+LIBOBJS =
+LIBS =
+LTLIBOBJS =
+MAINT = #
+MAKEINFO = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/missing makeinfo
+MKDIR_P = /bin/mkdir -p
+MODVERSION = Build on enh.mtv.corp.google.com 2015-02-18T19:32:04-0800
+MSGFMT = /usr/bin/msgfmt
+MSGFMT_015 = /usr/bin/msgfmt
+MSGMERGE = /usr/bin/msgmerge
+NM = nm
+OBJEXT = o
+PACKAGE = elfutils
+PACKAGE_BUGREPORT = https://bugzilla.redhat.com/
+PACKAGE_NAME = elfutils
+PACKAGE_STRING = elfutils 0.161
+PACKAGE_TARNAME = elfutils
+PACKAGE_URL =
+PACKAGE_VERSION = 0.161
+PATH_SEPARATOR = :
+RANLIB = ranlib
+READELF = readelf
+SET_MAKE =
+SHELL = /bin/sh
+STRIP =
+USE_NLS = yes
+VERSION = 0.161
+XGETTEXT = /usr/bin/xgettext
+XGETTEXT_015 = /usr/bin/xgettext
+XGETTEXT_EXTRA_OPTIONS =
+YACC = bison -y
+YFLAGS =
+abs_builddir = /huge-ssd/aosp-arm64/external/elfutils/src/tests
+abs_srcdir = /huge-ssd/aosp-arm64/external/elfutils/src/tests
+abs_top_builddir = /huge-ssd/aosp-arm64/external/elfutils/src
+abs_top_srcdir = /huge-ssd/aosp-arm64/external/elfutils/src
+ac_ct_AR = ar
+ac_ct_CC = gcc
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+base_cpu = none
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias =
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+eu_version = 161
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias =
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /huge-ssd/aosp-arm64/external/elfutils/src/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+zip_LIBS = -lz
+AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_1)
+AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+ $(if $($(*F)_no_Werror),,-Werror) \
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $($(*F)_CFLAGS)
+
+COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
+CLEANFILES = *.gcno *.gcda
+textrel_msg = echo "WARNING: TEXTREL found in '$@'"
+#textrel_found = $(textrel_msg)
+textrel_found = $(textrel_msg); exit 1
+textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi
+BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
+AM_LDFLAGS = $(am__append_2) $(am__append_3)
+tests_rpath = no
+#tests_rpath = yes
+asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
+ asm-tst6 asm-tst7 asm-tst8 asm-tst9
+
+EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
+ run-show-die-info.sh run-get-files.sh run-get-lines.sh \
+ run-get-pubnames.sh run-get-aranges.sh \
+ run-show-abbrev.sh run-strip-test.sh \
+ run-strip-test2.sh run-ecp-test.sh run-ecp-test2.sh \
+ testfile.bz2 testfile2.bz2 testfile3.bz2 testfile4.bz2 \
+ testfile5.bz2 testfile6.bz2 testfile7.bz2 testfile8.bz2 \
+ testfile9.bz2 testfile10.bz2 testfile11.bz2 testfile12.bz2 \
+ testfile13.bz2 run-strip-test3.sh run-allfcts.sh \
+ testfile_class_func.bz2 testfile_nested_funcs.bz2 \
+ run-line2addr.sh run-elflint-test.sh testfile14.bz2 \
+ run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
+ run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \
+ run-strip-reloc.sh hello_i386.ko.bz2 hello_x86_64.ko.bz2 \
+ hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \
+ run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-M.sh\
+ run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \
+ run-ranlib-test3.sh run-ranlib-test4.sh \
+ run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
+ run-nm-self.sh run-readelf-self.sh run-addrcfi.sh \
+ run-find-prologues.sh run-allregs.sh run-native-test.sh \
+ run-addrname-test.sh run-dwfl-bug-offline-rel.sh \
+ run-dwfl-addr-sect.sh run-early-offscn.sh \
+ run-dwarf-getmacros.sh run-test-flag-nobits.sh \
+ run-dwarf-getstring.sh run-rerequest_tag.sh run-alldts.sh \
+ testfile15.bz2 testfile15.debug.bz2 \
+ testfile16.bz2 testfile16.debug.bz2 \
+ testfile17.bz2 testfile17.debug.bz2 \
+ testfile18.bz2 testfile19.bz2 testfile19.index.bz2 \
+ testfile20.bz2 testfile20.index.bz2 \
+ testfile21.bz2 testfile21.index.bz2 \
+ testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \
+ testfile26.bz2 testfile27.bz2 \
+ coverage.sh test-subr.sh test-wrapper.sh \
+ run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
+ run-readelf-test4.sh run-readelf-twofiles.sh \
+ run-bug1-test.sh testfile28.bz2 testfile28.rdwr.bz2 \
+ run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
+ testfile29.bz2 testfile29.rdwr.bz2 \
+ testfile30.bz2 testfile31.bz2 testfile32.bz2 testfile33.bz2 \
+ testfile34.bz2 testfile35.bz2 testfile35.debug.bz2 \
+ testfile36.bz2 testfile36.debug.bz2 \
+ testfile37.bz2 testfile37.debug.bz2 \
+ testfile38.bz2 testfile39.bz2 testfile40.bz2 testfile40.debug.bz2 \
+ testfile41.bz2 testfile42.bz2 testfile42_noshdrs.bz2 \
+ testfile43.bz2 \
+ testfile44.S.bz2 testfile44.expect.bz2 run-disasm-x86.sh \
+ testfile45.S.bz2 testfile45.expect.bz2 run-disasm-x86-64.sh \
+ testfile46.bz2 testfile47.bz2 testfile48.bz2 testfile48.debug.bz2 \
+ testfile49.bz2 testfile50.bz2 testfile51.bz2 \
+ testfile-macros-0xff.bz2 \
+ run-readelf-macro.sh testfilemacro.bz2 \
+ run-readelf-loc.sh testfileloc.bz2 \
+ run-readelf-aranges.sh run-readelf-line.sh testfilefoobarbaz.bz2 \
+ run-readelf-dwz-multi.sh libtestfile_multi_shared.so.bz2 \
+ testfile_multi.dwz.bz2 testfile_multi_main.bz2 \
+ testfile-dwzstr.bz2 testfile-dwzstr.multi.bz2 \
+ run-allfcts-multi.sh \
+ test-offset-loop.bz2 test-offset-loop.alt.bz2 \
+ run-prelink-addr-test.sh \
+ testfile52-32.so.bz2 testfile52-32.so.debug.bz2 \
+ testfile52-32.prelink.so.bz2 testfile52-32.noshdrs.so.bz2 \
+ testfile52-64.so.bz2 testfile52-64.so.debug.bz2 \
+ testfile52-64.prelink.so.bz2 testfile52-64.noshdrs.so.bz2 \
+ testfile53-32.bz2 testfile53-32.debug.bz2 \
+ testfile53-32.prelink.bz2 testfile53-64.bz2 \
+ testfile53-64.debug.bz2 testfile53-64.prelink.bz2 \
+ testfile54-32.so.bz2 testfile54-32.so.debug.bz2 \
+ testfile54-32.prelink.so.bz2 testfile54-32.noshdrs.so.bz2 \
+ testfile54-64.so.bz2 testfile54-64.so.debug.bz2 \
+ testfile54-64.prelink.so.bz2 testfile54-64.noshdrs.so.bz2 \
+ testfile55-32.bz2 testfile55-32.debug.bz2 \
+ testfile55-32.prelink.bz2 testfile55-64.bz2 \
+ testfile55-64.debug.bz2 testfile55-64.prelink.bz2 \
+ testfile56.bz2 testfile57.bz2 testfile58.bz2 \
+ run-typeiter.sh testfile59.bz2 \
+ run-readelf-d.sh testlib_dynseg.so.bz2 \
+ run-readelf-gdb_index.sh testfilegdbindex5.bz2 \
+ testfilegdbindex7.bz2 \
+ run-readelf-s.sh testfilebazdbg.bz2 testfilebazdyn.bz2 \
+ testfilebazmin.bz2 testfilebazdbg.debug.bz2 testfilebazmdb.bz2 \
+ testfilebaztab.bz2 testfilebasmin.bz2 testfilebaxmin.bz2 \
+ testfilebazdbg_pl.bz2 testfilebazmin_pl.bz2 \
+ testfilebazdbg_plr.bz2 testfilebazmin_plr.bz2 \
+ testfilebazdbgppc64.bz2 testfilebazdbgppc64.debug.bz2 \
+ testfilebazdbgppc64_pl.bz2 testfilebazdbgppc64_plr.bz2 \
+ testfilebazdynppc64.bz2 testfilebazmdbppc64.bz2 \
+ testfilebazminppc64.bz2 testfilebazminppc64_pl.bz2 \
+ testfilebazminppc64_plr.bz2 testfilebaztabppc64.bz2 \
+ run-dwflsyms.sh \
+ run-unstrip-n.sh testcore-rtlib.bz2 testcore-rtlib-ppc.bz2 \
+ run-low_high_pc.sh testfile_low_high_pc.bz2 \
+ run-macro-test.sh testfile-macinfo.bz2 testfile-macros.bz2 \
+ run-elf_cntl_gelf_getshdr.sh \
+ run-test-archive64.sh testarchive64.a.bz2 \
+ testfile60.bz2 testfile61.bz2 \
+ run-readelf-vmcoreinfo.sh testfile62.bz2 \
+ run-readelf-mixed-corenote.sh testfile63.bz2 testfile64.bz2 \
+ testfile65.bz2 testfile67.bz2 testfile68.bz2 \
+ testfile69.core.bz2 testfile69.so.bz2 \
+ testfile70.core.bz2 testfile70.exec.bz2 testfile71.bz2 \
+ run-dwfllines.sh run-dwfl-report-elf-align.sh \
+ testfile-dwfl-report-elf-align-shlib.so.bz2 \
+ testfilenolines.bz2 test-core-lib.so.bz2 test-core.core.bz2 \
+ test-core.exec.bz2 run-addr2line-test.sh \
+ run-addr2line-i-test.sh testfile-inlines.bz2 \
+ run-addr2line-i-lex-test.sh testfile-lex-inlines.bz2 \
+ testfileppc32.bz2 testfileppc64.bz2 \
+ testfiles390.bz2 testfiles390x.bz2 \
+ testfilearm.bz2 testfileaarch64.bz2 \
+ run-varlocs.sh \
+ testfile_const_type.c testfile_const_type.bz2 \
+ testfile_implicit_pointer.c testfile_implicit_pointer.bz2 \
+ testfile_parameter_ref.c testfile_parameter_ref.bz2 \
+ testfile_entry_value.c testfile_entry_value.bz2 \
+ testfile_implicit_value.c testfile_implicit_value.bz2 \
+ testfile_aarch64_core.bz2 testfile_i686_core.bz2 \
+ run-funcretval.sh funcretval_test.c funcretval_test_aarch64.bz2 \
+ run-backtrace-data.sh run-backtrace-dwarf.sh cleanup-13.c \
+ run-backtrace-native.sh run-backtrace-native-biarch.sh \
+ run-backtrace-native-core.sh run-backtrace-native-core-biarch.sh \
+ run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \
+ backtrace-subr.sh backtrace.i386.core.bz2 backtrace.i386.exec.bz2 \
+ backtrace.x86_64.core.bz2 backtrace.x86_64.exec.bz2 \
+ backtrace.ppc.core.bz2 backtrace.ppc.exec.bz2 \
+ run-backtrace-core-ppc.sh testfile66.bz2 testfile66.core.bz2 \
+ backtrace.s390x.core.bz2 backtrace.s390x.exec.bz2 \
+ backtrace.s390.core.bz2 backtrace.s390.exec.bz2 \
+ run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
+ run-backtrace-core-aarch64.sh \
+ backtrace.aarch64.core.bz2 backtrace.aarch64.exec.bz2 \
+ run-backtrace-demangle.sh testfile-backtrace-demangle.bz2 \
+ testfile-backtrace-demangle.cc \
+ testfile-backtrace-demangle.core.bz2 \
+ run-stack-d-test.sh run-stack-i-test.sh \
+ testfiledwarfinlines.bz2 testfiledwarfinlines.core.bz2 \
+ run-readelf-zdebug.sh testfile-debug.bz2 testfile-zdebug.bz2 \
+ run-deleted.sh run-linkmap-cut.sh linkmap-cut-lib.so.bz2 \
+ linkmap-cut.bz2 linkmap-cut.core.bz2 \
+ run-aggregate-size.sh testfile-sizes1.o.bz2 testfile-sizes2.o.bz2 \
+ testfile-sizes3.o.bz2 \
+ run-readelf-A.sh testfileppc32attrs.o.bz2
+
+#valgrind_cmd = 'valgrind -q --error-exitcode=1 --run-libc-freeres=no'
+installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \
+ bindir=$(DESTDIR)$(bindir); \
+ LC_ALL=C; LANG=C; \
+ VALGRIND_CMD=$(valgrind_cmd); \
+ abs_srcdir=$(abs_srcdir); \
+ abs_builddir=$(abs_builddir); \
+ abs_top_builddir=$(abs_top_builddir); \
+ export abs_srcdir; export abs_builddir; \
+ export abs_top_builddir; \
+ export libdir; export bindir; \
+ export LC_ALL; export LANG; export VALGRIND_CMD; \
+ NM=$(NM); export NM;
+
+installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ installed $(tests_rpath) \
+ '$(program_transform_name)'
+
+TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
+ abs_srcdir=$(abs_srcdir); abs_builddir=$(abs_builddir); \
+ abs_top_builddir=$(abs_top_builddir); \
+ export abs_srcdir; export abs_builddir; \
+ export abs_top_builddir; \
+ export LC_ALL; export LANG; export VALGRIND_CMD; \
+ NM=$(NM); export NM;
+
+#TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
+LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ $(abs_top_builddir)/libdw:$(abs_top_builddir)/backends:$(abs_top_builddir)/libelf:$(abs_top_builddir)/libasm
+
+#LOG_COMPILER = $(installed_LOG_COMPILER)
+libdw = ../libdw/libdw.so
+#libdw = ../libdw/libdw.a $(zip_LIBS) $(libelf) $(libebl) -ldl
+#libdw = -ldw
+libelf = ../libelf/libelf.so
+#libelf = ../libelf/libelf.a
+#libelf = -lelf
+libasm = ../libasm/libasm.so
+#libasm = ../libasm/libasm.a
+#libasm = -lasm
+libebl = ../libebl/libebl.a
+#libebl = -lebl
+libeu = ../lib/libeu.a
+arextract_LDADD = $(libelf)
+arsymtest_LDADD = $(libelf)
+newfile_LDADD = $(libelf)
+saridx_LDADD = $(libelf)
+scnnames_LDADD = $(libelf)
+sectiondump_LDADD = $(libelf)
+showptable_LDADD = $(libelf)
+hash_LDADD = $(libelf)
+test_nlist_LDADD = $(libelf)
+msg_tst_LDADD = $(libelf)
+newscn_LDADD = $(libelf)
+early_offscn_LDADD = $(libelf)
+ecp_LDADD = $(libelf)
+update1_LDADD = $(libelf)
+update2_LDADD = $(libelf)
+update3_LDADD = $(libebl) $(libelf)
+update4_LDADD = $(libebl) $(libelf)
+show_die_info_LDADD = $(libdw) $(libelf)
+get_pubnames_LDADD = $(libdw) $(libelf)
+show_abbrev_LDADD = $(libdw) $(libelf)
+get_lines_LDADD = $(libdw) $(libelf)
+get_files_LDADD = $(libdw) $(libelf)
+get_aranges_LDADD = $(libdw) $(libelf)
+allfcts_LDADD = $(libdw) $(libelf)
+line2addr_LDADD = $(libdw)
+addrscopes_LDADD = $(libdw)
+funcscopes_LDADD = $(libdw)
+funcretval_LDADD = $(libdw)
+allregs_LDADD = $(libdw)
+find_prologues_LDADD = $(libdw)
+#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf)
+asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+rdwrmmap_LDADD = $(libelf)
+dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+arls_LDADD = $(libelf)
+dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwarf_getmacros_LDADD = $(libdw)
+dwarf_getstring_LDADD = $(libdw)
+addrcfi_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+test_flag_nobits_LDADD = $(libelf)
+rerequest_tag_LDADD = $(libdw)
+alldts_LDADD = $(libebl) $(libelf)
+md5_sha1_test_LDADD = $(libeu)
+typeiter_LDADD = $(libdw) $(libelf)
+typeiter2_LDADD = $(libdw) $(libelf)
+low_high_pc_LDADD = $(libdw) $(libelf)
+test_elf_cntl_gelf_getshdr_LDADD = $(libelf)
+dwflsyms_LDADD = $(libdw) $(libelf)
+dwfllines_LDADD = $(libdw) $(libelf)
+dwfl_report_elf_align_LDADD = $(libdw)
+varlocs_LDADD = $(libdw) $(libelf)
+backtrace_LDADD = $(libdw) $(libelf)
+# backtrace-child-biarch also uses those *_CFLAGS and *_LDLAGS variables:
+backtrace_child_CFLAGS = -fPIE
+backtrace_child_LDFLAGS = -pie -pthread
+backtrace_child_biarch_SOURCES = backtrace-child.c
+backtrace_data_LDADD = $(libdw) $(libelf)
+backtrace_dwarf_CFLAGS = -Wno-unused-parameter
+backtrace_dwarf_LDADD = $(libdw) $(libelf)
+debuglink_LDADD = $(libdw) $(libelf)
+debugaltlink_LDADD = $(libdw) $(libelf)
+buildid_LDADD = $(libdw) $(libelf)
+deleted_LDADD = ./deleted-lib.so
+deleted_lib_so_LDFLAGS = -shared -rdynamic
+deleted_lib_so_CFLAGS = -fPIC -fasynchronous-unwind-tables
+aggregate_size_LDADD = $(libdw) $(libelf)
+vdsosyms_LDADD = $(libdw) $(libelf)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/config/eu.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/config/eu.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+addrcfi$(EXEEXT): $(addrcfi_OBJECTS) $(addrcfi_DEPENDENCIES) $(EXTRA_addrcfi_DEPENDENCIES)
+ @rm -f addrcfi$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(addrcfi_OBJECTS) $(addrcfi_LDADD) $(LIBS)
+
+addrscopes$(EXEEXT): $(addrscopes_OBJECTS) $(addrscopes_DEPENDENCIES) $(EXTRA_addrscopes_DEPENDENCIES)
+ @rm -f addrscopes$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(addrscopes_OBJECTS) $(addrscopes_LDADD) $(LIBS)
+
+aggregate_size$(EXEEXT): $(aggregate_size_OBJECTS) $(aggregate_size_DEPENDENCIES) $(EXTRA_aggregate_size_DEPENDENCIES)
+ @rm -f aggregate_size$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(aggregate_size_OBJECTS) $(aggregate_size_LDADD) $(LIBS)
+
+alldts$(EXEEXT): $(alldts_OBJECTS) $(alldts_DEPENDENCIES) $(EXTRA_alldts_DEPENDENCIES)
+ @rm -f alldts$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(alldts_OBJECTS) $(alldts_LDADD) $(LIBS)
+
+allfcts$(EXEEXT): $(allfcts_OBJECTS) $(allfcts_DEPENDENCIES) $(EXTRA_allfcts_DEPENDENCIES)
+ @rm -f allfcts$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(allfcts_OBJECTS) $(allfcts_LDADD) $(LIBS)
+
+allregs$(EXEEXT): $(allregs_OBJECTS) $(allregs_DEPENDENCIES) $(EXTRA_allregs_DEPENDENCIES)
+ @rm -f allregs$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(allregs_OBJECTS) $(allregs_LDADD) $(LIBS)
+
+arextract$(EXEEXT): $(arextract_OBJECTS) $(arextract_DEPENDENCIES) $(EXTRA_arextract_DEPENDENCIES)
+ @rm -f arextract$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(arextract_OBJECTS) $(arextract_LDADD) $(LIBS)
+
+arls$(EXEEXT): $(arls_OBJECTS) $(arls_DEPENDENCIES) $(EXTRA_arls_DEPENDENCIES)
+ @rm -f arls$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(arls_OBJECTS) $(arls_LDADD) $(LIBS)
+
+arsymtest$(EXEEXT): $(arsymtest_OBJECTS) $(arsymtest_DEPENDENCIES) $(EXTRA_arsymtest_DEPENDENCIES)
+ @rm -f arsymtest$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(arsymtest_OBJECTS) $(arsymtest_LDADD) $(LIBS)
+
+asm-tst1$(EXEEXT): $(asm_tst1_OBJECTS) $(asm_tst1_DEPENDENCIES) $(EXTRA_asm_tst1_DEPENDENCIES)
+ @rm -f asm-tst1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst1_OBJECTS) $(asm_tst1_LDADD) $(LIBS)
+
+asm-tst2$(EXEEXT): $(asm_tst2_OBJECTS) $(asm_tst2_DEPENDENCIES) $(EXTRA_asm_tst2_DEPENDENCIES)
+ @rm -f asm-tst2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst2_OBJECTS) $(asm_tst2_LDADD) $(LIBS)
+
+asm-tst3$(EXEEXT): $(asm_tst3_OBJECTS) $(asm_tst3_DEPENDENCIES) $(EXTRA_asm_tst3_DEPENDENCIES)
+ @rm -f asm-tst3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst3_OBJECTS) $(asm_tst3_LDADD) $(LIBS)
+
+asm-tst4$(EXEEXT): $(asm_tst4_OBJECTS) $(asm_tst4_DEPENDENCIES) $(EXTRA_asm_tst4_DEPENDENCIES)
+ @rm -f asm-tst4$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst4_OBJECTS) $(asm_tst4_LDADD) $(LIBS)
+
+asm-tst5$(EXEEXT): $(asm_tst5_OBJECTS) $(asm_tst5_DEPENDENCIES) $(EXTRA_asm_tst5_DEPENDENCIES)
+ @rm -f asm-tst5$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst5_OBJECTS) $(asm_tst5_LDADD) $(LIBS)
+
+asm-tst6$(EXEEXT): $(asm_tst6_OBJECTS) $(asm_tst6_DEPENDENCIES) $(EXTRA_asm_tst6_DEPENDENCIES)
+ @rm -f asm-tst6$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst6_OBJECTS) $(asm_tst6_LDADD) $(LIBS)
+
+asm-tst7$(EXEEXT): $(asm_tst7_OBJECTS) $(asm_tst7_DEPENDENCIES) $(EXTRA_asm_tst7_DEPENDENCIES)
+ @rm -f asm-tst7$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst7_OBJECTS) $(asm_tst7_LDADD) $(LIBS)
+
+asm-tst8$(EXEEXT): $(asm_tst8_OBJECTS) $(asm_tst8_DEPENDENCIES) $(EXTRA_asm_tst8_DEPENDENCIES)
+ @rm -f asm-tst8$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst8_OBJECTS) $(asm_tst8_LDADD) $(LIBS)
+
+asm-tst9$(EXEEXT): $(asm_tst9_OBJECTS) $(asm_tst9_DEPENDENCIES) $(EXTRA_asm_tst9_DEPENDENCIES)
+ @rm -f asm-tst9$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst9_OBJECTS) $(asm_tst9_LDADD) $(LIBS)
+
+backtrace$(EXEEXT): $(backtrace_OBJECTS) $(backtrace_DEPENDENCIES) $(EXTRA_backtrace_DEPENDENCIES)
+ @rm -f backtrace$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(backtrace_OBJECTS) $(backtrace_LDADD) $(LIBS)
+
+backtrace-child$(EXEEXT): $(backtrace_child_OBJECTS) $(backtrace_child_DEPENDENCIES) $(EXTRA_backtrace_child_DEPENDENCIES)
+ @rm -f backtrace-child$(EXEEXT)
+ $(AM_V_CCLD)$(backtrace_child_LINK) $(backtrace_child_OBJECTS) $(backtrace_child_LDADD) $(LIBS)
+
+backtrace-data$(EXEEXT): $(backtrace_data_OBJECTS) $(backtrace_data_DEPENDENCIES) $(EXTRA_backtrace_data_DEPENDENCIES)
+ @rm -f backtrace-data$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(backtrace_data_OBJECTS) $(backtrace_data_LDADD) $(LIBS)
+
+backtrace-dwarf$(EXEEXT): $(backtrace_dwarf_OBJECTS) $(backtrace_dwarf_DEPENDENCIES) $(EXTRA_backtrace_dwarf_DEPENDENCIES)
+ @rm -f backtrace-dwarf$(EXEEXT)
+ $(AM_V_CCLD)$(backtrace_dwarf_LINK) $(backtrace_dwarf_OBJECTS) $(backtrace_dwarf_LDADD) $(LIBS)
+
+buildid$(EXEEXT): $(buildid_OBJECTS) $(buildid_DEPENDENCIES) $(EXTRA_buildid_DEPENDENCIES)
+ @rm -f buildid$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(buildid_OBJECTS) $(buildid_LDADD) $(LIBS)
+
+debugaltlink$(EXEEXT): $(debugaltlink_OBJECTS) $(debugaltlink_DEPENDENCIES) $(EXTRA_debugaltlink_DEPENDENCIES)
+ @rm -f debugaltlink$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(debugaltlink_OBJECTS) $(debugaltlink_LDADD) $(LIBS)
+
+debuglink$(EXEEXT): $(debuglink_OBJECTS) $(debuglink_DEPENDENCIES) $(EXTRA_debuglink_DEPENDENCIES)
+ @rm -f debuglink$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(debuglink_OBJECTS) $(debuglink_LDADD) $(LIBS)
+
+deleted$(EXEEXT): $(deleted_OBJECTS) $(deleted_DEPENDENCIES) $(EXTRA_deleted_DEPENDENCIES)
+ @rm -f deleted$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(deleted_OBJECTS) $(deleted_LDADD) $(LIBS)
+
+deleted-lib.so$(EXEEXT): $(deleted_lib_so_OBJECTS) $(deleted_lib_so_DEPENDENCIES) $(EXTRA_deleted_lib_so_DEPENDENCIES)
+ @rm -f deleted-lib.so$(EXEEXT)
+ $(AM_V_CCLD)$(deleted_lib_so_LINK) $(deleted_lib_so_OBJECTS) $(deleted_lib_so_LDADD) $(LIBS)
+
+dwarf-getmacros$(EXEEXT): $(dwarf_getmacros_OBJECTS) $(dwarf_getmacros_DEPENDENCIES) $(EXTRA_dwarf_getmacros_DEPENDENCIES)
+ @rm -f dwarf-getmacros$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwarf_getmacros_OBJECTS) $(dwarf_getmacros_LDADD) $(LIBS)
+
+dwarf-getstring$(EXEEXT): $(dwarf_getstring_OBJECTS) $(dwarf_getstring_DEPENDENCIES) $(EXTRA_dwarf_getstring_DEPENDENCIES)
+ @rm -f dwarf-getstring$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwarf_getstring_OBJECTS) $(dwarf_getstring_LDADD) $(LIBS)
+
+dwfl-addr-sect$(EXEEXT): $(dwfl_addr_sect_OBJECTS) $(dwfl_addr_sect_DEPENDENCIES) $(EXTRA_dwfl_addr_sect_DEPENDENCIES)
+ @rm -f dwfl-addr-sect$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_addr_sect_OBJECTS) $(dwfl_addr_sect_LDADD) $(LIBS)
+
+dwfl-bug-addr-overflow$(EXEEXT): $(dwfl_bug_addr_overflow_OBJECTS) $(dwfl_bug_addr_overflow_DEPENDENCIES) $(EXTRA_dwfl_bug_addr_overflow_DEPENDENCIES)
+ @rm -f dwfl-bug-addr-overflow$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_bug_addr_overflow_OBJECTS) $(dwfl_bug_addr_overflow_LDADD) $(LIBS)
+
+dwfl-bug-fd-leak$(EXEEXT): $(dwfl_bug_fd_leak_OBJECTS) $(dwfl_bug_fd_leak_DEPENDENCIES) $(EXTRA_dwfl_bug_fd_leak_DEPENDENCIES)
+ @rm -f dwfl-bug-fd-leak$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_bug_fd_leak_OBJECTS) $(dwfl_bug_fd_leak_LDADD) $(LIBS)
+
+dwfl-bug-getmodules$(EXEEXT): $(dwfl_bug_getmodules_OBJECTS) $(dwfl_bug_getmodules_DEPENDENCIES) $(EXTRA_dwfl_bug_getmodules_DEPENDENCIES)
+ @rm -f dwfl-bug-getmodules$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_bug_getmodules_OBJECTS) $(dwfl_bug_getmodules_LDADD) $(LIBS)
+
+dwfl-bug-report$(EXEEXT): $(dwfl_bug_report_OBJECTS) $(dwfl_bug_report_DEPENDENCIES) $(EXTRA_dwfl_bug_report_DEPENDENCIES)
+ @rm -f dwfl-bug-report$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_bug_report_OBJECTS) $(dwfl_bug_report_LDADD) $(LIBS)
+
+dwfl-report-elf-align$(EXEEXT): $(dwfl_report_elf_align_OBJECTS) $(dwfl_report_elf_align_DEPENDENCIES) $(EXTRA_dwfl_report_elf_align_DEPENDENCIES)
+ @rm -f dwfl-report-elf-align$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_report_elf_align_OBJECTS) $(dwfl_report_elf_align_LDADD) $(LIBS)
+
+dwfllines$(EXEEXT): $(dwfllines_OBJECTS) $(dwfllines_DEPENDENCIES) $(EXTRA_dwfllines_DEPENDENCIES)
+ @rm -f dwfllines$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfllines_OBJECTS) $(dwfllines_LDADD) $(LIBS)
+
+dwflmodtest$(EXEEXT): $(dwflmodtest_OBJECTS) $(dwflmodtest_DEPENDENCIES) $(EXTRA_dwflmodtest_DEPENDENCIES)
+ @rm -f dwflmodtest$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwflmodtest_OBJECTS) $(dwflmodtest_LDADD) $(LIBS)
+
+dwflsyms$(EXEEXT): $(dwflsyms_OBJECTS) $(dwflsyms_DEPENDENCIES) $(EXTRA_dwflsyms_DEPENDENCIES)
+ @rm -f dwflsyms$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwflsyms_OBJECTS) $(dwflsyms_LDADD) $(LIBS)
+
+early-offscn$(EXEEXT): $(early_offscn_OBJECTS) $(early_offscn_DEPENDENCIES) $(EXTRA_early_offscn_DEPENDENCIES)
+ @rm -f early-offscn$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(early_offscn_OBJECTS) $(early_offscn_LDADD) $(LIBS)
+
+ecp$(EXEEXT): $(ecp_OBJECTS) $(ecp_DEPENDENCIES) $(EXTRA_ecp_DEPENDENCIES)
+ @rm -f ecp$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ecp_OBJECTS) $(ecp_LDADD) $(LIBS)
+
+find-prologues$(EXEEXT): $(find_prologues_OBJECTS) $(find_prologues_DEPENDENCIES) $(EXTRA_find_prologues_DEPENDENCIES)
+ @rm -f find-prologues$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(find_prologues_OBJECTS) $(find_prologues_LDADD) $(LIBS)
+
+funcretval$(EXEEXT): $(funcretval_OBJECTS) $(funcretval_DEPENDENCIES) $(EXTRA_funcretval_DEPENDENCIES)
+ @rm -f funcretval$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(funcretval_OBJECTS) $(funcretval_LDADD) $(LIBS)
+
+funcscopes$(EXEEXT): $(funcscopes_OBJECTS) $(funcscopes_DEPENDENCIES) $(EXTRA_funcscopes_DEPENDENCIES)
+ @rm -f funcscopes$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(funcscopes_OBJECTS) $(funcscopes_LDADD) $(LIBS)
+
+get-aranges$(EXEEXT): $(get_aranges_OBJECTS) $(get_aranges_DEPENDENCIES) $(EXTRA_get_aranges_DEPENDENCIES)
+ @rm -f get-aranges$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(get_aranges_OBJECTS) $(get_aranges_LDADD) $(LIBS)
+
+get-files$(EXEEXT): $(get_files_OBJECTS) $(get_files_DEPENDENCIES) $(EXTRA_get_files_DEPENDENCIES)
+ @rm -f get-files$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(get_files_OBJECTS) $(get_files_LDADD) $(LIBS)
+
+get-lines$(EXEEXT): $(get_lines_OBJECTS) $(get_lines_DEPENDENCIES) $(EXTRA_get_lines_DEPENDENCIES)
+ @rm -f get-lines$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(get_lines_OBJECTS) $(get_lines_LDADD) $(LIBS)
+
+get-pubnames$(EXEEXT): $(get_pubnames_OBJECTS) $(get_pubnames_DEPENDENCIES) $(EXTRA_get_pubnames_DEPENDENCIES)
+ @rm -f get-pubnames$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(get_pubnames_OBJECTS) $(get_pubnames_LDADD) $(LIBS)
+
+hash$(EXEEXT): $(hash_OBJECTS) $(hash_DEPENDENCIES) $(EXTRA_hash_DEPENDENCIES)
+ @rm -f hash$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(hash_OBJECTS) $(hash_LDADD) $(LIBS)
+
+line2addr$(EXEEXT): $(line2addr_OBJECTS) $(line2addr_DEPENDENCIES) $(EXTRA_line2addr_DEPENDENCIES)
+ @rm -f line2addr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(line2addr_OBJECTS) $(line2addr_LDADD) $(LIBS)
+
+low_high_pc$(EXEEXT): $(low_high_pc_OBJECTS) $(low_high_pc_DEPENDENCIES) $(EXTRA_low_high_pc_DEPENDENCIES)
+ @rm -f low_high_pc$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(low_high_pc_OBJECTS) $(low_high_pc_LDADD) $(LIBS)
+
+md5-sha1-test$(EXEEXT): $(md5_sha1_test_OBJECTS) $(md5_sha1_test_DEPENDENCIES) $(EXTRA_md5_sha1_test_DEPENDENCIES)
+ @rm -f md5-sha1-test$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(md5_sha1_test_OBJECTS) $(md5_sha1_test_LDADD) $(LIBS)
+
+msg_tst$(EXEEXT): $(msg_tst_OBJECTS) $(msg_tst_DEPENDENCIES) $(EXTRA_msg_tst_DEPENDENCIES)
+ @rm -f msg_tst$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(msg_tst_OBJECTS) $(msg_tst_LDADD) $(LIBS)
+
+newfile$(EXEEXT): $(newfile_OBJECTS) $(newfile_DEPENDENCIES) $(EXTRA_newfile_DEPENDENCIES)
+ @rm -f newfile$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(newfile_OBJECTS) $(newfile_LDADD) $(LIBS)
+
+newscn$(EXEEXT): $(newscn_OBJECTS) $(newscn_DEPENDENCIES) $(EXTRA_newscn_DEPENDENCIES)
+ @rm -f newscn$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(newscn_OBJECTS) $(newscn_LDADD) $(LIBS)
+
+rdwrmmap$(EXEEXT): $(rdwrmmap_OBJECTS) $(rdwrmmap_DEPENDENCIES) $(EXTRA_rdwrmmap_DEPENDENCIES)
+ @rm -f rdwrmmap$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(rdwrmmap_OBJECTS) $(rdwrmmap_LDADD) $(LIBS)
+
+rerequest_tag$(EXEEXT): $(rerequest_tag_OBJECTS) $(rerequest_tag_DEPENDENCIES) $(EXTRA_rerequest_tag_DEPENDENCIES)
+ @rm -f rerequest_tag$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(rerequest_tag_OBJECTS) $(rerequest_tag_LDADD) $(LIBS)
+
+saridx$(EXEEXT): $(saridx_OBJECTS) $(saridx_DEPENDENCIES) $(EXTRA_saridx_DEPENDENCIES)
+ @rm -f saridx$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(saridx_OBJECTS) $(saridx_LDADD) $(LIBS)
+
+scnnames$(EXEEXT): $(scnnames_OBJECTS) $(scnnames_DEPENDENCIES) $(EXTRA_scnnames_DEPENDENCIES)
+ @rm -f scnnames$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(scnnames_OBJECTS) $(scnnames_LDADD) $(LIBS)
+
+sectiondump$(EXEEXT): $(sectiondump_OBJECTS) $(sectiondump_DEPENDENCIES) $(EXTRA_sectiondump_DEPENDENCIES)
+ @rm -f sectiondump$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sectiondump_OBJECTS) $(sectiondump_LDADD) $(LIBS)
+
+show-abbrev$(EXEEXT): $(show_abbrev_OBJECTS) $(show_abbrev_DEPENDENCIES) $(EXTRA_show_abbrev_DEPENDENCIES)
+ @rm -f show-abbrev$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(show_abbrev_OBJECTS) $(show_abbrev_LDADD) $(LIBS)
+
+show-die-info$(EXEEXT): $(show_die_info_OBJECTS) $(show_die_info_DEPENDENCIES) $(EXTRA_show_die_info_DEPENDENCIES)
+ @rm -f show-die-info$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(show_die_info_OBJECTS) $(show_die_info_LDADD) $(LIBS)
+
+showptable$(EXEEXT): $(showptable_OBJECTS) $(showptable_DEPENDENCIES) $(EXTRA_showptable_DEPENDENCIES)
+ @rm -f showptable$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(showptable_OBJECTS) $(showptable_LDADD) $(LIBS)
+
+test-elf_cntl_gelf_getshdr$(EXEEXT): $(test_elf_cntl_gelf_getshdr_OBJECTS) $(test_elf_cntl_gelf_getshdr_DEPENDENCIES) $(EXTRA_test_elf_cntl_gelf_getshdr_DEPENDENCIES)
+ @rm -f test-elf_cntl_gelf_getshdr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_elf_cntl_gelf_getshdr_OBJECTS) $(test_elf_cntl_gelf_getshdr_LDADD) $(LIBS)
+
+test-flag-nobits$(EXEEXT): $(test_flag_nobits_OBJECTS) $(test_flag_nobits_DEPENDENCIES) $(EXTRA_test_flag_nobits_DEPENDENCIES)
+ @rm -f test-flag-nobits$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_flag_nobits_OBJECTS) $(test_flag_nobits_LDADD) $(LIBS)
+
+test-nlist$(EXEEXT): $(test_nlist_OBJECTS) $(test_nlist_DEPENDENCIES) $(EXTRA_test_nlist_DEPENDENCIES)
+ @rm -f test-nlist$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_nlist_OBJECTS) $(test_nlist_LDADD) $(LIBS)
+
+typeiter$(EXEEXT): $(typeiter_OBJECTS) $(typeiter_DEPENDENCIES) $(EXTRA_typeiter_DEPENDENCIES)
+ @rm -f typeiter$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(typeiter_OBJECTS) $(typeiter_LDADD) $(LIBS)
+
+typeiter2$(EXEEXT): $(typeiter2_OBJECTS) $(typeiter2_DEPENDENCIES) $(EXTRA_typeiter2_DEPENDENCIES)
+ @rm -f typeiter2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(typeiter2_OBJECTS) $(typeiter2_LDADD) $(LIBS)
+
+update1$(EXEEXT): $(update1_OBJECTS) $(update1_DEPENDENCIES) $(EXTRA_update1_DEPENDENCIES)
+ @rm -f update1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(update1_OBJECTS) $(update1_LDADD) $(LIBS)
+
+update2$(EXEEXT): $(update2_OBJECTS) $(update2_DEPENDENCIES) $(EXTRA_update2_DEPENDENCIES)
+ @rm -f update2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(update2_OBJECTS) $(update2_LDADD) $(LIBS)
+
+update3$(EXEEXT): $(update3_OBJECTS) $(update3_DEPENDENCIES) $(EXTRA_update3_DEPENDENCIES)
+ @rm -f update3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(update3_OBJECTS) $(update3_LDADD) $(LIBS)
+
+update4$(EXEEXT): $(update4_OBJECTS) $(update4_DEPENDENCIES) $(EXTRA_update4_DEPENDENCIES)
+ @rm -f update4$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(update4_OBJECTS) $(update4_LDADD) $(LIBS)
+
+varlocs$(EXEEXT): $(varlocs_OBJECTS) $(varlocs_DEPENDENCIES) $(EXTRA_varlocs_DEPENDENCIES)
+ @rm -f varlocs$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(varlocs_OBJECTS) $(varlocs_LDADD) $(LIBS)
+
+vdsosyms$(EXEEXT): $(vdsosyms_OBJECTS) $(vdsosyms_DEPENDENCIES) $(EXTRA_vdsosyms_DEPENDENCIES)
+ @rm -f vdsosyms$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(vdsosyms_OBJECTS) $(vdsosyms_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+include ./$(DEPDIR)/addrcfi.Po
+include ./$(DEPDIR)/addrscopes.Po
+include ./$(DEPDIR)/aggregate_size.Po
+include ./$(DEPDIR)/alldts.Po
+include ./$(DEPDIR)/allfcts.Po
+include ./$(DEPDIR)/allregs.Po
+include ./$(DEPDIR)/arextract.Po
+include ./$(DEPDIR)/arls.Po
+include ./$(DEPDIR)/arsymtest.Po
+include ./$(DEPDIR)/asm-tst1.Po
+include ./$(DEPDIR)/asm-tst2.Po
+include ./$(DEPDIR)/asm-tst3.Po
+include ./$(DEPDIR)/asm-tst4.Po
+include ./$(DEPDIR)/asm-tst5.Po
+include ./$(DEPDIR)/asm-tst6.Po
+include ./$(DEPDIR)/asm-tst7.Po
+include ./$(DEPDIR)/asm-tst8.Po
+include ./$(DEPDIR)/asm-tst9.Po
+include ./$(DEPDIR)/backtrace-child.Po
+include ./$(DEPDIR)/backtrace-data.Po
+include ./$(DEPDIR)/backtrace.Po
+include ./$(DEPDIR)/backtrace_child-backtrace-child.Po
+include ./$(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Po
+include ./$(DEPDIR)/buildid.Po
+include ./$(DEPDIR)/debugaltlink.Po
+include ./$(DEPDIR)/debuglink.Po
+include ./$(DEPDIR)/deleted.Po
+include ./$(DEPDIR)/deleted_lib_so-deleted-lib.Po
+include ./$(DEPDIR)/dwarf-getmacros.Po
+include ./$(DEPDIR)/dwarf-getstring.Po
+include ./$(DEPDIR)/dwfl-addr-sect.Po
+include ./$(DEPDIR)/dwfl-bug-addr-overflow.Po
+include ./$(DEPDIR)/dwfl-bug-fd-leak.Po
+include ./$(DEPDIR)/dwfl-bug-getmodules.Po
+include ./$(DEPDIR)/dwfl-bug-report.Po
+include ./$(DEPDIR)/dwfl-report-elf-align.Po
+include ./$(DEPDIR)/dwfllines.Po
+include ./$(DEPDIR)/dwflmodtest.Po
+include ./$(DEPDIR)/dwflsyms.Po
+include ./$(DEPDIR)/early-offscn.Po
+include ./$(DEPDIR)/ecp.Po
+include ./$(DEPDIR)/find-prologues.Po
+include ./$(DEPDIR)/funcretval.Po
+include ./$(DEPDIR)/funcscopes.Po
+include ./$(DEPDIR)/get-aranges.Po
+include ./$(DEPDIR)/get-files.Po
+include ./$(DEPDIR)/get-lines.Po
+include ./$(DEPDIR)/get-pubnames.Po
+include ./$(DEPDIR)/hash.Po
+include ./$(DEPDIR)/line2addr.Po
+include ./$(DEPDIR)/low_high_pc.Po
+include ./$(DEPDIR)/md5-sha1-test.Po
+include ./$(DEPDIR)/msg_tst.Po
+include ./$(DEPDIR)/newfile.Po
+include ./$(DEPDIR)/newscn.Po
+include ./$(DEPDIR)/rdwrmmap.Po
+include ./$(DEPDIR)/rerequest_tag.Po
+include ./$(DEPDIR)/saridx.Po
+include ./$(DEPDIR)/scnnames.Po
+include ./$(DEPDIR)/sectiondump.Po
+include ./$(DEPDIR)/show-abbrev.Po
+include ./$(DEPDIR)/show-die-info.Po
+include ./$(DEPDIR)/showptable.Po
+include ./$(DEPDIR)/test-elf_cntl_gelf_getshdr.Po
+include ./$(DEPDIR)/test-flag-nobits.Po
+include ./$(DEPDIR)/test-nlist.Po
+include ./$(DEPDIR)/typeiter.Po
+include ./$(DEPDIR)/typeiter2.Po
+include ./$(DEPDIR)/update1.Po
+include ./$(DEPDIR)/update2.Po
+include ./$(DEPDIR)/update3.Po
+include ./$(DEPDIR)/update4.Po
+include ./$(DEPDIR)/varlocs.Po
+include ./$(DEPDIR)/vdsosyms.Po
+
+.c.o:
+ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+# $(AM_V_CC)source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+# $(AM_V_CC)source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+backtrace_child-backtrace-child.o: backtrace-child.c
+ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_child_CFLAGS) $(CFLAGS) -MT backtrace_child-backtrace-child.o -MD -MP -MF $(DEPDIR)/backtrace_child-backtrace-child.Tpo -c -o backtrace_child-backtrace-child.o `test -f 'backtrace-child.c' || echo '$(srcdir)/'`backtrace-child.c
+ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace_child-backtrace-child.Tpo $(DEPDIR)/backtrace_child-backtrace-child.Po
+# $(AM_V_CC)source='backtrace-child.c' object='backtrace_child-backtrace-child.o' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_child_CFLAGS) $(CFLAGS) -c -o backtrace_child-backtrace-child.o `test -f 'backtrace-child.c' || echo '$(srcdir)/'`backtrace-child.c
+
+backtrace_child-backtrace-child.obj: backtrace-child.c
+ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_child_CFLAGS) $(CFLAGS) -MT backtrace_child-backtrace-child.obj -MD -MP -MF $(DEPDIR)/backtrace_child-backtrace-child.Tpo -c -o backtrace_child-backtrace-child.obj `if test -f 'backtrace-child.c'; then $(CYGPATH_W) 'backtrace-child.c'; else $(CYGPATH_W) '$(srcdir)/backtrace-child.c'; fi`
+ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace_child-backtrace-child.Tpo $(DEPDIR)/backtrace_child-backtrace-child.Po
+# $(AM_V_CC)source='backtrace-child.c' object='backtrace_child-backtrace-child.obj' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_child_CFLAGS) $(CFLAGS) -c -o backtrace_child-backtrace-child.obj `if test -f 'backtrace-child.c'; then $(CYGPATH_W) 'backtrace-child.c'; else $(CYGPATH_W) '$(srcdir)/backtrace-child.c'; fi`
+
+backtrace_dwarf-backtrace-dwarf.o: backtrace-dwarf.c
+ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_dwarf_CFLAGS) $(CFLAGS) -MT backtrace_dwarf-backtrace-dwarf.o -MD -MP -MF $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Tpo -c -o backtrace_dwarf-backtrace-dwarf.o `test -f 'backtrace-dwarf.c' || echo '$(srcdir)/'`backtrace-dwarf.c
+ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Tpo $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Po
+# $(AM_V_CC)source='backtrace-dwarf.c' object='backtrace_dwarf-backtrace-dwarf.o' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_dwarf_CFLAGS) $(CFLAGS) -c -o backtrace_dwarf-backtrace-dwarf.o `test -f 'backtrace-dwarf.c' || echo '$(srcdir)/'`backtrace-dwarf.c
+
+backtrace_dwarf-backtrace-dwarf.obj: backtrace-dwarf.c
+ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_dwarf_CFLAGS) $(CFLAGS) -MT backtrace_dwarf-backtrace-dwarf.obj -MD -MP -MF $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Tpo -c -o backtrace_dwarf-backtrace-dwarf.obj `if test -f 'backtrace-dwarf.c'; then $(CYGPATH_W) 'backtrace-dwarf.c'; else $(CYGPATH_W) '$(srcdir)/backtrace-dwarf.c'; fi`
+ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Tpo $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Po
+# $(AM_V_CC)source='backtrace-dwarf.c' object='backtrace_dwarf-backtrace-dwarf.obj' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_dwarf_CFLAGS) $(CFLAGS) -c -o backtrace_dwarf-backtrace-dwarf.obj `if test -f 'backtrace-dwarf.c'; then $(CYGPATH_W) 'backtrace-dwarf.c'; else $(CYGPATH_W) '$(srcdir)/backtrace-dwarf.c'; fi`
+
+deleted_lib_so-deleted-lib.o: deleted-lib.c
+ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -MT deleted_lib_so-deleted-lib.o -MD -MP -MF $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo -c -o deleted_lib_so-deleted-lib.o `test -f 'deleted-lib.c' || echo '$(srcdir)/'`deleted-lib.c
+ $(AM_V_at)$(am__mv) $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo $(DEPDIR)/deleted_lib_so-deleted-lib.Po
+# $(AM_V_CC)source='deleted-lib.c' object='deleted_lib_so-deleted-lib.o' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -c -o deleted_lib_so-deleted-lib.o `test -f 'deleted-lib.c' || echo '$(srcdir)/'`deleted-lib.c
+
+deleted_lib_so-deleted-lib.obj: deleted-lib.c
+ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -MT deleted_lib_so-deleted-lib.obj -MD -MP -MF $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo -c -o deleted_lib_so-deleted-lib.obj `if test -f 'deleted-lib.c'; then $(CYGPATH_W) 'deleted-lib.c'; else $(CYGPATH_W) '$(srcdir)/deleted-lib.c'; fi`
+ $(AM_V_at)$(am__mv) $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo $(DEPDIR)/deleted_lib_so-deleted-lib.Po
+# $(AM_V_CC)source='deleted-lib.c' object='deleted_lib_so-deleted-lib.obj' libtool=no \
+# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -c -o deleted_lib_so-deleted-lib.obj `if test -f 'deleted-lib.c'; then $(CYGPATH_W) 'deleted-lib.c'; else $(CYGPATH_W) '$(srcdir)/deleted-lib.c'; fi`
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ else \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+run-arextract.sh.log: run-arextract.sh
+ @p='run-arextract.sh'; \
+ b='run-arextract.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-arsymtest.sh.log: run-arsymtest.sh
+ @p='run-arsymtest.sh'; \
+ b='run-arsymtest.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+newfile.log: newfile$(EXEEXT)
+ @p='newfile$(EXEEXT)'; \
+ b='newfile'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-nlist.log: test-nlist$(EXEEXT)
+ @p='test-nlist$(EXEEXT)'; \
+ b='test-nlist'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+update1.log: update1$(EXEEXT)
+ @p='update1$(EXEEXT)'; \
+ b='update1'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+update2.log: update2$(EXEEXT)
+ @p='update2$(EXEEXT)'; \
+ b='update2'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+update3.log: update3$(EXEEXT)
+ @p='update3$(EXEEXT)'; \
+ b='update3'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+update4.log: update4$(EXEEXT)
+ @p='update4$(EXEEXT)'; \
+ b='update4'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-show-die-info.sh.log: run-show-die-info.sh
+ @p='run-show-die-info.sh'; \
+ b='run-show-die-info.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-get-files.sh.log: run-get-files.sh
+ @p='run-get-files.sh'; \
+ b='run-get-files.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-get-lines.sh.log: run-get-lines.sh
+ @p='run-get-lines.sh'; \
+ b='run-get-lines.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-get-pubnames.sh.log: run-get-pubnames.sh
+ @p='run-get-pubnames.sh'; \
+ b='run-get-pubnames.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-get-aranges.sh.log: run-get-aranges.sh
+ @p='run-get-aranges.sh'; \
+ b='run-get-aranges.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-allfcts.sh.log: run-allfcts.sh
+ @p='run-allfcts.sh'; \
+ b='run-allfcts.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-show-abbrev.sh.log: run-show-abbrev.sh
+ @p='run-show-abbrev.sh'; \
+ b='run-show-abbrev.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-line2addr.sh.log: run-line2addr.sh
+ @p='run-line2addr.sh'; \
+ b='run-line2addr.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+hash.log: hash$(EXEEXT)
+ @p='hash$(EXEEXT)'; \
+ b='hash'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+newscn.log: newscn$(EXEEXT)
+ @p='newscn$(EXEEXT)'; \
+ b='newscn'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test.sh.log: run-strip-test.sh
+ @p='run-strip-test.sh'; \
+ b='run-strip-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test2.sh.log: run-strip-test2.sh
+ @p='run-strip-test2.sh'; \
+ b='run-strip-test2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test3.sh.log: run-strip-test3.sh
+ @p='run-strip-test3.sh'; \
+ b='run-strip-test3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test4.sh.log: run-strip-test4.sh
+ @p='run-strip-test4.sh'; \
+ b='run-strip-test4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test5.sh.log: run-strip-test5.sh
+ @p='run-strip-test5.sh'; \
+ b='run-strip-test5.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test6.sh.log: run-strip-test6.sh
+ @p='run-strip-test6.sh'; \
+ b='run-strip-test6.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test7.sh.log: run-strip-test7.sh
+ @p='run-strip-test7.sh'; \
+ b='run-strip-test7.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test8.sh.log: run-strip-test8.sh
+ @p='run-strip-test8.sh'; \
+ b='run-strip-test8.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-groups.sh.log: run-strip-groups.sh
+ @p='run-strip-groups.sh'; \
+ b='run-strip-groups.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-reloc.sh.log: run-strip-reloc.sh
+ @p='run-strip-reloc.sh'; \
+ b='run-strip-reloc.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-unstrip-test.sh.log: run-unstrip-test.sh
+ @p='run-unstrip-test.sh'; \
+ b='run-unstrip-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-unstrip-test2.sh.log: run-unstrip-test2.sh
+ @p='run-unstrip-test2.sh'; \
+ b='run-unstrip-test2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-unstrip-M.sh.log: run-unstrip-M.sh
+ @p='run-unstrip-M.sh'; \
+ b='run-unstrip-M.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ecp-test.sh.log: run-ecp-test.sh
+ @p='run-ecp-test.sh'; \
+ b='run-ecp-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ecp-test2.sh.log: run-ecp-test2.sh
+ @p='run-ecp-test2.sh'; \
+ b='run-ecp-test2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-alldts.sh.log: run-alldts.sh
+ @p='run-alldts.sh'; \
+ b='run-alldts.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-elflint-test.sh.log: run-elflint-test.sh
+ @p='run-elflint-test.sh'; \
+ b='run-elflint-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-elflint-self.sh.log: run-elflint-self.sh
+ @p='run-elflint-self.sh'; \
+ b='run-elflint-self.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ranlib-test.sh.log: run-ranlib-test.sh
+ @p='run-ranlib-test.sh'; \
+ b='run-ranlib-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ranlib-test2.sh.log: run-ranlib-test2.sh
+ @p='run-ranlib-test2.sh'; \
+ b='run-ranlib-test2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ranlib-test3.sh.log: run-ranlib-test3.sh
+ @p='run-ranlib-test3.sh'; \
+ b='run-ranlib-test3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ranlib-test4.sh.log: run-ranlib-test4.sh
+ @p='run-ranlib-test4.sh'; \
+ b='run-ranlib-test4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addrscopes.sh.log: run-addrscopes.sh
+ @p='run-addrscopes.sh'; \
+ b='run-addrscopes.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strings-test.sh.log: run-strings-test.sh
+ @p='run-strings-test.sh'; \
+ b='run-strings-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-funcscopes.sh.log: run-funcscopes.sh
+ @p='run-funcscopes.sh'; \
+ b='run-funcscopes.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-find-prologues.sh.log: run-find-prologues.sh
+ @p='run-find-prologues.sh'; \
+ b='run-find-prologues.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-allregs.sh.log: run-allregs.sh
+ @p='run-allregs.sh'; \
+ b='run-allregs.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addrcfi.sh.log: run-addrcfi.sh
+ @p='run-addrcfi.sh'; \
+ b='run-addrcfi.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-nm-self.sh.log: run-nm-self.sh
+ @p='run-nm-self.sh'; \
+ b='run-nm-self.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-self.sh.log: run-readelf-self.sh
+ @p='run-readelf-self.sh'; \
+ b='run-readelf-self.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-test1.sh.log: run-readelf-test1.sh
+ @p='run-readelf-test1.sh'; \
+ b='run-readelf-test1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-test2.sh.log: run-readelf-test2.sh
+ @p='run-readelf-test2.sh'; \
+ b='run-readelf-test2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-test3.sh.log: run-readelf-test3.sh
+ @p='run-readelf-test3.sh'; \
+ b='run-readelf-test3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-test4.sh.log: run-readelf-test4.sh
+ @p='run-readelf-test4.sh'; \
+ b='run-readelf-test4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-twofiles.sh.log: run-readelf-twofiles.sh
+ @p='run-readelf-twofiles.sh'; \
+ b='run-readelf-twofiles.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-macro.sh.log: run-readelf-macro.sh
+ @p='run-readelf-macro.sh'; \
+ b='run-readelf-macro.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-loc.sh.log: run-readelf-loc.sh
+ @p='run-readelf-loc.sh'; \
+ b='run-readelf-loc.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-aranges.sh.log: run-readelf-aranges.sh
+ @p='run-readelf-aranges.sh'; \
+ b='run-readelf-aranges.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-line.sh.log: run-readelf-line.sh
+ @p='run-readelf-line.sh'; \
+ b='run-readelf-line.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-native-test.sh.log: run-native-test.sh
+ @p='run-native-test.sh'; \
+ b='run-native-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-bug1-test.sh.log: run-bug1-test.sh
+ @p='run-bug1-test.sh'; \
+ b='run-bug1-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-debuglink.sh.log: run-debuglink.sh
+ @p='run-debuglink.sh'; \
+ b='run-debuglink.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-debugaltlink.sh.log: run-debugaltlink.sh
+ @p='run-debugaltlink.sh'; \
+ b='run-debugaltlink.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-buildid.sh.log: run-buildid.sh
+ @p='run-buildid.sh'; \
+ b='run-buildid.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+dwfl-bug-addr-overflow.log: dwfl-bug-addr-overflow$(EXEEXT)
+ @p='dwfl-bug-addr-overflow$(EXEEXT)'; \
+ b='dwfl-bug-addr-overflow'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addrname-test.sh.log: run-addrname-test.sh
+ @p='run-addrname-test.sh'; \
+ b='run-addrname-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+dwfl-bug-fd-leak.log: dwfl-bug-fd-leak$(EXEEXT)
+ @p='dwfl-bug-fd-leak$(EXEEXT)'; \
+ b='dwfl-bug-fd-leak'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+dwfl-bug-report.log: dwfl-bug-report$(EXEEXT)
+ @p='dwfl-bug-report$(EXEEXT)'; \
+ b='dwfl-bug-report'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwfl-bug-offline-rel.sh.log: run-dwfl-bug-offline-rel.sh
+ @p='run-dwfl-bug-offline-rel.sh'; \
+ b='run-dwfl-bug-offline-rel.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwfl-addr-sect.sh.log: run-dwfl-addr-sect.sh
+ @p='run-dwfl-addr-sect.sh'; \
+ b='run-dwfl-addr-sect.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-disasm-x86.sh.log: run-disasm-x86.sh
+ @p='run-disasm-x86.sh'; \
+ b='run-disasm-x86.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-disasm-x86-64.sh.log: run-disasm-x86-64.sh
+ @p='run-disasm-x86-64.sh'; \
+ b='run-disasm-x86-64.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-early-offscn.sh.log: run-early-offscn.sh
+ @p='run-early-offscn.sh'; \
+ b='run-early-offscn.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwarf-getmacros.sh.log: run-dwarf-getmacros.sh
+ @p='run-dwarf-getmacros.sh'; \
+ b='run-dwarf-getmacros.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-test-flag-nobits.sh.log: run-test-flag-nobits.sh
+ @p='run-test-flag-nobits.sh'; \
+ b='run-test-flag-nobits.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-prelink-addr-test.sh.log: run-prelink-addr-test.sh
+ @p='run-prelink-addr-test.sh'; \
+ b='run-prelink-addr-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwarf-getstring.sh.log: run-dwarf-getstring.sh
+ @p='run-dwarf-getstring.sh'; \
+ b='run-dwarf-getstring.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-rerequest_tag.sh.log: run-rerequest_tag.sh
+ @p='run-rerequest_tag.sh'; \
+ b='run-rerequest_tag.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-typeiter.sh.log: run-typeiter.sh
+ @p='run-typeiter.sh'; \
+ b='run-typeiter.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-d.sh.log: run-readelf-d.sh
+ @p='run-readelf-d.sh'; \
+ b='run-readelf-d.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-gdb_index.sh.log: run-readelf-gdb_index.sh
+ @p='run-readelf-gdb_index.sh'; \
+ b='run-readelf-gdb_index.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-unstrip-n.sh.log: run-unstrip-n.sh
+ @p='run-unstrip-n.sh'; \
+ b='run-unstrip-n.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-low_high_pc.sh.log: run-low_high_pc.sh
+ @p='run-low_high_pc.sh'; \
+ b='run-low_high_pc.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-macro-test.sh.log: run-macro-test.sh
+ @p='run-macro-test.sh'; \
+ b='run-macro-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-elf_cntl_gelf_getshdr.sh.log: run-elf_cntl_gelf_getshdr.sh
+ @p='run-elf_cntl_gelf_getshdr.sh'; \
+ b='run-elf_cntl_gelf_getshdr.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-test-archive64.sh.log: run-test-archive64.sh
+ @p='run-test-archive64.sh'; \
+ b='run-test-archive64.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-vmcoreinfo.sh.log: run-readelf-vmcoreinfo.sh
+ @p='run-readelf-vmcoreinfo.sh'; \
+ b='run-readelf-vmcoreinfo.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-mixed-corenote.sh.log: run-readelf-mixed-corenote.sh
+ @p='run-readelf-mixed-corenote.sh'; \
+ b='run-readelf-mixed-corenote.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwfllines.sh.log: run-dwfllines.sh
+ @p='run-dwfllines.sh'; \
+ b='run-dwfllines.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwfl-report-elf-align.sh.log: run-dwfl-report-elf-align.sh
+ @p='run-dwfl-report-elf-align.sh'; \
+ b='run-dwfl-report-elf-align.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addr2line-test.sh.log: run-addr2line-test.sh
+ @p='run-addr2line-test.sh'; \
+ b='run-addr2line-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addr2line-i-test.sh.log: run-addr2line-i-test.sh
+ @p='run-addr2line-i-test.sh'; \
+ b='run-addr2line-i-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addr2line-i-lex-test.sh.log: run-addr2line-i-lex-test.sh
+ @p='run-addr2line-i-lex-test.sh'; \
+ b='run-addr2line-i-lex-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-varlocs.sh.log: run-varlocs.sh
+ @p='run-varlocs.sh'; \
+ b='run-varlocs.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-funcretval.sh.log: run-funcretval.sh
+ @p='run-funcretval.sh'; \
+ b='run-funcretval.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-native.sh.log: run-backtrace-native.sh
+ @p='run-backtrace-native.sh'; \
+ b='run-backtrace-native.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-data.sh.log: run-backtrace-data.sh
+ @p='run-backtrace-data.sh'; \
+ b='run-backtrace-data.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-dwarf.sh.log: run-backtrace-dwarf.sh
+ @p='run-backtrace-dwarf.sh'; \
+ b='run-backtrace-dwarf.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-native-biarch.sh.log: run-backtrace-native-biarch.sh
+ @p='run-backtrace-native-biarch.sh'; \
+ b='run-backtrace-native-biarch.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-native-core.sh.log: run-backtrace-native-core.sh
+ @p='run-backtrace-native-core.sh'; \
+ b='run-backtrace-native-core.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-native-core-biarch.sh.log: run-backtrace-native-core-biarch.sh
+ @p='run-backtrace-native-core-biarch.sh'; \
+ b='run-backtrace-native-core-biarch.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-x86_64.sh.log: run-backtrace-core-x86_64.sh
+ @p='run-backtrace-core-x86_64.sh'; \
+ b='run-backtrace-core-x86_64.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-i386.sh.log: run-backtrace-core-i386.sh
+ @p='run-backtrace-core-i386.sh'; \
+ b='run-backtrace-core-i386.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-ppc.sh.log: run-backtrace-core-ppc.sh
+ @p='run-backtrace-core-ppc.sh'; \
+ b='run-backtrace-core-ppc.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-s390x.sh.log: run-backtrace-core-s390x.sh
+ @p='run-backtrace-core-s390x.sh'; \
+ b='run-backtrace-core-s390x.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-s390.sh.log: run-backtrace-core-s390.sh
+ @p='run-backtrace-core-s390.sh'; \
+ b='run-backtrace-core-s390.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-aarch64.sh.log: run-backtrace-core-aarch64.sh
+ @p='run-backtrace-core-aarch64.sh'; \
+ b='run-backtrace-core-aarch64.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-demangle.sh.log: run-backtrace-demangle.sh
+ @p='run-backtrace-demangle.sh'; \
+ b='run-backtrace-demangle.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-stack-d-test.sh.log: run-stack-d-test.sh
+ @p='run-stack-d-test.sh'; \
+ b='run-stack-d-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-stack-i-test.sh.log: run-stack-i-test.sh
+ @p='run-stack-i-test.sh'; \
+ b='run-stack-i-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-dwz-multi.sh.log: run-readelf-dwz-multi.sh
+ @p='run-readelf-dwz-multi.sh'; \
+ b='run-readelf-dwz-multi.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-allfcts-multi.sh.log: run-allfcts-multi.sh
+ @p='run-allfcts-multi.sh'; \
+ b='run-allfcts-multi.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-deleted.sh.log: run-deleted.sh
+ @p='run-deleted.sh'; \
+ b='run-deleted.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-linkmap-cut.sh.log: run-linkmap-cut.sh
+ @p='run-linkmap-cut.sh'; \
+ b='run-linkmap-cut.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-aggregate-size.sh.log: run-aggregate-size.sh
+ @p='run-aggregate-size.sh'; \
+ b='run-aggregate-size.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+vdsosyms.log: vdsosyms$(EXEEXT)
+ @p='vdsosyms$(EXEEXT)'; \
+ b='vdsosyms'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-A.sh.log: run-readelf-A.sh
+ @p='run-readelf-A.sh'; \
+ b='run-readelf-A.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+msg_tst.log: msg_tst$(EXEEXT)
+ @p='msg_tst$(EXEEXT)'; \
+ b='msg_tst'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+md5-sha1-test.log: md5-sha1-test$(EXEEXT)
+ @p='md5-sha1-test$(EXEEXT)'; \
+ b='md5-sha1-test'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-s.sh.log: run-readelf-s.sh
+ @p='run-readelf-s.sh'; \
+ b='run-readelf-s.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwflsyms.sh.log: run-dwflsyms.sh
+ @p='run-dwflsyms.sh'; \
+ b='run-dwflsyms.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-zdebug.sh.log: run-readelf-zdebug.sh
+ @p='run-readelf-zdebug.sh'; \
+ b='run-readelf-zdebug.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst1.log: asm-tst1$(EXEEXT)
+ @p='asm-tst1$(EXEEXT)'; \
+ b='asm-tst1'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst2.log: asm-tst2$(EXEEXT)
+ @p='asm-tst2$(EXEEXT)'; \
+ b='asm-tst2'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst3.log: asm-tst3$(EXEEXT)
+ @p='asm-tst3$(EXEEXT)'; \
+ b='asm-tst3'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst4.log: asm-tst4$(EXEEXT)
+ @p='asm-tst4$(EXEEXT)'; \
+ b='asm-tst4'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst5.log: asm-tst5$(EXEEXT)
+ @p='asm-tst5$(EXEEXT)'; \
+ b='asm-tst5'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst6.log: asm-tst6$(EXEEXT)
+ @p='asm-tst6$(EXEEXT)'; \
+ b='asm-tst6'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst7.log: asm-tst7$(EXEEXT)
+ @p='asm-tst7$(EXEEXT)'; \
+ b='asm-tst7'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst8.log: asm-tst8$(EXEEXT)
+ @p='asm-tst8$(EXEEXT)'; \
+ b='asm-tst8'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst9.log: asm-tst9$(EXEEXT)
+ @p='asm-tst9$(EXEEXT)'; \
+ b='asm-tst9'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+#.test$(EXEEXT).log:
+# @p='$<'; \
+# $(am__set_b); \
+# $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+# --log-file $$b.log --trs-file $$b.trs \
+# $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+# "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+#installcheck-local:
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am: installcheck-local
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic cscopelist-am ctags ctags-am \
+ distclean distclean-compile distclean-generic distclean-tags \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installcheck-local \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+ ps ps-am recheck tags tags-am uninstall uninstall-am
+
+
+%.os: %.c %.o
+ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \
+ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \
+ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \
+ rm -f "$(DEPDIR)/$*.Tpo"; \
+ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ fi
+# $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $<
+
+# Substitute $(COMPILE).
+backtrace-child-biarch$(EXEEXT): backtrace-child.c
+ $(CC_BIARCH) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS) $(backtrace_child_CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \
+ -o $@ $<
+
+#export ELFUTILS_DISABLE_BIARCH = 1
+
+#export ELFUTILS_DISABLE_DEMANGLE = 1
+
+installcheck-local:
+ $(MAKE) $(AM_MAKEFLAGS) \
+ TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
+ LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
+
+#check: check-am coverage
+#.PHONY: coverage
+#coverage:
+# -$(srcdir)/coverage.sh
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
new file mode 100644
index 00000000..303f7836
--- /dev/null
+++ b/src/tests/Makefile.am
@@ -0,0 +1,429 @@
+## Process this file with automake to create Makefile.in
+##
+## Copyright (C) 1996-2014 Red Hat, Inc.
+## This file is part of elfutils.
+##
+## This file is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+##
+## elfutils is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+include $(top_srcdir)/config/eu.am
+BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
+
+AM_LDFLAGS =
+
+if !STANDALONE
+AM_CPPFLAGS += -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
+ -I$(top_srcdir)/libdwfl -I$(top_srcdir)/libdwelf \
+ -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
+ -I$(top_srcdir)/lib -I..
+AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf
+endif
+
+if TESTS_RPATH
+AM_LDFLAGS += -Wl,-rpath,$(BUILD_RPATH)
+tests_rpath = yes
+else
+tests_rpath = no
+endif
+
+check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
+ showptable update1 update2 update3 update4 test-nlist \
+ show-die-info get-files get-lines get-pubnames \
+ get-aranges allfcts line2addr addrscopes funcscopes \
+ show-abbrev hash newscn ecp dwflmodtest \
+ find-prologues funcretval allregs rdwrmmap \
+ dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \
+ dwfl-addr-sect dwfl-bug-report early-offscn \
+ dwfl-bug-getmodules dwarf-getmacros addrcfi \
+ test-flag-nobits dwarf-getstring rerequest_tag \
+ alldts md5-sha1-test typeiter typeiter2 low_high_pc \
+ test-elf_cntl_gelf_getshdr dwflsyms dwfllines \
+ dwfl-report-elf-align varlocs backtrace backtrace-child \
+ backtrace-data backtrace-dwarf debuglink debugaltlink \
+ buildid deleted deleted-lib.so aggregate_size vdsosyms
+
+asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
+ asm-tst6 asm-tst7 asm-tst8 asm-tst9
+
+if BIARCH
+check_PROGRAMS += backtrace-child-biarch
+endif
+
+# Substitute $(COMPILE).
+backtrace-child-biarch$(EXEEXT): backtrace-child.c
+ $(CC_BIARCH) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS) $(backtrace_child_CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \
+ -o $@ $<
+
+TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
+ update1 update2 update3 update4 \
+ run-show-die-info.sh run-get-files.sh run-get-lines.sh \
+ run-get-pubnames.sh run-get-aranges.sh run-allfcts.sh \
+ run-show-abbrev.sh run-line2addr.sh hash \
+ newscn run-strip-test.sh run-strip-test2.sh \
+ run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
+ run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \
+ run-strip-groups.sh run-strip-reloc.sh \
+ run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-M.sh \
+ run-ecp-test.sh run-ecp-test2.sh run-alldts.sh \
+ run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \
+ run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \
+ run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
+ run-find-prologues.sh run-allregs.sh run-addrcfi.sh \
+ run-nm-self.sh run-readelf-self.sh \
+ run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
+ run-readelf-test4.sh run-readelf-twofiles.sh \
+ run-readelf-macro.sh run-readelf-loc.sh \
+ run-readelf-aranges.sh run-readelf-line.sh \
+ run-native-test.sh run-bug1-test.sh \
+ run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
+ dwfl-bug-addr-overflow run-addrname-test.sh \
+ dwfl-bug-fd-leak dwfl-bug-report \
+ run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \
+ run-disasm-x86.sh run-disasm-x86-64.sh \
+ run-early-offscn.sh run-dwarf-getmacros.sh \
+ run-test-flag-nobits.sh run-prelink-addr-test.sh \
+ run-dwarf-getstring.sh run-rerequest_tag.sh run-typeiter.sh \
+ run-readelf-d.sh run-readelf-gdb_index.sh run-unstrip-n.sh \
+ run-low_high_pc.sh run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \
+ run-test-archive64.sh run-readelf-vmcoreinfo.sh \
+ run-readelf-mixed-corenote.sh run-dwfllines.sh \
+ run-dwfl-report-elf-align.sh run-addr2line-test.sh \
+ run-addr2line-i-test.sh run-addr2line-i-lex-test.sh \
+ run-varlocs.sh run-funcretval.sh \
+ run-backtrace-native.sh run-backtrace-data.sh run-backtrace-dwarf.sh \
+ run-backtrace-native-biarch.sh run-backtrace-native-core.sh \
+ run-backtrace-native-core-biarch.sh run-backtrace-core-x86_64.sh \
+ run-backtrace-core-i386.sh run-backtrace-core-ppc.sh \
+ run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
+ run-backtrace-core-aarch64.sh \
+ run-backtrace-demangle.sh run-stack-d-test.sh run-stack-i-test.sh \
+ run-readelf-dwz-multi.sh run-allfcts-multi.sh run-deleted.sh \
+ run-linkmap-cut.sh run-aggregate-size.sh vdsosyms run-readelf-A.sh
+
+if !BIARCH
+export ELFUTILS_DISABLE_BIARCH = 1
+endif
+
+if !DEMANGLE
+export ELFUTILS_DISABLE_DEMANGLE = 1
+endif
+
+if !STANDALONE
+check_PROGRAMS += msg_tst md5-sha1-test
+TESTS += msg_tst md5-sha1-test
+endif
+
+if LZMA
+TESTS += run-readelf-s.sh run-dwflsyms.sh
+endif
+
+if ZLIB
+TESTS += run-readelf-zdebug.sh
+endif
+
+if HAVE_LIBASM
+check_PROGRAMS += $(asm_TESTS)
+TESTS += $(asm_TESTS)
+endif
+
+EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
+ run-show-die-info.sh run-get-files.sh run-get-lines.sh \
+ run-get-pubnames.sh run-get-aranges.sh \
+ run-show-abbrev.sh run-strip-test.sh \
+ run-strip-test2.sh run-ecp-test.sh run-ecp-test2.sh \
+ testfile.bz2 testfile2.bz2 testfile3.bz2 testfile4.bz2 \
+ testfile5.bz2 testfile6.bz2 testfile7.bz2 testfile8.bz2 \
+ testfile9.bz2 testfile10.bz2 testfile11.bz2 testfile12.bz2 \
+ testfile13.bz2 run-strip-test3.sh run-allfcts.sh \
+ testfile_class_func.bz2 testfile_nested_funcs.bz2 \
+ run-line2addr.sh run-elflint-test.sh testfile14.bz2 \
+ run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
+ run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \
+ run-strip-reloc.sh hello_i386.ko.bz2 hello_x86_64.ko.bz2 \
+ hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \
+ run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-M.sh\
+ run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \
+ run-ranlib-test3.sh run-ranlib-test4.sh \
+ run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
+ run-nm-self.sh run-readelf-self.sh run-addrcfi.sh \
+ run-find-prologues.sh run-allregs.sh run-native-test.sh \
+ run-addrname-test.sh run-dwfl-bug-offline-rel.sh \
+ run-dwfl-addr-sect.sh run-early-offscn.sh \
+ run-dwarf-getmacros.sh run-test-flag-nobits.sh \
+ run-dwarf-getstring.sh run-rerequest_tag.sh run-alldts.sh \
+ testfile15.bz2 testfile15.debug.bz2 \
+ testfile16.bz2 testfile16.debug.bz2 \
+ testfile17.bz2 testfile17.debug.bz2 \
+ testfile18.bz2 testfile19.bz2 testfile19.index.bz2 \
+ testfile20.bz2 testfile20.index.bz2 \
+ testfile21.bz2 testfile21.index.bz2 \
+ testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \
+ testfile26.bz2 testfile27.bz2 \
+ coverage.sh test-subr.sh test-wrapper.sh \
+ run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
+ run-readelf-test4.sh run-readelf-twofiles.sh \
+ run-bug1-test.sh testfile28.bz2 testfile28.rdwr.bz2 \
+ run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
+ testfile29.bz2 testfile29.rdwr.bz2 \
+ testfile30.bz2 testfile31.bz2 testfile32.bz2 testfile33.bz2 \
+ testfile34.bz2 testfile35.bz2 testfile35.debug.bz2 \
+ testfile36.bz2 testfile36.debug.bz2 \
+ testfile37.bz2 testfile37.debug.bz2 \
+ testfile38.bz2 testfile39.bz2 testfile40.bz2 testfile40.debug.bz2 \
+ testfile41.bz2 testfile42.bz2 testfile42_noshdrs.bz2 \
+ testfile43.bz2 \
+ testfile44.S.bz2 testfile44.expect.bz2 run-disasm-x86.sh \
+ testfile45.S.bz2 testfile45.expect.bz2 run-disasm-x86-64.sh \
+ testfile46.bz2 testfile47.bz2 testfile48.bz2 testfile48.debug.bz2 \
+ testfile49.bz2 testfile50.bz2 testfile51.bz2 \
+ testfile-macros-0xff.bz2 \
+ run-readelf-macro.sh testfilemacro.bz2 \
+ run-readelf-loc.sh testfileloc.bz2 \
+ run-readelf-aranges.sh run-readelf-line.sh testfilefoobarbaz.bz2 \
+ run-readelf-dwz-multi.sh libtestfile_multi_shared.so.bz2 \
+ testfile_multi.dwz.bz2 testfile_multi_main.bz2 \
+ testfile-dwzstr.bz2 testfile-dwzstr.multi.bz2 \
+ run-allfcts-multi.sh \
+ test-offset-loop.bz2 test-offset-loop.alt.bz2 \
+ run-prelink-addr-test.sh \
+ testfile52-32.so.bz2 testfile52-32.so.debug.bz2 \
+ testfile52-32.prelink.so.bz2 testfile52-32.noshdrs.so.bz2 \
+ testfile52-64.so.bz2 testfile52-64.so.debug.bz2 \
+ testfile52-64.prelink.so.bz2 testfile52-64.noshdrs.so.bz2 \
+ testfile53-32.bz2 testfile53-32.debug.bz2 \
+ testfile53-32.prelink.bz2 testfile53-64.bz2 \
+ testfile53-64.debug.bz2 testfile53-64.prelink.bz2 \
+ testfile54-32.so.bz2 testfile54-32.so.debug.bz2 \
+ testfile54-32.prelink.so.bz2 testfile54-32.noshdrs.so.bz2 \
+ testfile54-64.so.bz2 testfile54-64.so.debug.bz2 \
+ testfile54-64.prelink.so.bz2 testfile54-64.noshdrs.so.bz2 \
+ testfile55-32.bz2 testfile55-32.debug.bz2 \
+ testfile55-32.prelink.bz2 testfile55-64.bz2 \
+ testfile55-64.debug.bz2 testfile55-64.prelink.bz2 \
+ testfile56.bz2 testfile57.bz2 testfile58.bz2 \
+ run-typeiter.sh testfile59.bz2 \
+ run-readelf-d.sh testlib_dynseg.so.bz2 \
+ run-readelf-gdb_index.sh testfilegdbindex5.bz2 \
+ testfilegdbindex7.bz2 \
+ run-readelf-s.sh testfilebazdbg.bz2 testfilebazdyn.bz2 \
+ testfilebazmin.bz2 testfilebazdbg.debug.bz2 testfilebazmdb.bz2 \
+ testfilebaztab.bz2 testfilebasmin.bz2 testfilebaxmin.bz2 \
+ testfilebazdbg_pl.bz2 testfilebazmin_pl.bz2 \
+ testfilebazdbg_plr.bz2 testfilebazmin_plr.bz2 \
+ testfilebazdbgppc64.bz2 testfilebazdbgppc64.debug.bz2 \
+ testfilebazdbgppc64_pl.bz2 testfilebazdbgppc64_plr.bz2 \
+ testfilebazdynppc64.bz2 testfilebazmdbppc64.bz2 \
+ testfilebazminppc64.bz2 testfilebazminppc64_pl.bz2 \
+ testfilebazminppc64_plr.bz2 testfilebaztabppc64.bz2 \
+ run-dwflsyms.sh \
+ run-unstrip-n.sh testcore-rtlib.bz2 testcore-rtlib-ppc.bz2 \
+ run-low_high_pc.sh testfile_low_high_pc.bz2 \
+ run-macro-test.sh testfile-macinfo.bz2 testfile-macros.bz2 \
+ run-elf_cntl_gelf_getshdr.sh \
+ run-test-archive64.sh testarchive64.a.bz2 \
+ testfile60.bz2 testfile61.bz2 \
+ run-readelf-vmcoreinfo.sh testfile62.bz2 \
+ run-readelf-mixed-corenote.sh testfile63.bz2 testfile64.bz2 \
+ testfile65.bz2 testfile67.bz2 testfile68.bz2 \
+ testfile69.core.bz2 testfile69.so.bz2 \
+ testfile70.core.bz2 testfile70.exec.bz2 testfile71.bz2 \
+ run-dwfllines.sh run-dwfl-report-elf-align.sh \
+ testfile-dwfl-report-elf-align-shlib.so.bz2 \
+ testfilenolines.bz2 test-core-lib.so.bz2 test-core.core.bz2 \
+ test-core.exec.bz2 run-addr2line-test.sh \
+ run-addr2line-i-test.sh testfile-inlines.bz2 \
+ run-addr2line-i-lex-test.sh testfile-lex-inlines.bz2 \
+ testfileppc32.bz2 testfileppc64.bz2 \
+ testfiles390.bz2 testfiles390x.bz2 \
+ testfilearm.bz2 testfileaarch64.bz2 \
+ run-varlocs.sh \
+ testfile_const_type.c testfile_const_type.bz2 \
+ testfile_implicit_pointer.c testfile_implicit_pointer.bz2 \
+ testfile_parameter_ref.c testfile_parameter_ref.bz2 \
+ testfile_entry_value.c testfile_entry_value.bz2 \
+ testfile_implicit_value.c testfile_implicit_value.bz2 \
+ testfile_aarch64_core.bz2 testfile_i686_core.bz2 \
+ run-funcretval.sh funcretval_test.c funcretval_test_aarch64.bz2 \
+ run-backtrace-data.sh run-backtrace-dwarf.sh cleanup-13.c \
+ run-backtrace-native.sh run-backtrace-native-biarch.sh \
+ run-backtrace-native-core.sh run-backtrace-native-core-biarch.sh \
+ run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \
+ backtrace-subr.sh backtrace.i386.core.bz2 backtrace.i386.exec.bz2 \
+ backtrace.x86_64.core.bz2 backtrace.x86_64.exec.bz2 \
+ backtrace.ppc.core.bz2 backtrace.ppc.exec.bz2 \
+ run-backtrace-core-ppc.sh testfile66.bz2 testfile66.core.bz2 \
+ backtrace.s390x.core.bz2 backtrace.s390x.exec.bz2 \
+ backtrace.s390.core.bz2 backtrace.s390.exec.bz2 \
+ run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
+ run-backtrace-core-aarch64.sh \
+ backtrace.aarch64.core.bz2 backtrace.aarch64.exec.bz2 \
+ run-backtrace-demangle.sh testfile-backtrace-demangle.bz2 \
+ testfile-backtrace-demangle.cc \
+ testfile-backtrace-demangle.core.bz2 \
+ run-stack-d-test.sh run-stack-i-test.sh \
+ testfiledwarfinlines.bz2 testfiledwarfinlines.core.bz2 \
+ run-readelf-zdebug.sh testfile-debug.bz2 testfile-zdebug.bz2 \
+ run-deleted.sh run-linkmap-cut.sh linkmap-cut-lib.so.bz2 \
+ linkmap-cut.bz2 linkmap-cut.core.bz2 \
+ run-aggregate-size.sh testfile-sizes1.o.bz2 testfile-sizes2.o.bz2 \
+ testfile-sizes3.o.bz2 \
+ run-readelf-A.sh testfileppc32attrs.o.bz2
+
+if USE_VALGRIND
+valgrind_cmd='valgrind -q --error-exitcode=1 --run-libc-freeres=no'
+endif
+
+
+installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \
+ bindir=$(DESTDIR)$(bindir); \
+ LC_ALL=C; LANG=C; \
+ VALGRIND_CMD=$(valgrind_cmd); \
+ abs_srcdir=$(abs_srcdir); \
+ abs_builddir=$(abs_builddir); \
+ abs_top_builddir=$(abs_top_builddir); \
+ export abs_srcdir; export abs_builddir; \
+ export abs_top_builddir; \
+ export libdir; export bindir; \
+ export LC_ALL; export LANG; export VALGRIND_CMD; \
+ NM=$(NM); export NM;
+installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ installed $(tests_rpath) \
+ '$(program_transform_name)'
+if STANDALONE
+TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
+LOG_COMPILER = $(installed_LOG_COMPILER)
+else !STANDALONE
+TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
+ abs_srcdir=$(abs_srcdir); abs_builddir=$(abs_builddir); \
+ abs_top_builddir=$(abs_top_builddir); \
+ export abs_srcdir; export abs_builddir; \
+ export abs_top_builddir; \
+ export LC_ALL; export LANG; export VALGRIND_CMD; \
+ NM=$(NM); export NM;
+LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ $(abs_top_builddir)/libdw:$(abs_top_builddir)/backends:$(abs_top_builddir)/libelf:$(abs_top_builddir)/libasm
+
+installcheck-local:
+ $(MAKE) $(AM_MAKEFLAGS) \
+ TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
+ LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
+endif !STANDALONE
+
+if STANDALONE
+libdw = -ldw
+libelf = -lelf
+libasm = -lasm
+libebl = -lebl
+else !STANDALONE
+if BUILD_STATIC
+libdw = ../libdw/libdw.a $(zip_LIBS) $(libelf) $(libebl) -ldl
+libelf = ../libelf/libelf.a
+libasm = ../libasm/libasm.a
+else
+libdw = ../libdw/libdw.so
+libelf = ../libelf/libelf.so
+libasm = ../libasm/libasm.so
+endif
+libebl = ../libebl/libebl.a
+libeu = ../lib/libeu.a
+endif !STANDALONE
+
+arextract_LDADD = $(libelf)
+arsymtest_LDADD = $(libelf)
+newfile_LDADD = $(libelf)
+saridx_LDADD = $(libelf)
+scnnames_LDADD = $(libelf)
+sectiondump_LDADD = $(libelf)
+showptable_LDADD = $(libelf)
+hash_LDADD = $(libelf)
+test_nlist_LDADD = $(libelf)
+msg_tst_LDADD = $(libelf)
+newscn_LDADD = $(libelf)
+early_offscn_LDADD = $(libelf)
+ecp_LDADD = $(libelf)
+update1_LDADD = $(libelf)
+update2_LDADD = $(libelf)
+update3_LDADD = $(libebl) $(libelf)
+update4_LDADD = $(libebl) $(libelf)
+show_die_info_LDADD = $(libdw) $(libelf)
+get_pubnames_LDADD = $(libdw) $(libelf)
+show_abbrev_LDADD = $(libdw) $(libelf)
+get_lines_LDADD = $(libdw) $(libelf)
+get_files_LDADD = $(libdw) $(libelf)
+get_aranges_LDADD = $(libdw) $(libelf)
+allfcts_LDADD = $(libdw) $(libelf)
+line2addr_LDADD = $(libdw)
+addrscopes_LDADD = $(libdw)
+funcscopes_LDADD = $(libdw)
+funcretval_LDADD = $(libdw)
+allregs_LDADD = $(libdw)
+find_prologues_LDADD = $(libdw)
+#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf)
+asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+rdwrmmap_LDADD = $(libelf)
+dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+arls_LDADD = $(libelf)
+dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwarf_getmacros_LDADD = $(libdw)
+dwarf_getstring_LDADD = $(libdw)
+addrcfi_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+test_flag_nobits_LDADD = $(libelf)
+rerequest_tag_LDADD = $(libdw)
+alldts_LDADD = $(libebl) $(libelf)
+md5_sha1_test_LDADD = $(libeu)
+typeiter_LDADD = $(libdw) $(libelf)
+typeiter2_LDADD = $(libdw) $(libelf)
+low_high_pc_LDADD = $(libdw) $(libelf)
+test_elf_cntl_gelf_getshdr_LDADD = $(libelf)
+dwflsyms_LDADD = $(libdw) $(libelf)
+dwfllines_LDADD = $(libdw) $(libelf)
+dwfl_report_elf_align_LDADD = $(libdw)
+varlocs_LDADD = $(libdw) $(libelf)
+backtrace_LDADD = $(libdw) $(libelf)
+# backtrace-child-biarch also uses those *_CFLAGS and *_LDLAGS variables:
+backtrace_child_CFLAGS = -fPIE
+backtrace_child_LDFLAGS = -pie -pthread
+backtrace_child_biarch_SOURCES = backtrace-child.c
+backtrace_data_LDADD = $(libdw) $(libelf)
+backtrace_dwarf_CFLAGS = -Wno-unused-parameter
+backtrace_dwarf_LDADD = $(libdw) $(libelf)
+debuglink_LDADD = $(libdw) $(libelf)
+debugaltlink_LDADD = $(libdw) $(libelf)
+buildid_LDADD = $(libdw) $(libelf)
+deleted_LDADD = ./deleted-lib.so
+deleted_lib_so_LDFLAGS = -shared -rdynamic
+deleted_lib_so_CFLAGS = -fPIC -fasynchronous-unwind-tables
+aggregate_size_LDADD = $(libdw) $(libelf)
+vdsosyms_LDADD = $(libdw) $(libelf)
+
+if GCOV
+check: check-am coverage
+.PHONY: coverage
+coverage:
+ -$(srcdir)/coverage.sh
+endif
diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in
new file mode 100644
index 00000000..e7ea9223
--- /dev/null
+++ b/src/tests/Makefile.in
@@ -0,0 +1,2932 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
+ $(top_srcdir)/config/test-driver ChangeLog
+@STANDALONE_FALSE@am__append_1 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
+@STANDALONE_FALSE@ -I$(top_srcdir)/libdwfl -I$(top_srcdir)/libdwelf \
+@STANDALONE_FALSE@ -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
+@STANDALONE_FALSE@ -I$(top_srcdir)/lib -I..
+
+@STANDALONE_FALSE@am__append_2 = -Wl,-rpath-link,../libasm:../libdw:../libelf
+@TESTS_RPATH_TRUE@am__append_3 = -Wl,-rpath,$(BUILD_RPATH)
+check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \
+ newfile$(EXEEXT) saridx$(EXEEXT) scnnames$(EXEEXT) \
+ sectiondump$(EXEEXT) showptable$(EXEEXT) update1$(EXEEXT) \
+ update2$(EXEEXT) update3$(EXEEXT) update4$(EXEEXT) \
+ test-nlist$(EXEEXT) show-die-info$(EXEEXT) get-files$(EXEEXT) \
+ get-lines$(EXEEXT) get-pubnames$(EXEEXT) get-aranges$(EXEEXT) \
+ allfcts$(EXEEXT) line2addr$(EXEEXT) addrscopes$(EXEEXT) \
+ funcscopes$(EXEEXT) show-abbrev$(EXEEXT) hash$(EXEEXT) \
+ newscn$(EXEEXT) ecp$(EXEEXT) dwflmodtest$(EXEEXT) \
+ find-prologues$(EXEEXT) funcretval$(EXEEXT) allregs$(EXEEXT) \
+ rdwrmmap$(EXEEXT) dwfl-bug-addr-overflow$(EXEEXT) \
+ arls$(EXEEXT) dwfl-bug-fd-leak$(EXEEXT) \
+ dwfl-addr-sect$(EXEEXT) dwfl-bug-report$(EXEEXT) \
+ early-offscn$(EXEEXT) dwfl-bug-getmodules$(EXEEXT) \
+ dwarf-getmacros$(EXEEXT) addrcfi$(EXEEXT) \
+ test-flag-nobits$(EXEEXT) dwarf-getstring$(EXEEXT) \
+ rerequest_tag$(EXEEXT) alldts$(EXEEXT) md5-sha1-test$(EXEEXT) \
+ typeiter$(EXEEXT) typeiter2$(EXEEXT) low_high_pc$(EXEEXT) \
+ test-elf_cntl_gelf_getshdr$(EXEEXT) dwflsyms$(EXEEXT) \
+ dwfllines$(EXEEXT) dwfl-report-elf-align$(EXEEXT) \
+ varlocs$(EXEEXT) backtrace$(EXEEXT) backtrace-child$(EXEEXT) \
+ backtrace-data$(EXEEXT) backtrace-dwarf$(EXEEXT) \
+ debuglink$(EXEEXT) debugaltlink$(EXEEXT) buildid$(EXEEXT) \
+ deleted$(EXEEXT) deleted-lib.so$(EXEEXT) \
+ aggregate_size$(EXEEXT) vdsosyms$(EXEEXT) $(am__EXEEXT_1) \
+ $(am__EXEEXT_2) $(am__EXEEXT_4)
+@BIARCH_TRUE@am__append_4 = backtrace-child-biarch
+TESTS = run-arextract.sh run-arsymtest.sh newfile$(EXEEXT) \
+ test-nlist$(EXEEXT) update1$(EXEEXT) update2$(EXEEXT) \
+ update3$(EXEEXT) update4$(EXEEXT) run-show-die-info.sh \
+ run-get-files.sh run-get-lines.sh run-get-pubnames.sh \
+ run-get-aranges.sh run-allfcts.sh run-show-abbrev.sh \
+ run-line2addr.sh hash$(EXEEXT) newscn$(EXEEXT) \
+ run-strip-test.sh run-strip-test2.sh run-strip-test3.sh \
+ run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
+ run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \
+ run-strip-reloc.sh run-unstrip-test.sh run-unstrip-test2.sh \
+ run-unstrip-M.sh run-ecp-test.sh run-ecp-test2.sh \
+ run-alldts.sh run-elflint-test.sh run-elflint-self.sh \
+ run-ranlib-test.sh run-ranlib-test2.sh run-ranlib-test3.sh \
+ run-ranlib-test4.sh run-addrscopes.sh run-strings-test.sh \
+ run-funcscopes.sh run-find-prologues.sh run-allregs.sh \
+ run-addrcfi.sh run-nm-self.sh run-readelf-self.sh \
+ run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
+ run-readelf-test4.sh run-readelf-twofiles.sh \
+ run-readelf-macro.sh run-readelf-loc.sh run-readelf-aranges.sh \
+ run-readelf-line.sh run-native-test.sh run-bug1-test.sh \
+ run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
+ dwfl-bug-addr-overflow$(EXEEXT) run-addrname-test.sh \
+ dwfl-bug-fd-leak$(EXEEXT) dwfl-bug-report$(EXEEXT) \
+ run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \
+ run-disasm-x86.sh run-disasm-x86-64.sh run-early-offscn.sh \
+ run-dwarf-getmacros.sh run-test-flag-nobits.sh \
+ run-prelink-addr-test.sh run-dwarf-getstring.sh \
+ run-rerequest_tag.sh run-typeiter.sh run-readelf-d.sh \
+ run-readelf-gdb_index.sh run-unstrip-n.sh run-low_high_pc.sh \
+ run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \
+ run-test-archive64.sh run-readelf-vmcoreinfo.sh \
+ run-readelf-mixed-corenote.sh run-dwfllines.sh \
+ run-dwfl-report-elf-align.sh run-addr2line-test.sh \
+ run-addr2line-i-test.sh run-addr2line-i-lex-test.sh \
+ run-varlocs.sh run-funcretval.sh run-backtrace-native.sh \
+ run-backtrace-data.sh run-backtrace-dwarf.sh \
+ run-backtrace-native-biarch.sh run-backtrace-native-core.sh \
+ run-backtrace-native-core-biarch.sh \
+ run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \
+ run-backtrace-core-ppc.sh run-backtrace-core-s390x.sh \
+ run-backtrace-core-s390.sh run-backtrace-core-aarch64.sh \
+ run-backtrace-demangle.sh run-stack-d-test.sh \
+ run-stack-i-test.sh run-readelf-dwz-multi.sh \
+ run-allfcts-multi.sh run-deleted.sh run-linkmap-cut.sh \
+ run-aggregate-size.sh vdsosyms$(EXEEXT) run-readelf-A.sh \
+ $(am__EXEEXT_2) $(am__append_7) $(am__append_8) \
+ $(am__EXEEXT_4)
+@STANDALONE_FALSE@am__append_5 = msg_tst md5-sha1-test
+@STANDALONE_FALSE@am__append_6 = msg_tst md5-sha1-test
+@LZMA_TRUE@am__append_7 = run-readelf-s.sh run-dwflsyms.sh
+@ZLIB_TRUE@am__append_8 = run-readelf-zdebug.sh
+@HAVE_LIBASM_TRUE@am__append_9 = $(asm_TESTS)
+@HAVE_LIBASM_TRUE@am__append_10 = $(asm_TESTS)
+subdir = tests
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/zip.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@BIARCH_TRUE@am__EXEEXT_1 = backtrace-child-biarch$(EXEEXT)
+@STANDALONE_FALSE@am__EXEEXT_2 = msg_tst$(EXEEXT) \
+@STANDALONE_FALSE@ md5-sha1-test$(EXEEXT)
+am__EXEEXT_3 = asm-tst1$(EXEEXT) asm-tst2$(EXEEXT) asm-tst3$(EXEEXT) \
+ asm-tst4$(EXEEXT) asm-tst5$(EXEEXT) asm-tst6$(EXEEXT) \
+ asm-tst7$(EXEEXT) asm-tst8$(EXEEXT) asm-tst9$(EXEEXT)
+@HAVE_LIBASM_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3)
+addrcfi_SOURCES = addrcfi.c
+addrcfi_OBJECTS = addrcfi.$(OBJEXT)
+am__DEPENDENCIES_1 =
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@am__DEPENDENCIES_2 = \
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@ ../libelf/libelf.so
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@am__DEPENDENCIES_2 = \
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@ ../libelf/libelf.a
+@STANDALONE_FALSE@am__DEPENDENCIES_3 = ../libebl/libebl.a
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@am__DEPENDENCIES_4 = \
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@ ../libdw/libdw.so
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@am__DEPENDENCIES_4 = \
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@ ../libdw/libdw.a \
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@ $(am__DEPENDENCIES_1) \
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@ $(am__DEPENDENCIES_2) \
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@ $(am__DEPENDENCIES_3)
+addrcfi_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+addrscopes_SOURCES = addrscopes.c
+addrscopes_OBJECTS = addrscopes.$(OBJEXT)
+addrscopes_DEPENDENCIES = $(am__DEPENDENCIES_4)
+aggregate_size_SOURCES = aggregate_size.c
+aggregate_size_OBJECTS = aggregate_size.$(OBJEXT)
+aggregate_size_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+alldts_SOURCES = alldts.c
+alldts_OBJECTS = alldts.$(OBJEXT)
+alldts_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+allfcts_SOURCES = allfcts.c
+allfcts_OBJECTS = allfcts.$(OBJEXT)
+allfcts_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+allregs_SOURCES = allregs.c
+allregs_OBJECTS = allregs.$(OBJEXT)
+allregs_DEPENDENCIES = $(am__DEPENDENCIES_4)
+arextract_SOURCES = arextract.c
+arextract_OBJECTS = arextract.$(OBJEXT)
+arextract_DEPENDENCIES = $(am__DEPENDENCIES_2)
+arls_SOURCES = arls.c
+arls_OBJECTS = arls.$(OBJEXT)
+arls_DEPENDENCIES = $(am__DEPENDENCIES_2)
+arsymtest_SOURCES = arsymtest.c
+arsymtest_OBJECTS = arsymtest.$(OBJEXT)
+arsymtest_DEPENDENCIES = $(am__DEPENDENCIES_2)
+asm_tst1_SOURCES = asm-tst1.c
+asm_tst1_OBJECTS = asm-tst1.$(OBJEXT)
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@am__DEPENDENCIES_5 = \
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@ ../libasm/libasm.so
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@am__DEPENDENCIES_5 = \
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@ ../libasm/libasm.a
+asm_tst1_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst2_SOURCES = asm-tst2.c
+asm_tst2_OBJECTS = asm-tst2.$(OBJEXT)
+asm_tst2_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst3_SOURCES = asm-tst3.c
+asm_tst3_OBJECTS = asm-tst3.$(OBJEXT)
+asm_tst3_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst4_SOURCES = asm-tst4.c
+asm_tst4_OBJECTS = asm-tst4.$(OBJEXT)
+asm_tst4_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst5_SOURCES = asm-tst5.c
+asm_tst5_OBJECTS = asm-tst5.$(OBJEXT)
+asm_tst5_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst6_SOURCES = asm-tst6.c
+asm_tst6_OBJECTS = asm-tst6.$(OBJEXT)
+asm_tst6_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst7_SOURCES = asm-tst7.c
+asm_tst7_OBJECTS = asm-tst7.$(OBJEXT)
+asm_tst7_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst8_SOURCES = asm-tst8.c
+asm_tst8_OBJECTS = asm-tst8.$(OBJEXT)
+asm_tst8_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+asm_tst9_SOURCES = asm-tst9.c
+asm_tst9_OBJECTS = asm-tst9.$(OBJEXT)
+asm_tst9_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+backtrace_SOURCES = backtrace.c
+backtrace_OBJECTS = backtrace.$(OBJEXT)
+backtrace_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+backtrace_child_SOURCES = backtrace-child.c
+backtrace_child_OBJECTS = backtrace_child-backtrace-child.$(OBJEXT)
+backtrace_child_LDADD = $(LDADD)
+backtrace_child_LINK = $(CCLD) $(backtrace_child_CFLAGS) $(CFLAGS) \
+ $(backtrace_child_LDFLAGS) $(LDFLAGS) -o $@
+am_backtrace_child_biarch_OBJECTS = backtrace-child.$(OBJEXT)
+backtrace_child_biarch_OBJECTS = $(am_backtrace_child_biarch_OBJECTS)
+backtrace_child_biarch_LDADD = $(LDADD)
+backtrace_data_SOURCES = backtrace-data.c
+backtrace_data_OBJECTS = backtrace-data.$(OBJEXT)
+backtrace_data_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+backtrace_dwarf_SOURCES = backtrace-dwarf.c
+backtrace_dwarf_OBJECTS = backtrace_dwarf-backtrace-dwarf.$(OBJEXT)
+backtrace_dwarf_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+backtrace_dwarf_LINK = $(CCLD) $(backtrace_dwarf_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+buildid_SOURCES = buildid.c
+buildid_OBJECTS = buildid.$(OBJEXT)
+buildid_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+debugaltlink_SOURCES = debugaltlink.c
+debugaltlink_OBJECTS = debugaltlink.$(OBJEXT)
+debugaltlink_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+debuglink_SOURCES = debuglink.c
+debuglink_OBJECTS = debuglink.$(OBJEXT)
+debuglink_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+deleted_SOURCES = deleted.c
+deleted_OBJECTS = deleted.$(OBJEXT)
+deleted_DEPENDENCIES = ./deleted-lib.so
+deleted_lib_so_SOURCES = deleted-lib.c
+deleted_lib_so_OBJECTS = deleted_lib_so-deleted-lib.$(OBJEXT)
+deleted_lib_so_LDADD = $(LDADD)
+deleted_lib_so_LINK = $(CCLD) $(deleted_lib_so_CFLAGS) $(CFLAGS) \
+ $(deleted_lib_so_LDFLAGS) $(LDFLAGS) -o $@
+dwarf_getmacros_SOURCES = dwarf-getmacros.c
+dwarf_getmacros_OBJECTS = dwarf-getmacros.$(OBJEXT)
+dwarf_getmacros_DEPENDENCIES = $(am__DEPENDENCIES_4)
+dwarf_getstring_SOURCES = dwarf-getstring.c
+dwarf_getstring_OBJECTS = dwarf-getstring.$(OBJEXT)
+dwarf_getstring_DEPENDENCIES = $(am__DEPENDENCIES_4)
+dwfl_addr_sect_SOURCES = dwfl-addr-sect.c
+dwfl_addr_sect_OBJECTS = dwfl-addr-sect.$(OBJEXT)
+dwfl_addr_sect_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+dwfl_bug_addr_overflow_SOURCES = dwfl-bug-addr-overflow.c
+dwfl_bug_addr_overflow_OBJECTS = dwfl-bug-addr-overflow.$(OBJEXT)
+dwfl_bug_addr_overflow_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+dwfl_bug_fd_leak_SOURCES = dwfl-bug-fd-leak.c
+dwfl_bug_fd_leak_OBJECTS = dwfl-bug-fd-leak.$(OBJEXT)
+dwfl_bug_fd_leak_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+dwfl_bug_getmodules_SOURCES = dwfl-bug-getmodules.c
+dwfl_bug_getmodules_OBJECTS = dwfl-bug-getmodules.$(OBJEXT)
+dwfl_bug_getmodules_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+dwfl_bug_report_SOURCES = dwfl-bug-report.c
+dwfl_bug_report_OBJECTS = dwfl-bug-report.$(OBJEXT)
+dwfl_bug_report_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+dwfl_report_elf_align_SOURCES = dwfl-report-elf-align.c
+dwfl_report_elf_align_OBJECTS = dwfl-report-elf-align.$(OBJEXT)
+dwfl_report_elf_align_DEPENDENCIES = $(am__DEPENDENCIES_4)
+dwfllines_SOURCES = dwfllines.c
+dwfllines_OBJECTS = dwfllines.$(OBJEXT)
+dwfllines_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+dwflmodtest_SOURCES = dwflmodtest.c
+dwflmodtest_OBJECTS = dwflmodtest.$(OBJEXT)
+dwflmodtest_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_2)
+dwflsyms_SOURCES = dwflsyms.c
+dwflsyms_OBJECTS = dwflsyms.$(OBJEXT)
+dwflsyms_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+early_offscn_SOURCES = early-offscn.c
+early_offscn_OBJECTS = early-offscn.$(OBJEXT)
+early_offscn_DEPENDENCIES = $(am__DEPENDENCIES_2)
+ecp_SOURCES = ecp.c
+ecp_OBJECTS = ecp.$(OBJEXT)
+ecp_DEPENDENCIES = $(am__DEPENDENCIES_2)
+find_prologues_SOURCES = find-prologues.c
+find_prologues_OBJECTS = find-prologues.$(OBJEXT)
+find_prologues_DEPENDENCIES = $(am__DEPENDENCIES_4)
+funcretval_SOURCES = funcretval.c
+funcretval_OBJECTS = funcretval.$(OBJEXT)
+funcretval_DEPENDENCIES = $(am__DEPENDENCIES_4)
+funcscopes_SOURCES = funcscopes.c
+funcscopes_OBJECTS = funcscopes.$(OBJEXT)
+funcscopes_DEPENDENCIES = $(am__DEPENDENCIES_4)
+get_aranges_SOURCES = get-aranges.c
+get_aranges_OBJECTS = get-aranges.$(OBJEXT)
+get_aranges_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+get_files_SOURCES = get-files.c
+get_files_OBJECTS = get-files.$(OBJEXT)
+get_files_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+get_lines_SOURCES = get-lines.c
+get_lines_OBJECTS = get-lines.$(OBJEXT)
+get_lines_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+get_pubnames_SOURCES = get-pubnames.c
+get_pubnames_OBJECTS = get-pubnames.$(OBJEXT)
+get_pubnames_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+hash_SOURCES = hash.c
+hash_OBJECTS = hash.$(OBJEXT)
+hash_DEPENDENCIES = $(am__DEPENDENCIES_2)
+line2addr_SOURCES = line2addr.c
+line2addr_OBJECTS = line2addr.$(OBJEXT)
+line2addr_DEPENDENCIES = $(am__DEPENDENCIES_4)
+low_high_pc_SOURCES = low_high_pc.c
+low_high_pc_OBJECTS = low_high_pc.$(OBJEXT)
+low_high_pc_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+md5_sha1_test_SOURCES = md5-sha1-test.c
+md5_sha1_test_OBJECTS = md5-sha1-test.$(OBJEXT)
+md5_sha1_test_DEPENDENCIES = $(libeu)
+msg_tst_SOURCES = msg_tst.c
+msg_tst_OBJECTS = msg_tst.$(OBJEXT)
+msg_tst_DEPENDENCIES = $(am__DEPENDENCIES_2)
+newfile_SOURCES = newfile.c
+newfile_OBJECTS = newfile.$(OBJEXT)
+newfile_DEPENDENCIES = $(am__DEPENDENCIES_2)
+newscn_SOURCES = newscn.c
+newscn_OBJECTS = newscn.$(OBJEXT)
+newscn_DEPENDENCIES = $(am__DEPENDENCIES_2)
+rdwrmmap_SOURCES = rdwrmmap.c
+rdwrmmap_OBJECTS = rdwrmmap.$(OBJEXT)
+rdwrmmap_DEPENDENCIES = $(am__DEPENDENCIES_2)
+rerequest_tag_SOURCES = rerequest_tag.c
+rerequest_tag_OBJECTS = rerequest_tag.$(OBJEXT)
+rerequest_tag_DEPENDENCIES = $(am__DEPENDENCIES_4)
+saridx_SOURCES = saridx.c
+saridx_OBJECTS = saridx.$(OBJEXT)
+saridx_DEPENDENCIES = $(am__DEPENDENCIES_2)
+scnnames_SOURCES = scnnames.c
+scnnames_OBJECTS = scnnames.$(OBJEXT)
+scnnames_DEPENDENCIES = $(am__DEPENDENCIES_2)
+sectiondump_SOURCES = sectiondump.c
+sectiondump_OBJECTS = sectiondump.$(OBJEXT)
+sectiondump_DEPENDENCIES = $(am__DEPENDENCIES_2)
+show_abbrev_SOURCES = show-abbrev.c
+show_abbrev_OBJECTS = show-abbrev.$(OBJEXT)
+show_abbrev_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+show_die_info_SOURCES = show-die-info.c
+show_die_info_OBJECTS = show-die-info.$(OBJEXT)
+show_die_info_DEPENDENCIES = $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_2)
+showptable_SOURCES = showptable.c
+showptable_OBJECTS = showptable.$(OBJEXT)
+showptable_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_elf_cntl_gelf_getshdr_SOURCES = test-elf_cntl_gelf_getshdr.c
+test_elf_cntl_gelf_getshdr_OBJECTS = \
+ test-elf_cntl_gelf_getshdr.$(OBJEXT)
+test_elf_cntl_gelf_getshdr_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_flag_nobits_SOURCES = test-flag-nobits.c
+test_flag_nobits_OBJECTS = test-flag-nobits.$(OBJEXT)
+test_flag_nobits_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_nlist_SOURCES = test-nlist.c
+test_nlist_OBJECTS = test-nlist.$(OBJEXT)
+test_nlist_DEPENDENCIES = $(am__DEPENDENCIES_2)
+typeiter_SOURCES = typeiter.c
+typeiter_OBJECTS = typeiter.$(OBJEXT)
+typeiter_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+typeiter2_SOURCES = typeiter2.c
+typeiter2_OBJECTS = typeiter2.$(OBJEXT)
+typeiter2_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+update1_SOURCES = update1.c
+update1_OBJECTS = update1.$(OBJEXT)
+update1_DEPENDENCIES = $(am__DEPENDENCIES_2)
+update2_SOURCES = update2.c
+update2_OBJECTS = update2.$(OBJEXT)
+update2_DEPENDENCIES = $(am__DEPENDENCIES_2)
+update3_SOURCES = update3.c
+update3_OBJECTS = update3.$(OBJEXT)
+update3_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+update4_SOURCES = update4.c
+update4_OBJECTS = update4.$(OBJEXT)
+update4_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
+varlocs_SOURCES = varlocs.c
+varlocs_OBJECTS = varlocs.$(OBJEXT)
+varlocs_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+vdsosyms_SOURCES = vdsosyms.c
+vdsosyms_OBJECTS = vdsosyms.$(OBJEXT)
+vdsosyms_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_2)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = addrcfi.c addrscopes.c aggregate_size.c alldts.c allfcts.c \
+ allregs.c arextract.c arls.c arsymtest.c asm-tst1.c asm-tst2.c \
+ asm-tst3.c asm-tst4.c asm-tst5.c asm-tst6.c asm-tst7.c \
+ asm-tst8.c asm-tst9.c backtrace.c backtrace-child.c \
+ $(backtrace_child_biarch_SOURCES) backtrace-data.c \
+ backtrace-dwarf.c buildid.c debugaltlink.c debuglink.c \
+ deleted.c deleted-lib.c dwarf-getmacros.c dwarf-getstring.c \
+ dwfl-addr-sect.c dwfl-bug-addr-overflow.c dwfl-bug-fd-leak.c \
+ dwfl-bug-getmodules.c dwfl-bug-report.c \
+ dwfl-report-elf-align.c dwfllines.c dwflmodtest.c dwflsyms.c \
+ early-offscn.c ecp.c find-prologues.c funcretval.c \
+ funcscopes.c get-aranges.c get-files.c get-lines.c \
+ get-pubnames.c hash.c line2addr.c low_high_pc.c \
+ md5-sha1-test.c msg_tst.c newfile.c newscn.c rdwrmmap.c \
+ rerequest_tag.c saridx.c scnnames.c sectiondump.c \
+ show-abbrev.c show-die-info.c showptable.c \
+ test-elf_cntl_gelf_getshdr.c test-flag-nobits.c test-nlist.c \
+ typeiter.c typeiter2.c update1.c update2.c update3.c update4.c \
+ varlocs.c vdsosyms.c
+DIST_SOURCES = addrcfi.c addrscopes.c aggregate_size.c alldts.c \
+ allfcts.c allregs.c arextract.c arls.c arsymtest.c asm-tst1.c \
+ asm-tst2.c asm-tst3.c asm-tst4.c asm-tst5.c asm-tst6.c \
+ asm-tst7.c asm-tst8.c asm-tst9.c backtrace.c backtrace-child.c \
+ $(backtrace_child_biarch_SOURCES) backtrace-data.c \
+ backtrace-dwarf.c buildid.c debugaltlink.c debuglink.c \
+ deleted.c deleted-lib.c dwarf-getmacros.c dwarf-getstring.c \
+ dwfl-addr-sect.c dwfl-bug-addr-overflow.c dwfl-bug-fd-leak.c \
+ dwfl-bug-getmodules.c dwfl-bug-report.c \
+ dwfl-report-elf-align.c dwfllines.c dwflmodtest.c dwflsyms.c \
+ early-offscn.c ecp.c find-prologues.c funcretval.c \
+ funcscopes.c get-aranges.c get-files.c get-lines.c \
+ get-pubnames.c hash.c line2addr.c low_high_pc.c \
+ md5-sha1-test.c msg_tst.c newfile.c newscn.c rdwrmmap.c \
+ rerequest_tag.c saridx.c scnnames.c sectiondump.c \
+ show-abbrev.c show-die-info.c showptable.c \
+ test-elf_cntl_gelf_getshdr.c test-flag-nobits.c test-nlist.c \
+ typeiter.c typeiter2.c update1.c update2.c update3.c update4.c \
+ varlocs.c vdsosyms.c
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_BIARCH = @CC_BIARCH@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEBUGPRED = @DEBUGPRED@
+DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+HAVE_VALGRIND = @HAVE_VALGRIND@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBEBL_SUBDIR = @LIBEBL_SUBDIR@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MODVERSION = @MODVERSION@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+READELF = @READELF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+base_cpu = @base_cpu@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+eu_version = @eu_version@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+zip_LIBS = @zip_LIBS@
+AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_1)
+AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+ $(if $($(*F)_no_Werror),,-Werror) \
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $($(*F)_CFLAGS)
+
+COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
+CLEANFILES = *.gcno *.gcda
+textrel_msg = echo "WARNING: TEXTREL found in '$@'"
+@FATAL_TEXTREL_FALSE@textrel_found = $(textrel_msg)
+@FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1
+textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi
+BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
+AM_LDFLAGS = $(am__append_2) $(am__append_3)
+@TESTS_RPATH_FALSE@tests_rpath = no
+@TESTS_RPATH_TRUE@tests_rpath = yes
+asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
+ asm-tst6 asm-tst7 asm-tst8 asm-tst9
+
+EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
+ run-show-die-info.sh run-get-files.sh run-get-lines.sh \
+ run-get-pubnames.sh run-get-aranges.sh \
+ run-show-abbrev.sh run-strip-test.sh \
+ run-strip-test2.sh run-ecp-test.sh run-ecp-test2.sh \
+ testfile.bz2 testfile2.bz2 testfile3.bz2 testfile4.bz2 \
+ testfile5.bz2 testfile6.bz2 testfile7.bz2 testfile8.bz2 \
+ testfile9.bz2 testfile10.bz2 testfile11.bz2 testfile12.bz2 \
+ testfile13.bz2 run-strip-test3.sh run-allfcts.sh \
+ testfile_class_func.bz2 testfile_nested_funcs.bz2 \
+ run-line2addr.sh run-elflint-test.sh testfile14.bz2 \
+ run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
+ run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \
+ run-strip-reloc.sh hello_i386.ko.bz2 hello_x86_64.ko.bz2 \
+ hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \
+ run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-M.sh\
+ run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \
+ run-ranlib-test3.sh run-ranlib-test4.sh \
+ run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
+ run-nm-self.sh run-readelf-self.sh run-addrcfi.sh \
+ run-find-prologues.sh run-allregs.sh run-native-test.sh \
+ run-addrname-test.sh run-dwfl-bug-offline-rel.sh \
+ run-dwfl-addr-sect.sh run-early-offscn.sh \
+ run-dwarf-getmacros.sh run-test-flag-nobits.sh \
+ run-dwarf-getstring.sh run-rerequest_tag.sh run-alldts.sh \
+ testfile15.bz2 testfile15.debug.bz2 \
+ testfile16.bz2 testfile16.debug.bz2 \
+ testfile17.bz2 testfile17.debug.bz2 \
+ testfile18.bz2 testfile19.bz2 testfile19.index.bz2 \
+ testfile20.bz2 testfile20.index.bz2 \
+ testfile21.bz2 testfile21.index.bz2 \
+ testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \
+ testfile26.bz2 testfile27.bz2 \
+ coverage.sh test-subr.sh test-wrapper.sh \
+ run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
+ run-readelf-test4.sh run-readelf-twofiles.sh \
+ run-bug1-test.sh testfile28.bz2 testfile28.rdwr.bz2 \
+ run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
+ testfile29.bz2 testfile29.rdwr.bz2 \
+ testfile30.bz2 testfile31.bz2 testfile32.bz2 testfile33.bz2 \
+ testfile34.bz2 testfile35.bz2 testfile35.debug.bz2 \
+ testfile36.bz2 testfile36.debug.bz2 \
+ testfile37.bz2 testfile37.debug.bz2 \
+ testfile38.bz2 testfile39.bz2 testfile40.bz2 testfile40.debug.bz2 \
+ testfile41.bz2 testfile42.bz2 testfile42_noshdrs.bz2 \
+ testfile43.bz2 \
+ testfile44.S.bz2 testfile44.expect.bz2 run-disasm-x86.sh \
+ testfile45.S.bz2 testfile45.expect.bz2 run-disasm-x86-64.sh \
+ testfile46.bz2 testfile47.bz2 testfile48.bz2 testfile48.debug.bz2 \
+ testfile49.bz2 testfile50.bz2 testfile51.bz2 \
+ testfile-macros-0xff.bz2 \
+ run-readelf-macro.sh testfilemacro.bz2 \
+ run-readelf-loc.sh testfileloc.bz2 \
+ run-readelf-aranges.sh run-readelf-line.sh testfilefoobarbaz.bz2 \
+ run-readelf-dwz-multi.sh libtestfile_multi_shared.so.bz2 \
+ testfile_multi.dwz.bz2 testfile_multi_main.bz2 \
+ testfile-dwzstr.bz2 testfile-dwzstr.multi.bz2 \
+ run-allfcts-multi.sh \
+ test-offset-loop.bz2 test-offset-loop.alt.bz2 \
+ run-prelink-addr-test.sh \
+ testfile52-32.so.bz2 testfile52-32.so.debug.bz2 \
+ testfile52-32.prelink.so.bz2 testfile52-32.noshdrs.so.bz2 \
+ testfile52-64.so.bz2 testfile52-64.so.debug.bz2 \
+ testfile52-64.prelink.so.bz2 testfile52-64.noshdrs.so.bz2 \
+ testfile53-32.bz2 testfile53-32.debug.bz2 \
+ testfile53-32.prelink.bz2 testfile53-64.bz2 \
+ testfile53-64.debug.bz2 testfile53-64.prelink.bz2 \
+ testfile54-32.so.bz2 testfile54-32.so.debug.bz2 \
+ testfile54-32.prelink.so.bz2 testfile54-32.noshdrs.so.bz2 \
+ testfile54-64.so.bz2 testfile54-64.so.debug.bz2 \
+ testfile54-64.prelink.so.bz2 testfile54-64.noshdrs.so.bz2 \
+ testfile55-32.bz2 testfile55-32.debug.bz2 \
+ testfile55-32.prelink.bz2 testfile55-64.bz2 \
+ testfile55-64.debug.bz2 testfile55-64.prelink.bz2 \
+ testfile56.bz2 testfile57.bz2 testfile58.bz2 \
+ run-typeiter.sh testfile59.bz2 \
+ run-readelf-d.sh testlib_dynseg.so.bz2 \
+ run-readelf-gdb_index.sh testfilegdbindex5.bz2 \
+ testfilegdbindex7.bz2 \
+ run-readelf-s.sh testfilebazdbg.bz2 testfilebazdyn.bz2 \
+ testfilebazmin.bz2 testfilebazdbg.debug.bz2 testfilebazmdb.bz2 \
+ testfilebaztab.bz2 testfilebasmin.bz2 testfilebaxmin.bz2 \
+ testfilebazdbg_pl.bz2 testfilebazmin_pl.bz2 \
+ testfilebazdbg_plr.bz2 testfilebazmin_plr.bz2 \
+ testfilebazdbgppc64.bz2 testfilebazdbgppc64.debug.bz2 \
+ testfilebazdbgppc64_pl.bz2 testfilebazdbgppc64_plr.bz2 \
+ testfilebazdynppc64.bz2 testfilebazmdbppc64.bz2 \
+ testfilebazminppc64.bz2 testfilebazminppc64_pl.bz2 \
+ testfilebazminppc64_plr.bz2 testfilebaztabppc64.bz2 \
+ run-dwflsyms.sh \
+ run-unstrip-n.sh testcore-rtlib.bz2 testcore-rtlib-ppc.bz2 \
+ run-low_high_pc.sh testfile_low_high_pc.bz2 \
+ run-macro-test.sh testfile-macinfo.bz2 testfile-macros.bz2 \
+ run-elf_cntl_gelf_getshdr.sh \
+ run-test-archive64.sh testarchive64.a.bz2 \
+ testfile60.bz2 testfile61.bz2 \
+ run-readelf-vmcoreinfo.sh testfile62.bz2 \
+ run-readelf-mixed-corenote.sh testfile63.bz2 testfile64.bz2 \
+ testfile65.bz2 testfile67.bz2 testfile68.bz2 \
+ testfile69.core.bz2 testfile69.so.bz2 \
+ testfile70.core.bz2 testfile70.exec.bz2 testfile71.bz2 \
+ run-dwfllines.sh run-dwfl-report-elf-align.sh \
+ testfile-dwfl-report-elf-align-shlib.so.bz2 \
+ testfilenolines.bz2 test-core-lib.so.bz2 test-core.core.bz2 \
+ test-core.exec.bz2 run-addr2line-test.sh \
+ run-addr2line-i-test.sh testfile-inlines.bz2 \
+ run-addr2line-i-lex-test.sh testfile-lex-inlines.bz2 \
+ testfileppc32.bz2 testfileppc64.bz2 \
+ testfiles390.bz2 testfiles390x.bz2 \
+ testfilearm.bz2 testfileaarch64.bz2 \
+ run-varlocs.sh \
+ testfile_const_type.c testfile_const_type.bz2 \
+ testfile_implicit_pointer.c testfile_implicit_pointer.bz2 \
+ testfile_parameter_ref.c testfile_parameter_ref.bz2 \
+ testfile_entry_value.c testfile_entry_value.bz2 \
+ testfile_implicit_value.c testfile_implicit_value.bz2 \
+ testfile_aarch64_core.bz2 testfile_i686_core.bz2 \
+ run-funcretval.sh funcretval_test.c funcretval_test_aarch64.bz2 \
+ run-backtrace-data.sh run-backtrace-dwarf.sh cleanup-13.c \
+ run-backtrace-native.sh run-backtrace-native-biarch.sh \
+ run-backtrace-native-core.sh run-backtrace-native-core-biarch.sh \
+ run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \
+ backtrace-subr.sh backtrace.i386.core.bz2 backtrace.i386.exec.bz2 \
+ backtrace.x86_64.core.bz2 backtrace.x86_64.exec.bz2 \
+ backtrace.ppc.core.bz2 backtrace.ppc.exec.bz2 \
+ run-backtrace-core-ppc.sh testfile66.bz2 testfile66.core.bz2 \
+ backtrace.s390x.core.bz2 backtrace.s390x.exec.bz2 \
+ backtrace.s390.core.bz2 backtrace.s390.exec.bz2 \
+ run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
+ run-backtrace-core-aarch64.sh \
+ backtrace.aarch64.core.bz2 backtrace.aarch64.exec.bz2 \
+ run-backtrace-demangle.sh testfile-backtrace-demangle.bz2 \
+ testfile-backtrace-demangle.cc \
+ testfile-backtrace-demangle.core.bz2 \
+ run-stack-d-test.sh run-stack-i-test.sh \
+ testfiledwarfinlines.bz2 testfiledwarfinlines.core.bz2 \
+ run-readelf-zdebug.sh testfile-debug.bz2 testfile-zdebug.bz2 \
+ run-deleted.sh run-linkmap-cut.sh linkmap-cut-lib.so.bz2 \
+ linkmap-cut.bz2 linkmap-cut.core.bz2 \
+ run-aggregate-size.sh testfile-sizes1.o.bz2 testfile-sizes2.o.bz2 \
+ testfile-sizes3.o.bz2 \
+ run-readelf-A.sh testfileppc32attrs.o.bz2
+
+@USE_VALGRIND_TRUE@valgrind_cmd = 'valgrind -q --error-exitcode=1 --run-libc-freeres=no'
+installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \
+ bindir=$(DESTDIR)$(bindir); \
+ LC_ALL=C; LANG=C; \
+ VALGRIND_CMD=$(valgrind_cmd); \
+ abs_srcdir=$(abs_srcdir); \
+ abs_builddir=$(abs_builddir); \
+ abs_top_builddir=$(abs_top_builddir); \
+ export abs_srcdir; export abs_builddir; \
+ export abs_top_builddir; \
+ export libdir; export bindir; \
+ export LC_ALL; export LANG; export VALGRIND_CMD; \
+ NM=$(NM); export NM;
+
+installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ installed $(tests_rpath) \
+ '$(program_transform_name)'
+
+@STANDALONE_FALSE@TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
+@STANDALONE_FALSE@ abs_srcdir=$(abs_srcdir); abs_builddir=$(abs_builddir); \
+@STANDALONE_FALSE@ abs_top_builddir=$(abs_top_builddir); \
+@STANDALONE_FALSE@ export abs_srcdir; export abs_builddir; \
+@STANDALONE_FALSE@ export abs_top_builddir; \
+@STANDALONE_FALSE@ export LC_ALL; export LANG; export VALGRIND_CMD; \
+@STANDALONE_FALSE@ NM=$(NM); export NM;
+
+@STANDALONE_TRUE@TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
+@STANDALONE_FALSE@LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+@STANDALONE_FALSE@ $(abs_top_builddir)/libdw:$(abs_top_builddir)/backends:$(abs_top_builddir)/libelf:$(abs_top_builddir)/libasm
+
+@STANDALONE_TRUE@LOG_COMPILER = $(installed_LOG_COMPILER)
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@libdw = ../libdw/libdw.so
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@libdw = ../libdw/libdw.a $(zip_LIBS) $(libelf) $(libebl) -ldl
+@STANDALONE_TRUE@libdw = -ldw
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@libelf = ../libelf/libelf.so
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@libelf = ../libelf/libelf.a
+@STANDALONE_TRUE@libelf = -lelf
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@libasm = ../libasm/libasm.so
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@libasm = ../libasm/libasm.a
+@STANDALONE_TRUE@libasm = -lasm
+@STANDALONE_FALSE@libebl = ../libebl/libebl.a
+@STANDALONE_TRUE@libebl = -lebl
+@STANDALONE_FALSE@libeu = ../lib/libeu.a
+arextract_LDADD = $(libelf)
+arsymtest_LDADD = $(libelf)
+newfile_LDADD = $(libelf)
+saridx_LDADD = $(libelf)
+scnnames_LDADD = $(libelf)
+sectiondump_LDADD = $(libelf)
+showptable_LDADD = $(libelf)
+hash_LDADD = $(libelf)
+test_nlist_LDADD = $(libelf)
+msg_tst_LDADD = $(libelf)
+newscn_LDADD = $(libelf)
+early_offscn_LDADD = $(libelf)
+ecp_LDADD = $(libelf)
+update1_LDADD = $(libelf)
+update2_LDADD = $(libelf)
+update3_LDADD = $(libebl) $(libelf)
+update4_LDADD = $(libebl) $(libelf)
+show_die_info_LDADD = $(libdw) $(libelf)
+get_pubnames_LDADD = $(libdw) $(libelf)
+show_abbrev_LDADD = $(libdw) $(libelf)
+get_lines_LDADD = $(libdw) $(libelf)
+get_files_LDADD = $(libdw) $(libelf)
+get_aranges_LDADD = $(libdw) $(libelf)
+allfcts_LDADD = $(libdw) $(libelf)
+line2addr_LDADD = $(libdw)
+addrscopes_LDADD = $(libdw)
+funcscopes_LDADD = $(libdw)
+funcretval_LDADD = $(libdw)
+allregs_LDADD = $(libdw)
+find_prologues_LDADD = $(libdw)
+#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf)
+asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) -ldl
+dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+rdwrmmap_LDADD = $(libelf)
+dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+arls_LDADD = $(libelf)
+dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+dwarf_getmacros_LDADD = $(libdw)
+dwarf_getstring_LDADD = $(libdw)
+addrcfi_LDADD = $(libdw) $(libebl) $(libelf) -ldl
+test_flag_nobits_LDADD = $(libelf)
+rerequest_tag_LDADD = $(libdw)
+alldts_LDADD = $(libebl) $(libelf)
+md5_sha1_test_LDADD = $(libeu)
+typeiter_LDADD = $(libdw) $(libelf)
+typeiter2_LDADD = $(libdw) $(libelf)
+low_high_pc_LDADD = $(libdw) $(libelf)
+test_elf_cntl_gelf_getshdr_LDADD = $(libelf)
+dwflsyms_LDADD = $(libdw) $(libelf)
+dwfllines_LDADD = $(libdw) $(libelf)
+dwfl_report_elf_align_LDADD = $(libdw)
+varlocs_LDADD = $(libdw) $(libelf)
+backtrace_LDADD = $(libdw) $(libelf)
+# backtrace-child-biarch also uses those *_CFLAGS and *_LDLAGS variables:
+backtrace_child_CFLAGS = -fPIE
+backtrace_child_LDFLAGS = -pie -pthread
+backtrace_child_biarch_SOURCES = backtrace-child.c
+backtrace_data_LDADD = $(libdw) $(libelf)
+backtrace_dwarf_CFLAGS = -Wno-unused-parameter
+backtrace_dwarf_LDADD = $(libdw) $(libelf)
+debuglink_LDADD = $(libdw) $(libelf)
+debugaltlink_LDADD = $(libdw) $(libelf)
+buildid_LDADD = $(libdw) $(libelf)
+deleted_LDADD = ./deleted-lib.so
+deleted_lib_so_LDFLAGS = -shared -rdynamic
+deleted_lib_so_CFLAGS = -fPIC -fasynchronous-unwind-tables
+aggregate_size_LDADD = $(libdw) $(libelf)
+vdsosyms_LDADD = $(libdw) $(libelf)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/eu.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/config/eu.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+addrcfi$(EXEEXT): $(addrcfi_OBJECTS) $(addrcfi_DEPENDENCIES) $(EXTRA_addrcfi_DEPENDENCIES)
+ @rm -f addrcfi$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(addrcfi_OBJECTS) $(addrcfi_LDADD) $(LIBS)
+
+addrscopes$(EXEEXT): $(addrscopes_OBJECTS) $(addrscopes_DEPENDENCIES) $(EXTRA_addrscopes_DEPENDENCIES)
+ @rm -f addrscopes$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(addrscopes_OBJECTS) $(addrscopes_LDADD) $(LIBS)
+
+aggregate_size$(EXEEXT): $(aggregate_size_OBJECTS) $(aggregate_size_DEPENDENCIES) $(EXTRA_aggregate_size_DEPENDENCIES)
+ @rm -f aggregate_size$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(aggregate_size_OBJECTS) $(aggregate_size_LDADD) $(LIBS)
+
+alldts$(EXEEXT): $(alldts_OBJECTS) $(alldts_DEPENDENCIES) $(EXTRA_alldts_DEPENDENCIES)
+ @rm -f alldts$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(alldts_OBJECTS) $(alldts_LDADD) $(LIBS)
+
+allfcts$(EXEEXT): $(allfcts_OBJECTS) $(allfcts_DEPENDENCIES) $(EXTRA_allfcts_DEPENDENCIES)
+ @rm -f allfcts$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(allfcts_OBJECTS) $(allfcts_LDADD) $(LIBS)
+
+allregs$(EXEEXT): $(allregs_OBJECTS) $(allregs_DEPENDENCIES) $(EXTRA_allregs_DEPENDENCIES)
+ @rm -f allregs$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(allregs_OBJECTS) $(allregs_LDADD) $(LIBS)
+
+arextract$(EXEEXT): $(arextract_OBJECTS) $(arextract_DEPENDENCIES) $(EXTRA_arextract_DEPENDENCIES)
+ @rm -f arextract$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(arextract_OBJECTS) $(arextract_LDADD) $(LIBS)
+
+arls$(EXEEXT): $(arls_OBJECTS) $(arls_DEPENDENCIES) $(EXTRA_arls_DEPENDENCIES)
+ @rm -f arls$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(arls_OBJECTS) $(arls_LDADD) $(LIBS)
+
+arsymtest$(EXEEXT): $(arsymtest_OBJECTS) $(arsymtest_DEPENDENCIES) $(EXTRA_arsymtest_DEPENDENCIES)
+ @rm -f arsymtest$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(arsymtest_OBJECTS) $(arsymtest_LDADD) $(LIBS)
+
+asm-tst1$(EXEEXT): $(asm_tst1_OBJECTS) $(asm_tst1_DEPENDENCIES) $(EXTRA_asm_tst1_DEPENDENCIES)
+ @rm -f asm-tst1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst1_OBJECTS) $(asm_tst1_LDADD) $(LIBS)
+
+asm-tst2$(EXEEXT): $(asm_tst2_OBJECTS) $(asm_tst2_DEPENDENCIES) $(EXTRA_asm_tst2_DEPENDENCIES)
+ @rm -f asm-tst2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst2_OBJECTS) $(asm_tst2_LDADD) $(LIBS)
+
+asm-tst3$(EXEEXT): $(asm_tst3_OBJECTS) $(asm_tst3_DEPENDENCIES) $(EXTRA_asm_tst3_DEPENDENCIES)
+ @rm -f asm-tst3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst3_OBJECTS) $(asm_tst3_LDADD) $(LIBS)
+
+asm-tst4$(EXEEXT): $(asm_tst4_OBJECTS) $(asm_tst4_DEPENDENCIES) $(EXTRA_asm_tst4_DEPENDENCIES)
+ @rm -f asm-tst4$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst4_OBJECTS) $(asm_tst4_LDADD) $(LIBS)
+
+asm-tst5$(EXEEXT): $(asm_tst5_OBJECTS) $(asm_tst5_DEPENDENCIES) $(EXTRA_asm_tst5_DEPENDENCIES)
+ @rm -f asm-tst5$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst5_OBJECTS) $(asm_tst5_LDADD) $(LIBS)
+
+asm-tst6$(EXEEXT): $(asm_tst6_OBJECTS) $(asm_tst6_DEPENDENCIES) $(EXTRA_asm_tst6_DEPENDENCIES)
+ @rm -f asm-tst6$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst6_OBJECTS) $(asm_tst6_LDADD) $(LIBS)
+
+asm-tst7$(EXEEXT): $(asm_tst7_OBJECTS) $(asm_tst7_DEPENDENCIES) $(EXTRA_asm_tst7_DEPENDENCIES)
+ @rm -f asm-tst7$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst7_OBJECTS) $(asm_tst7_LDADD) $(LIBS)
+
+asm-tst8$(EXEEXT): $(asm_tst8_OBJECTS) $(asm_tst8_DEPENDENCIES) $(EXTRA_asm_tst8_DEPENDENCIES)
+ @rm -f asm-tst8$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst8_OBJECTS) $(asm_tst8_LDADD) $(LIBS)
+
+asm-tst9$(EXEEXT): $(asm_tst9_OBJECTS) $(asm_tst9_DEPENDENCIES) $(EXTRA_asm_tst9_DEPENDENCIES)
+ @rm -f asm-tst9$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(asm_tst9_OBJECTS) $(asm_tst9_LDADD) $(LIBS)
+
+backtrace$(EXEEXT): $(backtrace_OBJECTS) $(backtrace_DEPENDENCIES) $(EXTRA_backtrace_DEPENDENCIES)
+ @rm -f backtrace$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(backtrace_OBJECTS) $(backtrace_LDADD) $(LIBS)
+
+backtrace-child$(EXEEXT): $(backtrace_child_OBJECTS) $(backtrace_child_DEPENDENCIES) $(EXTRA_backtrace_child_DEPENDENCIES)
+ @rm -f backtrace-child$(EXEEXT)
+ $(AM_V_CCLD)$(backtrace_child_LINK) $(backtrace_child_OBJECTS) $(backtrace_child_LDADD) $(LIBS)
+
+backtrace-data$(EXEEXT): $(backtrace_data_OBJECTS) $(backtrace_data_DEPENDENCIES) $(EXTRA_backtrace_data_DEPENDENCIES)
+ @rm -f backtrace-data$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(backtrace_data_OBJECTS) $(backtrace_data_LDADD) $(LIBS)
+
+backtrace-dwarf$(EXEEXT): $(backtrace_dwarf_OBJECTS) $(backtrace_dwarf_DEPENDENCIES) $(EXTRA_backtrace_dwarf_DEPENDENCIES)
+ @rm -f backtrace-dwarf$(EXEEXT)
+ $(AM_V_CCLD)$(backtrace_dwarf_LINK) $(backtrace_dwarf_OBJECTS) $(backtrace_dwarf_LDADD) $(LIBS)
+
+buildid$(EXEEXT): $(buildid_OBJECTS) $(buildid_DEPENDENCIES) $(EXTRA_buildid_DEPENDENCIES)
+ @rm -f buildid$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(buildid_OBJECTS) $(buildid_LDADD) $(LIBS)
+
+debugaltlink$(EXEEXT): $(debugaltlink_OBJECTS) $(debugaltlink_DEPENDENCIES) $(EXTRA_debugaltlink_DEPENDENCIES)
+ @rm -f debugaltlink$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(debugaltlink_OBJECTS) $(debugaltlink_LDADD) $(LIBS)
+
+debuglink$(EXEEXT): $(debuglink_OBJECTS) $(debuglink_DEPENDENCIES) $(EXTRA_debuglink_DEPENDENCIES)
+ @rm -f debuglink$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(debuglink_OBJECTS) $(debuglink_LDADD) $(LIBS)
+
+deleted$(EXEEXT): $(deleted_OBJECTS) $(deleted_DEPENDENCIES) $(EXTRA_deleted_DEPENDENCIES)
+ @rm -f deleted$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(deleted_OBJECTS) $(deleted_LDADD) $(LIBS)
+
+deleted-lib.so$(EXEEXT): $(deleted_lib_so_OBJECTS) $(deleted_lib_so_DEPENDENCIES) $(EXTRA_deleted_lib_so_DEPENDENCIES)
+ @rm -f deleted-lib.so$(EXEEXT)
+ $(AM_V_CCLD)$(deleted_lib_so_LINK) $(deleted_lib_so_OBJECTS) $(deleted_lib_so_LDADD) $(LIBS)
+
+dwarf-getmacros$(EXEEXT): $(dwarf_getmacros_OBJECTS) $(dwarf_getmacros_DEPENDENCIES) $(EXTRA_dwarf_getmacros_DEPENDENCIES)
+ @rm -f dwarf-getmacros$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwarf_getmacros_OBJECTS) $(dwarf_getmacros_LDADD) $(LIBS)
+
+dwarf-getstring$(EXEEXT): $(dwarf_getstring_OBJECTS) $(dwarf_getstring_DEPENDENCIES) $(EXTRA_dwarf_getstring_DEPENDENCIES)
+ @rm -f dwarf-getstring$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwarf_getstring_OBJECTS) $(dwarf_getstring_LDADD) $(LIBS)
+
+dwfl-addr-sect$(EXEEXT): $(dwfl_addr_sect_OBJECTS) $(dwfl_addr_sect_DEPENDENCIES) $(EXTRA_dwfl_addr_sect_DEPENDENCIES)
+ @rm -f dwfl-addr-sect$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_addr_sect_OBJECTS) $(dwfl_addr_sect_LDADD) $(LIBS)
+
+dwfl-bug-addr-overflow$(EXEEXT): $(dwfl_bug_addr_overflow_OBJECTS) $(dwfl_bug_addr_overflow_DEPENDENCIES) $(EXTRA_dwfl_bug_addr_overflow_DEPENDENCIES)
+ @rm -f dwfl-bug-addr-overflow$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_bug_addr_overflow_OBJECTS) $(dwfl_bug_addr_overflow_LDADD) $(LIBS)
+
+dwfl-bug-fd-leak$(EXEEXT): $(dwfl_bug_fd_leak_OBJECTS) $(dwfl_bug_fd_leak_DEPENDENCIES) $(EXTRA_dwfl_bug_fd_leak_DEPENDENCIES)
+ @rm -f dwfl-bug-fd-leak$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_bug_fd_leak_OBJECTS) $(dwfl_bug_fd_leak_LDADD) $(LIBS)
+
+dwfl-bug-getmodules$(EXEEXT): $(dwfl_bug_getmodules_OBJECTS) $(dwfl_bug_getmodules_DEPENDENCIES) $(EXTRA_dwfl_bug_getmodules_DEPENDENCIES)
+ @rm -f dwfl-bug-getmodules$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_bug_getmodules_OBJECTS) $(dwfl_bug_getmodules_LDADD) $(LIBS)
+
+dwfl-bug-report$(EXEEXT): $(dwfl_bug_report_OBJECTS) $(dwfl_bug_report_DEPENDENCIES) $(EXTRA_dwfl_bug_report_DEPENDENCIES)
+ @rm -f dwfl-bug-report$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_bug_report_OBJECTS) $(dwfl_bug_report_LDADD) $(LIBS)
+
+dwfl-report-elf-align$(EXEEXT): $(dwfl_report_elf_align_OBJECTS) $(dwfl_report_elf_align_DEPENDENCIES) $(EXTRA_dwfl_report_elf_align_DEPENDENCIES)
+ @rm -f dwfl-report-elf-align$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfl_report_elf_align_OBJECTS) $(dwfl_report_elf_align_LDADD) $(LIBS)
+
+dwfllines$(EXEEXT): $(dwfllines_OBJECTS) $(dwfllines_DEPENDENCIES) $(EXTRA_dwfllines_DEPENDENCIES)
+ @rm -f dwfllines$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwfllines_OBJECTS) $(dwfllines_LDADD) $(LIBS)
+
+dwflmodtest$(EXEEXT): $(dwflmodtest_OBJECTS) $(dwflmodtest_DEPENDENCIES) $(EXTRA_dwflmodtest_DEPENDENCIES)
+ @rm -f dwflmodtest$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwflmodtest_OBJECTS) $(dwflmodtest_LDADD) $(LIBS)
+
+dwflsyms$(EXEEXT): $(dwflsyms_OBJECTS) $(dwflsyms_DEPENDENCIES) $(EXTRA_dwflsyms_DEPENDENCIES)
+ @rm -f dwflsyms$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(dwflsyms_OBJECTS) $(dwflsyms_LDADD) $(LIBS)
+
+early-offscn$(EXEEXT): $(early_offscn_OBJECTS) $(early_offscn_DEPENDENCIES) $(EXTRA_early_offscn_DEPENDENCIES)
+ @rm -f early-offscn$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(early_offscn_OBJECTS) $(early_offscn_LDADD) $(LIBS)
+
+ecp$(EXEEXT): $(ecp_OBJECTS) $(ecp_DEPENDENCIES) $(EXTRA_ecp_DEPENDENCIES)
+ @rm -f ecp$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ecp_OBJECTS) $(ecp_LDADD) $(LIBS)
+
+find-prologues$(EXEEXT): $(find_prologues_OBJECTS) $(find_prologues_DEPENDENCIES) $(EXTRA_find_prologues_DEPENDENCIES)
+ @rm -f find-prologues$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(find_prologues_OBJECTS) $(find_prologues_LDADD) $(LIBS)
+
+funcretval$(EXEEXT): $(funcretval_OBJECTS) $(funcretval_DEPENDENCIES) $(EXTRA_funcretval_DEPENDENCIES)
+ @rm -f funcretval$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(funcretval_OBJECTS) $(funcretval_LDADD) $(LIBS)
+
+funcscopes$(EXEEXT): $(funcscopes_OBJECTS) $(funcscopes_DEPENDENCIES) $(EXTRA_funcscopes_DEPENDENCIES)
+ @rm -f funcscopes$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(funcscopes_OBJECTS) $(funcscopes_LDADD) $(LIBS)
+
+get-aranges$(EXEEXT): $(get_aranges_OBJECTS) $(get_aranges_DEPENDENCIES) $(EXTRA_get_aranges_DEPENDENCIES)
+ @rm -f get-aranges$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(get_aranges_OBJECTS) $(get_aranges_LDADD) $(LIBS)
+
+get-files$(EXEEXT): $(get_files_OBJECTS) $(get_files_DEPENDENCIES) $(EXTRA_get_files_DEPENDENCIES)
+ @rm -f get-files$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(get_files_OBJECTS) $(get_files_LDADD) $(LIBS)
+
+get-lines$(EXEEXT): $(get_lines_OBJECTS) $(get_lines_DEPENDENCIES) $(EXTRA_get_lines_DEPENDENCIES)
+ @rm -f get-lines$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(get_lines_OBJECTS) $(get_lines_LDADD) $(LIBS)
+
+get-pubnames$(EXEEXT): $(get_pubnames_OBJECTS) $(get_pubnames_DEPENDENCIES) $(EXTRA_get_pubnames_DEPENDENCIES)
+ @rm -f get-pubnames$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(get_pubnames_OBJECTS) $(get_pubnames_LDADD) $(LIBS)
+
+hash$(EXEEXT): $(hash_OBJECTS) $(hash_DEPENDENCIES) $(EXTRA_hash_DEPENDENCIES)
+ @rm -f hash$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(hash_OBJECTS) $(hash_LDADD) $(LIBS)
+
+line2addr$(EXEEXT): $(line2addr_OBJECTS) $(line2addr_DEPENDENCIES) $(EXTRA_line2addr_DEPENDENCIES)
+ @rm -f line2addr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(line2addr_OBJECTS) $(line2addr_LDADD) $(LIBS)
+
+low_high_pc$(EXEEXT): $(low_high_pc_OBJECTS) $(low_high_pc_DEPENDENCIES) $(EXTRA_low_high_pc_DEPENDENCIES)
+ @rm -f low_high_pc$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(low_high_pc_OBJECTS) $(low_high_pc_LDADD) $(LIBS)
+
+md5-sha1-test$(EXEEXT): $(md5_sha1_test_OBJECTS) $(md5_sha1_test_DEPENDENCIES) $(EXTRA_md5_sha1_test_DEPENDENCIES)
+ @rm -f md5-sha1-test$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(md5_sha1_test_OBJECTS) $(md5_sha1_test_LDADD) $(LIBS)
+
+msg_tst$(EXEEXT): $(msg_tst_OBJECTS) $(msg_tst_DEPENDENCIES) $(EXTRA_msg_tst_DEPENDENCIES)
+ @rm -f msg_tst$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(msg_tst_OBJECTS) $(msg_tst_LDADD) $(LIBS)
+
+newfile$(EXEEXT): $(newfile_OBJECTS) $(newfile_DEPENDENCIES) $(EXTRA_newfile_DEPENDENCIES)
+ @rm -f newfile$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(newfile_OBJECTS) $(newfile_LDADD) $(LIBS)
+
+newscn$(EXEEXT): $(newscn_OBJECTS) $(newscn_DEPENDENCIES) $(EXTRA_newscn_DEPENDENCIES)
+ @rm -f newscn$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(newscn_OBJECTS) $(newscn_LDADD) $(LIBS)
+
+rdwrmmap$(EXEEXT): $(rdwrmmap_OBJECTS) $(rdwrmmap_DEPENDENCIES) $(EXTRA_rdwrmmap_DEPENDENCIES)
+ @rm -f rdwrmmap$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(rdwrmmap_OBJECTS) $(rdwrmmap_LDADD) $(LIBS)
+
+rerequest_tag$(EXEEXT): $(rerequest_tag_OBJECTS) $(rerequest_tag_DEPENDENCIES) $(EXTRA_rerequest_tag_DEPENDENCIES)
+ @rm -f rerequest_tag$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(rerequest_tag_OBJECTS) $(rerequest_tag_LDADD) $(LIBS)
+
+saridx$(EXEEXT): $(saridx_OBJECTS) $(saridx_DEPENDENCIES) $(EXTRA_saridx_DEPENDENCIES)
+ @rm -f saridx$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(saridx_OBJECTS) $(saridx_LDADD) $(LIBS)
+
+scnnames$(EXEEXT): $(scnnames_OBJECTS) $(scnnames_DEPENDENCIES) $(EXTRA_scnnames_DEPENDENCIES)
+ @rm -f scnnames$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(scnnames_OBJECTS) $(scnnames_LDADD) $(LIBS)
+
+sectiondump$(EXEEXT): $(sectiondump_OBJECTS) $(sectiondump_DEPENDENCIES) $(EXTRA_sectiondump_DEPENDENCIES)
+ @rm -f sectiondump$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sectiondump_OBJECTS) $(sectiondump_LDADD) $(LIBS)
+
+show-abbrev$(EXEEXT): $(show_abbrev_OBJECTS) $(show_abbrev_DEPENDENCIES) $(EXTRA_show_abbrev_DEPENDENCIES)
+ @rm -f show-abbrev$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(show_abbrev_OBJECTS) $(show_abbrev_LDADD) $(LIBS)
+
+show-die-info$(EXEEXT): $(show_die_info_OBJECTS) $(show_die_info_DEPENDENCIES) $(EXTRA_show_die_info_DEPENDENCIES)
+ @rm -f show-die-info$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(show_die_info_OBJECTS) $(show_die_info_LDADD) $(LIBS)
+
+showptable$(EXEEXT): $(showptable_OBJECTS) $(showptable_DEPENDENCIES) $(EXTRA_showptable_DEPENDENCIES)
+ @rm -f showptable$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(showptable_OBJECTS) $(showptable_LDADD) $(LIBS)
+
+test-elf_cntl_gelf_getshdr$(EXEEXT): $(test_elf_cntl_gelf_getshdr_OBJECTS) $(test_elf_cntl_gelf_getshdr_DEPENDENCIES) $(EXTRA_test_elf_cntl_gelf_getshdr_DEPENDENCIES)
+ @rm -f test-elf_cntl_gelf_getshdr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_elf_cntl_gelf_getshdr_OBJECTS) $(test_elf_cntl_gelf_getshdr_LDADD) $(LIBS)
+
+test-flag-nobits$(EXEEXT): $(test_flag_nobits_OBJECTS) $(test_flag_nobits_DEPENDENCIES) $(EXTRA_test_flag_nobits_DEPENDENCIES)
+ @rm -f test-flag-nobits$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_flag_nobits_OBJECTS) $(test_flag_nobits_LDADD) $(LIBS)
+
+test-nlist$(EXEEXT): $(test_nlist_OBJECTS) $(test_nlist_DEPENDENCIES) $(EXTRA_test_nlist_DEPENDENCIES)
+ @rm -f test-nlist$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_nlist_OBJECTS) $(test_nlist_LDADD) $(LIBS)
+
+typeiter$(EXEEXT): $(typeiter_OBJECTS) $(typeiter_DEPENDENCIES) $(EXTRA_typeiter_DEPENDENCIES)
+ @rm -f typeiter$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(typeiter_OBJECTS) $(typeiter_LDADD) $(LIBS)
+
+typeiter2$(EXEEXT): $(typeiter2_OBJECTS) $(typeiter2_DEPENDENCIES) $(EXTRA_typeiter2_DEPENDENCIES)
+ @rm -f typeiter2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(typeiter2_OBJECTS) $(typeiter2_LDADD) $(LIBS)
+
+update1$(EXEEXT): $(update1_OBJECTS) $(update1_DEPENDENCIES) $(EXTRA_update1_DEPENDENCIES)
+ @rm -f update1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(update1_OBJECTS) $(update1_LDADD) $(LIBS)
+
+update2$(EXEEXT): $(update2_OBJECTS) $(update2_DEPENDENCIES) $(EXTRA_update2_DEPENDENCIES)
+ @rm -f update2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(update2_OBJECTS) $(update2_LDADD) $(LIBS)
+
+update3$(EXEEXT): $(update3_OBJECTS) $(update3_DEPENDENCIES) $(EXTRA_update3_DEPENDENCIES)
+ @rm -f update3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(update3_OBJECTS) $(update3_LDADD) $(LIBS)
+
+update4$(EXEEXT): $(update4_OBJECTS) $(update4_DEPENDENCIES) $(EXTRA_update4_DEPENDENCIES)
+ @rm -f update4$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(update4_OBJECTS) $(update4_LDADD) $(LIBS)
+
+varlocs$(EXEEXT): $(varlocs_OBJECTS) $(varlocs_DEPENDENCIES) $(EXTRA_varlocs_DEPENDENCIES)
+ @rm -f varlocs$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(varlocs_OBJECTS) $(varlocs_LDADD) $(LIBS)
+
+vdsosyms$(EXEEXT): $(vdsosyms_OBJECTS) $(vdsosyms_DEPENDENCIES) $(EXTRA_vdsosyms_DEPENDENCIES)
+ @rm -f vdsosyms$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(vdsosyms_OBJECTS) $(vdsosyms_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addrcfi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addrscopes.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aggregate_size.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alldts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allfcts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allregs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arextract.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arls.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arsymtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asm-tst1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asm-tst2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asm-tst3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asm-tst4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asm-tst5.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asm-tst6.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asm-tst7.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asm-tst8.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asm-tst9.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace-child.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace-data.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace_child-backtrace-child.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildid.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugaltlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debuglink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deleted.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deleted_lib_so-deleted-lib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf-getmacros.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf-getstring.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-addr-sect.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-bug-addr-overflow.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-bug-fd-leak.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-bug-getmodules.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-bug-report.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfl-report-elf-align.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwfllines.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwflmodtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwflsyms.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/early-offscn.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find-prologues.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/funcretval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/funcscopes.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-aranges.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-files.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-lines.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-pubnames.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/line2addr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/low_high_pc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5-sha1-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_tst.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newfile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newscn.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdwrmmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rerequest_tag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saridx.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scnnames.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sectiondump.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/show-abbrev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/show-die-info.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/showptable.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-elf_cntl_gelf_getshdr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-flag-nobits.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nlist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/typeiter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/typeiter2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/varlocs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vdsosyms.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+backtrace_child-backtrace-child.o: backtrace-child.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_child_CFLAGS) $(CFLAGS) -MT backtrace_child-backtrace-child.o -MD -MP -MF $(DEPDIR)/backtrace_child-backtrace-child.Tpo -c -o backtrace_child-backtrace-child.o `test -f 'backtrace-child.c' || echo '$(srcdir)/'`backtrace-child.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace_child-backtrace-child.Tpo $(DEPDIR)/backtrace_child-backtrace-child.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='backtrace-child.c' object='backtrace_child-backtrace-child.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_child_CFLAGS) $(CFLAGS) -c -o backtrace_child-backtrace-child.o `test -f 'backtrace-child.c' || echo '$(srcdir)/'`backtrace-child.c
+
+backtrace_child-backtrace-child.obj: backtrace-child.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_child_CFLAGS) $(CFLAGS) -MT backtrace_child-backtrace-child.obj -MD -MP -MF $(DEPDIR)/backtrace_child-backtrace-child.Tpo -c -o backtrace_child-backtrace-child.obj `if test -f 'backtrace-child.c'; then $(CYGPATH_W) 'backtrace-child.c'; else $(CYGPATH_W) '$(srcdir)/backtrace-child.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace_child-backtrace-child.Tpo $(DEPDIR)/backtrace_child-backtrace-child.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='backtrace-child.c' object='backtrace_child-backtrace-child.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_child_CFLAGS) $(CFLAGS) -c -o backtrace_child-backtrace-child.obj `if test -f 'backtrace-child.c'; then $(CYGPATH_W) 'backtrace-child.c'; else $(CYGPATH_W) '$(srcdir)/backtrace-child.c'; fi`
+
+backtrace_dwarf-backtrace-dwarf.o: backtrace-dwarf.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_dwarf_CFLAGS) $(CFLAGS) -MT backtrace_dwarf-backtrace-dwarf.o -MD -MP -MF $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Tpo -c -o backtrace_dwarf-backtrace-dwarf.o `test -f 'backtrace-dwarf.c' || echo '$(srcdir)/'`backtrace-dwarf.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Tpo $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='backtrace-dwarf.c' object='backtrace_dwarf-backtrace-dwarf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_dwarf_CFLAGS) $(CFLAGS) -c -o backtrace_dwarf-backtrace-dwarf.o `test -f 'backtrace-dwarf.c' || echo '$(srcdir)/'`backtrace-dwarf.c
+
+backtrace_dwarf-backtrace-dwarf.obj: backtrace-dwarf.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_dwarf_CFLAGS) $(CFLAGS) -MT backtrace_dwarf-backtrace-dwarf.obj -MD -MP -MF $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Tpo -c -o backtrace_dwarf-backtrace-dwarf.obj `if test -f 'backtrace-dwarf.c'; then $(CYGPATH_W) 'backtrace-dwarf.c'; else $(CYGPATH_W) '$(srcdir)/backtrace-dwarf.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Tpo $(DEPDIR)/backtrace_dwarf-backtrace-dwarf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='backtrace-dwarf.c' object='backtrace_dwarf-backtrace-dwarf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(backtrace_dwarf_CFLAGS) $(CFLAGS) -c -o backtrace_dwarf-backtrace-dwarf.obj `if test -f 'backtrace-dwarf.c'; then $(CYGPATH_W) 'backtrace-dwarf.c'; else $(CYGPATH_W) '$(srcdir)/backtrace-dwarf.c'; fi`
+
+deleted_lib_so-deleted-lib.o: deleted-lib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -MT deleted_lib_so-deleted-lib.o -MD -MP -MF $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo -c -o deleted_lib_so-deleted-lib.o `test -f 'deleted-lib.c' || echo '$(srcdir)/'`deleted-lib.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo $(DEPDIR)/deleted_lib_so-deleted-lib.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='deleted-lib.c' object='deleted_lib_so-deleted-lib.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -c -o deleted_lib_so-deleted-lib.o `test -f 'deleted-lib.c' || echo '$(srcdir)/'`deleted-lib.c
+
+deleted_lib_so-deleted-lib.obj: deleted-lib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -MT deleted_lib_so-deleted-lib.obj -MD -MP -MF $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo -c -o deleted_lib_so-deleted-lib.obj `if test -f 'deleted-lib.c'; then $(CYGPATH_W) 'deleted-lib.c'; else $(CYGPATH_W) '$(srcdir)/deleted-lib.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/deleted_lib_so-deleted-lib.Tpo $(DEPDIR)/deleted_lib_so-deleted-lib.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='deleted-lib.c' object='deleted_lib_so-deleted-lib.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deleted_lib_so_CFLAGS) $(CFLAGS) -c -o deleted_lib_so-deleted-lib.obj `if test -f 'deleted-lib.c'; then $(CYGPATH_W) 'deleted-lib.c'; else $(CYGPATH_W) '$(srcdir)/deleted-lib.c'; fi`
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ else \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+run-arextract.sh.log: run-arextract.sh
+ @p='run-arextract.sh'; \
+ b='run-arextract.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-arsymtest.sh.log: run-arsymtest.sh
+ @p='run-arsymtest.sh'; \
+ b='run-arsymtest.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+newfile.log: newfile$(EXEEXT)
+ @p='newfile$(EXEEXT)'; \
+ b='newfile'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-nlist.log: test-nlist$(EXEEXT)
+ @p='test-nlist$(EXEEXT)'; \
+ b='test-nlist'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+update1.log: update1$(EXEEXT)
+ @p='update1$(EXEEXT)'; \
+ b='update1'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+update2.log: update2$(EXEEXT)
+ @p='update2$(EXEEXT)'; \
+ b='update2'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+update3.log: update3$(EXEEXT)
+ @p='update3$(EXEEXT)'; \
+ b='update3'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+update4.log: update4$(EXEEXT)
+ @p='update4$(EXEEXT)'; \
+ b='update4'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-show-die-info.sh.log: run-show-die-info.sh
+ @p='run-show-die-info.sh'; \
+ b='run-show-die-info.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-get-files.sh.log: run-get-files.sh
+ @p='run-get-files.sh'; \
+ b='run-get-files.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-get-lines.sh.log: run-get-lines.sh
+ @p='run-get-lines.sh'; \
+ b='run-get-lines.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-get-pubnames.sh.log: run-get-pubnames.sh
+ @p='run-get-pubnames.sh'; \
+ b='run-get-pubnames.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-get-aranges.sh.log: run-get-aranges.sh
+ @p='run-get-aranges.sh'; \
+ b='run-get-aranges.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-allfcts.sh.log: run-allfcts.sh
+ @p='run-allfcts.sh'; \
+ b='run-allfcts.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-show-abbrev.sh.log: run-show-abbrev.sh
+ @p='run-show-abbrev.sh'; \
+ b='run-show-abbrev.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-line2addr.sh.log: run-line2addr.sh
+ @p='run-line2addr.sh'; \
+ b='run-line2addr.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+hash.log: hash$(EXEEXT)
+ @p='hash$(EXEEXT)'; \
+ b='hash'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+newscn.log: newscn$(EXEEXT)
+ @p='newscn$(EXEEXT)'; \
+ b='newscn'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test.sh.log: run-strip-test.sh
+ @p='run-strip-test.sh'; \
+ b='run-strip-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test2.sh.log: run-strip-test2.sh
+ @p='run-strip-test2.sh'; \
+ b='run-strip-test2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test3.sh.log: run-strip-test3.sh
+ @p='run-strip-test3.sh'; \
+ b='run-strip-test3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test4.sh.log: run-strip-test4.sh
+ @p='run-strip-test4.sh'; \
+ b='run-strip-test4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test5.sh.log: run-strip-test5.sh
+ @p='run-strip-test5.sh'; \
+ b='run-strip-test5.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test6.sh.log: run-strip-test6.sh
+ @p='run-strip-test6.sh'; \
+ b='run-strip-test6.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test7.sh.log: run-strip-test7.sh
+ @p='run-strip-test7.sh'; \
+ b='run-strip-test7.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-test8.sh.log: run-strip-test8.sh
+ @p='run-strip-test8.sh'; \
+ b='run-strip-test8.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-groups.sh.log: run-strip-groups.sh
+ @p='run-strip-groups.sh'; \
+ b='run-strip-groups.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strip-reloc.sh.log: run-strip-reloc.sh
+ @p='run-strip-reloc.sh'; \
+ b='run-strip-reloc.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-unstrip-test.sh.log: run-unstrip-test.sh
+ @p='run-unstrip-test.sh'; \
+ b='run-unstrip-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-unstrip-test2.sh.log: run-unstrip-test2.sh
+ @p='run-unstrip-test2.sh'; \
+ b='run-unstrip-test2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-unstrip-M.sh.log: run-unstrip-M.sh
+ @p='run-unstrip-M.sh'; \
+ b='run-unstrip-M.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ecp-test.sh.log: run-ecp-test.sh
+ @p='run-ecp-test.sh'; \
+ b='run-ecp-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ecp-test2.sh.log: run-ecp-test2.sh
+ @p='run-ecp-test2.sh'; \
+ b='run-ecp-test2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-alldts.sh.log: run-alldts.sh
+ @p='run-alldts.sh'; \
+ b='run-alldts.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-elflint-test.sh.log: run-elflint-test.sh
+ @p='run-elflint-test.sh'; \
+ b='run-elflint-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-elflint-self.sh.log: run-elflint-self.sh
+ @p='run-elflint-self.sh'; \
+ b='run-elflint-self.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ranlib-test.sh.log: run-ranlib-test.sh
+ @p='run-ranlib-test.sh'; \
+ b='run-ranlib-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ranlib-test2.sh.log: run-ranlib-test2.sh
+ @p='run-ranlib-test2.sh'; \
+ b='run-ranlib-test2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ranlib-test3.sh.log: run-ranlib-test3.sh
+ @p='run-ranlib-test3.sh'; \
+ b='run-ranlib-test3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-ranlib-test4.sh.log: run-ranlib-test4.sh
+ @p='run-ranlib-test4.sh'; \
+ b='run-ranlib-test4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addrscopes.sh.log: run-addrscopes.sh
+ @p='run-addrscopes.sh'; \
+ b='run-addrscopes.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-strings-test.sh.log: run-strings-test.sh
+ @p='run-strings-test.sh'; \
+ b='run-strings-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-funcscopes.sh.log: run-funcscopes.sh
+ @p='run-funcscopes.sh'; \
+ b='run-funcscopes.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-find-prologues.sh.log: run-find-prologues.sh
+ @p='run-find-prologues.sh'; \
+ b='run-find-prologues.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-allregs.sh.log: run-allregs.sh
+ @p='run-allregs.sh'; \
+ b='run-allregs.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addrcfi.sh.log: run-addrcfi.sh
+ @p='run-addrcfi.sh'; \
+ b='run-addrcfi.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-nm-self.sh.log: run-nm-self.sh
+ @p='run-nm-self.sh'; \
+ b='run-nm-self.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-self.sh.log: run-readelf-self.sh
+ @p='run-readelf-self.sh'; \
+ b='run-readelf-self.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-test1.sh.log: run-readelf-test1.sh
+ @p='run-readelf-test1.sh'; \
+ b='run-readelf-test1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-test2.sh.log: run-readelf-test2.sh
+ @p='run-readelf-test2.sh'; \
+ b='run-readelf-test2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-test3.sh.log: run-readelf-test3.sh
+ @p='run-readelf-test3.sh'; \
+ b='run-readelf-test3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-test4.sh.log: run-readelf-test4.sh
+ @p='run-readelf-test4.sh'; \
+ b='run-readelf-test4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-twofiles.sh.log: run-readelf-twofiles.sh
+ @p='run-readelf-twofiles.sh'; \
+ b='run-readelf-twofiles.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-macro.sh.log: run-readelf-macro.sh
+ @p='run-readelf-macro.sh'; \
+ b='run-readelf-macro.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-loc.sh.log: run-readelf-loc.sh
+ @p='run-readelf-loc.sh'; \
+ b='run-readelf-loc.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-aranges.sh.log: run-readelf-aranges.sh
+ @p='run-readelf-aranges.sh'; \
+ b='run-readelf-aranges.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-line.sh.log: run-readelf-line.sh
+ @p='run-readelf-line.sh'; \
+ b='run-readelf-line.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-native-test.sh.log: run-native-test.sh
+ @p='run-native-test.sh'; \
+ b='run-native-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-bug1-test.sh.log: run-bug1-test.sh
+ @p='run-bug1-test.sh'; \
+ b='run-bug1-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-debuglink.sh.log: run-debuglink.sh
+ @p='run-debuglink.sh'; \
+ b='run-debuglink.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-debugaltlink.sh.log: run-debugaltlink.sh
+ @p='run-debugaltlink.sh'; \
+ b='run-debugaltlink.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-buildid.sh.log: run-buildid.sh
+ @p='run-buildid.sh'; \
+ b='run-buildid.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+dwfl-bug-addr-overflow.log: dwfl-bug-addr-overflow$(EXEEXT)
+ @p='dwfl-bug-addr-overflow$(EXEEXT)'; \
+ b='dwfl-bug-addr-overflow'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addrname-test.sh.log: run-addrname-test.sh
+ @p='run-addrname-test.sh'; \
+ b='run-addrname-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+dwfl-bug-fd-leak.log: dwfl-bug-fd-leak$(EXEEXT)
+ @p='dwfl-bug-fd-leak$(EXEEXT)'; \
+ b='dwfl-bug-fd-leak'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+dwfl-bug-report.log: dwfl-bug-report$(EXEEXT)
+ @p='dwfl-bug-report$(EXEEXT)'; \
+ b='dwfl-bug-report'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwfl-bug-offline-rel.sh.log: run-dwfl-bug-offline-rel.sh
+ @p='run-dwfl-bug-offline-rel.sh'; \
+ b='run-dwfl-bug-offline-rel.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwfl-addr-sect.sh.log: run-dwfl-addr-sect.sh
+ @p='run-dwfl-addr-sect.sh'; \
+ b='run-dwfl-addr-sect.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-disasm-x86.sh.log: run-disasm-x86.sh
+ @p='run-disasm-x86.sh'; \
+ b='run-disasm-x86.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-disasm-x86-64.sh.log: run-disasm-x86-64.sh
+ @p='run-disasm-x86-64.sh'; \
+ b='run-disasm-x86-64.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-early-offscn.sh.log: run-early-offscn.sh
+ @p='run-early-offscn.sh'; \
+ b='run-early-offscn.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwarf-getmacros.sh.log: run-dwarf-getmacros.sh
+ @p='run-dwarf-getmacros.sh'; \
+ b='run-dwarf-getmacros.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-test-flag-nobits.sh.log: run-test-flag-nobits.sh
+ @p='run-test-flag-nobits.sh'; \
+ b='run-test-flag-nobits.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-prelink-addr-test.sh.log: run-prelink-addr-test.sh
+ @p='run-prelink-addr-test.sh'; \
+ b='run-prelink-addr-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwarf-getstring.sh.log: run-dwarf-getstring.sh
+ @p='run-dwarf-getstring.sh'; \
+ b='run-dwarf-getstring.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-rerequest_tag.sh.log: run-rerequest_tag.sh
+ @p='run-rerequest_tag.sh'; \
+ b='run-rerequest_tag.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-typeiter.sh.log: run-typeiter.sh
+ @p='run-typeiter.sh'; \
+ b='run-typeiter.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-d.sh.log: run-readelf-d.sh
+ @p='run-readelf-d.sh'; \
+ b='run-readelf-d.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-gdb_index.sh.log: run-readelf-gdb_index.sh
+ @p='run-readelf-gdb_index.sh'; \
+ b='run-readelf-gdb_index.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-unstrip-n.sh.log: run-unstrip-n.sh
+ @p='run-unstrip-n.sh'; \
+ b='run-unstrip-n.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-low_high_pc.sh.log: run-low_high_pc.sh
+ @p='run-low_high_pc.sh'; \
+ b='run-low_high_pc.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-macro-test.sh.log: run-macro-test.sh
+ @p='run-macro-test.sh'; \
+ b='run-macro-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-elf_cntl_gelf_getshdr.sh.log: run-elf_cntl_gelf_getshdr.sh
+ @p='run-elf_cntl_gelf_getshdr.sh'; \
+ b='run-elf_cntl_gelf_getshdr.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-test-archive64.sh.log: run-test-archive64.sh
+ @p='run-test-archive64.sh'; \
+ b='run-test-archive64.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-vmcoreinfo.sh.log: run-readelf-vmcoreinfo.sh
+ @p='run-readelf-vmcoreinfo.sh'; \
+ b='run-readelf-vmcoreinfo.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-mixed-corenote.sh.log: run-readelf-mixed-corenote.sh
+ @p='run-readelf-mixed-corenote.sh'; \
+ b='run-readelf-mixed-corenote.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwfllines.sh.log: run-dwfllines.sh
+ @p='run-dwfllines.sh'; \
+ b='run-dwfllines.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwfl-report-elf-align.sh.log: run-dwfl-report-elf-align.sh
+ @p='run-dwfl-report-elf-align.sh'; \
+ b='run-dwfl-report-elf-align.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addr2line-test.sh.log: run-addr2line-test.sh
+ @p='run-addr2line-test.sh'; \
+ b='run-addr2line-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addr2line-i-test.sh.log: run-addr2line-i-test.sh
+ @p='run-addr2line-i-test.sh'; \
+ b='run-addr2line-i-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-addr2line-i-lex-test.sh.log: run-addr2line-i-lex-test.sh
+ @p='run-addr2line-i-lex-test.sh'; \
+ b='run-addr2line-i-lex-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-varlocs.sh.log: run-varlocs.sh
+ @p='run-varlocs.sh'; \
+ b='run-varlocs.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-funcretval.sh.log: run-funcretval.sh
+ @p='run-funcretval.sh'; \
+ b='run-funcretval.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-native.sh.log: run-backtrace-native.sh
+ @p='run-backtrace-native.sh'; \
+ b='run-backtrace-native.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-data.sh.log: run-backtrace-data.sh
+ @p='run-backtrace-data.sh'; \
+ b='run-backtrace-data.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-dwarf.sh.log: run-backtrace-dwarf.sh
+ @p='run-backtrace-dwarf.sh'; \
+ b='run-backtrace-dwarf.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-native-biarch.sh.log: run-backtrace-native-biarch.sh
+ @p='run-backtrace-native-biarch.sh'; \
+ b='run-backtrace-native-biarch.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-native-core.sh.log: run-backtrace-native-core.sh
+ @p='run-backtrace-native-core.sh'; \
+ b='run-backtrace-native-core.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-native-core-biarch.sh.log: run-backtrace-native-core-biarch.sh
+ @p='run-backtrace-native-core-biarch.sh'; \
+ b='run-backtrace-native-core-biarch.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-x86_64.sh.log: run-backtrace-core-x86_64.sh
+ @p='run-backtrace-core-x86_64.sh'; \
+ b='run-backtrace-core-x86_64.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-i386.sh.log: run-backtrace-core-i386.sh
+ @p='run-backtrace-core-i386.sh'; \
+ b='run-backtrace-core-i386.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-ppc.sh.log: run-backtrace-core-ppc.sh
+ @p='run-backtrace-core-ppc.sh'; \
+ b='run-backtrace-core-ppc.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-s390x.sh.log: run-backtrace-core-s390x.sh
+ @p='run-backtrace-core-s390x.sh'; \
+ b='run-backtrace-core-s390x.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-s390.sh.log: run-backtrace-core-s390.sh
+ @p='run-backtrace-core-s390.sh'; \
+ b='run-backtrace-core-s390.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-core-aarch64.sh.log: run-backtrace-core-aarch64.sh
+ @p='run-backtrace-core-aarch64.sh'; \
+ b='run-backtrace-core-aarch64.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-backtrace-demangle.sh.log: run-backtrace-demangle.sh
+ @p='run-backtrace-demangle.sh'; \
+ b='run-backtrace-demangle.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-stack-d-test.sh.log: run-stack-d-test.sh
+ @p='run-stack-d-test.sh'; \
+ b='run-stack-d-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-stack-i-test.sh.log: run-stack-i-test.sh
+ @p='run-stack-i-test.sh'; \
+ b='run-stack-i-test.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-dwz-multi.sh.log: run-readelf-dwz-multi.sh
+ @p='run-readelf-dwz-multi.sh'; \
+ b='run-readelf-dwz-multi.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-allfcts-multi.sh.log: run-allfcts-multi.sh
+ @p='run-allfcts-multi.sh'; \
+ b='run-allfcts-multi.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-deleted.sh.log: run-deleted.sh
+ @p='run-deleted.sh'; \
+ b='run-deleted.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-linkmap-cut.sh.log: run-linkmap-cut.sh
+ @p='run-linkmap-cut.sh'; \
+ b='run-linkmap-cut.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-aggregate-size.sh.log: run-aggregate-size.sh
+ @p='run-aggregate-size.sh'; \
+ b='run-aggregate-size.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+vdsosyms.log: vdsosyms$(EXEEXT)
+ @p='vdsosyms$(EXEEXT)'; \
+ b='vdsosyms'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-A.sh.log: run-readelf-A.sh
+ @p='run-readelf-A.sh'; \
+ b='run-readelf-A.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+msg_tst.log: msg_tst$(EXEEXT)
+ @p='msg_tst$(EXEEXT)'; \
+ b='msg_tst'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+md5-sha1-test.log: md5-sha1-test$(EXEEXT)
+ @p='md5-sha1-test$(EXEEXT)'; \
+ b='md5-sha1-test'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-s.sh.log: run-readelf-s.sh
+ @p='run-readelf-s.sh'; \
+ b='run-readelf-s.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-dwflsyms.sh.log: run-dwflsyms.sh
+ @p='run-dwflsyms.sh'; \
+ b='run-dwflsyms.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+run-readelf-zdebug.sh.log: run-readelf-zdebug.sh
+ @p='run-readelf-zdebug.sh'; \
+ b='run-readelf-zdebug.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst1.log: asm-tst1$(EXEEXT)
+ @p='asm-tst1$(EXEEXT)'; \
+ b='asm-tst1'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst2.log: asm-tst2$(EXEEXT)
+ @p='asm-tst2$(EXEEXT)'; \
+ b='asm-tst2'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst3.log: asm-tst3$(EXEEXT)
+ @p='asm-tst3$(EXEEXT)'; \
+ b='asm-tst3'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst4.log: asm-tst4$(EXEEXT)
+ @p='asm-tst4$(EXEEXT)'; \
+ b='asm-tst4'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst5.log: asm-tst5$(EXEEXT)
+ @p='asm-tst5$(EXEEXT)'; \
+ b='asm-tst5'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst6.log: asm-tst6$(EXEEXT)
+ @p='asm-tst6$(EXEEXT)'; \
+ b='asm-tst6'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst7.log: asm-tst7$(EXEEXT)
+ @p='asm-tst7$(EXEEXT)'; \
+ b='asm-tst7'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst8.log: asm-tst8$(EXEEXT)
+ @p='asm-tst8$(EXEEXT)'; \
+ b='asm-tst8'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+asm-tst9.log: asm-tst9$(EXEEXT)
+ @p='asm-tst9$(EXEEXT)'; \
+ b='asm-tst9'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+@STANDALONE_TRUE@installcheck-local:
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am: installcheck-local
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic cscopelist-am ctags ctags-am \
+ distclean distclean-compile distclean-generic distclean-tags \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installcheck-local \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+ ps ps-am recheck tags tags-am uninstall uninstall-am
+
+
+%.os: %.c %.o
+@AMDEP_TRUE@ if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \
+@AMDEP_TRUE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \
+@AMDEP_TRUE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \
+@AMDEP_TRUE@ rm -f "$(DEPDIR)/$*.Tpo"; \
+@AMDEP_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@AMDEP_TRUE@ fi
+@AMDEP_FALSE@ $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $<
+
+# Substitute $(COMPILE).
+backtrace-child-biarch$(EXEEXT): backtrace-child.c
+ $(CC_BIARCH) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS) $(backtrace_child_CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \
+ -o $@ $<
+
+@BIARCH_FALSE@export ELFUTILS_DISABLE_BIARCH = 1
+
+@DEMANGLE_FALSE@export ELFUTILS_DISABLE_DEMANGLE = 1
+
+@STANDALONE_FALSE@installcheck-local:
+@STANDALONE_FALSE@ $(MAKE) $(AM_MAKEFLAGS) \
+@STANDALONE_FALSE@ TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
+@STANDALONE_FALSE@ LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
+
+@GCOV_TRUE@check: check-am coverage
+@GCOV_TRUE@.PHONY: coverage
+@GCOV_TRUE@coverage:
+@GCOV_TRUE@ -$(srcdir)/coverage.sh
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/tests/addrcfi.c b/src/tests/addrcfi.c
new file mode 100644
index 00000000..8a2d126c
--- /dev/null
+++ b/src/tests/addrcfi.c
@@ -0,0 +1,226 @@
+/* Test program for CFI handling.
+ Copyright (C) 2009-2010, 2013 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+#include <argp.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../libdw/known-dwarf.h"
+
+static const char *
+op_name (unsigned int code)
+{
+ static const char *const known[] =
+ {
+#define ONE_KNOWN_DW_OP_DESC(NAME, CODE, DESC) ONE_KNOWN_DW_OP (NAME, CODE)
+#define ONE_KNOWN_DW_OP(NAME, CODE) [CODE] = #NAME,
+ ALL_KNOWN_DW_OP
+#undef ONE_KNOWN_DW_OP
+#undef ONE_KNOWN_DW_OP_DESC
+ };
+
+ if (likely (code < sizeof (known) / sizeof (known[0])))
+ return known[code];
+
+ return NULL;
+}
+
+static void
+print_detail (int result, const Dwarf_Op *ops, size_t nops, Dwarf_Addr bias)
+{
+ if (result < 0)
+ printf ("indeterminate (%s)\n", dwarf_errmsg (-1));
+ else if (nops == 0)
+ printf ("%s\n", ops == NULL ? "same_value" : "undefined");
+ else
+ {
+ printf ("%s expression:", result == 0 ? "location" : "value");
+ for (size_t i = 0; i < nops; ++i)
+ {
+ printf (" %s", op_name(ops[i].atom));
+ if (ops[i].number2 == 0)
+ {
+ if (ops[i].atom == DW_OP_addr)
+ printf ("(%#" PRIx64 ")", ops[i].number + bias);
+ else if (ops[i].number != 0)
+ printf ("(%" PRId64 ")", ops[i].number);
+ }
+ else
+ printf ("(%" PRId64 ",%" PRId64 ")",
+ ops[i].number, ops[i].number2);
+ }
+ puts ("");
+ }
+}
+
+struct stuff
+{
+ Dwarf_Frame *frame;
+ Dwarf_Addr bias;
+};
+
+static int
+print_register (void *arg,
+ int regno,
+ const char *setname,
+ const char *prefix,
+ const char *regname,
+ int bits __attribute__ ((unused)),
+ int type __attribute__ ((unused)))
+{
+ struct stuff *stuff = arg;
+
+ printf ("\t%s reg%u (%s%s): ", setname, regno, prefix, regname);
+
+ Dwarf_Op ops_mem[2];
+ Dwarf_Op *ops;
+ size_t nops;
+ int result = dwarf_frame_register (stuff->frame, regno, ops_mem, &ops, &nops);
+ print_detail (result, ops, nops, stuff->bias);
+
+ return DWARF_CB_OK;
+}
+
+static int
+handle_cfi (Dwfl *dwfl, const char *which, Dwarf_CFI *cfi,
+ GElf_Addr pc, struct stuff *stuff)
+{
+ if (cfi == NULL)
+ {
+ printf ("handle_cfi no CFI (%s): %s\n", which, dwarf_errmsg (-1));
+ return -1;
+ }
+
+ int result = dwarf_cfi_addrframe (cfi, pc - stuff->bias, &stuff->frame);
+ if (result != 0)
+ {
+ printf ("dwarf_cfi_addrframe (%s): %s\n", which, dwarf_errmsg (-1));
+ return 1;
+ }
+
+ Dwarf_Addr start = pc;
+ Dwarf_Addr end = pc;
+ bool signalp;
+ int ra_regno = dwarf_frame_info (stuff->frame, &start, &end, &signalp);
+ if (ra_regno >= 0)
+ {
+ start += stuff->bias;
+ end += stuff->bias;
+ }
+
+ printf ("%s has %#" PRIx64 " => [%#" PRIx64 ", %#" PRIx64 "):\n",
+ which, pc, start, end);
+
+ if (ra_regno < 0)
+ printf ("\treturn address register unavailable (%s)\n",
+ dwarf_errmsg (0));
+ else
+ printf ("\treturn address in reg%u%s\n",
+ ra_regno, signalp ? " (signal frame)" : "");
+
+ // Point cfa_ops to dummy to match print_detail expectations.
+ // (nops == 0 && cfa_ops != NULL => "undefined")
+ Dwarf_Op dummy;
+ Dwarf_Op *cfa_ops = &dummy;
+ size_t cfa_nops;
+ result = dwarf_frame_cfa (stuff->frame, &cfa_ops, &cfa_nops);
+
+ printf ("\tCFA ");
+ print_detail (result, cfa_ops, cfa_nops, stuff->bias);
+
+ (void) dwfl_module_register_names (dwfl_addrmodule (dwfl, pc),
+ &print_register, stuff);
+
+ return 0;
+}
+
+static int
+handle_address (GElf_Addr pc, Dwfl *dwfl)
+{
+ Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc);
+
+ struct stuff stuff;
+ return (handle_cfi (dwfl, ".eh_frame",
+ dwfl_module_eh_cfi (mod, &stuff.bias), pc, &stuff)
+ & handle_cfi (dwfl, ".debug_frame",
+ dwfl_module_dwarf_cfi (mod, &stuff.bias), pc, &stuff));
+}
+
+int
+main (int argc, char *argv[])
+{
+ int remaining;
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ Dwfl *dwfl = NULL;
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl);
+ assert (dwfl != NULL);
+
+ int result = 0;
+
+ /* Now handle the addresses. In case none are given on the command
+ line, read from stdin. */
+ if (remaining == argc)
+ {
+ /* We use no threads here which can interfere with handling a stream. */
+ (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER);
+
+ char *buf = NULL;
+ size_t len = 0;
+ while (!feof_unlocked (stdin))
+ {
+ if (getline (&buf, &len, stdin) < 0)
+ break;
+
+ char *endp;
+ uintmax_t addr = strtoumax (buf, &endp, 0);
+ if (endp != buf)
+ result |= handle_address (addr, dwfl);
+ else
+ result = 1;
+ }
+
+ free (buf);
+ }
+ else
+ {
+ do
+ {
+ char *endp;
+ uintmax_t addr = strtoumax (argv[remaining], &endp, 0);
+ if (endp != argv[remaining])
+ result |= handle_address (addr, dwfl);
+ else
+ result = 1;
+ }
+ while (++remaining < argc);
+ }
+
+ dwfl_end (dwfl);
+
+ return result;
+}
diff --git a/src/tests/addrscopes.c b/src/tests/addrscopes.c
new file mode 100644
index 00000000..fca61d33
--- /dev/null
+++ b/src/tests/addrscopes.c
@@ -0,0 +1,195 @@
+/* Test program for dwarf_getscopes.
+ Copyright (C) 2005 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+#include <argp.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <error.h>
+#include <string.h>
+
+
+static void
+paddr (const char *prefix, Dwarf_Addr addr, Dwfl_Line *line)
+{
+ const char *src;
+ int lineno, linecol;
+ if (line != NULL
+ && (src = dwfl_lineinfo (line, &addr, &lineno, &linecol,
+ NULL, NULL)) != NULL)
+ {
+ if (linecol != 0)
+ printf ("%s%#" PRIx64 " (%s:%d:%d)",
+ prefix, addr, src, lineno, linecol);
+ else
+ printf ("%s%#" PRIx64 " (%s:%d)",
+ prefix, addr, src, lineno);
+ }
+ else
+ printf ("%s%#" PRIx64, prefix, addr);
+}
+
+static void
+print_vars (unsigned int indent, Dwarf_Die *die)
+{
+ Dwarf_Die child;
+ if (dwarf_child (die, &child) == 0)
+ do
+ switch (dwarf_tag (&child))
+ {
+ case DW_TAG_variable:
+ case DW_TAG_formal_parameter:
+ printf ("%*s%-30s[%6" PRIx64 "]\n", indent, "",
+ dwarf_diename (&child),
+ (uint64_t) dwarf_dieoffset (&child));
+ break;
+ default:
+ break;
+ }
+ while (dwarf_siblingof (&child, &child) == 0);
+
+ Dwarf_Attribute attr_mem;
+ Dwarf_Die origin;
+ if (dwarf_hasattr (die, DW_AT_abstract_origin)
+ && dwarf_formref_die (dwarf_attr (die, DW_AT_abstract_origin, &attr_mem),
+ &origin) != NULL
+ && dwarf_child (&origin, &child) == 0)
+ do
+ switch (dwarf_tag (&child))
+ {
+ case DW_TAG_variable:
+ case DW_TAG_formal_parameter:
+ printf ("%*s%s (abstract)\n", indent, "",
+ dwarf_diename (&child));
+ break;
+ default:
+ break;
+ }
+ while (dwarf_siblingof (&child, &child) == 0);
+}
+
+
+#define INDENT 4
+
+static void
+handle_address (GElf_Addr pc, Dwfl *dwfl)
+{
+ Dwarf_Addr cubias;
+ Dwarf_Die *cudie = dwfl_addrdie (dwfl, pc, &cubias);
+ if (cudie == NULL)
+ error (EXIT_FAILURE, 0, "dwfl_addrdie: %s", dwfl_errmsg (-1));
+
+ Dwarf_Die *scopes;
+ int n = dwarf_getscopes (cudie, pc - cubias, &scopes);
+ if (n < 0)
+ error (EXIT_FAILURE, 0, "dwarf_getscopes: %s", dwarf_errmsg (-1));
+ else if (n == 0)
+ printf ("%#" PRIx64 ": not in any scope\n", pc);
+ else
+ {
+ printf ("%#" PRIx64 ":\n", pc);
+ unsigned int indent = 0;
+ while (n-- > 0)
+ {
+ Dwarf_Die *const die = &scopes[n];
+
+ indent += INDENT;
+ printf ("%*s%s (%#x)", indent, "",
+ dwarf_diename (die) ?: "<unnamed>",
+ dwarf_tag (die));
+
+ Dwarf_Addr lowpc, highpc;
+ if (dwarf_lowpc (die, &lowpc) == 0
+ && dwarf_highpc (die, &highpc) == 0)
+ {
+ lowpc += cubias;
+ highpc += cubias;
+ Dwfl_Line *loline = dwfl_getsrc (dwfl, lowpc);
+ Dwfl_Line *hiline = dwfl_getsrc (dwfl, highpc);
+ paddr (": ", lowpc, loline);
+ if (highpc != lowpc)
+ paddr (" .. ", lowpc, hiline == loline ? NULL : hiline);
+ }
+ puts ("");
+
+ print_vars (indent + INDENT, die);
+ }
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+ int remaining;
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ Dwfl *dwfl = NULL;
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl);
+ assert (dwfl != NULL);
+
+ int result = 0;
+
+ /* Now handle the addresses. In case none are given on the command
+ line, read from stdin. */
+ if (remaining == argc)
+ {
+ /* We use no threads here which can interfere with handling a stream. */
+ (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER);
+
+ char *buf = NULL;
+ size_t len = 0;
+ while (!feof_unlocked (stdin))
+ {
+ if (getline (&buf, &len, stdin) < 0)
+ break;
+
+ char *endp;
+ uintmax_t addr = strtoumax (buf, &endp, 0);
+ if (endp != buf)
+ handle_address (addr, dwfl);
+ else
+ result = 1;
+ }
+
+ free (buf);
+ }
+ else
+ {
+ do
+ {
+ char *endp;
+ uintmax_t addr = strtoumax (argv[remaining], &endp, 0);
+ if (endp != argv[remaining])
+ handle_address (addr, dwfl);
+ else
+ result = 1;
+ }
+ while (++remaining < argc);
+ }
+
+ dwfl_end (dwfl);
+
+ return result;
+}
diff --git a/src/tests/aggregate_size.c b/src/tests/aggregate_size.c
new file mode 100644
index 00000000..930eafa7
--- /dev/null
+++ b/src/tests/aggregate_size.c
@@ -0,0 +1,83 @@
+/* Test program for dwarf_aggregate_size. Prints size of top-level vars.
+ Copyright (C) 2014 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+#include <argp.h>
+#include <inttypes.h>
+#include <fcntl.h>
+#include ELFUTILS_HEADER(dw)
+#include ELFUTILS_HEADER(dwfl)
+#include <stdio.h>
+#include <unistd.h>
+#include <dwarf.h>
+
+void
+print_var_type_size (Dwarf_Die *var)
+{
+ Dwarf_Attribute attr_mem;
+ Dwarf_Die type_mem;
+ Dwarf_Die *type;
+ const char *name = dwarf_diename (var);
+
+ type = dwarf_formref_die (dwarf_attr (var, DW_AT_type, &attr_mem),
+ &type_mem);
+ if (type != NULL)
+ {
+ Dwarf_Word size;
+ if (dwarf_aggregate_size (type, &size) < 0)
+ printf ("%s no size: %s\n", name, dwarf_errmsg (-1));
+ else
+ printf ("%s size %" PRIu64 "\n", name, size);
+ }
+ else
+ printf ("%s has no type.\n", name);
+}
+
+int
+main (int argc, char *argv[])
+{
+
+ int remaining;
+ Dwfl *dwfl;
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining,
+ &dwfl);
+ assert (dwfl != NULL);
+
+ Dwarf_Die *cu = NULL;
+ Dwarf_Addr dwbias;
+ while ((cu = dwfl_nextcu (dwfl, cu, &dwbias)) != NULL)
+ {
+ Dwarf_Die die_mem;
+ Dwarf_Die *die = &die_mem;
+ dwarf_child (cu, &die_mem);
+
+ while (1)
+ {
+ if (dwarf_tag (die) == DW_TAG_variable)
+ print_var_type_size (die);
+
+ if (dwarf_siblingof (die, &die_mem) != 0)
+ break;
+ }
+ }
+
+ dwfl_end (dwfl);
+}
diff --git a/src/tests/alldts.c b/src/tests/alldts.c
new file mode 100644
index 00000000..378aa412
--- /dev/null
+++ b/src/tests/alldts.c
@@ -0,0 +1,267 @@
+/* Create an ELF file with all the DT_* flags set.
+ Copyright (C) 2011 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Marek Polacek <mpolacek@redhat.com>, 2011.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include ELFUTILS_HEADER(ebl)
+#include <elf.h>
+#include <gelf.h>
+#include <fcntl.h>
+#include <libelf.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+
+int
+main (void)
+{
+ static const char fname[] = "testfile-alldts";
+ struct Ebl_Strtab *shst;
+ struct Ebl_Strent *dynscn;
+ struct Ebl_Strent *shstrtabse;
+ const Elf32_Sword dtflags[] =
+ {
+ DT_NULL, DT_NEEDED, DT_PLTRELSZ, DT_PLTGOT,
+ DT_HASH, DT_STRTAB, DT_SYMTAB, DT_RELA,
+ DT_RELASZ, DT_RELAENT, DT_STRSZ, DT_SYMENT,
+ DT_INIT, DT_FINI, DT_SONAME, DT_RPATH,
+ DT_SYMBOLIC, DT_REL, DT_RELSZ, DT_RELENT,
+ DT_PLTREL, DT_DEBUG, DT_TEXTREL, DT_JMPREL,
+ DT_BIND_NOW, DT_INIT_ARRAY, DT_FINI_ARRAY,
+ DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ, DT_RUNPATH,
+ DT_FLAGS, DT_ENCODING, DT_PREINIT_ARRAY,
+ DT_PREINIT_ARRAYSZ, DT_VERSYM, DT_GNU_PRELINKED,
+ DT_GNU_CONFLICTSZ, DT_GNU_LIBLISTSZ, DT_CHECKSUM,
+ DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE_1,
+ DT_POSFLAG_1, DT_SYMINSZ, DT_SYMINENT, DT_GNU_HASH,
+ DT_TLSDESC_PLT, DT_TLSDESC_GOT, DT_GNU_CONFLICT,
+ DT_GNU_LIBLIST, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
+ DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT,
+ DT_RELCOUNT, DT_FLAGS_1, DT_VERDEF, DT_VERDEFNUM,
+ DT_VERNEED, DT_VERNEEDNUM, DT_AUXILIARY, DT_FILTER
+ };
+ const int ndtflags = sizeof (dtflags) / sizeof (dtflags[0]);
+
+ /* We use no threads here which can interfere with handling a stream. */
+ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
+
+ /* Open the file. */
+ int fd = open64 (fname, O_RDWR | O_CREAT | O_TRUNC, 0666);
+ if (fd == -1)
+ {
+ printf ("cannot open `%s': %m\n", fname);
+ return 1;
+ }
+
+ /* Tell the library which version are we expecting. */
+ elf_version (EV_CURRENT);
+
+ /* Create an ELF descriptor. */
+ Elf *elf = elf_begin (fd, ELF_C_WRITE, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ /* Create an ELF header. */
+ Elf32_Ehdr *ehdr = elf32_newehdr (elf);
+ if (ehdr == NULL)
+ {
+ printf ("cannot create ELF header: %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ ehdr->e_ident[0] = 42;
+ ehdr->e_ident[5] = 1;
+ ehdr->e_ident[6] = 2;
+ ehdr->e_type = ET_EXEC;
+ ehdr->e_machine = EM_386;
+ ehdr->e_version = 1;
+ ehdr->e_ehsize = 1;
+ ehdr->e_shnum = 3;
+
+ elf_flagehdr (elf, ELF_C_SET, ELF_F_DIRTY);
+
+ /* Create the program headers. */
+ Elf32_Phdr *phdr = elf32_newphdr (elf, 2);
+ if (phdr == NULL)
+ {
+ printf ("cannot create program headers: %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ phdr[0].p_type = PT_PHDR;
+ phdr[1].p_type = PT_DYNAMIC;
+
+ elf_flagphdr (elf, ELF_C_SET, ELF_F_DIRTY);
+ shst = ebl_strtabinit (true);
+
+ /* Create the .dynamic section. */
+ Elf_Scn *scn = elf_newscn (elf);
+ if (scn == NULL)
+ {
+ printf ("cannot create DYNAMIC section: %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ Elf32_Shdr *shdr = elf32_getshdr (scn);
+ if (shdr == NULL)
+ {
+ printf ("cannot get header for DYNAMIC section: %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ dynscn = ebl_strtabadd (shst, ".dynamic", 0);
+
+ /* We'll need to know the section offset. But this will be set up
+ by elf_update later, so for now just store the address. */
+ const Elf32_Off *const dynscn_offset = &shdr->sh_offset;
+ shdr->sh_type = SHT_DYNAMIC;
+ shdr->sh_flags = SHF_ALLOC | SHF_WRITE;
+ shdr->sh_link = SHN_UNDEF;
+ shdr->sh_info = SHN_UNDEF;
+ /* This section will start here. */
+ shdr->sh_addr = 0x1a0;
+
+ /* Create new section data. */
+ Elf_Data *data = elf_newdata (scn);
+ if (data == NULL)
+ {
+ printf ("cannot create data for DYNAMIC section: %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ /* Allocate memory for all the .dynamic entries. */
+ Elf32_Dyn *dyn = malloc (ndtflags * sizeof (Elf32_Dyn));
+ if (dyn == NULL)
+ {
+ printf ("malloc failed: %m\n");
+ return 1;
+ }
+
+ /* Now write all the DT_* flags. */
+ for (int i = 0; i < ndtflags; ++i)
+ {
+ dyn[i].d_tag = dtflags[i];
+ dyn[i].d_un.d_val = 0xdeadbeef;
+ }
+
+ /* Set the pointer to allocated memory. */
+ data->d_buf = dyn;
+ data->d_type = ELF_T_DYN;
+ data->d_version = EV_CURRENT;
+ data->d_size = ndtflags * sizeof (Elf32_Dyn);
+ data->d_align = 0x8;
+
+ /* Create .shstrtab section. */
+ scn = elf_newscn (elf);
+ if (scn == NULL)
+ {
+ printf ("cannot create SHSTRTAB section: %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ shdr = elf32_getshdr (scn);
+ if (shdr == NULL)
+ {
+ printf ("cannot get header for SHSTRTAB section: %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ shstrtabse = ebl_strtabadd (shst, ".shstrtab", 0);
+
+ shdr->sh_type = SHT_STRTAB;
+ shdr->sh_flags = 0;
+ shdr->sh_addr = 0;
+ shdr->sh_link = SHN_UNDEF;
+ shdr->sh_info = SHN_UNDEF;
+ shdr->sh_entsize = 1;
+
+ /* We have to store the section index in the ELF header. */
+ ehdr->e_shstrndx = elf_ndxscn (scn);
+
+ data = elf_newdata (scn);
+ if (data == NULL)
+ {
+ printf ("cannot create data SHSTRTAB section: %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ /* No more sections, finalize the section header string table. */
+ ebl_strtabfinalize (shst, data);
+
+ elf32_getshdr (elf_getscn (elf, 1))->sh_name = ebl_strtaboffset (dynscn);
+ shdr->sh_name = ebl_strtaboffset (shstrtabse);
+
+ /* Let the library compute the internal structure information. */
+ if (elf_update (elf, ELF_C_NULL) < 0)
+ {
+ printf ("failure in elf_update(NULL): %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ ehdr = elf32_getehdr (elf);
+
+ phdr[0].p_offset = ehdr->e_phoff;
+ phdr[0].p_vaddr = ehdr->e_phoff;
+ phdr[0].p_paddr = ehdr->e_phoff;
+ phdr[0].p_flags = PF_R | PF_X;
+ phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT);
+ phdr[0].p_memsz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT);
+ phdr[0].p_align = sizeof (Elf32_Word);
+
+ phdr[1].p_flags = PF_W | PF_R;
+ phdr[1].p_offset = *dynscn_offset;
+ /* Set up the start of this segment to equal start address of the
+ .dynamic section. */
+ phdr[1].p_vaddr = 0x1a0;
+ phdr[1].p_paddr = 0x1a0;
+ phdr[1].p_align = 2 * sizeof (Elf32_Word);
+ phdr[1].p_filesz = ndtflags * sizeof (Elf32_Dyn);
+ phdr[1].p_memsz = ndtflags * sizeof (Elf32_Dyn);
+
+ /* Write out the file. */
+ if (elf_update (elf, ELF_C_WRITE) < 0)
+ {
+ printf ("failure in elf_update(WRITE): %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ /* We don't need the string table anymore. */
+ ebl_strtabfree (shst);
+
+ /* And the data allocated in the .shstrtab section. */
+ free (data->d_buf);
+
+ /* All done. */
+ if (elf_end (elf) != 0)
+ {
+ printf ("failure in elf_end: %s\n", elf_errmsg (-1));
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/src/tests/allfcts.c b/src/tests/allfcts.c
new file mode 100644
index 00000000..d3c8d26a
--- /dev/null
+++ b/src/tests/allfcts.c
@@ -0,0 +1,109 @@
+/* Copyright (C) 2005, 2013 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <err.h>
+#include <fcntl.h>
+#include ELFUTILS_HEADER(dw)
+#include ELFUTILS_HEADER(dwelf)
+#include <stdio.h>
+#include <unistd.h>
+
+
+static int
+cb (Dwarf_Die *func, void *arg __attribute__ ((unused)))
+{
+ const char *file = dwarf_decl_file (func);
+ int line = -1;
+ dwarf_decl_line (func, &line);
+ const char *fct = dwarf_diename (func);
+
+ printf ("%s:%d:%s\n", file, line, fct);
+
+ return DWARF_CB_ABORT;
+}
+
+static Dwarf *
+setup_alt (Dwarf *main)
+{
+ const char *alt_name;
+ const void *build_id;
+ ssize_t ret = dwelf_dwarf_gnu_debugaltlink (main, &alt_name, &build_id);
+ if (ret == 0)
+ return NULL;
+ if (ret == -1)
+ errx (1, "dwelf_dwarf_gnu_debugaltlink: %s", dwarf_errmsg (-1));
+ int fd = open (alt_name, O_RDONLY);
+ if (fd < 0)
+ err (1, "open (%s)", alt_name);
+ Dwarf *dbg_alt = dwarf_begin (fd, DWARF_C_READ);
+ if (dbg_alt == NULL)
+ errx (1, "dwarf_begin (%s): %s", alt_name, dwarf_errmsg (-1));
+ if (elf_cntl (dwarf_getelf (dbg_alt), ELF_C_FDREAD) != 0)
+ errx (1, "elf_cntl (%s, ELF_C_FDREAD): %s", alt_name, elf_errmsg (-1));
+ close (fd);
+ dwarf_setalt (main, dbg_alt);
+ return dbg_alt;
+}
+
+int
+main (int argc, char *argv[])
+{
+ for (int i = 1; i < argc; ++i)
+ {
+ int fd = open (argv[i], O_RDONLY);
+ if (fd < 0)
+ err (1, "open (%s)", argv[i]);
+
+ Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ);
+ if (dbg != NULL)
+ {
+ Dwarf_Off off = 0;
+ size_t cuhl;
+ Dwarf_Off noff;
+ Dwarf *dbg_alt = setup_alt (dbg);
+
+ while (dwarf_nextcu (dbg, off, &noff, &cuhl, NULL, NULL, NULL) == 0)
+ {
+ Dwarf_Die die_mem;
+ Dwarf_Die *die = dwarf_offdie (dbg, off + cuhl, &die_mem);
+
+ /* Explicitly stop in the callback and then resume each time. */
+ ptrdiff_t doff = 0;
+ do
+ {
+ doff = dwarf_getfuncs (die, cb, NULL, doff);
+ if (dwarf_errno () != 0)
+ errx (1, "dwarf_getfuncs (%s): %s",
+ argv[i], dwarf_errmsg (-1));
+ }
+ while (doff != 0);
+
+ off = noff;
+ }
+
+ dwarf_end (dbg_alt);
+ dwarf_end (dbg);
+ }
+ else
+ errx (1, "dwarf_begin (%s): %s", argv[i], dwarf_errmsg (-1));
+
+ close (fd);
+ }
+}
diff --git a/src/tests/allregs.c b/src/tests/allregs.c
new file mode 100644
index 00000000..b103ce18
--- /dev/null
+++ b/src/tests/allregs.c
@@ -0,0 +1,203 @@
+/* Copyright (C) 2005, 2006 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <error.h>
+#include <locale.h>
+#include <argp.h>
+#include <assert.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+
+#include "../libdw/known-dwarf.h"
+
+static const char *
+dwarf_encoding_string (unsigned int code)
+{
+ static const char *const known[] =
+ {
+#define ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME,
+ ALL_KNOWN_DW_ATE
+#undef ONE_KNOWN_DW_ATE
+ };
+
+ if (likely (code < sizeof (known) / sizeof (known[0])))
+ return known[code];
+
+ return NULL;
+}
+
+
+static int
+first_module (Dwfl_Module *mod,
+ void **userdatap __attribute__ ((unused)),
+ const char *name __attribute__ ((unused)),
+ Dwarf_Addr low_addr __attribute__ ((unused)),
+ void *arg)
+{
+ Dwarf_Addr bias;
+ if (dwfl_module_getelf (mod, &bias) == NULL) /* Not really a module. */
+ return DWARF_CB_OK;
+
+ *(Dwfl_Module **) arg = mod;
+ return DWARF_CB_ABORT;
+}
+
+
+struct state
+{
+ struct reginfo *info;
+ int nregs;
+};
+
+struct reginfo
+{
+ const char *set, *pfx;
+ int regno;
+ int bits;
+ int type;
+ char name[32];
+};
+
+static int
+compare (const void *r1, const void *r2)
+{
+ const struct reginfo *a = r1, *b = r2;
+ if (a->set == b->set)
+ return a->regno - b->regno;
+ if (a->set == NULL)
+ return 1;
+ if (b->set == NULL)
+ return -1;
+ if (!strcmp (a->set, "integer"))
+ return -1;
+ if (!strcmp (b->set, "integer"))
+ return 1;
+ return strcmp (a->set, b->set);
+}
+
+static int
+one_register (void *arg,
+ int regno,
+ const char *setname,
+ const char *prefix,
+ const char *regname,
+ int bits, int type)
+{
+ struct state *state = arg;
+
+ if (regno >= state->nregs)
+ {
+ state->info = realloc (state->info, (regno + 1) * sizeof state->info[0]);
+ memset (&state->info[state->nregs], 0,
+ ((void *) &state->info[regno + 1]
+ - (void *) &state->info[state->nregs]));
+ state->nregs = regno + 1;
+ }
+
+ state->info[regno].regno = regno;
+ state->info[regno].set = setname;
+ state->info[regno].pfx = prefix;
+ state->info[regno].bits = bits;
+ state->info[regno].type = type;
+ assert (strlen (regname) < sizeof state->info[regno].name);
+ strcpy (state->info[regno].name, regname);
+
+ return DWARF_CB_OK;
+}
+
+
+static int
+match_register (void *arg,
+ int regno,
+ const char *setname,
+ const char *prefix,
+ const char *regname,
+ int bits, int type)
+{
+ if (regno == *(int *) arg)
+ printf ("%5d => %s register %s%s %s %d bits\n",
+ regno, setname, prefix, regname,
+ dwarf_encoding_string (type), bits);
+
+ return DWARF_CB_ABORT;
+}
+
+
+int
+main (int argc, char **argv)
+{
+ int remaining;
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ Dwfl *dwfl = NULL;
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl);
+ assert (dwfl != NULL);
+
+ Dwfl_Module *mod = NULL;
+ if (dwfl_getmodules (dwfl, &first_module, &mod, 0) < 0)
+ error (EXIT_FAILURE, 0, "dwfl_getmodules: %s", dwfl_errmsg (-1));
+
+ if (remaining == argc)
+ {
+ struct state state = { NULL, 0 };
+ int result = dwfl_module_register_names (mod, &one_register, &state);
+ if (result != 0 || state.nregs == 0)
+ error (EXIT_FAILURE, 0, "dwfl_module_register_names: %s",
+ result ? dwfl_errmsg (-1) : "no backend registers known");
+
+ qsort (state.info, state.nregs, sizeof state.info[0], &compare);
+
+ const char *set = NULL;
+ for (int i = 0; i < state.nregs; ++i)
+ if (state.info[i].set != NULL)
+ {
+ if (set != state.info[i].set)
+ printf ("%s registers:\n", state.info[i].set);
+ set = state.info[i].set;
+
+ printf ("\t%3d: %s%s (%s), %s %d bits\n",
+ state.info[i].regno,
+ state.info[i].pfx ?: "", state.info[i].name,
+ state.info[i].name,
+ dwarf_encoding_string (state.info[i].type),
+ state.info[i].bits);
+ }
+ }
+ else
+ do
+ {
+ const char *arg = argv[remaining++];
+ int regno = atoi (arg);
+ int result = dwfl_module_register_names (mod, &match_register, &regno);
+ if (result != DWARF_CB_ABORT)
+ error (EXIT_FAILURE, 0, "dwfl_module_register_names: %s",
+ result ? dwfl_errmsg (-1) : "no backend registers known");
+ }
+ while (remaining < argc);
+
+ dwfl_end (dwfl);
+
+ return 0;
+}
diff --git a/src/tests/arextract.c b/src/tests/arextract.c
new file mode 100644
index 00000000..21850b6c
--- /dev/null
+++ b/src/tests/arextract.c
@@ -0,0 +1,159 @@
+/* Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <gelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/param.h>
+
+
+int
+main (int argc, char *argv[])
+{
+ int fd;
+ Elf *elf;
+ Elf *subelf;
+ Elf_Cmd cmd;
+ off_t offset;
+ size_t todo;
+
+ if (argc < 4)
+ exit (1);
+
+ /* Open the archive. */
+ fd = open (argv[1], O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("Cannot open input file: %m");
+ exit (1);
+ }
+
+ /* Set the ELF version. */
+ elf_version (EV_CURRENT);
+
+ /* Create an ELF descriptor. */
+ cmd = ELF_C_READ;
+ elf = elf_begin (fd, cmd, NULL);
+ if (elf == NULL)
+ {
+ printf ("Cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* If it is no archive punt. */
+ if (elf_kind (elf) != ELF_K_AR)
+ {
+ printf ("`%s' is no archive\n", argv[1]);
+ exit (1);
+ }
+
+ /* Get the elements of the archive one after the other. */
+ while ((subelf = elf_begin (fd, cmd, elf)) != NULL)
+ {
+ /* The the header for this element. */
+ Elf_Arhdr *arhdr = elf_getarhdr (subelf);
+
+ if (arhdr == NULL)
+ {
+ printf ("cannot get arhdr: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ if (strcmp (arhdr->ar_name, argv[2]) == 0)
+ {
+ int outfd;
+
+ /* Get the offset of the file in the archive. */
+ offset = elf_getbase (subelf);
+ if (offset == -1)
+ {
+ printf ("\
+Failed to get base address for the archive element: %s\n",
+ elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Open the output file. */
+ outfd = open (argv[3], O_CREAT | O_TRUNC | O_RDWR, 0666);
+ if (outfd == -1)
+ {
+ printf ("cannot open output file: %m");
+ exit (1);
+ }
+
+ /* Now write out the data. */
+ todo = arhdr->ar_size;
+ while (todo > 0)
+ {
+ char buf[1024];
+ ssize_t n = pread (fd, buf, MIN (sizeof buf, todo), offset);
+ if (n == 0)
+ break;
+
+ if (write (outfd, buf, n) != n)
+ {
+ puts ("Writing output failed");
+ exit (1);
+ }
+
+ offset += n;
+ todo -= n;
+ }
+
+ /* Check whether all the date was read and written out. */
+ if (todo != 0)
+ {
+ puts ("Reading archive member failed.");
+ exit (1);
+ }
+
+ /* Close the descriptors. */
+ if (elf_end (subelf) != 0 || elf_end (elf) != 0)
+ {
+ printf ("Freeing ELF descriptors failed: %s", elf_errmsg (-1));
+ exit (1);
+ }
+
+ close (outfd);
+ close (fd);
+
+ /* All went well. */
+ exit (0);
+ }
+
+ /* Get next archive element. */
+ cmd = elf_next (subelf);
+ if (elf_end (subelf) != 0)
+ {
+ printf ("error while freeing sub-ELF descriptor: %s\n",
+ elf_errmsg (-1));
+ exit (1);
+ }
+ }
+
+ /* When we reach this point we haven't found the given file in the
+ archive. */
+ printf ("File `%s' not found in archive\n", argv[2]);
+ exit (1);
+}
diff --git a/src/tests/arls.c b/src/tests/arls.c
new file mode 100644
index 00000000..cd8e4b81
--- /dev/null
+++ b/src/tests/arls.c
@@ -0,0 +1,107 @@
+/* Copyright (C) 2007 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <ar.h>
+#include <fcntl.h>
+#include <libelf.h>
+#include <stdio.h>
+#include <unistd.h>
+
+
+static int handle (const char *fname);
+
+
+int
+main (int argc, char *argv[])
+{
+ elf_version (EV_CURRENT);
+
+ int result = 0;
+ if (argc == 1)
+ result = handle ("a.out");
+ else
+ for (int i = 1; i < argc; ++i)
+ result |= handle (argv[1]);
+
+ return result;
+}
+
+
+static int
+handle (const char *fname)
+{
+ int fd = open (fname, O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("cannot open '%s': %m\n", fname);
+ return 1;
+ }
+
+ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot get ELF handling for '%s': %s\n",
+ fname, elf_errmsg (-1));
+ close (fd);
+ return 1;
+ }
+
+ if (elf_kind (elf) != ELF_K_AR)
+ {
+ printf ("'%s' is no archive\n", fname);
+ elf_end (elf);
+ close (fd);
+ return 1;
+ }
+
+ printf ("%s:\n", fname);
+ Elf *subelf = NULL;
+ Elf_Cmd cmd = ELF_C_READ_MMAP;
+ while ((subelf = elf_begin (fd, cmd, elf)) != NULL)
+ {
+ Elf_Arhdr *arhdr = elf_getarhdr (subelf);
+ if (arhdr == NULL)
+ {
+ printf ("cannot get archive header in '%s': %s\n",
+ fname, elf_errmsg (-1));
+ elf_end (subelf);
+ elf_end (elf);
+ close (fd);
+ return 1;
+ }
+
+ off_t off = elf_getaroff (subelf);
+
+ printf ("\nOffset %llu\n"
+ " Name %s\n"
+ " Date %ld\n"
+ " UID %d\n"
+ " GID %d\n"
+ " Mode %o\n"
+ " Size %lld\n",
+ (unsigned long long int) off,
+ arhdr->ar_name, (long int) arhdr->ar_date, (int) arhdr->ar_uid,
+ (int) arhdr->ar_gid,
+ (int) arhdr->ar_mode, (long long int) arhdr->ar_size);
+
+ cmd = elf_next (subelf);
+ elf_end (subelf);
+ }
+
+ close (fd);
+
+ return 0;
+}
diff --git a/src/tests/arsymtest.c b/src/tests/arsymtest.c
new file mode 100644
index 00000000..c724863f
--- /dev/null
+++ b/src/tests/arsymtest.c
@@ -0,0 +1,136 @@
+/* Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <fcntl.h>
+#include <libelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+
+int
+main (int argc, char *argv[])
+{
+ int fd;
+ FILE *fp;
+ Elf *elf;
+ Elf_Arsym *arsym;
+ size_t narsym;
+
+ if (argc < 3)
+ exit (1);
+
+ /* Open the archive. */
+ fd = open (argv[1], O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("Cannot open input file: %m");
+ exit (1);
+ }
+
+ /* Open the output file. */
+ fp = fopen (argv[2], "w");
+ if (fp == NULL)
+ {
+ printf ("Cannot open output file: %m");
+ exit (1);
+ }
+
+ /* Set the ELF version. */
+ elf_version (EV_CURRENT);
+
+ /* Create an ELF descriptor. */
+ elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ {
+ printf ("Cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* If it is no archive punt. */
+ if (elf_kind (elf) != ELF_K_AR)
+ {
+ printf ("`%s' is no archive\n", argv[1]);
+ exit (1);
+ }
+
+ /* Now get the index of the archive. */
+ arsym = elf_getarsym (elf, &narsym);
+ if (arsym == NULL)
+ {
+ printf ("Cannot get archive index: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* If there is no element in the index do nothing. There always is
+ an empty entry at the end which is included in the count and
+ which we want to skip. */
+ if (narsym-- > 1)
+ while (narsym-- > 0)
+ {
+ Elf *subelf;
+ Elf_Arhdr *arhdr;
+
+ if (elf_rand (elf, arsym[narsym].as_off) != arsym[narsym].as_off)
+ {
+ printf ("random access for symbol `%s' fails: %s\n",
+ arsym[narsym].as_name, elf_errmsg (-1));
+ exit (1);
+ }
+
+ subelf = elf_begin (fd, ELF_C_READ, elf);
+ if (subelf == NULL)
+ {
+ printf ("Cannot create ELF descriptor for archive member: %s\n",
+ elf_errmsg (-1));
+ exit (1);
+ }
+
+ arhdr = elf_getarhdr (subelf);
+ if (arhdr == NULL)
+ {
+ printf ("Cannot get archive header for element `%s': %s\n",
+ arsym[narsym].as_name, elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Now print what we actually want. */
+ fprintf (fp, "%s in %s\n", arsym[narsym].as_name, arhdr->ar_name);
+
+ /* Free the ELF descriptor. */
+ if (elf_end (subelf) != 0)
+ {
+ printf ("Error while freeing subELF descriptor: %s\n",
+ elf_errmsg (-1));
+ exit (1);
+ }
+ }
+
+ /* Free the ELF descriptor. */
+ if (elf_end (elf) != 0)
+ {
+ printf ("Error while freeing ELF descriptor: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ close (fd);
+ fclose (fp);
+
+ return 0;
+}
diff --git a/src/tests/asm-tst1.c b/src/tests/asm-tst1.c
new file mode 100644
index 00000000..f611d66b
--- /dev/null
+++ b/src/tests/asm-tst1.c
@@ -0,0 +1,256 @@
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include ELFUTILS_HEADER(asm)
+#include <libelf.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+
+static const char fname[] = "asm-tst1-out.o";
+
+
+static const GElf_Ehdr expected_ehdr =
+ {
+ .e_ident = { [EI_MAG0] = ELFMAG0,
+ [EI_MAG1] = ELFMAG1,
+ [EI_MAG2] = ELFMAG2,
+ [EI_MAG3] = ELFMAG3,
+ [EI_CLASS] = ELFCLASS32,
+ [EI_DATA] = ELFDATA2LSB,
+ [EI_VERSION] = EV_CURRENT },
+ .e_type = ET_REL,
+ .e_machine = EM_386,
+ .e_version = EV_CURRENT,
+ .e_shoff = 88,
+ .e_ehsize = sizeof (Elf32_Ehdr),
+ .e_shentsize = sizeof (Elf32_Shdr),
+ .e_shnum = 4,
+ .e_shstrndx = 3
+ };
+
+
+static const char *scnnames[4] =
+ {
+ [0] = "",
+ [1] = ".text",
+ [2] = ".data",
+ [3] = ".shstrtab"
+ };
+
+
+int
+main (void)
+{
+ AsmCtx_t *ctx;
+ AsmScn_t *scn1;
+ AsmScn_t *scn2;
+ int fd;
+ Elf *elf;
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr *ehdr;
+ int result = 0;
+ size_t cnt;
+
+ elf_version (EV_CURRENT);
+
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
+ if (ctx == NULL)
+ {
+ printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
+ return 1;
+ }
+
+ /* Create two sections. */
+ scn1 = asm_newscn (ctx, ".text", SHT_PROGBITS, SHF_ALLOC | SHF_EXECINSTR);
+ scn2 = asm_newscn (ctx, ".data", SHT_PROGBITS, SHF_ALLOC | SHF_WRITE);
+ if (scn1 == NULL || scn2 == NULL)
+ {
+ printf ("cannot create section in output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Special alignment for the .text section. */
+ if (asm_align (scn1, 32) != 0)
+ {
+ printf ("cannot align .text section: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+
+ /* Create the output file. */
+ if (asm_end (ctx) != 0)
+ {
+ printf ("cannot create output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Check the file. */
+ fd = open (fname, O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("cannot open generated file: %m\n");
+ result = 1;
+ goto out;
+ }
+
+ elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ result = 1;
+ goto out_close;
+ }
+ if (elf_kind (elf) != ELF_K_ELF)
+ {
+ puts ("not a valid ELF file");
+ result = 1;
+ goto out_close2;
+ }
+
+ ehdr = gelf_getehdr (elf, &ehdr_mem);
+ if (ehdr == NULL)
+ {
+ printf ("cannot get ELF header: %s\n", elf_errmsg (-1));
+ result = 1;
+ goto out_close2;
+ }
+
+ if (memcmp (ehdr, &expected_ehdr, sizeof (GElf_Ehdr)) != 0)
+ {
+ puts ("ELF header does not match");
+ result = 1;
+ goto out_close2;
+ }
+
+ for (cnt = 1; cnt < 4; ++cnt)
+ {
+ Elf_Scn *scn;
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr;
+
+ scn = elf_getscn (elf, cnt);
+ if (scn == NULL)
+ {
+ printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+
+ shdr = gelf_getshdr (scn, &shdr_mem);
+ if (shdr == NULL)
+ {
+ printf ("cannot get section header for section %Zd: %s\n",
+ cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+
+ if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
+ scnnames[cnt]) != 0)
+ {
+ printf ("section %Zd's name differs: %s vs %s\n", cnt,
+ elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
+ scnnames[cnt]);
+ result = 1;
+ }
+
+ if (shdr->sh_type != (cnt == 3 ? SHT_STRTAB : SHT_PROGBITS))
+ {
+ printf ("section %Zd's type differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_EXECINSTR))
+ || (cnt == 2 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE))
+ || (cnt == 3 && shdr->sh_flags != 0))
+ {
+ printf ("section %Zd's flags differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_addr != 0)
+ {
+ printf ("section %Zd's address differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_offset != ((sizeof (Elf32_Ehdr) + 31) & ~31))
+ {
+ printf ("section %Zd's offset differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt != 3 && shdr->sh_size != 0)
+ || (cnt == 3 && shdr->sh_size != 23))
+ {
+ printf ("section %Zd's size differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_link != 0)
+ {
+ printf ("section %Zd's link differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_info != 0)
+ {
+ printf ("section %Zd's info differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt == 1 && shdr->sh_addralign != 32)
+ || (cnt != 1 && shdr->sh_addralign != 1))
+ {
+ printf ("section %Zd's addralign differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_entsize != 0)
+ {
+ printf ("section %Zd's entsize differs\n", cnt);
+ result = 1;
+ }
+ }
+
+ out_close2:
+ elf_end (elf);
+ out_close:
+ close (fd);
+ out:
+ /* We don't need the file anymore. */
+ unlink (fname);
+
+ ebl_closebackend (ebl);
+
+ return result;
+}
diff --git a/src/tests/asm-tst2.c b/src/tests/asm-tst2.c
new file mode 100644
index 00000000..41bf13ae
--- /dev/null
+++ b/src/tests/asm-tst2.c
@@ -0,0 +1,278 @@
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include ELFUTILS_HEADER(asm)
+#include <libelf.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+
+static const char fname[] = "asm-tst2-out.o";
+
+
+static const GElf_Ehdr expected_ehdr =
+ {
+ .e_ident = { [EI_MAG0] = ELFMAG0,
+ [EI_MAG1] = ELFMAG1,
+ [EI_MAG2] = ELFMAG2,
+ [EI_MAG3] = ELFMAG3,
+ [EI_CLASS] = ELFCLASS32,
+ [EI_DATA] = ELFDATA2LSB,
+ [EI_VERSION] = EV_CURRENT },
+ .e_type = ET_REL,
+ .e_machine = EM_386,
+ .e_version = EV_CURRENT,
+ .e_shoff = 96,
+ .e_ehsize = sizeof (Elf32_Ehdr),
+ .e_shentsize = sizeof (Elf32_Shdr),
+ .e_shnum = 3,
+ .e_shstrndx = 2
+ };
+
+
+static const char *scnnames[3] =
+ {
+ [0] = "",
+ [1] = ".data",
+ [2] = ".shstrtab"
+ };
+
+
+int
+main (void)
+{
+ AsmCtx_t *ctx;
+ AsmScn_t *scn1;
+ AsmScn_t *scn2;
+ int result = 0;
+ int fd;
+ Elf *elf;
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr *ehdr;
+ size_t cnt;
+
+ elf_version (EV_CURRENT);
+
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
+ if (ctx == NULL)
+ {
+ printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
+ return 1;
+ }
+
+ /* Create two sections. */
+ scn1 = asm_newscn (ctx, ".data", SHT_PROGBITS, SHF_ALLOC | SHF_WRITE);
+ scn2 = asm_newsubscn (scn1, 1);
+ if (scn1 == NULL || scn2 == NULL)
+ {
+ printf ("cannot create section in output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Special alignment for the .text section. */
+ if (asm_align (scn1, 16) != 0)
+ {
+ printf ("cannot align .text section: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+
+ /* Add a few strings. */
+ if (asm_addstrz (scn1, "one", 4) != 0)
+ {
+ printf ("cannot insert first string: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+ if (asm_addstrz (scn2, "three", 0) != 0)
+ {
+ printf ("cannot insert second string: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+ if (asm_addstrz (scn1, "two", 4) != 0)
+ {
+ printf ("cannot insert third string: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+
+ /* Create the output file. */
+ if (asm_end (ctx) != 0)
+ {
+ printf ("cannot create output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Check the file. */
+ fd = open (fname, O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("cannot open generated file: %m\n");
+ result = 1;
+ goto out;
+ }
+
+ elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ result = 1;
+ goto out_close;
+ }
+ if (elf_kind (elf) != ELF_K_ELF)
+ {
+ puts ("not a valid ELF file");
+ result = 1;
+ goto out_close2;
+ }
+
+ ehdr = gelf_getehdr (elf, &ehdr_mem);
+ if (ehdr == NULL)
+ {
+ printf ("cannot get ELF header: %s\n", elf_errmsg (-1));
+ result = 1;
+ goto out_close2;
+ }
+
+ if (memcmp (ehdr, &expected_ehdr, sizeof (GElf_Ehdr)) != 0)
+ {
+ puts ("ELF header does not match");
+ result = 1;
+ goto out_close2;
+ }
+
+ for (cnt = 1; cnt < 3; ++cnt)
+ {
+ Elf_Scn *scn;
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr;
+
+ scn = elf_getscn (elf, cnt);
+ if (scn == NULL)
+ {
+ printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+
+ shdr = gelf_getshdr (scn, &shdr_mem);
+ if (shdr == NULL)
+ {
+ printf ("cannot get section header for section %Zd: %s\n",
+ cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+
+ if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
+ scnnames[cnt]) != 0)
+ {
+ printf ("section %Zd's name differs: %s vs %s\n", cnt,
+ elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
+ scnnames[cnt]);
+ result = 1;
+ }
+
+ if (shdr->sh_type != (cnt == 2 ? SHT_STRTAB : SHT_PROGBITS))
+ {
+ printf ("section %Zd's type differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE))
+ || (cnt == 2 && shdr->sh_flags != 0))
+ {
+ printf ("section %Zd's flags differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_addr != 0)
+ {
+ printf ("section %Zd's address differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt == 1 && shdr->sh_offset != ((sizeof (Elf32_Ehdr) + 15) & ~15))
+ || (cnt == 2
+ && shdr->sh_offset != (((sizeof (Elf32_Ehdr) + 15) & ~15)
+ + strlen ("one") + 1
+ + strlen ("two") + 1
+ + strlen ("three") + 1)))
+ {
+ printf ("section %Zd's offset differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt == 1 && shdr->sh_size != (strlen ("one") + 1
+ + strlen ("two") + 1
+ + strlen ("three") + 1))
+ || (cnt == 2 && shdr->sh_size != 17))
+ {
+ printf ("section %Zd's size differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_link != 0)
+ {
+ printf ("section %Zd's link differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_info != 0)
+ {
+ printf ("section %Zd's info differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt == 1 && shdr->sh_addralign != 16)
+ || (cnt != 1 && shdr->sh_addralign != 1))
+ {
+ printf ("section %Zd's addralign differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_entsize != 0)
+ {
+ printf ("section %Zd's entsize differs\n", cnt);
+ result = 1;
+ }
+ }
+
+ out_close2:
+ elf_end (elf);
+ out_close:
+ close (fd);
+ out:
+ /* We don't need the file anymore. */
+ unlink (fname);
+
+ ebl_closebackend (ebl);
+
+ return result;
+}
diff --git a/src/tests/asm-tst3.c b/src/tests/asm-tst3.c
new file mode 100644
index 00000000..acec1a48
--- /dev/null
+++ b/src/tests/asm-tst3.c
@@ -0,0 +1,339 @@
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include ELFUTILS_HEADER(asm)
+#include <libelf.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+
+static const char fname[] = "asm-tst3-out.o";
+
+
+static const char *scnnames[5] =
+ {
+ [0] = "",
+ [1] = ".data",
+ [2] = ".strtab",
+ [3] = ".symtab",
+ [4] = ".shstrtab"
+ };
+
+
+static unsigned int scntypes[5] =
+ {
+ [0] = SHT_NULL,
+ [1] = SHT_PROGBITS,
+ [2] = SHT_STRTAB,
+ [3] = SHT_SYMTAB,
+ [4] = SHT_STRTAB
+ };
+
+
+int
+main (void)
+{
+ AsmCtx_t *ctx;
+ AsmScn_t *scn1;
+ AsmScn_t *scn2;
+ int result = 0;
+ int fd;
+ Elf *elf;
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr *ehdr;
+ size_t cnt;
+
+ elf_version (EV_CURRENT);
+
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
+ if (ctx == NULL)
+ {
+ printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
+ return 1;
+ }
+
+ /* Create two sections. */
+ scn1 = asm_newscn (ctx, ".data", SHT_PROGBITS, SHF_ALLOC | SHF_WRITE);
+ scn2 = asm_newsubscn (scn1, 1);
+ if (scn1 == NULL || scn2 == NULL)
+ {
+ printf ("cannot create section in output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Special alignment for the .text section. */
+ if (asm_align (scn1, 16) != 0)
+ {
+ printf ("cannot align .text section: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+
+ /* Add a few strings with names. */
+ if (asm_newsym (scn1, "one", 4, STT_OBJECT, STB_GLOBAL) == NULL)
+ {
+ printf ("cannot create first name: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+ if (asm_addstrz (scn1, "one", 4) != 0)
+ {
+ printf ("cannot insert first string: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+ if (asm_newsym (scn2, "three", 6, STT_OBJECT, STB_WEAK) == NULL)
+ {
+ printf ("cannot create second name: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+ if (asm_addstrz (scn2, "three", 0) != 0)
+ {
+ printf ("cannot insert second string: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+ if (asm_newsym (scn1, "two", 4, STT_OBJECT, STB_LOCAL) == NULL)
+ {
+ printf ("cannot create third name: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+ if (asm_addstrz (scn1, "two", 4) != 0)
+ {
+ printf ("cannot insert third string: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+
+ /* Create the output file. */
+ if (asm_end (ctx) != 0)
+ {
+ printf ("cannot create output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Check the file. */
+ fd = open (fname, O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("cannot open generated file: %m\n");
+ result = 1;
+ goto out;
+ }
+
+ elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ result = 1;
+ goto out_close;
+ }
+ if (elf_kind (elf) != ELF_K_ELF)
+ {
+ puts ("not a valid ELF file");
+ result = 1;
+ goto out_close2;
+ }
+
+ ehdr = gelf_getehdr (elf, &ehdr_mem);
+ if (ehdr == NULL)
+ {
+ printf ("cannot get ELF header: %s\n", elf_errmsg (-1));
+ result = 1;
+ goto out_close2;
+ }
+
+ for (cnt = 1; cnt < 5; ++cnt)
+ {
+ Elf_Scn *scn;
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr;
+
+ scn = elf_getscn (elf, cnt);
+ if (scn == NULL)
+ {
+ printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+
+ shdr = gelf_getshdr (scn, &shdr_mem);
+ if (shdr == NULL)
+ {
+ printf ("cannot get section header for section %Zd: %s\n",
+ cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+
+ if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
+ scnnames[cnt]) != 0)
+ {
+ printf ("section %Zd's name differs: %s vs %s\n", cnt,
+ elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
+ scnnames[cnt]);
+ result = 1;
+ }
+
+ if (shdr->sh_type != scntypes[cnt])
+ {
+ printf ("section %Zd's type differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE))
+ || (cnt != 1 && shdr->sh_flags != 0))
+ {
+ printf ("section %Zd's flags differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_addr != 0)
+ {
+ printf ("section %Zd's address differs\n", cnt);
+ result = 1;
+ }
+
+ if (cnt == 3)
+ {
+ Elf_Data *data;
+
+ if (shdr->sh_link != 2)
+ {
+ puts ("symbol table has incorrect link");
+ result = 1;
+ }
+
+ data = elf_getdata (scn, NULL);
+ if (data == NULL)
+ {
+ puts ("cannot get data of symbol table");
+ result = 1;
+ }
+ else
+ {
+ size_t inner;
+
+ for (inner = 1;
+ inner < (shdr->sh_size
+ / gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT));
+ ++inner)
+ {
+ GElf_Sym sym_mem;
+ GElf_Sym *sym;
+
+ sym = gelf_getsym (data, inner, &sym_mem);
+ if (sym == NULL)
+ {
+ printf ("cannot get symbol %zu: %s\n",
+ inner, elf_errmsg (-1));
+ result = 1;
+ }
+ else
+ {
+ /* The order of the third and fourth entry depends
+ on how the hash table is organized. */
+ static const char *names[4] =
+ {
+ [0] = "",
+ [1] = "two",
+ [2] = "one",
+ [3] = "three"
+ };
+ static const int info[4] =
+ {
+ [0] = GELF_ST_INFO (STB_LOCAL, STT_NOTYPE),
+ [1] = GELF_ST_INFO (STB_LOCAL, STT_OBJECT),
+ [2] = GELF_ST_INFO (STB_GLOBAL, STT_OBJECT),
+ [3] = GELF_ST_INFO (STB_WEAK, STT_OBJECT)
+ };
+ static const unsigned value[4] =
+ {
+ [0] = 0,
+ [1] = 4,
+ [2] = 0,
+ [3] = 8
+ };
+
+ if (strcmp (names[inner],
+ elf_strptr (elf, shdr->sh_link,
+ sym->st_name)) != 0)
+ {
+ printf ("symbol %zu has different name\n", inner);
+ result = 1;
+ }
+
+ if (sym->st_value != value[inner])
+ {
+ printf ("symbol %zu has wrong value\n", inner);
+ result = 1;
+ }
+
+ if (sym->st_other != 0)
+ {
+ printf ("symbol %zu has wrong other info\n", inner);
+ result = 1;
+ }
+
+ if (sym->st_shndx != 1)
+ {
+ printf ("symbol %zu has wrong section reference\n",
+ inner);
+ result = 1;
+ }
+
+ if (sym->st_info != info[inner])
+ {
+ printf ("symbol %zu has wrong type or binding\n",
+ inner);
+ result = 1;
+ }
+
+ if ((inner != 3 && sym->st_size != 4)
+ || (inner == 3 && sym->st_size != 6))
+ {
+ printf ("symbol %zu has wrong size\n", inner);
+ result = 1;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ out_close2:
+ elf_end (elf);
+ out_close:
+ close (fd);
+ out:
+ /* We don't need the file anymore. */
+ unlink (fname);
+
+ ebl_closebackend (ebl);
+
+ return result;
+}
diff --git a/src/tests/asm-tst4.c b/src/tests/asm-tst4.c
new file mode 100644
index 00000000..4788b79e
--- /dev/null
+++ b/src/tests/asm-tst4.c
@@ -0,0 +1,104 @@
+/* Copyright (C) 2002-2012 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include ELFUTILS_HEADER(asm)
+#include <libelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+
+static const char fname[] = "asm-tst4-out.o";
+
+
+int
+main (void)
+{
+ AsmCtx_t *ctx;
+ int result = 0;
+ size_t cnt;
+
+ elf_version (EV_CURRENT);
+
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
+ if (ctx == NULL)
+ {
+ printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
+ return 1;
+ }
+
+ /* Create 66000 sections. */
+ for (cnt = 0; cnt < 66000; ++cnt)
+ {
+ char buf[20];
+ AsmScn_t *scn;
+
+ /* Create a unique name. */
+ snprintf (buf, sizeof (buf), ".data.%Zu", cnt);
+
+ /* Create the section. */
+ scn = asm_newscn (ctx, buf, SHT_PROGBITS, SHF_ALLOC | SHF_WRITE);
+ if (scn == NULL)
+ {
+ printf ("cannot create section \"%s\" in output file: %s\n",
+ buf, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Add some content. */
+ if (asm_adduint32 (scn, cnt) != 0)
+ {
+ printf ("cannot create content of section \"%s\": %s\n",
+ buf, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+ }
+
+ /* Create the output file. */
+ if (asm_end (ctx) != 0)
+ {
+ printf ("cannot create output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ if (result == 0)
+ result = WEXITSTATUS (system ("../src/elflint -q asm-tst4-out.o"));
+
+ /* We don't need the file anymore. */
+ unlink (fname);
+
+ ebl_closebackend (ebl);
+
+ return result;
+}
diff --git a/src/tests/asm-tst5.c b/src/tests/asm-tst5.c
new file mode 100644
index 00000000..d97d4be9
--- /dev/null
+++ b/src/tests/asm-tst5.c
@@ -0,0 +1,116 @@
+/* Copyright (C) 2002-2012 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include ELFUTILS_HEADER(asm)
+#include <libelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+#include "system.h"
+
+
+static const char fname[] = "asm-tst5-out.o";
+
+
+int
+main (void)
+{
+ AsmCtx_t *ctx;
+ int result = 0;
+ size_t cnt;
+
+ elf_version (EV_CURRENT);
+
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
+ if (ctx == NULL)
+ {
+ printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
+ return 1;
+ }
+
+ /* Create 66000 sections. */
+ for (cnt = 0; cnt < 66000; ++cnt)
+ {
+ char buf[20];
+ AsmScn_t *scn;
+
+ /* Create a unique name. */
+ snprintf (buf, sizeof (buf), ".data.%Zu", cnt);
+
+ /* Create the section. */
+ scn = asm_newscn (ctx, buf, SHT_PROGBITS, SHF_ALLOC | SHF_WRITE);
+ if (scn == NULL)
+ {
+ printf ("cannot create section \"%s\" in output file: %s\n",
+ buf, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Add a name. */
+ snprintf (buf, sizeof (buf), "%Zu", cnt);
+ if (asm_newsym (scn, buf, sizeof (uint32_t), STT_OBJECT,
+ STB_GLOBAL) == NULL)
+ {
+ printf ("cannot create symbol \"%s\": %s\n", buf, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Add some content. */
+ if (asm_adduint32 (scn, cnt) != 0)
+ {
+ printf ("cannot create content of section \"%s\": %s\n",
+ buf, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+ }
+
+ /* Create the output file. */
+ if (asm_end (ctx) != 0)
+ {
+ printf ("cannot create output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ if (result == 0)
+ result = WEXITSTATUS (system ("../src/elflint -q asm-tst5-out.o"));
+
+ /* We don't need the file anymore. */
+ unlink (fname);
+
+ ebl_closebackend (ebl);
+
+ return result;
+}
diff --git a/src/tests/asm-tst6.c b/src/tests/asm-tst6.c
new file mode 100644
index 00000000..35854d52
--- /dev/null
+++ b/src/tests/asm-tst6.c
@@ -0,0 +1,150 @@
+/* Copyright (C) 2002-2012 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include ELFUTILS_HEADER(asm)
+#include <libelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+#include <system.h>
+
+
+static const char fname[] = "asm-tst6-out.o";
+
+
+int
+main (void)
+{
+ AsmCtx_t *ctx;
+ int result = 0;
+ size_t cnt;
+
+ elf_version (EV_CURRENT);
+
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
+ if (ctx == NULL)
+ {
+ printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
+ return 1;
+ }
+
+ for (cnt = 0; cnt < 22000; ++cnt)
+ {
+ char buf[512];
+ AsmScnGrp_t *grp;
+ AsmScn_t *scn;
+ AsmSym_t *sym;
+
+ snprintf (buf, sizeof (buf), ".grp%Zu", cnt);
+ grp = asm_newscngrp (ctx, buf, NULL, 0);
+ if (grp == NULL)
+ {
+ printf ("cannot section group %Zu: %s\n", cnt, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ scn = asm_newscn_ingrp (ctx, ".data", SHT_PROGBITS,
+ SHF_ALLOC | SHF_WRITE, grp);
+ if (scn == NULL)
+ {
+ printf ("cannot data section for group %Zu: %s\n",
+ cnt, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Add a name. */
+ snprintf (buf, sizeof (buf), "%Zu", cnt);
+ sym = asm_newsym (scn, buf, sizeof (uint32_t), STT_OBJECT,
+ STB_GLOBAL);
+ if (sym == NULL)
+ {
+ printf ("cannot create symbol \"%s\": %s\n", buf, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Add some content. */
+ if (asm_adduint32 (scn, cnt) != 0)
+ {
+ printf ("cannot create content of section \"%s\": %s\n",
+ buf, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Now we have a symbol, use it as the signature. */
+ if (asm_scngrp_newsignature (grp, sym) != 0)
+ {
+ printf ("cannot set signature for section group %Zu: %s\n",
+ cnt, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Create a phony debug info section. */
+ scn = asm_newscn_ingrp (ctx, ".stab", SHT_PROGBITS, 0, grp);
+ if (scn == NULL)
+ {
+ printf ("cannot stab section for group %Zu: %s\n",
+ cnt, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Add some content. */
+ if (asm_adduint32 (scn, cnt) != 0)
+ {
+ printf ("cannot create content of section \"%s\": %s\n",
+ buf, asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+ }
+
+ /* Create the output file. */
+ if (asm_end (ctx) != 0)
+ {
+ printf ("cannot create output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ if (result == 0)
+ result = WEXITSTATUS (system ("../src/elflint -q asm-tst6-out.o"));
+
+ /* We don't need the file anymore. */
+ unlink (fname);
+
+ ebl_closebackend (ebl);
+
+ return result;
+}
diff --git a/src/tests/asm-tst7.c b/src/tests/asm-tst7.c
new file mode 100644
index 00000000..a875eb4c
--- /dev/null
+++ b/src/tests/asm-tst7.c
@@ -0,0 +1,181 @@
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <inttypes.h>
+#include ELFUTILS_HEADER(asm)
+#include <libelf.h>
+#include <stdio.h>
+#include <unistd.h>
+
+
+static const char fname[] = "asm-tst7-out.o";
+
+
+int
+main (void)
+{
+ int result = 0;
+ size_t cnt;
+ AsmCtx_t *ctx;
+ Elf *elf;
+ int fd;
+
+ elf_version (EV_CURRENT);
+
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
+ if (ctx == NULL)
+ {
+ printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
+ return 1;
+ }
+
+ if (asm_newcomsym (ctx, "commsym", 4, 16) == NULL)
+ {
+ printf ("cannot create common symbol: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Create the output file. */
+ if (asm_end (ctx) != 0)
+ {
+ printf ("cannot create output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Check the file. */
+ fd = open (fname, O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("cannot open generated file: %m\n");
+ result = 1;
+ goto out;
+ }
+
+ elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ result = 1;
+ goto out_close;
+ }
+ if (elf_kind (elf) != ELF_K_ELF)
+ {
+ puts ("not a valid ELF file");
+ result = 1;
+ goto out_close2;
+ }
+
+ for (cnt = 1; 1; ++cnt)
+ {
+ Elf_Scn *scn;
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr;
+
+ scn = elf_getscn (elf, cnt);
+ if (scn == NULL)
+ {
+ printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+
+ shdr = gelf_getshdr (scn, &shdr_mem);
+ if (shdr == NULL)
+ {
+ printf ("cannot get section header for section %Zd: %s\n",
+ cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+ /* We are looking for the symbol table. */
+ if (shdr->sh_type != SHT_SYMTAB)
+ continue;
+
+ for (cnt = 1; cnt< (shdr->sh_size
+ / gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT));
+ ++cnt)
+ {
+ GElf_Sym sym_mem;
+ GElf_Sym *sym;
+
+ if (cnt > 1)
+ {
+ puts ("too many symbol");
+ result = 1;
+ break;
+ }
+
+ sym = gelf_getsym (elf_getdata (scn, NULL), cnt, &sym_mem);
+ if (sym == NULL)
+ {
+ printf ("cannot get symbol %zu: %s\n", cnt, elf_errmsg (-1));
+ result = 1;
+ }
+ else
+ {
+ if (sym->st_shndx != SHN_COMMON)
+ {
+ printf ("expected common symbol, got section %u\n",
+ (unsigned int) sym->st_shndx);
+ result = 1;
+ }
+
+ if (sym->st_value != 16)
+ {
+ printf ("requested alignment 16, is %" PRIuMAX "\n",
+ (uintmax_t) sym->st_value);
+ result = 1;
+ }
+
+ if (sym->st_size != 4)
+ {
+ printf ("requested size 4, is %" PRIuMAX "\n",
+ (uintmax_t) sym->st_value);
+ result = 1;
+ }
+ }
+ }
+
+ break;
+ }
+
+ out_close2:
+ elf_end (elf);
+ out_close:
+ close (fd);
+ out:
+ /* We don't need the file anymore. */
+ unlink (fname);
+
+ ebl_closebackend (ebl);
+
+ return result;
+}
diff --git a/src/tests/asm-tst8.c b/src/tests/asm-tst8.c
new file mode 100644
index 00000000..597c5cb3
--- /dev/null
+++ b/src/tests/asm-tst8.c
@@ -0,0 +1,189 @@
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <inttypes.h>
+#include ELFUTILS_HEADER(asm)
+#include <libelf.h>
+#include <stdio.h>
+#include <unistd.h>
+
+
+static const char fname[] = "asm-tst8-out.o";
+
+
+int
+main (void)
+{
+ int result = 0;
+ size_t cnt;
+ AsmCtx_t *ctx;
+ Elf *elf;
+ int fd;
+
+ elf_version (EV_CURRENT);
+
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
+ if (ctx == NULL)
+ {
+ printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
+ return 1;
+ }
+
+ if (asm_newabssym (ctx, "tst8-out.s", 4, 0xfeedbeef, STT_FILE, STB_LOCAL)
+ == NULL)
+ {
+ printf ("cannot create absolute symbol: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Create the output file. */
+ if (asm_end (ctx) != 0)
+ {
+ printf ("cannot create output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Check the file. */
+ fd = open (fname, O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("cannot open generated file: %m\n");
+ result = 1;
+ goto out;
+ }
+
+ elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ result = 1;
+ goto out_close;
+ }
+ if (elf_kind (elf) != ELF_K_ELF)
+ {
+ puts ("not a valid ELF file");
+ result = 1;
+ goto out_close2;
+ }
+
+ for (cnt = 1; 1; ++cnt)
+ {
+ Elf_Scn *scn;
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr;
+
+ scn = elf_getscn (elf, cnt);
+ if (scn == NULL)
+ {
+ printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+
+ shdr = gelf_getshdr (scn, &shdr_mem);
+ if (shdr == NULL)
+ {
+ printf ("cannot get section header for section %Zd: %s\n",
+ cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+ /* We are looking for the symbol table. */
+ if (shdr->sh_type != SHT_SYMTAB)
+ continue;
+
+ for (cnt = 1; cnt< (shdr->sh_size
+ / gelf_fsize (elf, ELF_T_SYM, 1, EV_CURRENT));
+ ++cnt)
+ {
+ GElf_Sym sym_mem;
+ GElf_Sym *sym;
+
+ if (cnt > 1)
+ {
+ puts ("too many symbol");
+ result = 1;
+ break;
+ }
+
+ sym = gelf_getsym (elf_getdata (scn, NULL), cnt, &sym_mem);
+ if (sym == NULL)
+ {
+ printf ("cannot get symbol %zu: %s\n", cnt, elf_errmsg (-1));
+ result = 1;
+ }
+ else
+ {
+ if (sym->st_shndx != SHN_ABS)
+ {
+ printf ("expected common symbol, got section %u\n",
+ (unsigned int) sym->st_shndx);
+ result = 1;
+ }
+
+ if (sym->st_value != 0xfeedbeef)
+ {
+ printf ("requested value 0xfeedbeef, is %#" PRIxMAX "\n",
+ (uintmax_t) sym->st_value);
+ result = 1;
+ }
+
+ if (sym->st_size != 4)
+ {
+ printf ("requested size 4, is %" PRIuMAX "\n",
+ (uintmax_t) sym->st_value);
+ result = 1;
+ }
+
+ if (GELF_ST_TYPE (sym->st_info) != STT_FILE)
+ {
+ printf ("requested type FILE, is %u\n",
+ (unsigned int) GELF_ST_TYPE (sym->st_info));
+ result = 1;
+ }
+ }
+ }
+
+ break;
+ }
+
+ out_close2:
+ elf_end (elf);
+ out_close:
+ close (fd);
+ out:
+ /* We don't need the file anymore. */
+ unlink (fname);
+
+ ebl_closebackend (ebl);
+
+ return result;
+}
diff --git a/src/tests/asm-tst9.c b/src/tests/asm-tst9.c
new file mode 100644
index 00000000..b9fcdd4d
--- /dev/null
+++ b/src/tests/asm-tst9.c
@@ -0,0 +1,335 @@
+/* Copyright (C) 2002-2010 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <inttypes.h>
+#include ELFUTILS_HEADER(asm)
+#include <libelf.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+
+static const char fname[] = "asm-tst9-out.o";
+
+
+static int32_t input[] =
+ {
+ 0, 1, 129, 510, 2000, 33000, 0x7ffffff, 0x7fffffff
+ };
+#define ninput (sizeof (input) / sizeof (input[0]))
+
+
+static const GElf_Ehdr expected_ehdr =
+ {
+ .e_ident = { [EI_MAG0] = ELFMAG0,
+ [EI_MAG1] = ELFMAG1,
+ [EI_MAG2] = ELFMAG2,
+ [EI_MAG3] = ELFMAG3,
+ [EI_CLASS] = ELFCLASS32,
+ [EI_DATA] = ELFDATA2LSB,
+ [EI_VERSION] = EV_CURRENT },
+ .e_type = ET_REL,
+ .e_machine = EM_386,
+ .e_version = EV_CURRENT,
+ .e_shoff = 180,
+ .e_ehsize = sizeof (Elf32_Ehdr),
+ .e_shentsize = sizeof (Elf32_Shdr),
+ .e_shnum = 3,
+ .e_shstrndx = 2
+ };
+
+
+static const char *scnnames[3] =
+ {
+ [0] = "",
+ [1] = ".data",
+ [2] = ".shstrtab"
+ };
+
+
+static const char expecteddata[] =
+ {
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x7f,
+ 0x81, 0x01, 0x81, 0x01, 0xff, 0xfe, 0xff, 0xff, 0x0f, 0xff, 0x7e, 0xfe,
+ 0x03, 0xfe, 0x03, 0x82, 0xfc, 0xff, 0xff, 0x0f, 0x82, 0x7c, 0xd0, 0x0f,
+ 0xd0, 0x0f, 0xb0, 0xf0, 0xff, 0xff, 0x0f, 0xb0, 0x70, 0xe8, 0x81, 0x02,
+ 0xe8, 0x81, 0x02, 0x98, 0xfe, 0xfd, 0xff, 0x0f, 0x98, 0xfe, 0x7d, 0xff,
+ 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0x81, 0x80, 0x80, 0xc0, 0x0f,
+ 0x81, 0x80, 0x80, 0x40, 0xff, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff,
+ 0xff, 0x07, 0x81, 0x80, 0x80, 0x80, 0x08, 0x81, 0x80, 0x80, 0x80, 0x78
+ };
+
+
+int
+main (void)
+{
+ AsmCtx_t *ctx;
+ AsmScn_t *scn;
+ int result = 0;
+ int fd;
+ Elf *elf;
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr *ehdr;
+ size_t cnt;
+
+ elf_version (EV_CURRENT);
+
+ Ebl *ebl = ebl_openbackend_machine (EM_386);
+ if (ebl == NULL)
+ {
+ puts ("cannot open backend library");
+ return 1;
+ }
+
+ ctx = asm_begin (fname, ebl, false);
+ if (ctx == NULL)
+ {
+ printf ("cannot create assembler context: %s\n", asm_errmsg (-1));
+ return 1;
+ }
+
+ /* Create two sections. */
+ scn = asm_newscn (ctx, ".data", SHT_PROGBITS, SHF_ALLOC | SHF_WRITE);
+ if (scn == NULL)
+ {
+ printf ("cannot create section in output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Special alignment for the .text section. */
+ if (asm_align (scn, 16) != 0)
+ {
+ printf ("cannot align .text section: %s\n", asm_errmsg (-1));
+ result = 1;
+ }
+
+ /* Add a few ULEB128 and SLEB128 numbers. */
+ for (cnt = 0; cnt < ninput; ++cnt)
+ {
+ if (asm_adduleb128 (scn, input[cnt]) != 0)
+ {
+ printf ("cannot insert uleb %" PRIu32 ": %s\n",
+ (uint32_t) input[cnt], asm_errmsg (-1));
+ result = 1;
+ }
+
+ if (asm_addsleb128 (scn, input[cnt]) != 0)
+ {
+ printf ("cannot insert sleb %" PRId32 ": %s\n",
+ input[cnt], asm_errmsg (-1));
+ result = 1;
+ }
+
+ if (asm_adduleb128 (scn, -input[cnt]) != 0)
+ {
+ printf ("cannot insert uleb %" PRIu32 ": %s\n",
+ (uint32_t) -input[cnt], asm_errmsg (-1));
+ result = 1;
+ }
+
+ if (asm_addsleb128 (scn, -input[cnt]) != 0)
+ {
+ printf ("cannot insert sleb %" PRId32 ": %s\n",
+ -input[cnt], asm_errmsg (-1));
+ result = 1;
+ }
+ }
+
+ /* Create the output file. */
+ if (asm_end (ctx) != 0)
+ {
+ printf ("cannot create output file: %s\n", asm_errmsg (-1));
+ asm_abort (ctx);
+ return 1;
+ }
+
+ /* Check the file. */
+ fd = open (fname, O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("cannot open generated file: %m\n");
+ result = 1;
+ goto out;
+ }
+
+ elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ result = 1;
+ goto out_close;
+ }
+ if (elf_kind (elf) != ELF_K_ELF)
+ {
+ puts ("not a valid ELF file");
+ result = 1;
+ goto out_close2;
+ }
+
+ ehdr = gelf_getehdr (elf, &ehdr_mem);
+ if (ehdr == NULL)
+ {
+ printf ("cannot get ELF header: %s\n", elf_errmsg (-1));
+ result = 1;
+ goto out_close2;
+ }
+
+ if (memcmp (ehdr, &expected_ehdr, sizeof (GElf_Ehdr)) != 0)
+ {
+ puts ("ELF header does not match");
+ result = 1;
+ goto out_close2;
+ }
+
+ for (cnt = 1; cnt < 3; ++cnt)
+ {
+ Elf_Scn *escn;
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr;
+
+ escn = elf_getscn (elf, cnt);
+ if (escn == NULL)
+ {
+ printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+
+ shdr = gelf_getshdr (escn, &shdr_mem);
+ if (shdr == NULL)
+ {
+ printf ("cannot get section header for section %Zd: %s\n",
+ cnt, elf_errmsg (-1));
+ result = 1;
+ continue;
+ }
+
+ if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
+ scnnames[cnt]) != 0)
+ {
+ printf ("section %Zd's name differs: %s vs %s\n", cnt,
+ elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
+ scnnames[cnt]);
+ result = 1;
+ }
+
+ if (shdr->sh_type != (cnt == 2 ? SHT_STRTAB : SHT_PROGBITS))
+ {
+ printf ("section %Zd's type differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE))
+ || (cnt == 2 && shdr->sh_flags != 0))
+ {
+ printf ("section %Zd's flags differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_addr != 0)
+ {
+ printf ("section %Zd's address differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt == 1 && shdr->sh_offset != ((sizeof (Elf32_Ehdr) + 15) & ~15))
+ || (cnt == 2
+ && shdr->sh_offset != (((sizeof (Elf32_Ehdr) + 15) & ~15)
+ + sizeof (expecteddata))))
+ {
+ printf ("section %Zd's offset differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt == 1 && shdr->sh_size != sizeof (expecteddata))
+ || (cnt == 2 && shdr->sh_size != 17))
+ {
+ printf ("section %Zd's size differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_link != 0)
+ {
+ printf ("section %Zd's link differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_info != 0)
+ {
+ printf ("section %Zd's info differs\n", cnt);
+ result = 1;
+ }
+
+ if ((cnt == 1 && shdr->sh_addralign != 16)
+ || (cnt != 1 && shdr->sh_addralign != 1))
+ {
+ printf ("section %Zd's addralign differs\n", cnt);
+ result = 1;
+ }
+
+ if (shdr->sh_entsize != 0)
+ {
+ printf ("section %Zd's entsize differs\n", cnt);
+ result = 1;
+ }
+
+ if (cnt == 1)
+ {
+ Elf_Data *data = elf_getdata (escn, NULL);
+
+ if (data == NULL)
+ {
+ printf ("cannot get data of section %Zd\n", cnt);
+ result = 1;
+ }
+ else
+ {
+ if (data->d_size != sizeof (expecteddata))
+ {
+ printf ("data block size of section %Zd wrong: got %Zd, "
+ "expected 96\n", cnt, data->d_size);
+ result = 1;
+ }
+
+ if (memcmp (data->d_buf, expecteddata, sizeof (expecteddata))
+ != 0)
+ {
+ printf ("data block content of section %Zd wrong\n", cnt);
+ result = 1;
+ }
+ }
+ }
+ }
+
+ out_close2:
+ elf_end (elf);
+ out_close:
+ close (fd);
+ out:
+ /* We don't need the file anymore. */
+ unlink (fname);
+
+ ebl_closebackend (ebl);
+
+ return result;
+}
diff --git a/src/tests/backtrace-child.c b/src/tests/backtrace-child.c
new file mode 100644
index 00000000..788801c3
--- /dev/null
+++ b/src/tests/backtrace-child.c
@@ -0,0 +1,240 @@
+/* Test child for parent backtrace test.
+ Copyright (C) 2013 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Command line syntax: ./backtrace-child [--ptraceme|--gencore]
+ --ptraceme will call ptrace (PTRACE_TRACEME) in the two threads.
+ --gencore will call abort () at its end.
+ Main thread will signal SIGUSR2. Other thread will signal SIGUSR1.
+ On x86_64 only:
+ PC will get changed to function 'jmp' by backtrace.c function
+ prepare_thread. Then SIGUSR2 will be signalled to backtrace-child
+ which will invoke function sigusr2.
+ This is all done so that signal interrupts execution of the very first
+ instruction of a function. Properly handled unwind should not slip into
+ the previous unrelated function.
+ The tested functionality is arch-independent but the code reproducing it
+ has to be arch-specific.
+ On non-x86_64:
+ sigusr2 gets called by normal function call from function stdarg.
+ On any arch then sigusr2 calls raise (SIGUSR1) for --ptraceme.
+ abort () is called otherwise, expected for --gencore core dump.
+
+ Expected x86_64 output:
+ TID 10276:
+ # 0 0x7f7ab61e9e6b raise
+ # 1 0x7f7ab661af47 - 1 main
+ # 2 0x7f7ab5e3bb45 - 1 __libc_start_main
+ # 3 0x7f7ab661aa09 - 1 _start
+ TID 10278:
+ # 0 0x7f7ab61e9e6b raise
+ # 1 0x7f7ab661ab3c - 1 sigusr2
+ # 2 0x7f7ab5e4fa60 __restore_rt
+ # 3 0x7f7ab661ab47 jmp
+ # 4 0x7f7ab661ac92 - 1 stdarg
+ # 5 0x7f7ab661acba - 1 backtracegen
+ # 6 0x7f7ab661acd1 - 1 start
+ # 7 0x7f7ab61e2c53 - 1 start_thread
+ # 8 0x7f7ab5f0fdbd - 1 __clone
+
+ Expected non-x86_64 (i386) output; __kernel_vsyscall are skipped if found:
+ TID 10408:
+ # 0 0xf779f430 __kernel_vsyscall
+ # 1 0xf7771466 - 1 raise
+ # 2 0xf77c1d07 - 1 main
+ # 3 0xf75bd963 - 1 __libc_start_main
+ # 4 0xf77c1761 - 1 _start
+ TID 10412:
+ # 0 0xf779f430 __kernel_vsyscall
+ # 1 0xf7771466 - 1 raise
+ # 2 0xf77c18f4 - 1 sigusr2
+ # 3 0xf77c1a10 - 1 stdarg
+ # 4 0xf77c1a2c - 1 backtracegen
+ # 5 0xf77c1a48 - 1 start
+ # 6 0xf77699da - 1 start_thread
+ # 7 0xf769bbfe - 1 __clone
+ */
+
+#include <config.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <errno.h>
+#include <sys/ptrace.h>
+#include <string.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#ifndef __linux__
+
+int
+main (int argc __attribute__ ((unused)), char **argv)
+{
+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
+ argv[0]);
+ return 77;
+}
+
+#else /* __linux__ */
+
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+#define NOINLINE_NOCLONE __attribute__ ((noinline, noclone))
+#else
+#define NOINLINE_NOCLONE __attribute__ ((noinline))
+#endif
+
+#define NORETURN __attribute__ ((noreturn))
+#define UNUSED __attribute__ ((unused))
+#define USED __attribute__ ((used))
+
+static int ptraceme, gencore;
+
+/* Execution will arrive here from jmp by an artificial ptrace-spawn signal. */
+
+static NOINLINE_NOCLONE void
+sigusr2 (int signo)
+{
+ assert (signo == SIGUSR2);
+ if (! gencore)
+ {
+ raise (SIGUSR1);
+ /* Do not return as stack may be invalid due to ptrace-patched PC to the
+ jmp function. */
+ pthread_exit (NULL);
+ /* Not reached. */
+ abort ();
+ }
+ /* Here we dump the core for --gencore. */
+ raise (SIGABRT);
+ /* Avoid tail call optimization for the raise call. */
+ asm volatile ("");
+}
+
+static NOINLINE_NOCLONE void
+dummy1 (void)
+{
+ asm volatile ("");
+}
+
+#ifdef __x86_64__
+static NOINLINE_NOCLONE USED void
+jmp (void)
+{
+ /* Not reached, signal will get ptrace-spawn to jump into sigusr2. */
+ abort ();
+}
+#endif
+
+static NOINLINE_NOCLONE void
+dummy2 (void)
+{
+ asm volatile ("");
+}
+
+static NOINLINE_NOCLONE NORETURN void
+stdarg (int f UNUSED, ...)
+{
+ sighandler_t sigusr2_orig = signal (SIGUSR2, sigusr2);
+ assert (sigusr2_orig == SIG_DFL);
+ errno = 0;
+ if (ptraceme)
+ {
+ long l = ptrace (PTRACE_TRACEME, 0, NULL, NULL);
+ assert_perror (errno);
+ assert (l == 0);
+ }
+#ifdef __x86_64__
+ if (! gencore)
+ {
+ /* Execution will get PC patched into function jmp. */
+ raise (SIGUSR1);
+ }
+#endif
+ sigusr2 (SIGUSR2);
+ /* Not reached. */
+ abort ();
+}
+
+static NOINLINE_NOCLONE void
+dummy3 (void)
+{
+ asm volatile ("");
+}
+
+static NOINLINE_NOCLONE void
+backtracegen (void)
+{
+ stdarg (1);
+ /* Here should be no instruction after the stdarg call as it is noreturn
+ function. It must be stdarg so that it is a call and not jump (jump as
+ a tail-call). */
+}
+
+static NOINLINE_NOCLONE void
+dummy4 (void)
+{
+ asm volatile ("");
+}
+
+static void *
+start (void *arg UNUSED)
+{
+ backtracegen ();
+ /* Not reached. */
+ abort ();
+}
+
+int
+main (int argc UNUSED, char **argv)
+{
+ setbuf (stdout, NULL);
+ assert (*argv++);
+ ptraceme = (*argv && strcmp (*argv, "--ptraceme") == 0);
+ argv += ptraceme;
+ gencore = (*argv && strcmp (*argv, "--gencore") == 0);
+ argv += gencore;
+ assert (!*argv);
+ /* These dummy* functions are there so that each of their surrounding
+ functions has some unrelated code around. The purpose of some of the
+ tests is verify unwinding the very first / after the very last instruction
+ does not inappropriately slip into the unrelated code around. */
+ dummy1 ();
+ dummy2 ();
+ dummy3 ();
+ dummy4 ();
+ if (gencore)
+ printf ("%ld\n", (long) getpid ());
+ pthread_t thread;
+ int i = pthread_create (&thread, NULL, start, NULL);
+ // pthread_* functions do not set errno.
+ assert (i == 0);
+ if (ptraceme)
+ {
+ errno = 0;
+ long l = ptrace (PTRACE_TRACEME, 0, NULL, NULL);
+ assert_perror (errno);
+ assert (l == 0);
+ }
+ if (gencore)
+ pthread_join (thread, NULL);
+ else
+ raise (SIGUSR2);
+ return 0;
+}
+
+#endif /* ! __linux__ */
+
diff --git a/src/tests/backtrace-data.c b/src/tests/backtrace-data.c
new file mode 100644
index 00000000..01c1c004
--- /dev/null
+++ b/src/tests/backtrace-data.c
@@ -0,0 +1,328 @@
+/* Test custom provided Dwfl_Thread_Callbacks vector.
+ Copyright (C) 2013 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Test custom provided Dwfl_Thread_Callbacks vector. Test mimics what
+ a ptrace based vector would do. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <locale.h>
+#include <dirent.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <error.h>
+#include <unistd.h>
+#include <dwarf.h>
+#include <sys/resource.h>
+#include <sys/ptrace.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/user.h>
+#include <fcntl.h>
+#include <string.h>
+#include ELFUTILS_HEADER(dwfl)
+
+#if !defined(__x86_64__) || !defined(__linux__)
+
+int
+main (int argc __attribute__ ((unused)), char **argv)
+{
+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
+ argv[0]);
+ return 77;
+}
+
+#else /* __x86_64__ && __linux__ */
+
+/* The only arch specific code is set_initial_registers. */
+
+static int
+find_elf (Dwfl_Module *mod __attribute__ ((unused)),
+ void **userdata __attribute__ ((unused)),
+ const char *modname __attribute__ ((unused)),
+ Dwarf_Addr base __attribute__ ((unused)),
+ char **file_name __attribute__ ((unused)),
+ Elf **elfp __attribute__ ((unused)))
+{
+ /* Not used as modules are reported explicitly. */
+ assert (0);
+}
+
+static bool
+memory_read (Dwfl *dwfl, Dwarf_Addr addr, Dwarf_Word *result,
+ void *dwfl_arg __attribute__ ((unused)))
+{
+ pid_t child = dwfl_pid (dwfl);
+
+ errno = 0;
+ long l = ptrace (PTRACE_PEEKDATA, child, (void *) (uintptr_t) addr, NULL);
+ assert_perror (errno);
+ *result = l;
+
+ /* We could also return false for failed ptrace. */
+ return true;
+}
+
+/* Return filename and VMA address *BASEP where its mapping starts which
+ contains ADDR. */
+
+static char *
+maps_lookup (pid_t pid, Dwarf_Addr addr, GElf_Addr *basep)
+{
+ char *fname;
+ int i = asprintf (&fname, "/proc/%ld/maps", (long) pid);
+ assert_perror (errno);
+ assert (i > 0);
+ FILE *f = fopen (fname, "r");
+ assert_perror (errno);
+ assert (f);
+ free (fname);
+ for (;;)
+ {
+ // 37e3c22000-37e3c23000 rw-p 00022000 00:11 49532 /lib64/ld-2.14.90.so */
+ unsigned long start, end, offset;
+ i = fscanf (f, "%lx-%lx %*s %lx %*x:%*x %*x", &start, &end, &offset);
+ assert_perror (errno);
+ assert (i == 3);
+ char *filename = strdup ("");
+ assert (filename);
+ size_t filename_len = 0;
+ for (;;)
+ {
+ int c = fgetc (f);
+ assert (c != EOF);
+ if (c == '\n')
+ break;
+ if (c == ' ' && *filename == '\0')
+ continue;
+ filename = realloc (filename, filename_len + 2);
+ assert (filename);
+ filename[filename_len++] = c;
+ filename[filename_len] = '\0';
+ }
+ if (start <= addr && addr < end)
+ {
+ i = fclose (f);
+ assert_perror (errno);
+ assert (i == 0);
+
+ *basep = start - offset;
+ return filename;
+ }
+ free (filename);
+ }
+}
+
+/* Add module containing ADDR to the DWFL address space.
+
+ dwfl_report_elf call here violates Dwfl manipulation as one should call
+ dwfl_report only between dwfl_report_begin_add and dwfl_report_end.
+ Current elfutils implementation does not mind as dwfl_report_begin_add is
+ empty. */
+
+static Dwfl_Module *
+report_module (Dwfl *dwfl, pid_t child, Dwarf_Addr addr)
+{
+ GElf_Addr base;
+ char *long_name = maps_lookup (child, addr, &base);
+ Dwfl_Module *mod = dwfl_report_elf (dwfl, long_name, long_name, -1,
+ base, false /* add_p_vaddr */);
+ assert (mod);
+ free (long_name);
+ assert (dwfl_addrmodule (dwfl, addr) == mod);
+ return mod;
+}
+
+static pid_t
+next_thread (Dwfl *dwfl, void *dwfl_arg __attribute__ ((unused)),
+ void **thread_argp)
+{
+ if (*thread_argp != NULL)
+ return 0;
+ /* Put arbitrary non-NULL value into *THREAD_ARGP as a marker so that this
+ function returns non-zero PID only once. */
+ *thread_argp = thread_argp;
+ return dwfl_pid (dwfl);
+}
+
+static bool
+set_initial_registers (Dwfl_Thread *thread,
+ void *thread_arg __attribute__ ((unused)))
+{
+ pid_t child = dwfl_pid (dwfl_thread_dwfl (thread));
+
+ struct user_regs_struct user_regs;
+ long l = ptrace (PTRACE_GETREGS, child, NULL, &user_regs);
+ assert_perror (errno);
+ assert (l == 0);
+
+ Dwarf_Word dwarf_regs[17];
+ dwarf_regs[0] = user_regs.rax;
+ dwarf_regs[1] = user_regs.rdx;
+ dwarf_regs[2] = user_regs.rcx;
+ dwarf_regs[3] = user_regs.rbx;
+ dwarf_regs[4] = user_regs.rsi;
+ dwarf_regs[5] = user_regs.rdi;
+ dwarf_regs[6] = user_regs.rbp;
+ dwarf_regs[7] = user_regs.rsp;
+ dwarf_regs[8] = user_regs.r8;
+ dwarf_regs[9] = user_regs.r9;
+ dwarf_regs[10] = user_regs.r10;
+ dwarf_regs[11] = user_regs.r11;
+ dwarf_regs[12] = user_regs.r12;
+ dwarf_regs[13] = user_regs.r13;
+ dwarf_regs[14] = user_regs.r14;
+ dwarf_regs[15] = user_regs.r15;
+ dwarf_regs[16] = user_regs.rip;
+ bool ok = dwfl_thread_state_registers (thread, 0, 17, dwarf_regs);
+ assert (ok);
+
+ /* x86_64 has PC contained in its CFI subset of DWARF register set so
+ elfutils will figure out the real PC value from REGS.
+ So no need to explicitly call dwfl_thread_state_register_pc. */
+
+ return true;
+}
+
+static const Dwfl_Thread_Callbacks callbacks =
+{
+ next_thread,
+ NULL, /* get_thread */
+ memory_read,
+ set_initial_registers,
+ NULL, /* detach */
+ NULL, /* thread_detach */
+};
+
+static int
+frame_callback (Dwfl_Frame *state, void *arg)
+{
+ unsigned *framenop = arg;
+ Dwarf_Addr pc;
+ bool isactivation;
+ if (! dwfl_frame_pc (state, &pc, &isactivation))
+ {
+ error (1, 0, "%s", dwfl_errmsg (-1));
+ return 1;
+ }
+ Dwarf_Addr pc_adjusted = pc - (isactivation ? 0 : 1);
+
+ /* Get PC->SYMNAME. */
+ Dwfl *dwfl = dwfl_thread_dwfl (dwfl_frame_thread (state));
+ Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc_adjusted);
+ if (mod == NULL)
+ mod = report_module (dwfl, dwfl_pid (dwfl), pc_adjusted);
+ const char *symname = NULL;
+ symname = dwfl_module_addrname (mod, pc_adjusted);
+
+ printf ("#%2u %#" PRIx64 "%4s\t%s\n", (*framenop)++, (uint64_t) pc,
+ ! isactivation ? "- 1" : "", symname);
+ return DWARF_CB_OK;
+}
+
+static int
+thread_callback (Dwfl_Thread *thread, void *thread_arg __attribute__ ((unused)))
+{
+ unsigned frameno = 0;
+ switch (dwfl_thread_getframes (thread, frame_callback, &frameno))
+ {
+ case 0:
+ break;
+ case -1:
+ error (1, 0, "dwfl_thread_getframes: %s", dwfl_errmsg (-1));
+ default:
+ abort ();
+ }
+ return DWARF_CB_OK;
+}
+
+int
+main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)))
+{
+ /* We use no threads here which can interfere with handling a stream. */
+ __fsetlocking (stdin, FSETLOCKING_BYCALLER);
+ __fsetlocking (stdout, FSETLOCKING_BYCALLER);
+ __fsetlocking (stderr, FSETLOCKING_BYCALLER);
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ elf_version (EV_CURRENT);
+
+ pid_t child = fork ();
+ switch (child)
+ {
+ case -1:
+ assert_perror (errno);
+ assert (0);
+ case 0:;
+ long l = ptrace (PTRACE_TRACEME, 0, NULL, NULL);
+ assert_perror (errno);
+ assert (l == 0);
+ raise (SIGUSR1);
+ return 0;
+ default:
+ break;
+ }
+
+ int status;
+ pid_t pid = waitpid (child, &status, 0);
+ assert_perror (errno);
+ assert (pid == child);
+ assert (WIFSTOPPED (status));
+ assert (WSTOPSIG (status) == SIGUSR1);
+
+ static char *debuginfo_path;
+ static const Dwfl_Callbacks offline_callbacks =
+ {
+ .find_debuginfo = dwfl_standard_find_debuginfo,
+ .debuginfo_path = &debuginfo_path,
+ .section_address = dwfl_offline_section_address,
+ .find_elf = find_elf,
+ };
+ Dwfl *dwfl = dwfl_begin (&offline_callbacks);
+ assert (dwfl);
+
+ struct user_regs_struct user_regs;
+ long l = ptrace (PTRACE_GETREGS, child, NULL, &user_regs);
+ assert_perror (errno);
+ assert (l == 0);
+ report_module (dwfl, child, user_regs.rip);
+
+ bool ok = dwfl_attach_state (dwfl, EM_NONE, child, &callbacks, NULL);
+ assert (ok);
+
+ /* Multiple threads are not handled here. */
+ int err = dwfl_getthreads (dwfl, thread_callback, NULL);
+ assert (! err);
+
+ dwfl_end (dwfl);
+ kill (child, SIGKILL);
+ pid = waitpid (child, &status, 0);
+ assert_perror (errno);
+ assert (pid == child);
+ assert (WIFSIGNALED (status));
+ assert (WTERMSIG (status) == SIGKILL);
+
+ return EXIT_SUCCESS;
+}
+
+#endif /* x86_64 */
diff --git a/src/tests/backtrace-dwarf.c b/src/tests/backtrace-dwarf.c
new file mode 100644
index 00000000..87d088aa
--- /dev/null
+++ b/src/tests/backtrace-dwarf.c
@@ -0,0 +1,165 @@
+/* Test program for unwinding of complicated DWARF expressions.
+ Copyright (C) 2013 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <signal.h>
+#include <inttypes.h>
+#include <stdio_ext.h>
+#include <locale.h>
+#include <errno.h>
+#include <sys/ptrace.h>
+#include ELFUTILS_HEADER(dwfl)
+
+#ifndef __linux__
+
+int
+main (int argc __attribute__ ((unused)), char **argv)
+{
+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
+ argv[0]);
+ return 77;
+}
+
+#else /* __linux__ */
+
+static void cleanup_13_abort (void);
+#define main cleanup_13_main
+#include "cleanup-13.c"
+#undef main
+
+static void
+report_pid (Dwfl *dwfl, pid_t pid)
+{
+ int result = dwfl_linux_proc_report (dwfl, pid);
+ if (result < 0)
+ error (2, 0, "dwfl_linux_proc_report: %s", dwfl_errmsg (-1));
+ else if (result > 0)
+ error (2, result, "dwfl_linux_proc_report");
+
+ if (dwfl_report_end (dwfl, NULL, NULL) != 0)
+ error (2, 0, "dwfl_report_end: %s", dwfl_errmsg (-1));
+
+ result = dwfl_linux_proc_attach (dwfl, pid, true);
+ if (result < 0)
+ error (2, 0, "dwfl_linux_proc_attach: %s", dwfl_errmsg (-1));
+ else if (result > 0)
+ error (2, result, "dwfl_linux_proc_attach");
+}
+
+static Dwfl *
+pid_to_dwfl (pid_t pid)
+{
+ static char *debuginfo_path;
+ static const Dwfl_Callbacks proc_callbacks =
+ {
+ .find_debuginfo = dwfl_standard_find_debuginfo,
+ .debuginfo_path = &debuginfo_path,
+
+ .find_elf = dwfl_linux_proc_find_elf,
+ };
+ Dwfl *dwfl = dwfl_begin (&proc_callbacks);
+ if (dwfl == NULL)
+ error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1));
+ report_pid (dwfl, pid);
+ return dwfl;
+}
+
+static int
+frame_callback (Dwfl_Frame *state, void *frame_arg)
+{
+ Dwarf_Addr pc;
+ bool isactivation;
+ if (! dwfl_frame_pc (state, &pc, &isactivation))
+ {
+ error (0, 0, "%s", dwfl_errmsg (-1));
+ return DWARF_CB_ABORT;
+ }
+ Dwarf_Addr pc_adjusted = pc - (isactivation ? 0 : 1);
+
+ /* Get PC->SYMNAME. */
+ Dwfl_Thread *thread = dwfl_frame_thread (state);
+ Dwfl *dwfl = dwfl_thread_dwfl (thread);
+ Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc_adjusted);
+ const char *symname = NULL;
+ if (mod)
+ symname = dwfl_module_addrname (mod, pc_adjusted);
+
+ printf ("%#" PRIx64 "\t%s\n", (uint64_t) pc, symname);
+
+ if (symname && (strcmp (symname, "main") == 0
+ || strcmp (symname, ".main") == 0))
+ {
+ kill (dwfl_pid (dwfl), SIGKILL);
+ exit (0);
+ }
+
+ return DWARF_CB_OK;
+}
+
+static int
+thread_callback (Dwfl_Thread *thread, void *thread_arg)
+{
+ dwfl_thread_getframes (thread, frame_callback, NULL);
+ error (1, 0, "dwfl_thread_getframes: %s", dwfl_errmsg (-1));
+}
+
+int
+main (int argc __attribute__ ((unused)), char **argv)
+{
+ /* We use no threads here which can interfere with handling a stream. */
+ __fsetlocking (stdin, FSETLOCKING_BYCALLER);
+ __fsetlocking (stdout, FSETLOCKING_BYCALLER);
+ __fsetlocking (stderr, FSETLOCKING_BYCALLER);
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ elf_version (EV_CURRENT);
+
+ pid_t pid = fork ();
+ switch (pid)
+ {
+ case -1:
+ abort ();
+ case 0:;
+ long l = ptrace (PTRACE_TRACEME, 0, NULL, NULL);
+ assert_perror (errno);
+ assert (l == 0);
+ cleanup_13_main ();
+ abort ();
+ default:
+ break;
+ }
+
+ errno = 0;
+ int status;
+ pid_t got = waitpid (pid, &status, 0);
+ assert_perror (errno);
+ assert (got == pid);
+ assert (WIFSTOPPED (status));
+ assert (WSTOPSIG (status) == SIGABRT);
+
+ Dwfl *dwfl = pid_to_dwfl (pid);
+ dwfl_getthreads (dwfl, thread_callback, NULL);
+
+ /* There is an exit (0) call if we find the "main" frame, */
+ error (1, 0, "dwfl_getthreads: %s", dwfl_errmsg (-1));
+}
+
+#endif /* ! __linux__ */
+
diff --git a/src/tests/backtrace-subr.sh b/src/tests/backtrace-subr.sh
new file mode 100644
index 00000000..f04721cf
--- /dev/null
+++ b/src/tests/backtrace-subr.sh
@@ -0,0 +1,152 @@
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Verify one of the backtraced threads contains function 'main'.
+check_main()
+{
+ if grep -w main $1; then
+ return
+ fi
+ echo >&2 $2: no main
+ false
+}
+
+# Without proper ELF symbols resolution we could get inappropriate weak
+# symbol "gsignal" with the same address as the correct symbol "raise".
+# It was fixed by GIT commit 78dec228b3cfb2f9300cd0b682ebf416c9674c91 .
+# [patch] Improve ELF symbols preference (global > weak)
+# https://lists.fedorahosted.org/pipermail/elfutils-devel/2012-October/002624.html
+check_gsignal()
+{
+ if ! grep -w gsignal $1; then
+ return
+ fi
+ echo >&2 $2: found gsignal
+ false
+}
+
+# Verify the STDERR output does not contain unexpected errors.
+# In some cases we cannot reliably find out we got behind _start as some
+# operating system do not properly terminate CFI by undefined PC.
+# Ignore it here as it is a bug of OS, not a bug of elfutils.
+check_err()
+{
+ if [ $(egrep -v <$1 'dwfl_thread_getframes: (No DWARF information found|no matching address range)$' \
+ | wc -c) \
+ -eq 0 ]
+ then
+ return
+ fi
+ echo >&2 $2: neither empty nor just out of DWARF
+ false
+}
+
+check_all()
+{
+ bt=$1
+ err=$2
+ testname=$3
+ check_main $bt $testname
+ check_gsignal $bt $testname
+ check_err $err $testname
+}
+
+check_unsupported()
+{
+ err=$1
+ testname=$2
+ if grep -q ': Unwinding not supported for this architecture$' $err; then
+ echo >&2 $testname: arch not supported
+ exit 77
+ fi
+}
+
+check_native_unsupported()
+{
+ err=$1
+ testname=$2
+ check_unsupported $err $testname
+
+ # ARM is special. It is supported, but it doesn't use .eh_frame by default
+ # making the native tests fail unless debuginfo (for glibc) is installed
+ # and we can fall back on .debug_frame for the CFI.
+ case "`uname -m`" in
+ arm* )
+ if egrep 'dwfl_thread_getframes(.*)No DWARF information found' $err; then
+ echo >&2 $testname: arm needs debuginfo installed for all libraries
+ exit 77
+ fi
+ ;;
+ esac
+}
+
+check_core()
+{
+ arch=$1
+ testfiles backtrace.$arch.{exec,core}
+ tempfiles backtrace.$arch.{bt,err}
+ echo ./backtrace ./backtrace.$arch.{exec,core}
+ testrun ${abs_builddir}/backtrace -e ./backtrace.$arch.exec --core=./backtrace.$arch.core 1>backtrace.$arch.bt 2>backtrace.$arch.err || true
+ cat backtrace.$arch.{bt,err}
+ check_unsupported backtrace.$arch.err backtrace.$arch.core
+ check_all backtrace.$arch.{bt,err} backtrace.$arch.core
+}
+
+# Backtrace live process.
+# Do not abort on non-zero exit code due to some warnings of ./backtrace
+# - see function check_err.
+check_native()
+{
+ child=$1
+ tempfiles $child.{bt,err}
+ (set +ex; testrun ${abs_builddir}/backtrace --backtrace-exec=${abs_builddir}/$child 1>$child.bt 2>$child.err; true)
+ cat $child.{bt,err}
+ check_native_unsupported $child.err $child
+ check_all $child.{bt,err} $child
+}
+
+# Backtrace core file.
+check_native_core()
+{
+ child=$1
+
+ # Disable valgrind while dumping core.
+ SAVED_VALGRIND_CMD="$VALGRIND_CMD"
+ unset VALGRIND_CMD
+
+ # Skip the test if we cannot adjust core ulimit.
+ core="core.`ulimit -c unlimited || exit 77; set +ex; testrun ${abs_builddir}/$child --gencore; true`"
+ # see if /proc/sys/kernel/core_uses_pid is set to 0
+ if [ -f core ]; then
+ mv core "$core"
+ fi
+ if [ ! -f "$core" ]; then exit 77; fi
+
+ if [ "x$SAVED_VALGRIND_CMD" != "x" ]; then
+ VALGRIND_CMD="$SAVED_VALGRIND_CMD"
+ export VALGRIND_CMD
+ fi
+
+ # Do not abort on non-zero exit code due to some warnings of ./backtrace
+ # - see function check_err.
+ tempfiles $core{,.{bt,err}}
+ (set +ex; testrun ${abs_builddir}/backtrace -e ${abs_builddir}/$child --core=$core 1>$core.bt 2>$core.err; true)
+ cat $core.{bt,err}
+ check_native_unsupported $core.err $child-$core
+ check_all $core.{bt,err} $child-$core
+}
diff --git a/src/tests/backtrace.aarch64.core.bz2 b/src/tests/backtrace.aarch64.core.bz2
new file mode 100644
index 00000000..3082a5ac
--- /dev/null
+++ b/src/tests/backtrace.aarch64.core.bz2
Binary files differ
diff --git a/src/tests/backtrace.aarch64.exec.bz2 b/src/tests/backtrace.aarch64.exec.bz2
new file mode 100755
index 00000000..66216b52
--- /dev/null
+++ b/src/tests/backtrace.aarch64.exec.bz2
Binary files differ
diff --git a/src/tests/backtrace.c b/src/tests/backtrace.c
new file mode 100644
index 00000000..331ba0f2
--- /dev/null
+++ b/src/tests/backtrace.c
@@ -0,0 +1,479 @@
+/* Test program for unwinding of frames.
+ Copyright (C) 2013, 2014 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <locale.h>
+#include <dirent.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <error.h>
+#include <unistd.h>
+#include <dwarf.h>
+#include <sys/resource.h>
+#include <sys/ptrace.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/user.h>
+#include <fcntl.h>
+#include <string.h>
+#include <argp.h>
+#include ELFUTILS_HEADER(dwfl)
+
+#ifndef __linux__
+
+int
+main (int argc __attribute__ ((unused)), char **argv)
+{
+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
+ argv[0]);
+ return 77;
+}
+
+#else /* __linux__ */
+
+static int
+dump_modules (Dwfl_Module *mod, void **userdata __attribute__ ((unused)),
+ const char *name, Dwarf_Addr start,
+ void *arg __attribute__ ((unused)))
+{
+ Dwarf_Addr end;
+ dwfl_module_info (mod, NULL, NULL, &end, NULL, NULL, NULL, NULL);
+ printf ("%#" PRIx64 "\t%#" PRIx64 "\t%s\n", (uint64_t) start, (uint64_t) end,
+ name);
+ return DWARF_CB_OK;
+}
+
+static bool is_x86_64_native;
+static pid_t check_tid;
+
+static void
+callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
+ const char *symname, Dwfl *dwfl)
+{
+ static bool seen_main = false;
+ if (symname && *symname == '.')
+ symname++;
+ if (symname && strcmp (symname, "main") == 0)
+ seen_main = true;
+ if (pc == 0)
+ {
+ assert (seen_main);
+ return;
+ }
+ if (check_tid == 0)
+ check_tid = tid;
+ if (tid != check_tid)
+ {
+ // For the main thread we are only interested if we can unwind till
+ // we see the "main" symbol.
+ return;
+ }
+ Dwfl_Module *mod;
+ static bool reduce_frameno = false;
+ if (reduce_frameno)
+ frameno--;
+ if (! is_x86_64_native && frameno >= 2)
+ frameno += 2;
+ const char *symname2 = NULL;
+ switch (frameno)
+ {
+ case 0:
+ if (! reduce_frameno && symname
+ && (strcmp (symname, "__kernel_vsyscall") == 0
+ || strcmp (symname, "__libc_do_syscall") == 0))
+ reduce_frameno = true;
+ else
+ assert (symname && strcmp (symname, "raise") == 0);
+ break;
+ case 1:
+ assert (symname != NULL && strcmp (symname, "sigusr2") == 0);
+ break;
+ case 2: // x86_64 only
+ /* __restore_rt - glibc maybe does not have to have this symbol. */
+ break;
+ case 3: // x86_64 only
+ if (is_x86_64_native)
+ {
+ /* Verify we trapped on the very first instruction of jmp. */
+ assert (symname != NULL && strcmp (symname, "jmp") == 0);
+ mod = dwfl_addrmodule (dwfl, pc - 1);
+ if (mod)
+ symname2 = dwfl_module_addrname (mod, pc - 1);
+ assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
+ break;
+ }
+ /* PASSTHRU */
+ case 4:
+ assert (symname != NULL && strcmp (symname, "stdarg") == 0);
+ break;
+ case 5:
+ /* Verify we trapped on the very last instruction of child. */
+ assert (symname != NULL && strcmp (symname, "backtracegen") == 0);
+ mod = dwfl_addrmodule (dwfl, pc);
+ if (mod)
+ symname2 = dwfl_module_addrname (mod, pc);
+
+ // Note that the following assert might in theory even fail on x86_64,
+ // there is no guarantee that the compiler doesn't reorder the
+ // instructions or even inserts some padding instructions at the end
+ // (which apparently happens on ppc64).
+ if (is_x86_64_native)
+ assert (symname2 == NULL || strcmp (symname2, "backtracegen") != 0);
+ break;
+ }
+}
+
+static int
+frame_callback (Dwfl_Frame *state, void *frame_arg)
+{
+ int *framenop = frame_arg;
+ Dwarf_Addr pc;
+ bool isactivation;
+
+ if (*framenop > 16)
+ {
+ error (0, 0, "Too many frames: %d\n", *framenop);
+ return DWARF_CB_ABORT;
+ }
+
+ if (! dwfl_frame_pc (state, &pc, &isactivation))
+ {
+ error (0, 0, "%s", dwfl_errmsg (-1));
+ return DWARF_CB_ABORT;
+ }
+ Dwarf_Addr pc_adjusted = pc - (isactivation ? 0 : 1);
+
+ /* Get PC->SYMNAME. */
+ Dwfl_Thread *thread = dwfl_frame_thread (state);
+ Dwfl *dwfl = dwfl_thread_dwfl (thread);
+ Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc_adjusted);
+ const char *symname = NULL;
+ if (mod)
+ symname = dwfl_module_addrname (mod, pc_adjusted);
+
+ printf ("#%2d %#" PRIx64 "%4s\t%s\n", *framenop, (uint64_t) pc,
+ ! isactivation ? "- 1" : "", symname);
+ pid_t tid = dwfl_thread_tid (thread);
+ callback_verify (tid, *framenop, pc, symname, dwfl);
+ (*framenop)++;
+
+ return DWARF_CB_OK;
+}
+
+static int
+thread_callback (Dwfl_Thread *thread, void *thread_arg __attribute__((unused)))
+{
+ printf ("TID %ld:\n", (long) dwfl_thread_tid (thread));
+ int frameno = 0;
+ switch (dwfl_thread_getframes (thread, frame_callback, &frameno))
+ {
+ case 0:
+ break;
+ case DWARF_CB_ABORT:
+ return DWARF_CB_ABORT;
+ case -1:
+ error (0, 0, "dwfl_thread_getframes: %s", dwfl_errmsg (-1));
+ /* All platforms do not have yet proper unwind termination. */
+ break;
+ default:
+ abort ();
+ }
+ return DWARF_CB_OK;
+}
+
+static void
+dump (Dwfl *dwfl)
+{
+ ptrdiff_t ptrdiff = dwfl_getmodules (dwfl, dump_modules, NULL, 0);
+ assert (ptrdiff == 0);
+ bool err = false;
+ switch (dwfl_getthreads (dwfl, thread_callback, NULL))
+ {
+ case 0:
+ break;
+ case DWARF_CB_ABORT:
+ err = true;
+ break;
+ case -1:
+ error (0, 0, "dwfl_getthreads: %s", dwfl_errmsg (-1));
+ err = true;
+ break;
+ default:
+ abort ();
+ }
+ callback_verify (0, 0, 0, NULL, dwfl);
+ if (err)
+ exit (EXIT_FAILURE);
+}
+
+struct see_exec_module
+{
+ Dwfl_Module *mod;
+ char selfpath[PATH_MAX + 1];
+};
+
+static int
+see_exec_module (Dwfl_Module *mod, void **userdata __attribute__ ((unused)),
+ const char *name __attribute__ ((unused)),
+ Dwarf_Addr start __attribute__ ((unused)), void *arg)
+{
+ struct see_exec_module *data = arg;
+ if (strcmp (name, data->selfpath) != 0)
+ return DWARF_CB_OK;
+ assert (data->mod == NULL);
+ data->mod = mod;
+ return DWARF_CB_OK;
+}
+
+/* On x86_64 only:
+ PC will get changed to function 'jmp' by backtrace.c function
+ prepare_thread. Then SIGUSR2 will be signalled to backtrace-child
+ which will invoke function sigusr2.
+ This is all done so that signal interrupts execution of the very first
+ instruction of a function. Properly handled unwind should not slip into
+ the previous unrelated function. */
+
+static void
+prepare_thread (pid_t pid2 __attribute__ ((unused)),
+ void (*jmp) (void) __attribute__ ((unused)))
+{
+#ifndef __x86_64__
+ abort ();
+#else /* x86_64 */
+ long l;
+ errno = 0;
+ l = ptrace (PTRACE_POKEUSER, pid2,
+ (void *) (intptr_t) offsetof (struct user_regs_struct, rip), jmp);
+ assert_perror (errno);
+ assert (l == 0);
+ l = ptrace (PTRACE_CONT, pid2, NULL, (void *) (intptr_t) SIGUSR2);
+ int status;
+ pid_t got = waitpid (pid2, &status, __WALL);
+ assert_perror (errno);
+ assert (got == pid2);
+ assert (WIFSTOPPED (status));
+ assert (WSTOPSIG (status) == SIGUSR1);
+#endif /* __x86_64__ */
+}
+
+#include <asm/unistd.h>
+#include <unistd.h>
+#define tgkill(pid, tid, sig) syscall (__NR_tgkill, (pid), (tid), (sig))
+
+static void
+report_pid (Dwfl *dwfl, pid_t pid)
+{
+ int result = dwfl_linux_proc_report (dwfl, pid);
+ if (result < 0)
+ error (2, 0, "dwfl_linux_proc_report: %s", dwfl_errmsg (-1));
+ else if (result > 0)
+ error (2, result, "dwfl_linux_proc_report");
+
+ if (dwfl_report_end (dwfl, NULL, NULL) != 0)
+ error (2, 0, "dwfl_report_end: %s", dwfl_errmsg (-1));
+
+ result = dwfl_linux_proc_attach (dwfl, pid, true);
+ if (result < 0)
+ error (2, 0, "dwfl_linux_proc_attach: %s", dwfl_errmsg (-1));
+ else if (result > 0)
+ error (2, result, "dwfl_linux_proc_attach");
+}
+
+static Dwfl *
+pid_to_dwfl (pid_t pid)
+{
+ static char *debuginfo_path;
+ static const Dwfl_Callbacks proc_callbacks =
+ {
+ .find_debuginfo = dwfl_standard_find_debuginfo,
+ .debuginfo_path = &debuginfo_path,
+
+ .find_elf = dwfl_linux_proc_find_elf,
+ };
+ Dwfl *dwfl = dwfl_begin (&proc_callbacks);
+ if (dwfl == NULL)
+ error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1));
+ report_pid (dwfl, pid);
+ return dwfl;
+}
+
+static void
+exec_dump (const char *exec)
+{
+ pid_t pid = fork ();
+ switch (pid)
+ {
+ case -1:
+ abort ();
+ case 0:
+ execl (exec, exec, "--ptraceme", NULL);
+ abort ();
+ default:
+ break;
+ }
+
+ /* Catch the main thread. Catch it first otherwise the /proc evaluation of
+ PID may have caught still ourselves before executing execl above. */
+ errno = 0;
+ int status;
+ pid_t got = waitpid (pid, &status, 0);
+ assert_perror (errno);
+ assert (got == pid);
+ assert (WIFSTOPPED (status));
+ // Main thread will signal SIGUSR2. Other thread will signal SIGUSR1.
+ assert (WSTOPSIG (status) == SIGUSR2);
+
+ /* Catch the spawned thread. Do not use __WCLONE as we could get racy
+ __WCLONE, probably despite pthread_create already had to be called the new
+ task is not yet alive enough for waitpid. */
+ pid_t pid2 = waitpid (-1, &status, __WALL);
+ assert_perror (errno);
+ assert (pid2 > 0);
+ assert (pid2 != pid);
+ assert (WIFSTOPPED (status));
+ // Main thread will signal SIGUSR2. Other thread will signal SIGUSR1.
+ assert (WSTOPSIG (status) == SIGUSR1);
+
+ Dwfl *dwfl = pid_to_dwfl (pid);
+ char *selfpathname;
+ int i = asprintf (&selfpathname, "/proc/%ld/exe", (long) pid);
+ assert (i > 0);
+ struct see_exec_module data;
+ ssize_t ssize = readlink (selfpathname, data.selfpath,
+ sizeof (data.selfpath));
+ free (selfpathname);
+ assert (ssize > 0 && ssize < (ssize_t) sizeof (data.selfpath));
+ data.selfpath[ssize] = '\0';
+ data.mod = NULL;
+ ptrdiff_t ptrdiff = dwfl_getmodules (dwfl, see_exec_module, &data, 0);
+ assert (ptrdiff == 0);
+ assert (data.mod != NULL);
+ GElf_Addr loadbase;
+ Elf *elf = dwfl_module_getelf (data.mod, &loadbase);
+ GElf_Ehdr ehdr_mem, *ehdr = gelf_getehdr (elf, &ehdr_mem);
+ assert (ehdr != NULL);
+ /* It is false also on x86_64 with i386 inferior. */
+#ifndef __x86_64__
+ is_x86_64_native = false;
+#else /* __x86_64__ */
+ is_x86_64_native = ehdr->e_ident[EI_CLASS] == ELFCLASS64;
+#endif /* __x86_64__ */
+ void (*jmp) (void);
+ if (is_x86_64_native)
+ {
+ // Find inferior symbol named "jmp".
+ int nsym = dwfl_module_getsymtab (data.mod);
+ int symi;
+ for (symi = 1; symi < nsym; ++symi)
+ {
+ GElf_Sym symbol;
+ const char *symbol_name = dwfl_module_getsym (data.mod, symi, &symbol, NULL);
+ if (symbol_name == NULL)
+ continue;
+ switch (GELF_ST_TYPE (symbol.st_info))
+ {
+ case STT_SECTION:
+ case STT_FILE:
+ case STT_TLS:
+ continue;
+ default:
+ if (strcmp (symbol_name, "jmp") != 0)
+ continue;
+ break;
+ }
+ /* LOADBASE is already applied here. */
+ jmp = (void (*) (void)) (uintptr_t) symbol.st_value;
+ break;
+ }
+ assert (symi < nsym);
+ prepare_thread (pid2, jmp);
+ }
+ dwfl_end (dwfl);
+ check_tid = pid2;
+ dwfl = pid_to_dwfl (pid);
+ dump (dwfl);
+ dwfl_end (dwfl);
+}
+
+#define OPT_BACKTRACE_EXEC 0x100
+
+static const struct argp_option options[] =
+ {
+ { "backtrace-exec", OPT_BACKTRACE_EXEC, "EXEC", 0, N_("Run executable"), 0 },
+ { NULL, 0, NULL, 0, NULL, 0 }
+ };
+
+
+static error_t
+parse_opt (int key, char *arg, struct argp_state *state)
+{
+ switch (key)
+ {
+ case ARGP_KEY_INIT:
+ state->child_inputs[0] = state->input;
+ break;
+
+ case OPT_BACKTRACE_EXEC:
+ exec_dump (arg);
+ exit (0);
+
+ default:
+ return ARGP_ERR_UNKNOWN;
+ }
+ return 0;
+}
+
+int
+main (int argc __attribute__ ((unused)), char **argv)
+{
+ /* We use no threads here which can interfere with handling a stream. */
+ __fsetlocking (stdin, FSETLOCKING_BYCALLER);
+ __fsetlocking (stdout, FSETLOCKING_BYCALLER);
+ __fsetlocking (stderr, FSETLOCKING_BYCALLER);
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ elf_version (EV_CURRENT);
+
+ Dwfl *dwfl = NULL;
+ const struct argp_child argp_children[] =
+ {
+ { .argp = dwfl_standard_argp () },
+ { .argp = NULL }
+ };
+ const struct argp argp =
+ {
+ options, parse_opt, NULL, NULL, argp_children, NULL, NULL
+ };
+ (void) argp_parse (&argp, argc, argv, 0, NULL, &dwfl);
+ assert (dwfl != NULL);
+ /* We want to make sure the dwfl was properly attached. */
+ if (dwfl_pid (dwfl) < 0)
+ error (2, 0, "dwfl_pid: %s", dwfl_errmsg (-1));
+ dump (dwfl);
+ dwfl_end (dwfl);
+ return 0;
+}
+
+#endif /* ! __linux__ */
+
diff --git a/src/tests/backtrace.i386.core.bz2 b/src/tests/backtrace.i386.core.bz2
new file mode 100644
index 00000000..e120d9bd
--- /dev/null
+++ b/src/tests/backtrace.i386.core.bz2
Binary files differ
diff --git a/src/tests/backtrace.i386.exec.bz2 b/src/tests/backtrace.i386.exec.bz2
new file mode 100644
index 00000000..1b0f001c
--- /dev/null
+++ b/src/tests/backtrace.i386.exec.bz2
Binary files differ
diff --git a/src/tests/backtrace.ppc.core.bz2 b/src/tests/backtrace.ppc.core.bz2
new file mode 100644
index 00000000..f20cd9f3
--- /dev/null
+++ b/src/tests/backtrace.ppc.core.bz2
Binary files differ
diff --git a/src/tests/backtrace.ppc.exec.bz2 b/src/tests/backtrace.ppc.exec.bz2
new file mode 100644
index 00000000..057c25a6
--- /dev/null
+++ b/src/tests/backtrace.ppc.exec.bz2
Binary files differ
diff --git a/src/tests/backtrace.s390.core.bz2 b/src/tests/backtrace.s390.core.bz2
new file mode 100644
index 00000000..db346948
--- /dev/null
+++ b/src/tests/backtrace.s390.core.bz2
Binary files differ
diff --git a/src/tests/backtrace.s390.exec.bz2 b/src/tests/backtrace.s390.exec.bz2
new file mode 100644
index 00000000..4c1b4aee
--- /dev/null
+++ b/src/tests/backtrace.s390.exec.bz2
Binary files differ
diff --git a/src/tests/backtrace.s390x.core.bz2 b/src/tests/backtrace.s390x.core.bz2
new file mode 100644
index 00000000..61c23ec4
--- /dev/null
+++ b/src/tests/backtrace.s390x.core.bz2
Binary files differ
diff --git a/src/tests/backtrace.s390x.exec.bz2 b/src/tests/backtrace.s390x.exec.bz2
new file mode 100644
index 00000000..8009239d
--- /dev/null
+++ b/src/tests/backtrace.s390x.exec.bz2
Binary files differ
diff --git a/src/tests/backtrace.x86_64.core.bz2 b/src/tests/backtrace.x86_64.core.bz2
new file mode 100644
index 00000000..1f34e206
--- /dev/null
+++ b/src/tests/backtrace.x86_64.core.bz2
Binary files differ
diff --git a/src/tests/backtrace.x86_64.exec.bz2 b/src/tests/backtrace.x86_64.exec.bz2
new file mode 100644
index 00000000..70a151be
--- /dev/null
+++ b/src/tests/backtrace.x86_64.exec.bz2
Binary files differ
diff --git a/src/tests/buildid.c b/src/tests/buildid.c
new file mode 100644
index 00000000..87c18773
--- /dev/null
+++ b/src/tests/buildid.c
@@ -0,0 +1,81 @@
+/* Test program for dwelf_elf_gnu_build_id, print build ID.
+ Copyright (C) 2014 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <err.h>
+#include <errno.h>
+#include ELFUTILS_HEADER(elf)
+#include ELFUTILS_HEADER(dwelf)
+#include <stdio.h>
+#include <error.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+int
+main (int argc, char *argv[])
+{
+ if (argc < 2)
+ error (EXIT_FAILURE, 0, "No input file given");
+
+ elf_version (EV_CURRENT);
+
+ for (int i = 1; i < argc; i++)
+ {
+ const char *file = argv[i];
+ int fd = open (file, O_RDONLY);
+ if (fd < 0)
+ error (EXIT_FAILURE, errno, "couldn't open file '%s'", file);
+
+ Elf *elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ {
+ printf("%s: elf_begin failed: %s\n", file, elf_errmsg (-1));
+ close (fd);
+ continue;
+ }
+
+ const void *build_id;
+ ssize_t len = dwelf_elf_gnu_build_id (elf, &build_id);
+ switch (len)
+ {
+ case 0:
+ printf ("%s: <no NT_GNU_BUILD_ID note>\n", file);
+ break;
+ case -1:
+ errx (1, "dwelf_elf_gnu_build_id (%s): %s",
+ file, elf_errmsg (-1));
+ default:
+ printf ("%s: build ID: ", file);
+ const unsigned char *p = build_id;
+ const unsigned char *end = p + len;
+ while (p < end)
+ printf("%02x", (unsigned)*p++);
+ putchar('\n');
+ }
+
+ elf_end (elf);
+ close (fd);
+ }
+
+ return 0;
+}
diff --git a/src/tests/cleanup-13.c b/src/tests/cleanup-13.c
new file mode 100644
index 00000000..3919b91a
--- /dev/null
+++ b/src/tests/cleanup-13.c
@@ -0,0 +1,316 @@
+// http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/testsuite/gcc.dg/cleanup-13.c?view=co&content-type=text%2Fplain
+
+/* HP-UX libunwind.so doesn't provide _UA_END_OF_STACK */
+/* { dg-do run } */
+/* { dg-options "-fexceptions" } */
+/* { dg-skip-if "" { "ia64-*-hpux11.*" } { "*" } { "" } } */
+/* Verify DW_OP_* handling in the unwinder. */
+
+#include <unwind.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* #define OP_addr(x) 0x06, ... */
+#define OP_deref 0x06,
+#define SLEB128(x) (x)&0x7f /* Assume here the value is -0x40 ... 0x3f. */
+#define ULEB128(x) (x)&0x7f /* Assume here the value is 0 ... 0x7f. */
+#define VAL1(x) (x)&0xff
+#if defined (__BIG_ENDIAN__)
+#define VAL2(x) ((x)>>8)&0xff,(x)&0xff
+#define VAL4(x) ((x)>>24)&0xff,((x)>>16)&0xff,((x)>>8)&0xff,(x)&0xff
+#define VAL8(x) ((x)>>56)&0xff,((x)>>48)&0xff,((x)>>40)&0xff,((x)>>32)&0xff,((x)>>24)&0xff,((x)>>16)&0xff,((x)>>8)&0xff,(x)&0xff
+#elif defined(__LITTLE_ENDIAN__) || defined(__x86_64__) || defined(__i386__)
+#define VAL2(x) (x)&0xff,((x)>>8)&0xff
+#define VAL4(x) (x)&0xff,((x)>>8)&0xff,((x)>>16)&0xff,((x)>>24)&0xff
+#define VAL8(x) (x)&0xff,((x)>>8)&0xff,((x)>>16)&0xff,((x)>>24)&0xff,((x)>>32)&0xff,((x)>>40)&0xff,((x)>>48)&0xff,((x)>>56)&0xff
+#endif
+#define OP_const1u(x) 0x08,VAL1(x),
+#define OP_const1s(x) 0x09,VAL1(x),
+#define OP_const2u(x) 0x0a,VAL2(x),
+#define OP_const2s(x) 0x0b,VAL2(x),
+#define OP_const4u(x) 0x0c,VAL4(x),
+#define OP_const4s(x) 0x0d,VAL4(x),
+#define OP_const8u(x) 0x0e,VAL8(x),
+#define OP_const8s(x) 0x0f,VAL8(x),
+#define OP_constu(x) 0x10,ULEB128(x),
+#define OP_consts(x) 0x11,SLEB128(x),
+#define OP_dup 0x12,
+#define OP_drop 0x13,
+#define OP_over 0x14,
+#define OP_pick(x) 0x15,VAL1(x),
+#define OP_swap 0x16,
+#define OP_rot 0x17,
+#define OP_xderef 0x18,
+#define OP_abs 0x19,
+#define OP_and 0x1a,
+#define OP_div 0x1b,
+#define OP_minus 0x1c,
+#define OP_mod 0x1d,
+#define OP_mul 0x1e,
+#define OP_neg 0x1f,
+#define OP_not 0x20,
+#define OP_or 0x21,
+#define OP_plus 0x22,
+#define OP_plus_uconst(x) 0x23,ULEB128(x),
+#define OP_shl 0x24,
+#define OP_shr 0x25,
+#define OP_shra 0x26,
+#define OP_xor 0x27,
+#define OP_bra(x) 0x28,VAL2(x),
+#define OP_eq 0x29,
+#define OP_ge 0x2a,
+#define OP_gt 0x2b,
+#define OP_le 0x2c,
+#define OP_lt 0x2d,
+#define OP_ne 0x2e,
+#define OP_skip(x) 0x2f,VAL2(x),
+#define OP_lit0 0x30,
+#define OP_lit1 0x31,
+#define OP_lit2 0x32,
+#define OP_lit3 0x33,
+#define OP_lit4 0x34,
+#define OP_lit5 0x35,
+#define OP_lit6 0x36,
+#define OP_lit7 0x37,
+#define OP_lit8 0x38,
+#define OP_lit9 0x39,
+#define OP_lit10 0x3a,
+#define OP_lit11 0x3b,
+#define OP_lit12 0x3c,
+#define OP_lit13 0x3d,
+#define OP_lit14 0x3e,
+#define OP_lit15 0x3f,
+#define OP_lit16 0x40,
+#define OP_lit17 0x41,
+#define OP_lit18 0x42,
+#define OP_lit19 0x43,
+#define OP_lit20 0x44,
+#define OP_lit21 0x45,
+#define OP_lit22 0x46,
+#define OP_lit23 0x47,
+#define OP_lit24 0x48,
+#define OP_lit25 0x49,
+#define OP_lit26 0x4a,
+#define OP_lit27 0x4b,
+#define OP_lit28 0x4c,
+#define OP_lit29 0x4d,
+#define OP_lit30 0x4e,
+#define OP_lit31 0x4f,
+#define OP_reg0 0x50,
+#define OP_reg1 0x51,
+#define OP_reg2 0x52,
+#define OP_reg3 0x53,
+#define OP_reg4 0x54,
+#define OP_reg5 0x55,
+#define OP_reg6 0x56,
+#define OP_reg7 0x57,
+#define OP_reg8 0x58,
+#define OP_reg9 0x59,
+#define OP_reg10 0x5a,
+#define OP_reg11 0x5b,
+#define OP_reg12 0x5c,
+#define OP_reg13 0x5d,
+#define OP_reg14 0x5e,
+#define OP_reg15 0x5f,
+#define OP_reg16 0x60,
+#define OP_reg17 0x61,
+#define OP_reg18 0x62,
+#define OP_reg19 0x63,
+#define OP_reg20 0x64,
+#define OP_reg21 0x65,
+#define OP_reg22 0x66,
+#define OP_reg23 0x67,
+#define OP_reg24 0x68,
+#define OP_reg25 0x69,
+#define OP_reg26 0x6a,
+#define OP_reg27 0x6b,
+#define OP_reg28 0x6c,
+#define OP_reg29 0x6d,
+#define OP_reg30 0x6e,
+#define OP_reg31 0x6f,
+#define OP_breg0(x) 0x70,SLEB128(x),
+#define OP_breg1(x) 0x71,SLEB128(x),
+#define OP_breg2(x) 0x72,SLEB128(x),
+#define OP_breg3(x) 0x73,SLEB128(x),
+#define OP_breg4(x) 0x74,SLEB128(x),
+#define OP_breg5(x) 0x75,SLEB128(x),
+#define OP_breg6(x) 0x76,SLEB128(x),
+#define OP_breg7(x) 0x77,SLEB128(x),
+#define OP_breg8(x) 0x78,SLEB128(x),
+#define OP_breg9(x) 0x79,SLEB128(x),
+#define OP_breg10(x) 0x7a,SLEB128(x),
+#define OP_breg11(x) 0x7b,SLEB128(x),
+#define OP_breg12(x) 0x7c,SLEB128(x),
+#define OP_breg13(x) 0x7d,SLEB128(x),
+#define OP_breg14(x) 0x7e,SLEB128(x),
+#define OP_breg15(x) 0x7f,SLEB128(x),
+#define OP_breg16(x) 0x80,SLEB128(x),
+#define OP_breg17(x) 0x81,SLEB128(x),
+#define OP_breg18(x) 0x82,SLEB128(x),
+#define OP_breg19(x) 0x83,SLEB128(x),
+#define OP_breg20(x) 0x84,SLEB128(x),
+#define OP_breg21(x) 0x85,SLEB128(x),
+#define OP_breg22(x) 0x86,SLEB128(x),
+#define OP_breg23(x) 0x87,SLEB128(x),
+#define OP_breg24(x) 0x88,SLEB128(x),
+#define OP_breg25(x) 0x89,SLEB128(x),
+#define OP_breg26(x) 0x8a,SLEB128(x),
+#define OP_breg27(x) 0x8b,SLEB128(x),
+#define OP_breg28(x) 0x8c,SLEB128(x),
+#define OP_breg29(x) 0x8d,SLEB128(x),
+#define OP_breg30(x) 0x8e,SLEB128(x),
+#define OP_breg31(x) 0x8f,SLEB128(x),
+#define OP_regx(x) 0x90,SLEB128(x),
+#define OP_fbreg(x) 0x91,SLEB128(x),
+#define OP_bregx(x,y) 0x92,ULEB128(x),SLEB128(y),
+#define OP_piece(x) 0x93,ULEB128(x),
+#define OP_deref_size(x) 0x94,VAL1(x),
+#define OP_xderef_size(x) 0x95,VAL1(x),
+#define OP_nop 0x96,
+#define OP_nop_termination 0x96
+#define OP_push_object_address 0x97,
+#define OP_call2(x) 0x98,VAL2(x),
+#define OP_call4(x) 0x99,VAL4(x),
+/* #define OP_call_ref(x) 0x9a,... */
+#define OP_form_tls_address(x) 0x9b,
+#define OP_call_frame_cfa 0x9c,
+#define OP_bit_piece(x) 0x9d,ULEB128(x),
+/* #define OP_implicit_value(x...) 0x9e,... */
+#define OP_stack_value 0x9f,
+#define OP_GNU_push_tls_address 0xe0,
+/* #define OP_GNU_encoded_addr(x...) 0xf1, */
+
+#define ASSERT_TOS_NON0 OP_bra(3) OP_skip(-3)
+#define ASSERT_TOS_0 OP_lit0 OP_eq ASSERT_TOS_NON0
+
+/* Initially there is CFA value on the stack, we want to
+ keep it there at the end. */
+#define CFI_PROGRAM \
+OP_lit0 OP_nop ASSERT_TOS_0 \
+OP_lit1 ASSERT_TOS_NON0 \
+OP_lit1 OP_const1u(1) OP_eq ASSERT_TOS_NON0 \
+OP_lit16 OP_const2u(16) OP_eq ASSERT_TOS_NON0 \
+OP_lit31 OP_const4u(31) OP_ne ASSERT_TOS_0 \
+OP_lit1 OP_neg OP_const1s(-1) OP_eq ASSERT_TOS_NON0 \
+OP_lit16 OP_neg OP_const2s(-16) OP_ne ASSERT_TOS_0 \
+OP_lit31 OP_const4s(-31) OP_neg OP_ne ASSERT_TOS_0 \
+OP_lit7 OP_dup OP_plus_uconst(2) OP_lit9 OP_eq ASSERT_TOS_NON0 \
+ OP_lit7 OP_eq ASSERT_TOS_NON0 \
+OP_lit20 OP_lit1 OP_drop OP_lit20 OP_eq ASSERT_TOS_NON0 \
+OP_lit17 OP_lit19 OP_over OP_lit17 OP_eq ASSERT_TOS_NON0 \
+ OP_lit19 OP_eq ASSERT_TOS_NON0 OP_lit17 OP_eq ASSERT_TOS_NON0 \
+OP_lit1 OP_lit2 OP_lit3 OP_lit4 OP_pick(2) OP_lit2 OP_eq ASSERT_TOS_NON0\
+ OP_lit4 OP_eq ASSERT_TOS_NON0 OP_lit3 OP_eq ASSERT_TOS_NON0 \
+ OP_pick(0) OP_lit2 OP_eq ASSERT_TOS_NON0 \
+ OP_lit2 OP_eq ASSERT_TOS_NON0 OP_lit1 OP_eq ASSERT_TOS_NON0 \
+OP_lit6 OP_lit12 OP_swap OP_lit6 OP_eq ASSERT_TOS_NON0 \
+ OP_lit12 OP_eq ASSERT_TOS_NON0 \
+OP_lit7 OP_lit8 OP_lit9 OP_rot OP_lit8 OP_eq ASSERT_TOS_NON0 \
+ OP_lit7 OP_eq ASSERT_TOS_NON0 OP_lit9 OP_eq ASSERT_TOS_NON0 \
+OP_lit7 OP_abs OP_lit7 OP_eq ASSERT_TOS_NON0 \
+OP_const1s(-123) OP_abs OP_const1u(123) OP_eq ASSERT_TOS_NON0 \
+OP_lit3 OP_lit6 OP_and OP_lit2 OP_eq ASSERT_TOS_NON0 \
+OP_lit3 OP_lit6 OP_or OP_lit7 OP_eq ASSERT_TOS_NON0 \
+OP_lit17 OP_lit2 OP_minus OP_lit15 OP_eq ASSERT_TOS_NON0 \
+/* Divide is signed truncating toward zero. */ \
+OP_const1s(-6) OP_const1s(-2) OP_div OP_lit3 OP_eq ASSERT_TOS_NON0 \
+OP_const1s(-7) OP_const1s(3) OP_div OP_const1s(-2) \
+ OP_eq ASSERT_TOS_NON0 \
+/* Modulo is unsigned. */ \
+OP_const1s(-6) OP_const1s(-4) OP_mod OP_const1s(-6) \
+ OP_eq ASSERT_TOS_NON0 \
+OP_const1s(-6) OP_lit4 OP_mod OP_lit2 OP_eq ASSERT_TOS_NON0 \
+OP_lit6 OP_const1s(-4) OP_mod OP_lit6 OP_eq ASSERT_TOS_NON0 \
+/* Signed modulo can be implemented using "over over div mul minus". */\
+OP_const1s(-6) OP_const1s(-4) OP_over OP_over OP_div OP_mul OP_minus \
+ OP_const1s(-2) OP_eq ASSERT_TOS_NON0 \
+OP_const1s(-7) OP_lit3 OP_over OP_over OP_div OP_mul OP_minus \
+ OP_const1s(-1) OP_eq ASSERT_TOS_NON0 \
+OP_lit7 OP_const1s(-3) OP_over OP_over OP_div OP_mul OP_minus \
+ OP_lit1 OP_eq ASSERT_TOS_NON0 \
+OP_lit16 OP_lit31 OP_plus_uconst(1) OP_mul OP_const2u(512) \
+ OP_eq ASSERT_TOS_NON0 \
+OP_lit5 OP_not OP_lit31 OP_and OP_lit26 OP_eq ASSERT_TOS_NON0 \
+OP_lit12 OP_lit31 OP_plus OP_const1u(43) OP_eq ASSERT_TOS_NON0 \
+OP_const1s(-6) OP_lit2 OP_plus OP_const1s(-4) OP_eq ASSERT_TOS_NON0 \
+OP_const1s(-6) OP_plus_uconst(3) OP_const1s(-3) OP_eq ASSERT_TOS_NON0 \
+OP_lit16 OP_lit4 OP_shl OP_const2u(256) OP_eq ASSERT_TOS_NON0 \
+OP_lit16 OP_lit3 OP_shr OP_lit2 OP_eq ASSERT_TOS_NON0 \
+OP_const1s(-16) OP_lit3 OP_shra OP_const1s(-2) OP_eq ASSERT_TOS_NON0 \
+OP_lit3 OP_lit6 OP_xor OP_lit5 OP_eq ASSERT_TOS_NON0 \
+OP_lit3 OP_lit6 OP_le ASSERT_TOS_NON0 \
+OP_lit3 OP_lit3 OP_le ASSERT_TOS_NON0 \
+OP_lit6 OP_lit3 OP_le ASSERT_TOS_0 \
+OP_lit3 OP_lit6 OP_lt ASSERT_TOS_NON0 \
+OP_lit3 OP_lit3 OP_lt ASSERT_TOS_0 \
+OP_lit6 OP_lit3 OP_lt ASSERT_TOS_0 \
+OP_lit3 OP_lit6 OP_ge ASSERT_TOS_0 \
+OP_lit3 OP_lit3 OP_ge ASSERT_TOS_NON0 \
+OP_lit6 OP_lit3 OP_ge ASSERT_TOS_NON0 \
+OP_lit3 OP_lit6 OP_gt ASSERT_TOS_0 \
+OP_lit3 OP_lit3 OP_gt ASSERT_TOS_0 \
+OP_lit6 OP_lit3 OP_gt ASSERT_TOS_NON0 \
+OP_const1s(-6) OP_lit1 OP_shr OP_lit0 OP_gt ASSERT_TOS_NON0 \
+OP_const1s(-6) OP_lit1 OP_shra OP_lit0 OP_lt ASSERT_TOS_NON0
+
+#define CFI_ESCAPE_VAL_2(VALUES...) #VALUES
+#define CFI_ESCAPE_VAL_1(VALUES...) CFI_ESCAPE_VAL_2(VALUES)
+#define CFI_ESCAPE_VAL(VALUES...) CFI_ESCAPE_VAL_1(VALUES)
+#define CFI_ESCAPE do { } while (0)
+#define CFI_ARCH_PROGRAM OP_nop_termination
+#ifdef __GCC_HAVE_DWARF2_CFI_ASM
+#if defined (__x86_64__)
+#undef CFI_ESCAPE
+#undef CFI_ARCH_PROGRAM
+#define CFI_ARCH_PROGRAM CFI_PROGRAM OP_lit8 OP_minus OP_nop_termination
+unsigned char cfi_arch_program[] = { CFI_ARCH_PROGRAM };
+extern char verify_it[sizeof (cfi_arch_program) - 0x80 < 0x3f80 ? 1 : -1];
+/* DW_CFA_expression %rip, uleb128(l2-l1), l1: program DW_OP_lit8 DW_OP_minus DW_OP_nop l2: */
+#define CFI_ESCAPE \
+ asm volatile (".cfi_escape 0x10, 0x10, (%P0&0x7f)+0x80, %P0>>7, " \
+ CFI_ESCAPE_VAL (CFI_ARCH_PROGRAM) \
+ : : "i" (sizeof (cfi_arch_program)))
+#elif defined (__i386__)
+#undef CFI_ESCAPE
+#undef CFI_ARCH_PROGRAM
+#define CFI_ARCH_PROGRAM CFI_PROGRAM OP_lit4 OP_minus OP_nop_termination
+unsigned char cfi_arch_program[] = { CFI_ARCH_PROGRAM };
+extern char verify_it[sizeof (cfi_arch_program) - 0x80 < 0x3f80 ? 1 : -1];
+/* DW_CFA_expression %eip, uleb128(l2-l1), l1: program DW_OP_lit4 DW_OP_minus DW_OP_nop l2: */
+#define CFI_ESCAPE \
+ asm volatile (".cfi_escape 0x10, 8, (%P0&0x7f)+0x80, %P0>>7, " \
+ CFI_ESCAPE_VAL (CFI_ARCH_PROGRAM) \
+ : : "i" (sizeof (cfi_arch_program)))
+#endif
+#endif
+
+/* The original GCC testcase tests the runtime unwinder using
+ _Unwind_ForcedUnwind, we just inspect the child when it aborts. */
+
+static void force_unwind ()
+{
+ abort ();
+}
+
+static void handler (void *p __attribute__((unused)))
+{
+ exit (0);
+}
+
+__attribute__((noinline)) static void callme ()
+{
+ CFI_ESCAPE;
+ force_unwind ();
+}
+
+__attribute__((noinline)) static void doit ()
+{
+ char dummy __attribute__((cleanup (handler)));
+ callme ();
+}
+
+int main()
+{
+ doit ();
+ abort ();
+}
diff --git a/src/tests/coverage.sh b/src/tests/coverage.sh
new file mode 100755
index 00000000..5cc353c9
--- /dev/null
+++ b/src/tests/coverage.sh
@@ -0,0 +1,40 @@
+#! /bin/bash
+
+if [ "x$1" = "x-v" ]; then
+ verbose=yes
+else
+ verbose=no
+fi
+
+cd ..
+
+for d in lib libasm libdw libdwfl libebl libelf backends src; do
+ tmp=$d-data
+ cd $d
+ unused=0
+ unused_files=
+ for f in *.gcno; do
+ base="$(basename $f .gcno)"
+ fc="$base.c"
+ gcda="$base.gcda"
+ if [ -f "$gcda" ]; then
+ gcov -n -a "$fc" |
+ gawk "/$d.$fc/ { getline; co=gensub(/.*:(.*)% .*/, \"\\\\1\", \"g\"); co=co+0.0; li=\$4+0; printf \"%-35s %6.2f %5d\n\", \"$d/$fc\", co, li } " >> $tmp
+ else
+ unused=$(($unused + 1))
+ unused_files="$unused_files $fc"
+ fi
+ done
+ if [ -f $tmp ]; then
+ gawk "{ copct=\$2; co=(\$3*copct)/100; toco+=(co+0); toli += (\$3+0); } END { printf \"%-12s %6.2f%% covered unused files: %3d\n\", \"$d\", (toco*100)/toli, \"$unused\" }" $tmp
+ rm -f $tmp
+ else
+ printf "%-12s 0.00%% covered unused files: %3d\n" "$d" $unused
+ fi
+ if [ $verbose = yes ]; then
+ for f in $unused_files; do
+ printf '%-42s%s\n' '' $f
+ done
+ fi
+ cd ..
+done
diff --git a/src/tests/debugaltlink.c b/src/tests/debugaltlink.c
new file mode 100644
index 00000000..6d97d500
--- /dev/null
+++ b/src/tests/debugaltlink.c
@@ -0,0 +1,83 @@
+/* Test program for dwelf_dwarf_gnu_debugaltlink, print name and build ID.
+ Copyright (C) 2014 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <err.h>
+#include <errno.h>
+#include ELFUTILS_HEADER(dw)
+#include ELFUTILS_HEADER(dwelf)
+#include <stdio.h>
+#include <error.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+int
+main (int argc, char *argv[])
+{
+ if (argc < 2)
+ error (EXIT_FAILURE, 0, "No input file given");
+
+ elf_version (EV_CURRENT);
+
+ for (int i = 1; i < argc; i++)
+ {
+ const char *file = argv[i];
+ int fd = open (file, O_RDONLY);
+ if (fd < 0)
+ error (EXIT_FAILURE, errno, "couldn't open file '%s'", file);
+
+ Dwarf *dwarf = dwarf_begin (fd, DWARF_C_READ);
+ if (dwarf == NULL)
+ {
+ printf("%s: dwarf_begin failed: %s\n", file, dwarf_errmsg (-1));
+ close (fd);
+ continue;
+ }
+
+ const char *name;
+ const void *build_id;
+ ssize_t ret = dwelf_dwarf_gnu_debugaltlink
+ (dwarf, &name, &build_id);
+ switch (ret)
+ {
+ case 0:
+ printf ("%s: <no .gnu_debugaltlink section>\n", file);
+ break;
+ case -1:
+ errx (1, "dwelf_dwarf_gnu_debugaltlink (%s): %s",
+ file, dwarf_errmsg (-1));
+ default:
+ printf ("%s: %s, build ID: ", file, name);
+ const unsigned char *p = build_id;
+ const unsigned char *end = p + ret;
+ while (p < end)
+ printf("%02x", (unsigned)*p++);
+ putchar('\n');
+ }
+
+ dwarf_end (dwarf);
+ close (fd);
+ }
+
+ return 0;
+}
diff --git a/src/tests/debuglink.c b/src/tests/debuglink.c
new file mode 100644
index 00000000..935d1029
--- /dev/null
+++ b/src/tests/debuglink.c
@@ -0,0 +1,64 @@
+/* Test program for dwelf_elf_gnu_debuglink, print name and crc.
+ Copyright (C) 2014 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <errno.h>
+#include ELFUTILS_HEADER(dwelf)
+#include <stdio.h>
+#include <error.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+int
+main (int argc, char *argv[])
+{
+ if (argc < 2)
+ error (EXIT_FAILURE, 0, "No input file given");
+
+ elf_version (EV_CURRENT);
+
+ for (int i = 1; i < argc; i++)
+ {
+ const char *file = argv[i];
+ int fd = open (file, O_RDONLY);
+ if (fd < 0)
+ error (EXIT_FAILURE, errno, "couldn't open file '%s'", file);
+
+ Elf *elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ error (EXIT_FAILURE, 0, "elf_begin failed for '%s': %s",
+ file, elf_errmsg (-1));
+
+ GElf_Word crc;
+ const char *debug = dwelf_elf_gnu_debuglink (elf, &crc);
+ if (debug == NULL)
+ printf ("%s: <no gnu_debuglink file>\n", file);
+ else
+ printf ("%s: %s, crc: %" PRIx32 "\n", file, debug, crc);
+
+ elf_end (elf);
+ close (fd);
+ }
+
+ return 0;
+}
diff --git a/src/tests/deleted-lib.c b/src/tests/deleted-lib.c
new file mode 100644
index 00000000..1ff411b7
--- /dev/null
+++ b/src/tests/deleted-lib.c
@@ -0,0 +1,27 @@
+/* Test program for opening already deleted running binaries.
+ Copyright (C) 2014 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <unistd.h>
+
+void
+libfunc (void)
+{
+ sleep (60000);
+ /* Avoid tail call optimization for the sleep call. */
+ asm volatile ("");
+}
diff --git a/src/tests/deleted.c b/src/tests/deleted.c
new file mode 100644
index 00000000..32a310b6
--- /dev/null
+++ b/src/tests/deleted.c
@@ -0,0 +1,50 @@
+/* Test program for opening already deleted running binaries.
+ Copyright (C) 2014 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <assert.h>
+#include <stdio.h>
+#include <error.h>
+#include <errno.h>
+
+extern void libfunc (void);
+
+int
+main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)))
+{
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ pid_t pid = fork ();
+ assert (pid != -1);
+ if (pid == 0)
+ {
+ int err = close (0);
+ assert (!err);
+ err = close (1);
+ assert (!err);
+ err = close (2);
+ assert (!err);
+ libfunc ();
+ abort ();
+ }
+ printf ("%d\n", pid);
+ return EXIT_SUCCESS;
+}
diff --git a/src/tests/dwarf-getmacros.c b/src/tests/dwarf-getmacros.c
new file mode 100644
index 00000000..92e093ca
--- /dev/null
+++ b/src/tests/dwarf-getmacros.c
@@ -0,0 +1,144 @@
+/* Test program for dwarf_getmacros and related
+ Copyright (C) 2009, 2014 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include ELFUTILS_HEADER(dw)
+#include <dwarf.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <inttypes.h>
+
+static void include (Dwarf *dbg, Dwarf_Off macoff, ptrdiff_t token);
+
+static int
+mac (Dwarf_Macro *macro, void *dbg)
+{
+ static int level = 0;
+
+ unsigned int opcode;
+ dwarf_macro_opcode (macro, &opcode);
+ switch (opcode)
+ {
+ case DW_MACRO_GNU_transparent_include:
+ {
+ Dwarf_Attribute at;
+ int r = dwarf_macro_param (macro, 0, &at);
+ assert (r == 0);
+
+ Dwarf_Word w;
+ r = dwarf_formudata (&at, &w);
+ assert (r == 0);
+
+ printf ("%*sinclude %#" PRIx64 "\n", level, "", w);
+ ++level;
+ include (dbg, w, DWARF_GETMACROS_START);
+ --level;
+ printf ("%*s/include\n", level, "");
+ break;
+ }
+
+ case DW_MACRO_GNU_start_file:
+ {
+ Dwarf_Files *files;
+ size_t nfiles;
+ if (dwarf_macro_getsrcfiles (dbg, macro, &files, &nfiles) < 0)
+ printf ("dwarf_macro_getsrcfiles: %s\n",
+ dwarf_errmsg (dwarf_errno ()));
+
+ Dwarf_Word w = 0;
+ dwarf_macro_param2 (macro, &w, NULL);
+
+ const char *name = dwarf_filesrc (files, (size_t) w, NULL, NULL);
+ printf ("%*sfile %s\n", level, "", name);
+ ++level;
+ break;
+ }
+
+ case DW_MACRO_GNU_end_file:
+ {
+ --level;
+ printf ("%*s/file\n", level, "");
+ break;
+ }
+
+ case DW_MACINFO_define:
+ case DW_MACRO_GNU_define_indirect:
+ {
+ const char *value;
+ dwarf_macro_param2 (macro, NULL, &value);
+ printf ("%*s%s\n", level, "", value);
+ break;
+ }
+
+ case DW_MACINFO_undef:
+ case DW_MACRO_GNU_undef_indirect:
+ break;
+
+ default:
+ {
+ size_t paramcnt;
+ dwarf_macro_getparamcnt (macro, &paramcnt);
+ printf ("%*sopcode %u with %zd arguments\n",
+ level, "", opcode, paramcnt);
+ break;
+ }
+ }
+
+ return DWARF_CB_ABORT;
+}
+
+static void
+include (Dwarf *dbg, Dwarf_Off macoff, ptrdiff_t token)
+{
+ while ((token = dwarf_getmacros_off (dbg, macoff, mac, dbg, token)) != 0)
+ if (token == -1)
+ {
+ puts (dwarf_errmsg (dwarf_errno ()));
+ break;
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+ assert (argc >= 3);
+ const char *name = argv[1];
+ ptrdiff_t cuoff = strtol (argv[2], NULL, 0);
+ bool new_style = argc > 3;
+
+ int fd = open (name, O_RDONLY);
+ Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ);
+
+ Dwarf_Die cudie_mem, *cudie = dwarf_offdie (dbg, cuoff, &cudie_mem);
+
+ for (ptrdiff_t off = new_style ? DWARF_GETMACROS_START : 0;
+ (off = dwarf_getmacros (cudie, mac, dbg, off)); )
+ if (off == -1)
+ {
+ puts (dwarf_errmsg (dwarf_errno ()));
+ break;
+ }
+
+ dwarf_end (dbg);
+
+ return 0;
+}
diff --git a/src/tests/dwarf-getstring.c b/src/tests/dwarf-getstring.c
new file mode 100644
index 00000000..b70c2a70
--- /dev/null
+++ b/src/tests/dwarf-getstring.c
@@ -0,0 +1,77 @@
+/* Copyright (C) 2011 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Marek Polacek <mpolacek@redhat.com>, 2011.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include ELFUTILS_HEADER(dwfl)
+#include <assert.h>
+#include <dwarf.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+
+int
+main (int argc, char *argv[])
+{
+ int cnt;
+
+ for (cnt = 1; cnt < argc; ++cnt)
+ {
+ Dwarf_Off offset = 0;
+ size_t len;
+
+ int fd = open64 (argv[cnt], O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("cannot open '%s': %m\n", argv[cnt]);
+ return 1;
+ }
+
+ Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ);
+ if (dbg == NULL)
+ {
+ printf ("%s not usable: %s\n", argv[cnt], dwarf_errmsg (-1));
+ close (fd);
+ return 1;
+ }
+
+ /* Try to use NULL Dwarf object. */
+ const char *str = dwarf_getstring (NULL, offset, &len);
+ assert (str == NULL);
+
+ /* Use insane offset. */
+ str = dwarf_getstring (dbg, ~0UL, &len);
+ assert (str == NULL);
+
+ /* Now do some real work. */
+ for (int i = 0; i < 100; ++i)
+ {
+ str = dwarf_getstring (dbg, offset, &len);
+ puts (str);
+
+ /* Advance. */
+ offset += len + 1;
+ }
+
+ close (fd);
+ }
+
+ return 0;
+}
diff --git a/src/tests/dwfl-addr-sect.c b/src/tests/dwfl-addr-sect.c
new file mode 100644
index 00000000..21e470a3
--- /dev/null
+++ b/src/tests/dwfl-addr-sect.c
@@ -0,0 +1,80 @@
+/* Test program for libdwfl ... foo
+ Copyright (C) 2007 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <stdlib.h>
+#include <string.h>
+#include <error.h>
+#include <locale.h>
+#include <argp.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+
+static int
+handle_address (Dwfl *dwfl, Dwarf_Addr address)
+{
+ Dwfl_Module *mod = dwfl_addrmodule (dwfl, address);
+ Dwarf_Addr adjusted = address;
+ Dwarf_Addr bias;
+ Elf_Scn *scn = dwfl_module_address_section (mod, &adjusted, &bias);
+ if (scn == NULL)
+ {
+ error (0, 0, "%#" PRIx64 ": dwfl_module_address_section: %s",
+ address, dwfl_errmsg (-1));
+ return 1;
+ }
+ printf ("address %#" PRIx64 " => module \"%s\" section %zu + %#" PRIx64 "\n",
+ address,
+ dwfl_module_info (mod, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ elf_ndxscn (scn), adjusted);
+ return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+ /* We use no threads here which can interfere with handling a stream. */
+ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ int remaining;
+ Dwfl *dwfl = NULL;
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl);
+ assert (dwfl != NULL);
+
+ int result = 0;
+ for (; remaining < argc; ++remaining)
+ {
+ char *endp;
+ uintmax_t addr = strtoumax (argv[remaining], &endp, 0);
+ if (endp != argv[remaining])
+ result |= handle_address (dwfl, addr);
+ else
+ result = 1;
+ }
+
+ dwfl_end (dwfl);
+
+ return result;
+}
diff --git a/src/tests/dwfl-bug-addr-overflow.c b/src/tests/dwfl-bug-addr-overflow.c
new file mode 100644
index 00000000..aa8030e1
--- /dev/null
+++ b/src/tests/dwfl-bug-addr-overflow.c
@@ -0,0 +1,73 @@
+/* Test program for libdwfl basic module tracking, relocation.
+ Copyright (C) 2007 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <error.h>
+#include <locale.h>
+#include ELFUTILS_HEADER(dwfl)
+
+
+static const Dwfl_Callbacks offline_callbacks =
+ {
+ .find_debuginfo = INTUSE(dwfl_standard_find_debuginfo),
+ .section_address = INTUSE(dwfl_offline_section_address),
+ };
+
+
+int
+main (void)
+{
+ /* We use no threads here which can interfere with handling a stream. */
+ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ Dwfl *dwfl = dwfl_begin (&offline_callbacks);
+ assert (dwfl != NULL);
+
+ Dwfl_Module *high = dwfl_report_module (dwfl, "high",
+ UINT64_C (0xffffffff00010000),
+ UINT64_C (0xffffffff00020000));
+ assert (high);
+ Dwfl_Module *low = dwfl_report_module (dwfl, "low",
+ UINT64_C (0x00010000),
+ UINT64_C (0x00020000));
+ assert (low);
+ Dwfl_Module *middle = dwfl_report_module (dwfl, "middle",
+ UINT64_C (0xffff00010000),
+ UINT64_C (0xffff00020000));
+ assert (middle);
+
+ int ret = dwfl_report_end (dwfl, NULL, NULL);
+ assert (ret == 0);
+
+ Dwfl_Module *mod = dwfl_addrmodule (dwfl, UINT64_C (0xffffffff00010123));
+ assert (mod == high);
+ mod = dwfl_addrmodule (dwfl, UINT64_C (0x00010123));
+ assert (mod == low);
+ mod = dwfl_addrmodule (dwfl, UINT64_C (0xffff00010123));
+ assert (mod == middle);
+
+ dwfl_end (dwfl);
+
+ return 0;
+}
diff --git a/src/tests/dwfl-bug-fd-leak.c b/src/tests/dwfl-bug-fd-leak.c
new file mode 100644
index 00000000..170a61a7
--- /dev/null
+++ b/src/tests/dwfl-bug-fd-leak.c
@@ -0,0 +1,102 @@
+/* Test program for libdwfl file decriptors leakage.
+ Copyright (C) 2007, 2008 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <locale.h>
+#include <dirent.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <error.h>
+#include <unistd.h>
+#include <dwarf.h>
+#include <sys/resource.h>
+#include ELFUTILS_HEADER(dwfl)
+
+
+static Dwfl *
+elfutils_open (pid_t pid, Dwarf_Addr address)
+{
+ static char *debuginfo_path;
+ static const Dwfl_Callbacks proc_callbacks =
+ {
+ .find_debuginfo = dwfl_standard_find_debuginfo,
+ .debuginfo_path = &debuginfo_path,
+
+ .find_elf = dwfl_linux_proc_find_elf,
+ };
+ Dwfl *dwfl = dwfl_begin (&proc_callbacks);
+ if (dwfl == NULL)
+ error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1));
+
+ int result = dwfl_linux_proc_report (dwfl, pid);
+ if (result < 0)
+ error (2, 0, "dwfl_linux_proc_report: %s", dwfl_errmsg (-1));
+ else if (result > 0)
+ error (2, result, "dwfl_linux_proc_report");
+
+ if (dwfl_report_end (dwfl, NULL, NULL) != 0)
+ error (2, 0, "dwfl_report_end: %s", dwfl_errmsg (-1));
+
+ Dwarf_Addr bias;
+ Dwarf *dbg = dwfl_addrdwarf (dwfl, address, &bias);
+ if (dbg != NULL)
+ {
+ Elf *elf = dwarf_getelf (dbg);
+ if (elf == NULL)
+ error (2, 0, "dwarf_getelf: %s", dwarf_errmsg (-1));
+ }
+ else
+ {
+ Elf *elf = dwfl_module_getelf (dwfl_addrmodule (dwfl, address), &bias);
+ if (elf == NULL)
+ error (2, 0, "dwfl_module_getelf: %s", dwfl_errmsg (-1));
+ }
+
+ return dwfl;
+}
+
+static void
+elfutils_close (Dwfl *dwfl)
+{
+ dwfl_end (dwfl);
+}
+
+int
+main (void)
+{
+ /* We use no threads here which can interfere with handling a stream. */
+ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ struct rlimit fd_limit = { .rlim_cur = 32, .rlim_max = 32 };
+ if (setrlimit (RLIMIT_NOFILE, &fd_limit) < 0)
+ error (2, errno, "setrlimit");
+
+ for (int i = 0; i < 5000; ++i)
+ {
+ Dwfl *dwfl = elfutils_open (getpid (), (Dwarf_Addr) (uintptr_t) &main);
+ elfutils_close (dwfl);
+ }
+
+ return 0;
+}
diff --git a/src/tests/dwfl-bug-getmodules.c b/src/tests/dwfl-bug-getmodules.c
new file mode 100644
index 00000000..1ee989f8
--- /dev/null
+++ b/src/tests/dwfl-bug-getmodules.c
@@ -0,0 +1,66 @@
+/* Test program for dwfl_getmodules bug.
+ Copyright (C) 2008 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include ELFUTILS_HEADER(dwfl)
+
+#include <error.h>
+
+static const Dwfl_Callbacks callbacks =
+ {
+ .find_elf = dwfl_linux_proc_find_elf,
+ .find_debuginfo = dwfl_standard_find_debuginfo,
+ };
+
+static int
+iterate (Dwfl_Module *mod __attribute__ ((unused)),
+ void **userdata __attribute__ ((unused)),
+ const char *name __attribute__ ((unused)),
+ Dwarf_Addr base, void *arg)
+{
+ if (base != 0x2000)
+ return DWARF_CB_OK;
+
+ if (dwfl_addrmodule (arg, 0x2100) == NULL)
+ error (1, 0, "dwfl_addrmodule: %s", dwfl_errmsg (-1));
+
+ return DWARF_CB_ABORT;
+}
+
+int
+main (void)
+{
+ Dwfl *dwfl = dwfl_begin (&callbacks);
+
+ dwfl_report_module (dwfl, "m1", 0, 0x1000);
+ dwfl_report_module (dwfl, "m2", 0x2000, 0x3000);
+ dwfl_report_module (dwfl, "m3", 0x4000, 0x5000);
+
+ dwfl_report_end (dwfl, NULL, NULL);
+
+ ptrdiff_t offset = dwfl_getmodules (dwfl, &iterate, dwfl, 0);
+ if (offset <= 0)
+ error (1, 0, "dwfl_getmodules: %s", dwfl_errmsg (-1));
+
+ offset = dwfl_getmodules (dwfl, &iterate, NULL, offset);
+ if (offset != 0)
+ error (1, 0, "dwfl_getmodules (%d): %s", (int) offset, dwfl_errmsg (-1));
+
+ dwfl_end (dwfl);
+
+ return 0;
+}
diff --git a/src/tests/dwfl-bug-report.c b/src/tests/dwfl-bug-report.c
new file mode 100644
index 00000000..80ff8066
--- /dev/null
+++ b/src/tests/dwfl-bug-report.c
@@ -0,0 +1,48 @@
+/* Test program for dwfl_report_end bug.
+ Copyright (C) 2007 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include ELFUTILS_HEADER(dwfl)
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+static const Dwfl_Callbacks callbacks =
+ {
+ .find_elf = dwfl_linux_proc_find_elf,
+ .find_debuginfo = dwfl_standard_find_debuginfo,
+ };
+
+int
+main (void)
+{
+ Dwfl *dwfl = dwfl_begin (&callbacks);
+
+ for (int i = 0; i < 5; ++i)
+ {
+ dwfl_report_begin (dwfl);
+ dwfl_report_module (dwfl, "module1", 0, 10);
+ dwfl_report_end (dwfl, NULL, NULL);
+ }
+
+ dwfl_end (dwfl);
+
+ return 0;
+}
diff --git a/src/tests/dwfl-report-elf-align.c b/src/tests/dwfl-report-elf-align.c
new file mode 100644
index 00000000..a4e97d3c
--- /dev/null
+++ b/src/tests/dwfl-report-elf-align.c
@@ -0,0 +1,72 @@
+/* Test program for dwfl_report_elf incorrect BASE alignment.
+ Copyright (C) 2013 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <error.h>
+#include <locale.h>
+#include <string.h>
+#include <stdlib.h>
+#include ELFUTILS_HEADER(dwfl)
+
+
+static const Dwfl_Callbacks offline_callbacks =
+ {
+ .find_debuginfo = INTUSE(dwfl_standard_find_debuginfo),
+ .section_address = INTUSE(dwfl_offline_section_address),
+ };
+
+
+int
+main (int argc, char **argv)
+{
+ /* We use no threads here which can interfere with handling a stream. */
+ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ if (argc != 5)
+ error (1, 0, "dwfl-report-elf-align shlib.so base funcaddr funcname");
+
+ Dwfl *dwfl = dwfl_begin (&offline_callbacks);
+ assert (dwfl != NULL);
+
+ char *endptr;
+ uintptr_t base = strtoull (argv[2], &endptr, 0);
+ assert (endptr && !*endptr);
+
+ Dwfl_Module *mod = dwfl_report_elf (dwfl, argv[1], argv[1], -1, base, false);
+ assert (mod != NULL);
+
+ uintptr_t funcaddr = strtoull (argv[3], &endptr, 0);
+ assert (endptr && !*endptr);
+
+ Dwfl_Module *mod_found = dwfl_addrmodule (dwfl, funcaddr);
+ assert (mod_found == mod);
+
+ const char *symname = dwfl_module_addrname (mod, funcaddr);
+ assert (symname != NULL);
+ assert (strcmp (symname, argv[4]) == 0);
+
+ dwfl_end (dwfl);
+
+ return 0;
+}
diff --git a/src/tests/dwfllines.c b/src/tests/dwfllines.c
new file mode 100644
index 00000000..90379dd2
--- /dev/null
+++ b/src/tests/dwfllines.c
@@ -0,0 +1,164 @@
+/* Copyright (C) 2013 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <assert.h>
+#include ELFUTILS_HEADER(dw)
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+#include <argp.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <error.h>
+
+int
+main (int argc, char *argv[])
+{
+ int cnt;
+
+ Dwfl *dwfl = NULL;
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &cnt, &dwfl);
+ assert (dwfl != NULL);
+
+ Dwarf_Die *cu = NULL;
+ Dwarf_Addr bias;
+ do
+ {
+ cu = dwfl_nextcu (dwfl, cu, &bias);
+ if (cu != NULL)
+ {
+ Dwfl_Module *mod = dwfl_cumodule (cu);
+ const char *modname = (dwfl_module_info (mod, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL)
+ ?: "<unknown>");
+ const char *cuname = (dwarf_diename (cu) ?: "<unknown>");
+
+ printf ("mod: %s CU: [%" PRIx64 "] %s\n", modname,
+ dwarf_dieoffset (cu), cuname);
+
+ size_t lines;
+ if (dwfl_getsrclines (cu, &lines) != 0)
+ continue; // No lines...
+
+ for (size_t i = 0; i < lines; i++)
+ {
+ Dwfl_Line *line = dwfl_onesrcline (cu, i);
+
+ Dwarf_Addr addr;
+ int lineno;
+ int colno;
+ Dwarf_Word mtime;
+ Dwarf_Word length;
+ const char *src = dwfl_lineinfo (line, &addr, &lineno, &colno,
+ &mtime, &length);
+
+ Dwarf_Addr dw_bias;
+ Dwarf_Line *dw_line = dwfl_dwarf_line (line, &dw_bias);
+ assert (bias == dw_bias);
+
+ Dwarf_Addr dw_addr;
+ if (dwarf_lineaddr (dw_line, &dw_addr) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_lineaddr: %s",
+ dwarf_errmsg (-1));
+ assert (addr == dw_addr + dw_bias);
+
+ unsigned int dw_op_index;
+ if (dwarf_lineop_index (dw_line, &dw_op_index) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_lineop_index: %s",
+ dwarf_errmsg (-1));
+
+ int dw_lineno;
+ if (dwarf_lineno (dw_line, &dw_lineno) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_lineno: %s",
+ dwarf_errmsg (-1));
+ assert (lineno == dw_lineno);
+
+ int dw_colno;
+ if (dwarf_linecol (dw_line, &dw_colno) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_lineno: %s",
+ dwarf_errmsg (-1));
+ assert (colno == dw_colno);
+
+ bool begin;
+ if (dwarf_linebeginstatement (dw_line, &begin) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_linebeginstatement: %s",
+ dwarf_errmsg (-1));
+
+ bool end;
+ if (dwarf_lineendsequence (dw_line, &end) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_lineendsequence: %s",
+ dwarf_errmsg (-1));
+
+ bool pend;
+ if (dwarf_lineprologueend (dw_line, &pend) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_lineprologueend: %s",
+ dwarf_errmsg (-1));
+
+ bool ebegin;
+ if (dwarf_lineepiloguebegin (dw_line, &ebegin) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_lineepiloguebegin: %s",
+ dwarf_errmsg (-1));
+
+ bool block;
+ if (dwarf_lineblock (dw_line, &block) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_lineblock: %s",
+ dwarf_errmsg (-1));
+
+ unsigned int isa;
+ if (dwarf_lineisa (dw_line, &isa) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_lineisa: %s",
+ dwarf_errmsg (-1));
+
+ unsigned int disc;
+ if (dwarf_linediscriminator (dw_line, &disc) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_linediscriminator: %s",
+ dwarf_errmsg (-1));
+
+ const char *dw_src;
+ Dwarf_Word dw_mtime;
+ Dwarf_Word dw_length;
+ dw_src = dwarf_linesrc (dw_line, &dw_mtime, &dw_length);
+ assert (strcmp (src, dw_src) == 0);
+ assert (mtime == dw_mtime);
+ assert (length == dw_length);
+
+ printf ("%zd %#" PRIx64 " %s:%d:%d\n"
+ " time: %#" PRIX64 ", len: %" PRIu64
+ ", idx: %d, b: %d, e: %d"
+ ", pe: %d, eb: %d, block: %d"
+ ", isa: %d, disc: %d\n",
+ i, addr, src, lineno, colno, mtime, length,
+ dw_op_index, begin, end, pend, ebegin, block, isa, disc);
+
+ Dwarf_Die *linecu = dwfl_linecu (line);
+ assert (cu == linecu);
+
+ Dwfl_Module *linemod = dwfl_linemodule (line);
+ assert (mod == linemod);
+ }
+ }
+ }
+ while (cu != NULL);
+
+ dwfl_end (dwfl);
+
+ return 0;
+}
diff --git a/src/tests/dwflmodtest.c b/src/tests/dwflmodtest.c
new file mode 100644
index 00000000..0027f96b
--- /dev/null
+++ b/src/tests/dwflmodtest.c
@@ -0,0 +1,287 @@
+/* Test program for libdwfl basic module tracking, relocation.
+ Copyright (C) 2005, 2007 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <stdlib.h>
+#include <string.h>
+#include <error.h>
+#include <locale.h>
+#include <argp.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+
+static bool show_inlines;
+
+struct info
+{
+ Dwarf_Die *cudie;
+ Dwarf_Addr dwbias;
+};
+
+static int
+print_instance (Dwarf_Die *instance, void *arg)
+{
+ const struct info *info = arg;
+
+ printf (" inlined");
+
+ Dwarf_Files *files;
+ if (dwarf_getsrcfiles (info->cudie, &files, NULL) == 0)
+ {
+ Dwarf_Attribute attr_mem;
+ Dwarf_Word val;
+ if (dwarf_formudata (dwarf_attr (instance, DW_AT_call_file,
+ &attr_mem), &val) == 0)
+ {
+ const char *file = dwarf_filesrc (files, val, NULL, NULL);
+ int lineno = 0, colno = 0;
+ if (dwarf_formudata (dwarf_attr (instance, DW_AT_call_line,
+ &attr_mem), &val) == 0)
+ lineno = val;
+ if (dwarf_formudata (dwarf_attr (instance, DW_AT_call_column,
+ &attr_mem), &val) == 0)
+ colno = val;
+ if (lineno == 0)
+ {
+ if (file != NULL)
+ printf (" from %s", file);
+ }
+ else if (colno == 0)
+ printf (" at %s:%u", file, lineno);
+ else
+ printf (" at %s:%u:%u", file, lineno, colno);
+ }
+ }
+
+ Dwarf_Addr lo = -1, hi = -1, entry = -1;
+ if (dwarf_lowpc (instance, &lo) == 0)
+ lo += info->dwbias;
+ else
+ printf (" (lowpc => %s)", dwarf_errmsg (-1));
+ if (dwarf_highpc (instance, &hi) == 0)
+ hi += info->dwbias;
+ else
+ printf (" (highpc => %s)", dwarf_errmsg (-1));
+
+ Dwarf_Attribute attr_mem;
+ Dwarf_Attribute *attr = dwarf_attr (instance, DW_AT_entry_pc, &attr_mem);
+ if (attr != NULL)
+ {
+ if (dwarf_formaddr (attr, &entry) == 0)
+ entry += info->dwbias;
+ else
+ printf (" (entrypc => %s)", dwarf_errmsg (-1));
+ }
+
+ if (lo != (Dwarf_Addr) -1 || hi != (Dwarf_Addr) -1)
+ printf (" %#" PRIx64 "..%#" PRIx64, lo, hi);
+ if (entry != (Dwarf_Addr) -1)
+ printf (" => %#" PRIx64 "\n", entry);
+ else
+ puts ("");
+
+ return DWARF_CB_OK;
+}
+
+static void
+print_inline (Dwarf_Die *func, void *arg)
+{
+ if (dwarf_func_inline_instances (func, &print_instance, arg) != 0)
+ printf (" error finding instances: %s\n", dwarf_errmsg (-1));
+}
+
+static int
+print_func (Dwarf_Die *func, void *arg)
+{
+ const struct info *info = arg;
+
+ const char *file = dwarf_decl_file (func);
+ int line = -1;
+ dwarf_decl_line (func, &line);
+ const char *fct = dwarf_diename (func);
+
+ printf (" %s:%d: %s:", file, line, fct);
+
+ if (dwarf_func_inline (func))
+ {
+ puts (" inline function");
+ if (show_inlines)
+ print_inline (func, arg);
+ }
+ else
+ {
+ Dwarf_Addr lo = -1, hi = -1, entry = -1;
+ if (dwarf_lowpc (func, &lo) == 0)
+ lo += info->dwbias;
+ else
+ printf (" (lowpc => %s)", dwarf_errmsg (-1));
+ if (dwarf_highpc (func, &hi) == 0)
+ hi += info->dwbias;
+ else
+ printf (" (highpc => %s)", dwarf_errmsg (-1));
+ if (dwarf_entrypc (func, &entry) == 0)
+ entry += info->dwbias;
+ else
+ printf (" (entrypc => %s)", dwarf_errmsg (-1));
+
+ if (lo != (Dwarf_Addr) -1 || hi != (Dwarf_Addr) -1
+ || entry != (Dwarf_Addr) -1)
+ printf (" %#" PRIx64 "..%#" PRIx64 " => %#" PRIx64 "\n",
+ lo, hi, entry);
+ else
+ puts ("");
+ }
+
+ return DWARF_CB_OK;
+}
+
+static int
+list_module (Dwfl_Module *mod __attribute__ ((unused)),
+ void **userdata __attribute__ ((unused)),
+ const char *name, Dwarf_Addr base,
+ void *arg __attribute__ ((unused)))
+{
+ Dwarf_Addr start;
+ Dwarf_Addr end;
+ const char *file;
+ const char *debug;
+ if (dwfl_module_info (mod, NULL, &start, &end,
+ NULL, NULL, &file, &debug) != name
+ || start != base)
+ abort ();
+ printf ("module: %30s %08" PRIx64 "..%08" PRIx64 " %s %s\n",
+ name, start, end, file, debug);
+ return DWARF_CB_OK;
+}
+
+static int
+print_module (Dwfl_Module *mod __attribute__ ((unused)),
+ void **userdata __attribute__ ((unused)),
+ const char *name, Dwarf_Addr base,
+ Dwarf *dw, Dwarf_Addr bias,
+ void *arg)
+{
+ printf ("module: %30s %08" PRIx64 " %s %" PRIx64 " (%s)\n",
+ name, base, dw == NULL ? "no" : "DWARF", bias, dwfl_errmsg (-1));
+
+ if (dw != NULL && *(const bool *) arg)
+ {
+ Dwarf_Off off = 0;
+ size_t cuhl;
+ Dwarf_Off noff;
+
+ while (dwarf_nextcu (dw, off, &noff, &cuhl, NULL, NULL, NULL) == 0)
+ {
+ Dwarf_Die die_mem;
+ struct info info = { dwarf_offdie (dw, off + cuhl, &die_mem), bias };
+ (void) dwarf_getfuncs (info.cudie, print_func, &info, 0);
+
+ off = noff;
+ }
+ }
+
+ return DWARF_CB_OK;
+}
+
+static bool show_functions;
+
+/* gettext helper macro. */
+#undef N_
+#define N_(Str) Str
+
+static const struct argp_option options[] =
+ {
+ { "functions", 'f', NULL, 0, N_("Additionally show function names"), 0 },
+ { "inlines", 'i', NULL, 0, N_("Show instances of inlined functions"), 0 },
+ { NULL, 0, NULL, 0, NULL, 0 }
+ };
+
+static error_t
+parse_opt (int key, char *arg __attribute__ ((unused)),
+ struct argp_state *state __attribute__ ((unused)))
+{
+ switch (key)
+ {
+ case ARGP_KEY_INIT:
+ state->child_inputs[0] = state->input;
+ break;
+
+ case 'f':
+ show_functions = true;
+ break;
+
+ case 'i':
+ show_inlines = show_functions = true;
+ break;
+
+ default:
+ return ARGP_ERR_UNKNOWN;
+ }
+ return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+ /* We use no threads here which can interfere with handling a stream. */
+ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ Dwfl *dwfl = NULL;
+ const struct argp_child argp_children[] =
+ {
+ { .argp = dwfl_standard_argp () },
+ { .argp = NULL }
+ };
+ const struct argp argp =
+ {
+ options, parse_opt, NULL, NULL, argp_children, NULL, NULL
+ };
+ (void) argp_parse (&argp, argc, argv, 0, NULL, &dwfl);
+ assert (dwfl != NULL);
+
+ ptrdiff_t p = 0;
+ do
+ p = dwfl_getmodules (dwfl, &list_module, NULL, p);
+ while (p > 0);
+ if (p < 0)
+ error (2, 0, "dwfl_getmodules: %s", dwfl_errmsg (-1));
+
+ do
+ p = dwfl_getdwarf (dwfl, &print_module, &show_functions, p);
+ while (p > 0);
+ if (p < 0)
+ error (2, 0, "dwfl_getdwarf: %s", dwfl_errmsg (-1));
+
+ p = 0;
+ do
+ p = dwfl_getmodules (dwfl, &list_module, NULL, p);
+ while (p > 0);
+ if (p < 0)
+ error (2, 0, "dwfl_getmodules: %s", dwfl_errmsg (-1));
+
+ dwfl_end (dwfl);
+
+ return 0;
+}
diff --git a/src/tests/dwflsyms.c b/src/tests/dwflsyms.c
new file mode 100644
index 00000000..49ac3346
--- /dev/null
+++ b/src/tests/dwflsyms.c
@@ -0,0 +1,226 @@
+/* Test program for libdwfl symbol resolving
+ Copyright (C) 2013 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <elf.h>
+#include <dwarf.h>
+#include <argp.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <stdlib.h>
+#include <error.h>
+#include <string.h>
+
+static const char *
+gelf_type (GElf_Sym *sym)
+{
+ switch (GELF_ST_TYPE (sym->st_info))
+ {
+ case STT_NOTYPE:
+ return "NOTYPE";
+ case STT_OBJECT:
+ return "OBJECT";
+ case STT_FUNC:
+ return "FUNC";
+ case STT_SECTION:
+ return "SECTION";
+ case STT_FILE:
+ return "FILE";
+ case STT_COMMON:
+ return "COMMON";
+ case STT_TLS:
+ return "TLS";
+ default:
+ return "UNKNOWN";
+ }
+}
+
+static const char *
+gelf_bind (GElf_Sym *sym)
+{
+ switch (GELF_ST_BIND (sym->st_info))
+ {
+ case STB_LOCAL:
+ return "LOCAL";
+ case STB_GLOBAL:
+ return "GLOBAL";
+ case STB_WEAK:
+ return "WEAK";
+ default:
+ return "UNKNOWN";
+ }
+}
+
+static int
+gelf_bind_order (GElf_Sym *sym)
+{
+ switch (GELF_ST_BIND (sym->st_info))
+ {
+ case STB_LOCAL:
+ return 1;
+ case STB_WEAK:
+ return 2;
+ case STB_GLOBAL:
+ return 3;
+ default:
+ return 0;
+ }
+}
+
+static const char *
+elf_section_name (Elf *elf, GElf_Word shndx)
+{
+ GElf_Ehdr ehdr;
+ GElf_Shdr shdr;
+ Elf_Scn *scn = elf_getscn (elf, shndx);
+ gelf_getshdr (scn, &shdr);
+ gelf_getehdr (elf, &ehdr);
+ return elf_strptr (elf, ehdr.e_shstrndx, shdr.sh_name);
+}
+
+bool
+addr_in_section (Elf *elf, GElf_Word shndx, GElf_Addr addr)
+{
+ GElf_Shdr shdr;
+ Elf_Scn *scn = elf_getscn (elf, shndx);
+ gelf_getshdr (scn, &shdr);
+ return addr >= shdr.sh_addr && addr < shdr.sh_addr + shdr.sh_size;
+}
+
+static int
+list_syms (struct Dwfl_Module *mod,
+ void **user __attribute__ ((unused)), const char *mod_name,
+ Dwarf_Addr low_addr __attribute__ ((unused)),
+ void *arg __attribute__ ((unused)))
+{
+ int syms = dwfl_module_getsymtab (mod);
+ if (syms < 0)
+ {
+ printf ("%s: %s\n", mod_name, dwfl_errmsg (-1));
+ return DWARF_CB_OK;
+ }
+
+ for (int ndx = 0; ndx < syms; ndx++)
+ {
+ GElf_Sym sym;
+ GElf_Word shndxp;
+ Elf *elf;
+ Dwarf_Addr bias;
+ const char *name = dwfl_module_getsym (mod, ndx, &sym, &shndxp);
+
+ printf("%4d: %s\t%s\t%s (%" PRIu64 ") %#" PRIx64,
+ ndx, gelf_type (&sym), gelf_bind (&sym), name,
+ sym.st_size, sym.st_value);
+
+ /* The info variant doesn't adjust st_value but returns the (possible)
+ adjusted value separately. */
+ GElf_Addr value;
+ GElf_Sym isym;
+ name = dwfl_module_getsym_info (mod, ndx, &isym, &value, &shndxp,
+ &elf, &bias);
+
+ GElf_Ehdr ehdr;
+ gelf_getehdr (elf, &ehdr);
+
+ // getsym st_values might or might not be adjusted depending on section.
+ // For ET_REL the adjustment is section relative.
+ assert (sym.st_value == isym.st_value
+ || sym.st_value == isym.st_value + bias
+ || ehdr.e_type == ET_REL);
+
+ /* And the reverse, which works for function symbols at least.
+ Note this only works because the st.value is adjusted by
+ dwfl_module_getsym (). */
+ if (GELF_ST_TYPE (sym.st_info) == STT_FUNC && shndxp != SHN_UNDEF)
+ {
+ /* Make sure the adjusted value really falls in the elf section. */
+ assert (addr_in_section (elf, shndxp, sym.st_value - bias));
+
+ GElf_Addr addr = value;
+ GElf_Sym asym;
+ GElf_Word ashndxp;
+ Elf *aelf;
+ Dwarf_Addr abias;
+ GElf_Off off;
+ const char *aname = dwfl_module_addrinfo (mod, addr, &off, &asym,
+ &ashndxp, &aelf, &abias);
+
+ /* Make sure the adjusted value really falls in the elf section. */
+ assert (addr_in_section (aelf, ashndxp, asym.st_value)
+ || ehdr.e_type == ET_REL);
+
+ /* Either they are the same symbol (name), the binding of
+ asym is "stronger" (or equal) to sym or asym is more specific
+ (has a lower address) than sym. */
+ assert ((strcmp (name, aname) == 0
+ || gelf_bind_order (&asym) >= gelf_bind_order (&sym))
+ && value <= sym.st_value);
+
+ addr = sym.st_value;
+ int res = dwfl_module_relocate_address (mod, &addr);
+ assert (res != -1);
+ if (shndxp < SHN_LORESERVE)
+ printf(", rel: %#" PRIx64 " (%s)", addr,
+ elf_section_name (elf, shndxp));
+ else
+ printf(", rel: %#" PRIx64 "", addr);
+
+ /* Print the section of the actual value if different from sym. */
+ if (value != isym.st_value + bias && ehdr.e_type != ET_REL)
+ {
+ GElf_Addr ebias;
+ addr = value;
+ Elf_Scn *scn = dwfl_module_address_section (mod, &addr, &ebias);
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
+ Elf *melf = dwfl_module_getelf (mod, &ebias);
+ gelf_getehdr (melf, &ehdr);
+ const char *sname = elf_strptr (melf, ehdr.e_shstrndx,
+ shdr->sh_name);
+ printf (" [%#" PRIx64 ", rel: %#" PRIx64 " (%s)]",
+ value, addr, sname);
+ }
+
+ }
+ printf ("\n");
+ }
+
+ return DWARF_CB_OK;
+}
+
+int
+main (int argc, char *argv[])
+{
+ int remaining;
+ Dwfl *dwfl;
+ error_t res;
+
+ res = argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl);
+ assert (res == 0 && dwfl != NULL);
+
+ ptrdiff_t off = 0;
+ do
+ off = dwfl_getmodules (dwfl, list_syms, NULL, off);
+ while (off > 0);
+
+ dwfl_end (dwfl);
+
+ return off;
+}
diff --git a/src/tests/early-offscn.c b/src/tests/early-offscn.c
new file mode 100644
index 00000000..924cb9ef
--- /dev/null
+++ b/src/tests/early-offscn.c
@@ -0,0 +1,52 @@
+/* Copyright (C) 2008 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <errno.h>
+#include <error.h>
+#include <fcntl.h>
+#include <gelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main (int argc, char *argv[])
+{
+ if (argc < 2)
+ error (1, 0, "Usage: %s FILE OFFSET", argv[0]);
+
+ /* Set the ELF version. */
+ elf_version (EV_CURRENT);
+
+ /* Open the archive. */
+ int fd = open (argv[1], O_RDONLY);
+ if (fd < 0)
+ error (1, errno, "cannot open '%s'", argv[1]);
+
+ Elf *elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ error (2, 0, "elf_begin: %s", elf_errmsg (-1));
+
+ Elf_Scn *scn = gelf_offscn (elf, strtoull (argv[2], NULL, 0));
+ if (scn == NULL)
+ error (3, 0, "gelf_offscn: %s", elf_errmsg (-1));
+
+ elf_end (elf);
+ return 0;
+}
diff --git a/src/tests/ecp.c b/src/tests/ecp.c
new file mode 100644
index 00000000..39a48510
--- /dev/null
+++ b/src/tests/ecp.c
@@ -0,0 +1,95 @@
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <error.h>
+#include <fcntl.h>
+#include <gelf.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+int
+main (int argc, char *argv[])
+{
+ if (argc < 3)
+ error (EXIT_FAILURE, 0, "usage: %s FROMNAME TONAME", argv[0]);
+
+ elf_version (EV_CURRENT);
+
+ int infd = open (argv[1], O_RDONLY);
+ if (infd == -1)
+ error (EXIT_FAILURE, errno, "cannot open input file '%s'", argv[1]);
+
+ Elf *inelf = elf_begin (infd, ELF_C_READ, NULL);
+ if (inelf == NULL)
+ error (EXIT_FAILURE, 0, "problems opening '%s' as ELF file: %s",
+ argv[1], elf_errmsg (-1));
+
+ int outfd = creat (argv[2], 0666);
+ if (outfd == -1)
+ error (EXIT_FAILURE, errno, "cannot open output file '%s'", argv[2]);
+
+ Elf *outelf = elf_begin (outfd, ELF_C_WRITE, NULL);
+ if (outelf == NULL)
+ error (EXIT_FAILURE, 0, "problems opening '%s' as ELF file: %s",
+ argv[2], elf_errmsg (-1));
+
+ gelf_newehdr (outelf, gelf_getclass (inelf));
+
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr *ehdr;
+ gelf_update_ehdr (outelf, (ehdr = gelf_getehdr (inelf, &ehdr_mem)));
+
+ if (ehdr->e_phnum > 0)
+ {
+ int cnt;
+
+ if (gelf_newphdr (outelf, ehdr->e_phnum) == 0)
+ error (EXIT_FAILURE, 0, "cannot create program header: %s",
+ elf_errmsg (-1));
+
+ for (cnt = 0; cnt < ehdr->e_phnum; ++cnt)
+ {
+ GElf_Phdr phdr_mem;
+
+ gelf_update_phdr (outelf, cnt, gelf_getphdr (inelf, cnt, &phdr_mem));
+ }
+ }
+
+ Elf_Scn *scn = NULL;
+ while ((scn = elf_nextscn (inelf, scn)) != NULL)
+ {
+ Elf_Scn *newscn = elf_newscn (outelf);
+
+ GElf_Shdr shdr_mem;
+ gelf_update_shdr (newscn, gelf_getshdr (scn, &shdr_mem));
+
+ *elf_newdata (newscn) = *elf_getdata (scn, NULL);
+ }
+
+ elf_flagelf (outelf, ELF_C_SET, ELF_F_LAYOUT);
+
+ if (elf_update (outelf, ELF_C_WRITE) == -1)
+ error (EXIT_FAILURE, 0, "elf_update failed: %s", elf_errmsg (-1));
+
+ elf_end (outelf);
+ close (outfd);
+
+ elf_end (inelf);
+
+ return 0;
+}
diff --git a/src/tests/find-prologues.c b/src/tests/find-prologues.c
new file mode 100644
index 00000000..ba8ae371
--- /dev/null
+++ b/src/tests/find-prologues.c
@@ -0,0 +1,108 @@
+/* Test program for dwarf_entry_breakpoints.
+ Copyright (C) 2005 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+#include <argp.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <error.h>
+#include <string.h>
+#include <fnmatch.h>
+
+
+struct args
+{
+ Dwfl *dwfl;
+ Dwarf_Die *cu;
+ Dwarf_Addr dwbias;
+ char **argv;
+};
+
+static int
+handle_function (Dwarf_Die *func, void *arg)
+{
+ struct args *a = arg;
+
+ const char *name = dwarf_diename (func);
+ char **argv = a->argv;
+ if (argv[0] != NULL)
+ {
+ bool match;
+ do
+ match = fnmatch (*argv, name, 0) == 0;
+ while (!match && *++argv);
+ if (!match)
+ return 0;
+ }
+
+ if (dwarf_func_inline (func))
+ return 0;
+
+ Dwarf_Addr entrypc;
+ if (dwarf_entrypc (func, &entrypc) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_entrypc: %s: %s",
+ dwarf_diename (func), dwarf_errmsg (-1));
+ entrypc += a->dwbias;
+
+ printf ("%-16s %#.16" PRIx64, dwarf_diename (func), entrypc);
+
+ Dwarf_Addr *bkpts = NULL;
+ int result = dwarf_entry_breakpoints (func, &bkpts);
+ if (result <= 0)
+ printf ("\t%s\n", dwarf_errmsg (-1));
+ else
+ {
+ for (int i = 0; i < result; ++i)
+ printf (" %#.16" PRIx64 "%s", bkpts[i] + a->dwbias,
+ i == result - 1 ? "\n" : "");
+ free (bkpts);
+ }
+
+ return 0;
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ int remaining;
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ struct args a = { .dwfl = NULL, .cu = NULL };
+
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining,
+ &a.dwfl);
+ assert (a.dwfl != NULL);
+ a.argv = &argv[remaining];
+
+ int result = 0;
+
+ while ((a.cu = dwfl_nextcu (a.dwfl, a.cu, &a.dwbias)) != NULL)
+ dwarf_getfuncs (a.cu, &handle_function, &a, 0);
+
+ dwfl_end (a.dwfl);
+
+ return result;
+}
diff --git a/src/tests/funcretval.c b/src/tests/funcretval.c
new file mode 100644
index 00000000..8d19d117
--- /dev/null
+++ b/src/tests/funcretval.c
@@ -0,0 +1,106 @@
+/* Test program for dwfl_module_return_value_location.
+ Copyright (C) 2005 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+#include <argp.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <error.h>
+#include <string.h>
+#include <fnmatch.h>
+
+
+struct args
+{
+ Dwfl *dwfl;
+ Dwarf_Die *cu;
+ Dwarf_Addr dwbias;
+ char **argv;
+};
+
+static int
+handle_function (Dwarf_Die *funcdie, void *arg)
+{
+ struct args *a = arg;
+
+ const char *name = dwarf_diename (funcdie);
+ char **argv = a->argv;
+ if (argv[0] != NULL)
+ {
+ bool match;
+ do
+ match = fnmatch (*argv, name, 0) == 0;
+ while (!match && *++argv);
+ if (!match)
+ return 0;
+ }
+
+ printf ("(%s) %s: ", dwfl_module_info (dwfl_cumodule (a->cu), NULL,
+ NULL, NULL,
+ NULL, NULL,
+ NULL, NULL), name);
+
+ const Dwarf_Op *locops;
+ int nlocops = dwfl_module_return_value_location (dwfl_cumodule (a->cu),
+ funcdie, &locops);
+ if (nlocops < 0)
+ error (EXIT_FAILURE, 0, "dwfl_module_return_value_location: %s",
+ dwfl_errmsg (-1));
+ else if (nlocops == 0)
+ puts ("returns no value");
+ else
+ {
+ printf ("return value location:");
+ for (int i = 0; i < nlocops; ++i)
+ printf (" {%#x, %#" PRIx64 "}", locops[i].atom, locops[i].number);
+ puts ("");
+ }
+
+ return 0;
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ int remaining;
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ struct args a = { .dwfl = NULL, .cu = NULL };
+
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining,
+ &a.dwfl);
+ assert (a.dwfl != NULL);
+ a.argv = &argv[remaining];
+
+ int result = 0;
+
+ while ((a.cu = dwfl_nextcu (a.dwfl, a.cu, &a.dwbias)) != NULL)
+ dwarf_getfuncs (a.cu, &handle_function, &a, 0);
+
+ dwfl_end (a.dwfl);
+
+ return result;
+}
diff --git a/src/tests/funcretval_test.c b/src/tests/funcretval_test.c
new file mode 100644
index 00000000..7e20f526
--- /dev/null
+++ b/src/tests/funcretval_test.c
@@ -0,0 +1,828 @@
+signed char fun_char (void) { return 5; }
+short fun_short (void) { return 6; }
+int fun_int (void) { return 7; }
+void *fun_ptr (void) { return &fun_ptr; }
+int fun_iptr (void) { return 8; }
+long fun_long (void) { return 9; }
+__int128 fun_int128 (void) { return 10; }
+
+typedef struct { int i[10]; } large_struct1_t;
+large_struct1_t fun_large_struct1 (void) {
+ large_struct1_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } };
+ return ret;
+}
+
+typedef struct { int i1; int i2; int i3; int i4; int i5;
+ int i6; int i7; int i8; int i9; int i10; } large_struct2_t;
+large_struct2_t fun_large_struct2 (void) {
+ large_struct2_t ret = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
+ return ret;
+}
+
+float fun_float (void) { return 1.5; }
+float _Complex fun_float_complex (void) { return 1.5 + 2.5i; }
+
+double fun_double (void) { return 2.5; }
+double _Complex fun_double_complex (void) { return 2.5 + 3.5i; }
+
+long double fun_long_double (void) { return 3.5; }
+long double _Complex fun_long_double_complex (void) { return 4.5 + 5.5i; }
+
+#ifdef FLOAT128
+__float128 fun_float128 (void) { return 3.5; }
+#endif
+
+// 8 byte vectors.
+
+typedef signed char __attribute__ ((vector_size (8))) vec_char_8_t;
+vec_char_8_t fun_vec_char_8 (void) {
+ vec_char_8_t ret = { 1, 2, 3, 4, 5, 6, 7, 8 };
+ return ret;
+}
+
+typedef short __attribute__ ((vector_size (8))) vec_short_8_t;
+vec_short_8_t fun_vec_short_8 (void) {
+ vec_short_8_t ret = { 2, 3, 4, 5 };
+ return ret;
+}
+
+typedef int __attribute__ ((vector_size (8))) vec_int_8_t;
+vec_int_8_t fun_vec_int_8 (void) {
+ vec_int_8_t ret = { 3, 4 };
+ return ret;
+}
+
+typedef long __attribute__ ((vector_size (8))) vec_long_8_t;
+vec_long_8_t fun_vec_long_8 (void) {
+ vec_long_8_t ret = { 5 };
+ return ret;
+}
+
+typedef float __attribute__ ((vector_size (8))) vec_float_8_t;
+vec_float_8_t fun_vec_float_8 (void) {
+ vec_float_8_t ret = { 1.5, 2.5 };
+ return ret;
+}
+
+typedef double __attribute__ ((vector_size (8))) vec_double_8_t;
+#ifndef AARCH64_BUG_1032854
+// https://bugzilla.redhat.com/show_bug.cgi?id=1032854
+vec_double_8_t fun_vec_double_8 (void) {
+ vec_double_8_t ret = { 3.5 };
+ return ret;
+}
+#endif
+
+// 16 byte vectors.
+
+typedef signed char __attribute__ ((vector_size (16))) vec_char_16_t;
+vec_char_16_t fun_vec_char_16 (void) {
+ vec_char_16_t ret = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
+ return ret;
+}
+
+typedef short __attribute__ ((vector_size (16))) vec_short_16_t;
+vec_short_16_t fun_vec_short_16 (void) {
+ vec_short_16_t ret = { 2, 3, 4, 5, 6, 7, 8 };
+ return ret;
+}
+
+typedef int __attribute__ ((vector_size (16))) vec_int_16_t;
+vec_int_16_t fun_vec_int_16 (void) {
+ vec_int_16_t ret = { 2, 3, 4 };
+ return ret;
+}
+
+typedef long __attribute__ ((vector_size (16))) vec_long_16_t;
+vec_long_16_t fun_vec_long_16 (void) {
+ vec_long_16_t ret = { 3, 4 };
+ return ret;
+}
+
+typedef __int128 __attribute__ ((vector_size (16))) vec_int128_16_t;
+vec_int128_16_t fun_vec_int128_16 (void) {
+ vec_int128_16_t ret = { 999 };
+ return ret;
+}
+
+typedef float __attribute__ ((vector_size (16))) vec_float_16_t;
+vec_float_16_t fun_vec_float_16 (void) {
+ vec_float_16_t ret = { 1.5, 2.5, 3.5, 4.5 };
+ return ret;
+}
+
+typedef double __attribute__ ((vector_size (16))) vec_double_16_t;
+vec_double_16_t fun_vec_double_16 (void) {
+ vec_double_16_t ret = { 2.5, 5 };
+ return ret;
+}
+
+#ifdef FLOAT128
+typedef __float128 __attribute__ ((vector_size (16))) vec_float128_16_t;
+vec_float128_16_t fun_vec_float128_16 (void) {
+ vec_float128_16_t ret = { 7.5 };
+ return ret;
+}
+#endif
+
+// Homogeneous floating-point aggregates.
+
+typedef struct { float f; } hfa1_float_t;
+hfa1_float_t fun_hfa1_float (void) {
+ hfa1_float_t ret = { 1.5 };
+ return ret;
+}
+
+typedef struct { double f; } hfa1_double_t;
+hfa1_double_t fun_hfa1_double (void) {
+ hfa1_double_t ret = { 3.0 };
+ return ret;
+}
+
+typedef struct { long double f; } hfa1_long_double_t;
+hfa1_long_double_t fun_hfa1_long_double (void) {
+ hfa1_long_double_t ret = { 3.0 };
+ return ret;
+}
+
+typedef struct { float f[1]; } hfa1_float_a_t;
+hfa1_float_a_t fun_hfa1_float_a (void) {
+ hfa1_float_a_t ret = { { 1.5 } };
+ return ret;
+}
+
+typedef struct { double f[1]; } hfa1_double_a_t;
+hfa1_double_a_t fun_hfa1_double_a (void) {
+ hfa1_double_a_t ret = { { 3.0 } };
+ return ret;
+}
+
+typedef struct { long double f[1]; } hfa1_long_double_a_t;
+hfa1_long_double_a_t fun_hfa1_long_double_a (void) {
+ hfa1_long_double_a_t ret = { { 3.0 } };
+ return ret;
+}
+
+typedef struct { float f; float g; } hfa2_float_t;
+hfa2_float_t fun_hfa2_float (void) {
+ hfa2_float_t ret = { 1.5, 3.0 };
+ return ret;
+}
+
+typedef struct { double f; double g; } hfa2_double_t;
+hfa2_double_t fun_hfa2_double (void) {
+ hfa2_double_t ret = { 3.0, 4.5 };
+ return ret;
+}
+
+typedef struct { long double f; long double g; } hfa2_long_double_t;
+hfa2_long_double_t fun_hfa2_long_double (void) {
+ hfa2_long_double_t ret = { 3.0, 4.5 };
+ return ret;
+}
+
+typedef struct { float f[2]; } hfa2_float_a_t;
+hfa2_float_a_t fun_hfa2_float_a (void) {
+ hfa2_float_a_t ret = { { 2.5, 3.5 } };
+ return ret;
+}
+
+typedef struct { double f[2]; } hfa2_double_a_t;
+hfa2_double_a_t fun_hfa2_double_a (void) {
+ hfa2_double_a_t ret = { { 3.0, 3.5 } };
+ return ret;
+}
+
+typedef struct { long double f[2]; } hfa2_long_double_a_t;
+hfa2_long_double_a_t fun_hfa2_long_double_a (void) {
+ hfa2_long_double_a_t ret = { { 3.0, 4.0 } };
+ return ret;
+}
+
+typedef struct { float f; float g; float h; } hfa3_float_t;
+hfa3_float_t fun_hfa3_float (void) {
+ hfa3_float_t ret = { 1.5, 3.0, 4.5 };
+ return ret;
+}
+
+typedef struct { double f; double g; double h; } hfa3_double_t;
+hfa3_double_t fun_hfa3_double (void) {
+ hfa3_double_t ret = { 3.0, 4.5, 9.5 };
+ return ret;
+}
+
+typedef struct { long double f; long double g; long double h; } hfa3_long_double_t;
+hfa3_long_double_t fun_hfa3_long_double (void) {
+ hfa3_long_double_t ret = { 3.0, 4.5, 9.5 };
+ return ret;
+}
+
+typedef struct { float f[3]; } hfa3_float_a_t;
+hfa3_float_a_t fun_hfa3_float_a (void) {
+ hfa3_float_a_t ret = { { 3.5, 4.5, 5.5 } };
+ return ret;
+}
+
+typedef struct { double f[3]; } hfa3_double_a_t;
+hfa3_double_a_t fun_hfa3_double_a (void) {
+ hfa3_double_a_t ret = { { 3.0, 3.5, 4.0 } };
+ return ret;
+}
+
+typedef struct { long double f[3]; } hfa3_long_double_a_t;
+hfa3_long_double_a_t fun_hfa3_long_double_a (void) {
+ hfa3_long_double_a_t ret = { { 3.0, 4.0, 5.0 } };
+ return ret;
+}
+
+typedef struct { float f; float g; float h; float i; } hfa4_float_t;
+hfa4_float_t fun_hfa4_float (void) {
+ hfa4_float_t ret = { 1.5, 3.5, 4.5, 9.5 };
+ return ret;
+}
+
+typedef struct { double f; double g; double h; double i; } hfa4_double_t;
+hfa4_double_t fun_hfa4_double (void) {
+ hfa4_double_t ret = { 3.5, 4.5, 9.5, 1.5 };
+ return ret;
+}
+
+typedef struct { long double f; long double g; long double h; long double i; } hfa4_long_double_t;
+hfa4_long_double_t fun_hfa4_long_double (void) {
+ hfa4_long_double_t ret = { 3.5, 4.5, 9.5, 1.5 };
+ return ret;
+}
+
+typedef struct { float f[4]; } hfa4_float_a_t;
+hfa4_float_a_t fun_hfa4_float_a (void) {
+ hfa4_float_a_t ret = { { 4.5, 5.5, 6.5, 7.5 } };
+ return ret;
+}
+
+typedef struct { double f[4]; } hfa4_double_a_t;
+hfa4_double_a_t fun_hfa4_double_a (void) {
+ hfa4_double_a_t ret = { { 3.0, 4.5, 5.0, 5.5 } };
+ return ret;
+}
+
+typedef struct { long double f[4]; } hfa4_long_double_a_t;
+hfa4_long_double_a_t fun_hfa4_long_double_a (void) {
+ hfa4_long_double_a_t ret = { { 3.0, 4.0, 5.0, 6.0 } };
+ return ret;
+}
+
+typedef struct { float f; float g; float h; float i; float j; } nfa5_float_t;
+nfa5_float_t fun_nfa5_float (void) {
+ nfa5_float_t ret = { 1.5, 3.5, 4.5, 9.5, 10.5 };
+ return ret;
+}
+
+typedef struct { double f; double g; double h; double i; double j; } nfa5_double_t;
+nfa5_double_t fun_nfa5_double (void) {
+ nfa5_double_t ret = { 3.5, 4.5, 9.5, 1.5, 2.5 };
+ return ret;
+}
+
+typedef struct { long double f; long double g; long double h; long double i; long double j; } nfa5_long_double_t;
+nfa5_long_double_t fun_nfa5_long_double (void) {
+ nfa5_long_double_t ret = { 3.5, 4.5, 9.5, 1.5, 2.5 };
+ return ret;
+}
+
+typedef struct { float f[5]; } nfa5_float_a_t;
+nfa5_float_a_t fun_nfa5_float_a (void) {
+ nfa5_float_a_t ret = { { 4.5, 5.5, 6.5, 7.5, 9.5 } };
+ return ret;
+}
+
+typedef struct { double f[5]; } nfa5_double_a_t;
+nfa5_double_a_t fun_nfa5_double_a (void) {
+ nfa5_double_a_t ret = { { 3.0, 4.5, 5.0, 5.5, 6.5 } };
+ return ret;
+}
+
+typedef struct { long double f[5]; } nfa5_long_double_a_t;
+nfa5_long_double_a_t fun_nfa5_long_double_a (void) {
+ nfa5_long_double_a_t ret = { { 3.0, 4.0, 5.0, 6.0, 7.0 } };
+ return ret;
+}
+
+#ifdef FLOAT128
+typedef struct { __float128 f; } hfa1_float128_t;
+hfa1_float128_t fun_hfa1_float128 (void) {
+ hfa1_float128_t ret = { 4.5 };
+ return ret;
+}
+
+typedef struct { __float128 f; __float128 g; } hfa2_float128_t;
+hfa2_float128_t fun_hfa2_float128 (void) {
+ hfa2_float128_t ret = { 4.5, 9.5 };
+ return ret;
+}
+
+typedef struct { __float128 f; __float128 g; __float128 h; } hfa3_float128_t;
+hfa3_float128_t fun_hfa3_float128 (void) {
+ hfa3_float128_t ret = { 4.5, 9.5, 12.5 };
+ return ret;
+}
+
+typedef struct { __float128 f; __float128 g; __float128 h; __float128 i; } hfa4_float128_t;
+hfa4_float128_t fun_hfa4_float128 (void) {
+ hfa4_float128_t ret = { 4.5, 9.5, 3.5, 1.5 };
+ return ret;
+}
+#endif
+
+// Homogeneous vector aggregates of 1 element.
+
+typedef struct { vec_char_8_t a; } hva1_vec_char_8_t;
+hva1_vec_char_8_t fun_hva1_vec_char_8 (void) {
+ hva1_vec_char_8_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8 } };
+ return ret;
+}
+
+typedef struct { vec_short_8_t a; } hva1_vec_short_8_t;
+hva1_vec_short_8_t fun_hva1_vec_short_8 (void) {
+ hva1_vec_short_8_t ret = { { 2, 3, 4, 5 } };
+ return ret;
+}
+
+typedef struct { vec_int_8_t a; } hva1_vec_int_8_t;
+hva1_vec_int_8_t fun_hva1_vec_int_8 (void) {
+ hva1_vec_int_8_t ret = { { 3, 4 } };
+ return ret;
+}
+
+typedef struct { vec_long_8_t a; } hva1_vec_long_8_t;
+hva1_vec_long_8_t fun_hva1_vec_long_8 (void) {
+ hva1_vec_long_8_t ret = { { 5 } };
+ return ret;
+}
+
+typedef struct { vec_float_8_t a; } hva1_vec_float_8_t;
+hva1_vec_float_8_t fun_hva1_vec_float_8 (void) {
+ hva1_vec_float_8_t ret = { { 1.5, 2.5 } };
+ return ret;
+}
+
+typedef struct { vec_double_8_t a; } hva1_vec_double_8_t;
+hva1_vec_double_8_t fun_hva1_vec_double_8 (void) {
+ hva1_vec_double_8_t ret = { { 3.5 } };
+ return ret;
+}
+
+typedef struct { vec_char_16_t a; } hva1_vec_char_16_t;
+hva1_vec_char_16_t fun_hva1_vec_char_16_t (void) {
+ hva1_vec_char_16_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16 } };
+ return ret;
+}
+
+typedef struct { vec_short_16_t a; } hva1_vec_short_16_t;
+hva1_vec_short_16_t fun_hva1_vec_short_16_t (void) {
+ hva1_vec_short_16_t ret = { { 2, 3, 4, 5, 6, 7, 8, 9 } };
+ return ret;
+}
+
+typedef struct { vec_int_16_t a; } hva1_vec_int_16_t;
+hva1_vec_int_16_t fun_hva1_vec_int_16_t (void) {
+ hva1_vec_int_16_t ret = { { 3, 4, 5, 6 } };
+ return ret;
+}
+
+typedef struct { vec_long_16_t a; } hva1_vec_long_16_t;
+hva1_vec_long_16_t fun_hva1_vec_long_16_t (void) {
+ hva1_vec_long_16_t ret = { { 4, 5 } };
+ return ret;
+}
+
+typedef struct { vec_int128_16_t a; } hva1_vec_int128_16_t;
+hva1_vec_int128_16_t fun_hva1_vec_int128_16_t (void) {
+ hva1_vec_int128_16_t ret = { { 6 } };
+ return ret;
+}
+
+typedef struct { vec_float_16_t a; } hva1_vec_float_16_t;
+hva1_vec_float_16_t fun_hva1_vec_float_16_t (void) {
+ hva1_vec_float_16_t ret = { { 1.5, 2.5, 3.5, 4.5 } };
+ return ret;
+}
+
+typedef struct { vec_double_16_t a; } hva1_vec_double_16_t;
+hva1_vec_double_16_t fun_hva1_vec_double_16_t (void) {
+ hva1_vec_double_16_t ret = { { 2.5, 3.5 } };
+ return ret;
+}
+
+#ifdef FLOAT128
+typedef struct { vec_float128_16_t a; } hva1_vec_float128_16_t;
+hva1_vec_float128_16_t fun_hva1_vec_float128_16_t (void) {
+ hva1_vec_float128_16_t ret = { { 4.5 } };
+ return ret;
+}
+#endif
+
+// Homogeneous vector aggregates of 2 elements.
+
+typedef struct { vec_char_8_t a; vec_char_8_t b; } hva2_vec_char_8_t;
+hva2_vec_char_8_t fun_hva2_vec_char_8 (void) {
+ hva2_vec_char_8_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8 },
+ { 2, 3, 4, 5, 6, 7, 8, 9 } };
+ return ret;
+}
+
+typedef struct { vec_short_8_t a; vec_short_8_t b; } hva2_vec_short_8_t;
+hva2_vec_short_8_t fun_hva2_vec_short_8 (void) {
+ hva2_vec_short_8_t ret = { { 2, 3, 4, 5 },
+ { 3, 4, 5, 6 } };
+ return ret;
+}
+
+typedef struct { vec_int_8_t a; vec_int_8_t b; } hva2_vec_int_8_t;
+hva2_vec_int_8_t fun_hva2_vec_int_8 (void) {
+ hva2_vec_int_8_t ret = { { 3, 4 },
+ { 4, 5 } };
+ return ret;
+}
+
+typedef struct { vec_long_8_t a; vec_long_8_t b; } hva2_vec_long_8_t;
+hva2_vec_long_8_t fun_hva2_vec_long_8 (void) {
+ hva2_vec_long_8_t ret = { { 5 },
+ { 6 } };
+ return ret;
+}
+
+typedef struct { vec_float_8_t a; vec_float_8_t b; } hva2_vec_float_8_t;
+hva2_vec_float_8_t fun_hva2_vec_float_8 (void) {
+ hva2_vec_float_8_t ret = { { 1.5, 2.5 },
+ { 2.5, 3.5 } };
+ return ret;
+}
+
+typedef struct { vec_double_8_t a; vec_double_8_t b; } hva2_vec_double_8_t;
+hva2_vec_double_8_t fun_hva2_vec_double_8 (void) {
+ hva2_vec_double_8_t ret = { { 3.5 },
+ { 4.5 } };
+ return ret;
+}
+
+typedef struct { vec_char_16_t a; vec_char_16_t b; } hva2_vec_char_16_t;
+hva2_vec_char_16_t fun_hva2_vec_char_16_t (void) {
+ hva2_vec_char_16_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16 },
+ { 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17 } };
+ return ret;
+}
+
+typedef struct { vec_short_16_t a; vec_short_16_t b; } hva2_vec_short_16_t;
+hva2_vec_short_16_t fun_hva2_vec_short_16_t (void) {
+ hva2_vec_short_16_t ret = { { 2, 3, 4, 5, 6, 7, 8, 9 },
+ { 3, 4, 5, 6, 7, 8, 9, 10 } };
+ return ret;
+}
+
+typedef struct { vec_int_16_t a; vec_int_16_t b; } hva2_vec_int_16_t;
+hva2_vec_int_16_t fun_hva2_vec_int_16_t (void) {
+ hva2_vec_int_16_t ret = { { 3, 4, 5, 6 },
+ { 4, 5, 6, 7 } };
+ return ret;
+}
+
+typedef struct { vec_long_16_t a; vec_long_16_t b; } hva2_vec_long_16_t;
+hva2_vec_long_16_t fun_hva2_vec_long_16_t (void) {
+ hva2_vec_long_16_t ret = { { 4, 5 },
+ { 5, 6 } };
+ return ret;
+}
+
+typedef struct { vec_int128_16_t a; vec_int128_16_t b; } hva2_vec_int128_16_t;
+hva2_vec_int128_16_t fun_hva2_vec_int128_16_t (void) {
+ hva2_vec_int128_16_t ret = { { 6 },
+ { 7 } };
+ return ret;
+}
+
+typedef struct { vec_float_16_t a; vec_float_16_t b; } hva2_vec_float_16_t;
+hva2_vec_float_16_t fun_hva2_vec_float_16_t (void) {
+ hva2_vec_float_16_t ret = { { 1.5, 2.5, 3.5, 4.5 },
+ { 2.5, 3.5, 4.5, 5.5 } };
+ return ret;
+}
+
+typedef struct { vec_double_16_t a; vec_double_16_t b; } hva2_vec_double_16_t;
+hva2_vec_double_16_t fun_hva2_vec_double_16_t (void) {
+ hva2_vec_double_16_t ret = { { 2.5, 3.5 },
+ { 3.5, 4.5 } };
+ return ret;
+}
+
+#ifdef FLOAT128
+typedef struct { vec_float128_16_t a; vec_float128_16_t b; } hva2_vec_float128_16_t;
+hva2_vec_float128_16_t fun_hva2_vec_float128_16_t (void) {
+ hva2_vec_float128_16_t ret = { { 4.5 },
+ { 5.5 } };
+ return ret;
+}
+#endif
+
+// Homogeneous vector aggregates of 3 elements.
+
+typedef struct { vec_char_8_t a; vec_char_8_t b; vec_char_8_t c; } hva3_vec_char_8_t;
+hva3_vec_char_8_t fun_hva3_vec_char_8 (void) {
+ hva3_vec_char_8_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8 },
+ { 2, 3, 4, 5, 6, 7, 8, 9 },
+ { 3, 4, 5, 6, 7, 8, 9, 10 } };
+ return ret;
+}
+
+typedef struct { vec_short_8_t a; vec_short_8_t b; vec_short_8_t c; } hva3_vec_short_8_t;
+hva3_vec_short_8_t fun_hva3_vec_short_8 (void) {
+ hva3_vec_short_8_t ret = { { 2, 3, 4, 5 },
+ { 3, 4, 5, 6 },
+ { 4, 5, 6, 7 } };
+ return ret;
+}
+
+typedef struct { vec_int_8_t a; vec_int_8_t b; vec_int_8_t c; } hva3_vec_int_8_t;
+hva3_vec_int_8_t fun_hva3_vec_int_8 (void) {
+ hva3_vec_int_8_t ret = { { 3, 4 },
+ { 4, 5 },
+ { 5, 6 } };
+ return ret;
+}
+
+typedef struct { vec_long_8_t a; vec_long_8_t b; vec_long_8_t c; } hva3_vec_long_8_t;
+hva3_vec_long_8_t fun_hva3_vec_long_8 (void) {
+ hva3_vec_long_8_t ret = { { 5 },
+ { 6 },
+ { 7 } };
+ return ret;
+}
+
+typedef struct { vec_float_8_t a; vec_float_8_t b; vec_float_8_t c; } hva3_vec_float_8_t;
+hva3_vec_float_8_t fun_hva3_vec_float_8 (void) {
+ hva3_vec_float_8_t ret = { { 1.5, 2.5 },
+ { 2.5, 3.5 },
+ { 3.5, 4.5 } };
+ return ret;
+}
+
+typedef struct { vec_double_8_t a; vec_double_8_t b; vec_double_8_t c; } hva3_vec_double_8_t;
+hva3_vec_double_8_t fun_hva3_vec_double_8 (void) {
+ hva3_vec_double_8_t ret = { { 3.5 },
+ { 4.5 },
+ { 5.5 } };
+ return ret;
+}
+
+typedef struct { vec_char_16_t a; vec_char_16_t b; vec_char_16_t c; } hva3_vec_char_16_t;
+hva3_vec_char_16_t fun_hva3_vec_char_16_t (void) {
+ hva3_vec_char_16_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16 },
+ { 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17 },
+ { 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18 } };
+ return ret;
+}
+
+typedef struct { vec_short_16_t a; vec_short_16_t b; vec_short_16_t c; } hva3_vec_short_16_t;
+hva3_vec_short_16_t fun_hva3_vec_short_16_t (void) {
+ hva3_vec_short_16_t ret = { { 2, 3, 4, 5, 6, 7, 8, 9 },
+ { 3, 4, 5, 6, 7, 8, 9, 10 },
+ { 4, 5, 6, 7, 8, 9, 10, 11 } };
+ return ret;
+}
+
+typedef struct { vec_int_16_t a; vec_int_16_t b; vec_int_16_t c; } hva3_vec_int_16_t;
+hva3_vec_int_16_t fun_hva3_vec_int_16_t (void) {
+ hva3_vec_int_16_t ret = { { 3, 4, 5, 6 },
+ { 4, 5, 6, 7 },
+ { 5, 6, 7, 8 } };
+ return ret;
+}
+
+typedef struct { vec_long_16_t a; vec_long_16_t b; vec_long_16_t c; } hva3_vec_long_16_t;
+hva3_vec_long_16_t fun_hva3_vec_long_16_t (void) {
+ hva3_vec_long_16_t ret = { { 3, 4 },
+ { 4, 5 },
+ { 5, 6 } };
+ return ret;
+}
+
+typedef struct { vec_int128_16_t a; vec_int128_16_t b; vec_int128_16_t c; } hva3_vec_int128_16_t;
+hva3_vec_int128_16_t fun_hva3_vec_int128_16_t (void) {
+ hva3_vec_int128_16_t ret = { { 6 },
+ { 7 },
+ { 8 } };
+ return ret;
+}
+
+typedef struct { vec_float_16_t a; vec_float_16_t b; vec_float_16_t c; } hva3_vec_float_16_t;
+hva3_vec_float_16_t fun_hva3_vec_float_16_t (void) {
+ hva3_vec_float_16_t ret = { { 1.5, 2.5, 3.5, 4.5 },
+ { 2.5, 3.5, 4.5, 5.5 },
+ { 3.5, 4.5, 5.5, 6.5 } };
+ return ret;
+}
+
+typedef struct { vec_double_16_t a; vec_double_16_t b; vec_double_16_t c; } hva3_vec_double_16_t;
+hva3_vec_double_16_t fun_hva3_vec_double_16_t (void) {
+ hva3_vec_double_16_t ret = { { 2.5, 3.5 },
+ { 3.5, 4.5 },
+ { 4.5, 5.5 } };
+ return ret;
+}
+
+#ifdef FLOAT128
+typedef struct { vec_float128_16_t a; vec_float128_16_t b; vec_float128_16_t c; } hva3_vec_float128_16_t;
+hva3_vec_float128_16_t fun_hva3_vec_float128_16_t (void) {
+ hva3_vec_float128_16_t ret = { { 4.5 },
+ { 5.5 },
+ { 6.5 } };
+ return ret;
+}
+#endif
+
+// Homogeneous vector aggregates of 3 elements.
+
+typedef struct { vec_char_8_t a; vec_char_8_t b; vec_char_8_t c; vec_char_8_t d; } hva4_vec_char_8_t;
+hva4_vec_char_8_t fun_hva4_vec_char_8 (void) {
+ hva4_vec_char_8_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8 },
+ { 2, 3, 4, 5, 6, 7, 8, 9 },
+ { 3, 4, 5, 6, 7, 8, 9, 10 },
+ { 4, 5, 6, 7, 8, 9, 10, 11 } };
+ return ret;
+}
+
+typedef struct { vec_short_8_t a; vec_short_8_t b; vec_short_8_t c; vec_short_8_t d; } hva4_vec_short_8_t;
+hva4_vec_short_8_t fun_hva4_vec_short_8 (void) {
+ hva4_vec_short_8_t ret = { { 2, 3, 4, 5 },
+ { 3, 4, 5, 6 },
+ { 4, 5, 6, 7 },
+ { 5, 6, 7, 8 } };
+ return ret;
+}
+
+typedef struct { vec_int_8_t a; vec_int_8_t b; vec_int_8_t c; vec_int_8_t d; } hva4_vec_int_8_t;
+hva4_vec_int_8_t fun_hva4_vec_int_8 (void) {
+ hva4_vec_int_8_t ret = { { 3, 4 },
+ { 4, 5 },
+ { 5, 6 },
+ { 6, 7 } };
+ return ret;
+}
+
+typedef struct { vec_long_8_t a; vec_long_8_t b; vec_long_8_t c; vec_long_8_t d; } hva4_vec_long_8_t;
+hva4_vec_long_8_t fun_hva4_vec_long_8 (void) {
+ hva4_vec_long_8_t ret = { { 5 },
+ { 6 },
+ { 7 },
+ { 8 } };
+ return ret;
+}
+
+typedef struct { vec_float_8_t a; vec_float_8_t b; vec_float_8_t c; vec_float_8_t d; } hva4_vec_float_8_t;
+hva4_vec_float_8_t fun_hva4_vec_float_8 (void) {
+ hva4_vec_float_8_t ret = { { 1.5, 2.5 },
+ { 2.5, 3.5 },
+ { 3.5, 4.5 },
+ { 4.5, 5.5 } };
+ return ret;
+}
+
+typedef struct { vec_double_8_t a; vec_double_8_t b; vec_double_8_t c; vec_double_8_t d; } hva4_vec_double_8_t;
+hva4_vec_double_8_t fun_hva4_vec_double_8 (void) {
+ hva4_vec_double_8_t ret = { { 3.5 },
+ { 4.5 },
+ { 5.5 },
+ { 6.5 } };
+ return ret;
+}
+
+typedef struct { vec_char_16_t a; vec_char_16_t b; vec_char_16_t c; vec_char_16_t d; } hva4_vec_char_16_t;
+hva4_vec_char_16_t fun_hva4_vec_char_16_t (void) {
+ hva4_vec_char_16_t ret = { { 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16 },
+ { 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17 },
+ { 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18 },
+ { 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19 } };
+ return ret;
+}
+
+typedef struct { vec_short_16_t a; vec_short_16_t b; vec_short_16_t c; vec_short_16_t d; } hva4_vec_short_16_t;
+hva4_vec_short_16_t fun_hva4_vec_short_16_t (void) {
+ hva4_vec_short_16_t ret = { { 2, 3, 4, 5, 6, 7, 8, 9 },
+ { 3, 4, 5, 6, 7, 8, 9, 10 },
+ { 4, 5, 6, 7, 8, 9, 10, 11 },
+ { 5, 6, 7, 8, 9, 10, 11, 12 } };
+ return ret;
+}
+
+typedef struct { vec_int_16_t a; vec_int_16_t b; vec_int_16_t c; vec_int_16_t d; } hva4_vec_int_16_t;
+hva4_vec_int_16_t fun_hva4_vec_int_16_t (void) {
+ hva4_vec_int_16_t ret = { { 3, 4, 5, 6 },
+ { 4, 5, 6, 7 },
+ { 5, 6, 7, 8 },
+ { 6, 7, 8, 9 } };
+ return ret;
+}
+
+typedef struct { vec_long_16_t a; vec_long_16_t b; vec_long_16_t c; vec_long_16_t d; } hva4_vec_long_16_t;
+hva4_vec_long_16_t fun_hva4_vec_long_16_t (void) {
+ hva4_vec_long_16_t ret = { { 3, 4 },
+ { 4, 5 },
+ { 5, 6 },
+ { 6, 7 } };
+ return ret;
+}
+
+typedef struct { vec_int128_16_t a; vec_int128_16_t b; vec_int128_16_t c; vec_int128_16_t d; } hva4_vec_int128_16_t;
+hva4_vec_int128_16_t fun_hva4_vec_int128_16_t (void) {
+ hva4_vec_int128_16_t ret = { { 6 },
+ { 7 },
+ { 8 },
+ { 9 } };
+ return ret;
+}
+
+typedef struct { vec_float_16_t a; vec_float_16_t b; vec_float_16_t c; vec_float_16_t d; } hva4_vec_float_16_t;
+hva4_vec_float_16_t fun_hva4_vec_float_16_t (void) {
+ hva4_vec_float_16_t ret = { { 1.5, 2.5, 3.5, 4.5 },
+ { 2.5, 3.5, 4.5, 5.5 },
+ { 3.5, 4.5, 5.5, 6.5 },
+ { 4.5, 5.5, 6.5, 7.5 } };
+ return ret;
+}
+
+typedef struct { vec_double_16_t a; vec_double_16_t b; vec_double_16_t c; vec_double_16_t d; } hva4_vec_double_16_t;
+hva4_vec_double_16_t fun_hva4_vec_double_16_t (void) {
+ hva4_vec_double_16_t ret = { { 2.5, 3.5 },
+ { 3.5, 4.5 },
+ { 4.5, 5.5 },
+ { 5.5, 6.5 } };
+ return ret;
+}
+
+#ifdef FLOAT128
+typedef struct { vec_float128_16_t a; vec_float128_16_t b; vec_float128_16_t c; vec_float128_16_t d; } hva4_vec_float128_16_t;
+hva4_vec_float128_16_t fun_hva4_vec_float128_16_t (void) {
+ hva4_vec_float128_16_t ret = { { 4.5 },
+ { 5.5 },
+ { 6.5 },
+ { 7.5 } };
+ return ret;
+}
+#endif
+
+// Mixed HFA.
+typedef struct { float _Complex a; float b; } mixed_hfa3_cff_t;
+mixed_hfa3_cff_t fun_mixed_hfa3_cff (void) {
+ mixed_hfa3_cff_t ret = { 1.5 + 2.5i, 3.5 };
+ return ret;
+}
+
+typedef struct { double _Complex a; double b; } mixed_hfa3_cdd_t;
+mixed_hfa3_cdd_t fun_mixed_hfa3_cdd (void) {
+ mixed_hfa3_cdd_t ret = { 1.5 + 2.5i, 3.5 };
+ return ret;
+}
+
+typedef struct { long double _Complex a; long double b; } mixed_hfa3_cldld_t;
+mixed_hfa3_cldld_t fun_mixed_hfa3_cldld (void) {
+ mixed_hfa3_cldld_t ret = { 1.5 + 2.5i, 3.5 };
+ return ret;
+}
+
+typedef struct { float b; float _Complex a; } mixed_hfa3_fcf_t;
+mixed_hfa3_fcf_t fun_mixed_hfa3_fcf (void) {
+ mixed_hfa3_fcf_t ret = { 3.5, 1.5 + 2.5i };
+ return ret;
+}
+
+typedef struct { double b; double _Complex a; } mixed_hfa3_dcd_t;
+mixed_hfa3_dcd_t fun_mixed_hfa3_dcd (void) {
+ mixed_hfa3_dcd_t ret = { 3.5, 1.5 + 2.5i };
+ return ret;
+}
+
+typedef struct { long double b; long double _Complex a; } mixed_hfa3_ldcld_t;
+mixed_hfa3_ldcld_t fun_mixed_hfa3_ldcld (void) {
+ mixed_hfa3_ldcld_t ret = { 3.5, 1.5 + 2.5i };
+ return ret;
+}
+
+typedef struct { vec_float_8_t a; vec_short_8_t b; } mixed_hfa2_fltsht_t;
+mixed_hfa2_fltsht_t fun_mixed_hfa2_fltsht_t (void) {
+ mixed_hfa2_fltsht_t ret = { { 3.5, 4.5 }, { 1, 2, 3, 4 } };
+ return ret;
+}
+
+int main(int argc, char *argv[])
+{
+ return 0;
+}
diff --git a/src/tests/funcretval_test_aarch64.bz2 b/src/tests/funcretval_test_aarch64.bz2
new file mode 100755
index 00000000..5494e102
--- /dev/null
+++ b/src/tests/funcretval_test_aarch64.bz2
Binary files differ
diff --git a/src/tests/funcscopes.c b/src/tests/funcscopes.c
new file mode 100644
index 00000000..720ff3b9
--- /dev/null
+++ b/src/tests/funcscopes.c
@@ -0,0 +1,194 @@
+/* Test program for dwarf_getscopes.
+ Copyright (C) 2005 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+#include <argp.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <error.h>
+#include <string.h>
+#include <fnmatch.h>
+
+
+static void
+paddr (const char *prefix, Dwarf_Addr addr, Dwfl_Line *line)
+{
+ const char *src;
+ int lineno, linecol;
+ if (line != NULL
+ && (src = dwfl_lineinfo (line, &addr, &lineno, &linecol,
+ NULL, NULL)) != NULL)
+ {
+ if (linecol != 0)
+ printf ("%s%#" PRIx64 " (%s:%d:%d)",
+ prefix, addr, src, lineno, linecol);
+ else
+ printf ("%s%#" PRIx64 " (%s:%d)",
+ prefix, addr, src, lineno);
+ }
+ else
+ printf ("%s%#" PRIx64, prefix, addr);
+}
+
+
+static void
+print_vars (unsigned int indent, Dwarf_Die *die)
+{
+ Dwarf_Die child;
+ if (dwarf_child (die, &child) == 0)
+ do
+ switch (dwarf_tag (&child))
+ {
+ case DW_TAG_variable:
+ case DW_TAG_formal_parameter:
+ printf ("%*s%-30s[%6" PRIx64 "]\n", indent, "",
+ dwarf_diename (&child),
+ (uint64_t) dwarf_dieoffset (&child));
+ break;
+ default:
+ break;
+ }
+ while (dwarf_siblingof (&child, &child) == 0);
+
+ Dwarf_Attribute attr_mem;
+ Dwarf_Die origin;
+ if (dwarf_hasattr (die, DW_AT_abstract_origin)
+ && dwarf_formref_die (dwarf_attr (die, DW_AT_abstract_origin, &attr_mem),
+ &origin) != NULL
+ && dwarf_child (&origin, &child) == 0)
+ do
+ switch (dwarf_tag (&child))
+ {
+ case DW_TAG_variable:
+ case DW_TAG_formal_parameter:
+ printf ("%*s%s (abstract)\n", indent, "",
+ dwarf_diename (&child));
+ break;
+ default:
+ break;
+ }
+ while (dwarf_siblingof (&child, &child) == 0);
+}
+
+
+#define INDENT 4
+
+struct args
+{
+ Dwfl *dwfl;
+ Dwarf_Die *cu;
+ Dwarf_Addr dwbias;
+ char **argv;
+};
+
+static int
+handle_function (Dwarf_Die *funcdie, void *arg)
+{
+ struct args *a = arg;
+
+ const char *name = dwarf_diename (funcdie);
+ char **argv = a->argv;
+ if (argv[0] != NULL)
+ {
+ bool match;
+ do
+ match = fnmatch (*argv, name, 0) == 0;
+ while (!match && *++argv);
+ if (!match)
+ return 0;
+ }
+
+ Dwarf_Die *scopes;
+ int n = dwarf_getscopes_die (funcdie, &scopes);
+ if (n <= 0)
+ error (EXIT_FAILURE, 0, "dwarf_getscopes_die: %s", dwarf_errmsg (-1));
+ else
+ {
+ Dwarf_Addr start, end;
+ const char *fname;
+ const char *modname = dwfl_module_info (dwfl_cumodule (a->cu), NULL,
+ &start, &end,
+ NULL, NULL,
+ &fname, NULL);
+ if (modname == NULL)
+ error (EXIT_FAILURE, 0, "dwfl_module_info: %s", dwarf_errmsg (-1));
+ if (modname[0] == '\0')
+ modname = fname;
+ printf ("%s: %#" PRIx64 " .. %#" PRIx64 "\n", modname, start, end);
+
+ unsigned int indent = 0;
+ while (n-- > 0)
+ {
+ Dwarf_Die *const die = &scopes[n];
+
+ indent += INDENT;
+ printf ("%*s%s (%#x)", indent, "",
+ dwarf_diename (die) ?: "<unnamed>",
+ dwarf_tag (die));
+
+ Dwarf_Addr lowpc, highpc;
+ if (dwarf_lowpc (die, &lowpc) == 0
+ && dwarf_highpc (die, &highpc) == 0)
+ {
+ lowpc += a->dwbias;
+ highpc += a->dwbias;
+ Dwfl_Line *loline = dwfl_getsrc (a->dwfl, lowpc);
+ Dwfl_Line *hiline = dwfl_getsrc (a->dwfl, highpc);
+ paddr (": ", lowpc, loline);
+ if (highpc != lowpc)
+ paddr (" .. ", lowpc, hiline == loline ? NULL : hiline);
+ }
+ puts ("");
+
+ print_vars (indent + INDENT, die);
+ }
+ }
+
+ return 0;
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ int remaining;
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ struct args a = { .dwfl = NULL, .cu = NULL };
+
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining,
+ &a.dwfl);
+ assert (a.dwfl != NULL);
+ a.argv = &argv[remaining];
+
+ int result = 0;
+
+ while ((a.cu = dwfl_nextcu (a.dwfl, a.cu, &a.dwbias)) != NULL)
+ dwarf_getfuncs (a.cu, &handle_function, &a, 0);
+
+ dwfl_end (a.dwfl);
+
+ return result;
+}
diff --git a/src/tests/get-aranges.c b/src/tests/get-aranges.c
new file mode 100644
index 00000000..7f85cdad
--- /dev/null
+++ b/src/tests/get-aranges.c
@@ -0,0 +1,142 @@
+/* Copyright (C) 2002, 2004 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <libelf.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <unistd.h>
+
+
+static const Dwarf_Addr testaddr[] =
+{
+ 0x804842b, 0x804842c, 0x804843c, 0x8048459, 0x804845a,
+ 0x804845b, 0x804845c, 0x8048460, 0x8048465, 0x8048466,
+ 0x8048467, 0x8048468, 0x8048470, 0x8048471, 0x8048472
+};
+#define ntestaddr (sizeof (testaddr) / sizeof (testaddr[0]))
+
+
+int
+main (int argc, char *argv[])
+{
+ int result = 0;
+ int cnt;
+
+ for (cnt = 1; cnt < argc; ++cnt)
+ {
+ int fd = open (argv[cnt], O_RDONLY);
+
+ Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ);
+ if (dbg == NULL)
+ {
+ printf ("%s not usable\n", argv[cnt]);
+ result = 1;
+ close (fd);
+ continue;
+ }
+
+ Dwarf_Aranges *aranges;
+ size_t naranges;
+ if (dwarf_getaranges (dbg, &aranges, &naranges) != 0)
+ printf ("%s: cannot get aranges\n", argv[cnt]);
+ else
+ {
+ for (size_t i = 0; i < ntestaddr; ++i)
+ {
+ Dwarf_Arange *found;
+
+ found = dwarf_getarange_addr (aranges, testaddr[i]);
+ if (found != NULL)
+ {
+ Dwarf_Off cu_offset;
+
+ if (dwarf_getarangeinfo (found, NULL, NULL, &cu_offset) != 0)
+ {
+ puts ("failed to get CU die offset");
+ result = 1;
+ }
+ else
+ {
+ const char *cuname;
+ Dwarf_Die cu_die;
+
+ if (dwarf_offdie (dbg, cu_offset, &cu_die) == NULL
+ || (cuname = dwarf_diename (&cu_die)) == NULL)
+ {
+ puts ("failed to get CU die");
+ result = 1;
+ }
+ else
+ printf ("CU name: \"%s\"\n", cuname);
+ }
+ }
+ else
+ printf ("%#llx: not in range\n",
+ (unsigned long long int) testaddr[i]);
+ }
+
+ for (size_t i = 0; i < naranges; ++i)
+ {
+ Dwarf_Arange *arange = dwarf_onearange (aranges, i);
+ if (arange == NULL)
+ {
+ printf ("cannot get arange %zu: %s\n", i, dwarf_errmsg (-1));
+ break;
+ }
+
+ Dwarf_Addr start;
+ Dwarf_Word length;
+ Dwarf_Off cu_offset;
+
+ if (dwarf_getarangeinfo (arange, &start, &length, &cu_offset)
+ != 0)
+ {
+ printf ("cannot get info from aranges[%zu]\n", i);
+ result = 1;
+ }
+ else
+ {
+ printf (" [%2zu] start: %#llx, length: %llu, cu: %llu\n",
+ i, (unsigned long long int) start,
+ (unsigned long long int) length,
+ (unsigned long long int) cu_offset);
+
+ const char *cuname;
+ Dwarf_Die cu_die;
+ if (dwarf_offdie (dbg, cu_offset, &cu_die) == NULL
+ || (cuname = dwarf_diename (&cu_die)) == NULL)
+ {
+ puts ("failed to get CU die");
+ result = 1;
+ }
+ else
+ printf ("CU name: \"%s\"\n", cuname);
+ }
+ }
+ }
+
+ dwarf_end (dbg);
+ close (fd);
+ }
+
+ return result;
+}
diff --git a/src/tests/get-files.c b/src/tests/get-files.c
new file mode 100644
index 00000000..04091733
--- /dev/null
+++ b/src/tests/get-files.c
@@ -0,0 +1,107 @@
+/* Copyright (C) 2002, 2004, 2005, 2007 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <libelf.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <unistd.h>
+
+
+int
+main (int argc, char *argv[])
+{
+ int result = 0;
+ int cnt;
+
+ for (cnt = 1; cnt < argc; ++cnt)
+ {
+ int fd = open (argv[cnt], O_RDONLY);
+
+ Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ);
+ if (dbg == NULL)
+ {
+ printf ("%s not usable\n", argv[cnt]);
+ result = 1;
+ if (fd != -1)
+ close (fd);
+ continue;
+ }
+
+ Dwarf_Off o = 0;
+ Dwarf_Off ncu;
+ Dwarf_Off ao;
+ size_t cuhl;
+ uint8_t asz;
+ uint8_t osz;
+ while (dwarf_nextcu (dbg, o, &ncu, &cuhl, &ao, &asz, &osz) == 0)
+ {
+ printf ("cuhl = %zu, o = %llu, asz = %hhu, osz = %hhu, ncu = %llu\n",
+ cuhl, (unsigned long long int) ao,
+ asz, osz, (unsigned long long int) ncu);
+
+ Dwarf_Die die_mem;
+ Dwarf_Die *die = dwarf_offdie (dbg, o + cuhl, &die_mem);
+ if (die == NULL)
+ {
+ printf ("%s: cannot get CU die\n", argv[cnt]);
+ result = 1;
+ break;
+ }
+
+ Dwarf_Files *files;
+ size_t nfiles;
+ if (dwarf_getsrcfiles (die, &files, &nfiles) != 0)
+ {
+ printf ("%s: cannot get files\n", argv[cnt]);
+ result = 1;
+ break;
+ }
+
+ const char *const *dirs;
+ size_t ndirs;
+ if (dwarf_getsrcdirs (files, &dirs, &ndirs) != 0)
+ {
+ printf ("%s: cannot get include directories\n", argv[cnt]);
+ result = 1;
+ break;
+ }
+
+ if (dirs[0] == NULL)
+ puts (" dirs[0] = (null)");
+ else
+ printf (" dirs[0] = \"%s\"\n", dirs[0]);
+ for (size_t i = 1; i < ndirs; ++i)
+ printf (" dirs[%zu] = \"%s\"\n", i, dirs[i]);
+
+ for (size_t i = 0; i < nfiles; ++i)
+ printf (" file[%zu] = \"%s\"\n", i,
+ dwarf_filesrc (files, i, NULL, NULL));
+
+ o = ncu;
+ }
+
+ dwarf_end (dbg);
+ close (fd);
+ }
+
+ return result;
+}
diff --git a/src/tests/get-lines.c b/src/tests/get-lines.c
new file mode 100644
index 00000000..c361a2c3
--- /dev/null
+++ b/src/tests/get-lines.c
@@ -0,0 +1,137 @@
+/* Copyright (C) 2002, 2004 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <inttypes.h>
+#include <libelf.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <unistd.h>
+
+
+int
+main (int argc, char *argv[])
+{
+ int result = 0;
+ int cnt;
+
+ for (cnt = 1; cnt < argc; ++cnt)
+ {
+ int fd = open (argv[cnt], O_RDONLY);
+
+ Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ);
+ if (dbg == NULL)
+ {
+ printf ("%s not usable: %s\n", argv[cnt], dwarf_errmsg (-1));
+ close (fd);
+ continue;
+ }
+
+ Dwarf_Off cuoff = 0;
+ Dwarf_Off old_cuoff = 0;
+ size_t hsize;
+ Dwarf_Off ao;
+ uint8_t asz;
+ uint8_t osz;
+ while (dwarf_nextcu (dbg, cuoff, &cuoff, &hsize, &ao, &asz, &osz) == 0)
+ {
+ printf ("cuhl = %zu, o = %llu, asz = %hhu, osz = %hhu, ncu = %llu\n",
+ hsize, (unsigned long long int) ao,
+ asz, osz, (unsigned long long int) cuoff);
+
+ /* Get the DIE for the CU. */
+ Dwarf_Die die;
+ if (dwarf_offdie (dbg, old_cuoff + hsize, &die) == NULL)
+ {
+ /* Something went wrong. */
+ printf ("%s: cannot get CU die\n", argv[cnt]);
+ result = 1;
+ break;
+ }
+ old_cuoff = cuoff;
+
+ Dwarf_Lines *lb;
+ size_t nlb;
+ if (dwarf_getsrclines (&die, &lb, &nlb) != 0)
+ {
+ printf ("%s: cannot get lines\n", argv[cnt]);
+ result = 1;
+ break;
+ }
+
+ printf (" %zu lines\n", nlb);
+
+ for (size_t i = 0; i < nlb; ++i)
+ {
+ Dwarf_Line *l = dwarf_onesrcline (lb, i);
+ if (l == NULL)
+ {
+ printf ("%s: cannot get individual line\n", argv[cnt]);
+ result = 1;
+ break;
+ }
+
+ Dwarf_Addr addr;
+ if (dwarf_lineaddr (l, &addr) != 0)
+ addr = 0;
+ const char *file = dwarf_linesrc (l, NULL, NULL);
+ int line;
+ if (dwarf_lineno (l, &line) != 0)
+ line = 0;
+
+ printf ("%" PRIx64 ": %s:%d:", (uint64_t) addr,
+ file ?: "???", line);
+
+ int column;
+ if (dwarf_linecol (l, &column) != 0)
+ column = 0;
+ if (column >= 0)
+ printf ("%d:", column);
+
+ bool is_stmt;
+ if (dwarf_linebeginstatement (l, &is_stmt) != 0)
+ is_stmt = false;
+ bool end_sequence;
+ if (dwarf_lineendsequence (l, &end_sequence) != 0)
+ end_sequence = false;
+ bool basic_block;
+ if (dwarf_lineblock (l, &basic_block) != 0)
+ basic_block = false;
+ bool prologue_end;
+ if (dwarf_lineprologueend (l, &prologue_end) != 0)
+ prologue_end = false;
+ bool epilogue_begin;
+ if (dwarf_lineepiloguebegin (l, &epilogue_begin) != 0)
+ epilogue_begin = false;
+
+ printf (" is_stmt:%s, end_seq:%s, bb:%s, prologue:%s, epilogue:%s\n",
+ is_stmt ? "yes" : "no", end_sequence ? "yes" : "no",
+ basic_block ? "yes" : "no", prologue_end ? "yes" : "no",
+ epilogue_begin ? "yes" : "no");
+ }
+ }
+
+ dwarf_end (dbg);
+ close (fd);
+ }
+
+ return result;
+}
diff --git a/src/tests/get-pubnames.c b/src/tests/get-pubnames.c
new file mode 100644
index 00000000..4777f49d
--- /dev/null
+++ b/src/tests/get-pubnames.c
@@ -0,0 +1,98 @@
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <libelf.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <unistd.h>
+
+
+static int globcnt;
+
+static int
+callback (Dwarf *dbg, Dwarf_Global *gl, void *arg __attribute__ ((unused)))
+{
+ int result = DWARF_CB_OK;
+
+ printf (" [%2d] \"%s\", die: %llu, cu: %llu\n",
+ globcnt++, gl->name, (unsigned long long int) gl->die_offset,
+ (unsigned long long int) gl->cu_offset);
+
+ Dwarf_Die cu_die;
+ const char *cuname;
+ if (dwarf_offdie (dbg, gl->cu_offset, &cu_die) == NULL
+ || (cuname = dwarf_diename (&cu_die)) == NULL)
+ {
+ puts ("failed to get CU die");
+ result = DWARF_CB_ABORT;
+ }
+ else
+ printf ("CU name: \"%s\"\n", cuname);
+
+ const char *diename;
+ Dwarf_Die die;
+ if (dwarf_offdie (dbg, gl->die_offset, &die) == NULL
+ || (diename = dwarf_diename (&die)) == NULL)
+ {
+ puts ("failed to get object die");
+ result = DWARF_CB_ABORT;
+ }
+ else
+ printf ("object name: \"%s\"\n", diename);
+
+ return result;
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ int result = 0;
+ int cnt;
+
+ for (cnt = 1; cnt < argc; ++cnt)
+ {
+ int fd = open (argv[cnt], O_RDONLY);
+ Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ);
+ if (dbg == NULL)
+ {
+ printf ("%s not usable: %s\n", argv[cnt], dwarf_errmsg (-1));
+ result = 1;
+ close (fd);
+ continue;
+ }
+
+ globcnt = 0;
+
+ if (dwarf_getpubnames (dbg, callback, NULL, 0) != 0)
+ {
+ printf ("dwarf_get_pubnames didn't return zero: %s\n",
+ dwarf_errmsg (-1));
+ result = 1;
+ }
+
+ dwarf_end (dbg);
+ close (fd);
+ }
+
+ return result;
+}
diff --git a/src/tests/hash.c b/src/tests/hash.c
new file mode 100644
index 00000000..86b6ad85
--- /dev/null
+++ b/src/tests/hash.c
@@ -0,0 +1,45 @@
+/* Copyright (C) 2002 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <libelf.h>
+#include <stdio.h>
+
+
+static int
+check (const char *name, unsigned long int expected)
+{
+ unsigned long int actual = elf_hash (name);
+
+ return actual != expected;
+}
+
+
+int
+main (void)
+{
+ int status;
+
+ /* Check some names. We know what the expected result is. */
+ status = check ("_DYNAMIC", 165832675);
+ status |= check ("_GLOBAL_OFFSET_TABLE_", 102264335);
+
+ return status;
+}
diff --git a/src/tests/hello_aarch64.ko.bz2 b/src/tests/hello_aarch64.ko.bz2
new file mode 100644
index 00000000..431d89f9
--- /dev/null
+++ b/src/tests/hello_aarch64.ko.bz2
Binary files differ
diff --git a/src/tests/hello_i386.ko.bz2 b/src/tests/hello_i386.ko.bz2
new file mode 100644
index 00000000..f89b292c
--- /dev/null
+++ b/src/tests/hello_i386.ko.bz2
Binary files differ
diff --git a/src/tests/hello_ppc64.ko.bz2 b/src/tests/hello_ppc64.ko.bz2
new file mode 100644
index 00000000..f4d3ff20
--- /dev/null
+++ b/src/tests/hello_ppc64.ko.bz2
Binary files differ
diff --git a/src/tests/hello_s390.ko.bz2 b/src/tests/hello_s390.ko.bz2
new file mode 100644
index 00000000..41525bf5
--- /dev/null
+++ b/src/tests/hello_s390.ko.bz2
Binary files differ
diff --git a/src/tests/hello_x86_64.ko.bz2 b/src/tests/hello_x86_64.ko.bz2
new file mode 100644
index 00000000..ba06f91e
--- /dev/null
+++ b/src/tests/hello_x86_64.ko.bz2
Binary files differ
diff --git a/src/tests/libtestfile_multi_shared.so.bz2 b/src/tests/libtestfile_multi_shared.so.bz2
new file mode 100755
index 00000000..e9eb6a70
--- /dev/null
+++ b/src/tests/libtestfile_multi_shared.so.bz2
Binary files differ
diff --git a/src/tests/line2addr.c b/src/tests/line2addr.c
new file mode 100644
index 00000000..e0d65d3d
--- /dev/null
+++ b/src/tests/line2addr.c
@@ -0,0 +1,148 @@
+/* Copyright (C) 2005 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <assert.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <argp.h>
+#include <stdio.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <error.h>
+
+
+static void
+print_address (Dwfl_Module *mod, Dwarf_Addr address)
+{
+ int n = dwfl_module_relocations (mod);
+ if (n < 0)
+ error (0, 0, "dwfl_module_relocations: %s", dwfl_errmsg (-1));
+ else if (n > 0)
+ {
+ int i = dwfl_module_relocate_address (mod, &address);
+ if (i < 0)
+ error (0, 0, "dwfl_module_relocate_address: %s", dwfl_errmsg (-1));
+ else
+ {
+ const char *modname = dwfl_module_info (mod, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL);
+ const char *secname = dwfl_module_relocation_info (mod, i, NULL);
+ if (n > 1 || secname[0] != '\0')
+ printf ("%s(%s)+%#" PRIx64, modname, secname, address);
+ else
+ printf ("%s+%#" PRIx64, modname, address);
+ return;
+ }
+ }
+
+ printf ("%#" PRIx64, address);
+}
+
+
+struct args
+{
+ const char *arg;
+ char *file;
+ int line;
+};
+
+static int
+handle_module (Dwfl_Module *mod __attribute__ ((unused)),
+ void **udata __attribute__ ((unused)),
+ const char *modname, Dwarf_Addr base __attribute__ ((unused)),
+ Dwarf *dbg __attribute__ ((unused)),
+ Dwarf_Addr bias __attribute__ ((unused)), void *arg)
+{
+ const struct args *const a = arg;
+
+ Dwfl_Line **lines = NULL;
+ size_t nlines = 0;
+
+ if (dwfl_module_getsrc_file (mod, a->file, a->line, 0, &lines, &nlines) == 0)
+ {
+ for (size_t inner = 0; inner < nlines; ++inner)
+ {
+ Dwarf_Addr addr;
+ int line = a->line, col = 0;
+ const char *file = dwfl_lineinfo (lines[inner], &addr, &line, &col,
+ NULL, NULL);
+ if (file != NULL)
+ {
+ printf ("%s -> ", a->arg);
+ print_address (mod, addr);
+ if (modname[0] != '\0')
+ printf (" (%s:", modname);
+ if (strcmp (file, a->file) || line != a->line || col != 0)
+ printf (" %s%s:%d", modname[0] != '\0' ? "" : "(",
+ file, line);
+ if (col != 0)
+ printf (":%d", col);
+ if (modname[0] != '\0'
+ || strcmp (file, a->file) || line != a->line || col != 0)
+ puts (")");
+ else
+ puts ("");
+ }
+ }
+ free (lines);
+ }
+
+ return DWARF_CB_OK;
+}
+
+int
+main (int argc, char *argv[])
+{
+ int cnt;
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ Dwfl *dwfl = NULL;
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &cnt, &dwfl);
+ assert (dwfl != NULL);
+
+ for (; cnt < argc; ++cnt)
+ {
+ struct args a = { .arg = argv[cnt] };
+
+ switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
+ {
+ default:
+ case 0:
+ printf ("ignored %s\n", argv[cnt]);
+ continue;
+ case 1:
+ a.line = 0;
+ break;
+ case 2:
+ break;
+ }
+
+ (void) dwfl_getdwarf (dwfl, &handle_module, &a, 0);
+
+ free (a.file);
+ }
+
+ dwfl_end (dwfl);
+
+ return 0;
+}
diff --git a/src/tests/linkmap-cut-lib.so.bz2 b/src/tests/linkmap-cut-lib.so.bz2
new file mode 100644
index 00000000..a1bda5c0
--- /dev/null
+++ b/src/tests/linkmap-cut-lib.so.bz2
Binary files differ
diff --git a/src/tests/linkmap-cut.bz2 b/src/tests/linkmap-cut.bz2
new file mode 100644
index 00000000..f2ccd7ca
--- /dev/null
+++ b/src/tests/linkmap-cut.bz2
Binary files differ
diff --git a/src/tests/linkmap-cut.core.bz2 b/src/tests/linkmap-cut.core.bz2
new file mode 100644
index 00000000..b55b2f21
--- /dev/null
+++ b/src/tests/linkmap-cut.core.bz2
Binary files differ
diff --git a/src/tests/low_high_pc.c b/src/tests/low_high_pc.c
new file mode 100644
index 00000000..d0f43023
--- /dev/null
+++ b/src/tests/low_high_pc.c
@@ -0,0 +1,109 @@
+/* Test program for dwarf_lowpc and dwarf_highpc
+ Copyright (C) 2012 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+#include <argp.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <error.h>
+#include <string.h>
+#include <fnmatch.h>
+
+struct args
+{
+ Dwfl *dwfl;
+ Dwarf_Die *cu;
+ Dwarf_Addr dwbias;
+ char **argv;
+ const char *file;
+};
+
+static struct args *args;
+
+static void
+fail(Dwarf_Off off, const char *name, const char *msg)
+{
+ printf("%s: [%" PRIx64 "] '%s' %s\n", args->file, off, name, msg);
+ exit(-1);
+}
+
+static int
+handle_die (Dwarf_Die *die, void *arg)
+{
+ args = arg;
+ Dwarf_Off off = dwarf_dieoffset (die);
+
+ const char *name = dwarf_diename (die);
+ if (name == NULL)
+ fail (off, "<no name>", "die without a name");
+
+ Dwarf_Addr lowpc = 0;
+ Dwarf_Addr highpc = 0;
+ if (dwarf_lowpc (die, &lowpc) != 0 && dwarf_hasattr (die, DW_AT_low_pc))
+ fail (off, name, "has DW_AT_low_pc but dwarf_lowpc fails");
+ if (dwarf_highpc (die, &highpc) != 0 && dwarf_hasattr (die, DW_AT_high_pc))
+ fail (off, name, "has DW_AT_high_pc but dwarf_highpc fails");
+
+ /* GCC < 4.7 had a bug where no code CUs got a highpc == lowpc.
+ Allow that, because it is not the main purpose of this test. */
+ if (dwarf_hasattr (die, DW_AT_low_pc)
+ && dwarf_hasattr (die, DW_AT_high_pc)
+ && highpc <= lowpc
+ && ! (dwarf_tag (die) == DW_TAG_compile_unit && highpc == lowpc))
+ {
+ printf("lowpc: %" PRIx64 ", highpc: %" PRIx64 "lx\n", lowpc, highpc);
+ fail (off, name, "highpc <= lowpc");
+ }
+
+ return 0;
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ int remaining;
+
+ /* Set locale. */
+ (void) setlocale (LC_ALL, "");
+
+ struct args a = { .dwfl = NULL, .cu = NULL };
+
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining,
+ &a.dwfl);
+ assert (a.dwfl != NULL);
+ a.argv = &argv[remaining];
+
+ int result = 0;
+
+ while ((a.cu = dwfl_nextcu (a.dwfl, a.cu, &a.dwbias)) != NULL)
+ {
+ a.file = dwarf_diename (a.cu);
+ handle_die (a.cu, &a);
+ dwarf_getfuncs (a.cu, &handle_die, &a, 0);
+ }
+
+ dwfl_end (a.dwfl);
+
+ return result;
+}
diff --git a/src/tests/md5-sha1-test.c b/src/tests/md5-sha1-test.c
new file mode 100644
index 00000000..49de0785
--- /dev/null
+++ b/src/tests/md5-sha1-test.c
@@ -0,0 +1,101 @@
+/* Copyright (C) 2011 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#include <error.h>
+
+#include "md5.h"
+#include "sha1.h"
+
+static const struct expected
+{
+ const char *sample;
+ const char *md5_expected;
+ const char *sha1_expected;
+} tests[] =
+ {
+ {
+ "abc",
+ "\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
+ "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
+ "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d"
+ },
+ {
+ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+ "\x82\x15\xef\x07\x96\xa2\x0b\xca\xaa\xe1\x16\xd3\x87\x6c\x66\x4a",
+ "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
+ "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1"
+ },
+ {
+ "\0a",
+ "\x77\x07\xd6\xae\x4e\x02\x7c\x70\xee\xa2\xa9\x35\xc2\x29\x6f\x21",
+ "\x34\xaa\x97\x3c\xd4\xc4\xda\xa4\xf6\x1e"
+ "\xeb\x2b\xdb\xad\x27\x31\x65\x34\x01\x6f",
+ },
+ {
+ "When in the Course of human events it becomes necessary",
+ "\x62\x6b\x5e\x22\xcd\x3d\x02\xea\x07\xde\xd4\x50\x62\x3d\xb9\x96",
+ "\x66\xc3\xc6\x8d\x62\x91\xc5\x1e\x63\x0c"
+ "\x85\xc8\x6c\xc4\x4b\x3a\x79\x3e\x07\x28",
+ },
+ };
+#define NTESTS (sizeof tests / sizeof tests[0])
+
+#define md5_size 16
+#define sha1_size 20
+
+static const char md5_expected[] =
+ {
+ };
+
+static const char sha1_expected[] =
+ {
+ };
+
+#define TEST_HASH(ALGO, I) \
+ { \
+ struct ALGO##_ctx ctx; \
+ uint32_t result_buffer[(ALGO##_size + 3) / 4]; \
+ ALGO##_init_ctx (&ctx); \
+ if (tests[I].sample[0] == '\0') \
+ { \
+ char input_buffer[1000]; \
+ memset (input_buffer, tests[I].sample[1], sizeof input_buffer); \
+ for (int rept = 0; rept < 1000; ++rept) \
+ ALGO##_process_bytes (input_buffer, sizeof input_buffer, &ctx); \
+ } \
+ else \
+ ALGO##_process_bytes (tests[I].sample, strlen (tests[I].sample), &ctx); \
+ char *result = ALGO##_finish_ctx (&ctx, result_buffer); \
+ if (result != (void *) result_buffer \
+ || memcmp (result, tests[I].ALGO##_expected, ALGO##_size) != 0) \
+ error (0, 0, #ALGO " test %zu failed", 1 + I); \
+ }
+
+int
+main (void)
+{
+ for (size_t i = 0; i < NTESTS; ++i)
+ {
+ TEST_HASH (md5, i);
+ TEST_HASH (sha1, i);
+ }
+ return error_message_count;
+}
diff --git a/src/tests/msg_tst.c b/src/tests/msg_tst.c
new file mode 100644
index 00000000..10ff0f73
--- /dev/null
+++ b/src/tests/msg_tst.c
@@ -0,0 +1,104 @@
+/* Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <libelfP.h>
+
+static struct
+{
+ int id;
+ const char *expected;
+} libelf_msgs[ELF_E_NUM] =
+ {
+ { ELF_E_NOERROR, "no error" },
+ { ELF_E_UNKNOWN_ERROR, "unknown error" },
+ { ELF_E_UNKNOWN_VERSION, "unknown version" },
+ { ELF_E_UNKNOWN_TYPE, "unknown type" },
+ { ELF_E_INVALID_HANDLE, "invalid `Elf' handle" },
+ { ELF_E_SOURCE_SIZE, "invalid size of source operand" },
+ { ELF_E_DEST_SIZE, "invalid size of destination operand" },
+ { ELF_E_INVALID_ENCODING, "invalid encoding" },
+ { ELF_E_NOMEM, "out of memory" },
+ { ELF_E_INVALID_FILE, "invalid file descriptor" },
+ { ELF_E_INVALID_OP, "invalid operation" },
+ { ELF_E_NO_VERSION, "ELF version not set" },
+ { ELF_E_INVALID_CMD, "invalid command" },
+ { ELF_E_RANGE, "offset out of range" },
+ { ELF_E_ARCHIVE_FMAG, "invalid fmag field in archive header" },
+ { ELF_E_INVALID_ARCHIVE, "invalid archive file" },
+ { ELF_E_NO_ARCHIVE, "descriptor is not for an archive" },
+ { ELF_E_NO_INDEX, "no index available" },
+ { ELF_E_READ_ERROR, "cannot read data from file" },
+ { ELF_E_WRITE_ERROR, "cannot write data to file" },
+ { ELF_E_INVALID_CLASS, "invalid binary class" },
+ { ELF_E_INVALID_INDEX, "invalid section index" },
+ { ELF_E_INVALID_OPERAND, "invalid operand" },
+ { ELF_E_INVALID_SECTION, "invalid section" },
+ { ELF_E_INVALID_COMMAND, "invalid command" },
+ { ELF_E_WRONG_ORDER_EHDR, "executable header not created first" },
+ { ELF_E_FD_DISABLED, "file descriptor disabled" },
+ { ELF_E_FD_MISMATCH, "archive/member file descriptor mismatch" },
+ { ELF_E_OFFSET_RANGE, "offset out of range" },
+ { ELF_E_NOT_NUL_SECTION, "cannot manipulate null section" },
+ { ELF_E_DATA_MISMATCH, "data/scn mismatch" },
+ { ELF_E_INVALID_SECTION_HEADER, "invalid section header" },
+ { ELF_E_INVALID_DATA, "invalid data" },
+ { ELF_E_DATA_ENCODING, "unknown data encoding" },
+ { ELF_E_SECTION_TOO_SMALL, "section `sh_size' too small for data" },
+ { ELF_E_INVALID_ALIGN, "invalid section alignment" },
+ { ELF_E_INVALID_SHENTSIZE, "invalid section entry size" },
+ { ELF_E_UPDATE_RO, "update() for write on read-only file" },
+ { ELF_E_NOFILE, "no such file" },
+ { ELF_E_GROUP_NOT_REL,
+ "only relocatable files can contain section groups" },
+ { ELF_E_INVALID_PHDR,
+ "program header only allowed in executables, shared objects, \
+and core files" },
+ { ELF_E_NO_PHDR, "file has no program header" },
+ { ELF_E_INVALID_OFFSET, "invalid offset" }
+ };
+
+
+int
+main (void)
+{
+ size_t cnt;
+ int result = EXIT_SUCCESS;
+
+ /* Clear the error state. */
+ (void) elf_errno ();
+
+ /* Check all the messages of libelf. */
+ for (cnt = 1; cnt < ELF_E_NUM; ++cnt)
+ {
+ const char *str = elf_errmsg (libelf_msgs[cnt].id);
+
+ if (strcmp (str, libelf_msgs[cnt].expected) != 0)
+ {
+ printf ("libelf msg %zu: expected \"%s\", got \"%s\"\n",
+ cnt, libelf_msgs[cnt].expected, str);
+ result = EXIT_FAILURE;
+ }
+ }
+
+ return result;
+}
diff --git a/src/tests/newfile.c b/src/tests/newfile.c
new file mode 100644
index 00000000..5eabdcb7
--- /dev/null
+++ b/src/tests/newfile.c
@@ -0,0 +1,170 @@
+/* Copyright (C) 1999, 2000, 2001, 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <libelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+static void
+print_ehdr (Elf32_Ehdr *ehdr)
+{
+ int n;
+
+ for (n = 0; n < EI_NIDENT; ++n)
+ printf (" %02x", ehdr->e_ident[n]);
+
+ printf ("\ntype = %d\nmachine = %d\nversion = %d\nentry = %d\n"
+ "phoff = %d\nshoff = %d\nflags = %d\nehsize = %d\n"
+ "phentsize = %d\nphnum = %d\nshentsize = %d\nshnum = %d\n"
+ "shstrndx = %d\n",
+ ehdr->e_type,
+ ehdr->e_machine,
+ ehdr->e_version,
+ ehdr->e_entry,
+ ehdr->e_phoff,
+ ehdr->e_shoff,
+ ehdr->e_flags,
+ ehdr->e_ehsize,
+ ehdr->e_phentsize,
+ ehdr->e_phnum,
+ ehdr->e_shentsize,
+ ehdr->e_shnum,
+ ehdr->e_shstrndx);
+}
+
+int
+main (int argc, char *argv[] __attribute__ ((unused)))
+{
+ Elf *elf;
+ int result = 0;
+ int fd;
+ char fname[] = "newfile-XXXXXX";
+
+ fd = mkstemp (fname);
+ if (fd == -1)
+ {
+ printf ("cannot create temporary file: %m\n");
+ exit (1);
+ }
+ /* Remove the file when we exit. */
+ unlink (fname);
+
+ elf_version (EV_CURRENT);
+ elf = elf_begin (fd, ELF_C_WRITE, NULL);
+ if (elf == NULL)
+ {
+ printf ("elf_begin: %s\n", elf_errmsg (-1));
+ result = 1;
+ }
+ else
+ {
+ if (elf32_newehdr (elf) == NULL)
+ {
+ printf ("elf32_newehdr: %s\n", elf_errmsg (-1));
+ result = 1;
+ }
+ else
+ {
+ Elf32_Ehdr *ehdr = elf32_getehdr (elf);
+
+ if (ehdr == NULL)
+ {
+ printf ("elf32_getehdr: %s\n", elf_errmsg (-1));
+ result = 1;
+ }
+ else
+ {
+ int i;
+
+ if (argc > 1)
+ /* Use argc as a debugging flag. */
+ print_ehdr (ehdr);
+
+ /* Some tests. */
+ for (i = 0; i < EI_NIDENT; ++i)
+ if (ehdr->e_ident[i] != 0)
+ {
+ printf ("ehdr->e_ident[%d] != 0\n", i);
+ result = 1;
+ break;
+ }
+
+#define VALUE_TEST(name, val) \
+ if (ehdr->name != val) \
+ { \
+ printf ("ehdr->%s != %d\n", #name, val); \
+ result = 1; \
+ }
+#define ZERO_TEST(name) VALUE_TEST (name, 0)
+ ZERO_TEST (e_type);
+ ZERO_TEST (e_machine);
+ ZERO_TEST (e_version);
+ ZERO_TEST (e_entry);
+ ZERO_TEST (e_phoff);
+ ZERO_TEST (e_shoff);
+ ZERO_TEST (e_flags);
+ ZERO_TEST (e_ehsize);
+ ZERO_TEST (e_phentsize);
+ ZERO_TEST (e_phnum);
+ ZERO_TEST (e_shentsize);
+ ZERO_TEST (e_shnum);
+ ZERO_TEST (e_shstrndx);
+
+ if (elf32_newphdr (elf, 10) == NULL)
+ {
+ printf ("elf32_newphdr: %s\n", elf_errmsg (-1));
+ result = 1;
+ }
+ else
+ {
+ if (argc > 1)
+ print_ehdr (ehdr);
+
+ ehdr = elf32_getehdr (elf);
+ if (ehdr == NULL)
+ {
+ printf ("elf32_getehdr (#2): %s\n", elf_errmsg (-1));
+ result = 1;
+ }
+ else
+ {
+ ZERO_TEST (e_type);
+ ZERO_TEST (e_machine);
+ ZERO_TEST (e_version);
+ ZERO_TEST (e_entry);
+ ZERO_TEST (e_phoff);
+ ZERO_TEST (e_shoff);
+ ZERO_TEST (e_flags);
+ ZERO_TEST (e_ehsize);
+ VALUE_TEST (e_phentsize, (int) sizeof (Elf32_Phdr));
+ VALUE_TEST (e_phnum, 10);
+ ZERO_TEST (e_shentsize);
+ ZERO_TEST (e_shnum);
+ ZERO_TEST (e_shstrndx);
+ }
+ }
+ }
+ }
+
+ (void) elf_end (elf);
+ }
+
+ return result;
+}
diff --git a/src/tests/newscn.c b/src/tests/newscn.c
new file mode 100644
index 00000000..466f2f68
--- /dev/null
+++ b/src/tests/newscn.c
@@ -0,0 +1,66 @@
+/* Copyright (C) 1999, 2000, 2001, 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+#include <fcntl.h>
+#include <libelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+
+int
+main (void)
+{
+ Elf *elf;
+ int fd;
+ Elf_Scn *section;
+
+ if (elf_version (EV_CURRENT) == EV_NONE)
+ {
+ fprintf (stderr, "library fd of date\n");
+ exit (1);
+ }
+
+ char name[] = "test.XXXXXX";
+ fd = mkstemp (name);
+ if (fd < 0)
+ {
+ fprintf (stderr, "Failed to open fdput file: %s\n", name);
+ exit (1);
+ }
+ unlink (name);
+
+ elf = elf_begin (fd, ELF_C_WRITE, NULL);
+ if (elf == NULL)
+ {
+ fprintf (stderr, "Failed to elf_begin fdput file: %s\n", name);
+ exit (1);
+ }
+
+ section = elf_newscn (elf);
+ section = elf_nextscn (elf, section);
+ assert (section == NULL);
+
+ elf_end (elf);
+ close (fd);
+
+ return 0;
+}
diff --git a/src/tests/rdwrmmap.c b/src/tests/rdwrmmap.c
new file mode 100644
index 00000000..95a4df35
--- /dev/null
+++ b/src/tests/rdwrmmap.c
@@ -0,0 +1,45 @@
+/* Copyright (C) 2006 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <error.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <libelf.h>
+
+int
+main (int argc __attribute__ ((unused)), char *argv[])
+{
+ int fd = open (argv[1], O_RDWR);
+ if (fd < 0)
+ error (2, errno, "open: %s", argv[1]);
+
+ if (elf_version (EV_CURRENT) == EV_NONE)
+ error (1, 0, "libelf version mismatch");
+
+ Elf *elf = elf_begin (fd, ELF_C_RDWR_MMAP, NULL);
+ if (elf == NULL)
+ error (1, 0, "elf_begin: %s", elf_errmsg (-1));
+
+ if (elf_update (elf, ELF_C_WRITE) < 0)
+ error (1, 0, "elf_update: %s", elf_errmsg (-1));
+
+ elf_end (elf);
+ close (fd);
+
+ return 0;
+}
diff --git a/src/tests/rerequest_tag.c b/src/tests/rerequest_tag.c
new file mode 100644
index 00000000..d0bf5f24
--- /dev/null
+++ b/src/tests/rerequest_tag.c
@@ -0,0 +1,46 @@
+/* Copyright (C) 2011 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include ELFUTILS_HEADER(dw)
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+int
+main (int argc, char **argv)
+{
+ assert (argc > 1);
+
+ int i = open (argv[1], O_RDONLY);
+ assert (i >= 0);
+
+ Dwarf *dw = dwarf_begin (i, DWARF_C_READ);
+ assert (dw != NULL);
+
+ Dwarf_Die die_mem, *die;
+ die = dwarf_offdie (dw, 11, &die_mem);
+ assert (die == &die_mem);
+ assert (dwarf_tag (die) == 0);
+
+ die = dwarf_offdie (dw, 11, &die_mem);
+ assert (die == &die_mem);
+ assert (dwarf_tag (die) == 0);
+
+ return 0;
+}
diff --git a/src/tests/run-addr2line-i-lex-test.sh b/src/tests/run-addr2line-i-lex-test.sh
new file mode 100755
index 00000000..c391fd99
--- /dev/null
+++ b/src/tests/run-addr2line-i-lex-test.sh
@@ -0,0 +1,71 @@
+#! /bin/sh
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# // g++ x.cpp -g -fPIC -olibx.so -shared -O3 -fvisibility=hidden
+#
+# void foobar()
+# {
+# __asm__ ( "nop" ::: );
+# }
+#
+# void foo()
+# {
+# {
+# void (*bar) () = foobar;
+# bar();
+# }
+# }
+
+testfiles testfile-lex-inlines
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-lex-inlines 0x0000000000000680 <<\EOF
+/tmp/x.cpp:5
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-lex-inlines 0x0000000000000681 <<\EOF
+/tmp/x.cpp:5
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-lex-inlines 0x0000000000000690 <<\EOF
+/tmp/x.cpp:5
+/tmp/x.cpp:12
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-lex-inlines 0x0000000000000691 <<\EOF
+/tmp/x.cpp:5
+/tmp/x.cpp:12
+EOF
+
+# All together now (plus function names).
+testrun_compare ${abs_top_builddir}/src/addr2line -f -i -e testfile-lex-inlines 0x0000000000000680 0x0000000000000681 0x0000000000000690 0x0000000000000691 <<\EOF
+_Z6foobarv
+/tmp/x.cpp:5
+_Z6foobarv
+/tmp/x.cpp:5
+foobar inlined at /tmp/x.cpp:12 in _Z3foov
+/tmp/x.cpp:5
+_Z3foov
+/tmp/x.cpp:12
+foobar inlined at /tmp/x.cpp:12 in _Z3foov
+/tmp/x.cpp:5
+_Z3foov
+/tmp/x.cpp:12
+EOF
+
+exit 0
diff --git a/src/tests/run-addr2line-i-test.sh b/src/tests/run-addr2line-i-test.sh
new file mode 100755
index 00000000..183916c7
--- /dev/null
+++ b/src/tests/run-addr2line-i-test.sh
@@ -0,0 +1,147 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# // g++ x.cpp -g -fPIC -olibx.so -shared -O3 -fvisibility=hidden
+#
+# void foobar()
+# {
+# __asm__ ( "nop" ::: );
+# }
+#
+# void fubar()
+# {
+# __asm__ ( "nop" ::: );
+# }
+#
+# void bar()
+# {
+# foobar();
+# }
+#
+# void baz()
+# {
+# fubar();
+# }
+#
+# void foo()
+# {
+# bar();
+# baz();
+# }
+#
+# void fu()
+# {
+# __asm__ ( "nop" ::: );
+# fubar();
+# foobar();
+# }
+
+testfiles testfile-inlines
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-inlines 0x00000000000005a0 <<\EOF
+/tmp/x.cpp:5
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-inlines 0x00000000000005a1 <<\EOF
+/tmp/x.cpp:6
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-inlines 0x00000000000005b0 <<\EOF
+/tmp/x.cpp:10
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-inlines 0x00000000000005b1 <<\EOF
+/tmp/x.cpp:11
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-inlines 0x00000000000005c0 <<\EOF
+/tmp/x.cpp:5
+/tmp/x.cpp:15
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-inlines 0x00000000000005d0 <<\EOF
+/tmp/x.cpp:10
+/tmp/x.cpp:20
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-inlines 0x00000000000005e0 <<\EOF
+/tmp/x.cpp:5
+/tmp/x.cpp:15
+/tmp/x.cpp:25
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-inlines 0x00000000000005e1 <<\EOF
+/tmp/x.cpp:10
+/tmp/x.cpp:20
+/tmp/x.cpp:26
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-inlines 0x00000000000005f1 <<\EOF
+/tmp/x.cpp:10
+/tmp/x.cpp:32
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -i -e testfile-inlines 0x00000000000005f2 <<\EOF
+/tmp/x.cpp:5
+/tmp/x.cpp:33
+EOF
+
+# All together now (plus function names).
+testrun_compare ${abs_top_builddir}/src/addr2line -f -i -e testfile-inlines 0x00000000000005a0 0x00000000000005a1 0x00000000000005b0 0x00000000000005b1 0x00000000000005c0 0x00000000000005d0 0x00000000000005e0 0x00000000000005e1 0x00000000000005f0 0x00000000000005f1 0x00000000000005f2 <<\EOF
+foobar
+/tmp/x.cpp:5
+foobar
+/tmp/x.cpp:6
+fubar
+/tmp/x.cpp:10
+fubar
+/tmp/x.cpp:11
+foobar inlined at /tmp/x.cpp:15 in _Z3barv
+/tmp/x.cpp:5
+bar
+/tmp/x.cpp:15
+fubar inlined at /tmp/x.cpp:20 in _Z3bazv
+/tmp/x.cpp:10
+baz
+/tmp/x.cpp:20
+foobar inlined at /tmp/x.cpp:15 in _Z3foov
+/tmp/x.cpp:5
+bar
+/tmp/x.cpp:15
+_Z3foov
+/tmp/x.cpp:25
+fubar inlined at /tmp/x.cpp:20 in _Z3foov
+/tmp/x.cpp:10
+baz
+/tmp/x.cpp:20
+_Z3foov
+/tmp/x.cpp:26
+_Z2fuv
+/tmp/x.cpp:31
+fubar inlined at /tmp/x.cpp:32 in _Z2fuv
+/tmp/x.cpp:10
+_Z2fuv
+/tmp/x.cpp:32
+foobar inlined at /tmp/x.cpp:33 in _Z2fuv
+/tmp/x.cpp:5
+_Z2fuv
+/tmp/x.cpp:33
+EOF
+
+exit 0
diff --git a/src/tests/run-addr2line-test.sh b/src/tests/run-addr2line-test.sh
new file mode 100755
index 00000000..768006bf
--- /dev/null
+++ b/src/tests/run-addr2line-test.sh
@@ -0,0 +1,74 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile
+tempfiles good.out stdin.nl stdin.nl.out stdin.nonl stdin.nonl.out foo.out
+tempfiles addr2line.out
+
+cat > good.out <<\EOF
+foo
+/home/drepper/gnu/new-bu/build/ttt/f.c:3
+bar
+/home/drepper/gnu/new-bu/build/ttt/b.c:4
+foo
+/home/drepper/gnu/new-bu/build/ttt/f.c:3
+bar
+/home/drepper/gnu/new-bu/build/ttt/b.c:4
+foo
+/home/drepper/gnu/new-bu/build/ttt/f.c:3
+bar
+/home/drepper/gnu/new-bu/build/ttt/b.c:4
+foo
+/home/drepper/gnu/new-bu/build/ttt/f.c:3
+bar
+/home/drepper/gnu/new-bu/build/ttt/b.c:4
+EOF
+
+echo "# Everything on the command line"
+cat good.out | testrun_compare ${abs_top_builddir}/src/addr2line -f -e testfile 0x08048468 0x0804845c foo bar foo+0x0 bar+0x0 foo-0x0 bar-0x0
+
+cat > stdin.nl <<\EOF
+0x08048468
+0x0804845c
+foo
+bar
+foo+0x0
+bar+0x0
+foo-0x0
+bar-0x0
+EOF
+
+echo "# Everything from stdin (with newlines)."
+cat stdin.nl | testrun ${abs_top_builddir}/src/addr2line -f -e testfile > stdin.nl.out || exit 1
+cmp good.out stdin.nl.out || exit 1
+
+cat > foo.out <<\EOF
+foo
+/home/drepper/gnu/new-bu/build/ttt/f.c:3
+EOF
+
+echo "# stdin without newline address, just EOF."
+echo -n "0x08048468" | testrun ${abs_top_builddir}/src/addr2line -f -e testfile > stdin.nonl.out || exit 1
+cmp foo.out stdin.nonl.out || exit 1
+
+echo "# stdin without newline symbol, just EOF."
+echo -n "foo" | testrun ${abs_top_builddir}/src/addr2line -f -e testfile > stdin.nl.out || exit 1
+cmp foo.out stdin.nonl.out || exit 1
+
+exit 0
diff --git a/src/tests/run-addrcfi.sh b/src/tests/run-addrcfi.sh
new file mode 100755
index 00000000..5d33246a
--- /dev/null
+++ b/src/tests/run-addrcfi.sh
@@ -0,0 +1,2650 @@
+#! /bin/sh
+# Copyright (C) 2013
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Note some testfiles are also used in run-allregs.sh.
+
+# Shows return address, CFA location expression and register rules
+# from ABI's default CFI program as setup by arch ebl backend hook
+# abi_cfi unless overridden by CIE and FDE program at given address.
+
+# EM_386 (function main 0x080489b8)
+testfiles testfile11
+testrun_compare ${abs_builddir}/addrcfi -e testfile11 0x080489b8 <<\EOF
+.eh_frame has 0x80489b8 => [0x80489b8, 0x80489b9):
+ return address in reg8
+ CFA location expression: bregx(4,4)
+ integer reg0 (%eax): undefined
+ integer reg1 (%ecx): undefined
+ integer reg2 (%edx): undefined
+ integer reg3 (%ebx): same_value
+ integer reg4 (%esp): location expression: call_frame_cfa stack_value
+ integer reg5 (%ebp): same_value
+ integer reg6 (%esi): same_value
+ integer reg7 (%edi): same_value
+ integer reg8 (%eip): location expression: call_frame_cfa plus_uconst(-4)
+ integer reg9 (%eflags): undefined
+ integer reg10 (%trapno): undefined
+ x87 reg11 (%st0): undefined
+ x87 reg12 (%st1): undefined
+ x87 reg13 (%st2): undefined
+ x87 reg14 (%st3): undefined
+ x87 reg15 (%st4): undefined
+ x87 reg16 (%st5): undefined
+ x87 reg17 (%st6): undefined
+ x87 reg18 (%st7): undefined
+ SSE reg21 (%xmm0): undefined
+ SSE reg22 (%xmm1): undefined
+ SSE reg23 (%xmm2): undefined
+ SSE reg24 (%xmm3): undefined
+ SSE reg25 (%xmm4): undefined
+ SSE reg26 (%xmm5): undefined
+ SSE reg27 (%xmm6): undefined
+ SSE reg28 (%xmm7): undefined
+ MMX reg29 (%mm0): undefined
+ MMX reg30 (%mm1): undefined
+ MMX reg31 (%mm2): undefined
+ MMX reg32 (%mm3): undefined
+ MMX reg33 (%mm4): undefined
+ MMX reg34 (%mm5): undefined
+ MMX reg35 (%mm6): undefined
+ MMX reg36 (%mm7): undefined
+ FPU-control reg37 (%fctrl): undefined
+ FPU-control reg38 (%fstat): undefined
+ FPU-control reg39 (%mxcsr): undefined
+ segment reg40 (%es): same_value
+ segment reg41 (%cs): same_value
+ segment reg42 (%ss): same_value
+ segment reg43 (%ds): same_value
+ segment reg44 (%fs): same_value
+ segment reg45 (%gs): same_value
+.debug_frame has 0x80489b8 => [0x80489b8, 0x80489b9):
+ return address in reg8
+ CFA location expression: bregx(4,4)
+ integer reg0 (%eax): undefined
+ integer reg1 (%ecx): undefined
+ integer reg2 (%edx): undefined
+ integer reg3 (%ebx): same_value
+ integer reg4 (%esp): location expression: call_frame_cfa stack_value
+ integer reg5 (%ebp): same_value
+ integer reg6 (%esi): same_value
+ integer reg7 (%edi): same_value
+ integer reg8 (%eip): location expression: call_frame_cfa plus_uconst(-4)
+ integer reg9 (%eflags): undefined
+ integer reg10 (%trapno): undefined
+ x87 reg11 (%st0): undefined
+ x87 reg12 (%st1): undefined
+ x87 reg13 (%st2): undefined
+ x87 reg14 (%st3): undefined
+ x87 reg15 (%st4): undefined
+ x87 reg16 (%st5): undefined
+ x87 reg17 (%st6): undefined
+ x87 reg18 (%st7): undefined
+ SSE reg21 (%xmm0): undefined
+ SSE reg22 (%xmm1): undefined
+ SSE reg23 (%xmm2): undefined
+ SSE reg24 (%xmm3): undefined
+ SSE reg25 (%xmm4): undefined
+ SSE reg26 (%xmm5): undefined
+ SSE reg27 (%xmm6): undefined
+ SSE reg28 (%xmm7): undefined
+ MMX reg29 (%mm0): undefined
+ MMX reg30 (%mm1): undefined
+ MMX reg31 (%mm2): undefined
+ MMX reg32 (%mm3): undefined
+ MMX reg33 (%mm4): undefined
+ MMX reg34 (%mm5): undefined
+ MMX reg35 (%mm6): undefined
+ MMX reg36 (%mm7): undefined
+ FPU-control reg37 (%fctrl): undefined
+ FPU-control reg38 (%fstat): undefined
+ FPU-control reg39 (%mxcsr): undefined
+ segment reg40 (%es): same_value
+ segment reg41 (%cs): same_value
+ segment reg42 (%ss): same_value
+ segment reg43 (%ds): same_value
+ segment reg44 (%fs): same_value
+ segment reg45 (%gs): same_value
+EOF
+
+# EM_X86_64 (function foo 0x00000000000009d0)
+testfiles testfile12
+testrun_compare ${abs_builddir}/addrcfi -e testfile12 0x00000000000009d0 <<\EOF
+.eh_frame has 0x9d0 => [0x9d0, 0x9d1):
+ return address in reg16
+ CFA location expression: bregx(7,8)
+ integer reg0 (%rax): same_value
+ integer reg1 (%rdx): undefined
+ integer reg2 (%rcx): undefined
+ integer reg3 (%rbx): undefined
+ integer reg4 (%rsi): undefined
+ integer reg5 (%rdi): undefined
+ integer reg6 (%rbp): same_value
+ integer reg7 (%rsp): location expression: call_frame_cfa stack_value
+ integer reg8 (%r8): undefined
+ integer reg9 (%r9): undefined
+ integer reg10 (%r10): undefined
+ integer reg11 (%r11): undefined
+ integer reg12 (%r12): same_value
+ integer reg13 (%r13): same_value
+ integer reg14 (%r14): same_value
+ integer reg15 (%r15): same_value
+ integer reg16 (%rip): location expression: call_frame_cfa plus_uconst(-8)
+ SSE reg17 (%xmm0): undefined
+ SSE reg18 (%xmm1): undefined
+ SSE reg19 (%xmm2): undefined
+ SSE reg20 (%xmm3): undefined
+ SSE reg21 (%xmm4): undefined
+ SSE reg22 (%xmm5): undefined
+ SSE reg23 (%xmm6): undefined
+ SSE reg24 (%xmm7): undefined
+ SSE reg25 (%xmm8): undefined
+ SSE reg26 (%xmm9): undefined
+ SSE reg27 (%xmm10): undefined
+ SSE reg28 (%xmm11): undefined
+ SSE reg29 (%xmm12): undefined
+ SSE reg30 (%xmm13): undefined
+ SSE reg31 (%xmm14): undefined
+ SSE reg32 (%xmm15): undefined
+ x87 reg33 (%st0): undefined
+ x87 reg34 (%st1): undefined
+ x87 reg35 (%st2): undefined
+ x87 reg36 (%st3): undefined
+ x87 reg37 (%st4): undefined
+ x87 reg38 (%st5): undefined
+ x87 reg39 (%st6): undefined
+ x87 reg40 (%st7): undefined
+ MMX reg41 (%mm0): undefined
+ MMX reg42 (%mm1): undefined
+ MMX reg43 (%mm2): undefined
+ MMX reg44 (%mm3): undefined
+ MMX reg45 (%mm4): undefined
+ MMX reg46 (%mm5): undefined
+ MMX reg47 (%mm6): undefined
+ MMX reg48 (%mm7): undefined
+ integer reg49 (%rflags): undefined
+ segment reg50 (%es): undefined
+ segment reg51 (%cs): undefined
+ segment reg52 (%ss): undefined
+ segment reg53 (%ds): undefined
+ segment reg54 (%fs): undefined
+ segment reg55 (%gs): undefined
+ segment reg58 (%fs.base): undefined
+ segment reg59 (%gs.base): undefined
+ control reg62 (%tr): undefined
+ control reg63 (%ldtr): undefined
+ control reg64 (%mxcsr): undefined
+ control reg65 (%fcw): undefined
+ control reg66 (%fsw): undefined
+.debug_frame has 0x9d0 => [0x9d0, 0x9d1):
+ return address in reg16
+ CFA location expression: bregx(7,8)
+ integer reg0 (%rax): same_value
+ integer reg1 (%rdx): undefined
+ integer reg2 (%rcx): undefined
+ integer reg3 (%rbx): undefined
+ integer reg4 (%rsi): undefined
+ integer reg5 (%rdi): undefined
+ integer reg6 (%rbp): same_value
+ integer reg7 (%rsp): location expression: call_frame_cfa stack_value
+ integer reg8 (%r8): undefined
+ integer reg9 (%r9): undefined
+ integer reg10 (%r10): undefined
+ integer reg11 (%r11): undefined
+ integer reg12 (%r12): same_value
+ integer reg13 (%r13): same_value
+ integer reg14 (%r14): same_value
+ integer reg15 (%r15): same_value
+ integer reg16 (%rip): location expression: call_frame_cfa plus_uconst(-8)
+ SSE reg17 (%xmm0): undefined
+ SSE reg18 (%xmm1): undefined
+ SSE reg19 (%xmm2): undefined
+ SSE reg20 (%xmm3): undefined
+ SSE reg21 (%xmm4): undefined
+ SSE reg22 (%xmm5): undefined
+ SSE reg23 (%xmm6): undefined
+ SSE reg24 (%xmm7): undefined
+ SSE reg25 (%xmm8): undefined
+ SSE reg26 (%xmm9): undefined
+ SSE reg27 (%xmm10): undefined
+ SSE reg28 (%xmm11): undefined
+ SSE reg29 (%xmm12): undefined
+ SSE reg30 (%xmm13): undefined
+ SSE reg31 (%xmm14): undefined
+ SSE reg32 (%xmm15): undefined
+ x87 reg33 (%st0): undefined
+ x87 reg34 (%st1): undefined
+ x87 reg35 (%st2): undefined
+ x87 reg36 (%st3): undefined
+ x87 reg37 (%st4): undefined
+ x87 reg38 (%st5): undefined
+ x87 reg39 (%st6): undefined
+ x87 reg40 (%st7): undefined
+ MMX reg41 (%mm0): undefined
+ MMX reg42 (%mm1): undefined
+ MMX reg43 (%mm2): undefined
+ MMX reg44 (%mm3): undefined
+ MMX reg45 (%mm4): undefined
+ MMX reg46 (%mm5): undefined
+ MMX reg47 (%mm6): undefined
+ MMX reg48 (%mm7): undefined
+ integer reg49 (%rflags): undefined
+ segment reg50 (%es): undefined
+ segment reg51 (%cs): undefined
+ segment reg52 (%ss): undefined
+ segment reg53 (%ds): undefined
+ segment reg54 (%fs): undefined
+ segment reg55 (%gs): undefined
+ segment reg58 (%fs.base): undefined
+ segment reg59 (%gs.base): undefined
+ control reg62 (%tr): undefined
+ control reg63 (%ldtr): undefined
+ control reg64 (%mxcsr): undefined
+ control reg65 (%fcw): undefined
+ control reg66 (%fsw): undefined
+EOF
+
+# EM_PPC (function bar 0x100004c0)
+# Note. Only in .debug_frame, not in .eh_frame.
+#
+# = bar.c =
+#
+# static int b1 = 1;
+# int b2 = 1;
+#
+# static int
+# foo (int a)
+# {
+# return a + b2;
+# }
+#
+# int bar (int b)
+# {
+# return b - foo (b - b1);
+# }
+#
+# = foo.c =
+#
+# extern int bar (int b);
+# extern int b2;
+#
+# int
+# main (int argc, char ** argv)
+# {
+# return bar (argc + b2);
+# }
+#
+# gcc -g -O2 -m32 -c foo.c
+# gcc -g -O2 -m32 -c bar.c
+# gcc -g -O2 m32 -o testfileppc32 foo.o bar.o
+testfiles testfileppc32
+testrun_compare ${abs_builddir}/addrcfi -e testfileppc32 0x100004c0 <<\EOF
+dwarf_cfi_addrframe (.eh_frame): no matching address range
+.debug_frame has 0x100004c0 => [0x100004c0, 0x100004d0):
+ return address in reg65
+ CFA location expression: bregx(1)
+ integer reg0 (r0): undefined
+ integer reg1 (r1): location expression: call_frame_cfa stack_value
+ integer reg2 (r2): same_value
+ integer reg3 (r3): undefined
+ integer reg4 (r4): undefined
+ integer reg5 (r5): undefined
+ integer reg6 (r6): undefined
+ integer reg7 (r7): undefined
+ integer reg8 (r8): undefined
+ integer reg9 (r9): undefined
+ integer reg10 (r10): undefined
+ integer reg11 (r11): undefined
+ integer reg12 (r12): undefined
+ integer reg13 (r13): same_value
+ integer reg14 (r14): same_value
+ integer reg15 (r15): same_value
+ integer reg16 (r16): same_value
+ integer reg17 (r17): same_value
+ integer reg18 (r18): same_value
+ integer reg19 (r19): same_value
+ integer reg20 (r20): same_value
+ integer reg21 (r21): same_value
+ integer reg22 (r22): same_value
+ integer reg23 (r23): same_value
+ integer reg24 (r24): same_value
+ integer reg25 (r25): same_value
+ integer reg26 (r26): same_value
+ integer reg27 (r27): same_value
+ integer reg28 (r28): same_value
+ integer reg29 (r29): same_value
+ integer reg30 (r30): same_value
+ integer reg31 (r31): same_value
+ FPU reg32 (f0): undefined
+ FPU reg33 (f1): undefined
+ FPU reg34 (f2): undefined
+ FPU reg35 (f3): undefined
+ FPU reg36 (f4): undefined
+ FPU reg37 (f5): undefined
+ FPU reg38 (f6): undefined
+ FPU reg39 (f7): undefined
+ FPU reg40 (f8): undefined
+ FPU reg41 (f9): undefined
+ FPU reg42 (f10): undefined
+ FPU reg43 (f11): undefined
+ FPU reg44 (f12): undefined
+ FPU reg45 (f13): undefined
+ FPU reg46 (f14): undefined
+ FPU reg47 (f15): undefined
+ FPU reg48 (f16): undefined
+ FPU reg49 (f17): undefined
+ FPU reg50 (f18): undefined
+ FPU reg51 (f19): undefined
+ FPU reg52 (f20): undefined
+ FPU reg53 (f21): undefined
+ FPU reg54 (f22): undefined
+ FPU reg55 (f23): undefined
+ FPU reg56 (f24): undefined
+ FPU reg57 (f25): undefined
+ FPU reg58 (f26): undefined
+ FPU reg59 (f27): undefined
+ FPU reg60 (f28): undefined
+ FPU reg61 (f29): undefined
+ FPU reg62 (f30): undefined
+ FPU reg63 (f31): undefined
+ integer reg64 (cr): undefined
+ FPU reg65 (fpscr): same_value
+ integer reg66 (msr): undefined
+ vector reg67 (vscr): undefined
+ privileged reg70 (sr0): undefined
+ privileged reg71 (sr1): undefined
+ privileged reg72 (sr2): undefined
+ privileged reg73 (sr3): undefined
+ privileged reg74 (sr4): undefined
+ privileged reg75 (sr5): undefined
+ privileged reg76 (sr6): undefined
+ privileged reg77 (sr7): undefined
+ privileged reg78 (sr8): undefined
+ privileged reg79 (sr9): undefined
+ privileged reg80 (sr10): undefined
+ privileged reg81 (sr11): undefined
+ privileged reg82 (sr12): undefined
+ privileged reg83 (sr13): undefined
+ privileged reg84 (sr14): undefined
+ privileged reg85 (sr15): undefined
+ privileged reg100 (mq): undefined
+ privileged reg101 (xer): undefined
+ privileged reg102 (spr2): undefined
+ privileged reg103 (spr3): undefined
+ privileged reg104 (spr4): undefined
+ privileged reg105 (spr5): undefined
+ privileged reg106 (spr6): undefined
+ privileged reg107 (spr7): undefined
+ privileged reg108 (lr): undefined
+ privileged reg109 (ctr): undefined
+ privileged reg110 (spr10): undefined
+ privileged reg111 (spr11): undefined
+ privileged reg112 (spr12): undefined
+ privileged reg113 (spr13): undefined
+ privileged reg114 (spr14): undefined
+ privileged reg115 (spr15): undefined
+ privileged reg116 (spr16): undefined
+ privileged reg117 (spr17): undefined
+ privileged reg118 (dsisr): undefined
+ privileged reg119 (dar): undefined
+ privileged reg120 (spr20): undefined
+ privileged reg121 (spr21): undefined
+ privileged reg122 (dec): undefined
+ privileged reg123 (spr23): undefined
+ privileged reg124 (spr24): undefined
+ privileged reg125 (spr25): undefined
+ privileged reg126 (spr26): undefined
+ privileged reg127 (spr27): undefined
+ privileged reg128 (spr28): undefined
+ privileged reg129 (spr29): undefined
+ privileged reg130 (spr30): undefined
+ privileged reg131 (spr31): undefined
+ privileged reg132 (spr32): undefined
+ privileged reg133 (spr33): undefined
+ privileged reg134 (spr34): undefined
+ privileged reg135 (spr35): undefined
+ privileged reg136 (spr36): undefined
+ privileged reg137 (spr37): undefined
+ privileged reg138 (spr38): undefined
+ privileged reg139 (spr39): undefined
+ privileged reg140 (spr40): undefined
+ privileged reg141 (spr41): undefined
+ privileged reg142 (spr42): undefined
+ privileged reg143 (spr43): undefined
+ privileged reg144 (spr44): undefined
+ privileged reg145 (spr45): undefined
+ privileged reg146 (spr46): undefined
+ privileged reg147 (spr47): undefined
+ privileged reg148 (spr48): undefined
+ privileged reg149 (spr49): undefined
+ privileged reg150 (spr50): undefined
+ privileged reg151 (spr51): undefined
+ privileged reg152 (spr52): undefined
+ privileged reg153 (spr53): undefined
+ privileged reg154 (spr54): undefined
+ privileged reg155 (spr55): undefined
+ privileged reg156 (spr56): undefined
+ privileged reg157 (spr57): undefined
+ privileged reg158 (spr58): undefined
+ privileged reg159 (spr59): undefined
+ privileged reg160 (spr60): undefined
+ privileged reg161 (spr61): undefined
+ privileged reg162 (spr62): undefined
+ privileged reg163 (spr63): undefined
+ privileged reg164 (spr64): undefined
+ privileged reg165 (spr65): undefined
+ privileged reg166 (spr66): undefined
+ privileged reg167 (spr67): undefined
+ privileged reg168 (spr68): undefined
+ privileged reg169 (spr69): undefined
+ privileged reg170 (spr70): undefined
+ privileged reg171 (spr71): undefined
+ privileged reg172 (spr72): undefined
+ privileged reg173 (spr73): undefined
+ privileged reg174 (spr74): undefined
+ privileged reg175 (spr75): undefined
+ privileged reg176 (spr76): undefined
+ privileged reg177 (spr77): undefined
+ privileged reg178 (spr78): undefined
+ privileged reg179 (spr79): undefined
+ privileged reg180 (spr80): undefined
+ privileged reg181 (spr81): undefined
+ privileged reg182 (spr82): undefined
+ privileged reg183 (spr83): undefined
+ privileged reg184 (spr84): undefined
+ privileged reg185 (spr85): undefined
+ privileged reg186 (spr86): undefined
+ privileged reg187 (spr87): undefined
+ privileged reg188 (spr88): undefined
+ privileged reg189 (spr89): undefined
+ privileged reg190 (spr90): undefined
+ privileged reg191 (spr91): undefined
+ privileged reg192 (spr92): undefined
+ privileged reg193 (spr93): undefined
+ privileged reg194 (spr94): undefined
+ privileged reg195 (spr95): undefined
+ privileged reg196 (spr96): undefined
+ privileged reg197 (spr97): undefined
+ privileged reg198 (spr98): undefined
+ privileged reg199 (spr99): undefined
+ privileged reg200 (spr100): undefined
+ privileged reg201 (spr101): undefined
+ privileged reg202 (spr102): undefined
+ privileged reg203 (spr103): undefined
+ privileged reg204 (spr104): undefined
+ privileged reg205 (spr105): undefined
+ privileged reg206 (spr106): undefined
+ privileged reg207 (spr107): undefined
+ privileged reg208 (spr108): undefined
+ privileged reg209 (spr109): undefined
+ privileged reg210 (spr110): undefined
+ privileged reg211 (spr111): undefined
+ privileged reg212 (spr112): undefined
+ privileged reg213 (spr113): undefined
+ privileged reg214 (spr114): undefined
+ privileged reg215 (spr115): undefined
+ privileged reg216 (spr116): undefined
+ privileged reg217 (spr117): undefined
+ privileged reg218 (spr118): undefined
+ privileged reg219 (spr119): undefined
+ privileged reg220 (spr120): undefined
+ privileged reg221 (spr121): undefined
+ privileged reg222 (spr122): undefined
+ privileged reg223 (spr123): undefined
+ privileged reg224 (spr124): undefined
+ privileged reg225 (spr125): undefined
+ privileged reg226 (spr126): undefined
+ privileged reg227 (spr127): undefined
+ privileged reg228 (spr128): undefined
+ privileged reg229 (spr129): undefined
+ privileged reg230 (spr130): undefined
+ privileged reg231 (spr131): undefined
+ privileged reg232 (spr132): undefined
+ privileged reg233 (spr133): undefined
+ privileged reg234 (spr134): undefined
+ privileged reg235 (spr135): undefined
+ privileged reg236 (spr136): undefined
+ privileged reg237 (spr137): undefined
+ privileged reg238 (spr138): undefined
+ privileged reg239 (spr139): undefined
+ privileged reg240 (spr140): undefined
+ privileged reg241 (spr141): undefined
+ privileged reg242 (spr142): undefined
+ privileged reg243 (spr143): undefined
+ privileged reg244 (spr144): undefined
+ privileged reg245 (spr145): undefined
+ privileged reg246 (spr146): undefined
+ privileged reg247 (spr147): undefined
+ privileged reg248 (spr148): undefined
+ privileged reg249 (spr149): undefined
+ privileged reg250 (spr150): undefined
+ privileged reg251 (spr151): undefined
+ privileged reg252 (spr152): undefined
+ privileged reg253 (spr153): undefined
+ privileged reg254 (spr154): undefined
+ privileged reg255 (spr155): undefined
+ privileged reg256 (spr156): undefined
+ privileged reg257 (spr157): undefined
+ privileged reg258 (spr158): undefined
+ privileged reg259 (spr159): undefined
+ privileged reg260 (spr160): undefined
+ privileged reg261 (spr161): undefined
+ privileged reg262 (spr162): undefined
+ privileged reg263 (spr163): undefined
+ privileged reg264 (spr164): undefined
+ privileged reg265 (spr165): undefined
+ privileged reg266 (spr166): undefined
+ privileged reg267 (spr167): undefined
+ privileged reg268 (spr168): undefined
+ privileged reg269 (spr169): undefined
+ privileged reg270 (spr170): undefined
+ privileged reg271 (spr171): undefined
+ privileged reg272 (spr172): undefined
+ privileged reg273 (spr173): undefined
+ privileged reg274 (spr174): undefined
+ privileged reg275 (spr175): undefined
+ privileged reg276 (spr176): undefined
+ privileged reg277 (spr177): undefined
+ privileged reg278 (spr178): undefined
+ privileged reg279 (spr179): undefined
+ privileged reg280 (spr180): undefined
+ privileged reg281 (spr181): undefined
+ privileged reg282 (spr182): undefined
+ privileged reg283 (spr183): undefined
+ privileged reg284 (spr184): undefined
+ privileged reg285 (spr185): undefined
+ privileged reg286 (spr186): undefined
+ privileged reg287 (spr187): undefined
+ privileged reg288 (spr188): undefined
+ privileged reg289 (spr189): undefined
+ privileged reg290 (spr190): undefined
+ privileged reg291 (spr191): undefined
+ privileged reg292 (spr192): undefined
+ privileged reg293 (spr193): undefined
+ privileged reg294 (spr194): undefined
+ privileged reg295 (spr195): undefined
+ privileged reg296 (spr196): undefined
+ privileged reg297 (spr197): undefined
+ privileged reg298 (spr198): undefined
+ privileged reg299 (spr199): undefined
+ privileged reg300 (spr200): undefined
+ privileged reg301 (spr201): undefined
+ privileged reg302 (spr202): undefined
+ privileged reg303 (spr203): undefined
+ privileged reg304 (spr204): undefined
+ privileged reg305 (spr205): undefined
+ privileged reg306 (spr206): undefined
+ privileged reg307 (spr207): undefined
+ privileged reg308 (spr208): undefined
+ privileged reg309 (spr209): undefined
+ privileged reg310 (spr210): undefined
+ privileged reg311 (spr211): undefined
+ privileged reg312 (spr212): undefined
+ privileged reg313 (spr213): undefined
+ privileged reg314 (spr214): undefined
+ privileged reg315 (spr215): undefined
+ privileged reg316 (spr216): undefined
+ privileged reg317 (spr217): undefined
+ privileged reg318 (spr218): undefined
+ privileged reg319 (spr219): undefined
+ privileged reg320 (spr220): undefined
+ privileged reg321 (spr221): undefined
+ privileged reg322 (spr222): undefined
+ privileged reg323 (spr223): undefined
+ privileged reg324 (spr224): undefined
+ privileged reg325 (spr225): undefined
+ privileged reg326 (spr226): undefined
+ privileged reg327 (spr227): undefined
+ privileged reg328 (spr228): undefined
+ privileged reg329 (spr229): undefined
+ privileged reg330 (spr230): undefined
+ privileged reg331 (spr231): undefined
+ privileged reg332 (spr232): undefined
+ privileged reg333 (spr233): undefined
+ privileged reg334 (spr234): undefined
+ privileged reg335 (spr235): undefined
+ privileged reg336 (spr236): undefined
+ privileged reg337 (spr237): undefined
+ privileged reg338 (spr238): undefined
+ privileged reg339 (spr239): undefined
+ privileged reg340 (spr240): undefined
+ privileged reg341 (spr241): undefined
+ privileged reg342 (spr242): undefined
+ privileged reg343 (spr243): undefined
+ privileged reg344 (spr244): undefined
+ privileged reg345 (spr245): undefined
+ privileged reg346 (spr246): undefined
+ privileged reg347 (spr247): undefined
+ privileged reg348 (spr248): undefined
+ privileged reg349 (spr249): undefined
+ privileged reg350 (spr250): undefined
+ privileged reg351 (spr251): undefined
+ privileged reg352 (spr252): undefined
+ privileged reg353 (spr253): undefined
+ privileged reg354 (spr254): undefined
+ privileged reg355 (spr255): undefined
+ vector reg356 (vrsave): undefined
+ privileged reg357 (spr257): undefined
+ privileged reg358 (spr258): undefined
+ privileged reg359 (spr259): undefined
+ privileged reg360 (spr260): undefined
+ privileged reg361 (spr261): undefined
+ privileged reg362 (spr262): undefined
+ privileged reg363 (spr263): undefined
+ privileged reg364 (spr264): undefined
+ privileged reg365 (spr265): undefined
+ privileged reg366 (spr266): undefined
+ privileged reg367 (spr267): undefined
+ privileged reg368 (spr268): undefined
+ privileged reg369 (spr269): undefined
+ privileged reg370 (spr270): undefined
+ privileged reg371 (spr271): undefined
+ privileged reg372 (spr272): undefined
+ privileged reg373 (spr273): undefined
+ privileged reg374 (spr274): undefined
+ privileged reg375 (spr275): undefined
+ privileged reg376 (spr276): undefined
+ privileged reg377 (spr277): undefined
+ privileged reg378 (spr278): undefined
+ privileged reg379 (spr279): undefined
+ privileged reg380 (spr280): undefined
+ privileged reg381 (spr281): undefined
+ privileged reg382 (spr282): undefined
+ privileged reg383 (spr283): undefined
+ privileged reg384 (spr284): undefined
+ privileged reg385 (spr285): undefined
+ privileged reg386 (spr286): undefined
+ privileged reg387 (spr287): undefined
+ privileged reg388 (spr288): undefined
+ privileged reg389 (spr289): undefined
+ privileged reg390 (spr290): undefined
+ privileged reg391 (spr291): undefined
+ privileged reg392 (spr292): undefined
+ privileged reg393 (spr293): undefined
+ privileged reg394 (spr294): undefined
+ privileged reg395 (spr295): undefined
+ privileged reg396 (spr296): undefined
+ privileged reg397 (spr297): undefined
+ privileged reg398 (spr298): undefined
+ privileged reg399 (spr299): undefined
+ privileged reg400 (spr300): undefined
+ privileged reg401 (spr301): undefined
+ privileged reg402 (spr302): undefined
+ privileged reg403 (spr303): undefined
+ privileged reg404 (spr304): undefined
+ privileged reg405 (spr305): undefined
+ privileged reg406 (spr306): undefined
+ privileged reg407 (spr307): undefined
+ privileged reg408 (spr308): undefined
+ privileged reg409 (spr309): undefined
+ privileged reg410 (spr310): undefined
+ privileged reg411 (spr311): undefined
+ privileged reg412 (spr312): undefined
+ privileged reg413 (spr313): undefined
+ privileged reg414 (spr314): undefined
+ privileged reg415 (spr315): undefined
+ privileged reg416 (spr316): undefined
+ privileged reg417 (spr317): undefined
+ privileged reg418 (spr318): undefined
+ privileged reg419 (spr319): undefined
+ privileged reg420 (spr320): undefined
+ privileged reg421 (spr321): undefined
+ privileged reg422 (spr322): undefined
+ privileged reg423 (spr323): undefined
+ privileged reg424 (spr324): undefined
+ privileged reg425 (spr325): undefined
+ privileged reg426 (spr326): undefined
+ privileged reg427 (spr327): undefined
+ privileged reg428 (spr328): undefined
+ privileged reg429 (spr329): undefined
+ privileged reg430 (spr330): undefined
+ privileged reg431 (spr331): undefined
+ privileged reg432 (spr332): undefined
+ privileged reg433 (spr333): undefined
+ privileged reg434 (spr334): undefined
+ privileged reg435 (spr335): undefined
+ privileged reg436 (spr336): undefined
+ privileged reg437 (spr337): undefined
+ privileged reg438 (spr338): undefined
+ privileged reg439 (spr339): undefined
+ privileged reg440 (spr340): undefined
+ privileged reg441 (spr341): undefined
+ privileged reg442 (spr342): undefined
+ privileged reg443 (spr343): undefined
+ privileged reg444 (spr344): undefined
+ privileged reg445 (spr345): undefined
+ privileged reg446 (spr346): undefined
+ privileged reg447 (spr347): undefined
+ privileged reg448 (spr348): undefined
+ privileged reg449 (spr349): undefined
+ privileged reg450 (spr350): undefined
+ privileged reg451 (spr351): undefined
+ privileged reg452 (spr352): undefined
+ privileged reg453 (spr353): undefined
+ privileged reg454 (spr354): undefined
+ privileged reg455 (spr355): undefined
+ privileged reg456 (spr356): undefined
+ privileged reg457 (spr357): undefined
+ privileged reg458 (spr358): undefined
+ privileged reg459 (spr359): undefined
+ privileged reg460 (spr360): undefined
+ privileged reg461 (spr361): undefined
+ privileged reg462 (spr362): undefined
+ privileged reg463 (spr363): undefined
+ privileged reg464 (spr364): undefined
+ privileged reg465 (spr365): undefined
+ privileged reg466 (spr366): undefined
+ privileged reg467 (spr367): undefined
+ privileged reg468 (spr368): undefined
+ privileged reg469 (spr369): undefined
+ privileged reg470 (spr370): undefined
+ privileged reg471 (spr371): undefined
+ privileged reg472 (spr372): undefined
+ privileged reg473 (spr373): undefined
+ privileged reg474 (spr374): undefined
+ privileged reg475 (spr375): undefined
+ privileged reg476 (spr376): undefined
+ privileged reg477 (spr377): undefined
+ privileged reg478 (spr378): undefined
+ privileged reg479 (spr379): undefined
+ privileged reg480 (spr380): undefined
+ privileged reg481 (spr381): undefined
+ privileged reg482 (spr382): undefined
+ privileged reg483 (spr383): undefined
+ privileged reg484 (spr384): undefined
+ privileged reg485 (spr385): undefined
+ privileged reg486 (spr386): undefined
+ privileged reg487 (spr387): undefined
+ privileged reg488 (spr388): undefined
+ privileged reg489 (spr389): undefined
+ privileged reg490 (spr390): undefined
+ privileged reg491 (spr391): undefined
+ privileged reg492 (spr392): undefined
+ privileged reg493 (spr393): undefined
+ privileged reg494 (spr394): undefined
+ privileged reg495 (spr395): undefined
+ privileged reg496 (spr396): undefined
+ privileged reg497 (spr397): undefined
+ privileged reg498 (spr398): undefined
+ privileged reg499 (spr399): undefined
+ privileged reg500 (spr400): undefined
+ privileged reg501 (spr401): undefined
+ privileged reg502 (spr402): undefined
+ privileged reg503 (spr403): undefined
+ privileged reg504 (spr404): undefined
+ privileged reg505 (spr405): undefined
+ privileged reg506 (spr406): undefined
+ privileged reg507 (spr407): undefined
+ privileged reg508 (spr408): undefined
+ privileged reg509 (spr409): undefined
+ privileged reg510 (spr410): undefined
+ privileged reg511 (spr411): undefined
+ privileged reg512 (spr412): undefined
+ privileged reg513 (spr413): undefined
+ privileged reg514 (spr414): undefined
+ privileged reg515 (spr415): undefined
+ privileged reg516 (spr416): undefined
+ privileged reg517 (spr417): undefined
+ privileged reg518 (spr418): undefined
+ privileged reg519 (spr419): undefined
+ privileged reg520 (spr420): undefined
+ privileged reg521 (spr421): undefined
+ privileged reg522 (spr422): undefined
+ privileged reg523 (spr423): undefined
+ privileged reg524 (spr424): undefined
+ privileged reg525 (spr425): undefined
+ privileged reg526 (spr426): undefined
+ privileged reg527 (spr427): undefined
+ privileged reg528 (spr428): undefined
+ privileged reg529 (spr429): undefined
+ privileged reg530 (spr430): undefined
+ privileged reg531 (spr431): undefined
+ privileged reg532 (spr432): undefined
+ privileged reg533 (spr433): undefined
+ privileged reg534 (spr434): undefined
+ privileged reg535 (spr435): undefined
+ privileged reg536 (spr436): undefined
+ privileged reg537 (spr437): undefined
+ privileged reg538 (spr438): undefined
+ privileged reg539 (spr439): undefined
+ privileged reg540 (spr440): undefined
+ privileged reg541 (spr441): undefined
+ privileged reg542 (spr442): undefined
+ privileged reg543 (spr443): undefined
+ privileged reg544 (spr444): undefined
+ privileged reg545 (spr445): undefined
+ privileged reg546 (spr446): undefined
+ privileged reg547 (spr447): undefined
+ privileged reg548 (spr448): undefined
+ privileged reg549 (spr449): undefined
+ privileged reg550 (spr450): undefined
+ privileged reg551 (spr451): undefined
+ privileged reg552 (spr452): undefined
+ privileged reg553 (spr453): undefined
+ privileged reg554 (spr454): undefined
+ privileged reg555 (spr455): undefined
+ privileged reg556 (spr456): undefined
+ privileged reg557 (spr457): undefined
+ privileged reg558 (spr458): undefined
+ privileged reg559 (spr459): undefined
+ privileged reg560 (spr460): undefined
+ privileged reg561 (spr461): undefined
+ privileged reg562 (spr462): undefined
+ privileged reg563 (spr463): undefined
+ privileged reg564 (spr464): undefined
+ privileged reg565 (spr465): undefined
+ privileged reg566 (spr466): undefined
+ privileged reg567 (spr467): undefined
+ privileged reg568 (spr468): undefined
+ privileged reg569 (spr469): undefined
+ privileged reg570 (spr470): undefined
+ privileged reg571 (spr471): undefined
+ privileged reg572 (spr472): undefined
+ privileged reg573 (spr473): undefined
+ privileged reg574 (spr474): undefined
+ privileged reg575 (spr475): undefined
+ privileged reg576 (spr476): undefined
+ privileged reg577 (spr477): undefined
+ privileged reg578 (spr478): undefined
+ privileged reg579 (spr479): undefined
+ privileged reg580 (spr480): undefined
+ privileged reg581 (spr481): undefined
+ privileged reg582 (spr482): undefined
+ privileged reg583 (spr483): undefined
+ privileged reg584 (spr484): undefined
+ privileged reg585 (spr485): undefined
+ privileged reg586 (spr486): undefined
+ privileged reg587 (spr487): undefined
+ privileged reg588 (spr488): undefined
+ privileged reg589 (spr489): undefined
+ privileged reg590 (spr490): undefined
+ privileged reg591 (spr491): undefined
+ privileged reg592 (spr492): undefined
+ privileged reg593 (spr493): undefined
+ privileged reg594 (spr494): undefined
+ privileged reg595 (spr495): undefined
+ privileged reg596 (spr496): undefined
+ privileged reg597 (spr497): undefined
+ privileged reg598 (spr498): undefined
+ privileged reg599 (spr499): undefined
+ privileged reg600 (spr500): undefined
+ privileged reg601 (spr501): undefined
+ privileged reg602 (spr502): undefined
+ privileged reg603 (spr503): undefined
+ privileged reg604 (spr504): undefined
+ privileged reg605 (spr505): undefined
+ privileged reg606 (spr506): undefined
+ privileged reg607 (spr507): undefined
+ privileged reg608 (spr508): undefined
+ privileged reg609 (spr509): undefined
+ privileged reg610 (spr510): undefined
+ privileged reg611 (spr511): undefined
+ vector reg612 (spefscr): undefined
+ privileged reg613 (spr513): undefined
+ privileged reg614 (spr514): undefined
+ privileged reg615 (spr515): undefined
+ privileged reg616 (spr516): undefined
+ privileged reg617 (spr517): undefined
+ privileged reg618 (spr518): undefined
+ privileged reg619 (spr519): undefined
+ privileged reg620 (spr520): undefined
+ privileged reg621 (spr521): undefined
+ privileged reg622 (spr522): undefined
+ privileged reg623 (spr523): undefined
+ privileged reg624 (spr524): undefined
+ privileged reg625 (spr525): undefined
+ privileged reg626 (spr526): undefined
+ privileged reg627 (spr527): undefined
+ privileged reg628 (spr528): undefined
+ privileged reg629 (spr529): undefined
+ privileged reg630 (spr530): undefined
+ privileged reg631 (spr531): undefined
+ privileged reg632 (spr532): undefined
+ privileged reg633 (spr533): undefined
+ privileged reg634 (spr534): undefined
+ privileged reg635 (spr535): undefined
+ privileged reg636 (spr536): undefined
+ privileged reg637 (spr537): undefined
+ privileged reg638 (spr538): undefined
+ privileged reg639 (spr539): undefined
+ privileged reg640 (spr540): undefined
+ privileged reg641 (spr541): undefined
+ privileged reg642 (spr542): undefined
+ privileged reg643 (spr543): undefined
+ privileged reg644 (spr544): undefined
+ privileged reg645 (spr545): undefined
+ privileged reg646 (spr546): undefined
+ privileged reg647 (spr547): undefined
+ privileged reg648 (spr548): undefined
+ privileged reg649 (spr549): undefined
+ privileged reg650 (spr550): undefined
+ privileged reg651 (spr551): undefined
+ privileged reg652 (spr552): undefined
+ privileged reg653 (spr553): undefined
+ privileged reg654 (spr554): undefined
+ privileged reg655 (spr555): undefined
+ privileged reg656 (spr556): undefined
+ privileged reg657 (spr557): undefined
+ privileged reg658 (spr558): undefined
+ privileged reg659 (spr559): undefined
+ privileged reg660 (spr560): undefined
+ privileged reg661 (spr561): undefined
+ privileged reg662 (spr562): undefined
+ privileged reg663 (spr563): undefined
+ privileged reg664 (spr564): undefined
+ privileged reg665 (spr565): undefined
+ privileged reg666 (spr566): undefined
+ privileged reg667 (spr567): undefined
+ privileged reg668 (spr568): undefined
+ privileged reg669 (spr569): undefined
+ privileged reg670 (spr570): undefined
+ privileged reg671 (spr571): undefined
+ privileged reg672 (spr572): undefined
+ privileged reg673 (spr573): undefined
+ privileged reg674 (spr574): undefined
+ privileged reg675 (spr575): undefined
+ privileged reg676 (spr576): undefined
+ privileged reg677 (spr577): undefined
+ privileged reg678 (spr578): undefined
+ privileged reg679 (spr579): undefined
+ privileged reg680 (spr580): undefined
+ privileged reg681 (spr581): undefined
+ privileged reg682 (spr582): undefined
+ privileged reg683 (spr583): undefined
+ privileged reg684 (spr584): undefined
+ privileged reg685 (spr585): undefined
+ privileged reg686 (spr586): undefined
+ privileged reg687 (spr587): undefined
+ privileged reg688 (spr588): undefined
+ privileged reg689 (spr589): undefined
+ privileged reg690 (spr590): undefined
+ privileged reg691 (spr591): undefined
+ privileged reg692 (spr592): undefined
+ privileged reg693 (spr593): undefined
+ privileged reg694 (spr594): undefined
+ privileged reg695 (spr595): undefined
+ privileged reg696 (spr596): undefined
+ privileged reg697 (spr597): undefined
+ privileged reg698 (spr598): undefined
+ privileged reg699 (spr599): undefined
+ privileged reg700 (spr600): undefined
+ privileged reg701 (spr601): undefined
+ privileged reg702 (spr602): undefined
+ privileged reg703 (spr603): undefined
+ privileged reg704 (spr604): undefined
+ privileged reg705 (spr605): undefined
+ privileged reg706 (spr606): undefined
+ privileged reg707 (spr607): undefined
+ privileged reg708 (spr608): undefined
+ privileged reg709 (spr609): undefined
+ privileged reg710 (spr610): undefined
+ privileged reg711 (spr611): undefined
+ privileged reg712 (spr612): undefined
+ privileged reg713 (spr613): undefined
+ privileged reg714 (spr614): undefined
+ privileged reg715 (spr615): undefined
+ privileged reg716 (spr616): undefined
+ privileged reg717 (spr617): undefined
+ privileged reg718 (spr618): undefined
+ privileged reg719 (spr619): undefined
+ privileged reg720 (spr620): undefined
+ privileged reg721 (spr621): undefined
+ privileged reg722 (spr622): undefined
+ privileged reg723 (spr623): undefined
+ privileged reg724 (spr624): undefined
+ privileged reg725 (spr625): undefined
+ privileged reg726 (spr626): undefined
+ privileged reg727 (spr627): undefined
+ privileged reg728 (spr628): undefined
+ privileged reg729 (spr629): undefined
+ privileged reg730 (spr630): undefined
+ privileged reg731 (spr631): undefined
+ privileged reg732 (spr632): undefined
+ privileged reg733 (spr633): undefined
+ privileged reg734 (spr634): undefined
+ privileged reg735 (spr635): undefined
+ privileged reg736 (spr636): undefined
+ privileged reg737 (spr637): undefined
+ privileged reg738 (spr638): undefined
+ privileged reg739 (spr639): undefined
+ privileged reg740 (spr640): undefined
+ privileged reg741 (spr641): undefined
+ privileged reg742 (spr642): undefined
+ privileged reg743 (spr643): undefined
+ privileged reg744 (spr644): undefined
+ privileged reg745 (spr645): undefined
+ privileged reg746 (spr646): undefined
+ privileged reg747 (spr647): undefined
+ privileged reg748 (spr648): undefined
+ privileged reg749 (spr649): undefined
+ privileged reg750 (spr650): undefined
+ privileged reg751 (spr651): undefined
+ privileged reg752 (spr652): undefined
+ privileged reg753 (spr653): undefined
+ privileged reg754 (spr654): undefined
+ privileged reg755 (spr655): undefined
+ privileged reg756 (spr656): undefined
+ privileged reg757 (spr657): undefined
+ privileged reg758 (spr658): undefined
+ privileged reg759 (spr659): undefined
+ privileged reg760 (spr660): undefined
+ privileged reg761 (spr661): undefined
+ privileged reg762 (spr662): undefined
+ privileged reg763 (spr663): undefined
+ privileged reg764 (spr664): undefined
+ privileged reg765 (spr665): undefined
+ privileged reg766 (spr666): undefined
+ privileged reg767 (spr667): undefined
+ privileged reg768 (spr668): undefined
+ privileged reg769 (spr669): undefined
+ privileged reg770 (spr670): undefined
+ privileged reg771 (spr671): undefined
+ privileged reg772 (spr672): undefined
+ privileged reg773 (spr673): undefined
+ privileged reg774 (spr674): undefined
+ privileged reg775 (spr675): undefined
+ privileged reg776 (spr676): undefined
+ privileged reg777 (spr677): undefined
+ privileged reg778 (spr678): undefined
+ privileged reg779 (spr679): undefined
+ privileged reg780 (spr680): undefined
+ privileged reg781 (spr681): undefined
+ privileged reg782 (spr682): undefined
+ privileged reg783 (spr683): undefined
+ privileged reg784 (spr684): undefined
+ privileged reg785 (spr685): undefined
+ privileged reg786 (spr686): undefined
+ privileged reg787 (spr687): undefined
+ privileged reg788 (spr688): undefined
+ privileged reg789 (spr689): undefined
+ privileged reg790 (spr690): undefined
+ privileged reg791 (spr691): undefined
+ privileged reg792 (spr692): undefined
+ privileged reg793 (spr693): undefined
+ privileged reg794 (spr694): undefined
+ privileged reg795 (spr695): undefined
+ privileged reg796 (spr696): undefined
+ privileged reg797 (spr697): undefined
+ privileged reg798 (spr698): undefined
+ privileged reg799 (spr699): undefined
+ privileged reg800 (spr700): undefined
+ privileged reg801 (spr701): undefined
+ privileged reg802 (spr702): undefined
+ privileged reg803 (spr703): undefined
+ privileged reg804 (spr704): undefined
+ privileged reg805 (spr705): undefined
+ privileged reg806 (spr706): undefined
+ privileged reg807 (spr707): undefined
+ privileged reg808 (spr708): undefined
+ privileged reg809 (spr709): undefined
+ privileged reg810 (spr710): undefined
+ privileged reg811 (spr711): undefined
+ privileged reg812 (spr712): undefined
+ privileged reg813 (spr713): undefined
+ privileged reg814 (spr714): undefined
+ privileged reg815 (spr715): undefined
+ privileged reg816 (spr716): undefined
+ privileged reg817 (spr717): undefined
+ privileged reg818 (spr718): undefined
+ privileged reg819 (spr719): undefined
+ privileged reg820 (spr720): undefined
+ privileged reg821 (spr721): undefined
+ privileged reg822 (spr722): undefined
+ privileged reg823 (spr723): undefined
+ privileged reg824 (spr724): undefined
+ privileged reg825 (spr725): undefined
+ privileged reg826 (spr726): undefined
+ privileged reg827 (spr727): undefined
+ privileged reg828 (spr728): undefined
+ privileged reg829 (spr729): undefined
+ privileged reg830 (spr730): undefined
+ privileged reg831 (spr731): undefined
+ privileged reg832 (spr732): undefined
+ privileged reg833 (spr733): undefined
+ privileged reg834 (spr734): undefined
+ privileged reg835 (spr735): undefined
+ privileged reg836 (spr736): undefined
+ privileged reg837 (spr737): undefined
+ privileged reg838 (spr738): undefined
+ privileged reg839 (spr739): undefined
+ privileged reg840 (spr740): undefined
+ privileged reg841 (spr741): undefined
+ privileged reg842 (spr742): undefined
+ privileged reg843 (spr743): undefined
+ privileged reg844 (spr744): undefined
+ privileged reg845 (spr745): undefined
+ privileged reg846 (spr746): undefined
+ privileged reg847 (spr747): undefined
+ privileged reg848 (spr748): undefined
+ privileged reg849 (spr749): undefined
+ privileged reg850 (spr750): undefined
+ privileged reg851 (spr751): undefined
+ privileged reg852 (spr752): undefined
+ privileged reg853 (spr753): undefined
+ privileged reg854 (spr754): undefined
+ privileged reg855 (spr755): undefined
+ privileged reg856 (spr756): undefined
+ privileged reg857 (spr757): undefined
+ privileged reg858 (spr758): undefined
+ privileged reg859 (spr759): undefined
+ privileged reg860 (spr760): undefined
+ privileged reg861 (spr761): undefined
+ privileged reg862 (spr762): undefined
+ privileged reg863 (spr763): undefined
+ privileged reg864 (spr764): undefined
+ privileged reg865 (spr765): undefined
+ privileged reg866 (spr766): undefined
+ privileged reg867 (spr767): undefined
+ privileged reg868 (spr768): undefined
+ privileged reg869 (spr769): undefined
+ privileged reg870 (spr770): undefined
+ privileged reg871 (spr771): undefined
+ privileged reg872 (spr772): undefined
+ privileged reg873 (spr773): undefined
+ privileged reg874 (spr774): undefined
+ privileged reg875 (spr775): undefined
+ privileged reg876 (spr776): undefined
+ privileged reg877 (spr777): undefined
+ privileged reg878 (spr778): undefined
+ privileged reg879 (spr779): undefined
+ privileged reg880 (spr780): undefined
+ privileged reg881 (spr781): undefined
+ privileged reg882 (spr782): undefined
+ privileged reg883 (spr783): undefined
+ privileged reg884 (spr784): undefined
+ privileged reg885 (spr785): undefined
+ privileged reg886 (spr786): undefined
+ privileged reg887 (spr787): undefined
+ privileged reg888 (spr788): undefined
+ privileged reg889 (spr789): undefined
+ privileged reg890 (spr790): undefined
+ privileged reg891 (spr791): undefined
+ privileged reg892 (spr792): undefined
+ privileged reg893 (spr793): undefined
+ privileged reg894 (spr794): undefined
+ privileged reg895 (spr795): undefined
+ privileged reg896 (spr796): undefined
+ privileged reg897 (spr797): undefined
+ privileged reg898 (spr798): undefined
+ privileged reg899 (spr799): undefined
+ privileged reg900 (spr800): undefined
+ privileged reg901 (spr801): undefined
+ privileged reg902 (spr802): undefined
+ privileged reg903 (spr803): undefined
+ privileged reg904 (spr804): undefined
+ privileged reg905 (spr805): undefined
+ privileged reg906 (spr806): undefined
+ privileged reg907 (spr807): undefined
+ privileged reg908 (spr808): undefined
+ privileged reg909 (spr809): undefined
+ privileged reg910 (spr810): undefined
+ privileged reg911 (spr811): undefined
+ privileged reg912 (spr812): undefined
+ privileged reg913 (spr813): undefined
+ privileged reg914 (spr814): undefined
+ privileged reg915 (spr815): undefined
+ privileged reg916 (spr816): undefined
+ privileged reg917 (spr817): undefined
+ privileged reg918 (spr818): undefined
+ privileged reg919 (spr819): undefined
+ privileged reg920 (spr820): undefined
+ privileged reg921 (spr821): undefined
+ privileged reg922 (spr822): undefined
+ privileged reg923 (spr823): undefined
+ privileged reg924 (spr824): undefined
+ privileged reg925 (spr825): undefined
+ privileged reg926 (spr826): undefined
+ privileged reg927 (spr827): undefined
+ privileged reg928 (spr828): undefined
+ privileged reg929 (spr829): undefined
+ privileged reg930 (spr830): undefined
+ privileged reg931 (spr831): undefined
+ privileged reg932 (spr832): undefined
+ privileged reg933 (spr833): undefined
+ privileged reg934 (spr834): undefined
+ privileged reg935 (spr835): undefined
+ privileged reg936 (spr836): undefined
+ privileged reg937 (spr837): undefined
+ privileged reg938 (spr838): undefined
+ privileged reg939 (spr839): undefined
+ privileged reg940 (spr840): undefined
+ privileged reg941 (spr841): undefined
+ privileged reg942 (spr842): undefined
+ privileged reg943 (spr843): undefined
+ privileged reg944 (spr844): undefined
+ privileged reg945 (spr845): undefined
+ privileged reg946 (spr846): undefined
+ privileged reg947 (spr847): undefined
+ privileged reg948 (spr848): undefined
+ privileged reg949 (spr849): undefined
+ privileged reg950 (spr850): undefined
+ privileged reg951 (spr851): undefined
+ privileged reg952 (spr852): undefined
+ privileged reg953 (spr853): undefined
+ privileged reg954 (spr854): undefined
+ privileged reg955 (spr855): undefined
+ privileged reg956 (spr856): undefined
+ privileged reg957 (spr857): undefined
+ privileged reg958 (spr858): undefined
+ privileged reg959 (spr859): undefined
+ privileged reg960 (spr860): undefined
+ privileged reg961 (spr861): undefined
+ privileged reg962 (spr862): undefined
+ privileged reg963 (spr863): undefined
+ privileged reg964 (spr864): undefined
+ privileged reg965 (spr865): undefined
+ privileged reg966 (spr866): undefined
+ privileged reg967 (spr867): undefined
+ privileged reg968 (spr868): undefined
+ privileged reg969 (spr869): undefined
+ privileged reg970 (spr870): undefined
+ privileged reg971 (spr871): undefined
+ privileged reg972 (spr872): undefined
+ privileged reg973 (spr873): undefined
+ privileged reg974 (spr874): undefined
+ privileged reg975 (spr875): undefined
+ privileged reg976 (spr876): undefined
+ privileged reg977 (spr877): undefined
+ privileged reg978 (spr878): undefined
+ privileged reg979 (spr879): undefined
+ privileged reg980 (spr880): undefined
+ privileged reg981 (spr881): undefined
+ privileged reg982 (spr882): undefined
+ privileged reg983 (spr883): undefined
+ privileged reg984 (spr884): undefined
+ privileged reg985 (spr885): undefined
+ privileged reg986 (spr886): undefined
+ privileged reg987 (spr887): undefined
+ privileged reg988 (spr888): undefined
+ privileged reg989 (spr889): undefined
+ privileged reg990 (spr890): undefined
+ privileged reg991 (spr891): undefined
+ privileged reg992 (spr892): undefined
+ privileged reg993 (spr893): undefined
+ privileged reg994 (spr894): undefined
+ privileged reg995 (spr895): undefined
+ privileged reg996 (spr896): undefined
+ privileged reg997 (spr897): undefined
+ privileged reg998 (spr898): undefined
+ privileged reg999 (spr899): undefined
+ vector reg1124 (vr0): undefined
+ vector reg1125 (vr1): undefined
+ vector reg1126 (vr2): undefined
+ vector reg1127 (vr3): undefined
+ vector reg1128 (vr4): undefined
+ vector reg1129 (vr5): undefined
+ vector reg1130 (vr6): undefined
+ vector reg1131 (vr7): undefined
+ vector reg1132 (vr8): undefined
+ vector reg1133 (vr9): undefined
+ vector reg1134 (vr10): undefined
+ vector reg1135 (vr11): undefined
+ vector reg1136 (vr12): undefined
+ vector reg1137 (vr13): undefined
+ vector reg1138 (vr14): undefined
+ vector reg1139 (vr15): undefined
+ vector reg1140 (vr16): undefined
+ vector reg1141 (vr17): undefined
+ vector reg1142 (vr18): undefined
+ vector reg1143 (vr19): undefined
+ vector reg1144 (vr20): undefined
+ vector reg1145 (vr21): undefined
+ vector reg1146 (vr22): undefined
+ vector reg1147 (vr23): undefined
+ vector reg1148 (vr24): undefined
+ vector reg1149 (vr25): undefined
+ vector reg1150 (vr26): undefined
+ vector reg1151 (vr27): undefined
+ vector reg1152 (vr28): undefined
+ vector reg1153 (vr29): undefined
+ vector reg1154 (vr30): undefined
+ vector reg1155 (vr31): undefined
+EOF
+
+# EM_PPC64 (function bar 0x00000000100005b0)
+# Note. Only in .debug_frame, not in .eh_frame.
+# Same as testfileppc32 but without -m32.
+testfiles testfileppc64
+testrun_compare ${abs_builddir}/addrcfi -e testfileppc64 0x00000000100005b0 <<\EOF
+dwarf_cfi_addrframe (.eh_frame): no matching address range
+.debug_frame has 0x100005b0 => [0x100005b0, 0x100005d0):
+ return address in reg65
+ CFA location expression: bregx(1)
+ integer reg0 (r0): undefined
+ integer reg1 (r1): location expression: call_frame_cfa stack_value
+ integer reg2 (r2): same_value
+ integer reg3 (r3): undefined
+ integer reg4 (r4): undefined
+ integer reg5 (r5): undefined
+ integer reg6 (r6): undefined
+ integer reg7 (r7): undefined
+ integer reg8 (r8): undefined
+ integer reg9 (r9): undefined
+ integer reg10 (r10): undefined
+ integer reg11 (r11): undefined
+ integer reg12 (r12): undefined
+ integer reg13 (r13): same_value
+ integer reg14 (r14): same_value
+ integer reg15 (r15): same_value
+ integer reg16 (r16): same_value
+ integer reg17 (r17): same_value
+ integer reg18 (r18): same_value
+ integer reg19 (r19): same_value
+ integer reg20 (r20): same_value
+ integer reg21 (r21): same_value
+ integer reg22 (r22): same_value
+ integer reg23 (r23): same_value
+ integer reg24 (r24): same_value
+ integer reg25 (r25): same_value
+ integer reg26 (r26): same_value
+ integer reg27 (r27): same_value
+ integer reg28 (r28): same_value
+ integer reg29 (r29): same_value
+ integer reg30 (r30): same_value
+ integer reg31 (r31): same_value
+ FPU reg32 (f0): undefined
+ FPU reg33 (f1): undefined
+ FPU reg34 (f2): undefined
+ FPU reg35 (f3): undefined
+ FPU reg36 (f4): undefined
+ FPU reg37 (f5): undefined
+ FPU reg38 (f6): undefined
+ FPU reg39 (f7): undefined
+ FPU reg40 (f8): undefined
+ FPU reg41 (f9): undefined
+ FPU reg42 (f10): undefined
+ FPU reg43 (f11): undefined
+ FPU reg44 (f12): undefined
+ FPU reg45 (f13): undefined
+ FPU reg46 (f14): undefined
+ FPU reg47 (f15): undefined
+ FPU reg48 (f16): undefined
+ FPU reg49 (f17): undefined
+ FPU reg50 (f18): undefined
+ FPU reg51 (f19): undefined
+ FPU reg52 (f20): undefined
+ FPU reg53 (f21): undefined
+ FPU reg54 (f22): undefined
+ FPU reg55 (f23): undefined
+ FPU reg56 (f24): undefined
+ FPU reg57 (f25): undefined
+ FPU reg58 (f26): undefined
+ FPU reg59 (f27): undefined
+ FPU reg60 (f28): undefined
+ FPU reg61 (f29): undefined
+ FPU reg62 (f30): undefined
+ FPU reg63 (f31): undefined
+ integer reg64 (cr): undefined
+ FPU reg65 (fpscr): same_value
+ integer reg66 (msr): undefined
+ vector reg67 (vscr): undefined
+ privileged reg70 (sr0): undefined
+ privileged reg71 (sr1): undefined
+ privileged reg72 (sr2): undefined
+ privileged reg73 (sr3): undefined
+ privileged reg74 (sr4): undefined
+ privileged reg75 (sr5): undefined
+ privileged reg76 (sr6): undefined
+ privileged reg77 (sr7): undefined
+ privileged reg78 (sr8): undefined
+ privileged reg79 (sr9): undefined
+ privileged reg80 (sr10): undefined
+ privileged reg81 (sr11): undefined
+ privileged reg82 (sr12): undefined
+ privileged reg83 (sr13): undefined
+ privileged reg84 (sr14): undefined
+ privileged reg85 (sr15): undefined
+ privileged reg100 (spr0): undefined
+ privileged reg101 (xer): undefined
+ privileged reg102 (spr2): undefined
+ privileged reg103 (spr3): undefined
+ privileged reg104 (spr4): undefined
+ privileged reg105 (spr5): undefined
+ privileged reg106 (spr6): undefined
+ privileged reg107 (spr7): undefined
+ privileged reg108 (lr): undefined
+ privileged reg109 (ctr): undefined
+ privileged reg110 (spr10): undefined
+ privileged reg111 (spr11): undefined
+ privileged reg112 (spr12): undefined
+ privileged reg113 (spr13): undefined
+ privileged reg114 (spr14): undefined
+ privileged reg115 (spr15): undefined
+ privileged reg116 (spr16): undefined
+ privileged reg117 (spr17): undefined
+ privileged reg118 (dsisr): undefined
+ privileged reg119 (dar): undefined
+ privileged reg120 (spr20): undefined
+ privileged reg121 (spr21): undefined
+ privileged reg122 (dec): undefined
+ privileged reg123 (spr23): undefined
+ privileged reg124 (spr24): undefined
+ privileged reg125 (spr25): undefined
+ privileged reg126 (spr26): undefined
+ privileged reg127 (spr27): undefined
+ privileged reg128 (spr28): undefined
+ privileged reg129 (spr29): undefined
+ privileged reg130 (spr30): undefined
+ privileged reg131 (spr31): undefined
+ privileged reg132 (spr32): undefined
+ privileged reg133 (spr33): undefined
+ privileged reg134 (spr34): undefined
+ privileged reg135 (spr35): undefined
+ privileged reg136 (spr36): undefined
+ privileged reg137 (spr37): undefined
+ privileged reg138 (spr38): undefined
+ privileged reg139 (spr39): undefined
+ privileged reg140 (spr40): undefined
+ privileged reg141 (spr41): undefined
+ privileged reg142 (spr42): undefined
+ privileged reg143 (spr43): undefined
+ privileged reg144 (spr44): undefined
+ privileged reg145 (spr45): undefined
+ privileged reg146 (spr46): undefined
+ privileged reg147 (spr47): undefined
+ privileged reg148 (spr48): undefined
+ privileged reg149 (spr49): undefined
+ privileged reg150 (spr50): undefined
+ privileged reg151 (spr51): undefined
+ privileged reg152 (spr52): undefined
+ privileged reg153 (spr53): undefined
+ privileged reg154 (spr54): undefined
+ privileged reg155 (spr55): undefined
+ privileged reg156 (spr56): undefined
+ privileged reg157 (spr57): undefined
+ privileged reg158 (spr58): undefined
+ privileged reg159 (spr59): undefined
+ privileged reg160 (spr60): undefined
+ privileged reg161 (spr61): undefined
+ privileged reg162 (spr62): undefined
+ privileged reg163 (spr63): undefined
+ privileged reg164 (spr64): undefined
+ privileged reg165 (spr65): undefined
+ privileged reg166 (spr66): undefined
+ privileged reg167 (spr67): undefined
+ privileged reg168 (spr68): undefined
+ privileged reg169 (spr69): undefined
+ privileged reg170 (spr70): undefined
+ privileged reg171 (spr71): undefined
+ privileged reg172 (spr72): undefined
+ privileged reg173 (spr73): undefined
+ privileged reg174 (spr74): undefined
+ privileged reg175 (spr75): undefined
+ privileged reg176 (spr76): undefined
+ privileged reg177 (spr77): undefined
+ privileged reg178 (spr78): undefined
+ privileged reg179 (spr79): undefined
+ privileged reg180 (spr80): undefined
+ privileged reg181 (spr81): undefined
+ privileged reg182 (spr82): undefined
+ privileged reg183 (spr83): undefined
+ privileged reg184 (spr84): undefined
+ privileged reg185 (spr85): undefined
+ privileged reg186 (spr86): undefined
+ privileged reg187 (spr87): undefined
+ privileged reg188 (spr88): undefined
+ privileged reg189 (spr89): undefined
+ privileged reg190 (spr90): undefined
+ privileged reg191 (spr91): undefined
+ privileged reg192 (spr92): undefined
+ privileged reg193 (spr93): undefined
+ privileged reg194 (spr94): undefined
+ privileged reg195 (spr95): undefined
+ privileged reg196 (spr96): undefined
+ privileged reg197 (spr97): undefined
+ privileged reg198 (spr98): undefined
+ privileged reg199 (spr99): undefined
+ privileged reg200 (spr100): undefined
+ privileged reg201 (spr101): undefined
+ privileged reg202 (spr102): undefined
+ privileged reg203 (spr103): undefined
+ privileged reg204 (spr104): undefined
+ privileged reg205 (spr105): undefined
+ privileged reg206 (spr106): undefined
+ privileged reg207 (spr107): undefined
+ privileged reg208 (spr108): undefined
+ privileged reg209 (spr109): undefined
+ privileged reg210 (spr110): undefined
+ privileged reg211 (spr111): undefined
+ privileged reg212 (spr112): undefined
+ privileged reg213 (spr113): undefined
+ privileged reg214 (spr114): undefined
+ privileged reg215 (spr115): undefined
+ privileged reg216 (spr116): undefined
+ privileged reg217 (spr117): undefined
+ privileged reg218 (spr118): undefined
+ privileged reg219 (spr119): undefined
+ privileged reg220 (spr120): undefined
+ privileged reg221 (spr121): undefined
+ privileged reg222 (spr122): undefined
+ privileged reg223 (spr123): undefined
+ privileged reg224 (spr124): undefined
+ privileged reg225 (spr125): undefined
+ privileged reg226 (spr126): undefined
+ privileged reg227 (spr127): undefined
+ privileged reg228 (spr128): undefined
+ privileged reg229 (spr129): undefined
+ privileged reg230 (spr130): undefined
+ privileged reg231 (spr131): undefined
+ privileged reg232 (spr132): undefined
+ privileged reg233 (spr133): undefined
+ privileged reg234 (spr134): undefined
+ privileged reg235 (spr135): undefined
+ privileged reg236 (spr136): undefined
+ privileged reg237 (spr137): undefined
+ privileged reg238 (spr138): undefined
+ privileged reg239 (spr139): undefined
+ privileged reg240 (spr140): undefined
+ privileged reg241 (spr141): undefined
+ privileged reg242 (spr142): undefined
+ privileged reg243 (spr143): undefined
+ privileged reg244 (spr144): undefined
+ privileged reg245 (spr145): undefined
+ privileged reg246 (spr146): undefined
+ privileged reg247 (spr147): undefined
+ privileged reg248 (spr148): undefined
+ privileged reg249 (spr149): undefined
+ privileged reg250 (spr150): undefined
+ privileged reg251 (spr151): undefined
+ privileged reg252 (spr152): undefined
+ privileged reg253 (spr153): undefined
+ privileged reg254 (spr154): undefined
+ privileged reg255 (spr155): undefined
+ privileged reg256 (spr156): undefined
+ privileged reg257 (spr157): undefined
+ privileged reg258 (spr158): undefined
+ privileged reg259 (spr159): undefined
+ privileged reg260 (spr160): undefined
+ privileged reg261 (spr161): undefined
+ privileged reg262 (spr162): undefined
+ privileged reg263 (spr163): undefined
+ privileged reg264 (spr164): undefined
+ privileged reg265 (spr165): undefined
+ privileged reg266 (spr166): undefined
+ privileged reg267 (spr167): undefined
+ privileged reg268 (spr168): undefined
+ privileged reg269 (spr169): undefined
+ privileged reg270 (spr170): undefined
+ privileged reg271 (spr171): undefined
+ privileged reg272 (spr172): undefined
+ privileged reg273 (spr173): undefined
+ privileged reg274 (spr174): undefined
+ privileged reg275 (spr175): undefined
+ privileged reg276 (spr176): undefined
+ privileged reg277 (spr177): undefined
+ privileged reg278 (spr178): undefined
+ privileged reg279 (spr179): undefined
+ privileged reg280 (spr180): undefined
+ privileged reg281 (spr181): undefined
+ privileged reg282 (spr182): undefined
+ privileged reg283 (spr183): undefined
+ privileged reg284 (spr184): undefined
+ privileged reg285 (spr185): undefined
+ privileged reg286 (spr186): undefined
+ privileged reg287 (spr187): undefined
+ privileged reg288 (spr188): undefined
+ privileged reg289 (spr189): undefined
+ privileged reg290 (spr190): undefined
+ privileged reg291 (spr191): undefined
+ privileged reg292 (spr192): undefined
+ privileged reg293 (spr193): undefined
+ privileged reg294 (spr194): undefined
+ privileged reg295 (spr195): undefined
+ privileged reg296 (spr196): undefined
+ privileged reg297 (spr197): undefined
+ privileged reg298 (spr198): undefined
+ privileged reg299 (spr199): undefined
+ privileged reg300 (spr200): undefined
+ privileged reg301 (spr201): undefined
+ privileged reg302 (spr202): undefined
+ privileged reg303 (spr203): undefined
+ privileged reg304 (spr204): undefined
+ privileged reg305 (spr205): undefined
+ privileged reg306 (spr206): undefined
+ privileged reg307 (spr207): undefined
+ privileged reg308 (spr208): undefined
+ privileged reg309 (spr209): undefined
+ privileged reg310 (spr210): undefined
+ privileged reg311 (spr211): undefined
+ privileged reg312 (spr212): undefined
+ privileged reg313 (spr213): undefined
+ privileged reg314 (spr214): undefined
+ privileged reg315 (spr215): undefined
+ privileged reg316 (spr216): undefined
+ privileged reg317 (spr217): undefined
+ privileged reg318 (spr218): undefined
+ privileged reg319 (spr219): undefined
+ privileged reg320 (spr220): undefined
+ privileged reg321 (spr221): undefined
+ privileged reg322 (spr222): undefined
+ privileged reg323 (spr223): undefined
+ privileged reg324 (spr224): undefined
+ privileged reg325 (spr225): undefined
+ privileged reg326 (spr226): undefined
+ privileged reg327 (spr227): undefined
+ privileged reg328 (spr228): undefined
+ privileged reg329 (spr229): undefined
+ privileged reg330 (spr230): undefined
+ privileged reg331 (spr231): undefined
+ privileged reg332 (spr232): undefined
+ privileged reg333 (spr233): undefined
+ privileged reg334 (spr234): undefined
+ privileged reg335 (spr235): undefined
+ privileged reg336 (spr236): undefined
+ privileged reg337 (spr237): undefined
+ privileged reg338 (spr238): undefined
+ privileged reg339 (spr239): undefined
+ privileged reg340 (spr240): undefined
+ privileged reg341 (spr241): undefined
+ privileged reg342 (spr242): undefined
+ privileged reg343 (spr243): undefined
+ privileged reg344 (spr244): undefined
+ privileged reg345 (spr245): undefined
+ privileged reg346 (spr246): undefined
+ privileged reg347 (spr247): undefined
+ privileged reg348 (spr248): undefined
+ privileged reg349 (spr249): undefined
+ privileged reg350 (spr250): undefined
+ privileged reg351 (spr251): undefined
+ privileged reg352 (spr252): undefined
+ privileged reg353 (spr253): undefined
+ privileged reg354 (spr254): undefined
+ privileged reg355 (spr255): undefined
+ vector reg356 (vrsave): undefined
+ privileged reg357 (spr257): undefined
+ privileged reg358 (spr258): undefined
+ privileged reg359 (spr259): undefined
+ privileged reg360 (spr260): undefined
+ privileged reg361 (spr261): undefined
+ privileged reg362 (spr262): undefined
+ privileged reg363 (spr263): undefined
+ privileged reg364 (spr264): undefined
+ privileged reg365 (spr265): undefined
+ privileged reg366 (spr266): undefined
+ privileged reg367 (spr267): undefined
+ privileged reg368 (spr268): undefined
+ privileged reg369 (spr269): undefined
+ privileged reg370 (spr270): undefined
+ privileged reg371 (spr271): undefined
+ privileged reg372 (spr272): undefined
+ privileged reg373 (spr273): undefined
+ privileged reg374 (spr274): undefined
+ privileged reg375 (spr275): undefined
+ privileged reg376 (spr276): undefined
+ privileged reg377 (spr277): undefined
+ privileged reg378 (spr278): undefined
+ privileged reg379 (spr279): undefined
+ privileged reg380 (spr280): undefined
+ privileged reg381 (spr281): undefined
+ privileged reg382 (spr282): undefined
+ privileged reg383 (spr283): undefined
+ privileged reg384 (spr284): undefined
+ privileged reg385 (spr285): undefined
+ privileged reg386 (spr286): undefined
+ privileged reg387 (spr287): undefined
+ privileged reg388 (spr288): undefined
+ privileged reg389 (spr289): undefined
+ privileged reg390 (spr290): undefined
+ privileged reg391 (spr291): undefined
+ privileged reg392 (spr292): undefined
+ privileged reg393 (spr293): undefined
+ privileged reg394 (spr294): undefined
+ privileged reg395 (spr295): undefined
+ privileged reg396 (spr296): undefined
+ privileged reg397 (spr297): undefined
+ privileged reg398 (spr298): undefined
+ privileged reg399 (spr299): undefined
+ privileged reg400 (spr300): undefined
+ privileged reg401 (spr301): undefined
+ privileged reg402 (spr302): undefined
+ privileged reg403 (spr303): undefined
+ privileged reg404 (spr304): undefined
+ privileged reg405 (spr305): undefined
+ privileged reg406 (spr306): undefined
+ privileged reg407 (spr307): undefined
+ privileged reg408 (spr308): undefined
+ privileged reg409 (spr309): undefined
+ privileged reg410 (spr310): undefined
+ privileged reg411 (spr311): undefined
+ privileged reg412 (spr312): undefined
+ privileged reg413 (spr313): undefined
+ privileged reg414 (spr314): undefined
+ privileged reg415 (spr315): undefined
+ privileged reg416 (spr316): undefined
+ privileged reg417 (spr317): undefined
+ privileged reg418 (spr318): undefined
+ privileged reg419 (spr319): undefined
+ privileged reg420 (spr320): undefined
+ privileged reg421 (spr321): undefined
+ privileged reg422 (spr322): undefined
+ privileged reg423 (spr323): undefined
+ privileged reg424 (spr324): undefined
+ privileged reg425 (spr325): undefined
+ privileged reg426 (spr326): undefined
+ privileged reg427 (spr327): undefined
+ privileged reg428 (spr328): undefined
+ privileged reg429 (spr329): undefined
+ privileged reg430 (spr330): undefined
+ privileged reg431 (spr331): undefined
+ privileged reg432 (spr332): undefined
+ privileged reg433 (spr333): undefined
+ privileged reg434 (spr334): undefined
+ privileged reg435 (spr335): undefined
+ privileged reg436 (spr336): undefined
+ privileged reg437 (spr337): undefined
+ privileged reg438 (spr338): undefined
+ privileged reg439 (spr339): undefined
+ privileged reg440 (spr340): undefined
+ privileged reg441 (spr341): undefined
+ privileged reg442 (spr342): undefined
+ privileged reg443 (spr343): undefined
+ privileged reg444 (spr344): undefined
+ privileged reg445 (spr345): undefined
+ privileged reg446 (spr346): undefined
+ privileged reg447 (spr347): undefined
+ privileged reg448 (spr348): undefined
+ privileged reg449 (spr349): undefined
+ privileged reg450 (spr350): undefined
+ privileged reg451 (spr351): undefined
+ privileged reg452 (spr352): undefined
+ privileged reg453 (spr353): undefined
+ privileged reg454 (spr354): undefined
+ privileged reg455 (spr355): undefined
+ privileged reg456 (spr356): undefined
+ privileged reg457 (spr357): undefined
+ privileged reg458 (spr358): undefined
+ privileged reg459 (spr359): undefined
+ privileged reg460 (spr360): undefined
+ privileged reg461 (spr361): undefined
+ privileged reg462 (spr362): undefined
+ privileged reg463 (spr363): undefined
+ privileged reg464 (spr364): undefined
+ privileged reg465 (spr365): undefined
+ privileged reg466 (spr366): undefined
+ privileged reg467 (spr367): undefined
+ privileged reg468 (spr368): undefined
+ privileged reg469 (spr369): undefined
+ privileged reg470 (spr370): undefined
+ privileged reg471 (spr371): undefined
+ privileged reg472 (spr372): undefined
+ privileged reg473 (spr373): undefined
+ privileged reg474 (spr374): undefined
+ privileged reg475 (spr375): undefined
+ privileged reg476 (spr376): undefined
+ privileged reg477 (spr377): undefined
+ privileged reg478 (spr378): undefined
+ privileged reg479 (spr379): undefined
+ privileged reg480 (spr380): undefined
+ privileged reg481 (spr381): undefined
+ privileged reg482 (spr382): undefined
+ privileged reg483 (spr383): undefined
+ privileged reg484 (spr384): undefined
+ privileged reg485 (spr385): undefined
+ privileged reg486 (spr386): undefined
+ privileged reg487 (spr387): undefined
+ privileged reg488 (spr388): undefined
+ privileged reg489 (spr389): undefined
+ privileged reg490 (spr390): undefined
+ privileged reg491 (spr391): undefined
+ privileged reg492 (spr392): undefined
+ privileged reg493 (spr393): undefined
+ privileged reg494 (spr394): undefined
+ privileged reg495 (spr395): undefined
+ privileged reg496 (spr396): undefined
+ privileged reg497 (spr397): undefined
+ privileged reg498 (spr398): undefined
+ privileged reg499 (spr399): undefined
+ privileged reg500 (spr400): undefined
+ privileged reg501 (spr401): undefined
+ privileged reg502 (spr402): undefined
+ privileged reg503 (spr403): undefined
+ privileged reg504 (spr404): undefined
+ privileged reg505 (spr405): undefined
+ privileged reg506 (spr406): undefined
+ privileged reg507 (spr407): undefined
+ privileged reg508 (spr408): undefined
+ privileged reg509 (spr409): undefined
+ privileged reg510 (spr410): undefined
+ privileged reg511 (spr411): undefined
+ privileged reg512 (spr412): undefined
+ privileged reg513 (spr413): undefined
+ privileged reg514 (spr414): undefined
+ privileged reg515 (spr415): undefined
+ privileged reg516 (spr416): undefined
+ privileged reg517 (spr417): undefined
+ privileged reg518 (spr418): undefined
+ privileged reg519 (spr419): undefined
+ privileged reg520 (spr420): undefined
+ privileged reg521 (spr421): undefined
+ privileged reg522 (spr422): undefined
+ privileged reg523 (spr423): undefined
+ privileged reg524 (spr424): undefined
+ privileged reg525 (spr425): undefined
+ privileged reg526 (spr426): undefined
+ privileged reg527 (spr427): undefined
+ privileged reg528 (spr428): undefined
+ privileged reg529 (spr429): undefined
+ privileged reg530 (spr430): undefined
+ privileged reg531 (spr431): undefined
+ privileged reg532 (spr432): undefined
+ privileged reg533 (spr433): undefined
+ privileged reg534 (spr434): undefined
+ privileged reg535 (spr435): undefined
+ privileged reg536 (spr436): undefined
+ privileged reg537 (spr437): undefined
+ privileged reg538 (spr438): undefined
+ privileged reg539 (spr439): undefined
+ privileged reg540 (spr440): undefined
+ privileged reg541 (spr441): undefined
+ privileged reg542 (spr442): undefined
+ privileged reg543 (spr443): undefined
+ privileged reg544 (spr444): undefined
+ privileged reg545 (spr445): undefined
+ privileged reg546 (spr446): undefined
+ privileged reg547 (spr447): undefined
+ privileged reg548 (spr448): undefined
+ privileged reg549 (spr449): undefined
+ privileged reg550 (spr450): undefined
+ privileged reg551 (spr451): undefined
+ privileged reg552 (spr452): undefined
+ privileged reg553 (spr453): undefined
+ privileged reg554 (spr454): undefined
+ privileged reg555 (spr455): undefined
+ privileged reg556 (spr456): undefined
+ privileged reg557 (spr457): undefined
+ privileged reg558 (spr458): undefined
+ privileged reg559 (spr459): undefined
+ privileged reg560 (spr460): undefined
+ privileged reg561 (spr461): undefined
+ privileged reg562 (spr462): undefined
+ privileged reg563 (spr463): undefined
+ privileged reg564 (spr464): undefined
+ privileged reg565 (spr465): undefined
+ privileged reg566 (spr466): undefined
+ privileged reg567 (spr467): undefined
+ privileged reg568 (spr468): undefined
+ privileged reg569 (spr469): undefined
+ privileged reg570 (spr470): undefined
+ privileged reg571 (spr471): undefined
+ privileged reg572 (spr472): undefined
+ privileged reg573 (spr473): undefined
+ privileged reg574 (spr474): undefined
+ privileged reg575 (spr475): undefined
+ privileged reg576 (spr476): undefined
+ privileged reg577 (spr477): undefined
+ privileged reg578 (spr478): undefined
+ privileged reg579 (spr479): undefined
+ privileged reg580 (spr480): undefined
+ privileged reg581 (spr481): undefined
+ privileged reg582 (spr482): undefined
+ privileged reg583 (spr483): undefined
+ privileged reg584 (spr484): undefined
+ privileged reg585 (spr485): undefined
+ privileged reg586 (spr486): undefined
+ privileged reg587 (spr487): undefined
+ privileged reg588 (spr488): undefined
+ privileged reg589 (spr489): undefined
+ privileged reg590 (spr490): undefined
+ privileged reg591 (spr491): undefined
+ privileged reg592 (spr492): undefined
+ privileged reg593 (spr493): undefined
+ privileged reg594 (spr494): undefined
+ privileged reg595 (spr495): undefined
+ privileged reg596 (spr496): undefined
+ privileged reg597 (spr497): undefined
+ privileged reg598 (spr498): undefined
+ privileged reg599 (spr499): undefined
+ privileged reg600 (spr500): undefined
+ privileged reg601 (spr501): undefined
+ privileged reg602 (spr502): undefined
+ privileged reg603 (spr503): undefined
+ privileged reg604 (spr504): undefined
+ privileged reg605 (spr505): undefined
+ privileged reg606 (spr506): undefined
+ privileged reg607 (spr507): undefined
+ privileged reg608 (spr508): undefined
+ privileged reg609 (spr509): undefined
+ privileged reg610 (spr510): undefined
+ privileged reg611 (spr511): undefined
+ vector reg612 (spefscr): undefined
+ privileged reg613 (spr513): undefined
+ privileged reg614 (spr514): undefined
+ privileged reg615 (spr515): undefined
+ privileged reg616 (spr516): undefined
+ privileged reg617 (spr517): undefined
+ privileged reg618 (spr518): undefined
+ privileged reg619 (spr519): undefined
+ privileged reg620 (spr520): undefined
+ privileged reg621 (spr521): undefined
+ privileged reg622 (spr522): undefined
+ privileged reg623 (spr523): undefined
+ privileged reg624 (spr524): undefined
+ privileged reg625 (spr525): undefined
+ privileged reg626 (spr526): undefined
+ privileged reg627 (spr527): undefined
+ privileged reg628 (spr528): undefined
+ privileged reg629 (spr529): undefined
+ privileged reg630 (spr530): undefined
+ privileged reg631 (spr531): undefined
+ privileged reg632 (spr532): undefined
+ privileged reg633 (spr533): undefined
+ privileged reg634 (spr534): undefined
+ privileged reg635 (spr535): undefined
+ privileged reg636 (spr536): undefined
+ privileged reg637 (spr537): undefined
+ privileged reg638 (spr538): undefined
+ privileged reg639 (spr539): undefined
+ privileged reg640 (spr540): undefined
+ privileged reg641 (spr541): undefined
+ privileged reg642 (spr542): undefined
+ privileged reg643 (spr543): undefined
+ privileged reg644 (spr544): undefined
+ privileged reg645 (spr545): undefined
+ privileged reg646 (spr546): undefined
+ privileged reg647 (spr547): undefined
+ privileged reg648 (spr548): undefined
+ privileged reg649 (spr549): undefined
+ privileged reg650 (spr550): undefined
+ privileged reg651 (spr551): undefined
+ privileged reg652 (spr552): undefined
+ privileged reg653 (spr553): undefined
+ privileged reg654 (spr554): undefined
+ privileged reg655 (spr555): undefined
+ privileged reg656 (spr556): undefined
+ privileged reg657 (spr557): undefined
+ privileged reg658 (spr558): undefined
+ privileged reg659 (spr559): undefined
+ privileged reg660 (spr560): undefined
+ privileged reg661 (spr561): undefined
+ privileged reg662 (spr562): undefined
+ privileged reg663 (spr563): undefined
+ privileged reg664 (spr564): undefined
+ privileged reg665 (spr565): undefined
+ privileged reg666 (spr566): undefined
+ privileged reg667 (spr567): undefined
+ privileged reg668 (spr568): undefined
+ privileged reg669 (spr569): undefined
+ privileged reg670 (spr570): undefined
+ privileged reg671 (spr571): undefined
+ privileged reg672 (spr572): undefined
+ privileged reg673 (spr573): undefined
+ privileged reg674 (spr574): undefined
+ privileged reg675 (spr575): undefined
+ privileged reg676 (spr576): undefined
+ privileged reg677 (spr577): undefined
+ privileged reg678 (spr578): undefined
+ privileged reg679 (spr579): undefined
+ privileged reg680 (spr580): undefined
+ privileged reg681 (spr581): undefined
+ privileged reg682 (spr582): undefined
+ privileged reg683 (spr583): undefined
+ privileged reg684 (spr584): undefined
+ privileged reg685 (spr585): undefined
+ privileged reg686 (spr586): undefined
+ privileged reg687 (spr587): undefined
+ privileged reg688 (spr588): undefined
+ privileged reg689 (spr589): undefined
+ privileged reg690 (spr590): undefined
+ privileged reg691 (spr591): undefined
+ privileged reg692 (spr592): undefined
+ privileged reg693 (spr593): undefined
+ privileged reg694 (spr594): undefined
+ privileged reg695 (spr595): undefined
+ privileged reg696 (spr596): undefined
+ privileged reg697 (spr597): undefined
+ privileged reg698 (spr598): undefined
+ privileged reg699 (spr599): undefined
+ privileged reg700 (spr600): undefined
+ privileged reg701 (spr601): undefined
+ privileged reg702 (spr602): undefined
+ privileged reg703 (spr603): undefined
+ privileged reg704 (spr604): undefined
+ privileged reg705 (spr605): undefined
+ privileged reg706 (spr606): undefined
+ privileged reg707 (spr607): undefined
+ privileged reg708 (spr608): undefined
+ privileged reg709 (spr609): undefined
+ privileged reg710 (spr610): undefined
+ privileged reg711 (spr611): undefined
+ privileged reg712 (spr612): undefined
+ privileged reg713 (spr613): undefined
+ privileged reg714 (spr614): undefined
+ privileged reg715 (spr615): undefined
+ privileged reg716 (spr616): undefined
+ privileged reg717 (spr617): undefined
+ privileged reg718 (spr618): undefined
+ privileged reg719 (spr619): undefined
+ privileged reg720 (spr620): undefined
+ privileged reg721 (spr621): undefined
+ privileged reg722 (spr622): undefined
+ privileged reg723 (spr623): undefined
+ privileged reg724 (spr624): undefined
+ privileged reg725 (spr625): undefined
+ privileged reg726 (spr626): undefined
+ privileged reg727 (spr627): undefined
+ privileged reg728 (spr628): undefined
+ privileged reg729 (spr629): undefined
+ privileged reg730 (spr630): undefined
+ privileged reg731 (spr631): undefined
+ privileged reg732 (spr632): undefined
+ privileged reg733 (spr633): undefined
+ privileged reg734 (spr634): undefined
+ privileged reg735 (spr635): undefined
+ privileged reg736 (spr636): undefined
+ privileged reg737 (spr637): undefined
+ privileged reg738 (spr638): undefined
+ privileged reg739 (spr639): undefined
+ privileged reg740 (spr640): undefined
+ privileged reg741 (spr641): undefined
+ privileged reg742 (spr642): undefined
+ privileged reg743 (spr643): undefined
+ privileged reg744 (spr644): undefined
+ privileged reg745 (spr645): undefined
+ privileged reg746 (spr646): undefined
+ privileged reg747 (spr647): undefined
+ privileged reg748 (spr648): undefined
+ privileged reg749 (spr649): undefined
+ privileged reg750 (spr650): undefined
+ privileged reg751 (spr651): undefined
+ privileged reg752 (spr652): undefined
+ privileged reg753 (spr653): undefined
+ privileged reg754 (spr654): undefined
+ privileged reg755 (spr655): undefined
+ privileged reg756 (spr656): undefined
+ privileged reg757 (spr657): undefined
+ privileged reg758 (spr658): undefined
+ privileged reg759 (spr659): undefined
+ privileged reg760 (spr660): undefined
+ privileged reg761 (spr661): undefined
+ privileged reg762 (spr662): undefined
+ privileged reg763 (spr663): undefined
+ privileged reg764 (spr664): undefined
+ privileged reg765 (spr665): undefined
+ privileged reg766 (spr666): undefined
+ privileged reg767 (spr667): undefined
+ privileged reg768 (spr668): undefined
+ privileged reg769 (spr669): undefined
+ privileged reg770 (spr670): undefined
+ privileged reg771 (spr671): undefined
+ privileged reg772 (spr672): undefined
+ privileged reg773 (spr673): undefined
+ privileged reg774 (spr674): undefined
+ privileged reg775 (spr675): undefined
+ privileged reg776 (spr676): undefined
+ privileged reg777 (spr677): undefined
+ privileged reg778 (spr678): undefined
+ privileged reg779 (spr679): undefined
+ privileged reg780 (spr680): undefined
+ privileged reg781 (spr681): undefined
+ privileged reg782 (spr682): undefined
+ privileged reg783 (spr683): undefined
+ privileged reg784 (spr684): undefined
+ privileged reg785 (spr685): undefined
+ privileged reg786 (spr686): undefined
+ privileged reg787 (spr687): undefined
+ privileged reg788 (spr688): undefined
+ privileged reg789 (spr689): undefined
+ privileged reg790 (spr690): undefined
+ privileged reg791 (spr691): undefined
+ privileged reg792 (spr692): undefined
+ privileged reg793 (spr693): undefined
+ privileged reg794 (spr694): undefined
+ privileged reg795 (spr695): undefined
+ privileged reg796 (spr696): undefined
+ privileged reg797 (spr697): undefined
+ privileged reg798 (spr698): undefined
+ privileged reg799 (spr699): undefined
+ privileged reg800 (spr700): undefined
+ privileged reg801 (spr701): undefined
+ privileged reg802 (spr702): undefined
+ privileged reg803 (spr703): undefined
+ privileged reg804 (spr704): undefined
+ privileged reg805 (spr705): undefined
+ privileged reg806 (spr706): undefined
+ privileged reg807 (spr707): undefined
+ privileged reg808 (spr708): undefined
+ privileged reg809 (spr709): undefined
+ privileged reg810 (spr710): undefined
+ privileged reg811 (spr711): undefined
+ privileged reg812 (spr712): undefined
+ privileged reg813 (spr713): undefined
+ privileged reg814 (spr714): undefined
+ privileged reg815 (spr715): undefined
+ privileged reg816 (spr716): undefined
+ privileged reg817 (spr717): undefined
+ privileged reg818 (spr718): undefined
+ privileged reg819 (spr719): undefined
+ privileged reg820 (spr720): undefined
+ privileged reg821 (spr721): undefined
+ privileged reg822 (spr722): undefined
+ privileged reg823 (spr723): undefined
+ privileged reg824 (spr724): undefined
+ privileged reg825 (spr725): undefined
+ privileged reg826 (spr726): undefined
+ privileged reg827 (spr727): undefined
+ privileged reg828 (spr728): undefined
+ privileged reg829 (spr729): undefined
+ privileged reg830 (spr730): undefined
+ privileged reg831 (spr731): undefined
+ privileged reg832 (spr732): undefined
+ privileged reg833 (spr733): undefined
+ privileged reg834 (spr734): undefined
+ privileged reg835 (spr735): undefined
+ privileged reg836 (spr736): undefined
+ privileged reg837 (spr737): undefined
+ privileged reg838 (spr738): undefined
+ privileged reg839 (spr739): undefined
+ privileged reg840 (spr740): undefined
+ privileged reg841 (spr741): undefined
+ privileged reg842 (spr742): undefined
+ privileged reg843 (spr743): undefined
+ privileged reg844 (spr744): undefined
+ privileged reg845 (spr745): undefined
+ privileged reg846 (spr746): undefined
+ privileged reg847 (spr747): undefined
+ privileged reg848 (spr748): undefined
+ privileged reg849 (spr749): undefined
+ privileged reg850 (spr750): undefined
+ privileged reg851 (spr751): undefined
+ privileged reg852 (spr752): undefined
+ privileged reg853 (spr753): undefined
+ privileged reg854 (spr754): undefined
+ privileged reg855 (spr755): undefined
+ privileged reg856 (spr756): undefined
+ privileged reg857 (spr757): undefined
+ privileged reg858 (spr758): undefined
+ privileged reg859 (spr759): undefined
+ privileged reg860 (spr760): undefined
+ privileged reg861 (spr761): undefined
+ privileged reg862 (spr762): undefined
+ privileged reg863 (spr763): undefined
+ privileged reg864 (spr764): undefined
+ privileged reg865 (spr765): undefined
+ privileged reg866 (spr766): undefined
+ privileged reg867 (spr767): undefined
+ privileged reg868 (spr768): undefined
+ privileged reg869 (spr769): undefined
+ privileged reg870 (spr770): undefined
+ privileged reg871 (spr771): undefined
+ privileged reg872 (spr772): undefined
+ privileged reg873 (spr773): undefined
+ privileged reg874 (spr774): undefined
+ privileged reg875 (spr775): undefined
+ privileged reg876 (spr776): undefined
+ privileged reg877 (spr777): undefined
+ privileged reg878 (spr778): undefined
+ privileged reg879 (spr779): undefined
+ privileged reg880 (spr780): undefined
+ privileged reg881 (spr781): undefined
+ privileged reg882 (spr782): undefined
+ privileged reg883 (spr783): undefined
+ privileged reg884 (spr784): undefined
+ privileged reg885 (spr785): undefined
+ privileged reg886 (spr786): undefined
+ privileged reg887 (spr787): undefined
+ privileged reg888 (spr788): undefined
+ privileged reg889 (spr789): undefined
+ privileged reg890 (spr790): undefined
+ privileged reg891 (spr791): undefined
+ privileged reg892 (spr792): undefined
+ privileged reg893 (spr793): undefined
+ privileged reg894 (spr794): undefined
+ privileged reg895 (spr795): undefined
+ privileged reg896 (spr796): undefined
+ privileged reg897 (spr797): undefined
+ privileged reg898 (spr798): undefined
+ privileged reg899 (spr799): undefined
+ privileged reg900 (spr800): undefined
+ privileged reg901 (spr801): undefined
+ privileged reg902 (spr802): undefined
+ privileged reg903 (spr803): undefined
+ privileged reg904 (spr804): undefined
+ privileged reg905 (spr805): undefined
+ privileged reg906 (spr806): undefined
+ privileged reg907 (spr807): undefined
+ privileged reg908 (spr808): undefined
+ privileged reg909 (spr809): undefined
+ privileged reg910 (spr810): undefined
+ privileged reg911 (spr811): undefined
+ privileged reg912 (spr812): undefined
+ privileged reg913 (spr813): undefined
+ privileged reg914 (spr814): undefined
+ privileged reg915 (spr815): undefined
+ privileged reg916 (spr816): undefined
+ privileged reg917 (spr817): undefined
+ privileged reg918 (spr818): undefined
+ privileged reg919 (spr819): undefined
+ privileged reg920 (spr820): undefined
+ privileged reg921 (spr821): undefined
+ privileged reg922 (spr822): undefined
+ privileged reg923 (spr823): undefined
+ privileged reg924 (spr824): undefined
+ privileged reg925 (spr825): undefined
+ privileged reg926 (spr826): undefined
+ privileged reg927 (spr827): undefined
+ privileged reg928 (spr828): undefined
+ privileged reg929 (spr829): undefined
+ privileged reg930 (spr830): undefined
+ privileged reg931 (spr831): undefined
+ privileged reg932 (spr832): undefined
+ privileged reg933 (spr833): undefined
+ privileged reg934 (spr834): undefined
+ privileged reg935 (spr835): undefined
+ privileged reg936 (spr836): undefined
+ privileged reg937 (spr837): undefined
+ privileged reg938 (spr838): undefined
+ privileged reg939 (spr839): undefined
+ privileged reg940 (spr840): undefined
+ privileged reg941 (spr841): undefined
+ privileged reg942 (spr842): undefined
+ privileged reg943 (spr843): undefined
+ privileged reg944 (spr844): undefined
+ privileged reg945 (spr845): undefined
+ privileged reg946 (spr846): undefined
+ privileged reg947 (spr847): undefined
+ privileged reg948 (spr848): undefined
+ privileged reg949 (spr849): undefined
+ privileged reg950 (spr850): undefined
+ privileged reg951 (spr851): undefined
+ privileged reg952 (spr852): undefined
+ privileged reg953 (spr853): undefined
+ privileged reg954 (spr854): undefined
+ privileged reg955 (spr855): undefined
+ privileged reg956 (spr856): undefined
+ privileged reg957 (spr857): undefined
+ privileged reg958 (spr858): undefined
+ privileged reg959 (spr859): undefined
+ privileged reg960 (spr860): undefined
+ privileged reg961 (spr861): undefined
+ privileged reg962 (spr862): undefined
+ privileged reg963 (spr863): undefined
+ privileged reg964 (spr864): undefined
+ privileged reg965 (spr865): undefined
+ privileged reg966 (spr866): undefined
+ privileged reg967 (spr867): undefined
+ privileged reg968 (spr868): undefined
+ privileged reg969 (spr869): undefined
+ privileged reg970 (spr870): undefined
+ privileged reg971 (spr871): undefined
+ privileged reg972 (spr872): undefined
+ privileged reg973 (spr873): undefined
+ privileged reg974 (spr874): undefined
+ privileged reg975 (spr875): undefined
+ privileged reg976 (spr876): undefined
+ privileged reg977 (spr877): undefined
+ privileged reg978 (spr878): undefined
+ privileged reg979 (spr879): undefined
+ privileged reg980 (spr880): undefined
+ privileged reg981 (spr881): undefined
+ privileged reg982 (spr882): undefined
+ privileged reg983 (spr883): undefined
+ privileged reg984 (spr884): undefined
+ privileged reg985 (spr885): undefined
+ privileged reg986 (spr886): undefined
+ privileged reg987 (spr887): undefined
+ privileged reg988 (spr888): undefined
+ privileged reg989 (spr889): undefined
+ privileged reg990 (spr890): undefined
+ privileged reg991 (spr891): undefined
+ privileged reg992 (spr892): undefined
+ privileged reg993 (spr893): undefined
+ privileged reg994 (spr894): undefined
+ privileged reg995 (spr895): undefined
+ privileged reg996 (spr896): undefined
+ privileged reg997 (spr897): undefined
+ privileged reg998 (spr898): undefined
+ privileged reg999 (spr899): undefined
+ vector reg1124 (vr0): undefined
+ vector reg1125 (vr1): undefined
+ vector reg1126 (vr2): undefined
+ vector reg1127 (vr3): undefined
+ vector reg1128 (vr4): undefined
+ vector reg1129 (vr5): undefined
+ vector reg1130 (vr6): undefined
+ vector reg1131 (vr7): undefined
+ vector reg1132 (vr8): undefined
+ vector reg1133 (vr9): undefined
+ vector reg1134 (vr10): undefined
+ vector reg1135 (vr11): undefined
+ vector reg1136 (vr12): undefined
+ vector reg1137 (vr13): undefined
+ vector reg1138 (vr14): undefined
+ vector reg1139 (vr15): undefined
+ vector reg1140 (vr16): undefined
+ vector reg1141 (vr17): undefined
+ vector reg1142 (vr18): undefined
+ vector reg1143 (vr19): undefined
+ vector reg1144 (vr20): undefined
+ vector reg1145 (vr21): undefined
+ vector reg1146 (vr22): undefined
+ vector reg1147 (vr23): undefined
+ vector reg1148 (vr24): undefined
+ vector reg1149 (vr25): undefined
+ vector reg1150 (vr26): undefined
+ vector reg1151 (vr27): undefined
+ vector reg1152 (vr28): undefined
+ vector reg1153 (vr29): undefined
+ vector reg1154 (vr30): undefined
+ vector reg1155 (vr31): undefined
+EOF
+
+# EM_S390 (ELFCLASS32) (function bar 0x4004d8)
+# Note. Only in .eh_frame, there is no .debug_frame.
+# Same as PPC above but with -m31.
+testfiles testfiles390
+testrun_compare ${abs_builddir}/addrcfi -e testfiles390 0x4004d8 <<\EOF
+.eh_frame has 0x4004d8 => [0x4004d8, 0x4004e8):
+ return address in reg14
+ CFA location expression: bregx(15,96)
+ integer reg0 (%r0): undefined
+ integer reg1 (%r1): undefined
+ integer reg2 (%r2): undefined
+ integer reg3 (%r3): undefined
+ integer reg4 (%r4): undefined
+ integer reg5 (%r5): undefined
+ integer reg6 (%r6): same_value
+ integer reg7 (%r7): same_value
+ integer reg8 (%r8): same_value
+ integer reg9 (%r9): same_value
+ integer reg10 (%r10): same_value
+ integer reg11 (%r11): same_value
+ integer reg12 (%r12): same_value
+ integer reg13 (%r13): same_value
+ integer reg14 (%r14): same_value
+ integer reg15 (%r15): same_value
+ FPU reg16 (%f0): undefined
+ FPU reg17 (%f2): undefined
+ FPU reg18 (%f4): undefined
+ FPU reg19 (%f6): undefined
+ FPU reg20 (%f1): undefined
+ FPU reg21 (%f3): undefined
+ FPU reg22 (%f5): undefined
+ FPU reg23 (%f7): undefined
+ FPU reg24 (%f8): same_value
+ FPU reg25 (%f10): same_value
+ FPU reg26 (%f12): same_value
+ FPU reg27 (%f14): same_value
+ FPU reg28 (%f9): same_value
+ FPU reg29 (%f11): same_value
+ FPU reg30 (%f13): same_value
+ FPU reg31 (%f15): same_value
+ control reg32 (%c0): undefined
+ control reg33 (%c1): undefined
+ control reg34 (%c2): undefined
+ control reg35 (%c3): undefined
+ control reg36 (%c4): undefined
+ control reg37 (%c5): undefined
+ control reg38 (%c6): undefined
+ control reg39 (%c7): undefined
+ control reg40 (%c8): undefined
+ control reg41 (%c9): undefined
+ control reg42 (%c10): undefined
+ control reg43 (%c11): undefined
+ control reg44 (%c12): undefined
+ control reg45 (%c13): undefined
+ control reg46 (%c14): undefined
+ control reg47 (%c15): undefined
+ access reg48 (%a0): undefined
+ access reg49 (%a1): undefined
+ access reg50 (%a2): undefined
+ access reg51 (%a3): undefined
+ access reg52 (%a4): undefined
+ access reg53 (%a5): undefined
+ access reg54 (%a6): undefined
+ access reg55 (%a7): undefined
+ access reg56 (%a8): undefined
+ access reg57 (%a9): undefined
+ access reg58 (%a10): undefined
+ access reg59 (%a11): undefined
+ access reg60 (%a12): undefined
+ access reg61 (%a13): undefined
+ access reg62 (%a14): undefined
+ access reg63 (%a15): undefined
+ control reg64 (%pswm): undefined
+ control reg65 (%pswa): undefined
+handle_cfi no CFI (.debug_frame): no error
+EOF
+
+# EM_S390 (ELFCLASS64) (function bar 0x0000000080000510)
+# Note. Only in .eh_frame, there is no .debug_frame.
+# Same as s390 above but without -m31.
+testfiles testfiles390x
+testrun_compare ${abs_builddir}/addrcfi -e testfiles390x 0x0000000080000510 <<\EOF
+.eh_frame has 0x80000510 => [0x80000510, 0x80000524):
+ return address in reg14
+ CFA location expression: bregx(15,160)
+ integer reg0 (%r0): undefined
+ integer reg1 (%r1): undefined
+ integer reg2 (%r2): undefined
+ integer reg3 (%r3): undefined
+ integer reg4 (%r4): undefined
+ integer reg5 (%r5): undefined
+ integer reg6 (%r6): same_value
+ integer reg7 (%r7): same_value
+ integer reg8 (%r8): same_value
+ integer reg9 (%r9): same_value
+ integer reg10 (%r10): same_value
+ integer reg11 (%r11): same_value
+ integer reg12 (%r12): same_value
+ integer reg13 (%r13): same_value
+ integer reg14 (%r14): same_value
+ integer reg15 (%r15): same_value
+ FPU reg16 (%f0): undefined
+ FPU reg17 (%f2): undefined
+ FPU reg18 (%f4): undefined
+ FPU reg19 (%f6): undefined
+ FPU reg20 (%f1): undefined
+ FPU reg21 (%f3): undefined
+ FPU reg22 (%f5): undefined
+ FPU reg23 (%f7): undefined
+ FPU reg24 (%f8): same_value
+ FPU reg25 (%f10): same_value
+ FPU reg26 (%f12): same_value
+ FPU reg27 (%f14): same_value
+ FPU reg28 (%f9): same_value
+ FPU reg29 (%f11): same_value
+ FPU reg30 (%f13): same_value
+ FPU reg31 (%f15): same_value
+ control reg32 (%c0): undefined
+ control reg33 (%c1): undefined
+ control reg34 (%c2): undefined
+ control reg35 (%c3): undefined
+ control reg36 (%c4): undefined
+ control reg37 (%c5): undefined
+ control reg38 (%c6): undefined
+ control reg39 (%c7): undefined
+ control reg40 (%c8): undefined
+ control reg41 (%c9): undefined
+ control reg42 (%c10): undefined
+ control reg43 (%c11): undefined
+ control reg44 (%c12): undefined
+ control reg45 (%c13): undefined
+ control reg46 (%c14): undefined
+ control reg47 (%c15): undefined
+ access reg48 (%a0): undefined
+ access reg49 (%a1): undefined
+ access reg50 (%a2): undefined
+ access reg51 (%a3): undefined
+ access reg52 (%a4): undefined
+ access reg53 (%a5): undefined
+ access reg54 (%a6): undefined
+ access reg55 (%a7): undefined
+ access reg56 (%a8): undefined
+ access reg57 (%a9): undefined
+ access reg58 (%a10): undefined
+ access reg59 (%a11): undefined
+ access reg60 (%a12): undefined
+ access reg61 (%a13): undefined
+ access reg62 (%a14): undefined
+ access reg63 (%a15): undefined
+ control reg64 (%pswm): undefined
+ control reg65 (%pswa): undefined
+handle_cfi no CFI (.debug_frame): no error
+EOF
+
+# EM_ARM (function bar 0x00008510)
+# Note. Only in .debug_frame, the .eh_frame is actually empty.
+# Same as s390 and ppc above.
+testfiles testfilearm
+testrun_compare ${abs_builddir}/addrcfi -e testfilearm 0x00008510 <<\EOF
+dwarf_cfi_addrframe (.eh_frame): no matching address range
+.debug_frame has 0x8510 => [0x8510, 0x8524):
+ return address in reg14
+ CFA location expression: bregx(13)
+ integer reg0 (r0): undefined
+ integer reg1 (r1): undefined
+ integer reg2 (r2): undefined
+ integer reg3 (r3): undefined
+ integer reg4 (r4): same_value
+ integer reg5 (r5): same_value
+ integer reg6 (r6): same_value
+ integer reg7 (r7): same_value
+ integer reg8 (r8): same_value
+ integer reg9 (r9): undefined
+ integer reg10 (r10): same_value
+ integer reg11 (r11): same_value
+ integer reg12 (r12): undefined
+ integer reg13 (sp): location expression: call_frame_cfa stack_value
+ integer reg14 (lr): same_value
+ integer reg15 (pc): location expression: regx(14)
+ FPA reg16 (f0): undefined
+ FPA reg17 (f1): undefined
+ FPA reg18 (f2): undefined
+ FPA reg19 (f3): undefined
+ FPA reg20 (f4): undefined
+ FPA reg21 (f5): undefined
+ FPA reg22 (f6): undefined
+ FPA reg23 (f7): undefined
+ FPA reg96 (f0): undefined
+ FPA reg97 (f1): undefined
+ FPA reg98 (f2): undefined
+ FPA reg99 (f3): undefined
+ FPA reg100 (f4): undefined
+ FPA reg101 (f5): undefined
+ FPA reg102 (f6): undefined
+ FPA reg103 (f7): undefined
+ integer reg128 (spsr): undefined
+ VFP reg256 (d0): undefined
+ VFP reg257 (d1): undefined
+ VFP reg258 (d2): undefined
+ VFP reg259 (d3): undefined
+ VFP reg260 (d4): undefined
+ VFP reg261 (d5): undefined
+ VFP reg262 (d6): undefined
+ VFP reg263 (d7): undefined
+ VFP reg264 (d8): same_value
+ VFP reg265 (d9): same_value
+ VFP reg266 (d10): same_value
+ VFP reg267 (d11): same_value
+ VFP reg268 (d12): same_value
+ VFP reg269 (d13): same_value
+ VFP reg270 (d14): same_value
+ VFP reg271 (d15): same_value
+ VFP reg272 (d16): undefined
+ VFP reg273 (d17): undefined
+ VFP reg274 (d18): undefined
+ VFP reg275 (d19): undefined
+ VFP reg276 (d20): undefined
+ VFP reg277 (d21): undefined
+ VFP reg278 (d22): undefined
+ VFP reg279 (d23): undefined
+ VFP reg280 (d24): undefined
+ VFP reg281 (d25): undefined
+ VFP reg282 (d26): undefined
+ VFP reg283 (d27): undefined
+ VFP reg284 (d28): undefined
+ VFP reg285 (d29): undefined
+ VFP reg286 (d30): undefined
+ VFP reg287 (d31): undefined
+EOF
+
+# EM_AARCH64 (function bar 0x400550)
+# Same as arm, 390 and ppc above.
+# Note missing coverage in .eh_frame.
+testfiles testfileaarch64
+testrun_compare ${abs_builddir}/addrcfi -e testfileaarch64 0x400550 <<\EOF
+dwarf_cfi_addrframe (.eh_frame): no matching address range
+.debug_frame has 0x400550 => [0x400550, 0x400568):
+ return address in reg30
+ CFA location expression: bregx(31)
+ integer reg0 (x0): undefined
+ integer reg1 (x1): undefined
+ integer reg2 (x2): undefined
+ integer reg3 (x3): undefined
+ integer reg4 (x4): undefined
+ integer reg5 (x5): undefined
+ integer reg6 (x6): undefined
+ integer reg7 (x7): undefined
+ integer reg8 (x8): undefined
+ integer reg9 (x9): undefined
+ integer reg10 (x10): undefined
+ integer reg11 (x11): undefined
+ integer reg12 (x12): undefined
+ integer reg13 (x13): undefined
+ integer reg14 (x14): undefined
+ integer reg15 (x15): undefined
+ integer reg16 (x16): undefined
+ integer reg17 (x17): undefined
+ integer reg18 (x18): undefined
+ integer reg19 (x19): same_value
+ integer reg20 (x20): same_value
+ integer reg21 (x21): same_value
+ integer reg22 (x22): same_value
+ integer reg23 (x23): same_value
+ integer reg24 (x24): same_value
+ integer reg25 (x25): same_value
+ integer reg26 (x26): same_value
+ integer reg27 (x27): same_value
+ integer reg28 (x28): same_value
+ integer reg29 (x29): same_value
+ integer reg30 (x30): same_value
+ integer reg31 (sp): undefined
+ integer reg33 (elr): undefined
+ FP/SIMD reg64 (v0): undefined
+ FP/SIMD reg65 (v1): undefined
+ FP/SIMD reg66 (v2): undefined
+ FP/SIMD reg67 (v3): undefined
+ FP/SIMD reg68 (v4): undefined
+ FP/SIMD reg69 (v5): undefined
+ FP/SIMD reg70 (v6): undefined
+ FP/SIMD reg71 (v7): undefined
+ FP/SIMD reg72 (v8): same_value
+ FP/SIMD reg73 (v9): same_value
+ FP/SIMD reg74 (v10): same_value
+ FP/SIMD reg75 (v11): same_value
+ FP/SIMD reg76 (v12): same_value
+ FP/SIMD reg77 (v13): same_value
+ FP/SIMD reg78 (v14): same_value
+ FP/SIMD reg79 (v15): same_value
+ FP/SIMD reg80 (v16): undefined
+ FP/SIMD reg81 (v17): undefined
+ FP/SIMD reg82 (v18): undefined
+ FP/SIMD reg83 (v19): undefined
+ FP/SIMD reg84 (v20): undefined
+ FP/SIMD reg85 (v21): undefined
+ FP/SIMD reg86 (v22): undefined
+ FP/SIMD reg87 (v23): undefined
+ FP/SIMD reg88 (v24): undefined
+ FP/SIMD reg89 (v25): undefined
+ FP/SIMD reg90 (v26): undefined
+ FP/SIMD reg91 (v27): undefined
+ FP/SIMD reg92 (v28): undefined
+ FP/SIMD reg93 (v29): undefined
+ FP/SIMD reg94 (v30): undefined
+ FP/SIMD reg95 (v31): undefined
+EOF
diff --git a/src/tests/run-addrname-test.sh b/src/tests/run-addrname-test.sh
new file mode 100755
index 00000000..f954ee45
--- /dev/null
+++ b/src/tests/run-addrname-test.sh
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Copyright (C) 2007, 2008 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile34 testfile38 testfile41 testfile49
+
+testrun_compare ${abs_top_builddir}/src/addr2line -f -e testfile34 \
+ 0x08048074 0x08048075 0x08048076 \
+ 0x08049078 0x08048080 0x08049080 <<\EOF
+foo
+??:0
+bar
+??:0
+_etext
+??:0
+data1
+??:0
+??
+??:0
+_end
+??:0
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile38 0x02 0x10a 0x211 0x31a <<\EOF
+t1_global_outer+0x2
+??:0
+t2_global_symbol+0x2
+??:0
+t3_global_after_0+0x1
+??:0
+(.text)+0x31a
+??:0
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile41 0x1 0x104 <<\EOF
+small_global_at_large_global+0x1
+??:0
+small_global_first_at_large_global+0x1
+??:0
+EOF
+
+testfiles testfile12 testfile14
+tempfiles testmaps
+
+cat > testmaps <<EOF
+00400000-00401000 r-xp 00000000 fd:01 4006812 `pwd`/testfile14
+00500000-00501000 rw-p 00000000 fd:01 4006812 `pwd`/testfile14
+01000000-01001000 r-xp 00000000 fd:01 1234567 `pwd`/testfile12
+01100000-01011000 rw-p 00000000 fd:01 1234567 `pwd`/testfile12
+2aaaaaaab000-2aaaaaaad000 rw-p 2aaaaaaab000 00:00 0
+2aaaaaae2000-2aaaaaae3000 rw-p 2aaaaaae2000 00:00 0
+7fff61068000-7fff6107d000 rw-p 7ffffffea000 00:00 0 [stack]
+7fff611fe000-7fff61200000 r-xp 7fff611fe000 00:00 0 [vdso]
+ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -M testmaps 0x40047c 0x10009db <<\EOF
+caller+0x14
+/home/drepper/local/elfutils-build/20050425/v.c:11
+foo+0xb
+/home/drepper/local/elfutils-build/20030710/u.c:5
+EOF
+
+# .section .text
+# nop #0
+#sizeless_foo:
+# nop #1
+# nop #2
+#sized_bar:
+# nop #3
+# nop #4
+#sizeless_baz:
+# nop #5
+# nop #6
+# .size sized_bar, . - sized_bar
+# nop #7
+# nop #8
+#sizeless_x:
+# nop #9
+# .org 0x100
+# nop #0
+# .globl global_outer
+#global_outer:
+# nop #1
+# nop #2
+# .globl global_in_global
+#global_in_global:
+# nop #3
+# nop #4
+# .size global_in_global, . - global_in_global
+#local_in_global:
+# nop #5
+# nop #6
+# .size local_in_global, . - local_in_global
+# nop #7
+# nop #8
+#.Lsizeless1:
+# nop #9
+# nop #10
+# .size global_outer, . - global_outer
+# nop #11
+# .org 0x200
+# nop #0
+#local_outer:
+# nop #1
+# nop #2
+# .globl global_in_local
+#global_in_local:
+# nop #3
+# nop #4
+# .size global_in_local, . - global_in_local
+#local_in_local:
+# nop #5
+# nop #6
+# .size local_in_local, . - local_in_local
+# nop #7
+# nop #8
+#.Lsizeless2:
+# nop #9
+# nop #10
+# .size local_outer, . - local_outer
+# nop #11
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile49 \
+ 0 1 2 3 4 5 6 7 8 9 \
+ 0x100 0x101 0x102 0x103 0x104 0x105 \
+ 0x106 0x107 0x108 0x109 0x10a 0x10b \
+ 0x200 0x201 0x202 0x203 0x204 0x205 \
+ 0x206 0x207 0x208 0x209 0x20a 0x20b <<\EOF
+(.text)+0
+??:0
+sizeless_foo
+??:0
+sizeless_foo+0x1
+??:0
+sized_bar
+??:0
+sized_bar+0x1
+??:0
+sized_bar+0x2
+??:0
+sized_bar+0x3
+??:0
+(.text)+0x7
+??:0
+(.text)+0x8
+??:0
+sizeless_x
+??:0
+sizeless_x+0xf7
+??:0
+global_outer
+??:0
+global_outer+0x1
+??:0
+global_in_global
+??:0
+global_in_global+0x1
+??:0
+global_outer+0x4
+??:0
+global_outer+0x5
+??:0
+global_outer+0x6
+??:0
+global_outer+0x7
+??:0
+global_outer+0x8
+??:0
+global_outer+0x9
+??:0
+(.text)+0x10b
+??:0
+(.text)+0x200
+??:0
+local_outer
+??:0
+local_outer+0x1
+??:0
+global_in_local
+??:0
+global_in_local+0x1
+??:0
+local_in_local
+??:0
+local_in_local+0x1
+??:0
+local_outer+0x6
+??:0
+local_outer+0x7
+??:0
+local_outer+0x8
+??:0
+local_outer+0x9
+??:0
+(.text)+0x20b
+??:0
+EOF
+
+# .macro global label size
+#\label: .globl \label
+# .size \label, \size
+# .endm
+# .macro weak label size
+#\label: .weak \label
+# .size \label, \size
+# .endm
+# .macro local label size
+#\label: .size \label, \size
+# .endm
+# .macro offset val
+# .ifne (. - _start) - \val
+# .err
+# .endif
+# .byte \val
+# .endm
+#
+#_start:
+# offset 0
+#
+# local glocal, 1
+# weak gweak, 1
+# global gglobal1, 2
+# global gglobal2, 1
+# global gglobal3, 1
+# offset 1
+# /* Symbols end here. */
+# offset 2
+# /* gglobal1 ends here. */
+# offset 3
+#
+# local g0local, 0
+# weak g0weak, 0
+# global g0global1, 0
+# global g0global2, 0
+# offset 4
+#
+# local wlocal, 1
+# weak wweak1, 2
+# weak wweak2, 1
+# weak wweak3, 1
+# offset 5
+# /* Symbols end here. */
+# offset 6
+# /* wweak1 ends here. */
+# offset 7
+#
+# local w0local, 0
+# weak w0weak1, 0
+# weak w0weak2, 0
+# offset 8
+#
+# local llocal1, 2
+# local llocal2, 1
+# local llocal3, 1
+# offset 9
+# /* Symbols end here. */
+# offset 10
+# /* llocal1 ends here. */
+# offset 11
+#
+# local l0local1, 0
+# local l0local2, 0
+# offset 12
+testfiles testfile64
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile64 1 4 5 8 9 12 <<\EOF
+gglobal2
+??:0
+g0global2
+??:0
+wweak2
+??:0
+w0weak2
+??:0
+llocal2
+??:0
+l0local2
+??:0
+EOF
+
+testfiles testfile65
+testrun_compare ${abs_top_builddir}/src/addr2line -S --core=testfile65 0x7fff94bffa30 <<\EOF
+__vdso_time
+??:0
+EOF
+
+# .section ".text"
+# .globl _start
+# .section ".opd","aw"
+#_start: .quad .L._start,.TOC.@tocbase
+# .previous
+# .type _start, @function
+#.L._start:
+# .byte 0x7d, 0x82, 0x10, 0x08
+# .size _start,.-.L._start
+testfiles testfile66 testfile66.core
+testrun_compare ${abs_top_builddir}/src/addr2line -x -e testfile66 _start 0x2d8 0x2db 0x2dc 0x103d0 0x103d3 0x103d4<<EOF
+_start (.text)
+??:0
+_start (.text)
+??:0
+_start+0x3 (.text)
+??:0
+()+0x2dc
+??:0
+_start (.opd)
+??:0
+_start+0x3 (.opd)
+??:0
+()+0x103d4
+??:0
+EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -x -e testfile66 --core=testfile66.core _start 0x461b02d8 0x461c03d0<<\EOF
+_start (.text)
+??:0
+_start (.text)
+??:0
+_start (.opd)
+??:0
+EOF
+
+testfiles testfile69.core testfile69.so
+testrun_compare ${abs_top_builddir}/src/addr2line --core=./testfile69.core -S 0x7f0bc6a33535 0x7f0bc6a33546 <<\EOF
+libstatic+0x9
+??:0
+libglobal+0x9
+??:0
+EOF
+
+testfiles testfile70.exec testfile70.core
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile70.exec --core=testfile70.core 0x7ff2cfe9b6b5 <<\EOF
+main+0x9
+??:0
+EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S --core=testfile70.core -e testfile70.exec 0x7ff2cfe9b6b5 <<\EOF
+main+0x9
+??:0
+EOF
+
+testfiles test-core-lib.so test-core.core test-core.exec
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e test-core.exec --core=test-core.core 0x7f67f2aaf619 <<\EOF
+libfunc+0x9
+??:0
+EOF
+
+exit 0
diff --git a/src/tests/run-addrscopes.sh b/src/tests/run-addrscopes.sh
new file mode 100755
index 00000000..4f5c9d7f
--- /dev/null
+++ b/src/tests/run-addrscopes.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile22
+
+testrun_compare ${abs_builddir}/addrscopes -e testfile22 0x8048353 <<\EOF
+0x8048353:
+ tests/foo.c (0x11): 0x8048348 (tests/foo.c:5) .. 0x804837e (tests/foo.c:16)
+ global [ be]
+ function (0x2e): 0x8048348 (tests/foo.c:5) .. 0x804835b (tests/foo.c:14)
+ local [ 8f]
+EOF
+
+test_cleanup
+
+testfiles testfile24
+testrun_compare ${abs_builddir}/addrscopes -e testfile24 0x804834e <<\EOF
+0x804834e:
+ inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x8048364 (/home/roland/build/stock-elfutils/inline-test.c:16)
+ add (0x1d): 0x804834e (/home/roland/build/stock-elfutils/inline-test.c:3) .. 0x8048350 (/home/roland/build/stock-elfutils/inline-test.c:9)
+ y [ 9d]
+ x [ a2]
+ x (abstract)
+ y (abstract)
+EOF
+
+exit 0
diff --git a/src/tests/run-aggregate-size.sh b/src/tests/run-aggregate-size.sh
new file mode 100755
index 00000000..42b0742b
--- /dev/null
+++ b/src/tests/run-aggregate-size.sh
@@ -0,0 +1,105 @@
+#! /bin/sh
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# char c;
+# int i;
+# long l;
+#
+# void *v;
+#
+# struct s
+# {
+# char *a;
+# int i;
+# } s;
+#
+# char ca[16];
+# int ia[32];
+# void *va[64];
+# struct s sa[8];
+
+# On x86_64 (LP64):
+# gcc -g -c -o testfile-sizes1.o sizes.c
+# clang -g -c -o testfile-sizes2.o sizes.c
+
+# const char c;
+# volatile int i;
+# const volatile long l;
+#
+# void * restrict v;
+#
+# struct s
+# {
+# const char *a;
+# volatile int i;
+# } s;
+#
+# const char ca[16];
+# volatile int ia[32];
+# const volatile void * const volatile restrict va[64];
+# struct s sa[8];
+#
+# typedef const int foo;
+# typedef volatile foo bar;
+# foo f;
+# bar b;
+#
+# gcc -std=c99 -g -c -o testfile-sizes3.o sizes.c
+
+testfiles testfile-sizes1.o testfile-sizes2.o testfile-sizes3.o
+
+testrun_compare ${abs_builddir}/aggregate_size -e testfile-sizes1.o <<\EOF
+c size 1
+i size 4
+l size 8
+v size 8
+s size 16
+ca size 16
+ia size 128
+va size 512
+sa size 128
+EOF
+
+testrun_compare ${abs_builddir}/aggregate_size -e testfile-sizes2.o <<\EOF
+c size 1
+i size 4
+l size 8
+v size 8
+s size 16
+ca size 16
+ia size 128
+va size 512
+sa size 128
+EOF
+
+testrun_compare ${abs_builddir}/aggregate_size -e testfile-sizes3.o <<\EOF
+c size 1
+i size 4
+l size 8
+v size 8
+s size 16
+ca size 16
+ia size 128
+va size 512
+sa size 128
+f size 4
+b size 4
+EOF
+
+exit 0
diff --git a/src/tests/run-alldts.sh b/src/tests/run-alldts.sh
new file mode 100755
index 00000000..6a9a9ece
--- /dev/null
+++ b/src/tests/run-alldts.sh
@@ -0,0 +1,98 @@
+#! /bin/sh
+# Copyright (C) 2011 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+tempfiles testfile-alldts
+
+# This will produce "testfile-alldts" file
+testrun ${abs_builddir}/alldts
+
+testrun_compare ${abs_top_builddir}/src/readelf -d testfile-alldts <<\EOF
+
+Dynamic segment contains 66 entries:
+ Addr: 0x000001a0 Offset: 0x000078 Link to section: [ 0] ''
+ Type Value
+ NULL
+ NEEDED Shared library: [(null)]
+ PLTRELSZ 3735928559 (bytes)
+ PLTGOT 0xdeadbeef
+ HASH 0xdeadbeef
+ STRTAB 0xdeadbeef
+ SYMTAB 0xdeadbeef
+ RELA 0xdeadbeef
+ RELASZ 3735928559 (bytes)
+ RELAENT 3735928559 (bytes)
+ STRSZ 3735928559 (bytes)
+ SYMENT 3735928559 (bytes)
+ INIT 0xdeadbeef
+ FINI 0xdeadbeef
+ SONAME Library soname: [(null)]
+ RPATH Library rpath: [(null)]
+ SYMBOLIC 0xdeadbeef
+ REL 0xdeadbeef
+ RELSZ 3735928559 (bytes)
+ RELENT 3735928559 (bytes)
+ PLTREL ???
+ DEBUG
+ TEXTREL
+ JMPREL 0xdeadbeef
+ BIND_NOW
+ INIT_ARRAY 0xdeadbeef
+ FINI_ARRAY 0xdeadbeef
+ INIT_ARRAYSZ 3735928559 (bytes)
+ FINI_ARRAYSZ 3735928559 (bytes)
+ RUNPATH Library runpath: [(null)]
+ FLAGS ORIGIN SYMBOLIC TEXTREL BIND_NOW 0xdeadbee0
+ PREINIT_ARRAY 0xdeadbeef
+ PREINIT_ARRAY 0xdeadbeef
+ PREINIT_ARRAYSZ 0xdeadbeef
+ VERSYM 0xdeadbeef
+ GNU_PRELINKED 0xdeadbeef
+ GNU_CONFLICTSZ 3735928559 (bytes)
+ GNU_LIBLISTSZ 3735928559 (bytes)
+ CHECKSUM 0xdeadbeef
+ PLTPADSZ 3735928559 (bytes)
+ MOVEENT 3735928559 (bytes)
+ MOVESZ 3735928559 (bytes)
+ FEATURE_1 PARINIT CONFEXP 0xdeadbeec
+ POSFLAG_1 LAZYLOAD GROUPPERM 0xdeadbeec
+ SYMINSZ 3735928559 (bytes)
+ SYMINENT 3735928559 (bytes)
+ GNU_HASH 0xdeadbeef
+ TLSDESC_PLT 0xdeadbeef
+ TLSDESC_GOT 0xdeadbeef
+ GNU_CONFLICT 0xdeadbeef
+ GNU_LIBLIST 0xdeadbeef
+ CONFIG 0xdeadbeef
+ DEPAUDIT 0xdeadbeef
+ AUDIT 0xdeadbeef
+ PLTPAD 0xdeadbeef
+ MOVETAB 0xdeadbeef
+ SYMINFO 0xdeadbeef
+ RELACOUNT 3735928559
+ RELCOUNT 3735928559
+ FLAGS_1 NOW GLOBAL GROUP NODELETE INITFIRST NOOPEN ORIGIN TRANS INTERPOSE NODEFLIB NODUMP CONFALT DISPRELDNE DISPRELPND 0xdeac0000
+ VERDEF 0xdeadbeef
+ VERDEFNUM 3735928559
+ VERNEED 0xdeadbeef
+ VERNEEDNUM 3735928559
+ AUXILIARY 0xdeadbeef
+ FILTER 0xdeadbeef
+EOF
+
+exit 0
diff --git a/src/tests/run-allfcts-multi.sh b/src/tests/run-allfcts-multi.sh
new file mode 100755
index 00000000..727b76ee
--- /dev/null
+++ b/src/tests/run-allfcts-multi.sh
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# See run-readelf-dwz-multi.sh
+testfiles libtestfile_multi_shared.so testfile_multi_main testfile_multi.dwz
+testfiles testfile-dwzstr testfile-dwzstr.multi
+
+testrun_compare ${abs_builddir}/allfcts testfile_multi_main libtestfile_multi_shared.so testfile-dwzstr <<\EOF
+/home/mark/src/tests/dwz/main.c:3:main
+/home/mark/src/tests/dwz/shared.c:3:call_foo
+/home/mark/src/tests/main.c:8:main
+EOF
+
+# - test-offset-loop.c
+#
+# #include <stdbool.h>
+# #include <string.h>
+# #include <errno.h>
+# void padding (int x, int y, int z) { }
+# static inline bool is_error (int err) { return err != 0; }
+# static inline int get_errno (void) { return errno; }
+# int main () { return is_error (get_errno ()); }
+#
+# gcc -g -O2 test-offset-loop.c -o test-offset-loop
+# cp test-offset-loop test-offset-loop2
+# dwz test-offset-loop test-offset-loop2 -m test-offset-loop.alt
+
+testfiles test-offset-loop test-offset-loop.alt
+tempfiles allfcts.out
+
+# Use head to capture output because the output could be infinite...
+testrun ${abs_builddir}/allfcts test-offset-loop | head -n 20 > allfcts.out
+testrun_compare cat allfcts.out <<\EOF
+/tmp/test-offset-loop.c:6:get_errno
+/tmp/test-offset-loop.c:5:is_error
+/tmp/test-offset-loop.c:4:padding
+/tmp/test-offset-loop.c:7:main
+EOF
+
+exit 0
diff --git a/src/tests/run-allfcts.sh b/src/tests/run-allfcts.sh
new file mode 100755
index 00000000..6eaf13c8
--- /dev/null
+++ b/src/tests/run-allfcts.sh
@@ -0,0 +1,94 @@
+#! /bin/sh
+# Copyright (C) 2005, 2013 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile2 testfile8
+
+testrun_compare ${abs_builddir}/allfcts testfile testfile2 testfile8 <<\EOF
+/home/drepper/gnu/new-bu/build/ttt/m.c:5:main
+/home/drepper/gnu/new-bu/build/ttt/b.c:4:bar
+/home/drepper/gnu/new-bu/build/ttt/f.c:3:foo
+/shoggoth/drepper/b.c:4:bar
+/shoggoth/drepper/f.c:3:foo
+/shoggoth/drepper/m.c:5:main
+/home/drepper/gnu/elfutils/build/src/../../src/strip.c:107:main
+/home/drepper/gnu/elfutils/build/src/../../src/strip.c:159:print_version
+/home/drepper/gnu/elfutils/build/src/../../src/strip.c:173:parse_opt
+/home/drepper/gnu/elfutils/build/src/../../src/strip.c:201:more_help
+/home/drepper/gnu/elfutils/build/src/../../src/strip.c:217:process_file
+/usr/include/sys/stat.h:375:stat64
+/home/drepper/gnu/elfutils/build/src/../../src/strip.c:291:crc32_file
+/home/drepper/gnu/elfutils/build/src/../../src/strip.c:313:handle_elf
+EOF
+
+# = nested_funcs.c =
+#
+# static int
+# foo (int x)
+# {
+# int bar (int y)
+# {
+# return x - y;
+# }
+#
+# return bar (x * 2);
+# }
+#
+# int
+# main (int argc, char ** argv)
+# {
+# return foo (argc);
+# }
+#
+# gcc -g -o nested_funcs nested_funcs.c
+
+# = class_func.cxx =
+#
+# namespace foobar
+# {
+# class Foo
+# {
+# public:
+# int bar(int x);
+# };
+#
+# int Foo::bar(int x) { return x - 42; }
+# };
+#
+# int
+# main (int argc, char **argv)
+# {
+# foobar::Foo foo;
+#
+# return foo.bar (42);
+# }
+#
+# clang++ -g -o class_func class_func.cxx
+
+testfiles testfile_nested_funcs testfile_class_func
+
+testrun_compare ${abs_builddir}/allfcts testfile_nested_funcs testfile_class_func <<\EOF
+/home/mark/src/tests/nested/nested_funcs.c:2:foo
+/home/mark/src/tests/nested/nested_funcs.c:4:bar
+/home/mark/src/tests/nested/nested_funcs.c:13:main
+/home/mark/src/tests/nested/class_func.cxx:6:bar
+/home/mark/src/tests/nested/class_func.cxx:13:main
+EOF
+
+exit 0
diff --git a/src/tests/run-allregs.sh b/src/tests/run-allregs.sh
new file mode 100755
index 00000000..6f3862ec
--- /dev/null
+++ b/src/tests/run-allregs.sh
@@ -0,0 +1,2799 @@
+#! /bin/sh
+# Copyright (C) 2005, 2006, 2007, 2012, 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+regs_test()
+{
+ tempfiles good.regs
+ cat > good.regs
+ testfiles "$@"
+ for f; do testrun_compare ${abs_builddir}/allregs -e $f < good.regs; done
+ test_cleanup
+}
+
+regs_test testfile11 <<\EOF
+integer registers:
+ 0: %eax (eax), signed 32 bits
+ 1: %ecx (ecx), signed 32 bits
+ 2: %edx (edx), signed 32 bits
+ 3: %ebx (ebx), signed 32 bits
+ 4: %esp (esp), address 32 bits
+ 5: %ebp (ebp), address 32 bits
+ 6: %esi (esi), signed 32 bits
+ 7: %edi (edi), signed 32 bits
+ 8: %eip (eip), address 32 bits
+ 9: %eflags (eflags), unsigned 32 bits
+ 10: %trapno (trapno), unsigned 32 bits
+FPU-control registers:
+ 37: %fctrl (fctrl), unsigned 16 bits
+ 38: %fstat (fstat), unsigned 16 bits
+ 39: %mxcsr (mxcsr), unsigned 32 bits
+MMX registers:
+ 29: %mm0 (mm0), unsigned 64 bits
+ 30: %mm1 (mm1), unsigned 64 bits
+ 31: %mm2 (mm2), unsigned 64 bits
+ 32: %mm3 (mm3), unsigned 64 bits
+ 33: %mm4 (mm4), unsigned 64 bits
+ 34: %mm5 (mm5), unsigned 64 bits
+ 35: %mm6 (mm6), unsigned 64 bits
+ 36: %mm7 (mm7), unsigned 64 bits
+SSE registers:
+ 21: %xmm0 (xmm0), unsigned 128 bits
+ 22: %xmm1 (xmm1), unsigned 128 bits
+ 23: %xmm2 (xmm2), unsigned 128 bits
+ 24: %xmm3 (xmm3), unsigned 128 bits
+ 25: %xmm4 (xmm4), unsigned 128 bits
+ 26: %xmm5 (xmm5), unsigned 128 bits
+ 27: %xmm6 (xmm6), unsigned 128 bits
+ 28: %xmm7 (xmm7), unsigned 128 bits
+segment registers:
+ 40: %es (es), unsigned 16 bits
+ 41: %cs (cs), unsigned 16 bits
+ 42: %ss (ss), unsigned 16 bits
+ 43: %ds (ds), unsigned 16 bits
+ 44: %fs (fs), unsigned 16 bits
+ 45: %gs (gs), unsigned 16 bits
+x87 registers:
+ 11: %st0 (st0), float 80 bits
+ 12: %st1 (st1), float 80 bits
+ 13: %st2 (st2), float 80 bits
+ 14: %st3 (st3), float 80 bits
+ 15: %st4 (st4), float 80 bits
+ 16: %st5 (st5), float 80 bits
+ 17: %st6 (st6), float 80 bits
+ 18: %st7 (st7), float 80 bits
+EOF
+
+regs_test testfile12 <<\EOF
+integer registers:
+ 0: %rax (rax), signed 64 bits
+ 1: %rdx (rdx), signed 64 bits
+ 2: %rcx (rcx), signed 64 bits
+ 3: %rbx (rbx), signed 64 bits
+ 4: %rsi (rsi), signed 64 bits
+ 5: %rdi (rdi), signed 64 bits
+ 6: %rbp (rbp), address 64 bits
+ 7: %rsp (rsp), address 64 bits
+ 8: %r8 (r8), signed 64 bits
+ 9: %r9 (r9), signed 64 bits
+ 10: %r10 (r10), signed 64 bits
+ 11: %r11 (r11), signed 64 bits
+ 12: %r12 (r12), signed 64 bits
+ 13: %r13 (r13), signed 64 bits
+ 14: %r14 (r14), signed 64 bits
+ 15: %r15 (r15), signed 64 bits
+ 16: %rip (rip), address 64 bits
+ 49: %rflags (rflags), unsigned 64 bits
+MMX registers:
+ 41: %mm0 (mm0), unsigned 64 bits
+ 42: %mm1 (mm1), unsigned 64 bits
+ 43: %mm2 (mm2), unsigned 64 bits
+ 44: %mm3 (mm3), unsigned 64 bits
+ 45: %mm4 (mm4), unsigned 64 bits
+ 46: %mm5 (mm5), unsigned 64 bits
+ 47: %mm6 (mm6), unsigned 64 bits
+ 48: %mm7 (mm7), unsigned 64 bits
+SSE registers:
+ 17: %xmm0 (xmm0), unsigned 128 bits
+ 18: %xmm1 (xmm1), unsigned 128 bits
+ 19: %xmm2 (xmm2), unsigned 128 bits
+ 20: %xmm3 (xmm3), unsigned 128 bits
+ 21: %xmm4 (xmm4), unsigned 128 bits
+ 22: %xmm5 (xmm5), unsigned 128 bits
+ 23: %xmm6 (xmm6), unsigned 128 bits
+ 24: %xmm7 (xmm7), unsigned 128 bits
+ 25: %xmm8 (xmm8), unsigned 128 bits
+ 26: %xmm9 (xmm9), unsigned 128 bits
+ 27: %xmm10 (xmm10), unsigned 128 bits
+ 28: %xmm11 (xmm11), unsigned 128 bits
+ 29: %xmm12 (xmm12), unsigned 128 bits
+ 30: %xmm13 (xmm13), unsigned 128 bits
+ 31: %xmm14 (xmm14), unsigned 128 bits
+ 32: %xmm15 (xmm15), unsigned 128 bits
+control registers:
+ 62: %tr (tr), unsigned 64 bits
+ 63: %ldtr (ldtr), unsigned 64 bits
+ 64: %mxcsr (mxcsr), unsigned 64 bits
+ 65: %fcw (fcw), unsigned 16 bits
+ 66: %fsw (fsw), unsigned 16 bits
+segment registers:
+ 50: %es (es), unsigned 16 bits
+ 51: %cs (cs), unsigned 16 bits
+ 52: %ss (ss), unsigned 16 bits
+ 53: %ds (ds), unsigned 16 bits
+ 54: %fs (fs), unsigned 16 bits
+ 55: %gs (gs), unsigned 16 bits
+ 58: %fs.base (fs.base), address 64 bits
+ 59: %gs.base (gs.base), address 64 bits
+x87 registers:
+ 33: %st0 (st0), float 80 bits
+ 34: %st1 (st1), float 80 bits
+ 35: %st2 (st2), float 80 bits
+ 36: %st3 (st3), float 80 bits
+ 37: %st4 (st4), float 80 bits
+ 38: %st5 (st5), float 80 bits
+ 39: %st6 (st6), float 80 bits
+ 40: %st7 (st7), float 80 bits
+EOF
+
+regs_test testfile2 <<\EOF
+integer registers:
+ 0: r0 (r0), signed 32 bits
+ 1: r1 (r1), signed 32 bits
+ 2: r2 (r2), signed 32 bits
+ 3: r3 (r3), signed 32 bits
+ 4: r4 (r4), signed 32 bits
+ 5: r5 (r5), signed 32 bits
+ 6: r6 (r6), signed 32 bits
+ 7: r7 (r7), signed 32 bits
+ 8: r8 (r8), signed 32 bits
+ 9: r9 (r9), signed 32 bits
+ 10: r10 (r10), signed 32 bits
+ 11: r11 (r11), signed 32 bits
+ 12: r12 (r12), signed 32 bits
+ 13: r13 (r13), signed 32 bits
+ 14: r14 (r14), signed 32 bits
+ 15: r15 (r15), signed 32 bits
+ 16: r16 (r16), signed 32 bits
+ 17: r17 (r17), signed 32 bits
+ 18: r18 (r18), signed 32 bits
+ 19: r19 (r19), signed 32 bits
+ 20: r20 (r20), signed 32 bits
+ 21: r21 (r21), signed 32 bits
+ 22: r22 (r22), signed 32 bits
+ 23: r23 (r23), signed 32 bits
+ 24: r24 (r24), signed 32 bits
+ 25: r25 (r25), signed 32 bits
+ 26: r26 (r26), signed 32 bits
+ 27: r27 (r27), signed 32 bits
+ 28: r28 (r28), signed 32 bits
+ 29: r29 (r29), signed 32 bits
+ 30: r30 (r30), signed 32 bits
+ 31: r31 (r31), signed 32 bits
+ 64: cr (cr), unsigned 32 bits
+ 66: msr (msr), unsigned 32 bits
+FPU registers:
+ 32: f0 (f0), float 64 bits
+ 33: f1 (f1), float 64 bits
+ 34: f2 (f2), float 64 bits
+ 35: f3 (f3), float 64 bits
+ 36: f4 (f4), float 64 bits
+ 37: f5 (f5), float 64 bits
+ 38: f6 (f6), float 64 bits
+ 39: f7 (f7), float 64 bits
+ 40: f8 (f8), float 64 bits
+ 41: f9 (f9), float 64 bits
+ 42: f10 (f10), float 64 bits
+ 43: f11 (f11), float 64 bits
+ 44: f12 (f12), float 64 bits
+ 45: f13 (f13), float 64 bits
+ 46: f14 (f14), float 64 bits
+ 47: f15 (f15), float 64 bits
+ 48: f16 (f16), float 64 bits
+ 49: f17 (f17), float 64 bits
+ 50: f18 (f18), float 64 bits
+ 51: f19 (f19), float 64 bits
+ 52: f20 (f20), float 64 bits
+ 53: f21 (f21), float 64 bits
+ 54: f22 (f22), float 64 bits
+ 55: f23 (f23), float 64 bits
+ 56: f24 (f24), float 64 bits
+ 57: f25 (f25), float 64 bits
+ 58: f26 (f26), float 64 bits
+ 59: f27 (f27), float 64 bits
+ 60: f28 (f28), float 64 bits
+ 61: f29 (f29), float 64 bits
+ 62: f30 (f30), float 64 bits
+ 63: f31 (f31), float 64 bits
+ 65: fpscr (fpscr), unsigned 32 bits
+privileged registers:
+ 70: sr0 (sr0), unsigned 32 bits
+ 71: sr1 (sr1), unsigned 32 bits
+ 72: sr2 (sr2), unsigned 32 bits
+ 73: sr3 (sr3), unsigned 32 bits
+ 74: sr4 (sr4), unsigned 32 bits
+ 75: sr5 (sr5), unsigned 32 bits
+ 76: sr6 (sr6), unsigned 32 bits
+ 77: sr7 (sr7), unsigned 32 bits
+ 78: sr8 (sr8), unsigned 32 bits
+ 79: sr9 (sr9), unsigned 32 bits
+ 80: sr10 (sr10), unsigned 32 bits
+ 81: sr11 (sr11), unsigned 32 bits
+ 82: sr12 (sr12), unsigned 32 bits
+ 83: sr13 (sr13), unsigned 32 bits
+ 84: sr14 (sr14), unsigned 32 bits
+ 85: sr15 (sr15), unsigned 32 bits
+ 100: mq (mq), unsigned 32 bits
+ 101: xer (xer), unsigned 32 bits
+ 102: spr2 (spr2), unsigned 32 bits
+ 103: spr3 (spr3), unsigned 32 bits
+ 104: spr4 (spr4), unsigned 32 bits
+ 105: spr5 (spr5), unsigned 32 bits
+ 106: spr6 (spr6), unsigned 32 bits
+ 107: spr7 (spr7), unsigned 32 bits
+ 108: lr (lr), unsigned 32 bits
+ 109: ctr (ctr), unsigned 32 bits
+ 110: spr10 (spr10), unsigned 32 bits
+ 111: spr11 (spr11), unsigned 32 bits
+ 112: spr12 (spr12), unsigned 32 bits
+ 113: spr13 (spr13), unsigned 32 bits
+ 114: spr14 (spr14), unsigned 32 bits
+ 115: spr15 (spr15), unsigned 32 bits
+ 116: spr16 (spr16), unsigned 32 bits
+ 117: spr17 (spr17), unsigned 32 bits
+ 118: dsisr (dsisr), unsigned 32 bits
+ 119: dar (dar), unsigned 32 bits
+ 120: spr20 (spr20), unsigned 32 bits
+ 121: spr21 (spr21), unsigned 32 bits
+ 122: dec (dec), unsigned 32 bits
+ 123: spr23 (spr23), unsigned 32 bits
+ 124: spr24 (spr24), unsigned 32 bits
+ 125: spr25 (spr25), unsigned 32 bits
+ 126: spr26 (spr26), unsigned 32 bits
+ 127: spr27 (spr27), unsigned 32 bits
+ 128: spr28 (spr28), unsigned 32 bits
+ 129: spr29 (spr29), unsigned 32 bits
+ 130: spr30 (spr30), unsigned 32 bits
+ 131: spr31 (spr31), unsigned 32 bits
+ 132: spr32 (spr32), unsigned 32 bits
+ 133: spr33 (spr33), unsigned 32 bits
+ 134: spr34 (spr34), unsigned 32 bits
+ 135: spr35 (spr35), unsigned 32 bits
+ 136: spr36 (spr36), unsigned 32 bits
+ 137: spr37 (spr37), unsigned 32 bits
+ 138: spr38 (spr38), unsigned 32 bits
+ 139: spr39 (spr39), unsigned 32 bits
+ 140: spr40 (spr40), unsigned 32 bits
+ 141: spr41 (spr41), unsigned 32 bits
+ 142: spr42 (spr42), unsigned 32 bits
+ 143: spr43 (spr43), unsigned 32 bits
+ 144: spr44 (spr44), unsigned 32 bits
+ 145: spr45 (spr45), unsigned 32 bits
+ 146: spr46 (spr46), unsigned 32 bits
+ 147: spr47 (spr47), unsigned 32 bits
+ 148: spr48 (spr48), unsigned 32 bits
+ 149: spr49 (spr49), unsigned 32 bits
+ 150: spr50 (spr50), unsigned 32 bits
+ 151: spr51 (spr51), unsigned 32 bits
+ 152: spr52 (spr52), unsigned 32 bits
+ 153: spr53 (spr53), unsigned 32 bits
+ 154: spr54 (spr54), unsigned 32 bits
+ 155: spr55 (spr55), unsigned 32 bits
+ 156: spr56 (spr56), unsigned 32 bits
+ 157: spr57 (spr57), unsigned 32 bits
+ 158: spr58 (spr58), unsigned 32 bits
+ 159: spr59 (spr59), unsigned 32 bits
+ 160: spr60 (spr60), unsigned 32 bits
+ 161: spr61 (spr61), unsigned 32 bits
+ 162: spr62 (spr62), unsigned 32 bits
+ 163: spr63 (spr63), unsigned 32 bits
+ 164: spr64 (spr64), unsigned 32 bits
+ 165: spr65 (spr65), unsigned 32 bits
+ 166: spr66 (spr66), unsigned 32 bits
+ 167: spr67 (spr67), unsigned 32 bits
+ 168: spr68 (spr68), unsigned 32 bits
+ 169: spr69 (spr69), unsigned 32 bits
+ 170: spr70 (spr70), unsigned 32 bits
+ 171: spr71 (spr71), unsigned 32 bits
+ 172: spr72 (spr72), unsigned 32 bits
+ 173: spr73 (spr73), unsigned 32 bits
+ 174: spr74 (spr74), unsigned 32 bits
+ 175: spr75 (spr75), unsigned 32 bits
+ 176: spr76 (spr76), unsigned 32 bits
+ 177: spr77 (spr77), unsigned 32 bits
+ 178: spr78 (spr78), unsigned 32 bits
+ 179: spr79 (spr79), unsigned 32 bits
+ 180: spr80 (spr80), unsigned 32 bits
+ 181: spr81 (spr81), unsigned 32 bits
+ 182: spr82 (spr82), unsigned 32 bits
+ 183: spr83 (spr83), unsigned 32 bits
+ 184: spr84 (spr84), unsigned 32 bits
+ 185: spr85 (spr85), unsigned 32 bits
+ 186: spr86 (spr86), unsigned 32 bits
+ 187: spr87 (spr87), unsigned 32 bits
+ 188: spr88 (spr88), unsigned 32 bits
+ 189: spr89 (spr89), unsigned 32 bits
+ 190: spr90 (spr90), unsigned 32 bits
+ 191: spr91 (spr91), unsigned 32 bits
+ 192: spr92 (spr92), unsigned 32 bits
+ 193: spr93 (spr93), unsigned 32 bits
+ 194: spr94 (spr94), unsigned 32 bits
+ 195: spr95 (spr95), unsigned 32 bits
+ 196: spr96 (spr96), unsigned 32 bits
+ 197: spr97 (spr97), unsigned 32 bits
+ 198: spr98 (spr98), unsigned 32 bits
+ 199: spr99 (spr99), unsigned 32 bits
+ 200: spr100 (spr100), unsigned 32 bits
+ 201: spr101 (spr101), unsigned 32 bits
+ 202: spr102 (spr102), unsigned 32 bits
+ 203: spr103 (spr103), unsigned 32 bits
+ 204: spr104 (spr104), unsigned 32 bits
+ 205: spr105 (spr105), unsigned 32 bits
+ 206: spr106 (spr106), unsigned 32 bits
+ 207: spr107 (spr107), unsigned 32 bits
+ 208: spr108 (spr108), unsigned 32 bits
+ 209: spr109 (spr109), unsigned 32 bits
+ 210: spr110 (spr110), unsigned 32 bits
+ 211: spr111 (spr111), unsigned 32 bits
+ 212: spr112 (spr112), unsigned 32 bits
+ 213: spr113 (spr113), unsigned 32 bits
+ 214: spr114 (spr114), unsigned 32 bits
+ 215: spr115 (spr115), unsigned 32 bits
+ 216: spr116 (spr116), unsigned 32 bits
+ 217: spr117 (spr117), unsigned 32 bits
+ 218: spr118 (spr118), unsigned 32 bits
+ 219: spr119 (spr119), unsigned 32 bits
+ 220: spr120 (spr120), unsigned 32 bits
+ 221: spr121 (spr121), unsigned 32 bits
+ 222: spr122 (spr122), unsigned 32 bits
+ 223: spr123 (spr123), unsigned 32 bits
+ 224: spr124 (spr124), unsigned 32 bits
+ 225: spr125 (spr125), unsigned 32 bits
+ 226: spr126 (spr126), unsigned 32 bits
+ 227: spr127 (spr127), unsigned 32 bits
+ 228: spr128 (spr128), unsigned 32 bits
+ 229: spr129 (spr129), unsigned 32 bits
+ 230: spr130 (spr130), unsigned 32 bits
+ 231: spr131 (spr131), unsigned 32 bits
+ 232: spr132 (spr132), unsigned 32 bits
+ 233: spr133 (spr133), unsigned 32 bits
+ 234: spr134 (spr134), unsigned 32 bits
+ 235: spr135 (spr135), unsigned 32 bits
+ 236: spr136 (spr136), unsigned 32 bits
+ 237: spr137 (spr137), unsigned 32 bits
+ 238: spr138 (spr138), unsigned 32 bits
+ 239: spr139 (spr139), unsigned 32 bits
+ 240: spr140 (spr140), unsigned 32 bits
+ 241: spr141 (spr141), unsigned 32 bits
+ 242: spr142 (spr142), unsigned 32 bits
+ 243: spr143 (spr143), unsigned 32 bits
+ 244: spr144 (spr144), unsigned 32 bits
+ 245: spr145 (spr145), unsigned 32 bits
+ 246: spr146 (spr146), unsigned 32 bits
+ 247: spr147 (spr147), unsigned 32 bits
+ 248: spr148 (spr148), unsigned 32 bits
+ 249: spr149 (spr149), unsigned 32 bits
+ 250: spr150 (spr150), unsigned 32 bits
+ 251: spr151 (spr151), unsigned 32 bits
+ 252: spr152 (spr152), unsigned 32 bits
+ 253: spr153 (spr153), unsigned 32 bits
+ 254: spr154 (spr154), unsigned 32 bits
+ 255: spr155 (spr155), unsigned 32 bits
+ 256: spr156 (spr156), unsigned 32 bits
+ 257: spr157 (spr157), unsigned 32 bits
+ 258: spr158 (spr158), unsigned 32 bits
+ 259: spr159 (spr159), unsigned 32 bits
+ 260: spr160 (spr160), unsigned 32 bits
+ 261: spr161 (spr161), unsigned 32 bits
+ 262: spr162 (spr162), unsigned 32 bits
+ 263: spr163 (spr163), unsigned 32 bits
+ 264: spr164 (spr164), unsigned 32 bits
+ 265: spr165 (spr165), unsigned 32 bits
+ 266: spr166 (spr166), unsigned 32 bits
+ 267: spr167 (spr167), unsigned 32 bits
+ 268: spr168 (spr168), unsigned 32 bits
+ 269: spr169 (spr169), unsigned 32 bits
+ 270: spr170 (spr170), unsigned 32 bits
+ 271: spr171 (spr171), unsigned 32 bits
+ 272: spr172 (spr172), unsigned 32 bits
+ 273: spr173 (spr173), unsigned 32 bits
+ 274: spr174 (spr174), unsigned 32 bits
+ 275: spr175 (spr175), unsigned 32 bits
+ 276: spr176 (spr176), unsigned 32 bits
+ 277: spr177 (spr177), unsigned 32 bits
+ 278: spr178 (spr178), unsigned 32 bits
+ 279: spr179 (spr179), unsigned 32 bits
+ 280: spr180 (spr180), unsigned 32 bits
+ 281: spr181 (spr181), unsigned 32 bits
+ 282: spr182 (spr182), unsigned 32 bits
+ 283: spr183 (spr183), unsigned 32 bits
+ 284: spr184 (spr184), unsigned 32 bits
+ 285: spr185 (spr185), unsigned 32 bits
+ 286: spr186 (spr186), unsigned 32 bits
+ 287: spr187 (spr187), unsigned 32 bits
+ 288: spr188 (spr188), unsigned 32 bits
+ 289: spr189 (spr189), unsigned 32 bits
+ 290: spr190 (spr190), unsigned 32 bits
+ 291: spr191 (spr191), unsigned 32 bits
+ 292: spr192 (spr192), unsigned 32 bits
+ 293: spr193 (spr193), unsigned 32 bits
+ 294: spr194 (spr194), unsigned 32 bits
+ 295: spr195 (spr195), unsigned 32 bits
+ 296: spr196 (spr196), unsigned 32 bits
+ 297: spr197 (spr197), unsigned 32 bits
+ 298: spr198 (spr198), unsigned 32 bits
+ 299: spr199 (spr199), unsigned 32 bits
+ 300: spr200 (spr200), unsigned 32 bits
+ 301: spr201 (spr201), unsigned 32 bits
+ 302: spr202 (spr202), unsigned 32 bits
+ 303: spr203 (spr203), unsigned 32 bits
+ 304: spr204 (spr204), unsigned 32 bits
+ 305: spr205 (spr205), unsigned 32 bits
+ 306: spr206 (spr206), unsigned 32 bits
+ 307: spr207 (spr207), unsigned 32 bits
+ 308: spr208 (spr208), unsigned 32 bits
+ 309: spr209 (spr209), unsigned 32 bits
+ 310: spr210 (spr210), unsigned 32 bits
+ 311: spr211 (spr211), unsigned 32 bits
+ 312: spr212 (spr212), unsigned 32 bits
+ 313: spr213 (spr213), unsigned 32 bits
+ 314: spr214 (spr214), unsigned 32 bits
+ 315: spr215 (spr215), unsigned 32 bits
+ 316: spr216 (spr216), unsigned 32 bits
+ 317: spr217 (spr217), unsigned 32 bits
+ 318: spr218 (spr218), unsigned 32 bits
+ 319: spr219 (spr219), unsigned 32 bits
+ 320: spr220 (spr220), unsigned 32 bits
+ 321: spr221 (spr221), unsigned 32 bits
+ 322: spr222 (spr222), unsigned 32 bits
+ 323: spr223 (spr223), unsigned 32 bits
+ 324: spr224 (spr224), unsigned 32 bits
+ 325: spr225 (spr225), unsigned 32 bits
+ 326: spr226 (spr226), unsigned 32 bits
+ 327: spr227 (spr227), unsigned 32 bits
+ 328: spr228 (spr228), unsigned 32 bits
+ 329: spr229 (spr229), unsigned 32 bits
+ 330: spr230 (spr230), unsigned 32 bits
+ 331: spr231 (spr231), unsigned 32 bits
+ 332: spr232 (spr232), unsigned 32 bits
+ 333: spr233 (spr233), unsigned 32 bits
+ 334: spr234 (spr234), unsigned 32 bits
+ 335: spr235 (spr235), unsigned 32 bits
+ 336: spr236 (spr236), unsigned 32 bits
+ 337: spr237 (spr237), unsigned 32 bits
+ 338: spr238 (spr238), unsigned 32 bits
+ 339: spr239 (spr239), unsigned 32 bits
+ 340: spr240 (spr240), unsigned 32 bits
+ 341: spr241 (spr241), unsigned 32 bits
+ 342: spr242 (spr242), unsigned 32 bits
+ 343: spr243 (spr243), unsigned 32 bits
+ 344: spr244 (spr244), unsigned 32 bits
+ 345: spr245 (spr245), unsigned 32 bits
+ 346: spr246 (spr246), unsigned 32 bits
+ 347: spr247 (spr247), unsigned 32 bits
+ 348: spr248 (spr248), unsigned 32 bits
+ 349: spr249 (spr249), unsigned 32 bits
+ 350: spr250 (spr250), unsigned 32 bits
+ 351: spr251 (spr251), unsigned 32 bits
+ 352: spr252 (spr252), unsigned 32 bits
+ 353: spr253 (spr253), unsigned 32 bits
+ 354: spr254 (spr254), unsigned 32 bits
+ 355: spr255 (spr255), unsigned 32 bits
+ 357: spr257 (spr257), unsigned 32 bits
+ 358: spr258 (spr258), unsigned 32 bits
+ 359: spr259 (spr259), unsigned 32 bits
+ 360: spr260 (spr260), unsigned 32 bits
+ 361: spr261 (spr261), unsigned 32 bits
+ 362: spr262 (spr262), unsigned 32 bits
+ 363: spr263 (spr263), unsigned 32 bits
+ 364: spr264 (spr264), unsigned 32 bits
+ 365: spr265 (spr265), unsigned 32 bits
+ 366: spr266 (spr266), unsigned 32 bits
+ 367: spr267 (spr267), unsigned 32 bits
+ 368: spr268 (spr268), unsigned 32 bits
+ 369: spr269 (spr269), unsigned 32 bits
+ 370: spr270 (spr270), unsigned 32 bits
+ 371: spr271 (spr271), unsigned 32 bits
+ 372: spr272 (spr272), unsigned 32 bits
+ 373: spr273 (spr273), unsigned 32 bits
+ 374: spr274 (spr274), unsigned 32 bits
+ 375: spr275 (spr275), unsigned 32 bits
+ 376: spr276 (spr276), unsigned 32 bits
+ 377: spr277 (spr277), unsigned 32 bits
+ 378: spr278 (spr278), unsigned 32 bits
+ 379: spr279 (spr279), unsigned 32 bits
+ 380: spr280 (spr280), unsigned 32 bits
+ 381: spr281 (spr281), unsigned 32 bits
+ 382: spr282 (spr282), unsigned 32 bits
+ 383: spr283 (spr283), unsigned 32 bits
+ 384: spr284 (spr284), unsigned 32 bits
+ 385: spr285 (spr285), unsigned 32 bits
+ 386: spr286 (spr286), unsigned 32 bits
+ 387: spr287 (spr287), unsigned 32 bits
+ 388: spr288 (spr288), unsigned 32 bits
+ 389: spr289 (spr289), unsigned 32 bits
+ 390: spr290 (spr290), unsigned 32 bits
+ 391: spr291 (spr291), unsigned 32 bits
+ 392: spr292 (spr292), unsigned 32 bits
+ 393: spr293 (spr293), unsigned 32 bits
+ 394: spr294 (spr294), unsigned 32 bits
+ 395: spr295 (spr295), unsigned 32 bits
+ 396: spr296 (spr296), unsigned 32 bits
+ 397: spr297 (spr297), unsigned 32 bits
+ 398: spr298 (spr298), unsigned 32 bits
+ 399: spr299 (spr299), unsigned 32 bits
+ 400: spr300 (spr300), unsigned 32 bits
+ 401: spr301 (spr301), unsigned 32 bits
+ 402: spr302 (spr302), unsigned 32 bits
+ 403: spr303 (spr303), unsigned 32 bits
+ 404: spr304 (spr304), unsigned 32 bits
+ 405: spr305 (spr305), unsigned 32 bits
+ 406: spr306 (spr306), unsigned 32 bits
+ 407: spr307 (spr307), unsigned 32 bits
+ 408: spr308 (spr308), unsigned 32 bits
+ 409: spr309 (spr309), unsigned 32 bits
+ 410: spr310 (spr310), unsigned 32 bits
+ 411: spr311 (spr311), unsigned 32 bits
+ 412: spr312 (spr312), unsigned 32 bits
+ 413: spr313 (spr313), unsigned 32 bits
+ 414: spr314 (spr314), unsigned 32 bits
+ 415: spr315 (spr315), unsigned 32 bits
+ 416: spr316 (spr316), unsigned 32 bits
+ 417: spr317 (spr317), unsigned 32 bits
+ 418: spr318 (spr318), unsigned 32 bits
+ 419: spr319 (spr319), unsigned 32 bits
+ 420: spr320 (spr320), unsigned 32 bits
+ 421: spr321 (spr321), unsigned 32 bits
+ 422: spr322 (spr322), unsigned 32 bits
+ 423: spr323 (spr323), unsigned 32 bits
+ 424: spr324 (spr324), unsigned 32 bits
+ 425: spr325 (spr325), unsigned 32 bits
+ 426: spr326 (spr326), unsigned 32 bits
+ 427: spr327 (spr327), unsigned 32 bits
+ 428: spr328 (spr328), unsigned 32 bits
+ 429: spr329 (spr329), unsigned 32 bits
+ 430: spr330 (spr330), unsigned 32 bits
+ 431: spr331 (spr331), unsigned 32 bits
+ 432: spr332 (spr332), unsigned 32 bits
+ 433: spr333 (spr333), unsigned 32 bits
+ 434: spr334 (spr334), unsigned 32 bits
+ 435: spr335 (spr335), unsigned 32 bits
+ 436: spr336 (spr336), unsigned 32 bits
+ 437: spr337 (spr337), unsigned 32 bits
+ 438: spr338 (spr338), unsigned 32 bits
+ 439: spr339 (spr339), unsigned 32 bits
+ 440: spr340 (spr340), unsigned 32 bits
+ 441: spr341 (spr341), unsigned 32 bits
+ 442: spr342 (spr342), unsigned 32 bits
+ 443: spr343 (spr343), unsigned 32 bits
+ 444: spr344 (spr344), unsigned 32 bits
+ 445: spr345 (spr345), unsigned 32 bits
+ 446: spr346 (spr346), unsigned 32 bits
+ 447: spr347 (spr347), unsigned 32 bits
+ 448: spr348 (spr348), unsigned 32 bits
+ 449: spr349 (spr349), unsigned 32 bits
+ 450: spr350 (spr350), unsigned 32 bits
+ 451: spr351 (spr351), unsigned 32 bits
+ 452: spr352 (spr352), unsigned 32 bits
+ 453: spr353 (spr353), unsigned 32 bits
+ 454: spr354 (spr354), unsigned 32 bits
+ 455: spr355 (spr355), unsigned 32 bits
+ 456: spr356 (spr356), unsigned 32 bits
+ 457: spr357 (spr357), unsigned 32 bits
+ 458: spr358 (spr358), unsigned 32 bits
+ 459: spr359 (spr359), unsigned 32 bits
+ 460: spr360 (spr360), unsigned 32 bits
+ 461: spr361 (spr361), unsigned 32 bits
+ 462: spr362 (spr362), unsigned 32 bits
+ 463: spr363 (spr363), unsigned 32 bits
+ 464: spr364 (spr364), unsigned 32 bits
+ 465: spr365 (spr365), unsigned 32 bits
+ 466: spr366 (spr366), unsigned 32 bits
+ 467: spr367 (spr367), unsigned 32 bits
+ 468: spr368 (spr368), unsigned 32 bits
+ 469: spr369 (spr369), unsigned 32 bits
+ 470: spr370 (spr370), unsigned 32 bits
+ 471: spr371 (spr371), unsigned 32 bits
+ 472: spr372 (spr372), unsigned 32 bits
+ 473: spr373 (spr373), unsigned 32 bits
+ 474: spr374 (spr374), unsigned 32 bits
+ 475: spr375 (spr375), unsigned 32 bits
+ 476: spr376 (spr376), unsigned 32 bits
+ 477: spr377 (spr377), unsigned 32 bits
+ 478: spr378 (spr378), unsigned 32 bits
+ 479: spr379 (spr379), unsigned 32 bits
+ 480: spr380 (spr380), unsigned 32 bits
+ 481: spr381 (spr381), unsigned 32 bits
+ 482: spr382 (spr382), unsigned 32 bits
+ 483: spr383 (spr383), unsigned 32 bits
+ 484: spr384 (spr384), unsigned 32 bits
+ 485: spr385 (spr385), unsigned 32 bits
+ 486: spr386 (spr386), unsigned 32 bits
+ 487: spr387 (spr387), unsigned 32 bits
+ 488: spr388 (spr388), unsigned 32 bits
+ 489: spr389 (spr389), unsigned 32 bits
+ 490: spr390 (spr390), unsigned 32 bits
+ 491: spr391 (spr391), unsigned 32 bits
+ 492: spr392 (spr392), unsigned 32 bits
+ 493: spr393 (spr393), unsigned 32 bits
+ 494: spr394 (spr394), unsigned 32 bits
+ 495: spr395 (spr395), unsigned 32 bits
+ 496: spr396 (spr396), unsigned 32 bits
+ 497: spr397 (spr397), unsigned 32 bits
+ 498: spr398 (spr398), unsigned 32 bits
+ 499: spr399 (spr399), unsigned 32 bits
+ 500: spr400 (spr400), unsigned 32 bits
+ 501: spr401 (spr401), unsigned 32 bits
+ 502: spr402 (spr402), unsigned 32 bits
+ 503: spr403 (spr403), unsigned 32 bits
+ 504: spr404 (spr404), unsigned 32 bits
+ 505: spr405 (spr405), unsigned 32 bits
+ 506: spr406 (spr406), unsigned 32 bits
+ 507: spr407 (spr407), unsigned 32 bits
+ 508: spr408 (spr408), unsigned 32 bits
+ 509: spr409 (spr409), unsigned 32 bits
+ 510: spr410 (spr410), unsigned 32 bits
+ 511: spr411 (spr411), unsigned 32 bits
+ 512: spr412 (spr412), unsigned 32 bits
+ 513: spr413 (spr413), unsigned 32 bits
+ 514: spr414 (spr414), unsigned 32 bits
+ 515: spr415 (spr415), unsigned 32 bits
+ 516: spr416 (spr416), unsigned 32 bits
+ 517: spr417 (spr417), unsigned 32 bits
+ 518: spr418 (spr418), unsigned 32 bits
+ 519: spr419 (spr419), unsigned 32 bits
+ 520: spr420 (spr420), unsigned 32 bits
+ 521: spr421 (spr421), unsigned 32 bits
+ 522: spr422 (spr422), unsigned 32 bits
+ 523: spr423 (spr423), unsigned 32 bits
+ 524: spr424 (spr424), unsigned 32 bits
+ 525: spr425 (spr425), unsigned 32 bits
+ 526: spr426 (spr426), unsigned 32 bits
+ 527: spr427 (spr427), unsigned 32 bits
+ 528: spr428 (spr428), unsigned 32 bits
+ 529: spr429 (spr429), unsigned 32 bits
+ 530: spr430 (spr430), unsigned 32 bits
+ 531: spr431 (spr431), unsigned 32 bits
+ 532: spr432 (spr432), unsigned 32 bits
+ 533: spr433 (spr433), unsigned 32 bits
+ 534: spr434 (spr434), unsigned 32 bits
+ 535: spr435 (spr435), unsigned 32 bits
+ 536: spr436 (spr436), unsigned 32 bits
+ 537: spr437 (spr437), unsigned 32 bits
+ 538: spr438 (spr438), unsigned 32 bits
+ 539: spr439 (spr439), unsigned 32 bits
+ 540: spr440 (spr440), unsigned 32 bits
+ 541: spr441 (spr441), unsigned 32 bits
+ 542: spr442 (spr442), unsigned 32 bits
+ 543: spr443 (spr443), unsigned 32 bits
+ 544: spr444 (spr444), unsigned 32 bits
+ 545: spr445 (spr445), unsigned 32 bits
+ 546: spr446 (spr446), unsigned 32 bits
+ 547: spr447 (spr447), unsigned 32 bits
+ 548: spr448 (spr448), unsigned 32 bits
+ 549: spr449 (spr449), unsigned 32 bits
+ 550: spr450 (spr450), unsigned 32 bits
+ 551: spr451 (spr451), unsigned 32 bits
+ 552: spr452 (spr452), unsigned 32 bits
+ 553: spr453 (spr453), unsigned 32 bits
+ 554: spr454 (spr454), unsigned 32 bits
+ 555: spr455 (spr455), unsigned 32 bits
+ 556: spr456 (spr456), unsigned 32 bits
+ 557: spr457 (spr457), unsigned 32 bits
+ 558: spr458 (spr458), unsigned 32 bits
+ 559: spr459 (spr459), unsigned 32 bits
+ 560: spr460 (spr460), unsigned 32 bits
+ 561: spr461 (spr461), unsigned 32 bits
+ 562: spr462 (spr462), unsigned 32 bits
+ 563: spr463 (spr463), unsigned 32 bits
+ 564: spr464 (spr464), unsigned 32 bits
+ 565: spr465 (spr465), unsigned 32 bits
+ 566: spr466 (spr466), unsigned 32 bits
+ 567: spr467 (spr467), unsigned 32 bits
+ 568: spr468 (spr468), unsigned 32 bits
+ 569: spr469 (spr469), unsigned 32 bits
+ 570: spr470 (spr470), unsigned 32 bits
+ 571: spr471 (spr471), unsigned 32 bits
+ 572: spr472 (spr472), unsigned 32 bits
+ 573: spr473 (spr473), unsigned 32 bits
+ 574: spr474 (spr474), unsigned 32 bits
+ 575: spr475 (spr475), unsigned 32 bits
+ 576: spr476 (spr476), unsigned 32 bits
+ 577: spr477 (spr477), unsigned 32 bits
+ 578: spr478 (spr478), unsigned 32 bits
+ 579: spr479 (spr479), unsigned 32 bits
+ 580: spr480 (spr480), unsigned 32 bits
+ 581: spr481 (spr481), unsigned 32 bits
+ 582: spr482 (spr482), unsigned 32 bits
+ 583: spr483 (spr483), unsigned 32 bits
+ 584: spr484 (spr484), unsigned 32 bits
+ 585: spr485 (spr485), unsigned 32 bits
+ 586: spr486 (spr486), unsigned 32 bits
+ 587: spr487 (spr487), unsigned 32 bits
+ 588: spr488 (spr488), unsigned 32 bits
+ 589: spr489 (spr489), unsigned 32 bits
+ 590: spr490 (spr490), unsigned 32 bits
+ 591: spr491 (spr491), unsigned 32 bits
+ 592: spr492 (spr492), unsigned 32 bits
+ 593: spr493 (spr493), unsigned 32 bits
+ 594: spr494 (spr494), unsigned 32 bits
+ 595: spr495 (spr495), unsigned 32 bits
+ 596: spr496 (spr496), unsigned 32 bits
+ 597: spr497 (spr497), unsigned 32 bits
+ 598: spr498 (spr498), unsigned 32 bits
+ 599: spr499 (spr499), unsigned 32 bits
+ 600: spr500 (spr500), unsigned 32 bits
+ 601: spr501 (spr501), unsigned 32 bits
+ 602: spr502 (spr502), unsigned 32 bits
+ 603: spr503 (spr503), unsigned 32 bits
+ 604: spr504 (spr504), unsigned 32 bits
+ 605: spr505 (spr505), unsigned 32 bits
+ 606: spr506 (spr506), unsigned 32 bits
+ 607: spr507 (spr507), unsigned 32 bits
+ 608: spr508 (spr508), unsigned 32 bits
+ 609: spr509 (spr509), unsigned 32 bits
+ 610: spr510 (spr510), unsigned 32 bits
+ 611: spr511 (spr511), unsigned 32 bits
+ 613: spr513 (spr513), unsigned 32 bits
+ 614: spr514 (spr514), unsigned 32 bits
+ 615: spr515 (spr515), unsigned 32 bits
+ 616: spr516 (spr516), unsigned 32 bits
+ 617: spr517 (spr517), unsigned 32 bits
+ 618: spr518 (spr518), unsigned 32 bits
+ 619: spr519 (spr519), unsigned 32 bits
+ 620: spr520 (spr520), unsigned 32 bits
+ 621: spr521 (spr521), unsigned 32 bits
+ 622: spr522 (spr522), unsigned 32 bits
+ 623: spr523 (spr523), unsigned 32 bits
+ 624: spr524 (spr524), unsigned 32 bits
+ 625: spr525 (spr525), unsigned 32 bits
+ 626: spr526 (spr526), unsigned 32 bits
+ 627: spr527 (spr527), unsigned 32 bits
+ 628: spr528 (spr528), unsigned 32 bits
+ 629: spr529 (spr529), unsigned 32 bits
+ 630: spr530 (spr530), unsigned 32 bits
+ 631: spr531 (spr531), unsigned 32 bits
+ 632: spr532 (spr532), unsigned 32 bits
+ 633: spr533 (spr533), unsigned 32 bits
+ 634: spr534 (spr534), unsigned 32 bits
+ 635: spr535 (spr535), unsigned 32 bits
+ 636: spr536 (spr536), unsigned 32 bits
+ 637: spr537 (spr537), unsigned 32 bits
+ 638: spr538 (spr538), unsigned 32 bits
+ 639: spr539 (spr539), unsigned 32 bits
+ 640: spr540 (spr540), unsigned 32 bits
+ 641: spr541 (spr541), unsigned 32 bits
+ 642: spr542 (spr542), unsigned 32 bits
+ 643: spr543 (spr543), unsigned 32 bits
+ 644: spr544 (spr544), unsigned 32 bits
+ 645: spr545 (spr545), unsigned 32 bits
+ 646: spr546 (spr546), unsigned 32 bits
+ 647: spr547 (spr547), unsigned 32 bits
+ 648: spr548 (spr548), unsigned 32 bits
+ 649: spr549 (spr549), unsigned 32 bits
+ 650: spr550 (spr550), unsigned 32 bits
+ 651: spr551 (spr551), unsigned 32 bits
+ 652: spr552 (spr552), unsigned 32 bits
+ 653: spr553 (spr553), unsigned 32 bits
+ 654: spr554 (spr554), unsigned 32 bits
+ 655: spr555 (spr555), unsigned 32 bits
+ 656: spr556 (spr556), unsigned 32 bits
+ 657: spr557 (spr557), unsigned 32 bits
+ 658: spr558 (spr558), unsigned 32 bits
+ 659: spr559 (spr559), unsigned 32 bits
+ 660: spr560 (spr560), unsigned 32 bits
+ 661: spr561 (spr561), unsigned 32 bits
+ 662: spr562 (spr562), unsigned 32 bits
+ 663: spr563 (spr563), unsigned 32 bits
+ 664: spr564 (spr564), unsigned 32 bits
+ 665: spr565 (spr565), unsigned 32 bits
+ 666: spr566 (spr566), unsigned 32 bits
+ 667: spr567 (spr567), unsigned 32 bits
+ 668: spr568 (spr568), unsigned 32 bits
+ 669: spr569 (spr569), unsigned 32 bits
+ 670: spr570 (spr570), unsigned 32 bits
+ 671: spr571 (spr571), unsigned 32 bits
+ 672: spr572 (spr572), unsigned 32 bits
+ 673: spr573 (spr573), unsigned 32 bits
+ 674: spr574 (spr574), unsigned 32 bits
+ 675: spr575 (spr575), unsigned 32 bits
+ 676: spr576 (spr576), unsigned 32 bits
+ 677: spr577 (spr577), unsigned 32 bits
+ 678: spr578 (spr578), unsigned 32 bits
+ 679: spr579 (spr579), unsigned 32 bits
+ 680: spr580 (spr580), unsigned 32 bits
+ 681: spr581 (spr581), unsigned 32 bits
+ 682: spr582 (spr582), unsigned 32 bits
+ 683: spr583 (spr583), unsigned 32 bits
+ 684: spr584 (spr584), unsigned 32 bits
+ 685: spr585 (spr585), unsigned 32 bits
+ 686: spr586 (spr586), unsigned 32 bits
+ 687: spr587 (spr587), unsigned 32 bits
+ 688: spr588 (spr588), unsigned 32 bits
+ 689: spr589 (spr589), unsigned 32 bits
+ 690: spr590 (spr590), unsigned 32 bits
+ 691: spr591 (spr591), unsigned 32 bits
+ 692: spr592 (spr592), unsigned 32 bits
+ 693: spr593 (spr593), unsigned 32 bits
+ 694: spr594 (spr594), unsigned 32 bits
+ 695: spr595 (spr595), unsigned 32 bits
+ 696: spr596 (spr596), unsigned 32 bits
+ 697: spr597 (spr597), unsigned 32 bits
+ 698: spr598 (spr598), unsigned 32 bits
+ 699: spr599 (spr599), unsigned 32 bits
+ 700: spr600 (spr600), unsigned 32 bits
+ 701: spr601 (spr601), unsigned 32 bits
+ 702: spr602 (spr602), unsigned 32 bits
+ 703: spr603 (spr603), unsigned 32 bits
+ 704: spr604 (spr604), unsigned 32 bits
+ 705: spr605 (spr605), unsigned 32 bits
+ 706: spr606 (spr606), unsigned 32 bits
+ 707: spr607 (spr607), unsigned 32 bits
+ 708: spr608 (spr608), unsigned 32 bits
+ 709: spr609 (spr609), unsigned 32 bits
+ 710: spr610 (spr610), unsigned 32 bits
+ 711: spr611 (spr611), unsigned 32 bits
+ 712: spr612 (spr612), unsigned 32 bits
+ 713: spr613 (spr613), unsigned 32 bits
+ 714: spr614 (spr614), unsigned 32 bits
+ 715: spr615 (spr615), unsigned 32 bits
+ 716: spr616 (spr616), unsigned 32 bits
+ 717: spr617 (spr617), unsigned 32 bits
+ 718: spr618 (spr618), unsigned 32 bits
+ 719: spr619 (spr619), unsigned 32 bits
+ 720: spr620 (spr620), unsigned 32 bits
+ 721: spr621 (spr621), unsigned 32 bits
+ 722: spr622 (spr622), unsigned 32 bits
+ 723: spr623 (spr623), unsigned 32 bits
+ 724: spr624 (spr624), unsigned 32 bits
+ 725: spr625 (spr625), unsigned 32 bits
+ 726: spr626 (spr626), unsigned 32 bits
+ 727: spr627 (spr627), unsigned 32 bits
+ 728: spr628 (spr628), unsigned 32 bits
+ 729: spr629 (spr629), unsigned 32 bits
+ 730: spr630 (spr630), unsigned 32 bits
+ 731: spr631 (spr631), unsigned 32 bits
+ 732: spr632 (spr632), unsigned 32 bits
+ 733: spr633 (spr633), unsigned 32 bits
+ 734: spr634 (spr634), unsigned 32 bits
+ 735: spr635 (spr635), unsigned 32 bits
+ 736: spr636 (spr636), unsigned 32 bits
+ 737: spr637 (spr637), unsigned 32 bits
+ 738: spr638 (spr638), unsigned 32 bits
+ 739: spr639 (spr639), unsigned 32 bits
+ 740: spr640 (spr640), unsigned 32 bits
+ 741: spr641 (spr641), unsigned 32 bits
+ 742: spr642 (spr642), unsigned 32 bits
+ 743: spr643 (spr643), unsigned 32 bits
+ 744: spr644 (spr644), unsigned 32 bits
+ 745: spr645 (spr645), unsigned 32 bits
+ 746: spr646 (spr646), unsigned 32 bits
+ 747: spr647 (spr647), unsigned 32 bits
+ 748: spr648 (spr648), unsigned 32 bits
+ 749: spr649 (spr649), unsigned 32 bits
+ 750: spr650 (spr650), unsigned 32 bits
+ 751: spr651 (spr651), unsigned 32 bits
+ 752: spr652 (spr652), unsigned 32 bits
+ 753: spr653 (spr653), unsigned 32 bits
+ 754: spr654 (spr654), unsigned 32 bits
+ 755: spr655 (spr655), unsigned 32 bits
+ 756: spr656 (spr656), unsigned 32 bits
+ 757: spr657 (spr657), unsigned 32 bits
+ 758: spr658 (spr658), unsigned 32 bits
+ 759: spr659 (spr659), unsigned 32 bits
+ 760: spr660 (spr660), unsigned 32 bits
+ 761: spr661 (spr661), unsigned 32 bits
+ 762: spr662 (spr662), unsigned 32 bits
+ 763: spr663 (spr663), unsigned 32 bits
+ 764: spr664 (spr664), unsigned 32 bits
+ 765: spr665 (spr665), unsigned 32 bits
+ 766: spr666 (spr666), unsigned 32 bits
+ 767: spr667 (spr667), unsigned 32 bits
+ 768: spr668 (spr668), unsigned 32 bits
+ 769: spr669 (spr669), unsigned 32 bits
+ 770: spr670 (spr670), unsigned 32 bits
+ 771: spr671 (spr671), unsigned 32 bits
+ 772: spr672 (spr672), unsigned 32 bits
+ 773: spr673 (spr673), unsigned 32 bits
+ 774: spr674 (spr674), unsigned 32 bits
+ 775: spr675 (spr675), unsigned 32 bits
+ 776: spr676 (spr676), unsigned 32 bits
+ 777: spr677 (spr677), unsigned 32 bits
+ 778: spr678 (spr678), unsigned 32 bits
+ 779: spr679 (spr679), unsigned 32 bits
+ 780: spr680 (spr680), unsigned 32 bits
+ 781: spr681 (spr681), unsigned 32 bits
+ 782: spr682 (spr682), unsigned 32 bits
+ 783: spr683 (spr683), unsigned 32 bits
+ 784: spr684 (spr684), unsigned 32 bits
+ 785: spr685 (spr685), unsigned 32 bits
+ 786: spr686 (spr686), unsigned 32 bits
+ 787: spr687 (spr687), unsigned 32 bits
+ 788: spr688 (spr688), unsigned 32 bits
+ 789: spr689 (spr689), unsigned 32 bits
+ 790: spr690 (spr690), unsigned 32 bits
+ 791: spr691 (spr691), unsigned 32 bits
+ 792: spr692 (spr692), unsigned 32 bits
+ 793: spr693 (spr693), unsigned 32 bits
+ 794: spr694 (spr694), unsigned 32 bits
+ 795: spr695 (spr695), unsigned 32 bits
+ 796: spr696 (spr696), unsigned 32 bits
+ 797: spr697 (spr697), unsigned 32 bits
+ 798: spr698 (spr698), unsigned 32 bits
+ 799: spr699 (spr699), unsigned 32 bits
+ 800: spr700 (spr700), unsigned 32 bits
+ 801: spr701 (spr701), unsigned 32 bits
+ 802: spr702 (spr702), unsigned 32 bits
+ 803: spr703 (spr703), unsigned 32 bits
+ 804: spr704 (spr704), unsigned 32 bits
+ 805: spr705 (spr705), unsigned 32 bits
+ 806: spr706 (spr706), unsigned 32 bits
+ 807: spr707 (spr707), unsigned 32 bits
+ 808: spr708 (spr708), unsigned 32 bits
+ 809: spr709 (spr709), unsigned 32 bits
+ 810: spr710 (spr710), unsigned 32 bits
+ 811: spr711 (spr711), unsigned 32 bits
+ 812: spr712 (spr712), unsigned 32 bits
+ 813: spr713 (spr713), unsigned 32 bits
+ 814: spr714 (spr714), unsigned 32 bits
+ 815: spr715 (spr715), unsigned 32 bits
+ 816: spr716 (spr716), unsigned 32 bits
+ 817: spr717 (spr717), unsigned 32 bits
+ 818: spr718 (spr718), unsigned 32 bits
+ 819: spr719 (spr719), unsigned 32 bits
+ 820: spr720 (spr720), unsigned 32 bits
+ 821: spr721 (spr721), unsigned 32 bits
+ 822: spr722 (spr722), unsigned 32 bits
+ 823: spr723 (spr723), unsigned 32 bits
+ 824: spr724 (spr724), unsigned 32 bits
+ 825: spr725 (spr725), unsigned 32 bits
+ 826: spr726 (spr726), unsigned 32 bits
+ 827: spr727 (spr727), unsigned 32 bits
+ 828: spr728 (spr728), unsigned 32 bits
+ 829: spr729 (spr729), unsigned 32 bits
+ 830: spr730 (spr730), unsigned 32 bits
+ 831: spr731 (spr731), unsigned 32 bits
+ 832: spr732 (spr732), unsigned 32 bits
+ 833: spr733 (spr733), unsigned 32 bits
+ 834: spr734 (spr734), unsigned 32 bits
+ 835: spr735 (spr735), unsigned 32 bits
+ 836: spr736 (spr736), unsigned 32 bits
+ 837: spr737 (spr737), unsigned 32 bits
+ 838: spr738 (spr738), unsigned 32 bits
+ 839: spr739 (spr739), unsigned 32 bits
+ 840: spr740 (spr740), unsigned 32 bits
+ 841: spr741 (spr741), unsigned 32 bits
+ 842: spr742 (spr742), unsigned 32 bits
+ 843: spr743 (spr743), unsigned 32 bits
+ 844: spr744 (spr744), unsigned 32 bits
+ 845: spr745 (spr745), unsigned 32 bits
+ 846: spr746 (spr746), unsigned 32 bits
+ 847: spr747 (spr747), unsigned 32 bits
+ 848: spr748 (spr748), unsigned 32 bits
+ 849: spr749 (spr749), unsigned 32 bits
+ 850: spr750 (spr750), unsigned 32 bits
+ 851: spr751 (spr751), unsigned 32 bits
+ 852: spr752 (spr752), unsigned 32 bits
+ 853: spr753 (spr753), unsigned 32 bits
+ 854: spr754 (spr754), unsigned 32 bits
+ 855: spr755 (spr755), unsigned 32 bits
+ 856: spr756 (spr756), unsigned 32 bits
+ 857: spr757 (spr757), unsigned 32 bits
+ 858: spr758 (spr758), unsigned 32 bits
+ 859: spr759 (spr759), unsigned 32 bits
+ 860: spr760 (spr760), unsigned 32 bits
+ 861: spr761 (spr761), unsigned 32 bits
+ 862: spr762 (spr762), unsigned 32 bits
+ 863: spr763 (spr763), unsigned 32 bits
+ 864: spr764 (spr764), unsigned 32 bits
+ 865: spr765 (spr765), unsigned 32 bits
+ 866: spr766 (spr766), unsigned 32 bits
+ 867: spr767 (spr767), unsigned 32 bits
+ 868: spr768 (spr768), unsigned 32 bits
+ 869: spr769 (spr769), unsigned 32 bits
+ 870: spr770 (spr770), unsigned 32 bits
+ 871: spr771 (spr771), unsigned 32 bits
+ 872: spr772 (spr772), unsigned 32 bits
+ 873: spr773 (spr773), unsigned 32 bits
+ 874: spr774 (spr774), unsigned 32 bits
+ 875: spr775 (spr775), unsigned 32 bits
+ 876: spr776 (spr776), unsigned 32 bits
+ 877: spr777 (spr777), unsigned 32 bits
+ 878: spr778 (spr778), unsigned 32 bits
+ 879: spr779 (spr779), unsigned 32 bits
+ 880: spr780 (spr780), unsigned 32 bits
+ 881: spr781 (spr781), unsigned 32 bits
+ 882: spr782 (spr782), unsigned 32 bits
+ 883: spr783 (spr783), unsigned 32 bits
+ 884: spr784 (spr784), unsigned 32 bits
+ 885: spr785 (spr785), unsigned 32 bits
+ 886: spr786 (spr786), unsigned 32 bits
+ 887: spr787 (spr787), unsigned 32 bits
+ 888: spr788 (spr788), unsigned 32 bits
+ 889: spr789 (spr789), unsigned 32 bits
+ 890: spr790 (spr790), unsigned 32 bits
+ 891: spr791 (spr791), unsigned 32 bits
+ 892: spr792 (spr792), unsigned 32 bits
+ 893: spr793 (spr793), unsigned 32 bits
+ 894: spr794 (spr794), unsigned 32 bits
+ 895: spr795 (spr795), unsigned 32 bits
+ 896: spr796 (spr796), unsigned 32 bits
+ 897: spr797 (spr797), unsigned 32 bits
+ 898: spr798 (spr798), unsigned 32 bits
+ 899: spr799 (spr799), unsigned 32 bits
+ 900: spr800 (spr800), unsigned 32 bits
+ 901: spr801 (spr801), unsigned 32 bits
+ 902: spr802 (spr802), unsigned 32 bits
+ 903: spr803 (spr803), unsigned 32 bits
+ 904: spr804 (spr804), unsigned 32 bits
+ 905: spr805 (spr805), unsigned 32 bits
+ 906: spr806 (spr806), unsigned 32 bits
+ 907: spr807 (spr807), unsigned 32 bits
+ 908: spr808 (spr808), unsigned 32 bits
+ 909: spr809 (spr809), unsigned 32 bits
+ 910: spr810 (spr810), unsigned 32 bits
+ 911: spr811 (spr811), unsigned 32 bits
+ 912: spr812 (spr812), unsigned 32 bits
+ 913: spr813 (spr813), unsigned 32 bits
+ 914: spr814 (spr814), unsigned 32 bits
+ 915: spr815 (spr815), unsigned 32 bits
+ 916: spr816 (spr816), unsigned 32 bits
+ 917: spr817 (spr817), unsigned 32 bits
+ 918: spr818 (spr818), unsigned 32 bits
+ 919: spr819 (spr819), unsigned 32 bits
+ 920: spr820 (spr820), unsigned 32 bits
+ 921: spr821 (spr821), unsigned 32 bits
+ 922: spr822 (spr822), unsigned 32 bits
+ 923: spr823 (spr823), unsigned 32 bits
+ 924: spr824 (spr824), unsigned 32 bits
+ 925: spr825 (spr825), unsigned 32 bits
+ 926: spr826 (spr826), unsigned 32 bits
+ 927: spr827 (spr827), unsigned 32 bits
+ 928: spr828 (spr828), unsigned 32 bits
+ 929: spr829 (spr829), unsigned 32 bits
+ 930: spr830 (spr830), unsigned 32 bits
+ 931: spr831 (spr831), unsigned 32 bits
+ 932: spr832 (spr832), unsigned 32 bits
+ 933: spr833 (spr833), unsigned 32 bits
+ 934: spr834 (spr834), unsigned 32 bits
+ 935: spr835 (spr835), unsigned 32 bits
+ 936: spr836 (spr836), unsigned 32 bits
+ 937: spr837 (spr837), unsigned 32 bits
+ 938: spr838 (spr838), unsigned 32 bits
+ 939: spr839 (spr839), unsigned 32 bits
+ 940: spr840 (spr840), unsigned 32 bits
+ 941: spr841 (spr841), unsigned 32 bits
+ 942: spr842 (spr842), unsigned 32 bits
+ 943: spr843 (spr843), unsigned 32 bits
+ 944: spr844 (spr844), unsigned 32 bits
+ 945: spr845 (spr845), unsigned 32 bits
+ 946: spr846 (spr846), unsigned 32 bits
+ 947: spr847 (spr847), unsigned 32 bits
+ 948: spr848 (spr848), unsigned 32 bits
+ 949: spr849 (spr849), unsigned 32 bits
+ 950: spr850 (spr850), unsigned 32 bits
+ 951: spr851 (spr851), unsigned 32 bits
+ 952: spr852 (spr852), unsigned 32 bits
+ 953: spr853 (spr853), unsigned 32 bits
+ 954: spr854 (spr854), unsigned 32 bits
+ 955: spr855 (spr855), unsigned 32 bits
+ 956: spr856 (spr856), unsigned 32 bits
+ 957: spr857 (spr857), unsigned 32 bits
+ 958: spr858 (spr858), unsigned 32 bits
+ 959: spr859 (spr859), unsigned 32 bits
+ 960: spr860 (spr860), unsigned 32 bits
+ 961: spr861 (spr861), unsigned 32 bits
+ 962: spr862 (spr862), unsigned 32 bits
+ 963: spr863 (spr863), unsigned 32 bits
+ 964: spr864 (spr864), unsigned 32 bits
+ 965: spr865 (spr865), unsigned 32 bits
+ 966: spr866 (spr866), unsigned 32 bits
+ 967: spr867 (spr867), unsigned 32 bits
+ 968: spr868 (spr868), unsigned 32 bits
+ 969: spr869 (spr869), unsigned 32 bits
+ 970: spr870 (spr870), unsigned 32 bits
+ 971: spr871 (spr871), unsigned 32 bits
+ 972: spr872 (spr872), unsigned 32 bits
+ 973: spr873 (spr873), unsigned 32 bits
+ 974: spr874 (spr874), unsigned 32 bits
+ 975: spr875 (spr875), unsigned 32 bits
+ 976: spr876 (spr876), unsigned 32 bits
+ 977: spr877 (spr877), unsigned 32 bits
+ 978: spr878 (spr878), unsigned 32 bits
+ 979: spr879 (spr879), unsigned 32 bits
+ 980: spr880 (spr880), unsigned 32 bits
+ 981: spr881 (spr881), unsigned 32 bits
+ 982: spr882 (spr882), unsigned 32 bits
+ 983: spr883 (spr883), unsigned 32 bits
+ 984: spr884 (spr884), unsigned 32 bits
+ 985: spr885 (spr885), unsigned 32 bits
+ 986: spr886 (spr886), unsigned 32 bits
+ 987: spr887 (spr887), unsigned 32 bits
+ 988: spr888 (spr888), unsigned 32 bits
+ 989: spr889 (spr889), unsigned 32 bits
+ 990: spr890 (spr890), unsigned 32 bits
+ 991: spr891 (spr891), unsigned 32 bits
+ 992: spr892 (spr892), unsigned 32 bits
+ 993: spr893 (spr893), unsigned 32 bits
+ 994: spr894 (spr894), unsigned 32 bits
+ 995: spr895 (spr895), unsigned 32 bits
+ 996: spr896 (spr896), unsigned 32 bits
+ 997: spr897 (spr897), unsigned 32 bits
+ 998: spr898 (spr898), unsigned 32 bits
+ 999: spr899 (spr899), unsigned 32 bits
+vector registers:
+ 67: vscr (vscr), unsigned 32 bits
+ 356: vrsave (vrsave), unsigned 32 bits
+ 612: spefscr (spefscr), unsigned 32 bits
+ 1124: vr0 (vr0), unsigned 128 bits
+ 1125: vr1 (vr1), unsigned 128 bits
+ 1126: vr2 (vr2), unsigned 128 bits
+ 1127: vr3 (vr3), unsigned 128 bits
+ 1128: vr4 (vr4), unsigned 128 bits
+ 1129: vr5 (vr5), unsigned 128 bits
+ 1130: vr6 (vr6), unsigned 128 bits
+ 1131: vr7 (vr7), unsigned 128 bits
+ 1132: vr8 (vr8), unsigned 128 bits
+ 1133: vr9 (vr9), unsigned 128 bits
+ 1134: vr10 (vr10), unsigned 128 bits
+ 1135: vr11 (vr11), unsigned 128 bits
+ 1136: vr12 (vr12), unsigned 128 bits
+ 1137: vr13 (vr13), unsigned 128 bits
+ 1138: vr14 (vr14), unsigned 128 bits
+ 1139: vr15 (vr15), unsigned 128 bits
+ 1140: vr16 (vr16), unsigned 128 bits
+ 1141: vr17 (vr17), unsigned 128 bits
+ 1142: vr18 (vr18), unsigned 128 bits
+ 1143: vr19 (vr19), unsigned 128 bits
+ 1144: vr20 (vr20), unsigned 128 bits
+ 1145: vr21 (vr21), unsigned 128 bits
+ 1146: vr22 (vr22), unsigned 128 bits
+ 1147: vr23 (vr23), unsigned 128 bits
+ 1148: vr24 (vr24), unsigned 128 bits
+ 1149: vr25 (vr25), unsigned 128 bits
+ 1150: vr26 (vr26), unsigned 128 bits
+ 1151: vr27 (vr27), unsigned 128 bits
+ 1152: vr28 (vr28), unsigned 128 bits
+ 1153: vr29 (vr29), unsigned 128 bits
+ 1154: vr30 (vr30), unsigned 128 bits
+ 1155: vr31 (vr31), unsigned 128 bits
+EOF
+
+regs_test testfile23 <<\EOF
+integer registers:
+ 0: r0 (r0), signed 64 bits
+ 1: r1 (r1), signed 64 bits
+ 2: r2 (r2), signed 64 bits
+ 3: r3 (r3), signed 64 bits
+ 4: r4 (r4), signed 64 bits
+ 5: r5 (r5), signed 64 bits
+ 6: r6 (r6), signed 64 bits
+ 7: r7 (r7), signed 64 bits
+ 8: r8 (r8), signed 64 bits
+ 9: r9 (r9), signed 64 bits
+ 10: r10 (r10), signed 64 bits
+ 11: r11 (r11), signed 64 bits
+ 12: r12 (r12), signed 64 bits
+ 13: r13 (r13), signed 64 bits
+ 14: r14 (r14), signed 64 bits
+ 15: r15 (r15), signed 64 bits
+ 16: r16 (r16), signed 64 bits
+ 17: r17 (r17), signed 64 bits
+ 18: r18 (r18), signed 64 bits
+ 19: r19 (r19), signed 64 bits
+ 20: r20 (r20), signed 64 bits
+ 21: r21 (r21), signed 64 bits
+ 22: r22 (r22), signed 64 bits
+ 23: r23 (r23), signed 64 bits
+ 24: r24 (r24), signed 64 bits
+ 25: r25 (r25), signed 64 bits
+ 26: r26 (r26), signed 64 bits
+ 27: r27 (r27), signed 64 bits
+ 28: r28 (r28), signed 64 bits
+ 29: r29 (r29), signed 64 bits
+ 30: r30 (r30), signed 64 bits
+ 31: r31 (r31), signed 64 bits
+ 64: cr (cr), unsigned 64 bits
+ 66: msr (msr), unsigned 64 bits
+FPU registers:
+ 32: f0 (f0), float 64 bits
+ 33: f1 (f1), float 64 bits
+ 34: f2 (f2), float 64 bits
+ 35: f3 (f3), float 64 bits
+ 36: f4 (f4), float 64 bits
+ 37: f5 (f5), float 64 bits
+ 38: f6 (f6), float 64 bits
+ 39: f7 (f7), float 64 bits
+ 40: f8 (f8), float 64 bits
+ 41: f9 (f9), float 64 bits
+ 42: f10 (f10), float 64 bits
+ 43: f11 (f11), float 64 bits
+ 44: f12 (f12), float 64 bits
+ 45: f13 (f13), float 64 bits
+ 46: f14 (f14), float 64 bits
+ 47: f15 (f15), float 64 bits
+ 48: f16 (f16), float 64 bits
+ 49: f17 (f17), float 64 bits
+ 50: f18 (f18), float 64 bits
+ 51: f19 (f19), float 64 bits
+ 52: f20 (f20), float 64 bits
+ 53: f21 (f21), float 64 bits
+ 54: f22 (f22), float 64 bits
+ 55: f23 (f23), float 64 bits
+ 56: f24 (f24), float 64 bits
+ 57: f25 (f25), float 64 bits
+ 58: f26 (f26), float 64 bits
+ 59: f27 (f27), float 64 bits
+ 60: f28 (f28), float 64 bits
+ 61: f29 (f29), float 64 bits
+ 62: f30 (f30), float 64 bits
+ 63: f31 (f31), float 64 bits
+ 65: fpscr (fpscr), unsigned 64 bits
+privileged registers:
+ 70: sr0 (sr0), unsigned 64 bits
+ 71: sr1 (sr1), unsigned 64 bits
+ 72: sr2 (sr2), unsigned 64 bits
+ 73: sr3 (sr3), unsigned 64 bits
+ 74: sr4 (sr4), unsigned 64 bits
+ 75: sr5 (sr5), unsigned 64 bits
+ 76: sr6 (sr6), unsigned 64 bits
+ 77: sr7 (sr7), unsigned 64 bits
+ 78: sr8 (sr8), unsigned 64 bits
+ 79: sr9 (sr9), unsigned 64 bits
+ 80: sr10 (sr10), unsigned 64 bits
+ 81: sr11 (sr11), unsigned 64 bits
+ 82: sr12 (sr12), unsigned 64 bits
+ 83: sr13 (sr13), unsigned 64 bits
+ 84: sr14 (sr14), unsigned 64 bits
+ 85: sr15 (sr15), unsigned 64 bits
+ 100: spr0 (spr0), unsigned 64 bits
+ 101: xer (xer), unsigned 64 bits
+ 102: spr2 (spr2), unsigned 64 bits
+ 103: spr3 (spr3), unsigned 64 bits
+ 104: spr4 (spr4), unsigned 64 bits
+ 105: spr5 (spr5), unsigned 64 bits
+ 106: spr6 (spr6), unsigned 64 bits
+ 107: spr7 (spr7), unsigned 64 bits
+ 108: lr (lr), unsigned 64 bits
+ 109: ctr (ctr), unsigned 64 bits
+ 110: spr10 (spr10), unsigned 64 bits
+ 111: spr11 (spr11), unsigned 64 bits
+ 112: spr12 (spr12), unsigned 64 bits
+ 113: spr13 (spr13), unsigned 64 bits
+ 114: spr14 (spr14), unsigned 64 bits
+ 115: spr15 (spr15), unsigned 64 bits
+ 116: spr16 (spr16), unsigned 64 bits
+ 117: spr17 (spr17), unsigned 64 bits
+ 118: dsisr (dsisr), unsigned 64 bits
+ 119: dar (dar), unsigned 64 bits
+ 120: spr20 (spr20), unsigned 64 bits
+ 121: spr21 (spr21), unsigned 64 bits
+ 122: dec (dec), unsigned 64 bits
+ 123: spr23 (spr23), unsigned 64 bits
+ 124: spr24 (spr24), unsigned 64 bits
+ 125: spr25 (spr25), unsigned 64 bits
+ 126: spr26 (spr26), unsigned 64 bits
+ 127: spr27 (spr27), unsigned 64 bits
+ 128: spr28 (spr28), unsigned 64 bits
+ 129: spr29 (spr29), unsigned 64 bits
+ 130: spr30 (spr30), unsigned 64 bits
+ 131: spr31 (spr31), unsigned 64 bits
+ 132: spr32 (spr32), unsigned 64 bits
+ 133: spr33 (spr33), unsigned 64 bits
+ 134: spr34 (spr34), unsigned 64 bits
+ 135: spr35 (spr35), unsigned 64 bits
+ 136: spr36 (spr36), unsigned 64 bits
+ 137: spr37 (spr37), unsigned 64 bits
+ 138: spr38 (spr38), unsigned 64 bits
+ 139: spr39 (spr39), unsigned 64 bits
+ 140: spr40 (spr40), unsigned 64 bits
+ 141: spr41 (spr41), unsigned 64 bits
+ 142: spr42 (spr42), unsigned 64 bits
+ 143: spr43 (spr43), unsigned 64 bits
+ 144: spr44 (spr44), unsigned 64 bits
+ 145: spr45 (spr45), unsigned 64 bits
+ 146: spr46 (spr46), unsigned 64 bits
+ 147: spr47 (spr47), unsigned 64 bits
+ 148: spr48 (spr48), unsigned 64 bits
+ 149: spr49 (spr49), unsigned 64 bits
+ 150: spr50 (spr50), unsigned 64 bits
+ 151: spr51 (spr51), unsigned 64 bits
+ 152: spr52 (spr52), unsigned 64 bits
+ 153: spr53 (spr53), unsigned 64 bits
+ 154: spr54 (spr54), unsigned 64 bits
+ 155: spr55 (spr55), unsigned 64 bits
+ 156: spr56 (spr56), unsigned 64 bits
+ 157: spr57 (spr57), unsigned 64 bits
+ 158: spr58 (spr58), unsigned 64 bits
+ 159: spr59 (spr59), unsigned 64 bits
+ 160: spr60 (spr60), unsigned 64 bits
+ 161: spr61 (spr61), unsigned 64 bits
+ 162: spr62 (spr62), unsigned 64 bits
+ 163: spr63 (spr63), unsigned 64 bits
+ 164: spr64 (spr64), unsigned 64 bits
+ 165: spr65 (spr65), unsigned 64 bits
+ 166: spr66 (spr66), unsigned 64 bits
+ 167: spr67 (spr67), unsigned 64 bits
+ 168: spr68 (spr68), unsigned 64 bits
+ 169: spr69 (spr69), unsigned 64 bits
+ 170: spr70 (spr70), unsigned 64 bits
+ 171: spr71 (spr71), unsigned 64 bits
+ 172: spr72 (spr72), unsigned 64 bits
+ 173: spr73 (spr73), unsigned 64 bits
+ 174: spr74 (spr74), unsigned 64 bits
+ 175: spr75 (spr75), unsigned 64 bits
+ 176: spr76 (spr76), unsigned 64 bits
+ 177: spr77 (spr77), unsigned 64 bits
+ 178: spr78 (spr78), unsigned 64 bits
+ 179: spr79 (spr79), unsigned 64 bits
+ 180: spr80 (spr80), unsigned 64 bits
+ 181: spr81 (spr81), unsigned 64 bits
+ 182: spr82 (spr82), unsigned 64 bits
+ 183: spr83 (spr83), unsigned 64 bits
+ 184: spr84 (spr84), unsigned 64 bits
+ 185: spr85 (spr85), unsigned 64 bits
+ 186: spr86 (spr86), unsigned 64 bits
+ 187: spr87 (spr87), unsigned 64 bits
+ 188: spr88 (spr88), unsigned 64 bits
+ 189: spr89 (spr89), unsigned 64 bits
+ 190: spr90 (spr90), unsigned 64 bits
+ 191: spr91 (spr91), unsigned 64 bits
+ 192: spr92 (spr92), unsigned 64 bits
+ 193: spr93 (spr93), unsigned 64 bits
+ 194: spr94 (spr94), unsigned 64 bits
+ 195: spr95 (spr95), unsigned 64 bits
+ 196: spr96 (spr96), unsigned 64 bits
+ 197: spr97 (spr97), unsigned 64 bits
+ 198: spr98 (spr98), unsigned 64 bits
+ 199: spr99 (spr99), unsigned 64 bits
+ 200: spr100 (spr100), unsigned 64 bits
+ 201: spr101 (spr101), unsigned 64 bits
+ 202: spr102 (spr102), unsigned 64 bits
+ 203: spr103 (spr103), unsigned 64 bits
+ 204: spr104 (spr104), unsigned 64 bits
+ 205: spr105 (spr105), unsigned 64 bits
+ 206: spr106 (spr106), unsigned 64 bits
+ 207: spr107 (spr107), unsigned 64 bits
+ 208: spr108 (spr108), unsigned 64 bits
+ 209: spr109 (spr109), unsigned 64 bits
+ 210: spr110 (spr110), unsigned 64 bits
+ 211: spr111 (spr111), unsigned 64 bits
+ 212: spr112 (spr112), unsigned 64 bits
+ 213: spr113 (spr113), unsigned 64 bits
+ 214: spr114 (spr114), unsigned 64 bits
+ 215: spr115 (spr115), unsigned 64 bits
+ 216: spr116 (spr116), unsigned 64 bits
+ 217: spr117 (spr117), unsigned 64 bits
+ 218: spr118 (spr118), unsigned 64 bits
+ 219: spr119 (spr119), unsigned 64 bits
+ 220: spr120 (spr120), unsigned 64 bits
+ 221: spr121 (spr121), unsigned 64 bits
+ 222: spr122 (spr122), unsigned 64 bits
+ 223: spr123 (spr123), unsigned 64 bits
+ 224: spr124 (spr124), unsigned 64 bits
+ 225: spr125 (spr125), unsigned 64 bits
+ 226: spr126 (spr126), unsigned 64 bits
+ 227: spr127 (spr127), unsigned 64 bits
+ 228: spr128 (spr128), unsigned 64 bits
+ 229: spr129 (spr129), unsigned 64 bits
+ 230: spr130 (spr130), unsigned 64 bits
+ 231: spr131 (spr131), unsigned 64 bits
+ 232: spr132 (spr132), unsigned 64 bits
+ 233: spr133 (spr133), unsigned 64 bits
+ 234: spr134 (spr134), unsigned 64 bits
+ 235: spr135 (spr135), unsigned 64 bits
+ 236: spr136 (spr136), unsigned 64 bits
+ 237: spr137 (spr137), unsigned 64 bits
+ 238: spr138 (spr138), unsigned 64 bits
+ 239: spr139 (spr139), unsigned 64 bits
+ 240: spr140 (spr140), unsigned 64 bits
+ 241: spr141 (spr141), unsigned 64 bits
+ 242: spr142 (spr142), unsigned 64 bits
+ 243: spr143 (spr143), unsigned 64 bits
+ 244: spr144 (spr144), unsigned 64 bits
+ 245: spr145 (spr145), unsigned 64 bits
+ 246: spr146 (spr146), unsigned 64 bits
+ 247: spr147 (spr147), unsigned 64 bits
+ 248: spr148 (spr148), unsigned 64 bits
+ 249: spr149 (spr149), unsigned 64 bits
+ 250: spr150 (spr150), unsigned 64 bits
+ 251: spr151 (spr151), unsigned 64 bits
+ 252: spr152 (spr152), unsigned 64 bits
+ 253: spr153 (spr153), unsigned 64 bits
+ 254: spr154 (spr154), unsigned 64 bits
+ 255: spr155 (spr155), unsigned 64 bits
+ 256: spr156 (spr156), unsigned 64 bits
+ 257: spr157 (spr157), unsigned 64 bits
+ 258: spr158 (spr158), unsigned 64 bits
+ 259: spr159 (spr159), unsigned 64 bits
+ 260: spr160 (spr160), unsigned 64 bits
+ 261: spr161 (spr161), unsigned 64 bits
+ 262: spr162 (spr162), unsigned 64 bits
+ 263: spr163 (spr163), unsigned 64 bits
+ 264: spr164 (spr164), unsigned 64 bits
+ 265: spr165 (spr165), unsigned 64 bits
+ 266: spr166 (spr166), unsigned 64 bits
+ 267: spr167 (spr167), unsigned 64 bits
+ 268: spr168 (spr168), unsigned 64 bits
+ 269: spr169 (spr169), unsigned 64 bits
+ 270: spr170 (spr170), unsigned 64 bits
+ 271: spr171 (spr171), unsigned 64 bits
+ 272: spr172 (spr172), unsigned 64 bits
+ 273: spr173 (spr173), unsigned 64 bits
+ 274: spr174 (spr174), unsigned 64 bits
+ 275: spr175 (spr175), unsigned 64 bits
+ 276: spr176 (spr176), unsigned 64 bits
+ 277: spr177 (spr177), unsigned 64 bits
+ 278: spr178 (spr178), unsigned 64 bits
+ 279: spr179 (spr179), unsigned 64 bits
+ 280: spr180 (spr180), unsigned 64 bits
+ 281: spr181 (spr181), unsigned 64 bits
+ 282: spr182 (spr182), unsigned 64 bits
+ 283: spr183 (spr183), unsigned 64 bits
+ 284: spr184 (spr184), unsigned 64 bits
+ 285: spr185 (spr185), unsigned 64 bits
+ 286: spr186 (spr186), unsigned 64 bits
+ 287: spr187 (spr187), unsigned 64 bits
+ 288: spr188 (spr188), unsigned 64 bits
+ 289: spr189 (spr189), unsigned 64 bits
+ 290: spr190 (spr190), unsigned 64 bits
+ 291: spr191 (spr191), unsigned 64 bits
+ 292: spr192 (spr192), unsigned 64 bits
+ 293: spr193 (spr193), unsigned 64 bits
+ 294: spr194 (spr194), unsigned 64 bits
+ 295: spr195 (spr195), unsigned 64 bits
+ 296: spr196 (spr196), unsigned 64 bits
+ 297: spr197 (spr197), unsigned 64 bits
+ 298: spr198 (spr198), unsigned 64 bits
+ 299: spr199 (spr199), unsigned 64 bits
+ 300: spr200 (spr200), unsigned 64 bits
+ 301: spr201 (spr201), unsigned 64 bits
+ 302: spr202 (spr202), unsigned 64 bits
+ 303: spr203 (spr203), unsigned 64 bits
+ 304: spr204 (spr204), unsigned 64 bits
+ 305: spr205 (spr205), unsigned 64 bits
+ 306: spr206 (spr206), unsigned 64 bits
+ 307: spr207 (spr207), unsigned 64 bits
+ 308: spr208 (spr208), unsigned 64 bits
+ 309: spr209 (spr209), unsigned 64 bits
+ 310: spr210 (spr210), unsigned 64 bits
+ 311: spr211 (spr211), unsigned 64 bits
+ 312: spr212 (spr212), unsigned 64 bits
+ 313: spr213 (spr213), unsigned 64 bits
+ 314: spr214 (spr214), unsigned 64 bits
+ 315: spr215 (spr215), unsigned 64 bits
+ 316: spr216 (spr216), unsigned 64 bits
+ 317: spr217 (spr217), unsigned 64 bits
+ 318: spr218 (spr218), unsigned 64 bits
+ 319: spr219 (spr219), unsigned 64 bits
+ 320: spr220 (spr220), unsigned 64 bits
+ 321: spr221 (spr221), unsigned 64 bits
+ 322: spr222 (spr222), unsigned 64 bits
+ 323: spr223 (spr223), unsigned 64 bits
+ 324: spr224 (spr224), unsigned 64 bits
+ 325: spr225 (spr225), unsigned 64 bits
+ 326: spr226 (spr226), unsigned 64 bits
+ 327: spr227 (spr227), unsigned 64 bits
+ 328: spr228 (spr228), unsigned 64 bits
+ 329: spr229 (spr229), unsigned 64 bits
+ 330: spr230 (spr230), unsigned 64 bits
+ 331: spr231 (spr231), unsigned 64 bits
+ 332: spr232 (spr232), unsigned 64 bits
+ 333: spr233 (spr233), unsigned 64 bits
+ 334: spr234 (spr234), unsigned 64 bits
+ 335: spr235 (spr235), unsigned 64 bits
+ 336: spr236 (spr236), unsigned 64 bits
+ 337: spr237 (spr237), unsigned 64 bits
+ 338: spr238 (spr238), unsigned 64 bits
+ 339: spr239 (spr239), unsigned 64 bits
+ 340: spr240 (spr240), unsigned 64 bits
+ 341: spr241 (spr241), unsigned 64 bits
+ 342: spr242 (spr242), unsigned 64 bits
+ 343: spr243 (spr243), unsigned 64 bits
+ 344: spr244 (spr244), unsigned 64 bits
+ 345: spr245 (spr245), unsigned 64 bits
+ 346: spr246 (spr246), unsigned 64 bits
+ 347: spr247 (spr247), unsigned 64 bits
+ 348: spr248 (spr248), unsigned 64 bits
+ 349: spr249 (spr249), unsigned 64 bits
+ 350: spr250 (spr250), unsigned 64 bits
+ 351: spr251 (spr251), unsigned 64 bits
+ 352: spr252 (spr252), unsigned 64 bits
+ 353: spr253 (spr253), unsigned 64 bits
+ 354: spr254 (spr254), unsigned 64 bits
+ 355: spr255 (spr255), unsigned 64 bits
+ 357: spr257 (spr257), unsigned 64 bits
+ 358: spr258 (spr258), unsigned 64 bits
+ 359: spr259 (spr259), unsigned 64 bits
+ 360: spr260 (spr260), unsigned 64 bits
+ 361: spr261 (spr261), unsigned 64 bits
+ 362: spr262 (spr262), unsigned 64 bits
+ 363: spr263 (spr263), unsigned 64 bits
+ 364: spr264 (spr264), unsigned 64 bits
+ 365: spr265 (spr265), unsigned 64 bits
+ 366: spr266 (spr266), unsigned 64 bits
+ 367: spr267 (spr267), unsigned 64 bits
+ 368: spr268 (spr268), unsigned 64 bits
+ 369: spr269 (spr269), unsigned 64 bits
+ 370: spr270 (spr270), unsigned 64 bits
+ 371: spr271 (spr271), unsigned 64 bits
+ 372: spr272 (spr272), unsigned 64 bits
+ 373: spr273 (spr273), unsigned 64 bits
+ 374: spr274 (spr274), unsigned 64 bits
+ 375: spr275 (spr275), unsigned 64 bits
+ 376: spr276 (spr276), unsigned 64 bits
+ 377: spr277 (spr277), unsigned 64 bits
+ 378: spr278 (spr278), unsigned 64 bits
+ 379: spr279 (spr279), unsigned 64 bits
+ 380: spr280 (spr280), unsigned 64 bits
+ 381: spr281 (spr281), unsigned 64 bits
+ 382: spr282 (spr282), unsigned 64 bits
+ 383: spr283 (spr283), unsigned 64 bits
+ 384: spr284 (spr284), unsigned 64 bits
+ 385: spr285 (spr285), unsigned 64 bits
+ 386: spr286 (spr286), unsigned 64 bits
+ 387: spr287 (spr287), unsigned 64 bits
+ 388: spr288 (spr288), unsigned 64 bits
+ 389: spr289 (spr289), unsigned 64 bits
+ 390: spr290 (spr290), unsigned 64 bits
+ 391: spr291 (spr291), unsigned 64 bits
+ 392: spr292 (spr292), unsigned 64 bits
+ 393: spr293 (spr293), unsigned 64 bits
+ 394: spr294 (spr294), unsigned 64 bits
+ 395: spr295 (spr295), unsigned 64 bits
+ 396: spr296 (spr296), unsigned 64 bits
+ 397: spr297 (spr297), unsigned 64 bits
+ 398: spr298 (spr298), unsigned 64 bits
+ 399: spr299 (spr299), unsigned 64 bits
+ 400: spr300 (spr300), unsigned 64 bits
+ 401: spr301 (spr301), unsigned 64 bits
+ 402: spr302 (spr302), unsigned 64 bits
+ 403: spr303 (spr303), unsigned 64 bits
+ 404: spr304 (spr304), unsigned 64 bits
+ 405: spr305 (spr305), unsigned 64 bits
+ 406: spr306 (spr306), unsigned 64 bits
+ 407: spr307 (spr307), unsigned 64 bits
+ 408: spr308 (spr308), unsigned 64 bits
+ 409: spr309 (spr309), unsigned 64 bits
+ 410: spr310 (spr310), unsigned 64 bits
+ 411: spr311 (spr311), unsigned 64 bits
+ 412: spr312 (spr312), unsigned 64 bits
+ 413: spr313 (spr313), unsigned 64 bits
+ 414: spr314 (spr314), unsigned 64 bits
+ 415: spr315 (spr315), unsigned 64 bits
+ 416: spr316 (spr316), unsigned 64 bits
+ 417: spr317 (spr317), unsigned 64 bits
+ 418: spr318 (spr318), unsigned 64 bits
+ 419: spr319 (spr319), unsigned 64 bits
+ 420: spr320 (spr320), unsigned 64 bits
+ 421: spr321 (spr321), unsigned 64 bits
+ 422: spr322 (spr322), unsigned 64 bits
+ 423: spr323 (spr323), unsigned 64 bits
+ 424: spr324 (spr324), unsigned 64 bits
+ 425: spr325 (spr325), unsigned 64 bits
+ 426: spr326 (spr326), unsigned 64 bits
+ 427: spr327 (spr327), unsigned 64 bits
+ 428: spr328 (spr328), unsigned 64 bits
+ 429: spr329 (spr329), unsigned 64 bits
+ 430: spr330 (spr330), unsigned 64 bits
+ 431: spr331 (spr331), unsigned 64 bits
+ 432: spr332 (spr332), unsigned 64 bits
+ 433: spr333 (spr333), unsigned 64 bits
+ 434: spr334 (spr334), unsigned 64 bits
+ 435: spr335 (spr335), unsigned 64 bits
+ 436: spr336 (spr336), unsigned 64 bits
+ 437: spr337 (spr337), unsigned 64 bits
+ 438: spr338 (spr338), unsigned 64 bits
+ 439: spr339 (spr339), unsigned 64 bits
+ 440: spr340 (spr340), unsigned 64 bits
+ 441: spr341 (spr341), unsigned 64 bits
+ 442: spr342 (spr342), unsigned 64 bits
+ 443: spr343 (spr343), unsigned 64 bits
+ 444: spr344 (spr344), unsigned 64 bits
+ 445: spr345 (spr345), unsigned 64 bits
+ 446: spr346 (spr346), unsigned 64 bits
+ 447: spr347 (spr347), unsigned 64 bits
+ 448: spr348 (spr348), unsigned 64 bits
+ 449: spr349 (spr349), unsigned 64 bits
+ 450: spr350 (spr350), unsigned 64 bits
+ 451: spr351 (spr351), unsigned 64 bits
+ 452: spr352 (spr352), unsigned 64 bits
+ 453: spr353 (spr353), unsigned 64 bits
+ 454: spr354 (spr354), unsigned 64 bits
+ 455: spr355 (spr355), unsigned 64 bits
+ 456: spr356 (spr356), unsigned 64 bits
+ 457: spr357 (spr357), unsigned 64 bits
+ 458: spr358 (spr358), unsigned 64 bits
+ 459: spr359 (spr359), unsigned 64 bits
+ 460: spr360 (spr360), unsigned 64 bits
+ 461: spr361 (spr361), unsigned 64 bits
+ 462: spr362 (spr362), unsigned 64 bits
+ 463: spr363 (spr363), unsigned 64 bits
+ 464: spr364 (spr364), unsigned 64 bits
+ 465: spr365 (spr365), unsigned 64 bits
+ 466: spr366 (spr366), unsigned 64 bits
+ 467: spr367 (spr367), unsigned 64 bits
+ 468: spr368 (spr368), unsigned 64 bits
+ 469: spr369 (spr369), unsigned 64 bits
+ 470: spr370 (spr370), unsigned 64 bits
+ 471: spr371 (spr371), unsigned 64 bits
+ 472: spr372 (spr372), unsigned 64 bits
+ 473: spr373 (spr373), unsigned 64 bits
+ 474: spr374 (spr374), unsigned 64 bits
+ 475: spr375 (spr375), unsigned 64 bits
+ 476: spr376 (spr376), unsigned 64 bits
+ 477: spr377 (spr377), unsigned 64 bits
+ 478: spr378 (spr378), unsigned 64 bits
+ 479: spr379 (spr379), unsigned 64 bits
+ 480: spr380 (spr380), unsigned 64 bits
+ 481: spr381 (spr381), unsigned 64 bits
+ 482: spr382 (spr382), unsigned 64 bits
+ 483: spr383 (spr383), unsigned 64 bits
+ 484: spr384 (spr384), unsigned 64 bits
+ 485: spr385 (spr385), unsigned 64 bits
+ 486: spr386 (spr386), unsigned 64 bits
+ 487: spr387 (spr387), unsigned 64 bits
+ 488: spr388 (spr388), unsigned 64 bits
+ 489: spr389 (spr389), unsigned 64 bits
+ 490: spr390 (spr390), unsigned 64 bits
+ 491: spr391 (spr391), unsigned 64 bits
+ 492: spr392 (spr392), unsigned 64 bits
+ 493: spr393 (spr393), unsigned 64 bits
+ 494: spr394 (spr394), unsigned 64 bits
+ 495: spr395 (spr395), unsigned 64 bits
+ 496: spr396 (spr396), unsigned 64 bits
+ 497: spr397 (spr397), unsigned 64 bits
+ 498: spr398 (spr398), unsigned 64 bits
+ 499: spr399 (spr399), unsigned 64 bits
+ 500: spr400 (spr400), unsigned 64 bits
+ 501: spr401 (spr401), unsigned 64 bits
+ 502: spr402 (spr402), unsigned 64 bits
+ 503: spr403 (spr403), unsigned 64 bits
+ 504: spr404 (spr404), unsigned 64 bits
+ 505: spr405 (spr405), unsigned 64 bits
+ 506: spr406 (spr406), unsigned 64 bits
+ 507: spr407 (spr407), unsigned 64 bits
+ 508: spr408 (spr408), unsigned 64 bits
+ 509: spr409 (spr409), unsigned 64 bits
+ 510: spr410 (spr410), unsigned 64 bits
+ 511: spr411 (spr411), unsigned 64 bits
+ 512: spr412 (spr412), unsigned 64 bits
+ 513: spr413 (spr413), unsigned 64 bits
+ 514: spr414 (spr414), unsigned 64 bits
+ 515: spr415 (spr415), unsigned 64 bits
+ 516: spr416 (spr416), unsigned 64 bits
+ 517: spr417 (spr417), unsigned 64 bits
+ 518: spr418 (spr418), unsigned 64 bits
+ 519: spr419 (spr419), unsigned 64 bits
+ 520: spr420 (spr420), unsigned 64 bits
+ 521: spr421 (spr421), unsigned 64 bits
+ 522: spr422 (spr422), unsigned 64 bits
+ 523: spr423 (spr423), unsigned 64 bits
+ 524: spr424 (spr424), unsigned 64 bits
+ 525: spr425 (spr425), unsigned 64 bits
+ 526: spr426 (spr426), unsigned 64 bits
+ 527: spr427 (spr427), unsigned 64 bits
+ 528: spr428 (spr428), unsigned 64 bits
+ 529: spr429 (spr429), unsigned 64 bits
+ 530: spr430 (spr430), unsigned 64 bits
+ 531: spr431 (spr431), unsigned 64 bits
+ 532: spr432 (spr432), unsigned 64 bits
+ 533: spr433 (spr433), unsigned 64 bits
+ 534: spr434 (spr434), unsigned 64 bits
+ 535: spr435 (spr435), unsigned 64 bits
+ 536: spr436 (spr436), unsigned 64 bits
+ 537: spr437 (spr437), unsigned 64 bits
+ 538: spr438 (spr438), unsigned 64 bits
+ 539: spr439 (spr439), unsigned 64 bits
+ 540: spr440 (spr440), unsigned 64 bits
+ 541: spr441 (spr441), unsigned 64 bits
+ 542: spr442 (spr442), unsigned 64 bits
+ 543: spr443 (spr443), unsigned 64 bits
+ 544: spr444 (spr444), unsigned 64 bits
+ 545: spr445 (spr445), unsigned 64 bits
+ 546: spr446 (spr446), unsigned 64 bits
+ 547: spr447 (spr447), unsigned 64 bits
+ 548: spr448 (spr448), unsigned 64 bits
+ 549: spr449 (spr449), unsigned 64 bits
+ 550: spr450 (spr450), unsigned 64 bits
+ 551: spr451 (spr451), unsigned 64 bits
+ 552: spr452 (spr452), unsigned 64 bits
+ 553: spr453 (spr453), unsigned 64 bits
+ 554: spr454 (spr454), unsigned 64 bits
+ 555: spr455 (spr455), unsigned 64 bits
+ 556: spr456 (spr456), unsigned 64 bits
+ 557: spr457 (spr457), unsigned 64 bits
+ 558: spr458 (spr458), unsigned 64 bits
+ 559: spr459 (spr459), unsigned 64 bits
+ 560: spr460 (spr460), unsigned 64 bits
+ 561: spr461 (spr461), unsigned 64 bits
+ 562: spr462 (spr462), unsigned 64 bits
+ 563: spr463 (spr463), unsigned 64 bits
+ 564: spr464 (spr464), unsigned 64 bits
+ 565: spr465 (spr465), unsigned 64 bits
+ 566: spr466 (spr466), unsigned 64 bits
+ 567: spr467 (spr467), unsigned 64 bits
+ 568: spr468 (spr468), unsigned 64 bits
+ 569: spr469 (spr469), unsigned 64 bits
+ 570: spr470 (spr470), unsigned 64 bits
+ 571: spr471 (spr471), unsigned 64 bits
+ 572: spr472 (spr472), unsigned 64 bits
+ 573: spr473 (spr473), unsigned 64 bits
+ 574: spr474 (spr474), unsigned 64 bits
+ 575: spr475 (spr475), unsigned 64 bits
+ 576: spr476 (spr476), unsigned 64 bits
+ 577: spr477 (spr477), unsigned 64 bits
+ 578: spr478 (spr478), unsigned 64 bits
+ 579: spr479 (spr479), unsigned 64 bits
+ 580: spr480 (spr480), unsigned 64 bits
+ 581: spr481 (spr481), unsigned 64 bits
+ 582: spr482 (spr482), unsigned 64 bits
+ 583: spr483 (spr483), unsigned 64 bits
+ 584: spr484 (spr484), unsigned 64 bits
+ 585: spr485 (spr485), unsigned 64 bits
+ 586: spr486 (spr486), unsigned 64 bits
+ 587: spr487 (spr487), unsigned 64 bits
+ 588: spr488 (spr488), unsigned 64 bits
+ 589: spr489 (spr489), unsigned 64 bits
+ 590: spr490 (spr490), unsigned 64 bits
+ 591: spr491 (spr491), unsigned 64 bits
+ 592: spr492 (spr492), unsigned 64 bits
+ 593: spr493 (spr493), unsigned 64 bits
+ 594: spr494 (spr494), unsigned 64 bits
+ 595: spr495 (spr495), unsigned 64 bits
+ 596: spr496 (spr496), unsigned 64 bits
+ 597: spr497 (spr497), unsigned 64 bits
+ 598: spr498 (spr498), unsigned 64 bits
+ 599: spr499 (spr499), unsigned 64 bits
+ 600: spr500 (spr500), unsigned 64 bits
+ 601: spr501 (spr501), unsigned 64 bits
+ 602: spr502 (spr502), unsigned 64 bits
+ 603: spr503 (spr503), unsigned 64 bits
+ 604: spr504 (spr504), unsigned 64 bits
+ 605: spr505 (spr505), unsigned 64 bits
+ 606: spr506 (spr506), unsigned 64 bits
+ 607: spr507 (spr507), unsigned 64 bits
+ 608: spr508 (spr508), unsigned 64 bits
+ 609: spr509 (spr509), unsigned 64 bits
+ 610: spr510 (spr510), unsigned 64 bits
+ 611: spr511 (spr511), unsigned 64 bits
+ 613: spr513 (spr513), unsigned 64 bits
+ 614: spr514 (spr514), unsigned 64 bits
+ 615: spr515 (spr515), unsigned 64 bits
+ 616: spr516 (spr516), unsigned 64 bits
+ 617: spr517 (spr517), unsigned 64 bits
+ 618: spr518 (spr518), unsigned 64 bits
+ 619: spr519 (spr519), unsigned 64 bits
+ 620: spr520 (spr520), unsigned 64 bits
+ 621: spr521 (spr521), unsigned 64 bits
+ 622: spr522 (spr522), unsigned 64 bits
+ 623: spr523 (spr523), unsigned 64 bits
+ 624: spr524 (spr524), unsigned 64 bits
+ 625: spr525 (spr525), unsigned 64 bits
+ 626: spr526 (spr526), unsigned 64 bits
+ 627: spr527 (spr527), unsigned 64 bits
+ 628: spr528 (spr528), unsigned 64 bits
+ 629: spr529 (spr529), unsigned 64 bits
+ 630: spr530 (spr530), unsigned 64 bits
+ 631: spr531 (spr531), unsigned 64 bits
+ 632: spr532 (spr532), unsigned 64 bits
+ 633: spr533 (spr533), unsigned 64 bits
+ 634: spr534 (spr534), unsigned 64 bits
+ 635: spr535 (spr535), unsigned 64 bits
+ 636: spr536 (spr536), unsigned 64 bits
+ 637: spr537 (spr537), unsigned 64 bits
+ 638: spr538 (spr538), unsigned 64 bits
+ 639: spr539 (spr539), unsigned 64 bits
+ 640: spr540 (spr540), unsigned 64 bits
+ 641: spr541 (spr541), unsigned 64 bits
+ 642: spr542 (spr542), unsigned 64 bits
+ 643: spr543 (spr543), unsigned 64 bits
+ 644: spr544 (spr544), unsigned 64 bits
+ 645: spr545 (spr545), unsigned 64 bits
+ 646: spr546 (spr546), unsigned 64 bits
+ 647: spr547 (spr547), unsigned 64 bits
+ 648: spr548 (spr548), unsigned 64 bits
+ 649: spr549 (spr549), unsigned 64 bits
+ 650: spr550 (spr550), unsigned 64 bits
+ 651: spr551 (spr551), unsigned 64 bits
+ 652: spr552 (spr552), unsigned 64 bits
+ 653: spr553 (spr553), unsigned 64 bits
+ 654: spr554 (spr554), unsigned 64 bits
+ 655: spr555 (spr555), unsigned 64 bits
+ 656: spr556 (spr556), unsigned 64 bits
+ 657: spr557 (spr557), unsigned 64 bits
+ 658: spr558 (spr558), unsigned 64 bits
+ 659: spr559 (spr559), unsigned 64 bits
+ 660: spr560 (spr560), unsigned 64 bits
+ 661: spr561 (spr561), unsigned 64 bits
+ 662: spr562 (spr562), unsigned 64 bits
+ 663: spr563 (spr563), unsigned 64 bits
+ 664: spr564 (spr564), unsigned 64 bits
+ 665: spr565 (spr565), unsigned 64 bits
+ 666: spr566 (spr566), unsigned 64 bits
+ 667: spr567 (spr567), unsigned 64 bits
+ 668: spr568 (spr568), unsigned 64 bits
+ 669: spr569 (spr569), unsigned 64 bits
+ 670: spr570 (spr570), unsigned 64 bits
+ 671: spr571 (spr571), unsigned 64 bits
+ 672: spr572 (spr572), unsigned 64 bits
+ 673: spr573 (spr573), unsigned 64 bits
+ 674: spr574 (spr574), unsigned 64 bits
+ 675: spr575 (spr575), unsigned 64 bits
+ 676: spr576 (spr576), unsigned 64 bits
+ 677: spr577 (spr577), unsigned 64 bits
+ 678: spr578 (spr578), unsigned 64 bits
+ 679: spr579 (spr579), unsigned 64 bits
+ 680: spr580 (spr580), unsigned 64 bits
+ 681: spr581 (spr581), unsigned 64 bits
+ 682: spr582 (spr582), unsigned 64 bits
+ 683: spr583 (spr583), unsigned 64 bits
+ 684: spr584 (spr584), unsigned 64 bits
+ 685: spr585 (spr585), unsigned 64 bits
+ 686: spr586 (spr586), unsigned 64 bits
+ 687: spr587 (spr587), unsigned 64 bits
+ 688: spr588 (spr588), unsigned 64 bits
+ 689: spr589 (spr589), unsigned 64 bits
+ 690: spr590 (spr590), unsigned 64 bits
+ 691: spr591 (spr591), unsigned 64 bits
+ 692: spr592 (spr592), unsigned 64 bits
+ 693: spr593 (spr593), unsigned 64 bits
+ 694: spr594 (spr594), unsigned 64 bits
+ 695: spr595 (spr595), unsigned 64 bits
+ 696: spr596 (spr596), unsigned 64 bits
+ 697: spr597 (spr597), unsigned 64 bits
+ 698: spr598 (spr598), unsigned 64 bits
+ 699: spr599 (spr599), unsigned 64 bits
+ 700: spr600 (spr600), unsigned 64 bits
+ 701: spr601 (spr601), unsigned 64 bits
+ 702: spr602 (spr602), unsigned 64 bits
+ 703: spr603 (spr603), unsigned 64 bits
+ 704: spr604 (spr604), unsigned 64 bits
+ 705: spr605 (spr605), unsigned 64 bits
+ 706: spr606 (spr606), unsigned 64 bits
+ 707: spr607 (spr607), unsigned 64 bits
+ 708: spr608 (spr608), unsigned 64 bits
+ 709: spr609 (spr609), unsigned 64 bits
+ 710: spr610 (spr610), unsigned 64 bits
+ 711: spr611 (spr611), unsigned 64 bits
+ 712: spr612 (spr612), unsigned 64 bits
+ 713: spr613 (spr613), unsigned 64 bits
+ 714: spr614 (spr614), unsigned 64 bits
+ 715: spr615 (spr615), unsigned 64 bits
+ 716: spr616 (spr616), unsigned 64 bits
+ 717: spr617 (spr617), unsigned 64 bits
+ 718: spr618 (spr618), unsigned 64 bits
+ 719: spr619 (spr619), unsigned 64 bits
+ 720: spr620 (spr620), unsigned 64 bits
+ 721: spr621 (spr621), unsigned 64 bits
+ 722: spr622 (spr622), unsigned 64 bits
+ 723: spr623 (spr623), unsigned 64 bits
+ 724: spr624 (spr624), unsigned 64 bits
+ 725: spr625 (spr625), unsigned 64 bits
+ 726: spr626 (spr626), unsigned 64 bits
+ 727: spr627 (spr627), unsigned 64 bits
+ 728: spr628 (spr628), unsigned 64 bits
+ 729: spr629 (spr629), unsigned 64 bits
+ 730: spr630 (spr630), unsigned 64 bits
+ 731: spr631 (spr631), unsigned 64 bits
+ 732: spr632 (spr632), unsigned 64 bits
+ 733: spr633 (spr633), unsigned 64 bits
+ 734: spr634 (spr634), unsigned 64 bits
+ 735: spr635 (spr635), unsigned 64 bits
+ 736: spr636 (spr636), unsigned 64 bits
+ 737: spr637 (spr637), unsigned 64 bits
+ 738: spr638 (spr638), unsigned 64 bits
+ 739: spr639 (spr639), unsigned 64 bits
+ 740: spr640 (spr640), unsigned 64 bits
+ 741: spr641 (spr641), unsigned 64 bits
+ 742: spr642 (spr642), unsigned 64 bits
+ 743: spr643 (spr643), unsigned 64 bits
+ 744: spr644 (spr644), unsigned 64 bits
+ 745: spr645 (spr645), unsigned 64 bits
+ 746: spr646 (spr646), unsigned 64 bits
+ 747: spr647 (spr647), unsigned 64 bits
+ 748: spr648 (spr648), unsigned 64 bits
+ 749: spr649 (spr649), unsigned 64 bits
+ 750: spr650 (spr650), unsigned 64 bits
+ 751: spr651 (spr651), unsigned 64 bits
+ 752: spr652 (spr652), unsigned 64 bits
+ 753: spr653 (spr653), unsigned 64 bits
+ 754: spr654 (spr654), unsigned 64 bits
+ 755: spr655 (spr655), unsigned 64 bits
+ 756: spr656 (spr656), unsigned 64 bits
+ 757: spr657 (spr657), unsigned 64 bits
+ 758: spr658 (spr658), unsigned 64 bits
+ 759: spr659 (spr659), unsigned 64 bits
+ 760: spr660 (spr660), unsigned 64 bits
+ 761: spr661 (spr661), unsigned 64 bits
+ 762: spr662 (spr662), unsigned 64 bits
+ 763: spr663 (spr663), unsigned 64 bits
+ 764: spr664 (spr664), unsigned 64 bits
+ 765: spr665 (spr665), unsigned 64 bits
+ 766: spr666 (spr666), unsigned 64 bits
+ 767: spr667 (spr667), unsigned 64 bits
+ 768: spr668 (spr668), unsigned 64 bits
+ 769: spr669 (spr669), unsigned 64 bits
+ 770: spr670 (spr670), unsigned 64 bits
+ 771: spr671 (spr671), unsigned 64 bits
+ 772: spr672 (spr672), unsigned 64 bits
+ 773: spr673 (spr673), unsigned 64 bits
+ 774: spr674 (spr674), unsigned 64 bits
+ 775: spr675 (spr675), unsigned 64 bits
+ 776: spr676 (spr676), unsigned 64 bits
+ 777: spr677 (spr677), unsigned 64 bits
+ 778: spr678 (spr678), unsigned 64 bits
+ 779: spr679 (spr679), unsigned 64 bits
+ 780: spr680 (spr680), unsigned 64 bits
+ 781: spr681 (spr681), unsigned 64 bits
+ 782: spr682 (spr682), unsigned 64 bits
+ 783: spr683 (spr683), unsigned 64 bits
+ 784: spr684 (spr684), unsigned 64 bits
+ 785: spr685 (spr685), unsigned 64 bits
+ 786: spr686 (spr686), unsigned 64 bits
+ 787: spr687 (spr687), unsigned 64 bits
+ 788: spr688 (spr688), unsigned 64 bits
+ 789: spr689 (spr689), unsigned 64 bits
+ 790: spr690 (spr690), unsigned 64 bits
+ 791: spr691 (spr691), unsigned 64 bits
+ 792: spr692 (spr692), unsigned 64 bits
+ 793: spr693 (spr693), unsigned 64 bits
+ 794: spr694 (spr694), unsigned 64 bits
+ 795: spr695 (spr695), unsigned 64 bits
+ 796: spr696 (spr696), unsigned 64 bits
+ 797: spr697 (spr697), unsigned 64 bits
+ 798: spr698 (spr698), unsigned 64 bits
+ 799: spr699 (spr699), unsigned 64 bits
+ 800: spr700 (spr700), unsigned 64 bits
+ 801: spr701 (spr701), unsigned 64 bits
+ 802: spr702 (spr702), unsigned 64 bits
+ 803: spr703 (spr703), unsigned 64 bits
+ 804: spr704 (spr704), unsigned 64 bits
+ 805: spr705 (spr705), unsigned 64 bits
+ 806: spr706 (spr706), unsigned 64 bits
+ 807: spr707 (spr707), unsigned 64 bits
+ 808: spr708 (spr708), unsigned 64 bits
+ 809: spr709 (spr709), unsigned 64 bits
+ 810: spr710 (spr710), unsigned 64 bits
+ 811: spr711 (spr711), unsigned 64 bits
+ 812: spr712 (spr712), unsigned 64 bits
+ 813: spr713 (spr713), unsigned 64 bits
+ 814: spr714 (spr714), unsigned 64 bits
+ 815: spr715 (spr715), unsigned 64 bits
+ 816: spr716 (spr716), unsigned 64 bits
+ 817: spr717 (spr717), unsigned 64 bits
+ 818: spr718 (spr718), unsigned 64 bits
+ 819: spr719 (spr719), unsigned 64 bits
+ 820: spr720 (spr720), unsigned 64 bits
+ 821: spr721 (spr721), unsigned 64 bits
+ 822: spr722 (spr722), unsigned 64 bits
+ 823: spr723 (spr723), unsigned 64 bits
+ 824: spr724 (spr724), unsigned 64 bits
+ 825: spr725 (spr725), unsigned 64 bits
+ 826: spr726 (spr726), unsigned 64 bits
+ 827: spr727 (spr727), unsigned 64 bits
+ 828: spr728 (spr728), unsigned 64 bits
+ 829: spr729 (spr729), unsigned 64 bits
+ 830: spr730 (spr730), unsigned 64 bits
+ 831: spr731 (spr731), unsigned 64 bits
+ 832: spr732 (spr732), unsigned 64 bits
+ 833: spr733 (spr733), unsigned 64 bits
+ 834: spr734 (spr734), unsigned 64 bits
+ 835: spr735 (spr735), unsigned 64 bits
+ 836: spr736 (spr736), unsigned 64 bits
+ 837: spr737 (spr737), unsigned 64 bits
+ 838: spr738 (spr738), unsigned 64 bits
+ 839: spr739 (spr739), unsigned 64 bits
+ 840: spr740 (spr740), unsigned 64 bits
+ 841: spr741 (spr741), unsigned 64 bits
+ 842: spr742 (spr742), unsigned 64 bits
+ 843: spr743 (spr743), unsigned 64 bits
+ 844: spr744 (spr744), unsigned 64 bits
+ 845: spr745 (spr745), unsigned 64 bits
+ 846: spr746 (spr746), unsigned 64 bits
+ 847: spr747 (spr747), unsigned 64 bits
+ 848: spr748 (spr748), unsigned 64 bits
+ 849: spr749 (spr749), unsigned 64 bits
+ 850: spr750 (spr750), unsigned 64 bits
+ 851: spr751 (spr751), unsigned 64 bits
+ 852: spr752 (spr752), unsigned 64 bits
+ 853: spr753 (spr753), unsigned 64 bits
+ 854: spr754 (spr754), unsigned 64 bits
+ 855: spr755 (spr755), unsigned 64 bits
+ 856: spr756 (spr756), unsigned 64 bits
+ 857: spr757 (spr757), unsigned 64 bits
+ 858: spr758 (spr758), unsigned 64 bits
+ 859: spr759 (spr759), unsigned 64 bits
+ 860: spr760 (spr760), unsigned 64 bits
+ 861: spr761 (spr761), unsigned 64 bits
+ 862: spr762 (spr762), unsigned 64 bits
+ 863: spr763 (spr763), unsigned 64 bits
+ 864: spr764 (spr764), unsigned 64 bits
+ 865: spr765 (spr765), unsigned 64 bits
+ 866: spr766 (spr766), unsigned 64 bits
+ 867: spr767 (spr767), unsigned 64 bits
+ 868: spr768 (spr768), unsigned 64 bits
+ 869: spr769 (spr769), unsigned 64 bits
+ 870: spr770 (spr770), unsigned 64 bits
+ 871: spr771 (spr771), unsigned 64 bits
+ 872: spr772 (spr772), unsigned 64 bits
+ 873: spr773 (spr773), unsigned 64 bits
+ 874: spr774 (spr774), unsigned 64 bits
+ 875: spr775 (spr775), unsigned 64 bits
+ 876: spr776 (spr776), unsigned 64 bits
+ 877: spr777 (spr777), unsigned 64 bits
+ 878: spr778 (spr778), unsigned 64 bits
+ 879: spr779 (spr779), unsigned 64 bits
+ 880: spr780 (spr780), unsigned 64 bits
+ 881: spr781 (spr781), unsigned 64 bits
+ 882: spr782 (spr782), unsigned 64 bits
+ 883: spr783 (spr783), unsigned 64 bits
+ 884: spr784 (spr784), unsigned 64 bits
+ 885: spr785 (spr785), unsigned 64 bits
+ 886: spr786 (spr786), unsigned 64 bits
+ 887: spr787 (spr787), unsigned 64 bits
+ 888: spr788 (spr788), unsigned 64 bits
+ 889: spr789 (spr789), unsigned 64 bits
+ 890: spr790 (spr790), unsigned 64 bits
+ 891: spr791 (spr791), unsigned 64 bits
+ 892: spr792 (spr792), unsigned 64 bits
+ 893: spr793 (spr793), unsigned 64 bits
+ 894: spr794 (spr794), unsigned 64 bits
+ 895: spr795 (spr795), unsigned 64 bits
+ 896: spr796 (spr796), unsigned 64 bits
+ 897: spr797 (spr797), unsigned 64 bits
+ 898: spr798 (spr798), unsigned 64 bits
+ 899: spr799 (spr799), unsigned 64 bits
+ 900: spr800 (spr800), unsigned 64 bits
+ 901: spr801 (spr801), unsigned 64 bits
+ 902: spr802 (spr802), unsigned 64 bits
+ 903: spr803 (spr803), unsigned 64 bits
+ 904: spr804 (spr804), unsigned 64 bits
+ 905: spr805 (spr805), unsigned 64 bits
+ 906: spr806 (spr806), unsigned 64 bits
+ 907: spr807 (spr807), unsigned 64 bits
+ 908: spr808 (spr808), unsigned 64 bits
+ 909: spr809 (spr809), unsigned 64 bits
+ 910: spr810 (spr810), unsigned 64 bits
+ 911: spr811 (spr811), unsigned 64 bits
+ 912: spr812 (spr812), unsigned 64 bits
+ 913: spr813 (spr813), unsigned 64 bits
+ 914: spr814 (spr814), unsigned 64 bits
+ 915: spr815 (spr815), unsigned 64 bits
+ 916: spr816 (spr816), unsigned 64 bits
+ 917: spr817 (spr817), unsigned 64 bits
+ 918: spr818 (spr818), unsigned 64 bits
+ 919: spr819 (spr819), unsigned 64 bits
+ 920: spr820 (spr820), unsigned 64 bits
+ 921: spr821 (spr821), unsigned 64 bits
+ 922: spr822 (spr822), unsigned 64 bits
+ 923: spr823 (spr823), unsigned 64 bits
+ 924: spr824 (spr824), unsigned 64 bits
+ 925: spr825 (spr825), unsigned 64 bits
+ 926: spr826 (spr826), unsigned 64 bits
+ 927: spr827 (spr827), unsigned 64 bits
+ 928: spr828 (spr828), unsigned 64 bits
+ 929: spr829 (spr829), unsigned 64 bits
+ 930: spr830 (spr830), unsigned 64 bits
+ 931: spr831 (spr831), unsigned 64 bits
+ 932: spr832 (spr832), unsigned 64 bits
+ 933: spr833 (spr833), unsigned 64 bits
+ 934: spr834 (spr834), unsigned 64 bits
+ 935: spr835 (spr835), unsigned 64 bits
+ 936: spr836 (spr836), unsigned 64 bits
+ 937: spr837 (spr837), unsigned 64 bits
+ 938: spr838 (spr838), unsigned 64 bits
+ 939: spr839 (spr839), unsigned 64 bits
+ 940: spr840 (spr840), unsigned 64 bits
+ 941: spr841 (spr841), unsigned 64 bits
+ 942: spr842 (spr842), unsigned 64 bits
+ 943: spr843 (spr843), unsigned 64 bits
+ 944: spr844 (spr844), unsigned 64 bits
+ 945: spr845 (spr845), unsigned 64 bits
+ 946: spr846 (spr846), unsigned 64 bits
+ 947: spr847 (spr847), unsigned 64 bits
+ 948: spr848 (spr848), unsigned 64 bits
+ 949: spr849 (spr849), unsigned 64 bits
+ 950: spr850 (spr850), unsigned 64 bits
+ 951: spr851 (spr851), unsigned 64 bits
+ 952: spr852 (spr852), unsigned 64 bits
+ 953: spr853 (spr853), unsigned 64 bits
+ 954: spr854 (spr854), unsigned 64 bits
+ 955: spr855 (spr855), unsigned 64 bits
+ 956: spr856 (spr856), unsigned 64 bits
+ 957: spr857 (spr857), unsigned 64 bits
+ 958: spr858 (spr858), unsigned 64 bits
+ 959: spr859 (spr859), unsigned 64 bits
+ 960: spr860 (spr860), unsigned 64 bits
+ 961: spr861 (spr861), unsigned 64 bits
+ 962: spr862 (spr862), unsigned 64 bits
+ 963: spr863 (spr863), unsigned 64 bits
+ 964: spr864 (spr864), unsigned 64 bits
+ 965: spr865 (spr865), unsigned 64 bits
+ 966: spr866 (spr866), unsigned 64 bits
+ 967: spr867 (spr867), unsigned 64 bits
+ 968: spr868 (spr868), unsigned 64 bits
+ 969: spr869 (spr869), unsigned 64 bits
+ 970: spr870 (spr870), unsigned 64 bits
+ 971: spr871 (spr871), unsigned 64 bits
+ 972: spr872 (spr872), unsigned 64 bits
+ 973: spr873 (spr873), unsigned 64 bits
+ 974: spr874 (spr874), unsigned 64 bits
+ 975: spr875 (spr875), unsigned 64 bits
+ 976: spr876 (spr876), unsigned 64 bits
+ 977: spr877 (spr877), unsigned 64 bits
+ 978: spr878 (spr878), unsigned 64 bits
+ 979: spr879 (spr879), unsigned 64 bits
+ 980: spr880 (spr880), unsigned 64 bits
+ 981: spr881 (spr881), unsigned 64 bits
+ 982: spr882 (spr882), unsigned 64 bits
+ 983: spr883 (spr883), unsigned 64 bits
+ 984: spr884 (spr884), unsigned 64 bits
+ 985: spr885 (spr885), unsigned 64 bits
+ 986: spr886 (spr886), unsigned 64 bits
+ 987: spr887 (spr887), unsigned 64 bits
+ 988: spr888 (spr888), unsigned 64 bits
+ 989: spr889 (spr889), unsigned 64 bits
+ 990: spr890 (spr890), unsigned 64 bits
+ 991: spr891 (spr891), unsigned 64 bits
+ 992: spr892 (spr892), unsigned 64 bits
+ 993: spr893 (spr893), unsigned 64 bits
+ 994: spr894 (spr894), unsigned 64 bits
+ 995: spr895 (spr895), unsigned 64 bits
+ 996: spr896 (spr896), unsigned 64 bits
+ 997: spr897 (spr897), unsigned 64 bits
+ 998: spr898 (spr898), unsigned 64 bits
+ 999: spr899 (spr899), unsigned 64 bits
+vector registers:
+ 67: vscr (vscr), unsigned 32 bits
+ 356: vrsave (vrsave), unsigned 32 bits
+ 612: spefscr (spefscr), unsigned 32 bits
+ 1124: vr0 (vr0), unsigned 128 bits
+ 1125: vr1 (vr1), unsigned 128 bits
+ 1126: vr2 (vr2), unsigned 128 bits
+ 1127: vr3 (vr3), unsigned 128 bits
+ 1128: vr4 (vr4), unsigned 128 bits
+ 1129: vr5 (vr5), unsigned 128 bits
+ 1130: vr6 (vr6), unsigned 128 bits
+ 1131: vr7 (vr7), unsigned 128 bits
+ 1132: vr8 (vr8), unsigned 128 bits
+ 1133: vr9 (vr9), unsigned 128 bits
+ 1134: vr10 (vr10), unsigned 128 bits
+ 1135: vr11 (vr11), unsigned 128 bits
+ 1136: vr12 (vr12), unsigned 128 bits
+ 1137: vr13 (vr13), unsigned 128 bits
+ 1138: vr14 (vr14), unsigned 128 bits
+ 1139: vr15 (vr15), unsigned 128 bits
+ 1140: vr16 (vr16), unsigned 128 bits
+ 1141: vr17 (vr17), unsigned 128 bits
+ 1142: vr18 (vr18), unsigned 128 bits
+ 1143: vr19 (vr19), unsigned 128 bits
+ 1144: vr20 (vr20), unsigned 128 bits
+ 1145: vr21 (vr21), unsigned 128 bits
+ 1146: vr22 (vr22), unsigned 128 bits
+ 1147: vr23 (vr23), unsigned 128 bits
+ 1148: vr24 (vr24), unsigned 128 bits
+ 1149: vr25 (vr25), unsigned 128 bits
+ 1150: vr26 (vr26), unsigned 128 bits
+ 1151: vr27 (vr27), unsigned 128 bits
+ 1152: vr28 (vr28), unsigned 128 bits
+ 1153: vr29 (vr29), unsigned 128 bits
+ 1154: vr30 (vr30), unsigned 128 bits
+ 1155: vr31 (vr31), unsigned 128 bits
+EOF
+
+regs_test testfile26 <<\EOF
+integer registers:
+ 0: %r0 (r0), signed 32 bits
+ 1: %r1 (r1), signed 32 bits
+ 2: %r2 (r2), signed 32 bits
+ 3: %r3 (r3), signed 32 bits
+ 4: %r4 (r4), signed 32 bits
+ 5: %r5 (r5), signed 32 bits
+ 6: %r6 (r6), signed 32 bits
+ 7: %r7 (r7), signed 32 bits
+ 8: %r8 (r8), signed 32 bits
+ 9: %r9 (r9), signed 32 bits
+ 10: %r10 (r10), signed 32 bits
+ 11: %r11 (r11), signed 32 bits
+ 12: %r12 (r12), signed 32 bits
+ 13: %r13 (r13), signed 32 bits
+ 14: %r14 (r14), signed 32 bits
+ 15: %r15 (r15), signed 32 bits
+FPU registers:
+ 16: %f0 (f0), float 64 bits
+ 17: %f2 (f2), float 64 bits
+ 18: %f4 (f4), float 64 bits
+ 19: %f6 (f6), float 64 bits
+ 20: %f1 (f1), float 64 bits
+ 21: %f3 (f3), float 64 bits
+ 22: %f5 (f5), float 64 bits
+ 23: %f7 (f7), float 64 bits
+ 24: %f8 (f8), float 64 bits
+ 25: %f10 (f10), float 64 bits
+ 26: %f12 (f12), float 64 bits
+ 27: %f14 (f14), float 64 bits
+ 28: %f9 (f9), float 64 bits
+ 29: %f11 (f11), float 64 bits
+ 30: %f13 (f13), float 64 bits
+ 31: %f15 (f15), float 64 bits
+access registers:
+ 48: %a0 (a0), unsigned 32 bits
+ 49: %a1 (a1), unsigned 32 bits
+ 50: %a2 (a2), unsigned 32 bits
+ 51: %a3 (a3), unsigned 32 bits
+ 52: %a4 (a4), unsigned 32 bits
+ 53: %a5 (a5), unsigned 32 bits
+ 54: %a6 (a6), unsigned 32 bits
+ 55: %a7 (a7), unsigned 32 bits
+ 56: %a8 (a8), unsigned 32 bits
+ 57: %a9 (a9), unsigned 32 bits
+ 58: %a10 (a10), unsigned 32 bits
+ 59: %a11 (a11), unsigned 32 bits
+ 60: %a12 (a12), unsigned 32 bits
+ 61: %a13 (a13), unsigned 32 bits
+ 62: %a14 (a14), unsigned 32 bits
+ 63: %a15 (a15), unsigned 32 bits
+control registers:
+ 32: %c0 (c0), unsigned 32 bits
+ 33: %c1 (c1), unsigned 32 bits
+ 34: %c2 (c2), unsigned 32 bits
+ 35: %c3 (c3), unsigned 32 bits
+ 36: %c4 (c4), unsigned 32 bits
+ 37: %c5 (c5), unsigned 32 bits
+ 38: %c6 (c6), unsigned 32 bits
+ 39: %c7 (c7), unsigned 32 bits
+ 40: %c8 (c8), unsigned 32 bits
+ 41: %c9 (c9), unsigned 32 bits
+ 42: %c10 (c10), unsigned 32 bits
+ 43: %c11 (c11), unsigned 32 bits
+ 44: %c12 (c12), unsigned 32 bits
+ 45: %c13 (c13), unsigned 32 bits
+ 46: %c14 (c14), unsigned 32 bits
+ 47: %c15 (c15), unsigned 32 bits
+ 64: %pswm (pswm), unsigned 32 bits
+ 65: %pswa (pswa), address 32 bits
+EOF
+
+regs_test testfile27 <<\EOF
+integer registers:
+ 0: %r0 (r0), signed 64 bits
+ 1: %r1 (r1), signed 64 bits
+ 2: %r2 (r2), signed 64 bits
+ 3: %r3 (r3), signed 64 bits
+ 4: %r4 (r4), signed 64 bits
+ 5: %r5 (r5), signed 64 bits
+ 6: %r6 (r6), signed 64 bits
+ 7: %r7 (r7), signed 64 bits
+ 8: %r8 (r8), signed 64 bits
+ 9: %r9 (r9), signed 64 bits
+ 10: %r10 (r10), signed 64 bits
+ 11: %r11 (r11), signed 64 bits
+ 12: %r12 (r12), signed 64 bits
+ 13: %r13 (r13), signed 64 bits
+ 14: %r14 (r14), signed 64 bits
+ 15: %r15 (r15), signed 64 bits
+FPU registers:
+ 16: %f0 (f0), float 64 bits
+ 17: %f2 (f2), float 64 bits
+ 18: %f4 (f4), float 64 bits
+ 19: %f6 (f6), float 64 bits
+ 20: %f1 (f1), float 64 bits
+ 21: %f3 (f3), float 64 bits
+ 22: %f5 (f5), float 64 bits
+ 23: %f7 (f7), float 64 bits
+ 24: %f8 (f8), float 64 bits
+ 25: %f10 (f10), float 64 bits
+ 26: %f12 (f12), float 64 bits
+ 27: %f14 (f14), float 64 bits
+ 28: %f9 (f9), float 64 bits
+ 29: %f11 (f11), float 64 bits
+ 30: %f13 (f13), float 64 bits
+ 31: %f15 (f15), float 64 bits
+access registers:
+ 48: %a0 (a0), unsigned 32 bits
+ 49: %a1 (a1), unsigned 32 bits
+ 50: %a2 (a2), unsigned 32 bits
+ 51: %a3 (a3), unsigned 32 bits
+ 52: %a4 (a4), unsigned 32 bits
+ 53: %a5 (a5), unsigned 32 bits
+ 54: %a6 (a6), unsigned 32 bits
+ 55: %a7 (a7), unsigned 32 bits
+ 56: %a8 (a8), unsigned 32 bits
+ 57: %a9 (a9), unsigned 32 bits
+ 58: %a10 (a10), unsigned 32 bits
+ 59: %a11 (a11), unsigned 32 bits
+ 60: %a12 (a12), unsigned 32 bits
+ 61: %a13 (a13), unsigned 32 bits
+ 62: %a14 (a14), unsigned 32 bits
+ 63: %a15 (a15), unsigned 32 bits
+control registers:
+ 32: %c0 (c0), unsigned 64 bits
+ 33: %c1 (c1), unsigned 64 bits
+ 34: %c2 (c2), unsigned 64 bits
+ 35: %c3 (c3), unsigned 64 bits
+ 36: %c4 (c4), unsigned 64 bits
+ 37: %c5 (c5), unsigned 64 bits
+ 38: %c6 (c6), unsigned 64 bits
+ 39: %c7 (c7), unsigned 64 bits
+ 40: %c8 (c8), unsigned 64 bits
+ 41: %c9 (c9), unsigned 64 bits
+ 42: %c10 (c10), unsigned 64 bits
+ 43: %c11 (c11), unsigned 64 bits
+ 44: %c12 (c12), unsigned 64 bits
+ 45: %c13 (c13), unsigned 64 bits
+ 46: %c14 (c14), unsigned 64 bits
+ 47: %c15 (c15), unsigned 64 bits
+ 64: %pswm (pswm), unsigned 64 bits
+ 65: %pswa (pswa), address 64 bits
+EOF
+
+regs_test testfile30 <<\EOF
+integer registers:
+ 0: %g0 (g0), signed 32 bits
+ 1: %g1 (g1), signed 32 bits
+ 2: %g2 (g2), signed 32 bits
+ 3: %g3 (g3), signed 32 bits
+ 4: %g4 (g4), signed 32 bits
+ 5: %g5 (g5), signed 32 bits
+ 6: %g6 (g6), signed 32 bits
+ 7: %g7 (g7), signed 32 bits
+ 8: %o0 (o0), signed 32 bits
+ 9: %o1 (o1), signed 32 bits
+ 10: %o2 (o2), signed 32 bits
+ 11: %o3 (o3), signed 32 bits
+ 12: %o4 (o4), signed 32 bits
+ 13: %o5 (o5), signed 32 bits
+ 14: %o6 (o6), address 32 bits
+ 15: %o7 (o7), signed 32 bits
+ 16: %l0 (l0), signed 32 bits
+ 17: %l1 (l1), signed 32 bits
+ 18: %l2 (l2), signed 32 bits
+ 19: %l3 (l3), signed 32 bits
+ 20: %l4 (l4), signed 32 bits
+ 21: %l5 (l5), signed 32 bits
+ 22: %l6 (l6), signed 32 bits
+ 23: %l7 (l7), signed 32 bits
+ 24: %i0 (i0), signed 32 bits
+ 25: %i1 (i1), signed 32 bits
+ 26: %i2 (i2), signed 32 bits
+ 27: %i3 (i3), signed 32 bits
+ 28: %i4 (i4), signed 32 bits
+ 29: %i5 (i5), signed 32 bits
+ 30: %i6 (i6), address 32 bits
+ 31: %i7 (i7), signed 32 bits
+FPU registers:
+ 32: %f0 (f0), float 32 bits
+ 33: %f1 (f1), float 32 bits
+ 34: %f2 (f2), float 32 bits
+ 35: %f3 (f3), float 32 bits
+ 36: %f4 (f4), float 32 bits
+ 37: %f5 (f5), float 32 bits
+ 38: %f6 (f6), float 32 bits
+ 39: %f7 (f7), float 32 bits
+ 40: %f8 (f8), float 32 bits
+ 41: %f9 (f9), float 32 bits
+ 42: %f10 (f10), float 32 bits
+ 43: %f11 (f11), float 32 bits
+ 44: %f12 (f12), float 32 bits
+ 45: %f13 (f13), float 32 bits
+ 46: %f14 (f14), float 32 bits
+ 47: %f15 (f15), float 32 bits
+ 48: %f16 (f16), float 32 bits
+ 49: %f17 (f17), float 32 bits
+ 50: %f18 (f18), float 32 bits
+ 51: %f19 (f19), float 32 bits
+ 52: %f20 (f20), float 32 bits
+ 53: %f21 (f21), float 32 bits
+ 54: %f22 (f22), float 32 bits
+ 55: %f23 (f23), float 32 bits
+ 56: %f24 (f24), float 32 bits
+ 57: %f25 (f25), float 32 bits
+ 58: %f26 (f26), float 32 bits
+ 59: %f27 (f27), float 32 bits
+ 60: %f28 (f28), float 32 bits
+ 61: %f29 (f29), float 32 bits
+ 62: %f30 (f30), float 32 bits
+ 63: %f31 (f31), float 32 bits
+control registers:
+ 64: %y (y), unsigned 32 bits
+ 65: %psr (psr), unsigned 32 bits
+ 66: %wim (wim), unsigned 32 bits
+ 67: %tbr (tbr), unsigned 32 bits
+ 68: %pc (pc), address 32 bits
+ 69: %npc (npc), address 32 bits
+ 70: %fsr (fsr), unsigned 32 bits
+ 71: %csr (csr), unsigned 32 bits
+EOF
+
+regs_test testfile31 <<\EOF
+integer registers:
+ 0: %g0 (g0), signed 64 bits
+ 1: %g1 (g1), signed 64 bits
+ 2: %g2 (g2), signed 64 bits
+ 3: %g3 (g3), signed 64 bits
+ 4: %g4 (g4), signed 64 bits
+ 5: %g5 (g5), signed 64 bits
+ 6: %g6 (g6), signed 64 bits
+ 7: %g7 (g7), signed 64 bits
+ 8: %o0 (o0), signed 64 bits
+ 9: %o1 (o1), signed 64 bits
+ 10: %o2 (o2), signed 64 bits
+ 11: %o3 (o3), signed 64 bits
+ 12: %o4 (o4), signed 64 bits
+ 13: %o5 (o5), signed 64 bits
+ 14: %o6 (o6), address 64 bits
+ 15: %o7 (o7), signed 64 bits
+ 16: %l0 (l0), signed 64 bits
+ 17: %l1 (l1), signed 64 bits
+ 18: %l2 (l2), signed 64 bits
+ 19: %l3 (l3), signed 64 bits
+ 20: %l4 (l4), signed 64 bits
+ 21: %l5 (l5), signed 64 bits
+ 22: %l6 (l6), signed 64 bits
+ 23: %l7 (l7), signed 64 bits
+ 24: %i0 (i0), signed 64 bits
+ 25: %i1 (i1), signed 64 bits
+ 26: %i2 (i2), signed 64 bits
+ 27: %i3 (i3), signed 64 bits
+ 28: %i4 (i4), signed 64 bits
+ 29: %i5 (i5), signed 64 bits
+ 30: %i6 (i6), address 64 bits
+ 31: %i7 (i7), signed 64 bits
+FPU registers:
+ 32: %f0 (f0), float 32 bits
+ 33: %f1 (f1), float 32 bits
+ 34: %f2 (f2), float 32 bits
+ 35: %f3 (f3), float 32 bits
+ 36: %f4 (f4), float 32 bits
+ 37: %f5 (f5), float 32 bits
+ 38: %f6 (f6), float 32 bits
+ 39: %f7 (f7), float 32 bits
+ 40: %f8 (f8), float 32 bits
+ 41: %f9 (f9), float 32 bits
+ 42: %f10 (f10), float 32 bits
+ 43: %f11 (f11), float 32 bits
+ 44: %f12 (f12), float 32 bits
+ 45: %f13 (f13), float 32 bits
+ 46: %f14 (f14), float 32 bits
+ 47: %f15 (f15), float 32 bits
+ 48: %f16 (f16), float 32 bits
+ 49: %f17 (f17), float 32 bits
+ 50: %f18 (f18), float 32 bits
+ 51: %f19 (f19), float 32 bits
+ 52: %f20 (f20), float 32 bits
+ 53: %f21 (f21), float 32 bits
+ 54: %f22 (f22), float 32 bits
+ 55: %f23 (f23), float 32 bits
+ 56: %f24 (f24), float 32 bits
+ 57: %f25 (f25), float 32 bits
+ 58: %f26 (f26), float 32 bits
+ 59: %f27 (f27), float 32 bits
+ 60: %f28 (f28), float 32 bits
+ 61: %f29 (f29), float 32 bits
+ 62: %f30 (f30), float 32 bits
+ 63: %f31 (f31), float 32 bits
+ 64: %f32 (f32), float 64 bits
+ 65: %f34 (f34), float 64 bits
+ 66: %f36 (f36), float 64 bits
+ 67: %f38 (f38), float 64 bits
+ 68: %f40 (f40), float 64 bits
+ 69: %f42 (f42), float 64 bits
+ 70: %f44 (f44), float 64 bits
+ 71: %f46 (f46), float 64 bits
+ 72: %f48 (f48), float 64 bits
+ 73: %f50 (f50), float 64 bits
+ 74: %f52 (f52), float 64 bits
+ 75: %f54 (f54), float 64 bits
+ 76: %f56 (f56), float 64 bits
+ 77: %f58 (f58), float 64 bits
+ 78: %f60 (f60), float 64 bits
+ 79: %f62 (f62), float 64 bits
+control registers:
+ 80: %pc (pc), address 64 bits
+ 81: %npc (npc), address 64 bits
+ 82: %state (state), unsigned 64 bits
+ 83: %fsr (fsr), unsigned 64 bits
+ 84: %fprs (fprs), unsigned 64 bits
+ 85: %y (y), unsigned 64 bits
+EOF
+
+regs_test testfile10 <<\EOF
+integer registers:
+ 0: $v0 (v0), signed 64 bits
+ 1: $t0 (t0), signed 64 bits
+ 2: $t1 (t1), signed 64 bits
+ 3: $t2 (t2), signed 64 bits
+ 4: $t3 (t3), signed 64 bits
+ 5: $t4 (t4), signed 64 bits
+ 6: $t5 (t5), signed 64 bits
+ 7: $t6 (t6), signed 64 bits
+ 8: $t7 (t7), signed 64 bits
+ 9: $s0 (s0), signed 64 bits
+ 10: $s1 (s1), signed 64 bits
+ 11: $s2 (s2), signed 64 bits
+ 12: $s3 (s3), signed 64 bits
+ 13: $s4 (s4), signed 64 bits
+ 14: $s5 (s5), signed 64 bits
+ 15: $s6 (s6), signed 64 bits
+ 16: $a0 (a0), signed 64 bits
+ 17: $a1 (a1), signed 64 bits
+ 18: $a2 (a2), signed 64 bits
+ 19: $a3 (a3), signed 64 bits
+ 20: $a4 (a4), signed 64 bits
+ 21: $a5 (a5), signed 64 bits
+ 22: $t8 (t8), signed 64 bits
+ 23: $t9 (t9), signed 64 bits
+ 24: $t10 (t10), signed 64 bits
+ 25: $t11 (t11), signed 64 bits
+ 26: $ra (ra), address 64 bits
+ 27: $t12 (t12), signed 64 bits
+ 28: $at (at), signed 64 bits
+ 29: $gp (gp), address 64 bits
+ 30: $sp (sp), address 64 bits
+ 31: $zero (zero), signed 64 bits
+ 64: $pc (pc), address 64 bits
+ 66: $unique (unique), address 64 bits
+FPU registers:
+ 32: $f0 (f0), float 64 bits
+ 33: $f1 (f1), float 64 bits
+ 34: $f2 (f2), float 64 bits
+ 35: $f3 (f3), float 64 bits
+ 36: $f4 (f4), float 64 bits
+ 37: $f5 (f5), float 64 bits
+ 38: $f6 (f6), float 64 bits
+ 39: $f7 (f7), float 64 bits
+ 40: $f8 (f8), float 64 bits
+ 41: $f9 (f9), float 64 bits
+ 42: $f10 (f10), float 64 bits
+ 43: $f11 (f11), float 64 bits
+ 44: $f12 (f12), float 64 bits
+ 45: $f13 (f13), float 64 bits
+ 46: $f14 (f14), float 64 bits
+ 47: $f15 (f15), float 64 bits
+ 48: $f16 (f16), float 64 bits
+ 49: $f17 (f17), float 64 bits
+ 50: $f18 (f18), float 64 bits
+ 51: $f19 (f19), float 64 bits
+ 52: $f20 (f20), float 64 bits
+ 53: $f21 (f21), float 64 bits
+ 54: $f22 (f22), float 64 bits
+ 55: $f23 (f23), float 64 bits
+ 56: $f24 (f24), float 64 bits
+ 57: $f25 (f25), float 64 bits
+ 58: $f26 (f26), float 64 bits
+ 59: $f27 (f27), float 64 bits
+ 60: $f28 (f28), float 64 bits
+ 61: $f29 (f29), float 64 bits
+ 62: $f30 (f30), float 64 bits
+ 63: $fpcr (fpcr), unsigned 64 bits
+EOF
+
+regs_test testfile60 <<\EOF
+integer registers:
+ 0: r0 (r0), signed 64 bits
+ 1: r1 (r1), signed 64 bits
+ 2: r2 (r2), signed 64 bits
+ 3: r3 (r3), signed 64 bits
+ 4: r4 (r4), signed 64 bits
+ 5: r5 (r5), signed 64 bits
+ 6: r6 (r6), signed 64 bits
+ 7: r7 (r7), signed 64 bits
+ 8: r8 (r8), signed 64 bits
+ 9: r9 (r9), signed 64 bits
+ 10: r10 (r10), signed 64 bits
+ 11: r11 (r11), signed 64 bits
+ 12: r12 (r12), signed 64 bits
+ 13: r13 (r13), signed 64 bits
+ 14: r14 (r14), signed 64 bits
+ 15: r15 (r15), signed 64 bits
+ 16: r16 (r16), signed 64 bits
+ 17: r17 (r17), signed 64 bits
+ 18: r18 (r18), signed 64 bits
+ 19: r19 (r19), signed 64 bits
+ 20: r20 (r20), signed 64 bits
+ 21: r21 (r21), signed 64 bits
+ 22: r22 (r22), signed 64 bits
+ 23: r23 (r23), signed 64 bits
+ 24: r24 (r24), signed 64 bits
+ 25: r25 (r25), signed 64 bits
+ 26: r26 (r26), signed 64 bits
+ 27: r27 (r27), signed 64 bits
+ 28: r28 (r28), signed 64 bits
+ 29: r29 (r29), signed 64 bits
+ 30: r30 (r30), signed 64 bits
+ 31: r31 (r31), signed 64 bits
+ 32: r32 (r32), signed 64 bits
+ 33: r33 (r33), signed 64 bits
+ 34: r34 (r34), signed 64 bits
+ 35: r35 (r35), signed 64 bits
+ 36: r36 (r36), signed 64 bits
+ 37: r37 (r37), signed 64 bits
+ 38: r38 (r38), signed 64 bits
+ 39: r39 (r39), signed 64 bits
+ 40: r40 (r40), signed 64 bits
+ 41: r41 (r41), signed 64 bits
+ 42: r42 (r42), signed 64 bits
+ 43: r43 (r43), signed 64 bits
+ 44: r44 (r44), signed 64 bits
+ 45: r45 (r45), signed 64 bits
+ 46: r46 (r46), signed 64 bits
+ 47: r47 (r47), signed 64 bits
+ 48: r48 (r48), signed 64 bits
+ 49: r49 (r49), signed 64 bits
+ 50: r50 (r50), signed 64 bits
+ 51: r51 (r51), signed 64 bits
+ 52: r52 (r52), signed 64 bits
+ 53: tp (tp), address 64 bits
+ 54: sp (sp), address 64 bits
+ 55: lr (lr), address 64 bits
+ 56: sn (sn), unsigned 64 bits
+ 57: idn0 (idn0), unsigned 64 bits
+ 58: idn1 (idn1), unsigned 64 bits
+ 59: udn0 (udn0), unsigned 64 bits
+ 60: udn1 (udn1), unsigned 64 bits
+ 61: udn2 (udn2), unsigned 64 bits
+ 62: udn3 (udn3), unsigned 64 bits
+ 63: zero (zero), unsigned 64 bits
+ 64: pc (pc), address 64 bits
+EOF
+
+regs_test testfile61 <<\EOF
+integer registers:
+ 0: r0 (r0), signed 32 bits
+ 1: r1 (r1), signed 32 bits
+ 2: r2 (r2), signed 32 bits
+ 3: r3 (r3), signed 32 bits
+ 4: r4 (r4), signed 32 bits
+ 5: r5 (r5), signed 32 bits
+ 6: r6 (r6), signed 32 bits
+ 7: r7 (r7), signed 32 bits
+ 8: r8 (r8), signed 32 bits
+ 9: r9 (r9), signed 32 bits
+ 10: r10 (r10), signed 32 bits
+ 11: r11 (r11), signed 32 bits
+ 12: r12 (r12), signed 32 bits
+ 13: sp (sp), address 32 bits
+ 14: lr (lr), address 32 bits
+ 15: pc (pc), address 32 bits
+ 128: spsr (spsr), unsigned 32 bits
+FPA registers:
+ 16: f0 (f0), float 96 bits
+ 17: f1 (f1), float 96 bits
+ 18: f2 (f2), float 96 bits
+ 19: f3 (f3), float 96 bits
+ 20: f4 (f4), float 96 bits
+ 21: f5 (f5), float 96 bits
+ 22: f6 (f6), float 96 bits
+ 23: f7 (f7), float 96 bits
+ 96: f0 (f0), float 96 bits
+ 97: f1 (f1), float 96 bits
+ 98: f2 (f2), float 96 bits
+ 99: f3 (f3), float 96 bits
+ 100: f4 (f4), float 96 bits
+ 101: f5 (f5), float 96 bits
+ 102: f6 (f6), float 96 bits
+ 103: f7 (f7), float 96 bits
+VFP registers:
+ 256: d0 (d0), float 64 bits
+ 257: d1 (d1), float 64 bits
+ 258: d2 (d2), float 64 bits
+ 259: d3 (d3), float 64 bits
+ 260: d4 (d4), float 64 bits
+ 261: d5 (d5), float 64 bits
+ 262: d6 (d6), float 64 bits
+ 263: d7 (d7), float 64 bits
+ 264: d8 (d8), float 64 bits
+ 265: d9 (d9), float 64 bits
+ 266: d10 (d10), float 64 bits
+ 267: d11 (d11), float 64 bits
+ 268: d12 (d12), float 64 bits
+ 269: d13 (d13), float 64 bits
+ 270: d14 (d14), float 64 bits
+ 271: d15 (d15), float 64 bits
+ 272: d16 (d16), float 64 bits
+ 273: d17 (d17), float 64 bits
+ 274: d18 (d18), float 64 bits
+ 275: d19 (d19), float 64 bits
+ 276: d20 (d20), float 64 bits
+ 277: d21 (d21), float 64 bits
+ 278: d22 (d22), float 64 bits
+ 279: d23 (d23), float 64 bits
+ 280: d24 (d24), float 64 bits
+ 281: d25 (d25), float 64 bits
+ 282: d26 (d26), float 64 bits
+ 283: d27 (d27), float 64 bits
+ 284: d28 (d28), float 64 bits
+ 285: d29 (d29), float 64 bits
+ 286: d30 (d30), float 64 bits
+ 287: d31 (d31), float 64 bits
+EOF
+
+# See run-readelf-mixed-corenote.sh for instructions to regenerate
+# this core file.
+regs_test testfile_aarch64_core <<\EOF
+integer registers:
+ 0: x0 (x0), signed 64 bits
+ 1: x1 (x1), signed 64 bits
+ 2: x2 (x2), signed 64 bits
+ 3: x3 (x3), signed 64 bits
+ 4: x4 (x4), signed 64 bits
+ 5: x5 (x5), signed 64 bits
+ 6: x6 (x6), signed 64 bits
+ 7: x7 (x7), signed 64 bits
+ 8: x8 (x8), signed 64 bits
+ 9: x9 (x9), signed 64 bits
+ 10: x10 (x10), signed 64 bits
+ 11: x11 (x11), signed 64 bits
+ 12: x12 (x12), signed 64 bits
+ 13: x13 (x13), signed 64 bits
+ 14: x14 (x14), signed 64 bits
+ 15: x15 (x15), signed 64 bits
+ 16: x16 (x16), signed 64 bits
+ 17: x17 (x17), signed 64 bits
+ 18: x18 (x18), signed 64 bits
+ 19: x19 (x19), signed 64 bits
+ 20: x20 (x20), signed 64 bits
+ 21: x21 (x21), signed 64 bits
+ 22: x22 (x22), signed 64 bits
+ 23: x23 (x23), signed 64 bits
+ 24: x24 (x24), signed 64 bits
+ 25: x25 (x25), signed 64 bits
+ 26: x26 (x26), signed 64 bits
+ 27: x27 (x27), signed 64 bits
+ 28: x28 (x28), signed 64 bits
+ 29: x29 (x29), signed 64 bits
+ 30: x30 (x30), signed 64 bits
+ 31: sp (sp), address 64 bits
+ 33: elr (elr), address 64 bits
+FP/SIMD registers:
+ 64: v0 (v0), unsigned 128 bits
+ 65: v1 (v1), unsigned 128 bits
+ 66: v2 (v2), unsigned 128 bits
+ 67: v3 (v3), unsigned 128 bits
+ 68: v4 (v4), unsigned 128 bits
+ 69: v5 (v5), unsigned 128 bits
+ 70: v6 (v6), unsigned 128 bits
+ 71: v7 (v7), unsigned 128 bits
+ 72: v8 (v8), unsigned 128 bits
+ 73: v9 (v9), unsigned 128 bits
+ 74: v10 (v10), unsigned 128 bits
+ 75: v11 (v11), unsigned 128 bits
+ 76: v12 (v12), unsigned 128 bits
+ 77: v13 (v13), unsigned 128 bits
+ 78: v14 (v14), unsigned 128 bits
+ 79: v15 (v15), unsigned 128 bits
+ 80: v16 (v16), unsigned 128 bits
+ 81: v17 (v17), unsigned 128 bits
+ 82: v18 (v18), unsigned 128 bits
+ 83: v19 (v19), unsigned 128 bits
+ 84: v20 (v20), unsigned 128 bits
+ 85: v21 (v21), unsigned 128 bits
+ 86: v22 (v22), unsigned 128 bits
+ 87: v23 (v23), unsigned 128 bits
+ 88: v24 (v24), unsigned 128 bits
+ 89: v25 (v25), unsigned 128 bits
+ 90: v26 (v26), unsigned 128 bits
+ 91: v27 (v27), unsigned 128 bits
+ 92: v28 (v28), unsigned 128 bits
+ 93: v29 (v29), unsigned 128 bits
+ 94: v30 (v30), unsigned 128 bits
+ 95: v31 (v31), unsigned 128 bits
+EOF
+
+exit 0
diff --git a/src/tests/run-arextract.sh b/src/tests/run-arextract.sh
new file mode 100755
index 00000000..44f4a525
--- /dev/null
+++ b/src/tests/run-arextract.sh
@@ -0,0 +1,40 @@
+#! /bin/sh
+# Copyright (C) 1999, 2000, 2002, 2005, 2006 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+tempfiles arextract.test
+
+archive=${abs_top_builddir}/libelf/libelf.a
+if test -f $archive; then
+ # The file is really available (i.e., no shared-only built).
+ echo -n "Extracting symbols... $ac_c"
+
+ # The files we are looking at.
+ for f in ${abs_top_builddir}/libelf/*.o; do
+ testrun ${abs_builddir}/arextract $archive `basename $f` arextract.test || exit 1
+ cmp $f arextract.test || {
+ echo "Extraction of $1 failed"
+ exit 1
+ }
+ done
+
+ echo "done"
+fi
+
+exit 0
diff --git a/src/tests/run-arsymtest.sh b/src/tests/run-arsymtest.sh
new file mode 100755
index 00000000..b0fdfcd6
--- /dev/null
+++ b/src/tests/run-arsymtest.sh
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 1999, 2000, 2002, 2006 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+lib=${abs_top_builddir}/libelf/libelf.a
+okfile=arsymtest.ok
+tmpfile=arsymtest.tmp
+testfile=arsymtest.test
+
+tempfiles $okfile $tmpfile $testfile
+
+result=77
+if test -f $lib; then
+ # Generate list using `nm' we check against.
+ ${NM} -s $lib |
+ sed -e '1,/^Arch/d' -e '/^$/,$d' |
+ sort > $okfile
+
+ # Now run our program using libelf.
+ testrun ${abs_builddir}/arsymtest $lib $tmpfile || exit 1
+ sort $tmpfile > $testfile
+
+ # Compare the outputs.
+ if cmp $okfile $testfile; then
+ result=0
+ else
+ result=1
+ fi
+fi
+
+exit $result
diff --git a/src/tests/run-backtrace-core-aarch64.sh b/src/tests/run-backtrace-core-aarch64.sh
new file mode 100755
index 00000000..a29a6613
--- /dev/null
+++ b/src/tests/run-backtrace-core-aarch64.sh
@@ -0,0 +1,23 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/backtrace-subr.sh
+
+# backtrace.aarch64.exe is a -static binary of backtrace-child.
+# backtrace.aarch64.core was generated by running the static backtrace-child
+# with --gencore.
+check_core aarch64
diff --git a/src/tests/run-backtrace-core-i386.sh b/src/tests/run-backtrace-core-i386.sh
new file mode 100755
index 00000000..7294ec3d
--- /dev/null
+++ b/src/tests/run-backtrace-core-i386.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/backtrace-subr.sh
+
+check_core i386
diff --git a/src/tests/run-backtrace-core-ppc.sh b/src/tests/run-backtrace-core-ppc.sh
new file mode 100755
index 00000000..65c92795
--- /dev/null
+++ b/src/tests/run-backtrace-core-ppc.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/backtrace-subr.sh
+
+check_core ppc
diff --git a/src/tests/run-backtrace-core-s390.sh b/src/tests/run-backtrace-core-s390.sh
new file mode 100755
index 00000000..d3b6dc9c
--- /dev/null
+++ b/src/tests/run-backtrace-core-s390.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/backtrace-subr.sh
+
+check_core s390
diff --git a/src/tests/run-backtrace-core-s390x.sh b/src/tests/run-backtrace-core-s390x.sh
new file mode 100755
index 00000000..c3e236d4
--- /dev/null
+++ b/src/tests/run-backtrace-core-s390x.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/backtrace-subr.sh
+
+check_core s390x
diff --git a/src/tests/run-backtrace-core-x86_64.sh b/src/tests/run-backtrace-core-x86_64.sh
new file mode 100755
index 00000000..d00cd6d6
--- /dev/null
+++ b/src/tests/run-backtrace-core-x86_64.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/backtrace-subr.sh
+
+check_core x86_64
diff --git a/src/tests/run-backtrace-data.sh b/src/tests/run-backtrace-data.sh
new file mode 100755
index 00000000..34a4f01d
--- /dev/null
+++ b/src/tests/run-backtrace-data.sh
@@ -0,0 +1,28 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/backtrace-subr.sh
+
+# This test really cannot be run under valgrind, it tries to introspect
+# its own maps and registers and will find valgrinds instead.
+unset VALGRIND_CMD
+
+tempfiles data.{bt,err}
+(set +ex; testrun ${abs_builddir}/backtrace-data 1>data.bt 2>data.err; true)
+cat data.{bt,err}
+check_unsupported data.err data
+check_all data.{bt,err} data
diff --git a/src/tests/run-backtrace-demangle.sh b/src/tests/run-backtrace-demangle.sh
new file mode 100755
index 00000000..6e18e77f
--- /dev/null
+++ b/src/tests/run-backtrace-demangle.sh
@@ -0,0 +1,46 @@
+#! /bin/bash
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if test -n "$ELFUTILS_DISABLE_DEMANGLE"; then
+ exit 77
+fi
+
+. $srcdir/backtrace-subr.sh
+
+child=testfile-backtrace-demangle
+testfiles $child{,.core}
+tempfiles $child.{bt,err}
+
+# There can be more than 3 frames, but depending on the system/installed
+# glibc we might not be able to unwind fully till the end.
+# cxxfunc -> f -> main
+# Expect to see the top two and a warning that there are more frames
+# (exit code 1)
+testrun ${abs_top_builddir}/src/stack -n 2 -e $child --core $child.core >$child.bt 2>$child.err || exitcode=$?
+cat $child.{bt,err}
+if test $exitcode != 1 || ! grep "shown max number of frames" $child.err; then
+ echo >&2 $2: expected more than 2 frames
+ false
+fi
+if ! grep -w f $child.bt; then
+ echo >&2 $2: no f
+ false
+fi
+if ! grep ' cxxfunc(int)' $child.bt; then
+ echo >&2 $2: no cxxfunc
+ false
+fi
diff --git a/src/tests/run-backtrace-dwarf.sh b/src/tests/run-backtrace-dwarf.sh
new file mode 100755
index 00000000..8834048a
--- /dev/null
+++ b/src/tests/run-backtrace-dwarf.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/backtrace-subr.sh
+
+# This test really cannot be run under valgrind, it tries to introspect
+# itself through ptrace and will find bits and pieces of valgrind.
+# On top of that valgrind also tries to read all the unwind info and
+# will warn and complain about various opcodes it doesn't understand...
+unset VALGRIND_CMD
+
+tempfiles dwarf.{bt,err}
+(set +ex; testrun ${abs_builddir}/backtrace-dwarf 1>dwarf.bt 2>dwarf.err; true)
+cat dwarf.{bt,err}
+check_native_unsupported dwarf.err dwarf
+check_main dwarf.bt dwarf
diff --git a/src/tests/run-backtrace-native-biarch.sh b/src/tests/run-backtrace-native-biarch.sh
new file mode 100755
index 00000000..3a407c89
--- /dev/null
+++ b/src/tests/run-backtrace-native-biarch.sh
@@ -0,0 +1,24 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if test -n "$ELFUTILS_DISABLE_BIARCH"; then
+ exit 77
+fi
+
+. $srcdir/backtrace-subr.sh
+
+check_native backtrace-child-biarch
diff --git a/src/tests/run-backtrace-native-core-biarch.sh b/src/tests/run-backtrace-native-core-biarch.sh
new file mode 100755
index 00000000..fbd80256
--- /dev/null
+++ b/src/tests/run-backtrace-native-core-biarch.sh
@@ -0,0 +1,24 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if test -n "$ELFUTILS_DISABLE_BIARCH"; then
+ exit 77
+fi
+
+. $srcdir/backtrace-subr.sh
+
+check_native_core backtrace-child-biarch
diff --git a/src/tests/run-backtrace-native-core.sh b/src/tests/run-backtrace-native-core.sh
new file mode 100755
index 00000000..cb025a56
--- /dev/null
+++ b/src/tests/run-backtrace-native-core.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/backtrace-subr.sh
+
+check_native_core backtrace-child
diff --git a/src/tests/run-backtrace-native.sh b/src/tests/run-backtrace-native.sh
new file mode 100755
index 00000000..ddae345d
--- /dev/null
+++ b/src/tests/run-backtrace-native.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/backtrace-subr.sh
+
+check_native backtrace-child
diff --git a/src/tests/run-bug1-test.sh b/src/tests/run-bug1-test.sh
new file mode 100755
index 00000000..1e78a18c
--- /dev/null
+++ b/src/tests/run-bug1-test.sh
@@ -0,0 +1,34 @@
+#! /bin/sh
+# Copyright (C) 2006 Red Hat, Inc.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2006.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile28 testfile28.rdwr
+
+testrun ${abs_builddir}/rdwrmmap testfile28
+
+cmp testfile28 testfile28.rdwr
+
+test_cleanup
+
+testfiles testfile29 testfile29.rdwr
+
+testrun ${abs_builddir}/rdwrmmap testfile29
+
+cmp testfile29 testfile29.rdwr
+
+exit 0
diff --git a/src/tests/run-buildid.sh b/src/tests/run-buildid.sh
new file mode 100755
index 00000000..31cec24d
--- /dev/null
+++ b/src/tests/run-buildid.sh
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Just some random testfiles, four with, one without build-id,
+# and one without shdrs forcing reading the notes through phdrs.
+# eu-strip --strip-sections -g --output=testfile42_noshdrs testfile42
+# See also run-debugaltlink.sh.
+testfiles testfile42 testfile_multi.dwz testfile-dwzstr.multi \
+ test-offset-loop.alt testfile14 testfile42_noshdrs
+
+testrun_compare ${abs_builddir}/buildid testfile42 testfile42_noshdrs \
+ testfile_multi.dwz testfile-dwzstr.multi \
+ test-offset-loop.alt testfile14 <<\EOF
+testfile42: build ID: d826d96c4d097bdc5c254b1f7344a907e36b0439
+testfile42_noshdrs: build ID: d826d96c4d097bdc5c254b1f7344a907e36b0439
+testfile_multi.dwz: build ID: a0d6c06e0d912d74033b6fe2808753cae8f6f594
+testfile-dwzstr.multi: build ID: 6da22627dae55c1d62cf9122827c665e240a056b
+test-offset-loop.alt: build ID: 066bbf1a7bc5676f5015ee1966a088f23bdb83ae
+testfile14: <no NT_GNU_BUILD_ID note>
+EOF
+
+exit 0
diff --git a/src/tests/run-debugaltlink.sh b/src/tests/run-debugaltlink.sh
new file mode 100755
index 00000000..fa7dd268
--- /dev/null
+++ b/src/tests/run-debugaltlink.sh
@@ -0,0 +1,34 @@
+#! /bin/sh
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Just some random testfiles, four with, one without .gnu_debugaltlink
+testfiles testfile42 testfile_multi_main testfile-dwzstr \
+ test-offset-loop libtestfile_multi_shared.so
+
+testrun_compare ${abs_builddir}/debugaltlink testfile42 \
+ testfile_multi_main testfile-dwzstr \
+ test-offset-loop libtestfile_multi_shared.so <<\EOF
+testfile42: <no .gnu_debugaltlink section>
+testfile_multi_main: testfile_multi.dwz, build ID: a0d6c06e0d912d74033b6fe2808753cae8f6f594
+testfile-dwzstr: testfile-dwzstr.multi, build ID: 6da22627dae55c1d62cf9122827c665e240a056b
+test-offset-loop: test-offset-loop.alt, build ID: 066bbf1a7bc5676f5015ee1966a088f23bdb83ae
+libtestfile_multi_shared.so: testfile_multi.dwz, build ID: a0d6c06e0d912d74033b6fe2808753cae8f6f594
+EOF
+
+exit 0
diff --git a/src/tests/run-debuglink.sh b/src/tests/run-debuglink.sh
new file mode 100755
index 00000000..42a816cb
--- /dev/null
+++ b/src/tests/run-debuglink.sh
@@ -0,0 +1,29 @@
+#! /bin/sh
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Just some random testfiles, two with, one without .gnu_debuglink
+testfiles testfile36 testfile52-32.so testfile42
+
+testrun_compare ${abs_builddir}/debuglink testfile36 testfile52-32.so testfile42 <<\EOF
+testfile36: testfile36.debug, crc: 8c5c20a3
+testfile52-32.so: testfile52-32.so.debug, crc: b835a71d
+testfile42: <no gnu_debuglink file>
+EOF
+
+exit 0
diff --git a/src/tests/run-deleted.sh b/src/tests/run-deleted.sh
new file mode 100755
index 00000000..2b5a9a84
--- /dev/null
+++ b/src/tests/run-deleted.sh
@@ -0,0 +1,48 @@
+#! /bin/bash
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/backtrace-subr.sh
+
+tempfiles deleted deleted-lib.so
+cp -p ${abs_builddir}/deleted ${abs_builddir}/deleted-lib.so .
+
+# We don't want to run the deleted process under valgrind then
+# stack will see the valgrind process backtrace.
+OLD_VALGRIND_CMD="$VALGRIND_CMD"
+unset VALGRIND_CMD
+
+pid=$(testrun ${abs_builddir}/deleted)
+sleep 1
+rm -f deleted deleted-lib.so
+tempfiles bt bt.err
+
+set VALGRIND_CMD="$OLD_VALGRIND_CMD"
+# It may have non-zero exit code with:
+# .../elfutils/src/stack: dwfl_thread_getframes tid 26376 at 0x4006c8 in .../elfutils/tests/deleted: no matching address range
+testrun ${abs_top_builddir}/src/stack -p $pid 1>bt 2>bt.err || true
+cat bt bt.err
+kill -9 $pid
+wait
+check_native_unsupported bt.err deleted
+# For PPC64 we need access to the OPD table which we get through the shdrs
+# (see backends/ppc64_init.c) but for the deleted-lib we only have phdrs.
+# So we don't have the name of the function. But since we should find
+# the EH_FRAME through phdrs just fine, we can unwind into main.
+if test "`uname -m`" != "ppc64"; then
+ grep -qw libfunc bt
+fi
+grep -qw main bt
diff --git a/src/tests/run-disasm-x86-64.sh b/src/tests/run-disasm-x86-64.sh
new file mode 100755
index 00000000..a6be62bb
--- /dev/null
+++ b/src/tests/run-disasm-x86-64.sh
@@ -0,0 +1,28 @@
+#! /bin/sh
+# Copyright (C) 2007, 2008 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Run x86-64 test.
+case "`uname -m`" in
+ x86_64)
+ tempfiles testfile45.o
+ testfiles testfile45.S testfile45.expect
+ gcc -m64 -c -o testfile45.o testfile45.S
+ testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect
+ ;;
+esac
diff --git a/src/tests/run-disasm-x86.sh b/src/tests/run-disasm-x86.sh
new file mode 100755
index 00000000..28a3df74
--- /dev/null
+++ b/src/tests/run-disasm-x86.sh
@@ -0,0 +1,28 @@
+#! /bin/sh
+# Copyright (C) 2007, 2008 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Run x86 test.
+case "`uname -m`" in
+ x86_64 | i?86 )
+ tempfiles testfile44.o
+ testfiles testfile44.S testfile44.expect
+ gcc -m32 -c -o testfile44.o testfile44.S
+ testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect
+ ;;
+esac
diff --git a/src/tests/run-dwarf-getmacros.sh b/src/tests/run-dwarf-getmacros.sh
new file mode 100755
index 00000000..0a488fa3
--- /dev/null
+++ b/src/tests/run-dwarf-getmacros.sh
@@ -0,0 +1,710 @@
+#! /bin/sh
+# Copyright (C) 2009, 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile51
+
+testrun_compare ${abs_builddir}/dwarf-getmacros testfile51 0xb <<\EOF
+file /home/petr/proj/elfutils/pending/elfutils/tests/decom/x.c
+ __STDC__ 1
+ __STDC_HOSTED__ 1
+ __GNUC__ 4
+ __GNUC_MINOR__ 3
+ __GNUC_PATCHLEVEL__ 2
+ __GNUC_RH_RELEASE__ 7
+ __SIZE_TYPE__ long unsigned int
+ __PTRDIFF_TYPE__ long int
+ __WCHAR_TYPE__ int
+ __WINT_TYPE__ unsigned int
+ __INTMAX_TYPE__ long int
+ __UINTMAX_TYPE__ long unsigned int
+ __GXX_ABI_VERSION 1002
+ __SCHAR_MAX__ 127
+ __SHRT_MAX__ 32767
+ __INT_MAX__ 2147483647
+ __LONG_MAX__ 9223372036854775807L
+ __LONG_LONG_MAX__ 9223372036854775807LL
+ __WCHAR_MAX__ 2147483647
+ __CHAR_BIT__ 8
+ __INTMAX_MAX__ 9223372036854775807L
+ __FLT_EVAL_METHOD__ 0
+ __DEC_EVAL_METHOD__ 2
+ __FLT_RADIX__ 2
+ __FLT_MANT_DIG__ 24
+ __FLT_DIG__ 6
+ __FLT_MIN_EXP__ (-125)
+ __FLT_MIN_10_EXP__ (-37)
+ __FLT_MAX_EXP__ 128
+ __FLT_MAX_10_EXP__ 38
+ __FLT_MAX__ 3.40282347e+38F
+ __FLT_MIN__ 1.17549435e-38F
+ __FLT_EPSILON__ 1.19209290e-7F
+ __FLT_DENORM_MIN__ 1.40129846e-45F
+ __FLT_HAS_DENORM__ 1
+ __FLT_HAS_INFINITY__ 1
+ __FLT_HAS_QUIET_NAN__ 1
+ __DBL_MANT_DIG__ 53
+ __DBL_DIG__ 15
+ __DBL_MIN_EXP__ (-1021)
+ __DBL_MIN_10_EXP__ (-307)
+ __DBL_MAX_EXP__ 1024
+ __DBL_MAX_10_EXP__ 308
+ __DBL_MAX__ 1.7976931348623157e+308
+ __DBL_MIN__ 2.2250738585072014e-308
+ __DBL_EPSILON__ 2.2204460492503131e-16
+ __DBL_DENORM_MIN__ 4.9406564584124654e-324
+ __DBL_HAS_DENORM__ 1
+ __DBL_HAS_INFINITY__ 1
+ __DBL_HAS_QUIET_NAN__ 1
+ __LDBL_MANT_DIG__ 64
+ __LDBL_DIG__ 18
+ __LDBL_MIN_EXP__ (-16381)
+ __LDBL_MIN_10_EXP__ (-4931)
+ __LDBL_MAX_EXP__ 16384
+ __LDBL_MAX_10_EXP__ 4932
+ __DECIMAL_DIG__ 21
+ __LDBL_MAX__ 1.18973149535723176502e+4932L
+ __LDBL_MIN__ 3.36210314311209350626e-4932L
+ __LDBL_EPSILON__ 1.08420217248550443401e-19L
+ __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
+ __LDBL_HAS_DENORM__ 1
+ __LDBL_HAS_INFINITY__ 1
+ __LDBL_HAS_QUIET_NAN__ 1
+ __DEC32_MANT_DIG__ 7
+ __DEC32_MIN_EXP__ (-95)
+ __DEC32_MAX_EXP__ 96
+ __DEC32_MIN__ 1E-95DF
+ __DEC32_MAX__ 9.999999E96DF
+ __DEC32_EPSILON__ 1E-6DF
+ __DEC32_DEN__ 0.000001E-95DF
+ __DEC64_MANT_DIG__ 16
+ __DEC64_MIN_EXP__ (-383)
+ __DEC64_MAX_EXP__ 384
+ __DEC64_MIN__ 1E-383DD
+ __DEC64_MAX__ 9.999999999999999E384DD
+ __DEC64_EPSILON__ 1E-15DD
+ __DEC64_DEN__ 0.000000000000001E-383DD
+ __DEC128_MANT_DIG__ 34
+ __DEC128_MIN_EXP__ (-6143)
+ __DEC128_MAX_EXP__ 6144
+ __DEC128_MIN__ 1E-6143DL
+ __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
+ __DEC128_EPSILON__ 1E-33DL
+ __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL
+ __REGISTER_PREFIX__
+ __USER_LABEL_PREFIX__
+ __VERSION__ "4.3.2 20081105 (Red Hat 4.3.2-7)"
+ __GNUC_GNU_INLINE__ 1
+ _LP64 1
+ __LP64__ 1
+ __NO_INLINE__ 1
+ __FINITE_MATH_ONLY__ 0
+ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
+ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
+ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
+ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
+ __SIZEOF_INT__ 4
+ __SIZEOF_LONG__ 8
+ __SIZEOF_LONG_LONG__ 8
+ __SIZEOF_SHORT__ 2
+ __SIZEOF_FLOAT__ 4
+ __SIZEOF_DOUBLE__ 8
+ __SIZEOF_LONG_DOUBLE__ 16
+ __SIZEOF_SIZE_T__ 8
+ __SIZEOF_WCHAR_T__ 4
+ __SIZEOF_WINT_T__ 4
+ __SIZEOF_PTRDIFF_T__ 8
+ __SIZEOF_POINTER__ 8
+ __amd64 1
+ __amd64__ 1
+ __x86_64 1
+ __x86_64__ 1
+ __k8 1
+ __k8__ 1
+ __MMX__ 1
+ __SSE__ 1
+ __SSE2__ 1
+ __SSE_MATH__ 1
+ __SSE2_MATH__ 1
+ __gnu_linux__ 1
+ __linux 1
+ __linux__ 1
+ linux 1
+ __unix 1
+ __unix__ 1
+ unix 1
+ __ELF__ 1
+ __DECIMAL_BID_FORMAT__ 1
+ macro1 ble
+/file
+EOF
+
+testrun_compare ${abs_builddir}/dwarf-getmacros testfile51 0x84 <<\EOF
+file /home/petr/proj/elfutils/pending/elfutils/tests/decom/y.c
+ __STDC__ 1
+ __STDC_HOSTED__ 1
+ __GNUC__ 4
+ __GNUC_MINOR__ 3
+ __GNUC_PATCHLEVEL__ 2
+ __GNUC_RH_RELEASE__ 7
+ __SIZE_TYPE__ long unsigned int
+ __PTRDIFF_TYPE__ long int
+ __WCHAR_TYPE__ int
+ __WINT_TYPE__ unsigned int
+ __INTMAX_TYPE__ long int
+ __UINTMAX_TYPE__ long unsigned int
+ __GXX_ABI_VERSION 1002
+ __SCHAR_MAX__ 127
+ __SHRT_MAX__ 32767
+ __INT_MAX__ 2147483647
+ __LONG_MAX__ 9223372036854775807L
+ __LONG_LONG_MAX__ 9223372036854775807LL
+ __WCHAR_MAX__ 2147483647
+ __CHAR_BIT__ 8
+ __INTMAX_MAX__ 9223372036854775807L
+ __FLT_EVAL_METHOD__ 0
+ __DEC_EVAL_METHOD__ 2
+ __FLT_RADIX__ 2
+ __FLT_MANT_DIG__ 24
+ __FLT_DIG__ 6
+ __FLT_MIN_EXP__ (-125)
+ __FLT_MIN_10_EXP__ (-37)
+ __FLT_MAX_EXP__ 128
+ __FLT_MAX_10_EXP__ 38
+ __FLT_MAX__ 3.40282347e+38F
+ __FLT_MIN__ 1.17549435e-38F
+ __FLT_EPSILON__ 1.19209290e-7F
+ __FLT_DENORM_MIN__ 1.40129846e-45F
+ __FLT_HAS_DENORM__ 1
+ __FLT_HAS_INFINITY__ 1
+ __FLT_HAS_QUIET_NAN__ 1
+ __DBL_MANT_DIG__ 53
+ __DBL_DIG__ 15
+ __DBL_MIN_EXP__ (-1021)
+ __DBL_MIN_10_EXP__ (-307)
+ __DBL_MAX_EXP__ 1024
+ __DBL_MAX_10_EXP__ 308
+ __DBL_MAX__ 1.7976931348623157e+308
+ __DBL_MIN__ 2.2250738585072014e-308
+ __DBL_EPSILON__ 2.2204460492503131e-16
+ __DBL_DENORM_MIN__ 4.9406564584124654e-324
+ __DBL_HAS_DENORM__ 1
+ __DBL_HAS_INFINITY__ 1
+ __DBL_HAS_QUIET_NAN__ 1
+ __LDBL_MANT_DIG__ 64
+ __LDBL_DIG__ 18
+ __LDBL_MIN_EXP__ (-16381)
+ __LDBL_MIN_10_EXP__ (-4931)
+ __LDBL_MAX_EXP__ 16384
+ __LDBL_MAX_10_EXP__ 4932
+ __DECIMAL_DIG__ 21
+ __LDBL_MAX__ 1.18973149535723176502e+4932L
+ __LDBL_MIN__ 3.36210314311209350626e-4932L
+ __LDBL_EPSILON__ 1.08420217248550443401e-19L
+ __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
+ __LDBL_HAS_DENORM__ 1
+ __LDBL_HAS_INFINITY__ 1
+ __LDBL_HAS_QUIET_NAN__ 1
+ __DEC32_MANT_DIG__ 7
+ __DEC32_MIN_EXP__ (-95)
+ __DEC32_MAX_EXP__ 96
+ __DEC32_MIN__ 1E-95DF
+ __DEC32_MAX__ 9.999999E96DF
+ __DEC32_EPSILON__ 1E-6DF
+ __DEC32_DEN__ 0.000001E-95DF
+ __DEC64_MANT_DIG__ 16
+ __DEC64_MIN_EXP__ (-383)
+ __DEC64_MAX_EXP__ 384
+ __DEC64_MIN__ 1E-383DD
+ __DEC64_MAX__ 9.999999999999999E384DD
+ __DEC64_EPSILON__ 1E-15DD
+ __DEC64_DEN__ 0.000000000000001E-383DD
+ __DEC128_MANT_DIG__ 34
+ __DEC128_MIN_EXP__ (-6143)
+ __DEC128_MAX_EXP__ 6144
+ __DEC128_MIN__ 1E-6143DL
+ __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
+ __DEC128_EPSILON__ 1E-33DL
+ __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL
+ __REGISTER_PREFIX__
+ __USER_LABEL_PREFIX__
+ __VERSION__ "4.3.2 20081105 (Red Hat 4.3.2-7)"
+ __GNUC_GNU_INLINE__ 1
+ _LP64 1
+ __LP64__ 1
+ __NO_INLINE__ 1
+ __FINITE_MATH_ONLY__ 0
+ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
+ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
+ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
+ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
+ __SIZEOF_INT__ 4
+ __SIZEOF_LONG__ 8
+ __SIZEOF_LONG_LONG__ 8
+ __SIZEOF_SHORT__ 2
+ __SIZEOF_FLOAT__ 4
+ __SIZEOF_DOUBLE__ 8
+ __SIZEOF_LONG_DOUBLE__ 16
+ __SIZEOF_SIZE_T__ 8
+ __SIZEOF_WCHAR_T__ 4
+ __SIZEOF_WINT_T__ 4
+ __SIZEOF_PTRDIFF_T__ 8
+ __SIZEOF_POINTER__ 8
+ __amd64 1
+ __amd64__ 1
+ __x86_64 1
+ __x86_64__ 1
+ __k8 1
+ __k8__ 1
+ __MMX__ 1
+ __SSE__ 1
+ __SSE2__ 1
+ __SSE_MATH__ 1
+ __SSE2_MATH__ 1
+ __gnu_linux__ 1
+ __linux 1
+ __linux__ 1
+ linux 1
+ __unix 1
+ __unix__ 1
+ unix 1
+ __ELF__ 1
+ __DECIMAL_BID_FORMAT__ 1
+ macro2 ble
+/file
+EOF
+
+testfiles testfile-macros
+
+testrun_compare ${abs_builddir}/dwarf-getmacros testfile-macros 0xb <<\EOF
+__STDC__ 1
+__STDC_HOSTED__ 1
+__GNUC__ 4
+__GNUC_MINOR__ 7
+__GNUC_PATCHLEVEL__ 0
+__VERSION__ "4.7.0 20120507 (Red Hat 4.7.0-5)"
+__GNUC_RH_RELEASE__ 5
+__ATOMIC_RELAXED 0
+__ATOMIC_SEQ_CST 5
+__ATOMIC_ACQUIRE 2
+__ATOMIC_RELEASE 3
+__ATOMIC_ACQ_REL 4
+__ATOMIC_CONSUME 1
+__FINITE_MATH_ONLY__ 0
+_LP64 1
+__LP64__ 1
+__SIZEOF_INT__ 4
+__SIZEOF_LONG__ 8
+__SIZEOF_LONG_LONG__ 8
+__SIZEOF_SHORT__ 2
+__SIZEOF_FLOAT__ 4
+__SIZEOF_DOUBLE__ 8
+__SIZEOF_LONG_DOUBLE__ 16
+__SIZEOF_SIZE_T__ 8
+__CHAR_BIT__ 8
+__BIGGEST_ALIGNMENT__ 16
+__ORDER_LITTLE_ENDIAN__ 1234
+__ORDER_BIG_ENDIAN__ 4321
+__ORDER_PDP_ENDIAN__ 3412
+__BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
+__FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
+__SIZEOF_POINTER__ 8
+__SIZE_TYPE__ long unsigned int
+__PTRDIFF_TYPE__ long int
+__WCHAR_TYPE__ int
+__WINT_TYPE__ unsigned int
+__INTMAX_TYPE__ long int
+__UINTMAX_TYPE__ long unsigned int
+__CHAR16_TYPE__ short unsigned int
+__CHAR32_TYPE__ unsigned int
+__SIG_ATOMIC_TYPE__ int
+__INT8_TYPE__ signed char
+__INT16_TYPE__ short int
+__INT32_TYPE__ int
+__INT64_TYPE__ long int
+__UINT8_TYPE__ unsigned char
+__UINT16_TYPE__ short unsigned int
+__UINT32_TYPE__ unsigned int
+__UINT64_TYPE__ long unsigned int
+__INT_LEAST8_TYPE__ signed char
+__INT_LEAST16_TYPE__ short int
+__INT_LEAST32_TYPE__ int
+__INT_LEAST64_TYPE__ long int
+__UINT_LEAST8_TYPE__ unsigned char
+__UINT_LEAST16_TYPE__ short unsigned int
+__UINT_LEAST32_TYPE__ unsigned int
+__UINT_LEAST64_TYPE__ long unsigned int
+__INT_FAST8_TYPE__ signed char
+__INT_FAST16_TYPE__ long int
+__INT_FAST32_TYPE__ long int
+__INT_FAST64_TYPE__ long int
+__UINT_FAST8_TYPE__ unsigned char
+__UINT_FAST16_TYPE__ long unsigned int
+__UINT_FAST32_TYPE__ long unsigned int
+__UINT_FAST64_TYPE__ long unsigned int
+__INTPTR_TYPE__ long int
+__UINTPTR_TYPE__ long unsigned int
+__GXX_ABI_VERSION 1002
+__SCHAR_MAX__ 127
+__SHRT_MAX__ 32767
+__INT_MAX__ 2147483647
+__LONG_MAX__ 9223372036854775807L
+__LONG_LONG_MAX__ 9223372036854775807LL
+__WCHAR_MAX__ 2147483647
+__WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
+__WINT_MAX__ 4294967295U
+__WINT_MIN__ 0U
+__PTRDIFF_MAX__ 9223372036854775807L
+__SIZE_MAX__ 18446744073709551615UL
+__INTMAX_MAX__ 9223372036854775807L
+__INTMAX_C(c) c ## L
+__UINTMAX_MAX__ 18446744073709551615UL
+__UINTMAX_C(c) c ## UL
+__SIG_ATOMIC_MAX__ 2147483647
+__SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
+__INT8_MAX__ 127
+__INT16_MAX__ 32767
+__INT32_MAX__ 2147483647
+__INT64_MAX__ 9223372036854775807L
+__UINT8_MAX__ 255
+__UINT16_MAX__ 65535
+__UINT32_MAX__ 4294967295U
+__UINT64_MAX__ 18446744073709551615UL
+__INT_LEAST8_MAX__ 127
+__INT8_C(c) c
+__INT_LEAST16_MAX__ 32767
+__INT16_C(c) c
+__INT_LEAST32_MAX__ 2147483647
+__INT32_C(c) c
+__INT_LEAST64_MAX__ 9223372036854775807L
+__INT64_C(c) c ## L
+__UINT_LEAST8_MAX__ 255
+__UINT8_C(c) c
+__UINT_LEAST16_MAX__ 65535
+__UINT16_C(c) c
+__UINT_LEAST32_MAX__ 4294967295U
+__UINT32_C(c) c ## U
+__UINT_LEAST64_MAX__ 18446744073709551615UL
+__UINT64_C(c) c ## UL
+__INT_FAST8_MAX__ 127
+__INT_FAST16_MAX__ 9223372036854775807L
+__INT_FAST32_MAX__ 9223372036854775807L
+__INT_FAST64_MAX__ 9223372036854775807L
+__UINT_FAST8_MAX__ 255
+__UINT_FAST16_MAX__ 18446744073709551615UL
+__UINT_FAST32_MAX__ 18446744073709551615UL
+__UINT_FAST64_MAX__ 18446744073709551615UL
+__INTPTR_MAX__ 9223372036854775807L
+__UINTPTR_MAX__ 18446744073709551615UL
+__FLT_EVAL_METHOD__ 0
+__DEC_EVAL_METHOD__ 2
+__FLT_RADIX__ 2
+__FLT_MANT_DIG__ 24
+__FLT_DIG__ 6
+__FLT_MIN_EXP__ (-125)
+__FLT_MIN_10_EXP__ (-37)
+__FLT_MAX_EXP__ 128
+__FLT_MAX_10_EXP__ 38
+__FLT_DECIMAL_DIG__ 9
+__FLT_MAX__ 3.40282346638528859812e+38F
+__FLT_MIN__ 1.17549435082228750797e-38F
+__FLT_EPSILON__ 1.19209289550781250000e-7F
+__FLT_DENORM_MIN__ 1.40129846432481707092e-45F
+__FLT_HAS_DENORM__ 1
+__FLT_HAS_INFINITY__ 1
+__FLT_HAS_QUIET_NAN__ 1
+__DBL_MANT_DIG__ 53
+__DBL_DIG__ 15
+__DBL_MIN_EXP__ (-1021)
+__DBL_MIN_10_EXP__ (-307)
+__DBL_MAX_EXP__ 1024
+__DBL_MAX_10_EXP__ 308
+__DBL_DECIMAL_DIG__ 17
+__DBL_MAX__ ((double)1.79769313486231570815e+308L)
+__DBL_MIN__ ((double)2.22507385850720138309e-308L)
+__DBL_EPSILON__ ((double)2.22044604925031308085e-16L)
+__DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L)
+__DBL_HAS_DENORM__ 1
+__DBL_HAS_INFINITY__ 1
+__DBL_HAS_QUIET_NAN__ 1
+__LDBL_MANT_DIG__ 64
+__LDBL_DIG__ 18
+__LDBL_MIN_EXP__ (-16381)
+__LDBL_MIN_10_EXP__ (-4931)
+__LDBL_MAX_EXP__ 16384
+__LDBL_MAX_10_EXP__ 4932
+__DECIMAL_DIG__ 21
+__LDBL_MAX__ 1.18973149535723176502e+4932L
+__LDBL_MIN__ 3.36210314311209350626e-4932L
+__LDBL_EPSILON__ 1.08420217248550443401e-19L
+__LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
+__LDBL_HAS_DENORM__ 1
+__LDBL_HAS_INFINITY__ 1
+__LDBL_HAS_QUIET_NAN__ 1
+__DEC32_MANT_DIG__ 7
+__DEC32_MIN_EXP__ (-94)
+__DEC32_MAX_EXP__ 97
+__DEC32_MIN__ 1E-95DF
+__DEC32_MAX__ 9.999999E96DF
+__DEC32_EPSILON__ 1E-6DF
+__DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
+__DEC64_MANT_DIG__ 16
+__DEC64_MIN_EXP__ (-382)
+__DEC64_MAX_EXP__ 385
+__DEC64_MIN__ 1E-383DD
+__DEC64_MAX__ 9.999999999999999E384DD
+__DEC64_EPSILON__ 1E-15DD
+__DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
+__DEC128_MANT_DIG__ 34
+__DEC128_MIN_EXP__ (-6142)
+__DEC128_MAX_EXP__ 6145
+__DEC128_MIN__ 1E-6143DL
+__DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
+__DEC128_EPSILON__ 1E-33DL
+__DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
+__REGISTER_PREFIX__
+__USER_LABEL_PREFIX__
+__GNUC_GNU_INLINE__ 1
+__NO_INLINE__ 1
+__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
+__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
+__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
+__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
+__GCC_ATOMIC_BOOL_LOCK_FREE 2
+__GCC_ATOMIC_CHAR_LOCK_FREE 2
+__GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
+__GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
+__GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
+__GCC_ATOMIC_SHORT_LOCK_FREE 2
+__GCC_ATOMIC_INT_LOCK_FREE 2
+__GCC_ATOMIC_LONG_LOCK_FREE 2
+__GCC_ATOMIC_LLONG_LOCK_FREE 2
+__GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
+__GCC_ATOMIC_POINTER_LOCK_FREE 2
+__GCC_HAVE_DWARF2_CFI_ASM 1
+__PRAGMA_REDEFINE_EXTNAME 1
+__SIZEOF_INT128__ 16
+__SIZEOF_WCHAR_T__ 4
+__SIZEOF_WINT_T__ 4
+__SIZEOF_PTRDIFF_T__ 8
+__amd64 1
+__amd64__ 1
+__x86_64 1
+__x86_64__ 1
+__k8 1
+__k8__ 1
+__MMX__ 1
+__SSE__ 1
+__SSE2__ 1
+__SSE_MATH__ 1
+__SSE2_MATH__ 1
+__gnu_linux__ 1
+__linux 1
+__linux__ 1
+linux 1
+__unix 1
+__unix__ 1
+unix 1
+__ELF__ 1
+__DECIMAL_BID_FORMAT__ 1
+file /home/mark/src/tests/macro.c
+ file /usr/include/string.h
+ _STRING_H 1
+ file /usr/include/features.h
+ include 0x5d8
+ _FEATURES_H 1
+ __KERNEL_STRICT_NAMES
+ __USE_ANSI 1
+ __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+ _BSD_SOURCE 1
+ _SVID_SOURCE 1
+ _POSIX_SOURCE 1
+ _POSIX_C_SOURCE 200809L
+ __USE_POSIX_IMPLICITLY 1
+ __USE_POSIX 1
+ __USE_POSIX2 1
+ __USE_POSIX199309 1
+ __USE_POSIX199506 1
+ __USE_XOPEN2K 1
+ __USE_ISOC95 1
+ __USE_ISOC99 1
+ __USE_XOPEN2K8 1
+ _ATFILE_SOURCE 1
+ __USE_MISC 1
+ __USE_BSD 1
+ __USE_SVID 1
+ __USE_ATFILE 1
+ __USE_FORTIFY_LEVEL 0
+ /include
+ file /usr/include/stdc-predef.h
+ include 0x733
+ _STDC_PREDEF_H 1
+ __STDC_IEC_559__ 1
+ __STDC_IEC_559_COMPLEX__ 1
+ __STDC_ISO_10646__ 201103L
+ __STDC_NO_THREADS__ 1
+ /include
+ /file
+ include 0x755
+ __GNU_LIBRARY__ 6
+ __GLIBC__ 2
+ __GLIBC_MINOR__ 15
+ __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
+ __GLIBC_HAVE_LONG_LONG 1
+ /include
+ file /usr/include/sys/cdefs.h
+ include 0x783
+ _SYS_CDEFS_H 1
+ __LEAF , __leaf__
+ __LEAF_ATTR __attribute__ ((__leaf__))
+ __THROW __attribute__ ((__nothrow__ __LEAF))
+ __THROWNL __attribute__ ((__nothrow__))
+ __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
+ __P(args) args
+ __PMT(args) args
+ __CONCAT(x,y) x ## y
+ __STRING(x) #x
+ __ptr_t void *
+ __long_double_t long double
+ __BEGIN_DECLS
+ __END_DECLS
+ __BEGIN_NAMESPACE_STD
+ __END_NAMESPACE_STD
+ __USING_NAMESPACE_STD(name)
+ __BEGIN_NAMESPACE_C99
+ __END_NAMESPACE_C99
+ __USING_NAMESPACE_C99(name)
+ __bounded
+ __unbounded
+ __ptrvalue
+ __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
+ __bos0(ptr) __builtin_object_size (ptr, 0)
+ __fortify_function __extern_always_inline __attribute_artificial__
+ __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg)))
+ __warnattr(msg) __attribute__((__warning__ (msg)))
+ __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg)))
+ __flexarr []
+ __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias))
+ __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW
+ __REDIRECT_NTHNL(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROWNL
+ __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+ __ASMNAME2(prefix,cname) __STRING (prefix) cname
+ __attribute_malloc__ __attribute__ ((__malloc__))
+ __attribute_pure__ __attribute__ ((__pure__))
+ __attribute_const__ __attribute__ ((__const__))
+ __attribute_used__ __attribute__ ((__used__))
+ __attribute_noinline__ __attribute__ ((__noinline__))
+ __attribute_deprecated__ __attribute__ ((__deprecated__))
+ __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
+ __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b)))
+ __nonnull(params) __attribute__ ((__nonnull__ params))
+ __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__))
+ __wur
+ __always_inline __inline __attribute__ ((__always_inline__))
+ __attribute_artificial__ __attribute__ ((__artificial__))
+ __extern_inline extern __inline
+ __extern_always_inline extern __always_inline
+ __va_arg_pack() __builtin_va_arg_pack ()
+ __va_arg_pack_len() __builtin_va_arg_pack_len ()
+ __restrict_arr __restrict
+ __glibc_unlikely(cond) __builtin_expect((cond), 0)
+ /include
+ file /usr/include/bits/wordsize.h
+ include 0x8fa
+ __WORDSIZE 64
+ __WORDSIZE_TIME64_COMPAT32 1
+ __SYSCALL_WORDSIZE 64
+ /include
+ /file
+ include 0x910
+ __LDBL_REDIR1(name,proto,alias) name proto
+ __LDBL_REDIR(name,proto) name proto
+ __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW
+ __LDBL_REDIR_NTH(name,proto) name proto __THROW
+ __LDBL_REDIR_DECL(name)
+ __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias)
+ __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias)
+ /include
+ /file
+ file /usr/include/gnu/stubs.h
+ file /usr/include/gnu/stubs-64.h
+ include 0x945
+ __stub_bdflush
+ __stub_chflags
+ __stub_fattach
+ __stub_fchflags
+ __stub_fdetach
+ __stub_getmsg
+ __stub_gtty
+ __stub_lchmod
+ __stub_putmsg
+ __stub_revoke
+ __stub_setlogin
+ __stub_sigreturn
+ __stub_sstk
+ __stub_stty
+ /include
+ /file
+ /file
+ /file
+ include 0x99d
+ __need_size_t
+ __need_NULL
+ /include
+ file /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/stddef.h
+ include 0x9ad
+ __size_t__
+ __SIZE_T__
+ _SIZE_T
+ _SYS_SIZE_T_H
+ _T_SIZE_
+ _T_SIZE
+ __SIZE_T
+ _SIZE_T_
+ _BSD_SIZE_T_
+ _SIZE_T_DEFINED_
+ _SIZE_T_DEFINED
+ _BSD_SIZE_T_DEFINED_
+ _SIZE_T_DECLARED
+ ___int_size_t_h
+ _GCC_SIZE_T
+ _SIZET_
+ __size_t
+ NULL ((void *)0)
+ /include
+ /file
+ file /usr/include/xlocale.h
+ _XLOCALE_H 1
+ /file
+ /file
+ HELLO "world"
+/file
+EOF
+
+testfiles testfile-macros-0xff
+testrun_compare ${abs_builddir}/dwarf-getmacros testfile-macros-0xff 0xb <<\EOF
+invalid opcode
+EOF
+testrun_compare ${abs_builddir}/dwarf-getmacros testfile-macros-0xff 0xb '' <<\EOF
+opcode 255 with 0 arguments
+file /home/petr/proj/elfutils/master/elfutils/x.c
+ FOO 0
+/file
+EOF
+
+exit 0
diff --git a/src/tests/run-dwarf-getstring.sh b/src/tests/run-dwarf-getstring.sh
new file mode 100755
index 00000000..f18f6282
--- /dev/null
+++ b/src/tests/run-dwarf-getstring.sh
@@ -0,0 +1,125 @@
+#! /bin/sh
+# Copyright (C) 2011 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile11
+
+testrun_compare ${abs_builddir}/dwarf-getstring testfile11 <<\EOF
+_ZNSbIwSt11char_traitsIwESaIwEE13_S_copy_charsEPwS3_S3_
+itimerspec
+_G_int32_t
+_IO_last_state
+antiquities
+_ZNSbIwSt11char_traitsIwESaIwEEpLEw
+insert
+_ZNSbIwSt11char_traitsIwESaIwEE12_M_leak_hardEv
+__lockkind
+_ZNKSbIwSt11char_traitsIwESaIwEE8capacityEv
+_ZNSs7_M_leakEv
+_M_ref_count
+_ZNSt11char_traitsIwE6assignEPwjw
+_ZNKSs13find_first_ofEPKcj
+._14
+._15
+._16
+._17
+_ZNKSs16find_last_not_ofEPKcj
+_G_iconv_t
+_ZN10__gnu_test9gnu_obj_2IlEaSERKS1_
+_ZN11random_dataaSERKS_
+_ZNSt11char_traitsIcE7not_eofERKi
+__class_type_info
+tm_sec
+_ZNKSbIwSt11char_traitsIwESaIwEE5c_strEv
+__rlim64_t
+seek
+pthread_mutex_t
+_ZNSs5eraseEN9__gnu_cxx17__normal_iteratorIPcSsEE
+_ZNSsaSEc
+__not_va_list__
+_ZNKSs12find_last_ofEPKcj
+_ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_S2_S2_
+__gconv_info
+_ZNSt11__ios_flags12_S_showpointE
+output_iterator_tag
+gnu_obj_2<long int>
+_ZNSs6insertEjRKSsjj
+_ZN13__type_traitsIbEaSERKS0_
+_ZNKSbIwSt11char_traitsIwESaIwEE4copyEPwjj
+_ZNSs9_M_mutateEjjj
+__ios_flags
+short unsigned int
+_ZNKSs4findEPKcj
+compare
+_ZNSbIwSt11char_traitsIwESaIwEE4_Rep7_M_grabERKS1_S5_
+tm_yday
+unsigned char
+__stacksize
+__gconv_init_fct
+_IO_FILE
+__counter
+._26
+._27
+bidirectional_iterator_tag
+._29
+it_value
+const_iterator
+_ZNSt11__ios_flags6_S_outE
+_M_set_leaked
+_Is_integer<unsigned int>
+__value
+timeval
+_IO_jump_t
+_ZN11sched_paramaSERKS_
+__normal_iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >
+_ZNSs4_Rep7_M_grabERKSaIcES2_
+_wide_vtable
+__codecvt_destr
+_STL_mutex_lock
+_ZNSt24__default_alloc_templateILb1ELi0EE17_S_freelist_indexEj
+_ZNSbIwSt11char_traitsIwESaIwEE7replaceEjjjw
+_ZN17__gconv_step_dataaSERKS_
+__w_stopval
+__int64_t
+__type_traits<double>
+~_Lock
+_ZNKSbIwSt11char_traitsIwESaIwEE5beginEv
+ptrdiff_t
+test
+_Integral
+cookie_seek_function_t
+__vmi_class_type_info
+_ZNSs7replaceEjjjc
+__int32_t
+register_t
+~_STL_auto_lock
+_ZNKSbIwSt11char_traitsIwESaIwEE16find_last_not_ofEPKwjj
+__arg
+_ZNSs7replaceEjjPKcj
+_ZNSbIwSt11char_traitsIwESaIwEE7replaceEjjRKS2_jj
+_ZNKSbIwSt11char_traitsIwESaIwEE12find_last_ofEPKwjj
+_ZN11_Is_integerImEaSERKS0_
+__default_alloc_template
+_S_hex
+__statep
+_ZNSt11char_traitsIwE2ltERKwS2_
+_M_p
+_ZNKSs4sizeEv
+EOF
+
+exit 0
diff --git a/src/tests/run-dwfl-addr-sect.sh b/src/tests/run-dwfl-addr-sect.sh
new file mode 100755
index 00000000..80da0081
--- /dev/null
+++ b/src/tests/run-dwfl-addr-sect.sh
@@ -0,0 +1,32 @@
+#! /bin/sh
+# Copyright (C) 2007-2009 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile43 testfile50
+
+testrun_compare ${abs_builddir}/dwfl-addr-sect -e testfile43 0x64 0x8 0x98 <<\EOF
+address 0x64 => module "" section 4 + 0
+address 0x8 => module "" section 1 + 0x8
+address 0x98 => module "" section 7 + 0
+EOF
+
+testrun_compare ${abs_builddir}/dwfl-addr-sect -e testfile50 0x1 <<\EOF
+address 0x1 => module "" section 1 + 0x1
+EOF
+
+exit 0
diff --git a/src/tests/run-dwfl-bug-offline-rel.sh b/src/tests/run-dwfl-bug-offline-rel.sh
new file mode 100755
index 00000000..fa476c4b
--- /dev/null
+++ b/src/tests/run-dwfl-bug-offline-rel.sh
@@ -0,0 +1,28 @@
+#! /bin/sh
+# Copyright (C) 2007 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile36 testfile36.debug
+
+testrun_compare ${abs_builddir}/dwflmodtest -e testfile36 <<\EOF
+module: 00000000..00002308 testfile36 (null)
+module: 00000000 DWARF 0 (no error)
+module: 00000000..00002308 testfile36 testfile36.debug
+EOF
+
+exit 0
diff --git a/src/tests/run-dwfl-report-elf-align.sh b/src/tests/run-dwfl-report-elf-align.sh
new file mode 100755
index 00000000..38497532
--- /dev/null
+++ b/src/tests/run-dwfl-report-elf-align.sh
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile-dwfl-report-elf-align-shlib.so
+
+# /proc/PID/maps when the process was running:
+# 7f3560c92000-7f3560c93000 r-xp 00000000 fd:02 25037063 testfile-dwfl-report-elf-align-shlib.so
+# 7f3560c93000-7f3560e92000 ---p 00001000 fd:02 25037063 testfile-dwfl-report-elf-align-shlib.so
+# 7f3560e92000-7f3560e93000 rw-p 00000000 fd:02 25037063 testfile-dwfl-report-elf-align-shlib.so
+# testfile-dwfl-report-elf-align-shlib.so:
+# Program Headers:
+# Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
+# LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x00065c 0x00065c R E 0x200000
+# LOAD 0x000660 0x0000000000200660 0x0000000000200660 0x0001f0 0x000200 RW 0x200000
+# Symbol table '.dynsym' contains 12 entries:
+# Num: Value Size Type Bind Vis Ndx Name
+# 8: 000000000000057c 11 FUNC GLOBAL DEFAULT 11 shlib
+# GDB output showing proper relocation:
+# #1 0x00007f3560c92585 in shlib () from ./testfile-dwfl-report-elf-align-shlib.so
+#
+# 0x7f3560c92000 is VMA address of first byte of testfile-dwfl-report-elf-align-shlib.so.
+# 0x7f3560c92585 = 0x7f3560c92000 + 0x585
+# where 0x585 is any address inside the shlib function: 0x57c .. 0x57c + 11 -1
+
+testrun ${abs_builddir}/dwfl-report-elf-align ./testfile-dwfl-report-elf-align-shlib.so \
+ 0x7f3560c92000 0x7f3560c92585 shlib
+
+exit 0
diff --git a/src/tests/run-dwfllines.sh b/src/tests/run-dwfllines.sh
new file mode 100755
index 00000000..b384de09
--- /dev/null
+++ b/src/tests/run-dwfllines.sh
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile2
+
+testrun_compare ${abs_builddir}/dwfllines -e testfile <<\EOF
+mod: CU: [b] m.c
+0 0x804842c /home/drepper/gnu/new-bu/build/ttt/m.c:5:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+1 0x8048432 /home/drepper/gnu/new-bu/build/ttt/m.c:6:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+2 0x804844d /home/drepper/gnu/new-bu/build/ttt/m.c:7:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+3 0x8048458 /home/drepper/gnu/new-bu/build/ttt/m.c:8:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+4 0x804845a /home/drepper/gnu/new-bu/build/ttt/m.c:8:0
+ time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+mod: CU: [ca] b.c
+0 0x804845c /home/drepper/gnu/new-bu/build/ttt/b.c:4:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+1 0x804845f /home/drepper/gnu/new-bu/build/ttt/b.c:5:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+2 0x8048464 /home/drepper/gnu/new-bu/build/ttt/b.c:6:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+3 0x8048466 /home/drepper/gnu/new-bu/build/ttt/b.c:6:0
+ time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+mod: CU: [15fc] f.c
+0 0x8048468 /home/drepper/gnu/new-bu/build/ttt/f.c:3:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+1 0x804846b /home/drepper/gnu/new-bu/build/ttt/f.c:4:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+2 0x8048470 /home/drepper/gnu/new-bu/build/ttt/f.c:5:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+3 0x8048472 /home/drepper/gnu/new-bu/build/ttt/f.c:5:0
+ time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+EOF
+
+testrun_compare ${abs_builddir}/dwfllines -e testfile2 <<\EOF
+mod: CU: [b] b.c
+0 0x10000470 /shoggoth/drepper/b.c:4:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+1 0x1000047c /shoggoth/drepper/b.c:5:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+2 0x10000480 /shoggoth/drepper/b.c:6:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+3 0x10000490 /shoggoth/drepper/b.c:6:0
+ time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+mod: CU: [97d] f.c
+0 0x10000490 /shoggoth/drepper/f.c:3:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+1 0x1000049c /shoggoth/drepper/f.c:4:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+2 0x100004a0 /shoggoth/drepper/f.c:5:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+3 0x100004b0 /shoggoth/drepper/f.c:5:0
+ time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+mod: CU: [9e4] m.c
+0 0x100004b0 /shoggoth/drepper/m.c:5:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+1 0x100004cc /shoggoth/drepper/m.c:6:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+2 0x100004e8 /shoggoth/drepper/m.c:7:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+3 0x100004f4 /shoggoth/drepper/m.c:8:0
+ time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+4 0x10000514 /shoggoth/drepper/m.c:8:0
+ time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
+EOF
+
+testrun_on_self_quiet ${abs_builddir}/dwfllines -e
+
+exit 0
diff --git a/src/tests/run-dwflsyms.sh b/src/tests/run-dwflsyms.sh
new file mode 100755
index 00000000..9726bcf1
--- /dev/null
+++ b/src/tests/run-dwflsyms.sh
@@ -0,0 +1,826 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Tests dwfl_module_{addrsym,getsym,relocate_address}
+# See run-readelf-s.sh for how to generate test binaries.
+# In addition, *_pl files were created from their base file
+# with prelink -N, and *_plr with prelink -r 0x4200000000.
+
+testfiles testfilebaztab
+testfiles testfilebazdbg testfilebazdbg.debug
+testfiles testfilebazdbg_pl
+testfiles testfilebazdbg_plr
+testfiles testfilebazdyn
+testfiles testfilebazmdb
+testfiles testfilebazmin
+testfiles testfilebazmin_pl
+testfiles testfilebazmin_plr
+testfiles testfilebasmin
+testfiles testfilebaxmin
+
+tempfiles testfile.dynsym.in testfile.symtab.in testfile.minsym.in dwflsyms.out
+tempfiles testfile.symtab_pl.in testfile.minsym_pl.in
+
+cat > testfile.symtab.in <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x238
+ 2: SECTION LOCAL (0) 0x254
+ 3: SECTION LOCAL (0) 0x274
+ 4: SECTION LOCAL (0) 0x298
+ 5: SECTION LOCAL (0) 0x2d8
+ 6: SECTION LOCAL (0) 0x428
+ 7: SECTION LOCAL (0) 0x4f2
+ 8: SECTION LOCAL (0) 0x510
+ 9: SECTION LOCAL (0) 0x530
+ 10: SECTION LOCAL (0) 0x638
+ 11: SECTION LOCAL (0) 0x680
+ 12: SECTION LOCAL (0) 0x6a0
+ 13: SECTION LOCAL (0) 0x6e0
+ 14: SECTION LOCAL (0) 0x8f4
+ 15: SECTION LOCAL (0) 0x900
+ 16: SECTION LOCAL (0) 0x904
+ 17: SECTION LOCAL (0) 0x948
+ 18: SECTION LOCAL (0) 0x200dd0
+ 19: SECTION LOCAL (0) 0x200dd8
+ 20: SECTION LOCAL (0) 0x200de0
+ 21: SECTION LOCAL (0) 0x200de8
+ 22: SECTION LOCAL (0) 0x200df0
+ 23: SECTION LOCAL (0) 0x200fc0
+ 24: SECTION LOCAL (0) 0x201000
+ 25: SECTION LOCAL (0) 0x201030
+ 26: SECTION LOCAL (0) 0x20103c
+ 27: SECTION LOCAL (0) 0
+ 28: SECTION LOCAL (0) 0
+ 29: SECTION LOCAL (0) 0
+ 30: SECTION LOCAL (0) 0
+ 31: SECTION LOCAL (0) 0
+ 32: SECTION LOCAL (0) 0
+ 33: FILE LOCAL crtstuff.c (0) 0
+ 34: OBJECT LOCAL __JCR_LIST__ (0) 0x200de0
+ 35: FUNC LOCAL deregister_tm_clones (0) 0x710, rel: 0x710 (.text)
+ 36: FUNC LOCAL register_tm_clones (0) 0x740, rel: 0x740 (.text)
+ 37: FUNC LOCAL __do_global_dtors_aux (0) 0x780, rel: 0x780 (.text)
+ 38: OBJECT LOCAL completed.6137 (1) 0x20103c
+ 39: OBJECT LOCAL __do_global_dtors_aux_fini_array_entry (0) 0x200dd8
+ 40: FUNC LOCAL frame_dummy (0) 0x7c0, rel: 0x7c0 (.text)
+ 41: OBJECT LOCAL __frame_dummy_init_array_entry (0) 0x200dd0
+ 42: FILE LOCAL foo.c (0) 0
+ 43: FILE LOCAL bar.c (0) 0
+ 44: OBJECT LOCAL b1 (4) 0x201034
+ 45: FUNC LOCAL foo (20) 0x814, rel: 0x814 (.text)
+ 46: FILE LOCAL crtstuff.c (0) 0
+ 47: OBJECT LOCAL __FRAME_END__ (0) 0xa58
+ 48: OBJECT LOCAL __JCR_END__ (0) 0x200de0
+ 49: FILE LOCAL (0) 0
+ 50: NOTYPE LOCAL __init_array_end (0) 0x200dd8
+ 51: OBJECT LOCAL _DYNAMIC (0) 0x200df0
+ 52: NOTYPE LOCAL __init_array_start (0) 0x200dd0
+ 53: OBJECT LOCAL _GLOBAL_OFFSET_TABLE_ (0) 0x201000
+ 54: FUNC GLOBAL __libc_csu_fini (2) 0x8f0, rel: 0x8f0 (.text)
+ 55: NOTYPE WEAK _ITM_deregisterTMCloneTable (0) 0
+ 56: NOTYPE WEAK data_start (0) 0x201030
+ 57: NOTYPE GLOBAL _edata (0) 0x20103c
+ 58: FUNC GLOBAL bar (44) 0x828, rel: 0x828 (.text)
+ 59: FUNC GLOBAL _fini (0) 0x8f4, rel: 0x8f4 (.fini)
+ 60: FUNC GLOBAL __libc_start_main@@GLIBC_2.2.5 (0) 0
+ 61: NOTYPE GLOBAL __data_start (0) 0x201030
+ 62: NOTYPE WEAK __gmon_start__ (0) 0
+ 63: OBJECT GLOBAL __dso_handle (0) 0x200de8
+ 64: OBJECT GLOBAL _IO_stdin_used (4) 0x900
+ 65: OBJECT GLOBAL b2 (4) 0x201038
+ 66: FUNC GLOBAL __libc_csu_init (137) 0x860, rel: 0x860 (.text)
+ 67: NOTYPE GLOBAL _end (0) 0x201040
+ 68: FUNC GLOBAL _start (0) 0x6e0, rel: 0x6e0 (.text)
+ 69: NOTYPE GLOBAL __bss_start (0) 0x20103c
+ 70: FUNC GLOBAL main (35) 0x7f0, rel: 0x7f0 (.text)
+ 71: NOTYPE WEAK _Jv_RegisterClasses (0) 0
+ 72: OBJECT GLOBAL __TMC_END__ (0) 0x201040
+ 73: NOTYPE WEAK _ITM_registerTMCloneTable (0) 0
+ 74: FUNC WEAK __cxa_finalize@@GLIBC_2.2.5 (0) 0
+ 75: FUNC GLOBAL _init (0) 0x680, rel: 0x680 (.init)
+EOF
+
+cat > testfile.symtab_pl.in <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x3000000238
+ 2: SECTION LOCAL (0) 0x3000000254
+ 3: SECTION LOCAL (0) 0x3000000274
+ 4: SECTION LOCAL (0) 0x3000000298
+ 5: SECTION LOCAL (0) 0x30000002d8
+ 6: SECTION LOCAL (0) 0x3000000428
+ 7: SECTION LOCAL (0) 0x30000004f2
+ 8: SECTION LOCAL (0) 0x3000000510
+ 9: SECTION LOCAL (0) 0x3000000530
+ 10: SECTION LOCAL (0) 0x3000000638
+ 11: SECTION LOCAL (0) 0x3000000680
+ 12: SECTION LOCAL (0) 0x30000006a0
+ 13: SECTION LOCAL (0) 0x30000006e0
+ 14: SECTION LOCAL (0) 0x30000008f4
+ 15: SECTION LOCAL (0) 0x3000000900
+ 16: SECTION LOCAL (0) 0x3000000904
+ 17: SECTION LOCAL (0) 0x3000000948
+ 18: SECTION LOCAL (0) 0x3000200dd0
+ 19: SECTION LOCAL (0) 0x3000200dd8
+ 20: SECTION LOCAL (0) 0x3000200de0
+ 21: SECTION LOCAL (0) 0x3000200de8
+ 22: SECTION LOCAL (0) 0x3000200df0
+ 23: SECTION LOCAL (0) 0x3000200fc0
+ 24: SECTION LOCAL (0) 0x3000201000
+ 25: SECTION LOCAL (0) 0x3000201030
+ 26: SECTION LOCAL (0) 0x300020103c
+ 27: SECTION LOCAL (0) 0
+ 28: SECTION LOCAL (0) 0
+ 29: SECTION LOCAL (0) 0
+ 30: SECTION LOCAL (0) 0
+ 31: SECTION LOCAL (0) 0
+ 32: SECTION LOCAL (0) 0
+ 33: FILE LOCAL crtstuff.c (0) 0
+ 34: OBJECT LOCAL __JCR_LIST__ (0) 0x3000200de0
+ 35: FUNC LOCAL deregister_tm_clones (0) 0x3000000710, rel: 0x710 (.text)
+ 36: FUNC LOCAL register_tm_clones (0) 0x3000000740, rel: 0x740 (.text)
+ 37: FUNC LOCAL __do_global_dtors_aux (0) 0x3000000780, rel: 0x780 (.text)
+ 38: OBJECT LOCAL completed.6137 (1) 0x300020103c
+ 39: OBJECT LOCAL __do_global_dtors_aux_fini_array_entry (0) 0x3000200dd8
+ 40: FUNC LOCAL frame_dummy (0) 0x30000007c0, rel: 0x7c0 (.text)
+ 41: OBJECT LOCAL __frame_dummy_init_array_entry (0) 0x3000200dd0
+ 42: FILE LOCAL foo.c (0) 0
+ 43: FILE LOCAL bar.c (0) 0
+ 44: OBJECT LOCAL b1 (4) 0x3000201034
+ 45: FUNC LOCAL foo (20) 0x3000000814, rel: 0x814 (.text)
+ 46: FILE LOCAL crtstuff.c (0) 0
+ 47: OBJECT LOCAL __FRAME_END__ (0) 0x3000000a58
+ 48: OBJECT LOCAL __JCR_END__ (0) 0x3000200de0
+ 49: FILE LOCAL (0) 0
+ 50: NOTYPE LOCAL __init_array_end (0) 0x3000200dd8
+ 51: OBJECT LOCAL _DYNAMIC (0) 0x3000200df0
+ 52: NOTYPE LOCAL __init_array_start (0) 0x3000200dd0
+ 53: OBJECT LOCAL _GLOBAL_OFFSET_TABLE_ (0) 0x3000201000
+ 54: FUNC GLOBAL __libc_csu_fini (2) 0x30000008f0, rel: 0x8f0 (.text)
+ 55: NOTYPE WEAK _ITM_deregisterTMCloneTable (0) 0
+ 56: NOTYPE WEAK data_start (0) 0x3000201030
+ 57: NOTYPE GLOBAL _edata (0) 0x300020103c
+ 58: FUNC GLOBAL bar (44) 0x3000000828, rel: 0x828 (.text)
+ 59: FUNC GLOBAL _fini (0) 0x30000008f4, rel: 0x8f4 (.fini)
+ 60: FUNC GLOBAL __libc_start_main@@GLIBC_2.2.5 (0) 0
+ 61: NOTYPE GLOBAL __data_start (0) 0x3000201030
+ 62: NOTYPE WEAK __gmon_start__ (0) 0
+ 63: OBJECT GLOBAL __dso_handle (0) 0x3000200de8
+ 64: OBJECT GLOBAL _IO_stdin_used (4) 0x3000000900
+ 65: OBJECT GLOBAL b2 (4) 0x3000201038
+ 66: FUNC GLOBAL __libc_csu_init (137) 0x3000000860, rel: 0x860 (.text)
+ 67: NOTYPE GLOBAL _end (0) 0x3000201040
+ 68: FUNC GLOBAL _start (0) 0x30000006e0, rel: 0x6e0 (.text)
+ 69: NOTYPE GLOBAL __bss_start (0) 0x300020103c
+ 70: FUNC GLOBAL main (35) 0x30000007f0, rel: 0x7f0 (.text)
+ 71: NOTYPE WEAK _Jv_RegisterClasses (0) 0
+ 72: OBJECT GLOBAL __TMC_END__ (0) 0x3000201040
+ 73: NOTYPE WEAK _ITM_registerTMCloneTable (0) 0
+ 74: FUNC WEAK __cxa_finalize@@GLIBC_2.2.5 (0) 0
+ 75: FUNC GLOBAL _init (0) 0x3000000680, rel: 0x680 (.init)
+EOF
+
+cat > testfile.dynsym.in <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x238
+ 2: NOTYPE WEAK _ITM_deregisterTMCloneTable (0) 0
+ 3: FUNC GLOBAL __libc_start_main (0) 0
+ 4: NOTYPE WEAK __gmon_start__ (0) 0
+ 5: NOTYPE WEAK _Jv_RegisterClasses (0) 0
+ 6: NOTYPE WEAK _ITM_registerTMCloneTable (0) 0
+ 7: FUNC WEAK __cxa_finalize (0) 0
+ 8: NOTYPE GLOBAL _edata (0) 0x20103c
+ 9: NOTYPE GLOBAL _end (0) 0x201040
+ 10: FUNC GLOBAL __libc_csu_init (137) 0x860, rel: 0x860 (.text)
+ 11: NOTYPE GLOBAL __bss_start (0) 0x20103c
+ 12: FUNC GLOBAL main (35) 0x7f0, rel: 0x7f0 (.text)
+ 13: FUNC GLOBAL __libc_csu_fini (2) 0x8f0, rel: 0x8f0 (.text)
+EOF
+
+cat > testfile.minsym.in <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x238
+ 2: FUNC LOCAL deregister_tm_clones (0) 0x710, rel: 0x710 (.text)
+ 3: FUNC LOCAL register_tm_clones (0) 0x740, rel: 0x740 (.text)
+ 4: FUNC LOCAL __do_global_dtors_aux (0) 0x780, rel: 0x780 (.text)
+ 5: OBJECT LOCAL __do_global_dtors_aux_fini_array_entry (0) 0x200dd8
+ 6: FUNC LOCAL frame_dummy (0) 0x7c0, rel: 0x7c0 (.text)
+ 7: OBJECT LOCAL __frame_dummy_init_array_entry (0) 0x200dd0
+ 8: FUNC LOCAL foo (20) 0x814, rel: 0x814 (.text)
+ 9: NOTYPE LOCAL __init_array_end (0) 0x200dd8
+ 10: NOTYPE LOCAL __init_array_start (0) 0x200dd0
+ 11: SECTION LOCAL (0) 0x238
+ 12: SECTION LOCAL (0) 0x254
+ 13: SECTION LOCAL (0) 0x274
+ 14: SECTION LOCAL (0) 0x298
+ 15: SECTION LOCAL (0) 0x2d8
+ 16: SECTION LOCAL (0) 0x428
+ 17: SECTION LOCAL (0) 0x4f2
+ 18: SECTION LOCAL (0) 0x510
+ 19: SECTION LOCAL (0) 0x530
+ 20: SECTION LOCAL (0) 0x638
+ 21: SECTION LOCAL (0) 0x680
+ 22: SECTION LOCAL (0) 0x6a0
+ 23: SECTION LOCAL (0) 0x6e0
+ 24: SECTION LOCAL (0) 0x8f4
+ 25: SECTION LOCAL (0) 0x900
+ 26: SECTION LOCAL (0) 0x904
+ 27: SECTION LOCAL (0) 0x948
+ 28: SECTION LOCAL (0) 0x200dd0
+ 29: SECTION LOCAL (0) 0x200dd8
+ 30: SECTION LOCAL (0) 0x200de0
+ 31: SECTION LOCAL (0) 0x200de8
+ 32: SECTION LOCAL (0) 0x200df0
+ 33: SECTION LOCAL (0) 0x200fc0
+ 34: SECTION LOCAL (0) 0x201000
+ 35: SECTION LOCAL (0) 0x201030
+ 36: SECTION LOCAL (0) 0x20103c
+ 37: NOTYPE WEAK _ITM_deregisterTMCloneTable (0) 0
+ 38: FUNC GLOBAL __libc_start_main (0) 0
+ 39: NOTYPE WEAK __gmon_start__ (0) 0
+ 40: NOTYPE WEAK _Jv_RegisterClasses (0) 0
+ 41: NOTYPE WEAK _ITM_registerTMCloneTable (0) 0
+ 42: FUNC WEAK __cxa_finalize (0) 0
+ 43: NOTYPE GLOBAL _edata (0) 0x20103c
+ 44: NOTYPE GLOBAL _end (0) 0x201040
+ 45: FUNC GLOBAL __libc_csu_init (137) 0x860, rel: 0x860 (.text)
+ 46: NOTYPE GLOBAL __bss_start (0) 0x20103c
+ 47: FUNC GLOBAL main (35) 0x7f0, rel: 0x7f0 (.text)
+ 48: FUNC GLOBAL __libc_csu_fini (2) 0x8f0, rel: 0x8f0 (.text)
+ 49: FUNC GLOBAL bar (44) 0x828, rel: 0x828 (.text)
+ 50: FUNC GLOBAL _fini (0) 0x8f4, rel: 0x8f4 (.fini)
+ 51: FUNC GLOBAL _start (0) 0x6e0, rel: 0x6e0 (.text)
+ 52: FUNC GLOBAL _init (0) 0x680, rel: 0x680 (.init)
+EOF
+
+cat > testfile.minsym_pl.in <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x3000000238
+ 2: FUNC LOCAL deregister_tm_clones (0) 0x3000000710, rel: 0x710 (.text)
+ 3: FUNC LOCAL register_tm_clones (0) 0x3000000740, rel: 0x740 (.text)
+ 4: FUNC LOCAL __do_global_dtors_aux (0) 0x3000000780, rel: 0x780 (.text)
+ 5: OBJECT LOCAL __do_global_dtors_aux_fini_array_entry (0) 0x3000200dd8
+ 6: FUNC LOCAL frame_dummy (0) 0x30000007c0, rel: 0x7c0 (.text)
+ 7: OBJECT LOCAL __frame_dummy_init_array_entry (0) 0x3000200dd0
+ 8: FUNC LOCAL foo (20) 0x3000000814, rel: 0x814 (.text)
+ 9: NOTYPE LOCAL __init_array_end (0) 0x3000200dd8
+ 10: NOTYPE LOCAL __init_array_start (0) 0x3000200dd0
+ 11: SECTION LOCAL (0) 0x3000000238
+ 12: SECTION LOCAL (0) 0x3000000254
+ 13: SECTION LOCAL (0) 0x3000000274
+ 14: SECTION LOCAL (0) 0x3000000298
+ 15: SECTION LOCAL (0) 0x30000002d8
+ 16: SECTION LOCAL (0) 0x3000000428
+ 17: SECTION LOCAL (0) 0x30000004f2
+ 18: SECTION LOCAL (0) 0x3000000510
+ 19: SECTION LOCAL (0) 0x3000000530
+ 20: SECTION LOCAL (0) 0x3000000638
+ 21: SECTION LOCAL (0) 0x3000000680
+ 22: SECTION LOCAL (0) 0x30000006a0
+ 23: SECTION LOCAL (0) 0x30000006e0
+ 24: SECTION LOCAL (0) 0x30000008f4
+ 25: SECTION LOCAL (0) 0x3000000900
+ 26: SECTION LOCAL (0) 0x3000000904
+ 27: SECTION LOCAL (0) 0x3000000948
+ 28: SECTION LOCAL (0) 0x3000200dd0
+ 29: SECTION LOCAL (0) 0x3000200dd8
+ 30: SECTION LOCAL (0) 0x3000200de0
+ 31: SECTION LOCAL (0) 0x3000200de8
+ 32: SECTION LOCAL (0) 0x3000200df0
+ 33: SECTION LOCAL (0) 0x3000200fc0
+ 34: SECTION LOCAL (0) 0x3000201000
+ 35: SECTION LOCAL (0) 0x3000201030
+ 36: SECTION LOCAL (0) 0x300020103c
+ 37: NOTYPE WEAK _ITM_deregisterTMCloneTable (0) 0
+ 38: FUNC GLOBAL __libc_start_main (0) 0
+ 39: NOTYPE WEAK __gmon_start__ (0) 0
+ 40: NOTYPE WEAK _Jv_RegisterClasses (0) 0
+ 41: NOTYPE WEAK _ITM_registerTMCloneTable (0) 0
+ 42: FUNC WEAK __cxa_finalize (0) 0
+ 43: NOTYPE GLOBAL _edata (0) 0x300020103c
+ 44: NOTYPE GLOBAL _end (0) 0x3000201040
+ 45: FUNC GLOBAL __libc_csu_init (137) 0x3000000860, rel: 0x860 (.text)
+ 46: NOTYPE GLOBAL __bss_start (0) 0x300020103c
+ 47: FUNC GLOBAL main (35) 0x30000007f0, rel: 0x7f0 (.text)
+ 48: FUNC GLOBAL __libc_csu_fini (2) 0x30000008f0, rel: 0x8f0 (.text)
+ 49: FUNC GLOBAL bar (44) 0x3000000828, rel: 0x828 (.text)
+ 50: FUNC GLOBAL _fini (0) 0x30000008f4, rel: 0x8f4 (.fini)
+ 51: FUNC GLOBAL _start (0) 0x30000006e0, rel: 0x6e0 (.text)
+ 52: FUNC GLOBAL _init (0) 0x3000000680, rel: 0x680 (.init)
+EOF
+
+cat testfile.symtab.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebaztab
+
+cat testfile.symtab.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdbg
+
+cat testfile.symtab_pl.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdbg_pl
+
+sed s/0x3000/0x4200/g testfile.symtab_pl.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdbg_plr
+
+cat testfile.dynsym.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdyn
+
+cat testfile.symtab.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazmdb
+
+cat testfile.minsym.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazmin
+
+cat testfile.minsym_pl.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazmin_pl
+
+sed s/0x3000/0x4200/g testfile.minsym_pl.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazmin_plr
+
+testrun_compare ${abs_builddir}/dwflsyms -e testfilebasmin <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: FUNC LOCAL foo (18) 0x400168, rel: 0x400168 (.text)
+ 2: SECTION LOCAL (0) 0x400120
+ 3: SECTION LOCAL (0) 0x400144
+ 4: SECTION LOCAL (0) 0x4001c0
+ 5: SECTION LOCAL (0) 0x600258
+ 6: FUNC GLOBAL _start (21) 0x4001a8, rel: 0x4001a8 (.text)
+ 7: FUNC GLOBAL main (33) 0x400144, rel: 0x400144 (.text)
+ 8: FUNC GLOBAL bar (44) 0x40017a, rel: 0x40017a (.text)
+EOF
+
+testrun_compare ${abs_builddir}/dwflsyms -e testfilebaxmin <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: FUNC LOCAL deregister_tm_clones (0) 0x400430, rel: 0x400430 (.text)
+ 2: FUNC LOCAL register_tm_clones (0) 0x400460, rel: 0x400460 (.text)
+ 3: FUNC LOCAL __do_global_dtors_aux (0) 0x4004a0, rel: 0x4004a0 (.text)
+ 4: OBJECT LOCAL __do_global_dtors_aux_fini_array_entry (0) 0x600e18
+ 5: FUNC LOCAL frame_dummy (0) 0x4004c0, rel: 0x4004c0 (.text)
+ 6: OBJECT LOCAL __frame_dummy_init_array_entry (0) 0x600e10
+ 7: FUNC LOCAL foo (20) 0x4004f0, rel: 0x4004f0 (.text)
+ 8: NOTYPE LOCAL __init_array_end (0) 0x600e18
+ 9: NOTYPE LOCAL __init_array_start (0) 0x600e10
+ 10: SECTION LOCAL (0) 0x400238
+ 11: SECTION LOCAL (0) 0x400254
+ 12: SECTION LOCAL (0) 0x400274
+ 13: SECTION LOCAL (0) 0x400298
+ 14: SECTION LOCAL (0) 0x4002b8
+ 15: SECTION LOCAL (0) 0x400300
+ 16: SECTION LOCAL (0) 0x400338
+ 17: SECTION LOCAL (0) 0x400340
+ 18: SECTION LOCAL (0) 0x400360
+ 19: SECTION LOCAL (0) 0x400378
+ 20: SECTION LOCAL (0) 0x4003a8
+ 21: SECTION LOCAL (0) 0x4003d0
+ 22: SECTION LOCAL (0) 0x400400
+ 23: SECTION LOCAL (0) 0x4005c4
+ 24: SECTION LOCAL (0) 0x4005d0
+ 25: SECTION LOCAL (0) 0x4005e0
+ 26: SECTION LOCAL (0) 0x400628
+ 27: SECTION LOCAL (0) 0x600e10
+ 28: SECTION LOCAL (0) 0x600e18
+ 29: SECTION LOCAL (0) 0x600e20
+ 30: SECTION LOCAL (0) 0x600e28
+ 31: SECTION LOCAL (0) 0x600ff8
+ 32: SECTION LOCAL (0) 0x601000
+ 33: SECTION LOCAL (0) 0x601028
+ 34: SECTION LOCAL (0) 0x601034
+ 35: FUNC GLOBAL __libc_start_main (0) 0
+ 36: NOTYPE WEAK __gmon_start__ (0) 0
+ 37: FUNC GLOBAL __libc_csu_fini (2) 0x4005c0, rel: 0x4005c0 (.text)
+ 38: FUNC GLOBAL bar (40) 0x400504, rel: 0x400504 (.text)
+ 39: FUNC GLOBAL _fini (0) 0x4005c4, rel: 0x4005c4 (.fini)
+ 40: FUNC GLOBAL __libc_csu_init (101) 0x400550, rel: 0x400550 (.text)
+ 41: FUNC GLOBAL _start (0) 0x400400, rel: 0x400400 (.text)
+ 42: FUNC GLOBAL main (35) 0x40052c, rel: 0x40052c (.text)
+ 43: FUNC GLOBAL _init (0) 0x4003a8, rel: 0x4003a8 (.init)
+EOF
+
+testfiles testfile66
+testrun_compare ${abs_builddir}/dwflsyms -e testfile66 <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x190
+ 2: SECTION LOCAL (0) 0x1a4
+ 3: SECTION LOCAL (0) 0x1c8
+ 4: SECTION LOCAL (0) 0x1f8
+ 5: SECTION LOCAL (0) 0x288
+ 6: SECTION LOCAL (0) 0x2a8
+ 7: SECTION LOCAL (0) 0x2d8
+ 8: SECTION LOCAL (0) 0x102e0
+ 9: SECTION LOCAL (0) 0x103d0
+ 10: SECTION LOCAL (0) 0x103e8
+ 11: SECTION LOCAL (0) 0x103e8
+ 12: OBJECT LOCAL _DYNAMIC (0) 0x102e0
+ 13: FUNC GLOBAL _start (4) 0x103d0, rel: 0x103d0 (.opd) [0x2d8, rel: 0 (.text)]
+ 14: NOTYPE GLOBAL __bss_start (0) 0x103f0
+ 15: NOTYPE GLOBAL _edata (0) 0x103f0
+ 16: NOTYPE GLOBAL _end (0) 0x103f0
+EOF
+
+testfiles testfile66.core
+testrun_compare ${abs_builddir}/dwflsyms -e testfile66 --core=testfile66.core <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0xfffb1af0410
+ 2: NOTYPE GLOBAL __kernel_datapage_offset (0) 0xfffb1af05dc
+ 3: OBJECT GLOBAL LINUX_2.6.15 (0) 0
+ 4: NOTYPE GLOBAL __kernel_clock_getres (64) 0xfffb1af052c
+ 5: NOTYPE GLOBAL __kernel_get_tbfreq (24) 0xfffb1af0620
+ 6: NOTYPE GLOBAL __kernel_gettimeofday (84) 0xfffb1af0440
+ 7: NOTYPE GLOBAL __kernel_sync_dicache (20) 0xfffb1af06c4
+ 8: NOTYPE GLOBAL __kernel_sync_dicache_p5 (20) 0xfffb1af06c4
+ 9: NOTYPE GLOBAL __kernel_sigtramp_rt64 (12) 0xfffb1af0418
+ 10: NOTYPE GLOBAL __kernel_clock_gettime (152) 0xfffb1af0494
+ 11: NOTYPE GLOBAL __kernel_get_syscall_map (44) 0xfffb1af05f4
+ld64.so.1: Callback returned failure
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x461b0190
+ 2: SECTION LOCAL (0) 0x461b01a4
+ 3: SECTION LOCAL (0) 0x461b01c8
+ 4: SECTION LOCAL (0) 0x461b01f8
+ 5: SECTION LOCAL (0) 0x461b0288
+ 6: SECTION LOCAL (0) 0x461b02a8
+ 7: SECTION LOCAL (0) 0x461b02d8
+ 8: SECTION LOCAL (0) 0x461c02e0
+ 9: SECTION LOCAL (0) 0x461c03d0
+ 10: SECTION LOCAL (0) 0x461c03e8
+ 11: SECTION LOCAL (0) 0x461c03e8
+ 12: OBJECT LOCAL _DYNAMIC (0) 0x102e0
+ 13: FUNC GLOBAL _start (4) 0x461c03d0, rel: 0x103d0 (.opd) [0x461b02d8, rel: 0 (.text)]
+ 14: NOTYPE GLOBAL __bss_start (0) 0x103f0
+ 15: NOTYPE GLOBAL _edata (0) 0x103f0
+ 16: NOTYPE GLOBAL _end (0) 0x103f0
+EOF
+
+# Test the already present dot-prefixed names do not get duplicated.
+testfiles hello_ppc64.ko
+testrun_compare ${abs_builddir}/dwflsyms -e hello_ppc64.ko <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0
+ 2: SECTION LOCAL (0) 0x94
+ 3: SECTION LOCAL (0) 0xba
+ 4: SECTION LOCAL (0) 0xd0
+ 5: SECTION LOCAL (0) 0x13a
+ 6: SECTION LOCAL (0) 0x13a
+ 7: SECTION LOCAL (0) 0x150
+ 8: SECTION LOCAL (0) 0x170
+ 9: SECTION LOCAL (0) 0x188
+ 10: SECTION LOCAL (0) 0x410
+ 11: SECTION LOCAL (0) 0x434
+ 12: SECTION LOCAL (0) 0x438
+ 13: SECTION LOCAL (0) 0x438
+ 14: SECTION LOCAL (0) 0
+ 15: SECTION LOCAL (0) 0
+ 16: SECTION LOCAL (0) 0
+ 17: SECTION LOCAL (0) 0
+ 18: SECTION LOCAL (0) 0
+ 19: SECTION LOCAL (0) 0
+ 20: SECTION LOCAL (0) 0
+ 21: SECTION LOCAL (0) 0
+ 22: SECTION LOCAL (0) 0
+ 23: SECTION LOCAL (0) 0
+ 24: FILE LOCAL init.c (0) 0
+ 25: FILE LOCAL exit.c (0) 0
+ 26: FILE LOCAL hello.mod.c (0) 0
+ 27: OBJECT LOCAL __mod_srcversion23 (35) 0xd0
+ 28: OBJECT LOCAL __module_depends (9) 0xf8
+ 29: OBJECT LOCAL __mod_vermagic5 (50) 0x108
+ 30: OBJECT GLOBAL __this_module (648) 0x188
+ 31: FUNC GLOBAL .cleanup_module (72) 0x4c, rel: 0x4c (.text)
+ 32: FUNC GLOBAL cleanup_module (24) 0x160, rel: 0x10 (.opd)
+ 33: NOTYPE GLOBAL .printk (0) 0
+ 34: FUNC GLOBAL init_module (24) 0x150, rel: 0 (.opd)
+ 35: NOTYPE GLOBAL ._mcount (0) 0
+ 36: FUNC GLOBAL .init_module (76) 0, rel: 0 (.text)
+ 37: NOTYPE GLOBAL _mcount (0) 0
+EOF
+
+# Same test files as above, but now generated on ppc64.
+# ppc64 uses function descriptors to make things more "interesting".
+
+testfiles testfilebaztabppc64
+testfiles testfilebazdbgppc64 testfilebazdbgppc64.debug
+testfiles testfilebazdbgppc64_pl
+testfiles testfilebazdbgppc64_plr
+testfiles testfilebazdynppc64
+testfiles testfilebazmdbppc64
+testfiles testfilebazminppc64
+testfiles testfilebazminppc64_pl
+testfiles testfilebazminppc64_plr
+
+cat > testfile.symtab.in <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x238
+ 2: SECTION LOCAL (0) 0x24c
+ 3: SECTION LOCAL (0) 0x26c
+ 4: SECTION LOCAL (0) 0x290
+ 5: SECTION LOCAL (0) 0x2c0
+ 6: SECTION LOCAL (0) 0x3e0
+ 7: SECTION LOCAL (0) 0x488
+ 8: SECTION LOCAL (0) 0x4a0
+ 9: SECTION LOCAL (0) 0x4c0
+ 10: SECTION LOCAL (0) 0x820
+ 11: SECTION LOCAL (0) 0x850
+ 12: SECTION LOCAL (0) 0x8a0
+ 13: SECTION LOCAL (0) 0xd30
+ 14: SECTION LOCAL (0) 0xd4c
+ 15: SECTION LOCAL (0) 0xd50
+ 16: SECTION LOCAL (0) 0xd70
+ 17: SECTION LOCAL (0) 0x1fde0
+ 18: SECTION LOCAL (0) 0x1fde8
+ 19: SECTION LOCAL (0) 0x1fdf0
+ 20: SECTION LOCAL (0) 0x1fdf8
+ 21: SECTION LOCAL (0) 0x1fe20
+ 22: SECTION LOCAL (0) 0x20000
+ 23: SECTION LOCAL (0) 0x20010
+ 24: SECTION LOCAL (0) 0x200d8
+ 25: SECTION LOCAL (0) 0x20110
+ 26: SECTION LOCAL (0) 0x20158
+ 27: SECTION LOCAL (0) 0
+ 28: SECTION LOCAL (0) 0
+ 29: SECTION LOCAL (0) 0
+ 30: SECTION LOCAL (0) 0
+ 31: SECTION LOCAL (0) 0
+ 32: SECTION LOCAL (0) 0
+ 33: SECTION LOCAL (0) 0
+ 34: FILE LOCAL crtstuff.c (0) 0
+ 35: OBJECT LOCAL __JCR_LIST__ (0) 0x1fdf0
+ 36: FUNC LOCAL deregister_tm_clones (0) 0x20040, rel: 0x20040 (.opd) [0x910, rel: 0x70 (.text)]
+ 37: FUNC LOCAL register_tm_clones (0) 0x20050, rel: 0x20050 (.opd) [0x980, rel: 0xe0 (.text)]
+ 38: FUNC LOCAL __do_global_dtors_aux (0) 0x20060, rel: 0x20060 (.opd) [0x9f0, rel: 0x150 (.text)]
+ 39: OBJECT LOCAL completed.7711 (1) 0x20158
+ 40: OBJECT LOCAL __do_global_dtors_aux_fini_array_entry (0) 0x1fde8
+ 41: FUNC LOCAL frame_dummy (0) 0x20070, rel: 0x20070 (.opd) [0xa50, rel: 0x1b0 (.text)]
+ 42: OBJECT LOCAL __frame_dummy_init_array_entry (0) 0x1fde0
+ 43: FILE LOCAL foo.c (0) 0
+ 44: FILE LOCAL bar.c (0) 0
+ 45: OBJECT LOCAL b1 (4) 0x20004
+ 46: FUNC LOCAL foo (76) 0x20090, rel: 0x20090 (.opd) [0xb34, rel: 0x294 (.text)]
+ 47: FILE LOCAL crtstuff.c (0) 0
+ 48: OBJECT LOCAL __FRAME_END__ (0) 0xe18
+ 49: OBJECT LOCAL __JCR_END__ (0) 0x1fdf0
+ 50: FILE LOCAL (0) 0
+ 51: NOTYPE LOCAL __glink_PLTresolve (0) 0xce8
+ 52: NOTYPE LOCAL 00000011.plt_call.__libc_start_main@@GLIBC_2.3 (0) 0x8a0
+ 53: NOTYPE LOCAL 00000011.plt_call.__cxa_finalize@@GLIBC_2.3 (0) 0x8b4
+ 54: NOTYPE LOCAL __init_array_end (0) 0x1fde8
+ 55: OBJECT LOCAL _DYNAMIC (0) 0x1fe20
+ 56: NOTYPE LOCAL __init_array_start (0) 0x1fde0
+ 57: FUNC GLOBAL __libc_csu_fini (16) 0x200c0, rel: 0x200c0 (.opd) [0xcd0, rel: 0x430 (.text)]
+ 58: FUNC GLOBAL __libc_start_main@@GLIBC_2.3 (0) 0
+ 59: NOTYPE WEAK _ITM_deregisterTMCloneTable (0) 0
+ 60: NOTYPE WEAK data_start (0) 0x20000
+ 61: NOTYPE GLOBAL _edata (0) 0x20110
+ 62: FUNC GLOBAL bar (116) 0x200a0, rel: 0x200a0 (.opd) [0xb80, rel: 0x2e0 (.text)]
+ 63: FUNC GLOBAL _fini (0) 0x20030, rel: 0x20030 (.opd) [0xd30, rel: 0 (.fini)]
+ 64: NOTYPE GLOBAL __data_start (0) 0x20000
+ 65: NOTYPE WEAK __gmon_start__ (0) 0
+ 66: OBJECT GLOBAL __dso_handle (0) 0x1fe18
+ 67: OBJECT GLOBAL _IO_stdin_used (4) 0xd4c
+ 68: OBJECT GLOBAL b2 (4) 0x20008
+ 69: FUNC WEAK __cxa_finalize@@GLIBC_2.3 (0) 0
+ 70: FUNC GLOBAL __libc_csu_init (204) 0x200b0, rel: 0x200b0 (.opd) [0xc00, rel: 0x360 (.text)]
+ 71: NOTYPE GLOBAL _end (0) 0x20160
+ 72: FUNC GLOBAL _start (60) 0x20010, rel: 0x20010 (.opd) [0x8c8, rel: 0x28 (.text)]
+ 73: NOTYPE GLOBAL __bss_start (0) 0x20110
+ 74: FUNC GLOBAL main (128) 0x20080, rel: 0x20080 (.opd) [0xab4, rel: 0x214 (.text)]
+ 75: NOTYPE WEAK _Jv_RegisterClasses (0) 0
+ 76: OBJECT GLOBAL __TMC_END__ (0) 0x20010
+ 77: NOTYPE WEAK _ITM_registerTMCloneTable (0) 0
+ 78: FUNC GLOBAL _init (0) 0x20020, rel: 0x20020 (.opd) [0x850, rel: 0 (.init)]
+EOF
+
+cat > testfile.symtab_pl.in <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x8001000238
+ 2: SECTION LOCAL (0) 0x800100024c
+ 3: SECTION LOCAL (0) 0x800100026c
+ 4: SECTION LOCAL (0) 0x8001000290
+ 5: SECTION LOCAL (0) 0x80010002c0
+ 6: SECTION LOCAL (0) 0x80010003e0
+ 7: SECTION LOCAL (0) 0x8001000488
+ 8: SECTION LOCAL (0) 0x80010004a0
+ 9: SECTION LOCAL (0) 0x80010004c0
+ 10: SECTION LOCAL (0) 0x8001000820
+ 11: SECTION LOCAL (0) 0x8001000850
+ 12: SECTION LOCAL (0) 0x80010008a0
+ 13: SECTION LOCAL (0) 0x8001000d30
+ 14: SECTION LOCAL (0) 0x8001000d4c
+ 15: SECTION LOCAL (0) 0x8001000d50
+ 16: SECTION LOCAL (0) 0x8001000d70
+ 17: SECTION LOCAL (0) 0x800101fde0
+ 18: SECTION LOCAL (0) 0x800101fde8
+ 19: SECTION LOCAL (0) 0x800101fdf0
+ 20: SECTION LOCAL (0) 0x800101fdf8
+ 21: SECTION LOCAL (0) 0x800101fe20
+ 22: SECTION LOCAL (0) 0x8001020000
+ 23: SECTION LOCAL (0) 0x8001020010
+ 24: SECTION LOCAL (0) 0x80010200d8
+ 25: SECTION LOCAL (0) 0x8001020110
+ 26: SECTION LOCAL (0) 0x8001020158
+ 27: SECTION LOCAL (0) 0
+ 28: SECTION LOCAL (0) 0
+ 29: SECTION LOCAL (0) 0
+ 30: SECTION LOCAL (0) 0
+ 31: SECTION LOCAL (0) 0
+ 32: SECTION LOCAL (0) 0
+ 33: SECTION LOCAL (0) 0
+ 34: FILE LOCAL crtstuff.c (0) 0
+ 35: OBJECT LOCAL __JCR_LIST__ (0) 0x800101fdf0
+ 36: FUNC LOCAL deregister_tm_clones (0) 0x8001020040, rel: 0x20040 (.opd) [0x8001000910, rel: 0x70 (.text)]
+ 37: FUNC LOCAL register_tm_clones (0) 0x8001020050, rel: 0x20050 (.opd) [0x8001000980, rel: 0xe0 (.text)]
+ 38: FUNC LOCAL __do_global_dtors_aux (0) 0x8001020060, rel: 0x20060 (.opd) [0x80010009f0, rel: 0x150 (.text)]
+ 39: OBJECT LOCAL completed.7711 (1) 0x8001020158
+ 40: OBJECT LOCAL __do_global_dtors_aux_fini_array_entry (0) 0x800101fde8
+ 41: FUNC LOCAL frame_dummy (0) 0x8001020070, rel: 0x20070 (.opd) [0x8001000a50, rel: 0x1b0 (.text)]
+ 42: OBJECT LOCAL __frame_dummy_init_array_entry (0) 0x800101fde0
+ 43: FILE LOCAL foo.c (0) 0
+ 44: FILE LOCAL bar.c (0) 0
+ 45: OBJECT LOCAL b1 (4) 0x8001020004
+ 46: FUNC LOCAL foo (76) 0x8001020090, rel: 0x20090 (.opd) [0x8001000b34, rel: 0x294 (.text)]
+ 47: FILE LOCAL crtstuff.c (0) 0
+ 48: OBJECT LOCAL __FRAME_END__ (0) 0x8001000e18
+ 49: OBJECT LOCAL __JCR_END__ (0) 0x800101fdf0
+ 50: FILE LOCAL (0) 0
+ 51: NOTYPE LOCAL __glink_PLTresolve (0) 0x8001000ce8
+ 52: NOTYPE LOCAL 00000011.plt_call.__libc_start_main@@GLIBC_2.3 (0) 0x80010008a0
+ 53: NOTYPE LOCAL 00000011.plt_call.__cxa_finalize@@GLIBC_2.3 (0) 0x80010008b4
+ 54: NOTYPE LOCAL __init_array_end (0) 0x800101fde8
+ 55: OBJECT LOCAL _DYNAMIC (0) 0x800101fe20
+ 56: NOTYPE LOCAL __init_array_start (0) 0x800101fde0
+ 57: FUNC GLOBAL __libc_csu_fini (16) 0x80010200c0, rel: 0x200c0 (.opd) [0x8001000cd0, rel: 0x430 (.text)]
+ 58: FUNC GLOBAL __libc_start_main@@GLIBC_2.3 (0) 0
+ 59: NOTYPE WEAK _ITM_deregisterTMCloneTable (0) 0
+ 60: NOTYPE WEAK data_start (0) 0x8001020000
+ 61: NOTYPE GLOBAL _edata (0) 0x8001020110
+ 62: FUNC GLOBAL bar (116) 0x80010200a0, rel: 0x200a0 (.opd) [0x8001000b80, rel: 0x2e0 (.text)]
+ 63: FUNC GLOBAL _fini (0) 0x8001020030, rel: 0x20030 (.opd) [0x8001000d30, rel: 0 (.fini)]
+ 64: NOTYPE GLOBAL __data_start (0) 0x8001020000
+ 65: NOTYPE WEAK __gmon_start__ (0) 0
+ 66: OBJECT GLOBAL __dso_handle (0) 0x800101fe18
+ 67: OBJECT GLOBAL _IO_stdin_used (4) 0x8001000d4c
+ 68: OBJECT GLOBAL b2 (4) 0x8001020008
+ 69: FUNC WEAK __cxa_finalize@@GLIBC_2.3 (0) 0
+ 70: FUNC GLOBAL __libc_csu_init (204) 0x80010200b0, rel: 0x200b0 (.opd) [0x8001000c00, rel: 0x360 (.text)]
+ 71: NOTYPE GLOBAL _end (0) 0x8001020160
+ 72: FUNC GLOBAL _start (60) 0x8001020010, rel: 0x20010 (.opd) [0x80010008c8, rel: 0x28 (.text)]
+ 73: NOTYPE GLOBAL __bss_start (0) 0x8001020110
+ 74: FUNC GLOBAL main (128) 0x8001020080, rel: 0x20080 (.opd) [0x8001000ab4, rel: 0x214 (.text)]
+ 75: NOTYPE WEAK _Jv_RegisterClasses (0) 0
+ 76: OBJECT GLOBAL __TMC_END__ (0) 0x8001020010
+ 77: NOTYPE WEAK _ITM_registerTMCloneTable (0) 0
+ 78: FUNC GLOBAL _init (0) 0x8001020020, rel: 0x20020 (.opd) [0x8001000850, rel: 0 (.init)]
+EOF
+
+cat > testfile.dynsym.in <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x238
+ 2: SECTION LOCAL (0) 0x1fdf0
+ 3: FUNC GLOBAL __libc_start_main (0) 0
+ 4: NOTYPE WEAK _ITM_deregisterTMCloneTable (0) 0
+ 5: NOTYPE WEAK __gmon_start__ (0) 0
+ 6: FUNC WEAK __cxa_finalize (0) 0
+ 7: NOTYPE WEAK _Jv_RegisterClasses (0) 0
+ 8: NOTYPE WEAK _ITM_registerTMCloneTable (0) 0
+ 9: NOTYPE GLOBAL _edata (0) 0x20110
+ 10: NOTYPE GLOBAL _end (0) 0x20160
+ 11: NOTYPE GLOBAL __bss_start (0) 0x20110
+EOF
+
+cat > testfile.minsym.in <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x238
+ 2: SECTION LOCAL (0) 0x1fdf0
+ 3: OBJECT LOCAL __do_global_dtors_aux_fini_array_entry (0) 0x1fde8
+ 4: OBJECT LOCAL __frame_dummy_init_array_entry (0) 0x1fde0
+ 5: NOTYPE LOCAL __glink_PLTresolve (0) 0xce8
+ 6: NOTYPE LOCAL 00000011.plt_call.__libc_start_main@@GLIBC_2.3 (0) 0x8a0
+ 7: NOTYPE LOCAL 00000011.plt_call.__cxa_finalize@@GLIBC_2.3 (0) 0x8b4
+ 8: NOTYPE LOCAL __init_array_end (0) 0x1fde8
+ 9: NOTYPE LOCAL __init_array_start (0) 0x1fde0
+ 10: SECTION LOCAL (0) 0x238
+ 11: SECTION LOCAL (0) 0x24c
+ 12: SECTION LOCAL (0) 0x26c
+ 13: SECTION LOCAL (0) 0x290
+ 14: SECTION LOCAL (0) 0x2c0
+ 15: SECTION LOCAL (0) 0x3e0
+ 16: SECTION LOCAL (0) 0x488
+ 17: SECTION LOCAL (0) 0x4a0
+ 18: SECTION LOCAL (0) 0x4c0
+ 19: SECTION LOCAL (0) 0x820
+ 20: SECTION LOCAL (0) 0x850
+ 21: SECTION LOCAL (0) 0x8a0
+ 22: SECTION LOCAL (0) 0xd30
+ 23: SECTION LOCAL (0) 0xd4c
+ 24: SECTION LOCAL (0) 0xd50
+ 25: SECTION LOCAL (0) 0xd70
+ 26: SECTION LOCAL (0) 0x1fde0
+ 27: SECTION LOCAL (0) 0x1fde8
+ 28: SECTION LOCAL (0) 0x1fdf0
+ 29: SECTION LOCAL (0) 0x1fdf8
+ 30: SECTION LOCAL (0) 0x1fe20
+ 31: SECTION LOCAL (0) 0x20000
+ 32: SECTION LOCAL (0) 0x20010
+ 33: SECTION LOCAL (0) 0x200d8
+ 34: SECTION LOCAL (0) 0x20110
+ 35: SECTION LOCAL (0) 0x20158
+ 36: FUNC GLOBAL __libc_start_main (0) 0
+ 37: NOTYPE WEAK _ITM_deregisterTMCloneTable (0) 0
+ 38: NOTYPE WEAK __gmon_start__ (0) 0
+ 39: FUNC WEAK __cxa_finalize (0) 0
+ 40: NOTYPE WEAK _Jv_RegisterClasses (0) 0
+ 41: NOTYPE WEAK _ITM_registerTMCloneTable (0) 0
+ 42: NOTYPE GLOBAL _edata (0) 0x20110
+ 43: NOTYPE GLOBAL _end (0) 0x20160
+ 44: NOTYPE GLOBAL __bss_start (0) 0x20110
+EOF
+
+cat > testfile.minsym_pl.in <<\EOF
+ 0: NOTYPE LOCAL (0) 0
+ 1: SECTION LOCAL (0) 0x8001000238
+ 2: SECTION LOCAL (0) 0x800101fdf0
+ 3: OBJECT LOCAL __do_global_dtors_aux_fini_array_entry (0) 0x800101fde8
+ 4: OBJECT LOCAL __frame_dummy_init_array_entry (0) 0x800101fde0
+ 5: NOTYPE LOCAL __glink_PLTresolve (0) 0x8001000ce8
+ 6: NOTYPE LOCAL 00000011.plt_call.__libc_start_main@@GLIBC_2.3 (0) 0x80010008a0
+ 7: NOTYPE LOCAL 00000011.plt_call.__cxa_finalize@@GLIBC_2.3 (0) 0x80010008b4
+ 8: NOTYPE LOCAL __init_array_end (0) 0x800101fde8
+ 9: NOTYPE LOCAL __init_array_start (0) 0x800101fde0
+ 10: SECTION LOCAL (0) 0x8001000238
+ 11: SECTION LOCAL (0) 0x800100024c
+ 12: SECTION LOCAL (0) 0x800100026c
+ 13: SECTION LOCAL (0) 0x8001000290
+ 14: SECTION LOCAL (0) 0x80010002c0
+ 15: SECTION LOCAL (0) 0x80010003e0
+ 16: SECTION LOCAL (0) 0x8001000488
+ 17: SECTION LOCAL (0) 0x80010004a0
+ 18: SECTION LOCAL (0) 0x80010004c0
+ 19: SECTION LOCAL (0) 0x8001000820
+ 20: SECTION LOCAL (0) 0x8001000850
+ 21: SECTION LOCAL (0) 0x80010008a0
+ 22: SECTION LOCAL (0) 0x8001000d30
+ 23: SECTION LOCAL (0) 0x8001000d4c
+ 24: SECTION LOCAL (0) 0x8001000d50
+ 25: SECTION LOCAL (0) 0x8001000d70
+ 26: SECTION LOCAL (0) 0x800101fde0
+ 27: SECTION LOCAL (0) 0x800101fde8
+ 28: SECTION LOCAL (0) 0x800101fdf0
+ 29: SECTION LOCAL (0) 0x800101fdf8
+ 30: SECTION LOCAL (0) 0x800101fe20
+ 31: SECTION LOCAL (0) 0x8001020000
+ 32: SECTION LOCAL (0) 0x8001020010
+ 33: SECTION LOCAL (0) 0x80010200d8
+ 34: SECTION LOCAL (0) 0x8001020110
+ 35: SECTION LOCAL (0) 0x8001020158
+ 36: FUNC GLOBAL __libc_start_main (0) 0
+ 37: NOTYPE WEAK _ITM_deregisterTMCloneTable (0) 0
+ 38: NOTYPE WEAK __gmon_start__ (0) 0
+ 39: FUNC WEAK __cxa_finalize (0) 0
+ 40: NOTYPE WEAK _Jv_RegisterClasses (0) 0
+ 41: NOTYPE WEAK _ITM_registerTMCloneTable (0) 0
+ 42: NOTYPE GLOBAL _edata (0) 0x8001020110
+ 43: NOTYPE GLOBAL _end (0) 0x8001020160
+ 44: NOTYPE GLOBAL __bss_start (0) 0x8001020110
+EOF
+
+cat testfile.symtab.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebaztabppc64
+
+cat testfile.symtab.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdbgppc64
+
+cat testfile.symtab_pl.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdbgppc64_pl
+
+sed s/0x8001/0x4200/g testfile.symtab_pl.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdbgppc64_plr
+
+cat testfile.dynsym.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdynppc64
+
+cat testfile.symtab.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazmdbppc64
+
+cat testfile.minsym.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazminppc64
+
+cat testfile.minsym_pl.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazminppc64_pl
+
+sed s/0x8001/0x4200/g testfile.minsym_pl.in \
+ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazminppc64_plr
+
+exit 0
diff --git a/src/tests/run-early-offscn.sh b/src/tests/run-early-offscn.sh
new file mode 100755
index 00000000..3757bcfc
--- /dev/null
+++ b/src/tests/run-early-offscn.sh
@@ -0,0 +1,24 @@
+#! /bin/sh
+# Copyright (C) 2008 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile
+
+testrun ${abs_builddir}/early-offscn testfile 0x500
+
+exit 0
diff --git a/src/tests/run-ecp-test.sh b/src/tests/run-ecp-test.sh
new file mode 100755
index 00000000..d5e376a1
--- /dev/null
+++ b/src/tests/run-ecp-test.sh
@@ -0,0 +1,28 @@
+#! /bin/sh
+# Copyright (C) 2002, 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Jakub Jelinek <jakub@redhat.com>, 2002.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile10
+tempfiles testfile10.tmp
+
+testrun ${abs_builddir}/ecp testfile10 testfile10.tmp
+
+cmp testfile10 testfile10.tmp
+
+exit 0
diff --git a/src/tests/run-ecp-test2.sh b/src/tests/run-ecp-test2.sh
new file mode 100755
index 00000000..864e0a58
--- /dev/null
+++ b/src/tests/run-ecp-test2.sh
@@ -0,0 +1,26 @@
+#! /bin/sh
+# Copyright (C) 2002, 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Jakub Jelinek <jakub@redhat.com>, 2002.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile2
+tempfiles testfile2.tmp
+
+testrun ${abs_builddir}/ecp testfile2 testfile2.tmp
+
+exit 0
diff --git a/src/tests/run-elf_cntl_gelf_getshdr.sh b/src/tests/run-elf_cntl_gelf_getshdr.sh
new file mode 100755
index 00000000..94b477c7
--- /dev/null
+++ b/src/tests/run-elf_cntl_gelf_getshdr.sh
@@ -0,0 +1,30 @@
+#! /bin/sh
+# Copyright (C) 2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+tempfiles test_shdr.out
+
+# However we open the elf file, the shdrs should be the same.
+testrun ${abs_builddir}/test-elf_cntl_gelf_getshdr READ ${abs_builddir}/test-elf_cntl_gelf_getshdr \
+ > test_shdr.out
+
+testrun_compare ${abs_builddir}/test-elf_cntl_gelf_getshdr MMAP ${abs_builddir}/test-elf_cntl_gelf_getshdr \
+ < test_shdr.out
+
+testrun_compare ${abs_builddir}/test-elf_cntl_gelf_getshdr FDREAD ${abs_builddir}/test-elf_cntl_gelf_getshdr \
+ < test_shdr.out
diff --git a/src/tests/run-elflint-self.sh b/src/tests/run-elflint-self.sh
new file mode 100755
index 00000000..013109db
--- /dev/null
+++ b/src/tests/run-elflint-self.sh
@@ -0,0 +1,21 @@
+#! /bin/sh
+# Copyright (C) 2005, 2007 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
diff --git a/src/tests/run-elflint-test.sh b/src/tests/run-elflint-test.sh
new file mode 100755
index 00000000..68615b96
--- /dev/null
+++ b/src/tests/run-elflint-test.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Copyright (C) 2005, 2007, 2008 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile18
+
+testrun_compare ${abs_top_builddir}/src/elflint --gnu-ld testfile18 <<\EOF
+section [ 8] '.rela.dyn': relocation 1: copy relocation against symbol of type FUNC
+EOF
+
+testfiles testfile32
+testrun ${abs_top_builddir}/src/elflint -q testfile32
+
+testfiles testfile33
+testrun ${abs_top_builddir}/src/elflint -q testfile33
+
+testfiles testfile42
+testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile42
+
+testfiles testfile46
+testrun ${abs_top_builddir}/src/elflint -q testfile46
+
+# see also run-readelf-d.sh
+testfiles testlib_dynseg.so
+testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testlib_dynseg.so
+
+exit 0
diff --git a/src/tests/run-find-prologues.sh b/src/tests/run-find-prologues.sh
new file mode 100755
index 00000000..160f07d2
--- /dev/null
+++ b/src/tests/run-find-prologues.sh
@@ -0,0 +1,85 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile11 testfile22 testfile24 \
+ testfile25 testfile3 testfile4 testfile5 testfile6
+
+testrun_compare ${abs_builddir}/find-prologues -e testfile <<\EOF
+main 0x000000000804842c 0x0000000008048432
+bar 0x000000000804845c 0x000000000804845f
+foo 0x0000000008048468 0x000000000804846b
+EOF
+
+testrun_compare ${abs_builddir}/find-prologues -e testfile11 <<\EOF
+main 0x00000000080489b8 0x00000000080489cd
+gnu_obj_2 0x0000000008048c9e 0x0000000008048ca4
+gnu_obj_3 0x0000000008048cd8 0x0000000008048cde
+gnu_obj_2 0x0000000008048cf4 0x0000000008048cfa
+~invalid_argument 0x0000000008048d2e 0x0000000008048d34
+gnu_obj_1 0x0000000008048d62 0x0000000008048d65
+gnu_obj_1 0x0000000008048d8a 0x0000000008048d8d
+~invalid_argument 0x0000000008048db2 0x0000000008048db8
+EOF
+
+testrun_compare ${abs_builddir}/find-prologues -e testfile22 <<\EOF
+function 0x0000000008048348 0x000000000804834e
+main 0x000000000804835b 0x0000000008048377
+EOF
+
+testrun_compare ${abs_builddir}/find-prologues -e testfile24 <<\EOF
+incr 0x0000000008048348 0x000000000804834e
+main 0x0000000008048354 0x0000000008048360
+EOF
+
+testrun_compare ${abs_builddir}/find-prologues -e testfile25 <<\EOF
+incr 0x0000000008048348 0x000000000804834c
+EOF
+
+testrun_compare ${abs_builddir}/find-prologues -e testfile3 <<\EOF
+main 0x000000000804842c 0x0000000008048433
+bar 0x0000000008048458 0x000000000804845b
+foo 0x0000000008048464 0x0000000008048467
+EOF
+
+testrun_compare ${abs_builddir}/find-prologues -e testfile4 <<\EOF
+get 0x00000000080493fc 0x0000000008049402
+main 0x0000000008049498 0x000000000804949e
+a 0x000000000804d85c 0x000000000804d85c
+__tfPCc 0x000000000804d86c 0x000000000804d872
+__tfCc 0x000000000804d8a4 0x000000000804d8a4
+EOF
+
+testrun_compare ${abs_builddir}/find-prologues -e testfile5 <<\EOF
+bar 0x000000000804842c 0x000000000804842f
+foo 0x0000000008048438 0x000000000804843b
+main 0x0000000008048444 0x000000000804844a
+EOF
+
+testrun_compare ${abs_builddir}/find-prologues -e testfile6 <<\EOF
+main 0x00000000080489b8 0x00000000080489cd
+gnu_obj_2 0x0000000008048c9e 0x0000000008048ca4
+gnu_obj_3 0x0000000008048cd8 0x0000000008048cde
+gnu_obj_2 0x0000000008048cf4 0x0000000008048cfa
+~invalid_argument 0x0000000008048d2e 0x0000000008048d34
+gnu_obj_1 0x0000000008048d62 0x0000000008048d65
+gnu_obj_1 0x0000000008048d8a 0x0000000008048d8d
+~invalid_argument 0x0000000008048db2 0x0000000008048db8
+EOF
+
+exit 0
diff --git a/src/tests/run-funcretval.sh b/src/tests/run-funcretval.sh
new file mode 100755
index 00000000..779bd473
--- /dev/null
+++ b/src/tests/run-funcretval.sh
@@ -0,0 +1,153 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# The following files were obtaining by compiling funcretval_test.c
+# from this directory as follows:
+#
+# gcc -g funcretval_test.c -o funcretval_test_<YOURARCH>
+#
+# Pass -DFLOAT128 if the given arch supports __float128.
+
+testfiles funcretval_test_aarch64
+
+# funcretval_test_aarch64 was built with additional flag:
+# -DAARCH64_BUG_1032854
+# hence no fun_vec_double_8.
+testrun_compare ${abs_top_builddir}/tests/funcretval \
+ -e funcretval_test_aarch64 <<\EOF
+() fun_char: return value location: {0x50, 0}
+() fun_short: return value location: {0x50, 0}
+() fun_int: return value location: {0x50, 0}
+() fun_ptr: return value location: {0x50, 0}
+() fun_iptr: return value location: {0x50, 0}
+() fun_long: return value location: {0x50, 0}
+() fun_int128: return value location: {0x50, 0} {0x93, 0x8} {0x51, 0} {0x93, 0x8}
+() fun_large_struct1: return value location: {0x70, 0}
+() fun_large_struct2: return value location: {0x70, 0}
+() fun_float: return value location: {0x90, 0x40}
+() fun_float_complex: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4}
+() fun_double: return value location: {0x90, 0x40}
+() fun_double_complex: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
+() fun_long_double: return value location: {0x90, 0x40}
+() fun_long_double_complex: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
+() fun_vec_char_8: return value location: {0x90, 0x40}
+() fun_vec_short_8: return value location: {0x90, 0x40}
+() fun_vec_int_8: return value location: {0x90, 0x40}
+() fun_vec_long_8: return value location: {0x90, 0x40}
+() fun_vec_float_8: return value location: {0x90, 0x40}
+() fun_vec_char_16: return value location: {0x90, 0x40}
+() fun_vec_short_16: return value location: {0x90, 0x40}
+() fun_vec_int_16: return value location: {0x90, 0x40}
+() fun_vec_long_16: return value location: {0x90, 0x40}
+() fun_vec_int128_16: return value location: {0x90, 0x40}
+() fun_vec_float_16: return value location: {0x90, 0x40}
+() fun_vec_double_16: return value location: {0x90, 0x40}
+() fun_hfa1_float: return value location: {0x90, 0x40}
+() fun_hfa1_double: return value location: {0x90, 0x40}
+() fun_hfa1_long_double: return value location: {0x90, 0x40}
+() fun_hfa1_float_a: return value location: {0x90, 0x40}
+() fun_hfa1_double_a: return value location: {0x90, 0x40}
+() fun_hfa1_long_double_a: return value location: {0x90, 0x40}
+() fun_hfa2_float: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4}
+() fun_hfa2_double: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
+() fun_hfa2_long_double: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
+() fun_hfa2_float_a: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4}
+() fun_hfa2_double_a: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
+() fun_hfa2_long_double_a: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
+() fun_hfa3_float: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4}
+() fun_hfa3_double: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
+() fun_hfa3_long_double: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
+() fun_hfa3_float_a: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4}
+() fun_hfa3_double_a: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
+() fun_hfa3_long_double_a: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
+() fun_hfa4_float: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4} {0x90, 0x43} {0x93, 0x4}
+() fun_hfa4_double: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
+() fun_hfa4_long_double: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
+() fun_hfa4_float_a: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4} {0x90, 0x43} {0x93, 0x4}
+() fun_hfa4_double_a: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
+() fun_hfa4_long_double_a: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
+() fun_nfa5_float: return value location: {0x70, 0}
+() fun_nfa5_double: return value location: {0x70, 0}
+() fun_nfa5_long_double: return value location: {0x70, 0}
+() fun_nfa5_float_a: return value location: {0x70, 0}
+() fun_nfa5_double_a: return value location: {0x70, 0}
+() fun_nfa5_long_double_a: return value location: {0x70, 0}
+() fun_hva1_vec_char_8: return value location: {0x90, 0x40}
+() fun_hva1_vec_short_8: return value location: {0x90, 0x40}
+() fun_hva1_vec_int_8: return value location: {0x90, 0x40}
+() fun_hva1_vec_long_8: return value location: {0x90, 0x40}
+() fun_hva1_vec_float_8: return value location: {0x90, 0x40}
+() fun_hva1_vec_double_8: return value location: {0x90, 0x40}
+() fun_hva1_vec_char_16_t: return value location: {0x90, 0x40}
+() fun_hva1_vec_short_16_t: return value location: {0x90, 0x40}
+() fun_hva1_vec_int_16_t: return value location: {0x90, 0x40}
+() fun_hva1_vec_long_16_t: return value location: {0x90, 0x40}
+() fun_hva1_vec_int128_16_t: return value location: {0x90, 0x40}
+() fun_hva1_vec_float_16_t: return value location: {0x90, 0x40}
+() fun_hva1_vec_double_16_t: return value location: {0x90, 0x40}
+() fun_hva2_vec_char_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
+() fun_hva2_vec_short_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
+() fun_hva2_vec_int_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
+() fun_hva2_vec_long_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
+() fun_hva2_vec_float_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
+() fun_hva2_vec_double_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
+() fun_hva2_vec_char_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
+() fun_hva2_vec_short_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
+() fun_hva2_vec_int_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
+() fun_hva2_vec_long_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
+() fun_hva2_vec_int128_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
+() fun_hva2_vec_float_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
+() fun_hva2_vec_double_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10}
+() fun_hva3_vec_char_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
+() fun_hva3_vec_short_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
+() fun_hva3_vec_int_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
+() fun_hva3_vec_long_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
+() fun_hva3_vec_float_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
+() fun_hva3_vec_double_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
+() fun_hva3_vec_char_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
+() fun_hva3_vec_short_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
+() fun_hva3_vec_int_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
+() fun_hva3_vec_long_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
+() fun_hva3_vec_int128_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
+() fun_hva3_vec_float_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
+() fun_hva3_vec_double_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
+() fun_hva4_vec_char_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
+() fun_hva4_vec_short_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
+() fun_hva4_vec_int_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
+() fun_hva4_vec_long_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
+() fun_hva4_vec_float_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
+() fun_hva4_vec_double_8: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8} {0x90, 0x43} {0x93, 0x8}
+() fun_hva4_vec_char_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
+() fun_hva4_vec_short_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
+() fun_hva4_vec_int_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
+() fun_hva4_vec_long_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
+() fun_hva4_vec_int128_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
+() fun_hva4_vec_float_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
+() fun_hva4_vec_double_16_t: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10} {0x90, 0x43} {0x93, 0x10}
+() fun_mixed_hfa3_cff: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4}
+() fun_mixed_hfa3_cdd: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
+() fun_mixed_hfa3_cldld: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
+() fun_mixed_hfa3_fcf: return value location: {0x90, 0x40} {0x93, 0x4} {0x90, 0x41} {0x93, 0x4} {0x90, 0x42} {0x93, 0x4}
+() fun_mixed_hfa3_dcd: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8} {0x90, 0x42} {0x93, 0x8}
+() fun_mixed_hfa3_ldcld: return value location: {0x90, 0x40} {0x93, 0x10} {0x90, 0x41} {0x93, 0x10} {0x90, 0x42} {0x93, 0x10}
+() fun_mixed_hfa2_fltsht_t: return value location: {0x90, 0x40} {0x93, 0x8} {0x90, 0x41} {0x93, 0x8}
+() main: return value location: {0x50, 0}
+EOF
+
+exit 0
diff --git a/src/tests/run-funcscopes.sh b/src/tests/run-funcscopes.sh
new file mode 100755
index 00000000..d236f5c3
--- /dev/null
+++ b/src/tests/run-funcscopes.sh
@@ -0,0 +1,29 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile25
+
+testrun_compare ${abs_builddir}/funcscopes -e testfile25 incr <<\EOF
+testfile25: 0x8048000 .. 0x8049528
+ inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834f (/home/roland/build/stock-elfutils/inline-test.c:9)
+ incr (0x2e): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834f (/home/roland/build/stock-elfutils/inline-test.c:9)
+ x [ 66]
+EOF
+
+exit 0
diff --git a/src/tests/run-get-aranges.sh b/src/tests/run-get-aranges.sh
new file mode 100755
index 00000000..62cae5f8
--- /dev/null
+++ b/src/tests/run-get-aranges.sh
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 1999, 2000, 2002, 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile2
+
+testrun_compare ${abs_builddir}/get-aranges testfile testfile2 <<\EOF
+0x804842b: not in range
+CU name: "m.c"
+CU name: "m.c"
+CU name: "m.c"
+0x804845a: not in range
+0x804845b: not in range
+CU name: "b.c"
+CU name: "b.c"
+CU name: "b.c"
+0x8048466: not in range
+0x8048467: not in range
+CU name: "f.c"
+CU name: "f.c"
+CU name: "f.c"
+0x8048472: not in range
+ [ 0] start: 0x804842c, length: 46, cu: 11
+CU name: "m.c"
+ [ 1] start: 0x804845c, length: 10, cu: 202
+CU name: "b.c"
+ [ 2] start: 0x8048468, length: 10, cu: 5628
+CU name: "f.c"
+0x804842b: not in range
+0x804842c: not in range
+0x804843c: not in range
+0x8048459: not in range
+0x804845a: not in range
+0x804845b: not in range
+0x804845c: not in range
+0x8048460: not in range
+0x8048465: not in range
+0x8048466: not in range
+0x8048467: not in range
+0x8048468: not in range
+0x8048470: not in range
+0x8048471: not in range
+0x8048472: not in range
+ [ 0] start: 0x10000470, length: 32, cu: 11
+CU name: "b.c"
+ [ 1] start: 0x10000490, length: 32, cu: 2429
+CU name: "f.c"
+ [ 2] start: 0x100004b0, length: 100, cu: 2532
+CU name: "m.c"
+EOF
+
+exit 0
diff --git a/src/tests/run-get-files.sh b/src/tests/run-get-files.sh
new file mode 100755
index 00000000..a2f2373b
--- /dev/null
+++ b/src/tests/run-get-files.sh
@@ -0,0 +1,67 @@
+#! /bin/sh
+# Copyright (C) 1999, 2000, 2002, 2004, 2005, 2007 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile2
+
+testrun_compare ${abs_builddir}/get-files testfile testfile2 <<\EOF
+cuhl = 11, o = 0, asz = 4, osz = 4, ncu = 191
+ dirs[0] = "/home/drepper/gnu/new-bu/build/ttt"
+ file[0] = "???"
+ file[1] = "/home/drepper/gnu/new-bu/build/ttt/m.c"
+cuhl = 11, o = 114, asz = 4, osz = 4, ncu = 5617
+ dirs[0] = "/home/drepper/gnu/new-bu/build/ttt"
+ file[0] = "???"
+ file[1] = "/home/drepper/gnu/new-bu/build/ttt/b.c"
+ file[2] = "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stddef.h"
+ file[3] = "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h"
+ file[4] = "/usr/include/bits/types.h"
+ file[5] = "/usr/include/bits/sched.h"
+ file[6] = "/usr/include/bits/pthreadtypes.h"
+ file[7] = "/usr/include/stdio.h"
+ file[8] = "/usr/include/libio.h"
+ file[9] = "/usr/include/wchar.h"
+ file[10] = "/usr/include/_G_config.h"
+ file[11] = "/usr/include/gconv.h"
+cuhl = 11, o = 412, asz = 4, osz = 4, ncu = 5752
+ dirs[0] = "/home/drepper/gnu/new-bu/build/ttt"
+ file[0] = "???"
+ file[1] = "/home/drepper/gnu/new-bu/build/ttt/f.c"
+cuhl = 11, o = 0, asz = 4, osz = 4, ncu = 2418
+ dirs[0] = "/shoggoth/drepper"
+ file[0] = "???"
+ file[1] = "/shoggoth/drepper/b.c"
+ file[2] = "/home/geoffk/objs/laurel-000912-branch/lib/gcc-lib/powerpc-unknown-linux-gnu/2.96-laurel-000912/include/stddef.h"
+ file[3] = "/home/geoffk/objs/laurel-000912-branch/lib/gcc-lib/powerpc-unknown-linux-gnu/2.96-laurel-000912/include/stdarg.h"
+ file[4] = "/shoggoth/drepper/<built-in>"
+ file[5] = "/usr/include/bits/types.h"
+ file[6] = "/usr/include/stdio.h"
+ file[7] = "/usr/include/libio.h"
+ file[8] = "/usr/include/_G_config.h"
+cuhl = 11, o = 213, asz = 4, osz = 4, ncu = 2521
+ dirs[0] = "/shoggoth/drepper"
+ file[0] = "???"
+ file[1] = "/shoggoth/drepper/f.c"
+cuhl = 11, o = 267, asz = 4, osz = 4, ncu = 2680
+ dirs[0] = "/shoggoth/drepper"
+ file[0] = "???"
+ file[1] = "/shoggoth/drepper/m.c"
+EOF
+
+exit 0
diff --git a/src/tests/run-get-lines.sh b/src/tests/run-get-lines.sh
new file mode 100755
index 00000000..fb48c77d
--- /dev/null
+++ b/src/tests/run-get-lines.sh
@@ -0,0 +1,91 @@
+#! /bin/sh
+# Copyright (C) 1999, 2000, 2002, 2004, 2005, 2013 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile2 testfilenolines
+
+testrun_compare ${abs_builddir}/get-lines testfile testfile2 <<\EOF
+cuhl = 11, o = 0, asz = 4, osz = 4, ncu = 191
+ 5 lines
+804842c: /home/drepper/gnu/new-bu/build/ttt/m.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+8048432: /home/drepper/gnu/new-bu/build/ttt/m.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+804844d: /home/drepper/gnu/new-bu/build/ttt/m.c:7:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+8048458: /home/drepper/gnu/new-bu/build/ttt/m.c:8:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+804845a: /home/drepper/gnu/new-bu/build/ttt/m.c:8:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no
+cuhl = 11, o = 114, asz = 4, osz = 4, ncu = 5617
+ 4 lines
+804845c: /home/drepper/gnu/new-bu/build/ttt/b.c:4:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+804845f: /home/drepper/gnu/new-bu/build/ttt/b.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+8048464: /home/drepper/gnu/new-bu/build/ttt/b.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+8048466: /home/drepper/gnu/new-bu/build/ttt/b.c:6:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no
+cuhl = 11, o = 412, asz = 4, osz = 4, ncu = 5752
+ 4 lines
+8048468: /home/drepper/gnu/new-bu/build/ttt/f.c:3:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+804846b: /home/drepper/gnu/new-bu/build/ttt/f.c:4:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+8048470: /home/drepper/gnu/new-bu/build/ttt/f.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+8048472: /home/drepper/gnu/new-bu/build/ttt/f.c:5:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no
+cuhl = 11, o = 0, asz = 4, osz = 4, ncu = 2418
+ 4 lines
+10000470: /shoggoth/drepper/b.c:4:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+1000047c: /shoggoth/drepper/b.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+10000480: /shoggoth/drepper/b.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+10000490: /shoggoth/drepper/b.c:6:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no
+cuhl = 11, o = 213, asz = 4, osz = 4, ncu = 2521
+ 4 lines
+10000490: /shoggoth/drepper/f.c:3:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+1000049c: /shoggoth/drepper/f.c:4:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+100004a0: /shoggoth/drepper/f.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+100004b0: /shoggoth/drepper/f.c:5:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no
+cuhl = 11, o = 267, asz = 4, osz = 4, ncu = 2680
+ 5 lines
+100004b0: /shoggoth/drepper/m.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+100004cc: /shoggoth/drepper/m.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+100004e8: /shoggoth/drepper/m.c:7:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+100004f4: /shoggoth/drepper/m.c:8:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+10000514: /shoggoth/drepper/m.c:8:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no
+EOF
+
+# - lines.c
+# int ft;
+#
+# int
+# main (int argc, char **argv)
+# {
+# return ft - 42;
+# }
+#
+# - nolines.c
+# int ft = 42;
+#
+# gcc -g -c lines.c
+# gcc -g -c nolines.c
+# gcc -g -o testfilenolines lines.o nolines.o
+
+testrun_compare ${abs_builddir}/get-lines testfilenolines <<\EOF
+cuhl = 11, o = 0, asz = 8, osz = 4, ncu = 169
+ 4 lines
+400474: /home/mark/src/tests/lines.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+40047f: /home/mark/src/tests/lines.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+400488: /home/mark/src/tests/lines.c:7:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
+40048a: /home/mark/src/tests/lines.c:7:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no
+cuhl = 11, o = 125, asz = 8, osz = 4, ncu = 243
+ 0 lines
+EOF
+
+exit 0
diff --git a/src/tests/run-get-pubnames.sh b/src/tests/run-get-pubnames.sh
new file mode 100755
index 00000000..912793e4
--- /dev/null
+++ b/src/tests/run-get-pubnames.sh
@@ -0,0 +1,50 @@
+#! /bin/sh
+# Copyright (C) 1999, 2000, 2002, 2003, 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile2
+
+testrun_compare ${abs_builddir}/get-pubnames testfile testfile2 <<\EOF
+ [ 0] "main", die: 104, cu: 11
+CU name: "m.c"
+object name: "main"
+ [ 1] "a", die: 174, cu: 11
+CU name: "m.c"
+object name: "a"
+ [ 2] "bar", die: 295, cu: 202
+CU name: "b.c"
+object name: "bar"
+ [ 3] "foo", die: 5721, cu: 5628
+CU name: "f.c"
+object name: "foo"
+ [ 0] "bar", die: 72, cu: 11
+CU name: "b.c"
+object name: "bar"
+ [ 1] "foo", die: 2490, cu: 2429
+CU name: "f.c"
+object name: "foo"
+ [ 2] "main", die: 2593, cu: 2532
+CU name: "m.c"
+object name: "main"
+ [ 3] "a", die: 2663, cu: 2532
+CU name: "m.c"
+object name: "a"
+EOF
+
+exit 0
diff --git a/src/tests/run-line2addr.sh b/src/tests/run-line2addr.sh
new file mode 100755
index 00000000..3b6c4457
--- /dev/null
+++ b/src/tests/run-line2addr.sh
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile2 testfile8 testfile14 testfile23
+
+testrun_compare ${abs_builddir}/line2addr -e testfile f.c:4 testfile f.c:8 <<\EOF
+f.c:4 -> 0x804846b (/home/drepper/gnu/new-bu/build/ttt/f.c:4)
+EOF
+
+testrun_compare ${abs_builddir}/line2addr -e testfile2 m.c:6 b.c:1 <<\EOF
+m.c:6 -> 0x100004cc (/shoggoth/drepper/m.c:6)
+b.c:1 -> 0x10000470 (/shoggoth/drepper/b.c:4)
+EOF
+
+testrun_compare ${abs_builddir}/line2addr -e testfile8 strip.c:953 strip.c:365 <<\EOF
+strip.c:953 -> (.text)+0x169f (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:953)
+strip.c:953 -> (.text)+0x16aa (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:953)
+strip.c:365 -> (.text)+0x278b (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:365)
+strip.c:365 -> (.text)+0x2797 (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:365)
+EOF
+
+testrun_compare ${abs_builddir}/line2addr -e testfile14 v.c:6 <<\EOF
+v.c:6 -> 0x400468 (/home/drepper/local/elfutils-build/20050425/v.c:6)
+v.c:6 -> 0x400487 (/home/drepper/local/elfutils-build/20050425/v.c:6)
+EOF
+
+testrun_compare ${abs_builddir}/line2addr -e testfile23 foo.c:2 foo.c:6 <<\EOF
+foo.c:2 -> (.init.text)+0xc (/home/roland/stock-elfutils-build/foo.c:2)
+foo.c:6 -> (.text)+0xc (/home/roland/stock-elfutils-build/foo.c:6)
+EOF
+
+exit 0
diff --git a/src/tests/run-linkmap-cut.sh b/src/tests/run-linkmap-cut.sh
new file mode 100755
index 00000000..de2bc7cc
--- /dev/null
+++ b/src/tests/run-linkmap-cut.sh
@@ -0,0 +1,32 @@
+#! /bin/bash
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# The core file has patched:
+# * _r_debug.r_map.l_next.l_next (vma 0x3fdf621718, offset 0x7718) = NULL,
+# therefore all libraries after the main executable and vDSO are removed.
+# * NT_FILE absolute filenames are relativized to: ./////basename
+
+testfiles linkmap-cut-lib.so linkmap-cut linkmap-cut.core
+tempfiles bt
+# It may have non-zero exit code with:
+# .../elfutils/src/stack: dwfl_thread_getframes tid 3130 at 0x3fdf821d64 in /usr/lib64/libc-2.18.so: no matching address range
+testrun ${abs_top_builddir}/src/stack --core=linkmap-cut.core -e linkmap-cut -m >bt || true
+cat bt
+grep -q '^#0 0x00007f08bc24d681 libfunc - .////////////////////////////////////linkmap-cut-lib\.so$' bt
+grep -q '^#1 0x00000000004006b4 main - linkmap-cut$' bt
diff --git a/src/tests/run-low_high_pc.sh b/src/tests/run-low_high_pc.sh
new file mode 100755
index 00000000..ab5f2c37
--- /dev/null
+++ b/src/tests/run-low_high_pc.sh
@@ -0,0 +1,34 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# int
+# main (int argc, char **argv)
+# {
+# return 0;
+# }
+# gcc -g -o main main.c
+testfiles testfile_low_high_pc
+
+testrun ${abs_builddir}/low_high_pc -e ./testfile_low_high_pc
+testrun ${abs_builddir}/low_high_pc -e ${abs_builddir}/low_high_pc
+testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/src/strip
+testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/src/strip.o
+testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/libelf/libelf.so
+
+exit 0
diff --git a/src/tests/run-macro-test.sh b/src/tests/run-macro-test.sh
new file mode 100755
index 00000000..79b0d881
--- /dev/null
+++ b/src/tests/run-macro-test.sh
@@ -0,0 +1,52 @@
+#! /bin/sh
+# Copyright (C) 2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# #include <string.h>
+#
+# #define HELLO "world"
+#
+# int
+# main(int argc, char ** argv)
+# {
+# return strlen (HELLO);
+# }
+#
+# gcc -gdwarf-4 -g3 -o testfile-macros macro.c
+# gcc -gstrict-dwarf -gdwarf-4 -g3 -o testfile-macinfo macro.c
+
+testfiles testfile-macinfo testfile-macros
+tempfiles readelf.macros.out
+
+status=0
+
+testrun ${abs_top_builddir}/src/readelf --debug-dump=info testfile-macinfo \
+ | grep macro_info > readelf.macros.out ||
+ { echo "*** failure readelf --debug-dump=info testfile-macinfo"; status=1; }
+testrun_compare cat readelf.macros.out <<\EOF
+ macro_info (sec_offset) 0
+EOF
+
+testrun ${abs_top_builddir}/src/readelf --debug-dump=info testfile-macros \
+ | grep GNU_macros > readelf.macros.out ||
+ { echo "*** failure readelf --debug-dump=info testfile-macros"; status=1; }
+testrun_compare cat readelf.macros.out <<\EOF
+ GNU_macros (sec_offset) 0
+EOF
+
+exit $status
diff --git a/src/tests/run-native-test.sh b/src/tests/run-native-test.sh
new file mode 100755
index 00000000..d19007f2
--- /dev/null
+++ b/src/tests/run-native-test.sh
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2005, 2006, 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+. $srcdir/test-subr.sh
+
+# This tests all the miscellaneous components of backend support
+# against whatever this build is running on. A platform will fail
+# this test if it is missing parts of the backend implementation.
+#
+# As new backend code is added to satisfy the test, be sure to update
+# the fixed test cases (run-allregs.sh et al) to test that backend
+# in all builds.
+
+tempfiles native.c native
+echo 'main () { while (1) pause (); }' > native.c
+
+native=0
+kill_native()
+{
+ test $native -eq 0 || {
+ kill -9 $native 2> /dev/null || :
+ wait $native 2> /dev/null || :
+ }
+ native=0
+}
+
+native_cleanup()
+{
+ kill_native
+ test_cleanup
+}
+
+native_exit()
+{
+ native_cleanup
+ exit_cleanup
+}
+
+trap native_cleanup 1 2 15
+trap native_exit 0
+
+for cc in "$HOSTCC" "$HOST_CC" cc gcc "$CC"; do
+ test "x$cc" != x || continue
+ $cc -o native -g native.c > /dev/null 2>&1 &&
+ # Some shell versions don't do this right without the braces.
+ { ./native > /dev/null 2>&1 & native=$! ; } &&
+ sleep 1 && kill -0 $native 2> /dev/null &&
+ break ||
+ native=0
+done
+
+native_test()
+{
+ # Try the build against itself, i.e. $config_host.
+ testrun "$@" -e $1 > /dev/null
+
+ # Try the build against a presumed native process, running this sh.
+ # For tests requiring debug information, this may not test anything.
+ testrun "$@" -p $$ > /dev/null
+
+ # Try the build against the trivial native program we just built with -g.
+ test $native -eq 0 || testrun "$@" -p $native > /dev/null
+}
+
+native_test ${abs_builddir}/allregs
+native_test ${abs_builddir}/funcretval
+
+# We do this explicitly rather than letting the trap 0 cover it,
+# because as of version 3.1 bash prints the "Killed" report for
+# $native when we do the kill inside the exit handler.
+native_cleanup
+
+exit 0
diff --git a/src/tests/run-nm-self.sh b/src/tests/run-nm-self.sh
new file mode 100755
index 00000000..6a31afcf
--- /dev/null
+++ b/src/tests/run-nm-self.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Copyright (C) 2012, 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Test different command line combinations on the nm binary itself.
+# Test on nm ET_REL, ET_EXEC and ET_DYN files.
+ET_REL=${abs_top_builddir}/src/nm.o
+ET_EXEC=${abs_top_builddir}/src/nm
+ET_DYN=${abs_top_builddir}/libelf/libelf.so
+for what_arg in --debug-syms --defined-only --dynamic --extern-only; do
+ for format_arg in --format=bsd --format=sysv --format=posix; do
+ for out_arg in --numeric-sort --no-sort --reverse-sort; do
+ for self_file in $ET_REL $ET_EXEC $ET_DYN; do
+ # --dynamic doesn't make sense for ET_REL.
+ if ! test "$what_arg" = "--dynamic" -a "$self_file" = "$ET_REL"; then
+ testrun ${abs_top_builddir}/src/nm $what_arg $format_arg $out_arg $self_file > /dev/null
+ fi
+ done
+ done
+ done
+done
diff --git a/src/tests/run-prelink-addr-test.sh b/src/tests/run-prelink-addr-test.sh
new file mode 100755
index 00000000..3398c0d1
--- /dev/null
+++ b/src/tests/run-prelink-addr-test.sh
@@ -0,0 +1,252 @@
+#! /bin/sh
+# Copyright (C) 2011-2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+
+# testfile52.c:
+# #include <stdlib.h>
+# int foo() { exit(0); }
+#
+# gcc -m32 -g -shared testfile52-32.c -o testfile52-32.so
+# eu-strip -f testfile52-32.so.debug testfile52-32.so
+# cp testfile52-32.so testfile52-32.prelink.so
+# prelink -N testfile52-32.prelink.so
+# cp testfile52-32.so testfile52-32.noshdrs.so
+# prelink -r 0x42000000 testfile52-32.noshdrs.so
+# eu-strip --remove-comment --strip-sections testfile52-32.noshdrs.so
+
+testfiles testfile52-32.so testfile52-32.so.debug
+testfiles testfile52-32.prelink.so testfile52-32.noshdrs.so
+tempfiles testmaps52-32 testfile52-32.noshdrs.so.debug
+ln -snf testfile52-32.so.debug testfile52-32.noshdrs.so.debug
+
+cat > testmaps52-32 <<EOF
+00111000-00112000 r-xp 00000000 fd:01 1 `pwd`/testfile52-32.so
+00112000-00113000 rw-p 00000000 fd:01 1 `pwd`/testfile52-32.so
+41000000-41001000 r-xp 00000000 fd:01 2 `pwd`/testfile52-32.prelink.so
+41001000-41002000 rw-p 00000000 fd:01 2 `pwd`/testfile52-32.prelink.so
+42000000-42001000 r-xp 00000000 fd:01 3 `pwd`/testfile52-32.noshdrs.so
+42001000-42002000 rw-p 00000000 fd:01 3 `pwd`/testfile52-32.noshdrs.so
+EOF
+
+# Prior to commit 1743d7f, libdwfl would fail on the second address,
+# because it didn't notice that prelink added a 0x20-byte offset from
+# what the .debug file reports.
+testrun_compare ${abs_top_builddir}/src/addr2line -S -M testmaps52-32 \
+ 0x11140c 0x4100042d 0x4200040e <<\EOF
+foo
+/home/jistone/src/elfutils/tests/testfile52-32.c:2
+foo+0x1
+/home/jistone/src/elfutils/tests/testfile52-32.c:2
+foo+0x2
+/home/jistone/src/elfutils/tests/testfile52-32.c:2
+EOF
+
+# Repeat testfile52 for -m64. The particular REL>RELA issue doesn't exist, but
+# we'll make sure the rest works anyway.
+testfiles testfile52-64.so testfile52-64.so.debug
+testfiles testfile52-64.prelink.so testfile52-64.noshdrs.so
+tempfiles testmaps52-64 testfile52-64.noshdrs.so.debug
+ln -snf testfile52-64.so.debug testfile52-64.noshdrs.so.debug
+
+cat > testmaps52-64 <<EOF
+1000000000-1000001000 r-xp 00000000 fd:11 1 `pwd`/testfile52-64.so
+1000001000-1000200000 ---p 00001000 fd:11 1 `pwd`/testfile52-64.so
+1000200000-1000201000 rw-p 00000000 fd:11 1 `pwd`/testfile52-64.so
+3000000000-3000001000 r-xp 00000000 fd:11 2 `pwd`/testfile52-64.prelink.so
+3000001000-3000200000 ---p 00001000 fd:11 2 `pwd`/testfile52-64.prelink.so
+3000200000-3000201000 rw-p 00000000 fd:11 2 `pwd`/testfile52-64.prelink.so
+3800000000-3800001000 r-xp 00000000 fd:11 3 `pwd`/testfile52-64.noshdrs.so
+3800001000-3800200000 ---p 00001000 fd:11 3 `pwd`/testfile52-64.noshdrs.so
+3800200000-3800201000 rw-p 00000000 fd:11 3 `pwd`/testfile52-64.noshdrs.so
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -M testmaps52-64 \
+ 0x100000056c 0x300000056d 0x380000056e <<\EOF
+foo
+/home/jistone/src/elfutils/tests/testfile52-64.c:2
+foo+0x1
+/home/jistone/src/elfutils/tests/testfile52-64.c:2
+foo+0x2
+/home/jistone/src/elfutils/tests/testfile52-64.c:2
+EOF
+
+
+# testfile53.c:
+# char foo[0x1000];
+# int main() { return 0; }
+#
+# gcc -m32 -g testfile53-32.c -o testfile53-32
+# eu-strip -f testfile53-32.debug testfile53-32
+# cp testfile53-32 testfile53-32.prelink
+# prelink -N testfile53-32.prelink
+testfiles testfile53-32 testfile53-32.debug testfile53-32.prelink
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile53-32 0x8048394 0x8048395 <<\EOF
+main
+/home/jistone/src/elfutils/tests/testfile53-32.c:2
+main+0x1
+/home/jistone/src/elfutils/tests/testfile53-32.c:2
+EOF
+
+# prelink shuffled some of the sections, but .text is in the same place.
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile53-32.prelink 0x8048396 0x8048397 <<\EOF
+main+0x2
+/home/jistone/src/elfutils/tests/testfile53-32.c:2
+main+0x3
+/home/jistone/src/elfutils/tests/testfile53-32.c:2
+EOF
+
+# Repeat testfile53 in 64-bit, except use foo[0x800] to achieve the same
+# prelink section shuffling.
+testfiles testfile53-64 testfile53-64.debug testfile53-64.prelink
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile53-64 0x400474 0x400475 <<\EOF
+main
+/home/jistone/src/elfutils/tests/testfile53-64.c:2
+main+0x1
+/home/jistone/src/elfutils/tests/testfile53-64.c:2
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile53-64.prelink 0x400476 0x400477 <<\EOF
+main+0x2
+/home/jistone/src/elfutils/tests/testfile53-64.c:2
+main+0x3
+/home/jistone/src/elfutils/tests/testfile53-64.c:2
+EOF
+
+
+# testfile54.c:
+# extern void * stdin;
+# static void * pstdin = &stdin;
+# void * const foo = &pstdin;
+#
+# gcc -m32 -g -shared -nostartfiles testfile54-32.c -o testfile54-32.so
+# eu-strip -f testfile54-32.so.debug testfile54-32.so
+# cp testfile54-32.so testfile54-32.prelink.so
+# prelink -N testfile54-32.prelink.so
+# cp testfile54-32.so testfile54-32.noshdrs.so
+# prelink -r 0x42000000 testfile54-32.noshdrs.so
+# eu-strip --remove-comment --strip-sections testfile54-32.noshdrs.so
+testfiles testfile54-32.so testfile54-32.so.debug
+testfiles testfile54-32.prelink.so testfile54-32.noshdrs.so
+tempfiles testmaps54-32
+
+# Note we have no testfile54-32.noshdrs.so.debug link here, so
+# this is testing finding the symbols in .dynsym via PT_DYNAMIC.
+
+cat > testmaps54-32 <<EOF
+00111000-00112000 r--p 00000000 fd:01 1 `pwd`/testfile54-32.so
+00112000-00113000 rw-p 00000000 fd:01 1 `pwd`/testfile54-32.so
+41000000-41001000 r--p 00000000 fd:01 2 `pwd`/testfile54-32.prelink.so
+41001000-41002000 rw-p 00000000 fd:01 2 `pwd`/testfile54-32.prelink.so
+42000000-42001000 r--p 00000000 fd:01 3 `pwd`/testfile54-32.noshdrs.so
+42001000-42002000 rw-p 00000000 fd:01 3 `pwd`/testfile54-32.noshdrs.so
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -M testmaps54-32 \
+ 0x1111fc 0x1122a4 0x410001fd 0x410012a5 0x420001fe <<\EOF
+foo
+??:0
+pstdin
+??:0
+foo+0x1
+??:0
+pstdin+0x1
+??:0
+foo+0x2
+??:0
+EOF
+
+# Repeat testfile64 in 64-bit
+testfiles testfile54-64.so testfile54-64.so.debug
+testfiles testfile54-64.prelink.so testfile54-64.noshdrs.so
+tempfiles testmaps54-64
+
+# Note we have no testfile54-64.noshdrs.so.debug link here, so
+# this is testing finding the symbols in .dynsym via PT_DYNAMIC.
+
+cat > testmaps54-64 <<EOF
+1000000000-1000001000 r--p 00000000 fd:11 1 `pwd`/testfile54-64.so
+1000001000-1000200000 ---p 00001000 fd:11 1 `pwd`/testfile54-64.so
+1000200000-1000201000 rw-p 00000000 fd:11 1 `pwd`/testfile54-64.so
+3000000000-3000001000 r--p 00000000 fd:11 2 `pwd`/testfile54-64.prelink.so
+3000001000-3000200000 ---p 00001000 fd:11 2 `pwd`/testfile54-64.prelink.so
+3000200000-3000201000 rw-p 00000000 fd:11 2 `pwd`/testfile54-64.prelink.so
+3800000000-3800001000 r--p 00000000 fd:11 3 `pwd`/testfile54-64.noshdrs.so
+3800001000-3800200000 ---p 00001000 fd:11 3 `pwd`/testfile54-64.noshdrs.so
+3800200000-3800201000 rw-p 00000000 fd:11 3 `pwd`/testfile54-64.noshdrs.so
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -M testmaps54-64 \
+ 0x10000002f8 0x1000200448 0x30000002f9 0x3000200449 0x38000002fa <<\EOF
+foo
+??:0
+pstdin
+??:0
+foo+0x1
+??:0
+pstdin+0x1
+??:0
+foo+0x2
+??:0
+EOF
+
+
+# testfile55.c:
+# extern void *stdin;
+# int main() { return !stdin; }
+#
+# gcc -m32 -g testfile55-32.c -o testfile55-32
+# eu-strip -f testfile55-32.debug testfile55-32
+# cp testfile55-32 testfile55-32.prelink
+# prelink -N testfile55-32.prelink
+testfiles testfile55-32 testfile55-32.debug testfile55-32.prelink
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile55-32 0x80483b4 0x80483b5 <<\EOF
+main
+/home/jistone/src/elfutils/tests/testfile55-32.c:2
+main+0x1
+/home/jistone/src/elfutils/tests/testfile55-32.c:2
+EOF
+
+# prelink splits .bss into .dynbss+.bss, so the start of .bss changes, but the
+# total size remains the same, and .text doesn't move at all.
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile55-32.prelink 0x80483b6 0x80483b7 <<\EOF
+main+0x2
+/home/jistone/src/elfutils/tests/testfile55-32.c:2
+main+0x3
+/home/jistone/src/elfutils/tests/testfile55-32.c:2
+EOF
+
+# Repeat testfile55 in 64-bit
+testfiles testfile55-64 testfile55-64.debug testfile55-64.prelink
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile55-64 0x4004b4 0x4004b5 <<\EOF
+main
+/home/jistone/src/elfutils/tests/testfile55-64.c:2
+main+0x1
+/home/jistone/src/elfutils/tests/testfile55-64.c:2
+EOF
+
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile55-64.prelink 0x4004b6 0x4004b7 <<\EOF
+main+0x2
+/home/jistone/src/elfutils/tests/testfile55-64.c:2
+main+0x3
+/home/jistone/src/elfutils/tests/testfile55-64.c:2
+EOF
diff --git a/src/tests/run-ranlib-test.sh b/src/tests/run-ranlib-test.sh
new file mode 100755
index 00000000..0b34cbbb
--- /dev/null
+++ b/src/tests/run-ranlib-test.sh
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+tempfiles ranlib-test.a ranlib-test.a-copy
+
+cat > ranlib-test.a <<"EOF"
+!<arch>
+foo/ 1124128960 500 500 100664 4 `
+foo
+bar/ 1124128965 500 500 100664 4 `
+bar
+EOF
+
+cp ranlib-test.a ranlib-test.a-copy
+
+testrun ${abs_top_builddir}/src/ranlib ranlib-test.a
+
+# The ranlib call should not have changed anything.
+cmp ranlib-test.a ranlib-test.a-copy
+
+exit 0
diff --git a/src/tests/run-ranlib-test2.sh b/src/tests/run-ranlib-test2.sh
new file mode 100755
index 00000000..dbc57ecb
--- /dev/null
+++ b/src/tests/run-ranlib-test2.sh
@@ -0,0 +1,37 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+original=${original:-testfile19}
+indexed=${indexed:-testfile19.index}
+
+testfiles $original $indexed
+
+testrun ${abs_top_builddir}/src/ranlib $original
+
+if test -z "$noindex"; then
+ # The date in the index is different. The reference file has it blanked
+ # out, we do the same here.
+ echo " " |
+ dd of=$original seek=24 bs=1 count=12 conv=notrunc 2>/dev/null
+fi
+
+cmp $original $indexed
+
+exit 0
diff --git a/src/tests/run-ranlib-test3.sh b/src/tests/run-ranlib-test3.sh
new file mode 100755
index 00000000..1fc21cdd
--- /dev/null
+++ b/src/tests/run-ranlib-test3.sh
@@ -0,0 +1,22 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+original=testfile20
+indexed=testfile20.index
+. $srcdir/run-ranlib-test2.sh
diff --git a/src/tests/run-ranlib-test4.sh b/src/tests/run-ranlib-test4.sh
new file mode 100755
index 00000000..8070415b
--- /dev/null
+++ b/src/tests/run-ranlib-test4.sh
@@ -0,0 +1,23 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+original=testfile21
+indexed=testfile21.index
+noindex=1
+. $srcdir/run-ranlib-test2.sh
diff --git a/src/tests/run-readelf-A.sh b/src/tests/run-readelf-A.sh
new file mode 100755
index 00000000..6ca9be89
--- /dev/null
+++ b/src/tests/run-readelf-A.sh
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# See run-addrcfi.sh for testfilearm.
+
+# = testfileppc32attrs.s =
+# .gnu_attribute 8,1
+# .gnu_attribute 12,1
+#
+# gcc -m32 -c testfileppc32attrs.s
+
+testfiles testfilearm testfileppc32attrs.o
+
+testrun_compare ${abs_top_builddir}/src/readelf -A testfilearm <<\EOF
+
+Object attributes section [27] '.ARM.attributes' of 53 bytes at offset 0x718:
+ Owner Size
+ aeabi 52
+ File: 42
+ CPU_name: 7-A
+ CPU_arch: v7
+ CPU_arch_profile: Application
+ ARM_ISA_use: Yes
+ THUMB_ISA_use: Thumb-2
+ VFP_arch: VFPv3-D16
+ ABI_PCS_wchar_t: 4
+ ABI_FP_rounding: Needed
+ ABI_FP_denormal: Needed
+ ABI_FP_exceptions: Needed
+ ABI_FP_number_model: IEEE 754
+ ABI_align8_needed: Yes
+ ABI_align8_preserved: Yes, except leaf SP
+ ABI_enum_size: int
+ ABI_HardFP_use: SP and DP
+ ABI_VFP_args: VFP registers
+ CPU_unaligned_access: v6
+EOF
+
+testrun_compare ${abs_top_builddir}/src/readelf -A testfileppc32attrs.o <<\EOF
+
+Object attributes section [ 4] '.gnu.attributes' of 18 bytes at offset 0x34:
+ Owner Size
+ gnu 17
+ File: 9
+ GNU_Power_ABI_Vector: Generic
+ GNU_Power_ABI_Struct_Return: r3/r4
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-aranges.sh b/src/tests/run-readelf-aranges.sh
new file mode 100755
index 00000000..3fc3c546
--- /dev/null
+++ b/src/tests/run-readelf-aranges.sh
@@ -0,0 +1,161 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Tests readelf --debug-dump=aranges and --debug-dump=decodedaranges
+#
+# - foobarbaz.h
+#
+# int bar ();
+# int baz (int i);
+#
+# - bar.c
+#
+# #include "foobarbaz.h"
+#
+# static int bi;
+#
+# static int
+# barbaz (int i)
+# {
+# return i * 2 - 1;
+# }
+#
+# __attribute__ ((constructor)) void
+# nobar ()
+# {
+# bi = 1;
+# }
+#
+# int
+# bar ()
+# {
+# bi++;
+# return barbaz (bi);
+# }
+#
+# - foo.c
+#
+# include "foobarbaz.h"
+#
+# static int fi = 0;
+#
+# static int
+# foo (int i, int j)
+# {
+# if (i > j)
+# return i - j + fi;
+# else
+# return (2 * j) - i + fi;
+# }
+#
+# int
+# main (int argc, char **argv)
+# {
+# int a = bar ();
+# int b = baz (a + argc);
+# int r = foo (a, b) - 1;
+#
+# return r - 48;
+# }
+#
+# - baz.c
+# include "foobarbaz.h"
+#
+# static int bj;
+#
+# static int
+# bazbaz (int j)
+# {
+# return bj * j - bar ();
+# }
+#
+# __attribute__ ((constructor)) void
+# nobaz ()
+# {
+# bj = 1;
+# }
+#
+# int
+# baz (int i)
+# {
+# if (i < 0)
+# return bazbaz (i);
+# else
+# {
+# while (i-- > 0)
+# bj += bar ();
+# }
+# return bazbaz (i);
+# }
+#
+# gcc -g -O2 -m32 -c baz.c
+# gcc -g -O2 -m32 -c bar.c
+# gcc -g -O2 -m32 -c foo.c
+# gcc -g -O2 -m32 -o testfilefoobarbaz foo.o bar.o baz.o
+
+testfiles testfilefoobarbaz
+
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=aranges testfilefoobarbaz <<EOF
+
+DWARF section [27] '.debug_aranges' at offset 0x1044:
+
+Table at offset 0:
+
+ Length: 28
+ DWARF version: 2
+ CU offset: 0
+ Address size: 4
+ Segment size: 0
+
+ 0x080482f0 <main>..0x08048323 <main+0x33>
+
+Table at offset 32:
+
+ Length: 36
+ DWARF version: 2
+ CU offset: 136
+ Address size: 4
+ Segment size: 0
+
+ 0x08048440 <bar>..0x08048451 <bar+0x11>
+ 0x08048330 <nobar>..0x0804833a <nobar+0xa>
+
+Table at offset 72:
+
+ Length: 36
+ DWARF version: 2
+ CU offset: 1d1
+ Address size: 4
+ Segment size: 0
+
+ 0x08048460 <baz>..0x080484bb <baz+0x5b>
+ 0x08048340 <nobaz>..0x0804834a <nobaz+0xa>
+EOF
+
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=decodedaranges testfilefoobarbaz <<\EOF
+
+DWARF section [27] '.debug_aranges' at offset 0x1044 contains 5 entries:
+ [0] start: 0x080482f0, length: 52, CU DIE offset: 11
+ [1] start: 0x08048330, length: 11, CU DIE offset: 321
+ [2] start: 0x08048340, length: 11, CU DIE offset: 476
+ [3] start: 0x08048440, length: 18, CU DIE offset: 321
+ [4] start: 0x08048460, length: 92, CU DIE offset: 476
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-d.sh b/src/tests/run-readelf-d.sh
new file mode 100755
index 00000000..d0b6ed24
--- /dev/null
+++ b/src/tests/run-readelf-d.sh
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# #include <stdio.h>
+#
+# __thread int i;
+#
+# void print_i ()
+# {
+# printf("%d\n", i);
+# }
+#
+# gcc -fPIC -shared -o testlib_dynseg.so testlib_dynseg.c
+# With ld --version
+# GNU gold (GNU Binutils 2.22.52.20120402) 1.11
+
+testfiles testlib_dynseg.so
+
+testrun_compare ${abs_top_builddir}/src/readelf -d testlib_dynseg.so <<\EOF
+
+Dynamic segment contains 28 entries:
+ Addr: 0x00000000000017e0 Offset: 0x0007e0 Link to section: [ 3] '.dynstr'
+ Type Value
+ PLTGOT 0x00000000000019c8
+ PLTRELSZ 72 (bytes)
+ JMPREL 0x0000000000000568
+ PLTREL RELA
+ RELA 0x00000000000004d8
+ RELASZ 144 (bytes)
+ RELAENT 24 (bytes)
+ RELACOUNT 1
+ SYMTAB 0x0000000000000228
+ SYMENT 24 (bytes)
+ STRTAB 0x0000000000000360
+ STRSZ 190 (bytes)
+ GNU_HASH 0x0000000000000420
+ NEEDED Shared library: [libc.so.6]
+ NEEDED Shared library: [ld-linux-x86-64.so.2]
+ INIT 0x00000000000005b0
+ FINI 0x0000000000000748
+ VERSYM 0x0000000000000460
+ VERDEF 0x000000000000047c
+ VERDEFNUM 1
+ VERNEED 0x0000000000000498
+ VERNEEDNUM 2
+ NULL
+ NULL
+ NULL
+ NULL
+ NULL
+ NULL
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-dwz-multi.sh b/src/tests/run-readelf-dwz-multi.sh
new file mode 100755
index 00000000..27e0f38c
--- /dev/null
+++ b/src/tests/run-readelf-dwz-multi.sh
@@ -0,0 +1,332 @@
+#! /bin/sh
+# Copyright (C) 2012, 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# common.h
+#
+# #include <stdio.h>
+#
+# struct foobar
+# {
+# int foo;
+# struct foobar *bar;
+# };
+#
+# extern int call_foo(struct foobar *foobar_struct_ptr);
+
+# main.c
+#
+# #include "common.h"
+#
+# int main(int argc, char ** argv)
+# {
+# struct foobar b;
+# b.foo = 42;
+# b.bar = &b;
+#
+# return call_foo(b.bar);
+# }
+
+# shared.c
+#
+# #include "common.h"
+#
+# int call_foo(struct foobar *fb)
+# {
+# return fb->bar->foo - 42;
+# }
+
+# gcc -fPIC -g -c -Wall shared.c
+# gcc -shared -o libtestfile_multi_shared.so shared.o
+# gcc -g -o testfile_multi_main -L. -ltestfile_multi_shared main.c -Wl,-rpath,.
+# dwz -m testfile_multi.dwz testfile_multi_main libtestfile_multi_shared.so
+
+# main.c
+#
+# struct foobarbaz
+# {
+# int counter;
+# char *bookstore;
+# };
+#
+# int
+# main (int argc, char **argv)
+# {
+# struct foobarbaz fbb;
+# return 0;
+# }
+
+# gcc -g -o testfile-dwzstr main.c
+# cp testfile-dwzstr testfile-dwzstr.alt
+# dwz -m testfile-dwzstr.multi testfile-dwzstr testfile-dwzstr.alt
+
+testfiles libtestfile_multi_shared.so testfile_multi_main testfile_multi.dwz
+testfiles testfile-dwzstr testfile-dwzstr.multi
+
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info testfile_multi_main <<\EOF
+
+DWARF section [28] '.debug_info' at offset 0x1078:
+ [Offset]
+ Compilation unit at offset 0:
+ Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
+ [ b] compile_unit
+ producer (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -mtune=generic -march=x86-64 -g"
+ language (data1) C89 (1)
+ name (strp) "main.c"
+ comp_dir (GNU_strp_alt) "/home/mark/src/tests/dwz"
+ low_pc (addr) 0x00000000004006ac <main>
+ high_pc (udata) 44 (0x00000000004006d8)
+ stmt_list (sec_offset) 0
+ [ 26] imported_unit
+ import (GNU_ref_alt) [ b]
+ [ 2b] pointer_type
+ byte_size (data1) 8
+ type (GNU_ref_alt) [ 53]
+ [ 31] subprogram
+ external (flag_present)
+ name (strp) "main"
+ decl_file (data1) 1
+ decl_line (data1) 3
+ prototyped (flag_present)
+ type (GNU_ref_alt) [ 3e]
+ low_pc (addr) 0x00000000004006ac <main>
+ high_pc (udata) 44 (0x00000000004006d8)
+ frame_base (exprloc)
+ [ 0] call_frame_cfa
+ GNU_all_tail_call_sites (flag_present)
+ sibling (ref_udata) [ 6e]
+ [ 48] formal_parameter
+ name (strp) "argc"
+ decl_file (data1) 1
+ decl_line (data1) 3
+ type (GNU_ref_alt) [ 3e]
+ location (exprloc)
+ [ 0] fbreg -36
+ [ 56] formal_parameter
+ name (strp) "argv"
+ decl_file (data1) 1
+ decl_line (data1) 3
+ type (ref_udata) [ 6e]
+ location (exprloc)
+ [ 0] fbreg -48
+ [ 61] variable
+ name (string) "b"
+ decl_file (data1) 1
+ decl_line (data1) 5
+ type (GNU_ref_alt) [ 5a]
+ location (exprloc)
+ [ 0] fbreg -32
+ [ 6e] pointer_type
+ byte_size (data1) 8
+ type (ref_udata) [ 2b]
+EOF
+
+# Same as above, but find alt debug file in a .dwz subdir.
+mkdir .dwz
+mv testfile_multi.dwz .dwz
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info testfile_multi_main <<\EOF
+
+DWARF section [28] '.debug_info' at offset 0x1078:
+ [Offset]
+ Compilation unit at offset 0:
+ Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
+ [ b] compile_unit
+ producer (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -mtune=generic -march=x86-64 -g"
+ language (data1) C89 (1)
+ name (strp) "main.c"
+ comp_dir (GNU_strp_alt) "/home/mark/src/tests/dwz"
+ low_pc (addr) 0x00000000004006ac <main>
+ high_pc (udata) 44 (0x00000000004006d8)
+ stmt_list (sec_offset) 0
+ [ 26] imported_unit
+ import (GNU_ref_alt) [ b]
+ [ 2b] pointer_type
+ byte_size (data1) 8
+ type (GNU_ref_alt) [ 53]
+ [ 31] subprogram
+ external (flag_present)
+ name (strp) "main"
+ decl_file (data1) 1
+ decl_line (data1) 3
+ prototyped (flag_present)
+ type (GNU_ref_alt) [ 3e]
+ low_pc (addr) 0x00000000004006ac <main>
+ high_pc (udata) 44 (0x00000000004006d8)
+ frame_base (exprloc)
+ [ 0] call_frame_cfa
+ GNU_all_tail_call_sites (flag_present)
+ sibling (ref_udata) [ 6e]
+ [ 48] formal_parameter
+ name (strp) "argc"
+ decl_file (data1) 1
+ decl_line (data1) 3
+ type (GNU_ref_alt) [ 3e]
+ location (exprloc)
+ [ 0] fbreg -36
+ [ 56] formal_parameter
+ name (strp) "argv"
+ decl_file (data1) 1
+ decl_line (data1) 3
+ type (ref_udata) [ 6e]
+ location (exprloc)
+ [ 0] fbreg -48
+ [ 61] variable
+ name (string) "b"
+ decl_file (data1) 1
+ decl_line (data1) 5
+ type (GNU_ref_alt) [ 5a]
+ location (exprloc)
+ [ 0] fbreg -32
+ [ 6e] pointer_type
+ byte_size (data1) 8
+ type (ref_udata) [ 2b]
+EOF
+mv .dwz/testfile_multi.dwz .
+rmdir .dwz
+
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info libtestfile_multi_shared.so <<\EOF
+
+DWARF section [25] '.debug_info' at offset 0x106c:
+ [Offset]
+ Compilation unit at offset 0:
+ Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
+ [ b] compile_unit
+ producer (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -fpreprocessed -mtune=generic -march=x86-64 -g -fPIC"
+ language (data1) C89 (1)
+ name (strp) "shared.c"
+ comp_dir (GNU_strp_alt) "/home/mark/src/tests/dwz"
+ low_pc (addr) +0x0000000000000670 <call_foo>
+ high_pc (udata) 23 (+0x0000000000000687)
+ stmt_list (sec_offset) 0
+ [ 26] imported_unit
+ import (GNU_ref_alt) [ b]
+ [ 2b] subprogram
+ external (flag_present)
+ name (strp) "call_foo"
+ decl_file (data1) 1
+ decl_line (data1) 3
+ prototyped (flag_present)
+ type (GNU_ref_alt) [ 3e]
+ low_pc (addr) +0x0000000000000670 <call_foo>
+ high_pc (udata) 23 (+0x0000000000000687)
+ frame_base (exprloc)
+ [ 0] call_frame_cfa
+ GNU_all_call_sites (flag_present)
+ [ 41] formal_parameter
+ name (string) "fb"
+ decl_file (data1) 1
+ decl_line (data1) 3
+ type (GNU_ref_alt) [ 76]
+ location (exprloc)
+ [ 0] fbreg -24
+EOF
+
+# Same as above, but find alt debug file in a .dwz subdir.
+mkdir .dwz
+mv testfile_multi.dwz .dwz
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info libtestfile_multi_shared.so <<\EOF
+
+DWARF section [25] '.debug_info' at offset 0x106c:
+ [Offset]
+ Compilation unit at offset 0:
+ Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
+ [ b] compile_unit
+ producer (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -fpreprocessed -mtune=generic -march=x86-64 -g -fPIC"
+ language (data1) C89 (1)
+ name (strp) "shared.c"
+ comp_dir (GNU_strp_alt) "/home/mark/src/tests/dwz"
+ low_pc (addr) +0x0000000000000670 <call_foo>
+ high_pc (udata) 23 (+0x0000000000000687)
+ stmt_list (sec_offset) 0
+ [ 26] imported_unit
+ import (GNU_ref_alt) [ b]
+ [ 2b] subprogram
+ external (flag_present)
+ name (strp) "call_foo"
+ decl_file (data1) 1
+ decl_line (data1) 3
+ prototyped (flag_present)
+ type (GNU_ref_alt) [ 3e]
+ low_pc (addr) +0x0000000000000670 <call_foo>
+ high_pc (udata) 23 (+0x0000000000000687)
+ frame_base (exprloc)
+ [ 0] call_frame_cfa
+ GNU_all_call_sites (flag_present)
+ [ 41] formal_parameter
+ name (string) "fb"
+ decl_file (data1) 1
+ decl_line (data1) 3
+ type (GNU_ref_alt) [ 76]
+ location (exprloc)
+ [ 0] fbreg -24
+EOF
+mv .dwz/testfile_multi.dwz .
+rmdir .dwz
+
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info testfile-dwzstr <<\EOF
+
+DWARF section [28] '.debug_info' at offset 0x1088:
+ [Offset]
+ Compilation unit at offset 0:
+ Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
+ [ b] compile_unit
+ producer (GNU_strp_alt) "GNU C 4.7.2 20121109 (Red Hat 4.7.2-8) -mtune=generic -march=x86-64 -g"
+ language (data1) C89 (1)
+ name (GNU_strp_alt) "main.c"
+ comp_dir (GNU_strp_alt) "/home/mark/src/tests"
+ low_pc (addr) 0x00000000004004ec <main>
+ high_pc (udata) 18 (0x00000000004004fe)
+ stmt_list (sec_offset) 0
+ [ 26] imported_unit
+ import (GNU_ref_alt) [ b]
+ [ 2b] subprogram
+ external (flag_present)
+ name (GNU_strp_alt) "main"
+ decl_file (data1) 1
+ decl_line (data1) 8
+ prototyped (flag_present)
+ type (GNU_ref_alt) [ 30]
+ low_pc (addr) 0x00000000004004ec <main>
+ high_pc (udata) 18 (0x00000000004004fe)
+ frame_base (exprloc)
+ [ 0] call_frame_cfa
+ GNU_all_call_sites (flag_present)
+ [ 41] formal_parameter
+ name (GNU_strp_alt) "argc"
+ decl_file (data1) 1
+ decl_line (data1) 8
+ type (GNU_ref_alt) [ 30]
+ location (exprloc)
+ [ 0] fbreg -36
+ [ 4f] formal_parameter
+ name (GNU_strp_alt) "argv"
+ decl_file (data1) 1
+ decl_line (data1) 8
+ type (GNU_ref_alt) [ 41]
+ location (exprloc)
+ [ 0] fbreg -48
+ [ 5d] variable
+ name (string) "fbb"
+ decl_file (data1) 1
+ decl_line (data1) 10
+ type (GNU_ref_alt) [ 14]
+ location (exprloc)
+ [ 0] fbreg -32
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-gdb_index.sh b/src/tests/run-readelf-gdb_index.sh
new file mode 100755
index 00000000..fcbc3c57
--- /dev/null
+++ b/src/tests/run-readelf-gdb_index.sh
@@ -0,0 +1,130 @@
+#! /bin/sh
+# Copyright (C) 2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# common.h
+# struct foo
+# {
+# const char *bar;
+# };
+#
+# extern char *global;
+# int say (struct foo *prefix);
+
+# hello.c
+# #include "common.h"
+#
+# static char *hello = "Hello";
+#
+# int
+# main (int argc, char **argv)
+# {
+# struct foo baz;
+# global = hello;
+# baz.bar = global;
+# return say(&baz);
+# }
+
+# world.c
+# #include "common.h"
+#
+# char *global;
+#
+# static int hello (const char *bar)
+# {
+# return bar == global;
+# }
+#
+# int
+# say (struct foo *prefix)
+# {
+# return hello (prefix->bar);
+# }
+
+# gcc -g -fdebug-types-section -c hello.c
+# gcc -g -fdebug-types-section -c world.c
+# gcc -g -fdebug-types-section -o testfilegdbindex7 hello.o world.o
+# gdb testfilegdbindex7
+# (gdb) save gdb-index .
+# objcopy --add-section .gdb_index=testfilegdbindex7.gdb-index --set-section-flags .gdb_index=readonly testfilegdbindex7 testfilegdbindex7
+
+testfiles testfilegdbindex5 testfilegdbindex7
+
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=gdb_index testfilegdbindex5 <<\EOF
+
+GDB section [33] '.gdb_index' at offset 0xe76 contains 8383 bytes :
+ Version: 5
+ CU offset: 0x18
+ TU offset: 0x38
+ address offset: 0x50
+ symbol offset: 0x78
+ constant offset: 0x2078
+
+ CU list at offset 0x18 contains 2 entries:
+ [ 0] start: 00000000, length: 184
+ [ 1] start: 0x0000b8, length: 204
+
+ TU list at offset 0x38 contains 1 entries:
+ [ 0] CU offset: 0, type offset: 29, signature: 0x87e03f92cc37cdf0
+
+ Address list at offset 0x50 contains 2 entries:
+ [ 0] 0x000000000040049c <main>..0x00000000004004d1 <main+0x35>, CU index: 0
+ [ 1] 0x00000000004004d4 <hello>..0x000000000040050b <say+0x1c>, CU index: 1
+
+ Symbol table at offset 0x50 contains 1024 slots:
+ [ 123] symbol: global, CUs: 1
+ [ 489] symbol: main, CUs: 0
+ [ 518] symbol: char, CUs: 0
+ [ 661] symbol: foo, CUs: 0T
+ [ 741] symbol: hello, CUs: 0, 1
+ [ 746] symbol: say, CUs: 1
+ [ 754] symbol: int, CUs: 0
+EOF
+
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=gdb_index testfilegdbindex7 <<\EOF
+
+GDB section [33] '.gdb_index' at offset 0xe76 contains 8399 bytes :
+ Version: 7
+ CU offset: 0x18
+ TU offset: 0x38
+ address offset: 0x50
+ symbol offset: 0x78
+ constant offset: 0x2078
+
+ CU list at offset 0x18 contains 2 entries:
+ [ 0] start: 00000000, length: 184
+ [ 1] start: 0x0000b8, length: 204
+
+ TU list at offset 0x38 contains 1 entries:
+ [ 0] CU offset: 0, type offset: 29, signature: 0x87e03f92cc37cdf0
+
+ Address list at offset 0x50 contains 2 entries:
+ [ 0] 0x000000000040049c <main>..0x00000000004004d1 <main+0x35>, CU index: 0
+ [ 1] 0x00000000004004d4 <hello>..0x000000000040050b <say+0x1c>, CU index: 1
+
+ Symbol table at offset 0x50 contains 1024 slots:
+ [ 123] symbol: global, CUs: 1 (var:G)
+ [ 489] symbol: main, CUs: 0 (func:G)
+ [ 518] symbol: char, CUs: 0 (type:S)
+ [ 661] symbol: foo, CUs: 0T (type:S)
+ [ 741] symbol: hello, CUs: 0 (var:S), 1 (func:S)
+ [ 746] symbol: say, CUs: 1 (func:G)
+ [ 754] symbol: int, CUs: 0 (type:S)
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-line.sh b/src/tests/run-readelf-line.sh
new file mode 100755
index 00000000..32bcf9d5
--- /dev/null
+++ b/src/tests/run-readelf-line.sh
@@ -0,0 +1,259 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Tests readelf --debug-dump=line and --debug-dump=decodedline
+# See run-readelf-aranges for testfiles.
+
+testfiles testfilefoobarbaz
+
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=line testfilefoobarbaz <<EOF
+
+DWARF section [30] '.debug_line' at offset 0x15f6:
+
+Table at offset 0:
+
+ Length: 83
+ DWARF version: 2
+ Prologue length: 43
+ Minimum instruction length: 1
+ Maximum operations per instruction: 1
+ Initial value if 'is_stmt': 1
+ Line base: -5
+ Line range: 14
+ Opcode base: 13
+
+Opcodes:
+ [ 1] 0 arguments
+ [ 2] 1 argument
+ [ 3] 1 argument
+ [ 4] 1 argument
+ [ 5] 1 argument
+ [ 6] 0 arguments
+ [ 7] 0 arguments
+ [ 8] 0 arguments
+ [ 9] 1 argument
+ [10] 0 arguments
+ [11] 0 arguments
+ [12] 1 argument
+
+Directory table:
+
+File name table:
+ Entry Dir Time Size Name
+ 1 0 0 0 foo.c
+ 2 0 0 0 foobarbaz.h
+
+Line number statements:
+ [ 35] extended opcode 2: set address to 0x80482f0 <main>
+ [ 3c] advance line by constant 15 to 16
+ [ 3e] copy
+ [ 3f] special opcode 159: address+10 = 0x80482fa <main+0xa>, line+1 = 17
+ [ 40] special opcode 117: address+7 = 0x8048301 <main+0x11>, line+1 = 18
+ [ 41] advance line by constant -9 to 9
+ [ 43] special opcode 200: address+13 = 0x804830e <main+0x1e>, line+0 = 9
+ [ 44] special opcode 48: address+2 = 0x8048310 <main+0x20>, line+2 = 11
+ [ 45] special opcode 58: address+3 = 0x8048313 <main+0x23>, line-2 = 9
+ [ 46] special opcode 48: address+2 = 0x8048315 <main+0x25>, line+2 = 11
+ [ 47] special opcode 44: address+2 = 0x8048317 <main+0x27>, line-2 = 9
+ [ 48] advance line by constant 13 to 22
+ [ 4a] special opcode 46: address+2 = 0x8048319 <main+0x29>, line+0 = 22
+ [ 4b] advance line by constant -13 to 9
+ [ 4d] special opcode 60: address+3 = 0x804831c <main+0x2c>, line+0 = 9
+ [ 4e] advance line by constant 12 to 21
+ [ 50] special opcode 60: address+3 = 0x804831f <main+0x2f>, line+0 = 21
+ [ 51] special opcode 61: address+3 = 0x8048322 <main+0x32>, line+1 = 22
+ [ 52] advance address by 2 to 0x8048324
+ [ 54] extended opcode 1: end of sequence
+
+Table at offset 87:
+
+ Length: 72
+ DWARF version: 2
+ Prologue length: 28
+ Minimum instruction length: 1
+ Maximum operations per instruction: 1
+ Initial value if 'is_stmt': 1
+ Line base: -5
+ Line range: 14
+ Opcode base: 13
+
+Opcodes:
+ [ 1] 0 arguments
+ [ 2] 1 argument
+ [ 3] 1 argument
+ [ 4] 1 argument
+ [ 5] 1 argument
+ [ 6] 0 arguments
+ [ 7] 0 arguments
+ [ 8] 0 arguments
+ [ 9] 1 argument
+ [10] 0 arguments
+ [11] 0 arguments
+ [12] 1 argument
+
+Directory table:
+
+File name table:
+ Entry Dir Time Size Name
+ 1 0 0 0 bar.c
+
+Line number statements:
+ [ 7d] extended opcode 2: set address to 0x8048330 <nobar>
+ [ 84] advance line by constant 12 to 13
+ [ 86] copy
+ [ 87] special opcode 19: address+0 = 0x8048330 <nobar>, line+1 = 14
+ [ 88] advance address by 11 to 0x804833b
+ [ 8a] extended opcode 1: end of sequence
+ [ 8d] extended opcode 2: set address to 0x8048440 <bar>
+ [ 94] advance line by constant 18 to 19
+ [ 96] copy
+ [ 97] special opcode 19: address+0 = 0x8048440 <bar>, line+1 = 20
+ [ 98] advance line by constant -12 to 8
+ [ 9a] special opcode 200: address+13 = 0x804844d <bar+0xd>, line+0 = 8
+ [ 9b] advance line by constant 14 to 22
+ [ 9d] special opcode 74: address+4 = 0x8048451 <bar+0x11>, line+0 = 22
+ [ 9e] advance address by 1 to 0x8048452
+ [ a0] extended opcode 1: end of sequence
+
+Table at offset 163:
+
+ Length: 106
+ DWARF version: 2
+ Prologue length: 43
+ Minimum instruction length: 1
+ Maximum operations per instruction: 1
+ Initial value if 'is_stmt': 1
+ Line base: -5
+ Line range: 14
+ Opcode base: 13
+
+Opcodes:
+ [ 1] 0 arguments
+ [ 2] 1 argument
+ [ 3] 1 argument
+ [ 4] 1 argument
+ [ 5] 1 argument
+ [ 6] 0 arguments
+ [ 7] 0 arguments
+ [ 8] 0 arguments
+ [ 9] 1 argument
+ [10] 0 arguments
+ [11] 0 arguments
+ [12] 1 argument
+
+Directory table:
+
+File name table:
+ Entry Dir Time Size Name
+ 1 0 0 0 baz.c
+ 2 0 0 0 foobarbaz.h
+
+Line number statements:
+ [ d8] extended opcode 2: set address to 0x8048340 <nobaz>
+ [ df] advance line by constant 12 to 13
+ [ e1] copy
+ [ e2] special opcode 19: address+0 = 0x8048340 <nobaz>, line+1 = 14
+ [ e3] advance address by 11 to 0x804834b
+ [ e5] extended opcode 1: end of sequence
+ [ e8] extended opcode 2: set address to 0x8048460 <baz>
+ [ ef] advance line by constant 18 to 19
+ [ f1] copy
+ [ f2] special opcode 74: address+4 = 0x8048464 <baz+0x4>, line+0 = 19
+ [ f3] special opcode 75: address+4 = 0x8048468 <baz+0x8>, line+1 = 20
+ [ f4] extended opcode 4: set discriminator to 1
+ [ f8] special opcode 78: address+4 = 0x804846c <baz+0xc>, line+4 = 24
+ [ f9] special opcode 187: address+12 = 0x8048478 <baz+0x18>, line+1 = 25
+ [ fa] special opcode 87: address+5 = 0x804847d <baz+0x1d>, line-1 = 24
+ [ fb] special opcode 61: address+3 = 0x8048480 <baz+0x20>, line+1 = 25
+ [ fc] special opcode 101: address+6 = 0x8048486 <baz+0x26>, line-1 = 24
+ [ fd] special opcode 61: address+3 = 0x8048489 <baz+0x29>, line+1 = 25
+ [ fe] special opcode 87: address+5 = 0x804848e <baz+0x2e>, line-1 = 24
+ [ ff] advance line by constant -16 to 8
+ [ 101] special opcode 46: address+2 = 0x8048490 <baz+0x30>, line+0 = 8
+ [ 102] advance line by constant 20 to 28
+ [ 104] special opcode 186: address+12 = 0x804849c <baz+0x3c>, line+0 = 28
+ [ 105] advance line by constant -20 to 8
+ [ 107] special opcode 88: address+5 = 0x80484a1 <baz+0x41>, line+0 = 8
+ [ 108] advance line by constant 13 to 21
+ [ 10a] advance address by constant 17 to 0x80484b2 <baz+0x52>
+ [ 10b] special opcode 32: address+1 = 0x80484b3 <baz+0x53>, line+0 = 21
+ [ 10c] advance address by 9 to 0x80484bc
+ [ 10e] extended opcode 1: end of sequence
+EOF
+
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=decodedline testfilefoobarbaz <<\EOF
+
+DWARF section [30] '.debug_line' at offset 0x15f6:
+
+ CU [b] foo.c
+ line:col SBPE* disc isa op address (Statement Block Prologue Epilogue *End)
+ /home/mark/src/tests/foobarbaz/foo.c (mtime: 0, length: 0)
+ 16:0 S 0 0 0 0x080482f0 <main>
+ 17:0 S 0 0 0 0x080482fa <main+0xa>
+ 18:0 S 0 0 0 0x08048301 <main+0x11>
+ 9:0 S 0 0 0 0x0804830e <main+0x1e>
+ 11:0 S 0 0 0 0x08048310 <main+0x20>
+ 9:0 S 0 0 0 0x08048313 <main+0x23>
+ 11:0 S 0 0 0 0x08048315 <main+0x25>
+ 9:0 S 0 0 0 0x08048317 <main+0x27>
+ 22:0 S 0 0 0 0x08048319 <main+0x29>
+ 9:0 S 0 0 0 0x0804831c <main+0x2c>
+ 21:0 S 0 0 0 0x0804831f <main+0x2f>
+ 22:0 S 0 0 0 0x08048322 <main+0x32>
+ 22:0 S * 0 0 0 0x08048323 <main+0x33>
+
+ CU [141] bar.c
+ line:col SBPE* disc isa op address (Statement Block Prologue Epilogue *End)
+ /home/mark/src/tests/foobarbaz/bar.c (mtime: 0, length: 0)
+ 13:0 S 0 0 0 0x08048330 <nobar>
+ 14:0 S 0 0 0 0x08048330 <nobar>
+ 14:0 S * 0 0 0 0x0804833a <nobar+0xa>
+
+ 19:0 S 0 0 0 0x08048440 <bar>
+ 20:0 S 0 0 0 0x08048440 <bar>
+ 8:0 S 0 0 0 0x0804844d <bar+0xd>
+ 22:0 S 0 0 0 0x08048451 <bar+0x11>
+ 22:0 S * 0 0 0 0x08048451 <bar+0x11>
+
+ CU [1dc] baz.c
+ line:col SBPE* disc isa op address (Statement Block Prologue Epilogue *End)
+ /home/mark/src/tests/foobarbaz/baz.c (mtime: 0, length: 0)
+ 13:0 S 0 0 0 0x08048340 <nobaz>
+ 14:0 S 0 0 0 0x08048340 <nobaz>
+ 14:0 S * 0 0 0 0x0804834a <nobaz+0xa>
+
+ 19:0 S 0 0 0 0x08048460 <baz>
+ 19:0 S 0 0 0 0x08048464 <baz+0x4>
+ 20:0 S 0 0 0 0x08048468 <baz+0x8>
+ 24:0 S 1 0 0 0x0804846c <baz+0xc>
+ 25:0 S 0 0 0 0x08048478 <baz+0x18>
+ 24:0 S 0 0 0 0x0804847d <baz+0x1d>
+ 25:0 S 0 0 0 0x08048480 <baz+0x20>
+ 24:0 S 0 0 0 0x08048486 <baz+0x26>
+ 25:0 S 0 0 0 0x08048489 <baz+0x29>
+ 24:0 S 0 0 0 0x0804848e <baz+0x2e>
+ 8:0 S 0 0 0 0x08048490 <baz+0x30>
+ 28:0 S 0 0 0 0x0804849c <baz+0x3c>
+ 8:0 S 0 0 0 0x080484a1 <baz+0x41>
+ 21:0 S 0 0 0 0x080484b3 <baz+0x53>
+ 21:0 S * 0 0 0 0x080484bb <baz+0x5b>
+
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-loc.sh b/src/tests/run-readelf-loc.sh
new file mode 100755
index 00000000..98870fcf
--- /dev/null
+++ b/src/tests/run-readelf-loc.sh
@@ -0,0 +1,109 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# - hello.c
+# int say (const char *prefix);
+#
+# static char *
+# subject (char *word, int count)
+# {
+# return count > 0 ? word : (word + count);
+# }
+#
+# int
+# main (int argc, char **argv)
+# {
+# return say (subject (argv[0], argc));
+# }
+#
+# - world.c
+# static int
+# sad (char c)
+# {
+# return c > 0 ? c : c + 1;
+# }
+#
+# static int
+# happy (const char *w)
+# {
+# return sad (w[1]);
+# }
+#
+# int
+# say (const char *prefix)
+# {
+# const char *world = "World";
+# return prefix ? sad (prefix[0]) : happy (world);
+# }
+#
+# gcc -g -O2 -c hello.c
+# gcc -g -O2 -c world.c
+# gcc -g -o testfileloc hello.o world.o
+
+testfiles testfileloc
+
+# Process values as offsets from base addresses and resolve to symbols.
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=loc --debug-dump=ranges \
+ testfileloc<<\EOF
+
+DWARF section [33] '.debug_loc' at offset 0xd2a:
+ [ 0] 0x0000000000400480 <main>..0x000000000040048d <main+0xd> [ 0] reg5
+ [ 23] 0x0000000000400485 <main+0x5>..0x000000000040048d <main+0xd> [ 0] reg5
+ [ 46] 0x00000000004004b2 <say+0x12>..0x00000000004004ba <say+0x1a> [ 0] breg5 0
+
+DWARF section [34] '.debug_ranges' at offset 0xd94:
+ [ 0] 0x0000000000400480 <main>..0x0000000000400482 <main+0x2>
+ 0x0000000000400485 <main+0x5>..0x000000000040048d <main+0xd>
+ [ 30] 0x00000000004004ad <say+0xd>..0x00000000004004af <say+0xf>
+ 0x00000000004004b2 <say+0x12>..0x00000000004004ba <say+0x1a>
+EOF
+
+# Don't resolve addresses to symbols.
+testrun_compare ${abs_top_builddir}/src/readelf -N --debug-dump=loc --debug-dump=ranges \
+ testfileloc<<\EOF
+
+DWARF section [33] '.debug_loc' at offset 0xd2a:
+ [ 0] 0x0000000000400480..0x000000000040048d [ 0] reg5
+ [ 23] 0x0000000000400485..0x000000000040048d [ 0] reg5
+ [ 46] 0x00000000004004b2..0x00000000004004ba [ 0] breg5 0
+
+DWARF section [34] '.debug_ranges' at offset 0xd94:
+ [ 0] 0x0000000000400480..0x0000000000400482
+ 0x0000000000400485..0x000000000040048d
+ [ 30] 0x00000000004004ad..0x00000000004004af
+ 0x00000000004004b2..0x00000000004004ba
+EOF
+
+# Produce "raw" unprocessed content.
+testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc --debug-dump=ranges \
+ testfileloc<<\EOF
+
+DWARF section [33] '.debug_loc' at offset 0xd2a:
+ [ 0] 000000000000000000..0x000000000000000d [ 0] reg5
+ [ 23] 0x0000000000000005..0x000000000000000d [ 0] reg5
+ [ 46] 0x0000000000000012..0x000000000000001a [ 0] breg5 0
+
+DWARF section [34] '.debug_ranges' at offset 0xd94:
+ [ 0] 000000000000000000..0x0000000000000002
+ 0x0000000000000005..0x000000000000000d
+ [ 30] 0x000000000000000d..0x000000000000000f
+ 0x0000000000000012..0x000000000000001a
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-macro.sh b/src/tests/run-readelf-macro.sh
new file mode 100755
index 00000000..86932033
--- /dev/null
+++ b/src/tests/run-readelf-macro.sh
@@ -0,0 +1,345 @@
+#! /bin/sh
+# Copyright (C) 2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# common.h
+# #define ONE 1
+# #define TWO 2
+# #define THREE 3
+#
+# #define WORLD "World"
+#
+# int say (const char *prefix);
+#
+# #define A 'a'
+# #define B b
+# #define C "C"
+#
+# #ifdef THREE
+# #undef THREE
+# #define THREE(ARG1,ARG2,ARG3) ARG3
+# #endif
+
+# hello.c
+# #include "common.h"
+#
+# int
+# main (int argc, char **argv)
+# {
+# return say (WORLD);
+# }
+
+# world.c
+# #include "common.h"
+#
+# int
+# say (const char *prefix)
+# {
+# return prefix ? ONE : TWO;
+# }
+
+# gcc -g3 -c hello.c
+# gcc -g3 -c world.c
+# gcc -g3 -o testfilemacro hello.o world.o
+
+testfiles testfilemacro
+
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=macro testfilemacro <<\EOF
+
+DWARF section [32] '.debug_macro' at offset 0x2480:
+
+ Offset: 0x0
+ Version: 4
+ Flag: 0x2
+ Offset length: 4
+ .debug_line offset: 0x0
+
+ #include offset 0x1a
+ start_file 0, [1] /home/mark/src/tests/hello.c
+ start_file 1, [2] /home/mark/src/tests/common.h
+ #include offset 0x582
+ end_file
+ end_file
+
+ Offset: 0x1a
+ Version: 4
+ Flag: 0x0
+ Offset length: 4
+
+ #define __STDC__ 1, line 1 (indirect)
+ #define __STDC_HOSTED__ 1, line 1 (indirect)
+ #define __GNUC__ 4, line 1 (indirect)
+ #define __GNUC_MINOR__ 7, line 1 (indirect)
+ #define __GNUC_PATCHLEVEL__ 1, line 1 (indirect)
+ #define __VERSION__ "4.7.1 20120629 (Red Hat 4.7.1-1)", line 1 (indirect)
+ #define __GNUC_RH_RELEASE__ 1, line 1 (indirect)
+ #define __ATOMIC_RELAXED 0, line 1 (indirect)
+ #define __ATOMIC_SEQ_CST 5, line 1 (indirect)
+ #define __ATOMIC_ACQUIRE 2, line 1 (indirect)
+ #define __ATOMIC_RELEASE 3, line 1 (indirect)
+ #define __ATOMIC_ACQ_REL 4, line 1 (indirect)
+ #define __ATOMIC_CONSUME 1, line 1 (indirect)
+ #define __FINITE_MATH_ONLY__ 0, line 1 (indirect)
+ #define _LP64 1, line 1 (indirect)
+ #define __LP64__ 1, line 1 (indirect)
+ #define __SIZEOF_INT__ 4, line 1 (indirect)
+ #define __SIZEOF_LONG__ 8, line 1 (indirect)
+ #define __SIZEOF_LONG_LONG__ 8, line 1 (indirect)
+ #define __SIZEOF_SHORT__ 2, line 1 (indirect)
+ #define __SIZEOF_FLOAT__ 4, line 1 (indirect)
+ #define __SIZEOF_DOUBLE__ 8, line 1 (indirect)
+ #define __SIZEOF_LONG_DOUBLE__ 16, line 1 (indirect)
+ #define __SIZEOF_SIZE_T__ 8, line 1 (indirect)
+ #define __CHAR_BIT__ 8, line 1 (indirect)
+ #define __BIGGEST_ALIGNMENT__ 16, line 1 (indirect)
+ #define __ORDER_LITTLE_ENDIAN__ 1234, line 1 (indirect)
+ #define __ORDER_BIG_ENDIAN__ 4321, line 1 (indirect)
+ #define __ORDER_PDP_ENDIAN__ 3412, line 1 (indirect)
+ #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__, line 1 (indirect)
+ #define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__, line 1 (indirect)
+ #define __SIZEOF_POINTER__ 8, line 1 (indirect)
+ #define __SIZE_TYPE__ long unsigned int, line 1 (indirect)
+ #define __PTRDIFF_TYPE__ long int, line 1 (indirect)
+ #define __WCHAR_TYPE__ int, line 1 (indirect)
+ #define __WINT_TYPE__ unsigned int, line 1 (indirect)
+ #define __INTMAX_TYPE__ long int, line 1 (indirect)
+ #define __UINTMAX_TYPE__ long unsigned int, line 1 (indirect)
+ #define __CHAR16_TYPE__ short unsigned int, line 1 (indirect)
+ #define __CHAR32_TYPE__ unsigned int, line 1 (indirect)
+ #define __SIG_ATOMIC_TYPE__ int, line 1 (indirect)
+ #define __INT8_TYPE__ signed char, line 1 (indirect)
+ #define __INT16_TYPE__ short int, line 1 (indirect)
+ #define __INT32_TYPE__ int, line 1 (indirect)
+ #define __INT64_TYPE__ long int, line 1 (indirect)
+ #define __UINT8_TYPE__ unsigned char, line 1 (indirect)
+ #define __UINT16_TYPE__ short unsigned int, line 1 (indirect)
+ #define __UINT32_TYPE__ unsigned int, line 1 (indirect)
+ #define __UINT64_TYPE__ long unsigned int, line 1 (indirect)
+ #define __INT_LEAST8_TYPE__ signed char, line 1 (indirect)
+ #define __INT_LEAST16_TYPE__ short int, line 1 (indirect)
+ #define __INT_LEAST32_TYPE__ int, line 1 (indirect)
+ #define __INT_LEAST64_TYPE__ long int, line 1 (indirect)
+ #define __UINT_LEAST8_TYPE__ unsigned char, line 1 (indirect)
+ #define __UINT_LEAST16_TYPE__ short unsigned int, line 1 (indirect)
+ #define __UINT_LEAST32_TYPE__ unsigned int, line 1 (indirect)
+ #define __UINT_LEAST64_TYPE__ long unsigned int, line 1 (indirect)
+ #define __INT_FAST8_TYPE__ signed char, line 1 (indirect)
+ #define __INT_FAST16_TYPE__ long int, line 1 (indirect)
+ #define __INT_FAST32_TYPE__ long int, line 1 (indirect)
+ #define __INT_FAST64_TYPE__ long int, line 1 (indirect)
+ #define __UINT_FAST8_TYPE__ unsigned char, line 1 (indirect)
+ #define __UINT_FAST16_TYPE__ long unsigned int, line 1 (indirect)
+ #define __UINT_FAST32_TYPE__ long unsigned int, line 1 (indirect)
+ #define __UINT_FAST64_TYPE__ long unsigned int, line 1 (indirect)
+ #define __INTPTR_TYPE__ long int, line 1 (indirect)
+ #define __UINTPTR_TYPE__ long unsigned int, line 1 (indirect)
+ #define __GXX_ABI_VERSION 1002, line 1 (indirect)
+ #define __SCHAR_MAX__ 127, line 1 (indirect)
+ #define __SHRT_MAX__ 32767, line 1 (indirect)
+ #define __INT_MAX__ 2147483647, line 1 (indirect)
+ #define __LONG_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __LONG_LONG_MAX__ 9223372036854775807LL, line 1 (indirect)
+ #define __WCHAR_MAX__ 2147483647, line 1 (indirect)
+ #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1), line 1 (indirect)
+ #define __WINT_MAX__ 4294967295U, line 1 (indirect)
+ #define __WINT_MIN__ 0U, line 1 (indirect)
+ #define __PTRDIFF_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __SIZE_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __INTMAX_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __INTMAX_C(c) c ## L, line 1 (indirect)
+ #define __UINTMAX_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __UINTMAX_C(c) c ## UL, line 1 (indirect)
+ #define __SIG_ATOMIC_MAX__ 2147483647, line 1 (indirect)
+ #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1), line 1 (indirect)
+ #define __INT8_MAX__ 127, line 1 (indirect)
+ #define __INT16_MAX__ 32767, line 1 (indirect)
+ #define __INT32_MAX__ 2147483647, line 1 (indirect)
+ #define __INT64_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __UINT8_MAX__ 255, line 1 (indirect)
+ #define __UINT16_MAX__ 65535, line 1 (indirect)
+ #define __UINT32_MAX__ 4294967295U, line 1 (indirect)
+ #define __UINT64_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __INT_LEAST8_MAX__ 127, line 1 (indirect)
+ #define __INT8_C(c) c, line 1 (indirect)
+ #define __INT_LEAST16_MAX__ 32767, line 1 (indirect)
+ #define __INT16_C(c) c, line 1 (indirect)
+ #define __INT_LEAST32_MAX__ 2147483647, line 1 (indirect)
+ #define __INT32_C(c) c, line 1 (indirect)
+ #define __INT_LEAST64_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __INT64_C(c) c ## L, line 1 (indirect)
+ #define __UINT_LEAST8_MAX__ 255, line 1 (indirect)
+ #define __UINT8_C(c) c, line 1 (indirect)
+ #define __UINT_LEAST16_MAX__ 65535, line 1 (indirect)
+ #define __UINT16_C(c) c, line 1 (indirect)
+ #define __UINT_LEAST32_MAX__ 4294967295U, line 1 (indirect)
+ #define __UINT32_C(c) c ## U, line 1 (indirect)
+ #define __UINT_LEAST64_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __UINT64_C(c) c ## UL, line 1 (indirect)
+ #define __INT_FAST8_MAX__ 127, line 1 (indirect)
+ #define __INT_FAST16_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __INT_FAST32_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __INT_FAST64_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __UINT_FAST8_MAX__ 255, line 1 (indirect)
+ #define __UINT_FAST16_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __UINT_FAST32_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __UINT_FAST64_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __INTPTR_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __UINTPTR_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __FLT_EVAL_METHOD__ 0, line 1 (indirect)
+ #define __DEC_EVAL_METHOD__ 2, line 1 (indirect)
+ #define __FLT_RADIX__ 2, line 1 (indirect)
+ #define __FLT_MANT_DIG__ 24, line 1 (indirect)
+ #define __FLT_DIG__ 6, line 1 (indirect)
+ #define __FLT_MIN_EXP__ (-125), line 1 (indirect)
+ #define __FLT_MIN_10_EXP__ (-37), line 1 (indirect)
+ #define __FLT_MAX_EXP__ 128, line 1 (indirect)
+ #define __FLT_MAX_10_EXP__ 38, line 1 (indirect)
+ #define __FLT_DECIMAL_DIG__ 9, line 1 (indirect)
+ #define __FLT_MAX__ 3.40282346638528859812e+38F, line 1 (indirect)
+ #define __FLT_MIN__ 1.17549435082228750797e-38F, line 1 (indirect)
+ #define __FLT_EPSILON__ 1.19209289550781250000e-7F, line 1 (indirect)
+ #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F, line 1 (indirect)
+ #define __FLT_HAS_DENORM__ 1, line 1 (indirect)
+ #define __FLT_HAS_INFINITY__ 1, line 1 (indirect)
+ #define __FLT_HAS_QUIET_NAN__ 1, line 1 (indirect)
+ #define __DBL_MANT_DIG__ 53, line 1 (indirect)
+ #define __DBL_DIG__ 15, line 1 (indirect)
+ #define __DBL_MIN_EXP__ (-1021), line 1 (indirect)
+ #define __DBL_MIN_10_EXP__ (-307), line 1 (indirect)
+ #define __DBL_MAX_EXP__ 1024, line 1 (indirect)
+ #define __DBL_MAX_10_EXP__ 308, line 1 (indirect)
+ #define __DBL_DECIMAL_DIG__ 17, line 1 (indirect)
+ #define __DBL_MAX__ ((double)1.79769313486231570815e+308L), line 1 (indirect)
+ #define __DBL_MIN__ ((double)2.22507385850720138309e-308L), line 1 (indirect)
+ #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L), line 1 (indirect)
+ #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L), line 1 (indirect)
+ #define __DBL_HAS_DENORM__ 1, line 1 (indirect)
+ #define __DBL_HAS_INFINITY__ 1, line 1 (indirect)
+ #define __DBL_HAS_QUIET_NAN__ 1, line 1 (indirect)
+ #define __LDBL_MANT_DIG__ 64, line 1 (indirect)
+ #define __LDBL_DIG__ 18, line 1 (indirect)
+ #define __LDBL_MIN_EXP__ (-16381), line 1 (indirect)
+ #define __LDBL_MIN_10_EXP__ (-4931), line 1 (indirect)
+ #define __LDBL_MAX_EXP__ 16384, line 1 (indirect)
+ #define __LDBL_MAX_10_EXP__ 4932, line 1 (indirect)
+ #define __DECIMAL_DIG__ 21, line 1 (indirect)
+ #define __LDBL_MAX__ 1.18973149535723176502e+4932L, line 1 (indirect)
+ #define __LDBL_MIN__ 3.36210314311209350626e-4932L, line 1 (indirect)
+ #define __LDBL_EPSILON__ 1.08420217248550443401e-19L, line 1 (indirect)
+ #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L, line 1 (indirect)
+ #define __LDBL_HAS_DENORM__ 1, line 1 (indirect)
+ #define __LDBL_HAS_INFINITY__ 1, line 1 (indirect)
+ #define __LDBL_HAS_QUIET_NAN__ 1, line 1 (indirect)
+ #define __DEC32_MANT_DIG__ 7, line 1 (indirect)
+ #define __DEC32_MIN_EXP__ (-94), line 1 (indirect)
+ #define __DEC32_MAX_EXP__ 97, line 1 (indirect)
+ #define __DEC32_MIN__ 1E-95DF, line 1 (indirect)
+ #define __DEC32_MAX__ 9.999999E96DF, line 1 (indirect)
+ #define __DEC32_EPSILON__ 1E-6DF, line 1 (indirect)
+ #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF, line 1 (indirect)
+ #define __DEC64_MANT_DIG__ 16, line 1 (indirect)
+ #define __DEC64_MIN_EXP__ (-382), line 1 (indirect)
+ #define __DEC64_MAX_EXP__ 385, line 1 (indirect)
+ #define __DEC64_MIN__ 1E-383DD, line 1 (indirect)
+ #define __DEC64_MAX__ 9.999999999999999E384DD, line 1 (indirect)
+ #define __DEC64_EPSILON__ 1E-15DD, line 1 (indirect)
+ #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD, line 1 (indirect)
+ #define __DEC128_MANT_DIG__ 34, line 1 (indirect)
+ #define __DEC128_MIN_EXP__ (-6142), line 1 (indirect)
+ #define __DEC128_MAX_EXP__ 6145, line 1 (indirect)
+ #define __DEC128_MIN__ 1E-6143DL, line 1 (indirect)
+ #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL, line 1 (indirect)
+ #define __DEC128_EPSILON__ 1E-33DL, line 1 (indirect)
+ #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL, line 1 (indirect)
+ #define __REGISTER_PREFIX__ , line 1 (indirect)
+ #define __USER_LABEL_PREFIX__ , line 1 (indirect)
+ #define __GNUC_GNU_INLINE__ 1, line 1 (indirect)
+ #define __NO_INLINE__ 1, line 1 (indirect)
+ #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1, line 1 (indirect)
+ #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1, line 1 (indirect)
+ #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1, line 1 (indirect)
+ #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1, line 1 (indirect)
+ #define __GCC_ATOMIC_BOOL_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_CHAR_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_SHORT_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_INT_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_LONG_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_LLONG_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1, line 1 (indirect)
+ #define __GCC_ATOMIC_POINTER_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_HAVE_DWARF2_CFI_ASM 1, line 1 (indirect)
+ #define __PRAGMA_REDEFINE_EXTNAME 1, line 1 (indirect)
+ #define __SIZEOF_INT128__ 16, line 1 (indirect)
+ #define __SIZEOF_WCHAR_T__ 4, line 1 (indirect)
+ #define __SIZEOF_WINT_T__ 4, line 1 (indirect)
+ #define __SIZEOF_PTRDIFF_T__ 8, line 1 (indirect)
+ #define __amd64 1, line 1 (indirect)
+ #define __amd64__ 1, line 1 (indirect)
+ #define __x86_64 1, line 1 (indirect)
+ #define __x86_64__ 1, line 1 (indirect)
+ #define __k8 1, line 1 (indirect)
+ #define __k8__ 1, line 1 (indirect)
+ #define __MMX__ 1, line 1 (indirect)
+ #define __SSE__ 1, line 1 (indirect)
+ #define __SSE2__ 1, line 1 (indirect)
+ #define __SSE_MATH__ 1, line 1 (indirect)
+ #define __SSE2_MATH__ 1, line 1 (indirect)
+ #define __gnu_linux__ 1, line 1 (indirect)
+ #define __linux 1, line 1 (indirect)
+ #define __linux__ 1, line 1 (indirect)
+ #define linux 1, line 1 (indirect)
+ #define __unix 1, line 1 (indirect)
+ #define __unix__ 1, line 1 (indirect)
+ #define unix 1, line 1 (indirect)
+ #define __ELF__ 1, line 1 (indirect)
+ #define __DECIMAL_BID_FORMAT__ 1, line 1 (indirect)
+
+ Offset: 0x582
+ Version: 4
+ Flag: 0x0
+ Offset length: 4
+
+ #define ONE 1, line 1 (indirect)
+ #define TWO 2, line 2 (indirect)
+ #define THREE 3, line 3 (indirect)
+ #define WORLD "World", line 5 (indirect)
+ #define A 'a', line 9 (indirect)
+ #define B b, line 10
+ #define C "C", line 11 (indirect)
+ #undef THREE, line 14 (indirect)
+ #define THREE(ARG1,ARG2,ARG3) ARG3, line 15 (indirect)
+
+ Offset: 0x5bc
+ Version: 4
+ Flag: 0x2
+ Offset length: 4
+ .debug_line offset: 0x47
+
+ #include offset 0x1a
+ start_file 0, [1] /home/mark/src/tests/world.c
+ start_file 1, [2] /home/mark/src/tests/common.h
+ #include offset 0x582
+ end_file
+ end_file
+
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-mixed-corenote.sh b/src/tests/run-readelf-mixed-corenote.sh
new file mode 100755
index 00000000..01e4594d
--- /dev/null
+++ b/src/tests/run-readelf-mixed-corenote.sh
@@ -0,0 +1,493 @@
+#! /bin/sh
+# Copyright (C) 2012, 2013, 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile63
+
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile63 <<\EOF
+
+Note segment of 892 bytes at offset 0x274:
+ Owner Data size Type
+ CORE 148 PRSTATUS
+ info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11
+ sigpend: <>
+ sighold: <>
+ pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
+ utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
+ orig_r0: -1, fpvalid: 1
+ r0: 1 r1: -1091672508 r2: -1091672500
+ r3: 0 r4: 0 r5: 0
+ r6: 33728 r7: 0 r8: 0
+ r9: 0 r10: -1225703496 r11: -1091672844
+ r12: 0 sp: 0xbeee64f4 lr: 0xb6dc3f48
+ pc: 0x00008500 spsr: 0x60000010
+ CORE 124 PRPSINFO
+ state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
+ uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
+ fname: a.out, psargs: ./a.out
+ CORE 144 AUXV
+ HWCAP: 0xe8d7 <swp half thumb fast-mult vfp edsp>
+ PAGESZ: 4096
+ CLKTCK: 100
+ PHDR: 0x8034
+ PHENT: 32
+ PHNUM: 8
+ BASE: 0xb6eee000
+ FLAGS: 0
+ ENTRY: 0x83c0
+ UID: 0
+ EUID: 0
+ GID: 0
+ EGID: 0
+ SECURE: 0
+ RANDOM: 0xbeee674e
+ EXECFN: 0xbeee6ff4
+ PLATFORM: 0xbeee675e
+ NULL
+ CORE 116 FPREGSET
+ f0: 0x000000000000000000000000 f1: 0x000000000000000000000000
+ f2: 0x000000000000000000000000 f3: 0x000000000000000000000000
+ f4: 0x000000000000000000000000 f5: 0x000000000000000000000000
+ f6: 0x000000000000000000000000 f7: 0x000000000000000000000000
+ LINUX 260 ARM_VFP
+ fpscr: 0x00000000
+ d0: 0x0000000000000000 d1: 0x0000000000000000
+ d2: 0x0000000000000000 d3: 0x0000000000000000
+ d4: 0x0000000000000000 d5: 0x0000000000000000
+ d6: 0x0000000000000000 d7: 0x0000000000000000
+ d8: 0x0000000000000000 d9: 0x0000000000000000
+ d10: 0x0000000000000000 d11: 0x0000000000000000
+ d12: 0x0000000000000000 d13: 0x0000000000000000
+ d14: 0x0000000000000000 d15: 0x0000000000000000
+ d16: 0x0000000000000000 d17: 0x0000000000000000
+ d18: 0x0000000000000000 d19: 0x0000000000000000
+ d20: 0x0000000000000000 d21: 0x0000000000000000
+ d22: 0x0000000000000000 d23: 0x0000000000000000
+ d24: 0x0000000000000000 d25: 0x0000000000000000
+ d26: 0x0000000000000000 d27: 0x0000000000000000
+ d28: 0x0000000000000000 d29: 0x0000000000000000
+ d30: 0x0000000000000000 d31: 0x0000000000000000
+EOF
+
+testfiles testfile67
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile67 <<\EOF
+
+Note segment of 1044 bytes at offset 0xe8:
+ Owner Data size Type
+ CORE 336 PRSTATUS
+ info.si_signo: 4, info.si_code: 0, info.si_errno: 0, cursig: 4
+ sigpend: <>
+ sighold: <>
+ pid: 805, ppid: 804, pgrp: 804, sid: 699
+ utime: 0.000042, stime: 0.000103, cutime: 0.000000, cstime: 0.000000
+ orig_r2: 2571552016, fpvalid: 1
+ pswm: 0x0705c00180000000 pswa: 0x00000000800000d6
+ r0: 4393751543808 r1: 4398002544388
+ r2: 11 r3: 2571578208
+ r4: 2571702016 r5: 4398003235624
+ r6: 2571580768 r7: 2571702016
+ r8: 2571578208 r9: 2571552016
+ r10: 2571552016 r11: 0
+ r12: 4398003499008 r13: 2148274656
+ r14: 0 r15: 4398040761216
+ a0: 0x000003ff a1: 0xfd54a6f0 a2: 0x00000000 a3: 0x00000000
+ a4: 0x00000000 a5: 0x00000000 a6: 0x00000000 a7: 0x00000000
+ a8: 0x00000000 a9: 0x00000000 a10: 0x00000000 a11: 0x00000000
+ a12: 0x00000000 a13: 0x00000000 a14: 0x00000000 a15: 0x00000000
+ CORE 136 PRPSINFO
+ state: 0, sname: R, zomb: 0, nice: 0, flag: 0x0000000000400400
+ uid: 0, gid: 0, pid: 805, ppid: 804, pgrp: 804, sid: 699
+ fname: 1, psargs: ./1
+ CORE 304 AUXV
+ SYSINFO_EHDR: 0
+ HWCAP: 0x37f
+ PAGESZ: 4096
+ CLKTCK: 100
+ PHDR: 0x80000040
+ PHENT: 56
+ PHNUM: 2
+ BASE: 0
+ FLAGS: 0
+ ENTRY: 0x800000d4
+ UID: 0
+ EUID: 0
+ GID: 0
+ EGID: 0
+ SECURE: 0
+ RANDOM: 0x3ffffa8463c
+ EXECFN: 0x3ffffa85ff4
+ PLATFORM: 0x3ffffa8464c
+ NULL
+ CORE 136 FPREGSET
+ fpc: 0x00000000
+ f0: 0x0000000000000040 f1: 0x4b00000000000000
+ f2: 0x0000000000000041 f3: 0x3ad50b5555555600
+ f4: 0x0000000000000000 f5: 0x0000000000000000
+ f6: 0x0000000000000000 f7: 0x0000000000000000
+ f8: 0x0000000000000000 f9: 0x0000000000000000
+ f10: 0x0000000000000000 f11: 0x0000000000000000
+ f12: 0x0000000000000000 f13: 0x0000000000000000
+ f14: 0x0000000000000000 f15: 0x0000000000000000
+ LINUX 8 S390_LAST_BREAK
+ last_break: 0x000003fffd75ccbe
+ LINUX 4 S390_SYSTEM_CALL
+ system_call: 0
+EOF
+
+testfiles testfile68
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile68 <<\EOF
+
+Note segment of 852 bytes at offset 0x94:
+ Owner Data size Type
+ CORE 224 PRSTATUS
+ info.si_signo: 4, info.si_code: 0, info.si_errno: 0, cursig: 4
+ sigpend: <>
+ sighold: <>
+ pid: 839, ppid: 838, pgrp: 838, sid: 699
+ utime: 0.000043, stime: 0.000102, cutime: 0.000000, cstime: 0.000000
+ orig_r2: -1723388288, fpvalid: 1
+ pswm: 0x070dc000 pswa: 0x8040009a
+ r0: 0 r1: -43966716 r2: 11 r3: -1723238816
+ r4: -1723265280 r5: -43275480 r6: -1723245280 r7: -1723265280
+ r8: -1723238816 r9: -1723388288 r10: -1723388288 r11: 0
+ r12: -43012096 r13: -2146692640 r14: 0 r15: 2139883440
+ a0: 0x000003ff a1: 0xfd54a6f0 a2: 0x00000000 a3: 0x00000000
+ a4: 0x00000000 a5: 0x00000000 a6: 0x00000000 a7: 0x00000000
+ a8: 0x00000000 a9: 0x00000000 a10: 0x00000000 a11: 0x00000000
+ a12: 0x00000000 a13: 0x00000000 a14: 0x00000000 a15: 0x00000000
+ CORE 124 PRPSINFO
+ state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400400
+ uid: 0, gid: 0, pid: 839, ppid: 838, pgrp: 838, sid: 699
+ fname: 2, psargs: ./2
+ CORE 152 AUXV
+ SYSINFO_EHDR: 0
+ HWCAP: 0x37f
+ PAGESZ: 4096
+ CLKTCK: 100
+ PHDR: 0x400034
+ PHENT: 32
+ PHNUM: 2
+ BASE: 0
+ FLAGS: 0
+ ENTRY: 0x400098
+ UID: 0
+ EUID: 0
+ GID: 0
+ EGID: 0
+ SECURE: 0
+ RANDOM: 0x7f8c090c
+ EXECFN: 0x7f8c1ff4
+ PLATFORM: 0x7f8c091c
+ NULL
+ CORE 136 FPREGSET
+ fpc: 0x00000000
+ f0: 0x0000000000000040 f1: 0x4b00000000000000
+ f2: 0x0000000000000041 f3: 0x3ad50b5555555600
+ f4: 0x0000000000000000 f5: 0x0000000000000000
+ f6: 0x0000000000000000 f7: 0x0000000000000000
+ f8: 0x0000000000000000 f9: 0x0000000000000000
+ f10: 0x0000000000000000 f11: 0x0000000000000000
+ f12: 0x0000000000000000 f13: 0x0000000000000000
+ f14: 0x0000000000000000 f15: 0x0000000000000000
+ LINUX 8 S390_LAST_BREAK
+ last_break: 0xfd75ccbe
+ LINUX 4 S390_SYSTEM_CALL
+ system_call: 0
+ LINUX 64 S390_HIGH_GPRS
+ high_r0: 0x000003ff, high_r1: 0x000003ff, high_r2: 0x00000000
+ high_r3: 0x00000000, high_r4: 0x00000000, high_r5: 0x000003ff
+ high_r6: 0x00000000, high_r7: 0x00000000, high_r8: 0x00000000
+ high_r9: 0x00000000, high_r10: 0x00000000, high_r11: 0x00000000
+ high_r12: 0x000003ff, high_r13: 0x00000000, high_r14: 0x00000000
+ high_r15: 0x00000000
+EOF
+
+# To reproduce this core dump, do this on x86_64 machine with Linux
+# 3.7 or later:
+# $ gcc -x c <(echo 'int main () { return *(int *)0x12345678; }')
+# $ ./a.out
+testfiles testfile71
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile71 <<\EOF
+
+Note segment of 1476 bytes at offset 0x430:
+ Owner Data size Type
+ CORE 336 PRSTATUS
+ info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11
+ sigpend: <>
+ sighold: <>
+ pid: 9664, ppid: 2868, pgrp: 9664, sid: 2868
+ utime: 0.000000, stime: 0.004000, cutime: 0.000000, cstime: 0.000000
+ orig_rax: -1, fpvalid: 0
+ r15: 0 r14: 0
+ r13: 140734971656848 r12: 4195328
+ rbp: 0x00007fff69fe39b0 rbx: 0
+ r11: 266286012928 r10: 140734971656256
+ r9: 0 r8: 266289790592
+ rax: 305419896 rcx: 4195584
+ rdx: 140734971656872 rsi: 140734971656856
+ rdi: 1 rip: 0x00000000004004f9
+ rflags: 0x0000000000010246 rsp: 0x00007fff69fe39b0
+ fs.base: 0x00007fa1c8933740 gs.base: 0x0000000000000000
+ cs: 0x0033 ss: 0x002b ds: 0x0000 es: 0x0000 fs: 0x0000 gs: 0x0000
+ CORE 136 PRPSINFO
+ state: 0, sname: R, zomb: 0, nice: 0, flag: 0x0000000000000200
+ uid: 1000, gid: 1000, pid: 9664, ppid: 2868, pgrp: 9664, sid: 2868
+ fname: a.out, psargs: ./a.out
+ CORE 128 SIGINFO
+ si_signo: 11, si_errno: 0, si_code: 1
+ fault address: 0x12345678
+ CORE 304 AUXV
+ SYSINFO_EHDR: 0x7fff69ffe000
+ HWCAP: 0xafebfbff <fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm pbe>
+ PAGESZ: 4096
+ CLKTCK: 100
+ PHDR: 0x400040
+ PHENT: 56
+ PHNUM: 9
+ BASE: 0
+ FLAGS: 0
+ ENTRY: 0x400400
+ UID: 1000
+ EUID: 1000
+ GID: 1000
+ EGID: 1000
+ SECURE: 0
+ RANDOM: 0x7fff69fe3d19
+ EXECFN: 0x7fff69fe4ff0
+ PLATFORM: 0x7fff69fe3d29
+ NULL
+ CORE 469 FILE
+ 10 files:
+ 00400000-00401000 00000000 4096 /home/petr/a.out
+ 00600000-00601000 00000000 4096 /home/petr/a.out
+ 00601000-00602000 00001000 4096 /home/petr/a.out
+ 3dffa00000-3dffa21000 00000000 135168 /usr/lib64/ld-2.17.so
+ 3dffc20000-3dffc21000 00020000 4096 /usr/lib64/ld-2.17.so
+ 3dffc21000-3dffc22000 00021000 4096 /usr/lib64/ld-2.17.so
+ 3dffe00000-3dfffb6000 00000000 1794048 /usr/lib64/libc-2.17.so
+ 3dfffb6000-3e001b6000 001b6000 2097152 /usr/lib64/libc-2.17.so
+ 3e001b6000-3e001ba000 001b6000 16384 /usr/lib64/libc-2.17.so
+ 3e001ba000-3e001bc000 001ba000 8192 /usr/lib64/libc-2.17.so
+EOF
+
+# To reproduce this core dump, do this on an aarch64 machine:
+# $ gcc -x c <(echo 'int main () { return *(int *)0x12345678; }')
+# $ ./a.out
+testfiles testfile_aarch64_core
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile_aarch64_core <<\EOF
+
+Note segment of 2512 bytes at offset 0x270:
+ Owner Data size Type
+ CORE 392 PRSTATUS
+ info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11
+ sigpend: <>
+ sighold: <>
+ pid: 16547, ppid: 3822, pgrp: 16547, sid: 3822
+ utime: 0.010000, stime: 0.000000, cutime: 0.000000, cstime: 0.000000
+ pc: 0x0000000000400548, pstate: 0x0000000060000000, fpvalid: 1
+ x0: 305419896 x1: 548685596648
+ x2: 548685596664 x3: 4195648
+ x4: 0 x5: 548536191688
+ x6: 0 x7: -6341196323062964528
+ x8: 135 x9: 4294967295
+ x10: 4195026 x11: 184256
+ x12: 144 x13: 15
+ x14: 548536635328 x15: 0
+ x16: 548534815304 x17: 4262024
+ x18: 548685596000 x19: 0
+ x20: 0 x21: 4195296
+ x22: 0 x23: 0
+ x24: 0 x25: 0
+ x26: 0 x27: 0
+ x28: 0 x29: 548685596320
+ x30: 548534815544 sp: 0x0000007fc035c6a0
+ CORE 136 PRPSINFO
+ state: 0, sname: R, zomb: 0, nice: 0, flag: 0x0000000000400400
+ uid: 0, gid: 0, pid: 16547, ppid: 3822, pgrp: 16547, sid: 3822
+ fname: a.out, psargs: ./a.out
+ CORE 128 SIGINFO
+ si_signo: 11, si_errno: 0, si_code: 1
+ fault address: 0x12345678
+ CORE 304 AUXV
+ SYSINFO_EHDR: 0x7fb7500000
+ HWCAP: 0x3
+ PAGESZ: 65536
+ CLKTCK: 100
+ PHDR: 0x400040
+ PHENT: 56
+ PHNUM: 7
+ BASE: 0x7fb7520000
+ FLAGS: 0
+ ENTRY: 0x4003e0
+ UID: 0
+ EUID: 0
+ GID: 0
+ EGID: 0
+ SECURE: 0
+ RANDOM: 0x7fc035c9e8
+ EXECFN: 0x7fc035fff0
+ PLATFORM: 0x7fc035c9f8
+ NULL
+ CORE 306 FILE
+ 6 files:
+ 00400000-00410000 00000000 65536 /root/elfutils/build/a.out
+ 00410000-00420000 00000000 65536 /root/elfutils/build/a.out
+ 7fb7370000-7fb74d0000 00000000 1441792 /usr/lib64/libc-2.17.so
+ 7fb74d0000-7fb74f0000 00150000 131072 /usr/lib64/libc-2.17.so
+ 7fb7520000-7fb7540000 00000000 131072 /usr/lib64/ld-2.17.so
+ 7fb7540000-7fb7550000 00010000 65536 /usr/lib64/ld-2.17.so
+ CORE 528 FPREGSET
+ fpsr: 0x00000000, fpcr: 0x00000000
+ v0: 0x00000000000af54b000000000000fe02
+ v1: 0x00000000000000000000000000000000
+ v2: 0x00000000000000000000000000000000
+ v3: 0x00000000000000000000000000000000
+ v4: 0x00000000000000000000000000000000
+ v5: 0x00000000000000000000000000000000
+ v6: 0x00000000000000000000000000000000
+ v7: 0x00000000000000000000000000000000
+ v8: 0x00000000000000000000000000000000
+ v9: 0x00000000000000000000000000000000
+ v10: 0x00000000000000000000000000000000
+ v11: 0x00000000000000000000000000000000
+ v12: 0x00000000000000000000000000000000
+ v13: 0x00000000000000000000000000000000
+ v14: 0x00000000000000000000000000000000
+ v15: 0x00000000000000000000000000000000
+ v16: 0x00000000000000000000000000000000
+ v17: 0x00000000000000000000000000000000
+ v18: 0x00000000000000000000000000000000
+ v19: 0x00000000000000000000000000000000
+ v20: 0x00000000000000000000000000000000
+ v21: 0x00000000000000000000000000000000
+ v22: 0x00000000000000000000000000000000
+ v23: 0x00000000000000000000000000000000
+ v24: 0x00000000000000000000000000000000
+ v25: 0x00000000000000000000000000000000
+ v26: 0x00000000000000000000000000000000
+ v27: 0x00000000000000000000000000000000
+ v28: 0x00000000000000000000000000000000
+ v29: 0x00000000000000000000000000000000
+ v30: 0x00000000000000000000000000000000
+ v31: 0x00000000000000000000000000000000
+ LINUX 8 ARM_TLS
+ tls: 0x0000007fb73606f0
+ LINUX 264 ARM_HW_BREAK
+ dbg_info: 0x00000610
+ DBGBVR0_EL1: 0x0000000000000000, DBGBCR0_EL1: 0x00000000
+ DBGBVR1_EL1: 0x0000000000000000, DBGBCR1_EL1: 0x00000000
+ DBGBVR2_EL1: 0x0000000000000000, DBGBCR2_EL1: 0x00000000
+ DBGBVR3_EL1: 0x0000000000000000, DBGBCR3_EL1: 0x00000000
+ DBGBVR4_EL1: 0x0000000000000000, DBGBCR4_EL1: 0x00000000
+ DBGBVR5_EL1: 0x0000000000000000, DBGBCR5_EL1: 0x00000000
+ DBGBVR6_EL1: 0x0000000000000000, DBGBCR6_EL1: 0x00000000
+ DBGBVR7_EL1: 0x0000000000000000, DBGBCR7_EL1: 0x00000000
+ DBGBVR8_EL1: 0x0000000000000000, DBGBCR8_EL1: 0x00000000
+ DBGBVR9_EL1: 0x0000000000000000, DBGBCR9_EL1: 0x00000000
+ DBGBVR10_EL1: 0x0000000000000000, DBGBCR10_EL1: 0x00000000
+ DBGBVR11_EL1: 0x0000000000000000, DBGBCR11_EL1: 0x00000000
+ DBGBVR12_EL1: 0x0000000000000000, DBGBCR12_EL1: 0x00000000
+ DBGBVR13_EL1: 0x0000000000000000, DBGBCR13_EL1: 0x00000000
+ DBGBVR14_EL1: 0x0000000000000000, DBGBCR14_EL1: 0x00000000
+ DBGBVR15_EL1: 0x0000000000000000, DBGBCR15_EL1: 0x00000000
+ LINUX 264 ARM_HW_WATCH
+ dbg_info: 0x00000610
+ DBGWVR0_EL1: 0x0000000000000000, DBGWCR0_EL1: 0x00000000
+ DBGWVR1_EL1: 0x0000000000000000, DBGWCR1_EL1: 0x00000000
+ DBGWVR2_EL1: 0x0000000000000000, DBGWCR2_EL1: 0x00000000
+ DBGWVR3_EL1: 0x0000000000000000, DBGWCR3_EL1: 0x00000000
+ DBGWVR4_EL1: 0x0000000000000000, DBGWCR4_EL1: 0x00000000
+ DBGWVR5_EL1: 0x0000000000000000, DBGWCR5_EL1: 0x00000000
+ DBGWVR6_EL1: 0x0000000000000000, DBGWCR6_EL1: 0x00000000
+ DBGWVR7_EL1: 0x0000000000000000, DBGWCR7_EL1: 0x00000000
+ DBGWVR8_EL1: 0x0000000000000000, DBGWCR8_EL1: 0x00000000
+ DBGWVR9_EL1: 0x0000000000000000, DBGWCR9_EL1: 0x00000000
+ DBGWVR10_EL1: 0x0000000000000000, DBGWCR10_EL1: 0x00000000
+ DBGWVR11_EL1: 0x0000000000000000, DBGWCR11_EL1: 0x00000000
+ DBGWVR12_EL1: 0x0000000000000000, DBGWCR12_EL1: 0x00000000
+ DBGWVR13_EL1: 0x0000000000000000, DBGWCR13_EL1: 0x00000000
+ DBGWVR14_EL1: 0x0000000000000000, DBGWCR14_EL1: 0x00000000
+ DBGWVR15_EL1: 0x0000000000000000, DBGWCR15_EL1: 0x00000000
+EOF
+
+# To reproduce this core dump, do this on an i686 machine:
+# $ gcc -x c <(echo 'int main () { return *(int *)0x12345678; }')
+# $ ./a.out
+testfiles testfile_i686_core
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile_i686_core <<\EOF
+
+Note segment of 1000 bytes at offset 0x214:
+ Owner Data size Type
+ CORE 144 PRSTATUS
+ info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11
+ sigpend: <>
+ sighold: <>
+ pid: 27395, ppid: 1130, pgrp: 27395, sid: 1130
+ utime: 0.000000, stime: 0.001000, cutime: 0.000000, cstime: 0.000000
+ orig_eax: -1, fpvalid: 0
+ ebx: 1334976512 ecx: -1239415396 edx: -1079283900
+ esi: 0 edi: 0 ebp: 0xbfab6f18
+ eax: 305419896 eip: 0x08048408 eflags: 0x00010246
+ esp: 0xbfab6f18
+ ds: 0x007b es: 0x007b fs: 0x0000 gs: 0x0033 cs: 0x0073 ss: 0x007b
+ CORE 124 PRPSINFO
+ state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00000200
+ uid: 1000, gid: 1000, pid: 27395, ppid: 1130, pgrp: 27395, sid: 1130
+ fname: a.out, psargs: ./a.out
+ CORE 128 SIGINFO
+ si_signo: 11, si_errno: 0, si_code: 1
+ fault address: 0x12345678
+ CORE 160 AUXV
+ SYSINFO: 0xb77fc414
+ SYSINFO_EHDR: 0xb77fc000
+ HWCAP: 0x780abfd <fpu de pse tsc msr pae mce cx8 apic sep pge cmov mmx fxsr sse sse2>
+ PAGESZ: 4096
+ CLKTCK: 100
+ PHDR: 0x8048034
+ PHENT: 32
+ PHNUM: 9
+ BASE: 0
+ FLAGS: 0
+ ENTRY: 0x80482f0
+ UID: 1000
+ EUID: 1000
+ GID: 1000
+ EGID: 1000
+ SECURE: 0
+ RANDOM: 0xbfab70eb
+ EXECFN: 0xbfab7ff4
+ PLATFORM: 0xbfab70fb
+ NULL
+ CORE 275 FILE
+ 9 files:
+ 08048000-08049000 00000000 4096 /tmp/a.out
+ 08049000-0804a000 00000000 4096 /tmp/a.out
+ 0804a000-0804b000 00001000 4096 /tmp/a.out
+ 4f744000-4f763000 00000000 126976 /usr/lib/ld-2.18.so
+ 4f764000-4f765000 0001f000 4096 /usr/lib/ld-2.18.so
+ 4f765000-4f766000 00020000 4096 /usr/lib/ld-2.18.so
+ 4f768000-4f920000 00000000 1802240 /usr/lib/libc-2.18.so
+ 4f920000-4f922000 001b8000 8192 /usr/lib/libc-2.18.so
+ 4f922000-4f923000 001ba000 4096 /usr/lib/libc-2.18.so
+ LINUX 48 386_TLS
+ index: 6, base: 0xb77da700, limit: 0x000fffff, flags: 0x00000051
+ index: 7, base: 0x00000000, limit: 0x00000000, flags: 0x00000028
+ index: 8, base: 0x00000000, limit: 0x00000000, flags: 0x00000028
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-s.sh b/src/tests/run-readelf-s.sh
new file mode 100755
index 00000000..59407d14
--- /dev/null
+++ b/src/tests/run-readelf-s.sh
@@ -0,0 +1,378 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Tests readelf -s and readelf --elf-section -s
+# See also run-dwflsyms.sh
+#
+# - bar.c
+#
+# static int b1 = 1;
+# int b2 = 1;
+#
+# static int
+# foo (int a)
+# {
+# return a + b2;
+# }
+#
+# int bar (int b)
+# {
+# return b - foo (b - b1);
+# }
+#
+# - foo.c
+#
+# extern int bar (int b);
+# extern int b2;
+#
+# int
+# main (int argc, char ** argv)
+# {
+# return bar (argc + b2);
+# }
+#
+# gcc -pie -g -c foo.c
+# gcc -pie -g -c bar.c
+# gcc -pie -g -o baz foo.o bar.o
+#
+# - testfilebaztab (dynsym + symtab)
+# cp baz testfilebaztab
+#
+# - testfilebazdbg (dynsym + .debug file)
+# eu-strip --remove-comment -f testfilebazdbg.debug baz
+# cp baz testfilebazdbg
+#
+#- testfilebazdyn (dynsym only)
+# objcopy --remove-section=.gnu_debuglink baz testfilebazdyn
+#
+# - testfilebazmdb (dynsym + gnu_debugdata + .debug)
+# This is how rpmbuild does it:
+# nm -D baz --format=posix --defined-only | awk '{ print $1 }' | sort > dynsyms
+# nm baz.debug --format=posix --defined-only | awk '{ if ($2 == "T" || $2 == "t") print $1 }' | sort > funcsyms
+# comm -13 dynsyms funcsyms > keep_symbols
+# objcopy -S --remove-section .gdb_index --remove-section .comment --keep-symbols=keep_symbols baz.debug mini_debuginfo
+# rm -f mini_debuginfo.xz
+# xz mini_debuginfo
+# objcopy --add-section .gnu_debugdata=mini_debuginfo.xz baz
+# cp baz testfilebazmdb
+#
+# - testfilebazmin (dynsym + gnu_debugdata)
+# objcopy --remove-section=.gnu_debuglink baz testfilebazmin
+#
+#
+# Special auxiliary only, can happen with static binaries.
+# - start.c
+#
+# extern int main (int argc, char ** argv);
+# void _start (void) { for (;;) main (1, 0); }
+#
+# gcc -g -c start.c
+# gcc -static -nostdlib -o bas foo.o bar.o start.o
+#
+# eu-strip --remove-comment -f bas.debug bas
+# nm bas.debug --format=posix --defined-only | awk '{ if ($2 == "T" || $2 == "t") print $1 }' | sort > funcsyms
+# objcopy -S --remove-section .gdb_index --remove-section .comment --keep-symbols=funcsyms bas.debug mini_debuginfo
+# rm -f mini_debuginfo.xz
+# xz mini_debuginfo
+# objcopy --add-section .gnu_debugdata=mini_debuginfo.xz bas
+# rm bas.debug
+# mv bas testfilebasmin
+#
+#
+# Make sure that find_aux_sym doesn't corrupt relocations, avoiding a kernel
+# heuristic that forces ET_EXEC->ET_DYN. NB: ld.gold doesn't seem to produce
+# the mismatched load addrs between the main file and the mini_debuginfo, so
+# this is forcing ld.bfd.
+#
+# gcc -g -o bax foo.c bar.c -fuse-ld=bfd
+# eu-strip --remove-comment -f bax.debug bax
+# nm -D bax --format=posix --defined-only | awk '{ print $1 }' | sort > dynsyms
+# nm bax.debug --format=posix --defined-only | awk '{ if ($2 == "T" || $2 == "t") print $1 }' | sort > funcsyms
+# comm -13 dynsyms funcsyms > keep_symbols
+# objcopy -S --remove-section .gdb_index --remove-section .comment --keep-symbols=keep_symbols bax.debug mini_debuginfo
+# rm -f mini_debuginfo.xz
+# xz mini_debuginfo
+# objcopy --add-section .gnu_debugdata=mini_debuginfo.xz bax
+# objcopy --remove-section=.gnu_debuglink bax testfilebaxmin
+
+
+testfiles testfilebaztab
+testfiles testfilebazdbg testfilebazdbg.debug
+testfiles testfilebazdyn
+testfiles testfilebazmdb
+testfiles testfilebazmin
+testfiles testfilebasmin
+testfiles testfilebaxmin
+
+tempfiles testfile.dynsym.in testfile.symtab.in testfile.minsym.in
+
+cat > testfile.dynsym.in <<\EOF
+
+Symbol table [ 5] '.dynsym' contains 14 entries:
+ 2 local symbols String table: [ 6] '.dynstr'
+ Num: Value Size Type Bind Vis Ndx Name
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UNDEF
+ 1: 0000000000000238 0 SECTION LOCAL DEFAULT 1
+ 2: 0000000000000000 0 NOTYPE WEAK DEFAULT UNDEF _ITM_deregisterTMCloneTable
+ 3: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF __libc_start_main@GLIBC_2.2.5 (2)
+ 4: 0000000000000000 0 NOTYPE WEAK DEFAULT UNDEF __gmon_start__
+ 5: 0000000000000000 0 NOTYPE WEAK DEFAULT UNDEF _Jv_RegisterClasses
+ 6: 0000000000000000 0 NOTYPE WEAK DEFAULT UNDEF _ITM_registerTMCloneTable
+ 7: 0000000000000000 0 FUNC WEAK DEFAULT UNDEF __cxa_finalize@GLIBC_2.2.5 (2)
+ 8: 000000000020103c 0 NOTYPE GLOBAL DEFAULT 25 _edata
+ 9: 0000000000201040 0 NOTYPE GLOBAL DEFAULT 26 _end
+ 10: 0000000000000860 137 FUNC GLOBAL DEFAULT 13 __libc_csu_init
+ 11: 000000000020103c 0 NOTYPE GLOBAL DEFAULT 26 __bss_start
+ 12: 00000000000007f0 35 FUNC GLOBAL DEFAULT 13 main
+ 13: 00000000000008f0 2 FUNC GLOBAL DEFAULT 13 __libc_csu_fini
+EOF
+
+cat > testfile.symtab.in <<\EOF
+
+Symbol table [34] '.symtab' contains 76 entries:
+ 54 local symbols String table: [35] '.strtab'
+ Num: Value Size Type Bind Vis Ndx Name
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UNDEF
+ 1: 0000000000000238 0 SECTION LOCAL DEFAULT 1
+ 2: 0000000000000254 0 SECTION LOCAL DEFAULT 2
+ 3: 0000000000000274 0 SECTION LOCAL DEFAULT 3
+ 4: 0000000000000298 0 SECTION LOCAL DEFAULT 4
+ 5: 00000000000002d8 0 SECTION LOCAL DEFAULT 5
+ 6: 0000000000000428 0 SECTION LOCAL DEFAULT 6
+ 7: 00000000000004f2 0 SECTION LOCAL DEFAULT 7
+ 8: 0000000000000510 0 SECTION LOCAL DEFAULT 8
+ 9: 0000000000000530 0 SECTION LOCAL DEFAULT 9
+ 10: 0000000000000638 0 SECTION LOCAL DEFAULT 10
+ 11: 0000000000000680 0 SECTION LOCAL DEFAULT 11
+ 12: 00000000000006a0 0 SECTION LOCAL DEFAULT 12
+ 13: 00000000000006e0 0 SECTION LOCAL DEFAULT 13
+ 14: 00000000000008f4 0 SECTION LOCAL DEFAULT 14
+ 15: 0000000000000900 0 SECTION LOCAL DEFAULT 15
+ 16: 0000000000000904 0 SECTION LOCAL DEFAULT 16
+ 17: 0000000000000948 0 SECTION LOCAL DEFAULT 17
+ 18: 0000000000200dd0 0 SECTION LOCAL DEFAULT 18
+ 19: 0000000000200dd8 0 SECTION LOCAL DEFAULT 19
+ 20: 0000000000200de0 0 SECTION LOCAL DEFAULT 20
+ 21: 0000000000200de8 0 SECTION LOCAL DEFAULT 21
+ 22: 0000000000200df0 0 SECTION LOCAL DEFAULT 22
+ 23: 0000000000200fc0 0 SECTION LOCAL DEFAULT 23
+ 24: 0000000000201000 0 SECTION LOCAL DEFAULT 24
+ 25: 0000000000201030 0 SECTION LOCAL DEFAULT 25
+ 26: 000000000020103c 0 SECTION LOCAL DEFAULT 26
+ 27: 0000000000000000 0 SECTION LOCAL DEFAULT 27
+ 28: 0000000000000000 0 SECTION LOCAL DEFAULT 28
+ 29: 0000000000000000 0 SECTION LOCAL DEFAULT 29
+ 30: 0000000000000000 0 SECTION LOCAL DEFAULT 30
+ 31: 0000000000000000 0 SECTION LOCAL DEFAULT 31
+ 32: 0000000000000000 0 SECTION LOCAL DEFAULT 32
+ 33: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
+ 34: 0000000000200de0 0 OBJECT LOCAL DEFAULT 20 __JCR_LIST__
+ 35: 0000000000000710 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones
+ 36: 0000000000000740 0 FUNC LOCAL DEFAULT 13 register_tm_clones
+ 37: 0000000000000780 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux
+ 38: 000000000020103c 1 OBJECT LOCAL DEFAULT 26 completed.6137
+ 39: 0000000000200dd8 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry
+ 40: 00000000000007c0 0 FUNC LOCAL DEFAULT 13 frame_dummy
+ 41: 0000000000200dd0 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry
+ 42: 0000000000000000 0 FILE LOCAL DEFAULT ABS foo.c
+ 43: 0000000000000000 0 FILE LOCAL DEFAULT ABS bar.c
+ 44: 0000000000201034 4 OBJECT LOCAL DEFAULT 25 b1
+ 45: 0000000000000814 20 FUNC LOCAL DEFAULT 13 foo
+ 46: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
+ 47: 0000000000000a58 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__
+ 48: 0000000000200de0 0 OBJECT LOCAL DEFAULT 20 __JCR_END__
+ 49: 0000000000000000 0 FILE LOCAL DEFAULT ABS
+ 50: 0000000000200dd8 0 NOTYPE LOCAL DEFAULT 18 __init_array_end
+ 51: 0000000000200df0 0 OBJECT LOCAL DEFAULT 22 _DYNAMIC
+ 52: 0000000000200dd0 0 NOTYPE LOCAL DEFAULT 18 __init_array_start
+ 53: 0000000000201000 0 OBJECT LOCAL DEFAULT 24 _GLOBAL_OFFSET_TABLE_
+ 54: 00000000000008f0 2 FUNC GLOBAL DEFAULT 13 __libc_csu_fini
+ 55: 0000000000000000 0 NOTYPE WEAK DEFAULT UNDEF _ITM_deregisterTMCloneTable
+ 56: 0000000000201030 0 NOTYPE WEAK DEFAULT 25 data_start
+ 57: 000000000020103c 0 NOTYPE GLOBAL DEFAULT 25 _edata
+ 58: 0000000000000828 44 FUNC GLOBAL DEFAULT 13 bar
+ 59: 00000000000008f4 0 FUNC GLOBAL DEFAULT 14 _fini
+ 60: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF __libc_start_main@@GLIBC_2.2.5
+ 61: 0000000000201030 0 NOTYPE GLOBAL DEFAULT 25 __data_start
+ 62: 0000000000000000 0 NOTYPE WEAK DEFAULT UNDEF __gmon_start__
+ 63: 0000000000200de8 0 OBJECT GLOBAL HIDDEN 21 __dso_handle
+ 64: 0000000000000900 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used
+ 65: 0000000000201038 4 OBJECT GLOBAL DEFAULT 25 b2
+ 66: 0000000000000860 137 FUNC GLOBAL DEFAULT 13 __libc_csu_init
+ 67: 0000000000201040 0 NOTYPE GLOBAL DEFAULT 26 _end
+ 68: 00000000000006e0 0 FUNC GLOBAL DEFAULT 13 _start
+ 69: 000000000020103c 0 NOTYPE GLOBAL DEFAULT 26 __bss_start
+ 70: 00000000000007f0 35 FUNC GLOBAL DEFAULT 13 main
+ 71: 0000000000000000 0 NOTYPE WEAK DEFAULT UNDEF _Jv_RegisterClasses
+ 72: 0000000000201040 0 OBJECT GLOBAL HIDDEN 25 __TMC_END__
+ 73: 0000000000000000 0 NOTYPE WEAK DEFAULT UNDEF _ITM_registerTMCloneTable
+ 74: 0000000000000000 0 FUNC WEAK DEFAULT UNDEF __cxa_finalize@@GLIBC_2.2.5
+ 75: 0000000000000680 0 FUNC GLOBAL DEFAULT 11 _init
+EOF
+
+cat > testfile.minsym.in <<\EOF
+
+Symbol table [28] '.symtab' contains 40 entries:
+ 36 local symbols String table: [29] '.strtab'
+ Num: Value Size Type Bind Vis Ndx Name
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UNDEF
+ 1: 0000000000000710 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones
+ 2: 0000000000000740 0 FUNC LOCAL DEFAULT 13 register_tm_clones
+ 3: 0000000000000780 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux
+ 4: 0000000000200dd8 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry
+ 5: 00000000000007c0 0 FUNC LOCAL DEFAULT 13 frame_dummy
+ 6: 0000000000200dd0 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry
+ 7: 0000000000000814 20 FUNC LOCAL DEFAULT 13 foo
+ 8: 0000000000200dd8 0 NOTYPE LOCAL DEFAULT 18 __init_array_end
+ 9: 0000000000200dd0 0 NOTYPE LOCAL DEFAULT 18 __init_array_start
+ 10: 0000000000000238 0 SECTION LOCAL DEFAULT 1
+ 11: 0000000000000254 0 SECTION LOCAL DEFAULT 2
+ 12: 0000000000000274 0 SECTION LOCAL DEFAULT 3
+ 13: 0000000000000298 0 SECTION LOCAL DEFAULT 4
+ 14: 00000000000002d8 0 SECTION LOCAL DEFAULT 5
+ 15: 0000000000000428 0 SECTION LOCAL DEFAULT 6
+ 16: 00000000000004f2 0 SECTION LOCAL DEFAULT 7
+ 17: 0000000000000510 0 SECTION LOCAL DEFAULT 8
+ 18: 0000000000000530 0 SECTION LOCAL DEFAULT 9
+ 19: 0000000000000638 0 SECTION LOCAL DEFAULT 10
+ 20: 0000000000000680 0 SECTION LOCAL DEFAULT 11
+ 21: 00000000000006a0 0 SECTION LOCAL DEFAULT 12
+ 22: 00000000000006e0 0 SECTION LOCAL DEFAULT 13
+ 23: 00000000000008f4 0 SECTION LOCAL DEFAULT 14
+ 24: 0000000000000900 0 SECTION LOCAL DEFAULT 15
+ 25: 0000000000000904 0 SECTION LOCAL DEFAULT 16
+ 26: 0000000000000948 0 SECTION LOCAL DEFAULT 17
+ 27: 0000000000200dd0 0 SECTION LOCAL DEFAULT 18
+ 28: 0000000000200dd8 0 SECTION LOCAL DEFAULT 19
+ 29: 0000000000200de0 0 SECTION LOCAL DEFAULT 20
+ 30: 0000000000200de8 0 SECTION LOCAL DEFAULT 21
+ 31: 0000000000200df0 0 SECTION LOCAL DEFAULT 22
+ 32: 0000000000200fc0 0 SECTION LOCAL DEFAULT 23
+ 33: 0000000000201000 0 SECTION LOCAL DEFAULT 24
+ 34: 0000000000201030 0 SECTION LOCAL DEFAULT 25
+ 35: 000000000020103c 0 SECTION LOCAL DEFAULT 26
+ 36: 0000000000000828 44 FUNC GLOBAL DEFAULT 13 bar
+ 37: 00000000000008f4 0 FUNC GLOBAL DEFAULT 14 _fini
+ 38: 00000000000006e0 0 FUNC GLOBAL DEFAULT 13 _start
+ 39: 0000000000000680 0 FUNC GLOBAL DEFAULT 11 _init
+EOF
+
+cat testfile.dynsym.in testfile.symtab.in \
+ | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebaztab
+
+cat testfile.dynsym.in \
+ | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebazdbg
+
+cat testfile.symtab.in \
+ | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebazdbg.debug
+
+cat testfile.dynsym.in \
+ | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebazdyn
+
+cat testfile.dynsym.in \
+ | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebazmdb
+
+cat testfile.minsym.in \
+ | testrun_compare ${abs_top_builddir}/src/readelf --elf-section -s testfilebazmdb
+
+cat testfile.dynsym.in \
+ | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebazmin
+
+cat testfile.minsym.in \
+ | testrun_compare ${abs_top_builddir}/src/readelf --elf-section -s testfilebazmin
+
+testrun_compare ${abs_top_builddir}/src/readelf -s testfilebasmin <<EOF
+EOF
+
+testrun_compare ${abs_top_builddir}/src/readelf --elf-section -s testfilebasmin <<\EOF
+
+Symbol table [ 6] '.symtab' contains 9 entries:
+ 6 local symbols String table: [ 7] '.strtab'
+ Num: Value Size Type Bind Vis Ndx Name
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UNDEF
+ 1: 0000000000400168 18 FUNC LOCAL DEFAULT 2 foo
+ 2: 0000000000400120 0 SECTION LOCAL DEFAULT 1
+ 3: 0000000000400144 0 SECTION LOCAL DEFAULT 2
+ 4: 00000000004001c0 0 SECTION LOCAL DEFAULT 3
+ 5: 0000000000600258 0 SECTION LOCAL DEFAULT 4
+ 6: 00000000004001a8 21 FUNC GLOBAL DEFAULT 2 _start
+ 7: 0000000000400144 33 FUNC GLOBAL DEFAULT 2 main
+ 8: 000000000040017a 44 FUNC GLOBAL DEFAULT 2 bar
+EOF
+
+testrun_compare ${abs_top_builddir}/src/readelf -s testfilebaxmin <<EOF
+
+Symbol table [ 5] '.dynsym' contains 3 entries:
+ 1 local symbol String table: [ 6] '.dynstr'
+ Num: Value Size Type Bind Vis Ndx Name
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UNDEF
+ 1: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF __libc_start_main@GLIBC_2.2.5 (2)
+ 2: 0000000000000000 0 NOTYPE WEAK DEFAULT UNDEF __gmon_start__
+EOF
+
+testrun_compare ${abs_top_builddir}/src/readelf --elf-section -s testfilebaxmin <<\EOF
+
+Symbol table [27] '.symtab' contains 42 entries:
+ 35 local symbols String table: [28] '.strtab'
+ Num: Value Size Type Bind Vis Ndx Name
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UNDEF
+ 1: 0000000000400430 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones
+ 2: 0000000000400460 0 FUNC LOCAL DEFAULT 13 register_tm_clones
+ 3: 00000000004004a0 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux
+ 4: 0000000000600e18 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry
+ 5: 00000000004004c0 0 FUNC LOCAL DEFAULT 13 frame_dummy
+ 6: 0000000000600e10 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry
+ 7: 00000000004004f0 20 FUNC LOCAL DEFAULT 13 foo
+ 8: 0000000000600e18 0 NOTYPE LOCAL DEFAULT 18 __init_array_end
+ 9: 0000000000600e10 0 NOTYPE LOCAL DEFAULT 18 __init_array_start
+ 10: 0000000000400238 0 SECTION LOCAL DEFAULT 1
+ 11: 0000000000400254 0 SECTION LOCAL DEFAULT 2
+ 12: 0000000000400274 0 SECTION LOCAL DEFAULT 3
+ 13: 0000000000400298 0 SECTION LOCAL DEFAULT 4
+ 14: 00000000004002b8 0 SECTION LOCAL DEFAULT 5
+ 15: 0000000000400300 0 SECTION LOCAL DEFAULT 6
+ 16: 0000000000400338 0 SECTION LOCAL DEFAULT 7
+ 17: 0000000000400340 0 SECTION LOCAL DEFAULT 8
+ 18: 0000000000400360 0 SECTION LOCAL DEFAULT 9
+ 19: 0000000000400378 0 SECTION LOCAL DEFAULT 10
+ 20: 00000000004003a8 0 SECTION LOCAL DEFAULT 11
+ 21: 00000000004003d0 0 SECTION LOCAL DEFAULT 12
+ 22: 0000000000400400 0 SECTION LOCAL DEFAULT 13
+ 23: 00000000004005c4 0 SECTION LOCAL DEFAULT 14
+ 24: 00000000004005d0 0 SECTION LOCAL DEFAULT 15
+ 25: 00000000004005e0 0 SECTION LOCAL DEFAULT 16
+ 26: 0000000000400628 0 SECTION LOCAL DEFAULT 17
+ 27: 0000000000600e10 0 SECTION LOCAL DEFAULT 18
+ 28: 0000000000600e18 0 SECTION LOCAL DEFAULT 19
+ 29: 0000000000600e20 0 SECTION LOCAL DEFAULT 20
+ 30: 0000000000600e28 0 SECTION LOCAL DEFAULT 21
+ 31: 0000000000600ff8 0 SECTION LOCAL DEFAULT 22
+ 32: 0000000000601000 0 SECTION LOCAL DEFAULT 23
+ 33: 0000000000601028 0 SECTION LOCAL DEFAULT 24
+ 34: 0000000000601034 0 SECTION LOCAL DEFAULT 25
+ 35: 00000000004005c0 2 FUNC GLOBAL DEFAULT 13 __libc_csu_fini
+ 36: 0000000000400504 40 FUNC GLOBAL DEFAULT 13 bar
+ 37: 00000000004005c4 0 FUNC GLOBAL DEFAULT 14 _fini
+ 38: 0000000000400550 101 FUNC GLOBAL DEFAULT 13 __libc_csu_init
+ 39: 0000000000400400 0 FUNC GLOBAL DEFAULT 13 _start
+ 40: 000000000040052c 35 FUNC GLOBAL DEFAULT 13 main
+ 41: 00000000004003a8 0 FUNC GLOBAL DEFAULT 11 _init
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-self.sh b/src/tests/run-readelf-self.sh
new file mode 100755
index 00000000..7ffb3577
--- /dev/null
+++ b/src/tests/run-readelf-self.sh
@@ -0,0 +1,21 @@
+#! /bin/sh
+# Copyright (C) 2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Just makes sure readelf doesn't crash
+testrun_on_self_quiet ${abs_top_builddir}/src/readelf -a -w
diff --git a/src/tests/run-readelf-test1.sh b/src/tests/run-readelf-test1.sh
new file mode 100755
index 00000000..4725049d
--- /dev/null
+++ b/src/tests/run-readelf-test1.sh
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+original=${original:-testfile11}
+stripped=${stripped:-testfile7}
+debugout=${debugfile:+-f testfile.debug.temp -F $debugfile}
+
+testfiles testfile3
+
+tempfiles testfile.temp
+
+testrun ${abs_top_builddir}/src/readelf -r testfile3 > testfile.temp
+
+diff -u - testfile.temp <<EOF
+
+Relocation section [ 8] '.rel.got' for section [19] '.got' at offset 0x294 contains 1 entry:
+ Offset Type Value Name
+ 0x08049544 386_GLOB_DAT 0000000000 __gmon_start__
+
+Relocation section [ 9] '.rel.plt' for section [11] '.plt' at offset 0x29c contains 4 entries:
+ Offset Type Value Name
+ 0x08049534 386_JMP_SLOT 0x080482e4 __register_frame_info
+ 0x08049538 386_JMP_SLOT 0x080482f4 __deregister_frame_info
+ 0x0804953c 386_JMP_SLOT 0x08048304 __libc_start_main
+ 0x08049540 386_JMP_SLOT 0x08048314 __cxa_finalize
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-test2.sh b/src/tests/run-readelf-test2.sh
new file mode 100755
index 00000000..90306247
--- /dev/null
+++ b/src/tests/run-readelf-test2.sh
@@ -0,0 +1,28 @@
+#! /bin/sh
+# Copyright (C) 2007 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile28
+
+testrun_compare ${abs_top_builddir}/src/readelf -x .strtab testfile28 <<\EOF
+
+Hex dump of section [6] '.strtab', 1 bytes at offset 0x290:
+ 0x00000000 00 .
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-test3.sh b/src/tests/run-readelf-test3.sh
new file mode 100755
index 00000000..cc0a191d
--- /dev/null
+++ b/src/tests/run-readelf-test3.sh
@@ -0,0 +1,31 @@
+#! /bin/sh
+# Copyright (C) 2007 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile40.debug
+
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile40.debug <<\EOF
+
+Note section [ 6] '.note' of 60 bytes at offset 0x120:
+ Owner Data size Type
+ GNU 20 GNU_BUILD_ID
+ Build ID: 34072edcd87ef6728f4b4a7956167b2fcfc3f1d3
+ Linux 4 <unknown>: 0
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-test4.sh b/src/tests/run-readelf-test4.sh
new file mode 100755
index 00000000..ca0526a0
--- /dev/null
+++ b/src/tests/run-readelf-test4.sh
@@ -0,0 +1,33 @@
+#! /bin/sh
+# Copyright (C) 2007 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile19.index
+
+testrun_compare ${abs_top_builddir}/src/readelf -c testfile19.index <<\EOF
+
+Index of archive 'testfile19.index' has 4 entries:
+Archive member 'u1.o' contains:
+ a
+Archive member 'u2.o' contains:
+ aa
+Archive member 'u3.o' contains:
+ a
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-twofiles.sh b/src/tests/run-readelf-twofiles.sh
new file mode 100755
index 00000000..46eec7b5
--- /dev/null
+++ b/src/tests/run-readelf-twofiles.sh
@@ -0,0 +1,24 @@
+#! /bin/sh
+# Copyright (C) 2011 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile14
+
+testrun >/dev/null ${abs_top_builddir}/src/readelf -w testfile14 testfile14
+
+exit 0
diff --git a/src/tests/run-readelf-vmcoreinfo.sh b/src/tests/run-readelf-vmcoreinfo.sh
new file mode 100755
index 00000000..b1732fc6
--- /dev/null
+++ b/src/tests/run-readelf-vmcoreinfo.sh
@@ -0,0 +1,114 @@
+#! /bin/sh
+# Copyright (C) 2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile62
+
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile62 <<\EOF
+
+Note segment of 2104 bytes at offset 0x158:
+ Owner Data size Type
+ CORE 336 PRSTATUS
+ info.si_signo: 0, info.si_code: 0, info.si_errno: 0, cursig: 0
+ sigpend: <>
+ sighold: <>
+ pid: 3519, ppid: 0, pgrp: 0, sid: 0
+ utime: 0.000000, stime: 0.000000, cutime: 0.000000, cstime: 0.000000
+ orig_rax: -1, fpvalid: 0
+ r15: 662 r14: 4
+ r13: -2119649152 r12: 0
+ rbp: 0xffff880067e39e48 rbx: 99
+ r11: -131940469531936 r10: -2124150080
+ r9: -131940469531936 r8: 0
+ rax: 16 rcx: 7813
+ rdx: 0 rsi: 0
+ rdi: 99 rip: 0xffffffff812ba86f
+ rflags: 0x0000000000010096 rsp: 0xffff880067e39e48
+ fs.base: 0x00007f95a7b09720 gs.base: 0x0000000000000000
+ cs: 0x0010 ss: 0x0018 ds: 0x0000 es: 0x0000 fs: 0x0000 gs: 0x0000
+ CORE 336 PRSTATUS
+ info.si_signo: 0, info.si_code: 0, info.si_errno: 0, cursig: 0
+ sigpend: <>
+ sighold: <>
+ pid: 0, ppid: 0, pgrp: 0, sid: 0
+ utime: 0.000000, stime: 0.000000, cutime: 0.000000, cstime: 0.000000
+ orig_rax: -1, fpvalid: 0
+ r15: 0 r14: 0
+ r13: 1348173392195389970 r12: 1
+ rbp: 0xffff88007a829e48 rbx: 16
+ r11: -131940468065880 r10: 435505529489
+ r9: 158960 r8: 0
+ rax: 16 rcx: 1
+ rdx: 0 rsi: 3
+ rdi: -131939339960320 rip: 0xffffffff810118bb
+ rflags: 0x0000000000000046 rsp: 0xffff88007a829e38
+ fs.base: 0x0000000000000000 gs.base: 0x0000000000000000
+ cs: 0x0010 ss: 0x0018 ds: 0x0000 es: 0x0000 fs: 0x0000 gs: 0x0000
+ VMCOREINFO 1366 <unknown>: 0
+ OSRELEASE=2.6.35.11-83.fc14.x86_64
+ PAGESIZE=4096
+ SYMBOL(init_uts_ns)=ffffffff81a4c5b0
+ SYMBOL(node_online_map)=ffffffff81b840b0
+ SYMBOL(swapper_pg_dir)=ffffffff81a42000
+ SYMBOL(_stext)=ffffffff81000190
+ SYMBOL(vmlist)=ffffffff81db07e8
+ SYMBOL(mem_section)=ffffffff81dbab00
+ LENGTH(mem_section)=4096
+ SIZE(mem_section)=32
+ OFFSET(mem_section.section_mem_map)=0
+ SIZE(page)=56
+ SIZE(pglist_data)=81664
+ SIZE(zone)=1792
+ SIZE(free_area)=88
+ SIZE(list_head)=16
+ SIZE(nodemask_t)=64
+ OFFSET(page.flags)=0
+ OFFSET(page._count)=8
+ OFFSET(page.mapping)=24
+ OFFSET(page.lru)=40
+ OFFSET(pglist_data.node_zones)=0
+ OFFSET(pglist_data.nr_zones)=81472
+ OFFSET(pglist_data.node_start_pfn)=81496
+ OFFSET(pglist_data.node_spanned_pages)=81512
+ OFFSET(pglist_data.node_id)=81520
+ OFFSET(zone.free_area)=112
+ OFFSET(zone.vm_stat)=1328
+ OFFSET(zone.spanned_pages)=1704
+ OFFSET(free_area.free_list)=0
+ OFFSET(list_head.next)=0
+ OFFSET(list_head.prev)=8
+ OFFSET(vm_struct.addr)=8
+ LENGTH(zone.free_area)=11
+ SYMBOL(log_buf)=ffffffff81a532a8
+ SYMBOL(log_end)=ffffffff81d0bc50
+ SYMBOL(log_buf_len)=ffffffff81a532a4
+ SYMBOL(logged_chars)=ffffffff81d0bd70
+ LENGTH(free_area.free_list)=5
+ NUMBER(NR_FREE_PAGES)=0
+ NUMBER(PG_lru)=5
+ NUMBER(PG_private)=11
+ NUMBER(PG_swapcache)=16
+ SYMBOL(phys_base)=ffffffff81a4a010
+ SYMBOL(init_level4_pgt)=ffffffff81a42000
+ SYMBOL(node_data)=ffffffff81b80df0
+ LENGTH(node_data)=512
+ CRASHTIME=1348173392
+
+EOF
+
+exit 0
diff --git a/src/tests/run-readelf-zdebug.sh b/src/tests/run-readelf-zdebug.sh
new file mode 100755
index 00000000..37cf7eaa
--- /dev/null
+++ b/src/tests/run-readelf-zdebug.sh
@@ -0,0 +1,539 @@
+#! /bin/sh
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# - testfile-zdebug.c
+# #define UINT64_MAX 18446744073709551615UL
+#
+# int
+# main (int argc, char **argv)
+# {
+# unsigned long a = UINT64_MAX - 8;
+# unsigned long b = 42 + argc;
+#
+# if ( a + b < b )
+# argc = a + argc;
+# else
+# b--;
+#
+# return a - b;
+# }
+#
+# gcc -g3 -O3 -fuse-ld=gold -Xlinker --compress-debug-sections=none \
+# -fno-asynchronous-unwind-tables -o testfile-debug testfile-zdebug.c
+# gcc -g3 -O3 -fuse-ld=gold -Xlinker --compress-debug-sections=zlib \
+# -fno-asynchronous-unwind-tables -o testfile-zdebug testfile-zdebug.c
+
+testfiles testfile-debug testfile-zdebug
+tempfiles readelf.out
+tempfiles loc.out aranges.out ranges.out macro.out line.out frame.out
+
+cat > loc.out << \EOF
+
+DWARF section [30] '.debug_loc' at offset 0xa17:
+ [ 0] 0x00000000004003c0..0x00000000004003c3 [ 0] reg5
+ 0x00000000004003c3..0x00000000004003d6 [ 0] breg5 -42
+ [ 2] stack_value
+ 0x00000000004003d6..0x00000000004003d9 [ 0] GNU_entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+EOF
+
+cat loc.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc testfile-debug
+
+cat loc.out | sed -e "s/.debug_loc' at offset 0xa17/.zdebug_loc' at offset 0x1a27/" | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc testfile-zdebug
+
+cat > aranges.out << \EOF
+
+DWARF section [31] '.debug_aranges' at offset 0xa65:
+
+Table at offset 0:
+
+ Length: 44
+ DWARF version: 2
+ CU offset: 0
+ Address size: 8
+ Segment size: 0
+
+ 0x00000000004003c0..0x0000000000000019
+EOF
+
+cat aranges.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=aranges testfile-debug
+
+cat aranges.out | sed -e "s/.debug_aranges' at offset 0xa65/.zdebug_aranges' at offset 0x1a5f/" | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=aranges testfile-zdebug
+
+cat > ranges.out << \EOF
+
+DWARF section [32] '.debug_ranges' at offset 0xa95:
+ [ 0] 0x00000000004003c0..0x00000000004003d9
+EOF
+
+cat ranges.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=ranges testfile-debug
+
+cat ranges.out | sed -e "s/.debug_ranges' at offset 0xa95/.zdebug_ranges' at offset 0x1a87/" | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=ranges testfile-zdebug
+
+cat > macro.out << \EOF
+
+DWARF section [33] '.debug_macro' at offset 0xab5:
+
+ Offset: 0x0
+ Version: 4
+ Flag: 0x2
+ Offset length: 4
+ .debug_line offset: 0x0
+
+ #include offset 0x17
+ start_file 0, [1] /tmp/testfile-zdebug.c
+ #define UINT64_MAX 18446744073709551615UL, line 1 (indirect)
+ end_file
+
+ Offset: 0x17
+ Version: 4
+ Flag: 0x0
+ Offset length: 4
+
+ #define __STDC__ 1, line 1 (indirect)
+ #define __STDC_HOSTED__ 1, line 1 (indirect)
+ #define __GNUC__ 4, line 1 (indirect)
+ #define __GNUC_MINOR__ 8, line 1 (indirect)
+ #define __GNUC_PATCHLEVEL__ 2, line 1 (indirect)
+ #define __VERSION__ "4.8.2 20140120 (Red Hat 4.8.2-15)", line 1 (indirect)
+ #define __GNUC_RH_RELEASE__ 15, line 1 (indirect)
+ #define __ATOMIC_RELAXED 0, line 1 (indirect)
+ #define __ATOMIC_SEQ_CST 5, line 1 (indirect)
+ #define __ATOMIC_ACQUIRE 2, line 1 (indirect)
+ #define __ATOMIC_RELEASE 3, line 1 (indirect)
+ #define __ATOMIC_ACQ_REL 4, line 1 (indirect)
+ #define __ATOMIC_CONSUME 1, line 1 (indirect)
+ #define __OPTIMIZE__ 1, line 1 (indirect)
+ #define __FINITE_MATH_ONLY__ 0, line 1 (indirect)
+ #define _LP64 1, line 1 (indirect)
+ #define __LP64__ 1, line 1 (indirect)
+ #define __SIZEOF_INT__ 4, line 1 (indirect)
+ #define __SIZEOF_LONG__ 8, line 1 (indirect)
+ #define __SIZEOF_LONG_LONG__ 8, line 1 (indirect)
+ #define __SIZEOF_SHORT__ 2, line 1 (indirect)
+ #define __SIZEOF_FLOAT__ 4, line 1 (indirect)
+ #define __SIZEOF_DOUBLE__ 8, line 1 (indirect)
+ #define __SIZEOF_LONG_DOUBLE__ 16, line 1 (indirect)
+ #define __SIZEOF_SIZE_T__ 8, line 1 (indirect)
+ #define __CHAR_BIT__ 8, line 1 (indirect)
+ #define __BIGGEST_ALIGNMENT__ 16, line 1 (indirect)
+ #define __ORDER_LITTLE_ENDIAN__ 1234, line 1 (indirect)
+ #define __ORDER_BIG_ENDIAN__ 4321, line 1 (indirect)
+ #define __ORDER_PDP_ENDIAN__ 3412, line 1 (indirect)
+ #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__, line 1 (indirect)
+ #define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__, line 1 (indirect)
+ #define __SIZEOF_POINTER__ 8, line 1 (indirect)
+ #define __SIZE_TYPE__ long unsigned int, line 1 (indirect)
+ #define __PTRDIFF_TYPE__ long int, line 1 (indirect)
+ #define __WCHAR_TYPE__ int, line 1 (indirect)
+ #define __WINT_TYPE__ unsigned int, line 1 (indirect)
+ #define __INTMAX_TYPE__ long int, line 1 (indirect)
+ #define __UINTMAX_TYPE__ long unsigned int, line 1 (indirect)
+ #define __CHAR16_TYPE__ short unsigned int, line 1 (indirect)
+ #define __CHAR32_TYPE__ unsigned int, line 1 (indirect)
+ #define __SIG_ATOMIC_TYPE__ int, line 1 (indirect)
+ #define __INT8_TYPE__ signed char, line 1 (indirect)
+ #define __INT16_TYPE__ short int, line 1 (indirect)
+ #define __INT32_TYPE__ int, line 1 (indirect)
+ #define __INT64_TYPE__ long int, line 1 (indirect)
+ #define __UINT8_TYPE__ unsigned char, line 1 (indirect)
+ #define __UINT16_TYPE__ short unsigned int, line 1 (indirect)
+ #define __UINT32_TYPE__ unsigned int, line 1 (indirect)
+ #define __UINT64_TYPE__ long unsigned int, line 1 (indirect)
+ #define __INT_LEAST8_TYPE__ signed char, line 1 (indirect)
+ #define __INT_LEAST16_TYPE__ short int, line 1 (indirect)
+ #define __INT_LEAST32_TYPE__ int, line 1 (indirect)
+ #define __INT_LEAST64_TYPE__ long int, line 1 (indirect)
+ #define __UINT_LEAST8_TYPE__ unsigned char, line 1 (indirect)
+ #define __UINT_LEAST16_TYPE__ short unsigned int, line 1 (indirect)
+ #define __UINT_LEAST32_TYPE__ unsigned int, line 1 (indirect)
+ #define __UINT_LEAST64_TYPE__ long unsigned int, line 1 (indirect)
+ #define __INT_FAST8_TYPE__ signed char, line 1 (indirect)
+ #define __INT_FAST16_TYPE__ long int, line 1 (indirect)
+ #define __INT_FAST32_TYPE__ long int, line 1 (indirect)
+ #define __INT_FAST64_TYPE__ long int, line 1 (indirect)
+ #define __UINT_FAST8_TYPE__ unsigned char, line 1 (indirect)
+ #define __UINT_FAST16_TYPE__ long unsigned int, line 1 (indirect)
+ #define __UINT_FAST32_TYPE__ long unsigned int, line 1 (indirect)
+ #define __UINT_FAST64_TYPE__ long unsigned int, line 1 (indirect)
+ #define __INTPTR_TYPE__ long int, line 1 (indirect)
+ #define __UINTPTR_TYPE__ long unsigned int, line 1 (indirect)
+ #define __GXX_ABI_VERSION 1002, line 1 (indirect)
+ #define __SCHAR_MAX__ 127, line 1 (indirect)
+ #define __SHRT_MAX__ 32767, line 1 (indirect)
+ #define __INT_MAX__ 2147483647, line 1 (indirect)
+ #define __LONG_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __LONG_LONG_MAX__ 9223372036854775807LL, line 1 (indirect)
+ #define __WCHAR_MAX__ 2147483647, line 1 (indirect)
+ #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1), line 1 (indirect)
+ #define __WINT_MAX__ 4294967295U, line 1 (indirect)
+ #define __WINT_MIN__ 0U, line 1 (indirect)
+ #define __PTRDIFF_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __SIZE_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __INTMAX_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __INTMAX_C(c) c ## L, line 1 (indirect)
+ #define __UINTMAX_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __UINTMAX_C(c) c ## UL, line 1 (indirect)
+ #define __SIG_ATOMIC_MAX__ 2147483647, line 1 (indirect)
+ #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1), line 1 (indirect)
+ #define __INT8_MAX__ 127, line 1 (indirect)
+ #define __INT16_MAX__ 32767, line 1 (indirect)
+ #define __INT32_MAX__ 2147483647, line 1 (indirect)
+ #define __INT64_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __UINT8_MAX__ 255, line 1 (indirect)
+ #define __UINT16_MAX__ 65535, line 1 (indirect)
+ #define __UINT32_MAX__ 4294967295U, line 1 (indirect)
+ #define __UINT64_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __INT_LEAST8_MAX__ 127, line 1 (indirect)
+ #define __INT8_C(c) c, line 1 (indirect)
+ #define __INT_LEAST16_MAX__ 32767, line 1 (indirect)
+ #define __INT16_C(c) c, line 1 (indirect)
+ #define __INT_LEAST32_MAX__ 2147483647, line 1 (indirect)
+ #define __INT32_C(c) c, line 1 (indirect)
+ #define __INT_LEAST64_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __INT64_C(c) c ## L, line 1 (indirect)
+ #define __UINT_LEAST8_MAX__ 255, line 1 (indirect)
+ #define __UINT8_C(c) c, line 1 (indirect)
+ #define __UINT_LEAST16_MAX__ 65535, line 1 (indirect)
+ #define __UINT16_C(c) c, line 1 (indirect)
+ #define __UINT_LEAST32_MAX__ 4294967295U, line 1 (indirect)
+ #define __UINT32_C(c) c ## U, line 1 (indirect)
+ #define __UINT_LEAST64_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __UINT64_C(c) c ## UL, line 1 (indirect)
+ #define __INT_FAST8_MAX__ 127, line 1 (indirect)
+ #define __INT_FAST16_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __INT_FAST32_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __INT_FAST64_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __UINT_FAST8_MAX__ 255, line 1 (indirect)
+ #define __UINT_FAST16_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __UINT_FAST32_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __UINT_FAST64_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __INTPTR_MAX__ 9223372036854775807L, line 1 (indirect)
+ #define __UINTPTR_MAX__ 18446744073709551615UL, line 1 (indirect)
+ #define __FLT_EVAL_METHOD__ 0, line 1 (indirect)
+ #define __DEC_EVAL_METHOD__ 2, line 1 (indirect)
+ #define __FLT_RADIX__ 2, line 1 (indirect)
+ #define __FLT_MANT_DIG__ 24, line 1 (indirect)
+ #define __FLT_DIG__ 6, line 1 (indirect)
+ #define __FLT_MIN_EXP__ (-125), line 1 (indirect)
+ #define __FLT_MIN_10_EXP__ (-37), line 1 (indirect)
+ #define __FLT_MAX_EXP__ 128, line 1 (indirect)
+ #define __FLT_MAX_10_EXP__ 38, line 1 (indirect)
+ #define __FLT_DECIMAL_DIG__ 9, line 1 (indirect)
+ #define __FLT_MAX__ 3.40282346638528859812e+38F, line 1 (indirect)
+ #define __FLT_MIN__ 1.17549435082228750797e-38F, line 1 (indirect)
+ #define __FLT_EPSILON__ 1.19209289550781250000e-7F, line 1 (indirect)
+ #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F, line 1 (indirect)
+ #define __FLT_HAS_DENORM__ 1, line 1 (indirect)
+ #define __FLT_HAS_INFINITY__ 1, line 1 (indirect)
+ #define __FLT_HAS_QUIET_NAN__ 1, line 1 (indirect)
+ #define __DBL_MANT_DIG__ 53, line 1 (indirect)
+ #define __DBL_DIG__ 15, line 1 (indirect)
+ #define __DBL_MIN_EXP__ (-1021), line 1 (indirect)
+ #define __DBL_MIN_10_EXP__ (-307), line 1 (indirect)
+ #define __DBL_MAX_EXP__ 1024, line 1 (indirect)
+ #define __DBL_MAX_10_EXP__ 308, line 1 (indirect)
+ #define __DBL_DECIMAL_DIG__ 17, line 1 (indirect)
+ #define __DBL_MAX__ ((double)1.79769313486231570815e+308L), line 1 (indirect)
+ #define __DBL_MIN__ ((double)2.22507385850720138309e-308L), line 1 (indirect)
+ #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L), line 1 (indirect)
+ #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L), line 1 (indirect)
+ #define __DBL_HAS_DENORM__ 1, line 1 (indirect)
+ #define __DBL_HAS_INFINITY__ 1, line 1 (indirect)
+ #define __DBL_HAS_QUIET_NAN__ 1, line 1 (indirect)
+ #define __LDBL_MANT_DIG__ 64, line 1 (indirect)
+ #define __LDBL_DIG__ 18, line 1 (indirect)
+ #define __LDBL_MIN_EXP__ (-16381), line 1 (indirect)
+ #define __LDBL_MIN_10_EXP__ (-4931), line 1 (indirect)
+ #define __LDBL_MAX_EXP__ 16384, line 1 (indirect)
+ #define __LDBL_MAX_10_EXP__ 4932, line 1 (indirect)
+ #define __DECIMAL_DIG__ 21, line 1 (indirect)
+ #define __LDBL_MAX__ 1.18973149535723176502e+4932L, line 1 (indirect)
+ #define __LDBL_MIN__ 3.36210314311209350626e-4932L, line 1 (indirect)
+ #define __LDBL_EPSILON__ 1.08420217248550443401e-19L, line 1 (indirect)
+ #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L, line 1 (indirect)
+ #define __LDBL_HAS_DENORM__ 1, line 1 (indirect)
+ #define __LDBL_HAS_INFINITY__ 1, line 1 (indirect)
+ #define __LDBL_HAS_QUIET_NAN__ 1, line 1 (indirect)
+ #define __DEC32_MANT_DIG__ 7, line 1 (indirect)
+ #define __DEC32_MIN_EXP__ (-94), line 1 (indirect)
+ #define __DEC32_MAX_EXP__ 97, line 1 (indirect)
+ #define __DEC32_MIN__ 1E-95DF, line 1 (indirect)
+ #define __DEC32_MAX__ 9.999999E96DF, line 1 (indirect)
+ #define __DEC32_EPSILON__ 1E-6DF, line 1 (indirect)
+ #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF, line 1 (indirect)
+ #define __DEC64_MANT_DIG__ 16, line 1 (indirect)
+ #define __DEC64_MIN_EXP__ (-382), line 1 (indirect)
+ #define __DEC64_MAX_EXP__ 385, line 1 (indirect)
+ #define __DEC64_MIN__ 1E-383DD, line 1 (indirect)
+ #define __DEC64_MAX__ 9.999999999999999E384DD, line 1 (indirect)
+ #define __DEC64_EPSILON__ 1E-15DD, line 1 (indirect)
+ #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD, line 1 (indirect)
+ #define __DEC128_MANT_DIG__ 34, line 1 (indirect)
+ #define __DEC128_MIN_EXP__ (-6142), line 1 (indirect)
+ #define __DEC128_MAX_EXP__ 6145, line 1 (indirect)
+ #define __DEC128_MIN__ 1E-6143DL, line 1 (indirect)
+ #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL, line 1 (indirect)
+ #define __DEC128_EPSILON__ 1E-33DL, line 1 (indirect)
+ #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL, line 1 (indirect)
+ #define __REGISTER_PREFIX__ , line 1 (indirect)
+ #define __USER_LABEL_PREFIX__ , line 1 (indirect)
+ #define __GNUC_GNU_INLINE__ 1, line 1 (indirect)
+ #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1, line 1 (indirect)
+ #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1, line 1 (indirect)
+ #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1, line 1 (indirect)
+ #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1, line 1 (indirect)
+ #define __GCC_ATOMIC_BOOL_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_CHAR_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_SHORT_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_INT_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_LONG_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_LLONG_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1, line 1 (indirect)
+ #define __GCC_ATOMIC_POINTER_LOCK_FREE 2, line 1 (indirect)
+ #define __GCC_HAVE_DWARF2_CFI_ASM 1, line 1 (indirect)
+ #define __PRAGMA_REDEFINE_EXTNAME 1, line 1 (indirect)
+ #define __SIZEOF_INT128__ 16, line 1 (indirect)
+ #define __SIZEOF_WCHAR_T__ 4, line 1 (indirect)
+ #define __SIZEOF_WINT_T__ 4, line 1 (indirect)
+ #define __SIZEOF_PTRDIFF_T__ 8, line 1 (indirect)
+ #define __amd64 1, line 1 (indirect)
+ #define __amd64__ 1, line 1 (indirect)
+ #define __x86_64 1, line 1 (indirect)
+ #define __x86_64__ 1, line 1 (indirect)
+ #define __ATOMIC_HLE_ACQUIRE 65536, line 1 (indirect)
+ #define __ATOMIC_HLE_RELEASE 131072, line 1 (indirect)
+ #define __k8 1, line 1 (indirect)
+ #define __k8__ 1, line 1 (indirect)
+ #define __code_model_small__ 1, line 1 (indirect)
+ #define __MMX__ 1, line 1 (indirect)
+ #define __SSE__ 1, line 1 (indirect)
+ #define __SSE2__ 1, line 1 (indirect)
+ #define __FXSR__ 1, line 1 (indirect)
+ #define __SSE_MATH__ 1, line 1 (indirect)
+ #define __SSE2_MATH__ 1, line 1 (indirect)
+ #define __gnu_linux__ 1, line 1 (indirect)
+ #define __linux 1, line 1 (indirect)
+ #define __linux__ 1, line 1 (indirect)
+ #define linux 1, line 1 (indirect)
+ #define __unix 1, line 1 (indirect)
+ #define __unix__ 1, line 1 (indirect)
+ #define unix 1, line 1 (indirect)
+ #define __ELF__ 1, line 1 (indirect)
+ #define __DECIMAL_BID_FORMAT__ 1, line 1 (indirect)
+
+EOF
+
+cat macro.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=macro testfile-debug
+
+cat macro.out | sed -e "s/.debug_macro' at offset 0xab5/.zdebug_macro' at offset 0x1aa7/" | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=macro testfile-zdebug
+
+cat > line.out << \EOF
+
+DWARF section [34] '.debug_line' at offset 0x104c:
+
+Table at offset 0:
+
+ Length: 70
+ DWARF version: 2
+ Prologue length: 40
+ Minimum instruction length: 1
+ Maximum operations per instruction: 1
+ Initial value if 'is_stmt': 1
+ Line base: -5
+ Line range: 14
+ Opcode base: 13
+
+Opcodes:
+ [ 1] 0 arguments
+ [ 2] 1 argument
+ [ 3] 1 argument
+ [ 4] 1 argument
+ [ 5] 1 argument
+ [ 6] 0 arguments
+ [ 7] 0 arguments
+ [ 8] 0 arguments
+ [ 9] 1 argument
+ [10] 0 arguments
+ [11] 0 arguments
+ [12] 1 argument
+
+Directory table:
+
+File name table:
+ Entry Dir Time Size Name
+ 1 0 0 0 testfile-zdebug.c
+
+Line number statements:
+ [ 32] extended opcode 2: set address to 0x4003c0
+ [ 3d] special opcode 22: address+0 = 0x4003c0, line+4 = 5
+ [ 3e] special opcode 20: address+0 = 0x4003c0, line+2 = 7
+ [ 3f] special opcode 104: address+6 = 0x4003c6, line+2 = 9
+ [ 40] special opcode 77: address+4 = 0x4003ca, line+3 = 12
+ [ 41] special opcode 62: address+3 = 0x4003cd, line+2 = 14
+ [ 42] special opcode 86: address+5 = 0x4003d2, line-2 = 12
+ [ 43] special opcode 76: address+4 = 0x4003d6, line+2 = 14
+ [ 44] special opcode 47: address+2 = 0x4003d8, line+1 = 15
+ [ 45] advance address by 1 to 0x4003d9
+ [ 47] extended opcode 1: end of sequence
+EOF
+
+cat line.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=line testfile-debug
+
+cat line.out | sed -e "s/.debug_line' at offset 0x104c/.zdebug_line' at offset 0x1d53/" | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=line testfile-zdebug
+
+
+cat > frame.out << \EOF
+
+Call frame information section [16] '.eh_frame' at offset 0x5b8:
+
+ [ 0] CIE length=20
+ CIE_id: 0
+ version: 1
+ augmentation: "zR"
+ code_alignment_factor: 1
+ data_alignment_factor: -8
+ return_address_register: 16
+ Augmentation data: 0x1b (FDE address encoding: sdata4 pcrel)
+
+ Program:
+ def_cfa r7 (rsp) at offset 8
+ offset r16 (rip) at cfa-8
+ nop
+ nop
+
+ [ 18] FDE length=20 cie=[ 0]
+ CIE_pointer: 28
+ initial_location: 0x00000000ffffff08 (offset: 0x4e0)
+ address_range: 0x2 (end offset: 0x4e2)
+
+ Program:
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+
+ [ 30] FDE length=44 cie=[ 0]
+ CIE_pointer: 52
+ initial_location: 0x00000000ffffff00 (offset: 0x4f0)
+ address_range: 0x89 (end offset: 0x579)
+
+ Program:
+ advance_loc 17 to 0x501
+ offset r12 (r12) at cfa-40
+ offset r6 (rbp) at cfa-48
+ advance_loc 31 to 0x520
+ def_cfa_offset 64
+ offset r3 (rbx) at cfa-56
+ offset r15 (r15) at cfa-16
+ offset r14 (r14) at cfa-24
+ offset r13 (r13) at cfa-32
+ advance_loc1 88 to 0x578
+ def_cfa_offset 8
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+
+ [ 60] FDE length=36 cie=[ 0]
+ CIE_pointer: 100
+ initial_location: 0x00000000fffffd80 (offset: 0x3a0)
+ address_range: 0x20 (end offset: 0x3c0)
+
+ Program:
+ def_cfa_offset 16
+ advance_loc 6 to 0x3a6
+ def_cfa_offset 24
+ advance_loc 10 to 0x3b0
+ def_cfa_expression 11
+ [ 0] breg7 8
+ [ 2] breg16 0
+ [ 4] lit15
+ [ 5] and
+ [ 6] lit11
+ [ 7] ge
+ [ 8] lit3
+ [ 9] shl
+ [ 10] plus
+ nop
+ nop
+ nop
+ nop
+
+ [ 88] Zero terminator
+
+Call frame search table section [17] '.eh_frame_hdr':
+ version: 1
+ eh_frame_ptr_enc: 0x1b (sdata4 pcrel)
+ fde_count_enc: 0x3 (udata4)
+ table_enc: 0x3b (sdata4 datarel)
+ eh_frame_ptr: 0xffffffffffffff70 (offset: 0x5b8)
+ fde_count: 3
+ Table:
+ 0xfffffd5c (offset: 0x3a0) -> 0xffffffd4 fde=[ 60]
+ 0xfffffe9c (offset: 0x4e0) -> 0xffffff8c fde=[ 18]
+ 0xfffffeac (offset: 0x4f0) -> 0xffffffa4 fde=[ 30]
+
+DWARF section [36] '.debug_frame' at offset 0x29b8:
+
+ [ 0] CIE length=20
+ CIE_id: 18446744073709551615
+ version: 1
+ augmentation: ""
+ code_alignment_factor: 1
+ data_alignment_factor: -8
+ return_address_register: 16
+
+ Program:
+ def_cfa r7 (rsp) at offset 8
+ offset r16 (rip) at cfa-8
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+
+ [ 18] FDE length=20 cie=[ 0]
+ CIE_pointer: 0
+ initial_location: 0x00000000004003c0
+ address_range: 0x19
+
+ Program:
+EOF
+
+cat frame.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=frame testfile-debug
+
+cat frame.out | sed -e "s/.debug_frame' at offset 0x29b8/.zdebug_frame' at offset 0x2728/" | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=frame testfile-zdebug
+
+
diff --git a/src/tests/run-rerequest_tag.sh b/src/tests/run-rerequest_tag.sh
new file mode 100755
index 00000000..f4372847
--- /dev/null
+++ b/src/tests/run-rerequest_tag.sh
@@ -0,0 +1,25 @@
+#! /bin/sh
+# Copyright (C) 2011 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile56 testfile57
+
+testrun ${abs_builddir}/rerequest_tag testfile56
+testrun ${abs_builddir}/rerequest_tag testfile57
+
+exit 0
diff --git a/src/tests/run-show-abbrev.sh b/src/tests/run-show-abbrev.sh
new file mode 100755
index 00000000..40d0e362
--- /dev/null
+++ b/src/tests/run-show-abbrev.sh
@@ -0,0 +1,352 @@
+#! /bin/sh
+# Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile2
+
+testrun_compare ${abs_builddir}/show-abbrev testfile testfile2 <<\EOF
+abbrev[0]: code = 1, tag = 17, children = 1
+abbrev[0]: attr[0]: code = 16, form = 6, offset = 0
+abbrev[0]: attr[1]: code = 18, form = 1, offset = 2
+abbrev[0]: attr[2]: code = 17, form = 1, offset = 4
+abbrev[0]: attr[3]: code = 3, form = 8, offset = 6
+abbrev[0]: attr[4]: code = 27, form = 8, offset = 8
+abbrev[0]: attr[5]: code = 37, form = 8, offset = 10
+abbrev[0]: attr[6]: code = 19, form = 11, offset = 12
+abbrev[19]: code = 2, tag = 46, children = 1
+abbrev[19]: attr[0]: code = 1, form = 19, offset = 19
+abbrev[19]: attr[1]: code = 63, form = 12, offset = 21
+abbrev[19]: attr[2]: code = 3, form = 8, offset = 23
+abbrev[19]: attr[3]: code = 58, form = 11, offset = 25
+abbrev[19]: attr[4]: code = 59, form = 11, offset = 27
+abbrev[19]: attr[5]: code = 39, form = 12, offset = 29
+abbrev[19]: attr[6]: code = 73, form = 19, offset = 31
+abbrev[19]: attr[7]: code = 17, form = 1, offset = 33
+abbrev[19]: attr[8]: code = 18, form = 1, offset = 35
+abbrev[19]: attr[9]: code = 64, form = 10, offset = 37
+abbrev[44]: code = 3, tag = 46, children = 1
+abbrev[44]: attr[0]: code = 1, form = 19, offset = 44
+abbrev[44]: attr[1]: code = 63, form = 12, offset = 46
+abbrev[44]: attr[2]: code = 3, form = 8, offset = 48
+abbrev[44]: attr[3]: code = 58, form = 11, offset = 50
+abbrev[44]: attr[4]: code = 59, form = 11, offset = 52
+abbrev[44]: attr[5]: code = 73, form = 19, offset = 54
+abbrev[44]: attr[6]: code = 60, form = 12, offset = 56
+abbrev[63]: code = 4, tag = 24, children = 0
+abbrev[68]: code = 5, tag = 46, children = 1
+abbrev[68]: attr[0]: code = 63, form = 12, offset = 68
+abbrev[68]: attr[1]: code = 3, form = 8, offset = 70
+abbrev[68]: attr[2]: code = 58, form = 11, offset = 72
+abbrev[68]: attr[3]: code = 59, form = 11, offset = 74
+abbrev[68]: attr[4]: code = 73, form = 19, offset = 76
+abbrev[68]: attr[5]: code = 60, form = 12, offset = 78
+abbrev[85]: code = 6, tag = 36, children = 0
+abbrev[85]: attr[0]: code = 3, form = 8, offset = 85
+abbrev[85]: attr[1]: code = 11, form = 11, offset = 87
+abbrev[85]: attr[2]: code = 62, form = 11, offset = 89
+abbrev[96]: code = 7, tag = 52, children = 0
+abbrev[96]: attr[0]: code = 3, form = 8, offset = 96
+abbrev[96]: attr[1]: code = 58, form = 11, offset = 98
+abbrev[96]: attr[2]: code = 59, form = 11, offset = 100
+abbrev[96]: attr[3]: code = 73, form = 19, offset = 102
+abbrev[96]: attr[4]: code = 63, form = 12, offset = 104
+abbrev[96]: attr[5]: code = 2, form = 10, offset = 106
+abbrev[0]: code = 1, tag = 17, children = 1
+abbrev[0]: attr[0]: code = 16, form = 6, offset = 114
+abbrev[0]: attr[1]: code = 18, form = 1, offset = 116
+abbrev[0]: attr[2]: code = 17, form = 1, offset = 118
+abbrev[0]: attr[3]: code = 3, form = 8, offset = 120
+abbrev[0]: attr[4]: code = 27, form = 8, offset = 122
+abbrev[0]: attr[5]: code = 37, form = 8, offset = 124
+abbrev[0]: attr[6]: code = 19, form = 11, offset = 126
+abbrev[19]: code = 2, tag = 46, children = 0
+abbrev[19]: attr[0]: code = 63, form = 12, offset = 133
+abbrev[19]: attr[1]: code = 3, form = 8, offset = 135
+abbrev[19]: attr[2]: code = 58, form = 11, offset = 137
+abbrev[19]: attr[3]: code = 59, form = 11, offset = 139
+abbrev[19]: attr[4]: code = 39, form = 12, offset = 141
+abbrev[19]: attr[5]: code = 73, form = 19, offset = 143
+abbrev[19]: attr[6]: code = 17, form = 1, offset = 145
+abbrev[19]: attr[7]: code = 18, form = 1, offset = 147
+abbrev[19]: attr[8]: code = 64, form = 10, offset = 149
+abbrev[42]: code = 3, tag = 36, children = 0
+abbrev[42]: attr[0]: code = 3, form = 8, offset = 156
+abbrev[42]: attr[1]: code = 11, form = 11, offset = 158
+abbrev[42]: attr[2]: code = 62, form = 11, offset = 160
+abbrev[53]: code = 4, tag = 22, children = 0
+abbrev[53]: attr[0]: code = 3, form = 8, offset = 167
+abbrev[53]: attr[1]: code = 58, form = 11, offset = 169
+abbrev[53]: attr[2]: code = 59, form = 11, offset = 171
+abbrev[53]: attr[3]: code = 73, form = 19, offset = 173
+abbrev[66]: code = 5, tag = 15, children = 0
+abbrev[66]: attr[0]: code = 11, form = 11, offset = 180
+abbrev[73]: code = 6, tag = 15, children = 0
+abbrev[73]: attr[0]: code = 11, form = 11, offset = 187
+abbrev[73]: attr[1]: code = 73, form = 19, offset = 189
+abbrev[82]: code = 7, tag = 19, children = 1
+abbrev[82]: attr[0]: code = 1, form = 19, offset = 196
+abbrev[82]: attr[1]: code = 11, form = 11, offset = 198
+abbrev[82]: attr[2]: code = 58, form = 11, offset = 200
+abbrev[82]: attr[3]: code = 59, form = 11, offset = 202
+abbrev[95]: code = 8, tag = 13, children = 0
+abbrev[95]: attr[0]: code = 3, form = 8, offset = 209
+abbrev[95]: attr[1]: code = 58, form = 11, offset = 211
+abbrev[95]: attr[2]: code = 59, form = 11, offset = 213
+abbrev[95]: attr[3]: code = 73, form = 19, offset = 215
+abbrev[95]: attr[4]: code = 56, form = 10, offset = 217
+abbrev[110]: code = 9, tag = 1, children = 1
+abbrev[110]: attr[0]: code = 1, form = 19, offset = 224
+abbrev[110]: attr[1]: code = 73, form = 19, offset = 226
+abbrev[119]: code = 10, tag = 33, children = 0
+abbrev[119]: attr[0]: code = 73, form = 19, offset = 233
+abbrev[119]: attr[1]: code = 47, form = 11, offset = 235
+abbrev[128]: code = 11, tag = 19, children = 1
+abbrev[128]: attr[0]: code = 1, form = 19, offset = 242
+abbrev[128]: attr[1]: code = 3, form = 8, offset = 244
+abbrev[128]: attr[2]: code = 11, form = 11, offset = 246
+abbrev[128]: attr[3]: code = 58, form = 11, offset = 248
+abbrev[128]: attr[4]: code = 59, form = 11, offset = 250
+abbrev[143]: code = 12, tag = 19, children = 0
+abbrev[143]: attr[0]: code = 3, form = 8, offset = 257
+abbrev[143]: attr[1]: code = 60, form = 12, offset = 259
+abbrev[152]: code = 13, tag = 13, children = 0
+abbrev[152]: attr[0]: code = 3, form = 8, offset = 266
+abbrev[152]: attr[1]: code = 58, form = 11, offset = 268
+abbrev[152]: attr[2]: code = 59, form = 5, offset = 270
+abbrev[152]: attr[3]: code = 73, form = 19, offset = 272
+abbrev[152]: attr[4]: code = 56, form = 10, offset = 274
+abbrev[167]: code = 14, tag = 22, children = 0
+abbrev[167]: attr[0]: code = 3, form = 8, offset = 281
+abbrev[167]: attr[1]: code = 58, form = 11, offset = 283
+abbrev[167]: attr[2]: code = 59, form = 5, offset = 285
+abbrev[167]: attr[3]: code = 73, form = 19, offset = 287
+abbrev[180]: code = 15, tag = 23, children = 1
+abbrev[180]: attr[0]: code = 1, form = 19, offset = 294
+abbrev[180]: attr[1]: code = 11, form = 11, offset = 296
+abbrev[180]: attr[2]: code = 58, form = 11, offset = 298
+abbrev[180]: attr[3]: code = 59, form = 11, offset = 300
+abbrev[193]: code = 16, tag = 13, children = 0
+abbrev[193]: attr[0]: code = 3, form = 8, offset = 307
+abbrev[193]: attr[1]: code = 58, form = 11, offset = 309
+abbrev[193]: attr[2]: code = 59, form = 11, offset = 311
+abbrev[193]: attr[3]: code = 73, form = 19, offset = 313
+abbrev[206]: code = 17, tag = 4, children = 1
+abbrev[206]: attr[0]: code = 1, form = 19, offset = 320
+abbrev[206]: attr[1]: code = 11, form = 11, offset = 322
+abbrev[206]: attr[2]: code = 58, form = 11, offset = 324
+abbrev[206]: attr[3]: code = 59, form = 11, offset = 326
+abbrev[219]: code = 18, tag = 40, children = 0
+abbrev[219]: attr[0]: code = 3, form = 8, offset = 333
+abbrev[219]: attr[1]: code = 28, form = 11, offset = 335
+abbrev[228]: code = 19, tag = 38, children = 0
+abbrev[228]: attr[0]: code = 73, form = 19, offset = 342
+abbrev[235]: code = 20, tag = 21, children = 1
+abbrev[235]: attr[0]: code = 1, form = 19, offset = 349
+abbrev[235]: attr[1]: code = 39, form = 12, offset = 351
+abbrev[235]: attr[2]: code = 73, form = 19, offset = 353
+abbrev[246]: code = 21, tag = 5, children = 0
+abbrev[246]: attr[0]: code = 73, form = 19, offset = 360
+abbrev[253]: code = 22, tag = 21, children = 1
+abbrev[253]: attr[0]: code = 1, form = 19, offset = 367
+abbrev[253]: attr[1]: code = 39, form = 12, offset = 369
+abbrev[262]: code = 23, tag = 33, children = 0
+abbrev[262]: attr[0]: code = 73, form = 19, offset = 376
+abbrev[262]: attr[1]: code = 47, form = 6, offset = 378
+abbrev[271]: code = 24, tag = 22, children = 0
+abbrev[271]: attr[0]: code = 3, form = 8, offset = 385
+abbrev[271]: attr[1]: code = 58, form = 11, offset = 387
+abbrev[271]: attr[2]: code = 59, form = 11, offset = 389
+abbrev[282]: code = 25, tag = 4, children = 1
+abbrev[282]: attr[0]: code = 1, form = 19, offset = 396
+abbrev[282]: attr[1]: code = 3, form = 8, offset = 398
+abbrev[282]: attr[2]: code = 11, form = 11, offset = 400
+abbrev[282]: attr[3]: code = 58, form = 11, offset = 402
+abbrev[282]: attr[4]: code = 59, form = 11, offset = 404
+abbrev[0]: code = 1, tag = 17, children = 1
+abbrev[0]: attr[0]: code = 16, form = 6, offset = 412
+abbrev[0]: attr[1]: code = 18, form = 1, offset = 414
+abbrev[0]: attr[2]: code = 17, form = 1, offset = 416
+abbrev[0]: attr[3]: code = 3, form = 8, offset = 418
+abbrev[0]: attr[4]: code = 27, form = 8, offset = 420
+abbrev[0]: attr[5]: code = 37, form = 8, offset = 422
+abbrev[0]: attr[6]: code = 19, form = 11, offset = 424
+abbrev[19]: code = 2, tag = 46, children = 0
+abbrev[19]: attr[0]: code = 63, form = 12, offset = 431
+abbrev[19]: attr[1]: code = 3, form = 8, offset = 433
+abbrev[19]: attr[2]: code = 58, form = 11, offset = 435
+abbrev[19]: attr[3]: code = 59, form = 11, offset = 437
+abbrev[19]: attr[4]: code = 39, form = 12, offset = 439
+abbrev[19]: attr[5]: code = 73, form = 19, offset = 441
+abbrev[19]: attr[6]: code = 17, form = 1, offset = 443
+abbrev[19]: attr[7]: code = 18, form = 1, offset = 445
+abbrev[19]: attr[8]: code = 64, form = 10, offset = 447
+abbrev[42]: code = 3, tag = 36, children = 0
+abbrev[42]: attr[0]: code = 3, form = 8, offset = 454
+abbrev[42]: attr[1]: code = 11, form = 11, offset = 456
+abbrev[42]: attr[2]: code = 62, form = 11, offset = 458
+abbrev[0]: code = 1, tag = 17, children = 1
+abbrev[0]: attr[0]: code = 16, form = 6, offset = 0
+abbrev[0]: attr[1]: code = 18, form = 1, offset = 2
+abbrev[0]: attr[2]: code = 17, form = 1, offset = 4
+abbrev[0]: attr[3]: code = 3, form = 8, offset = 6
+abbrev[0]: attr[4]: code = 27, form = 8, offset = 8
+abbrev[0]: attr[5]: code = 37, form = 8, offset = 10
+abbrev[0]: attr[6]: code = 19, form = 11, offset = 12
+abbrev[19]: code = 2, tag = 46, children = 0
+abbrev[19]: attr[0]: code = 63, form = 12, offset = 19
+abbrev[19]: attr[1]: code = 3, form = 8, offset = 21
+abbrev[19]: attr[2]: code = 58, form = 11, offset = 23
+abbrev[19]: attr[3]: code = 59, form = 11, offset = 25
+abbrev[19]: attr[4]: code = 39, form = 12, offset = 27
+abbrev[19]: attr[5]: code = 73, form = 19, offset = 29
+abbrev[19]: attr[6]: code = 17, form = 1, offset = 31
+abbrev[19]: attr[7]: code = 18, form = 1, offset = 33
+abbrev[19]: attr[8]: code = 64, form = 10, offset = 35
+abbrev[42]: code = 3, tag = 36, children = 0
+abbrev[42]: attr[0]: code = 3, form = 8, offset = 42
+abbrev[42]: attr[1]: code = 11, form = 11, offset = 44
+abbrev[42]: attr[2]: code = 62, form = 11, offset = 46
+abbrev[53]: code = 4, tag = 22, children = 0
+abbrev[53]: attr[0]: code = 3, form = 8, offset = 53
+abbrev[53]: attr[1]: code = 58, form = 11, offset = 55
+abbrev[53]: attr[2]: code = 59, form = 11, offset = 57
+abbrev[53]: attr[3]: code = 73, form = 19, offset = 59
+abbrev[66]: code = 5, tag = 1, children = 1
+abbrev[66]: attr[0]: code = 1, form = 19, offset = 66
+abbrev[66]: attr[1]: code = 3, form = 8, offset = 68
+abbrev[66]: attr[2]: code = 73, form = 19, offset = 70
+abbrev[77]: code = 6, tag = 33, children = 0
+abbrev[77]: attr[0]: code = 73, form = 19, offset = 77
+abbrev[77]: attr[1]: code = 47, form = 11, offset = 79
+abbrev[86]: code = 7, tag = 19, children = 1
+abbrev[86]: attr[0]: code = 1, form = 19, offset = 86
+abbrev[86]: attr[1]: code = 3, form = 8, offset = 88
+abbrev[86]: attr[2]: code = 11, form = 11, offset = 90
+abbrev[86]: attr[3]: code = 58, form = 11, offset = 92
+abbrev[86]: attr[4]: code = 59, form = 11, offset = 94
+abbrev[101]: code = 8, tag = 13, children = 0
+abbrev[101]: attr[0]: code = 3, form = 8, offset = 101
+abbrev[101]: attr[1]: code = 58, form = 11, offset = 103
+abbrev[101]: attr[2]: code = 59, form = 11, offset = 105
+abbrev[101]: attr[3]: code = 73, form = 19, offset = 107
+abbrev[101]: attr[4]: code = 56, form = 10, offset = 109
+abbrev[116]: code = 9, tag = 15, children = 0
+abbrev[116]: attr[0]: code = 11, form = 11, offset = 116
+abbrev[123]: code = 10, tag = 15, children = 0
+abbrev[123]: attr[0]: code = 11, form = 11, offset = 123
+abbrev[123]: attr[1]: code = 73, form = 19, offset = 125
+abbrev[132]: code = 11, tag = 19, children = 1
+abbrev[132]: attr[0]: code = 1, form = 19, offset = 132
+abbrev[132]: attr[1]: code = 11, form = 11, offset = 134
+abbrev[132]: attr[2]: code = 58, form = 11, offset = 136
+abbrev[132]: attr[3]: code = 59, form = 11, offset = 138
+abbrev[145]: code = 12, tag = 1, children = 1
+abbrev[145]: attr[0]: code = 1, form = 19, offset = 145
+abbrev[145]: attr[1]: code = 73, form = 19, offset = 147
+abbrev[154]: code = 13, tag = 22, children = 0
+abbrev[154]: attr[0]: code = 3, form = 8, offset = 154
+abbrev[154]: attr[1]: code = 58, form = 11, offset = 156
+abbrev[154]: attr[2]: code = 59, form = 5, offset = 158
+abbrev[154]: attr[3]: code = 73, form = 19, offset = 160
+abbrev[167]: code = 14, tag = 19, children = 0
+abbrev[167]: attr[0]: code = 3, form = 8, offset = 167
+abbrev[167]: attr[1]: code = 60, form = 12, offset = 169
+abbrev[176]: code = 15, tag = 22, children = 0
+abbrev[176]: attr[0]: code = 3, form = 8, offset = 176
+abbrev[176]: attr[1]: code = 58, form = 11, offset = 178
+abbrev[176]: attr[2]: code = 59, form = 11, offset = 180
+abbrev[187]: code = 16, tag = 21, children = 1
+abbrev[187]: attr[0]: code = 1, form = 19, offset = 187
+abbrev[187]: attr[1]: code = 39, form = 12, offset = 189
+abbrev[187]: attr[2]: code = 73, form = 19, offset = 191
+abbrev[198]: code = 17, tag = 5, children = 0
+abbrev[198]: attr[0]: code = 73, form = 19, offset = 198
+abbrev[205]: code = 18, tag = 38, children = 0
+abbrev[205]: attr[0]: code = 73, form = 19, offset = 205
+abbrev[0]: code = 1, tag = 17, children = 1
+abbrev[0]: attr[0]: code = 16, form = 6, offset = 213
+abbrev[0]: attr[1]: code = 18, form = 1, offset = 215
+abbrev[0]: attr[2]: code = 17, form = 1, offset = 217
+abbrev[0]: attr[3]: code = 3, form = 8, offset = 219
+abbrev[0]: attr[4]: code = 27, form = 8, offset = 221
+abbrev[0]: attr[5]: code = 37, form = 8, offset = 223
+abbrev[0]: attr[6]: code = 19, form = 11, offset = 225
+abbrev[19]: code = 2, tag = 46, children = 0
+abbrev[19]: attr[0]: code = 63, form = 12, offset = 232
+abbrev[19]: attr[1]: code = 3, form = 8, offset = 234
+abbrev[19]: attr[2]: code = 58, form = 11, offset = 236
+abbrev[19]: attr[3]: code = 59, form = 11, offset = 238
+abbrev[19]: attr[4]: code = 39, form = 12, offset = 240
+abbrev[19]: attr[5]: code = 73, form = 19, offset = 242
+abbrev[19]: attr[6]: code = 17, form = 1, offset = 244
+abbrev[19]: attr[7]: code = 18, form = 1, offset = 246
+abbrev[19]: attr[8]: code = 64, form = 10, offset = 248
+abbrev[42]: code = 3, tag = 36, children = 0
+abbrev[42]: attr[0]: code = 3, form = 8, offset = 255
+abbrev[42]: attr[1]: code = 11, form = 11, offset = 257
+abbrev[42]: attr[2]: code = 62, form = 11, offset = 259
+abbrev[0]: code = 1, tag = 17, children = 1
+abbrev[0]: attr[0]: code = 16, form = 6, offset = 267
+abbrev[0]: attr[1]: code = 18, form = 1, offset = 269
+abbrev[0]: attr[2]: code = 17, form = 1, offset = 271
+abbrev[0]: attr[3]: code = 3, form = 8, offset = 273
+abbrev[0]: attr[4]: code = 27, form = 8, offset = 275
+abbrev[0]: attr[5]: code = 37, form = 8, offset = 277
+abbrev[0]: attr[6]: code = 19, form = 11, offset = 279
+abbrev[19]: code = 2, tag = 46, children = 1
+abbrev[19]: attr[0]: code = 1, form = 19, offset = 286
+abbrev[19]: attr[1]: code = 63, form = 12, offset = 288
+abbrev[19]: attr[2]: code = 3, form = 8, offset = 290
+abbrev[19]: attr[3]: code = 58, form = 11, offset = 292
+abbrev[19]: attr[4]: code = 59, form = 11, offset = 294
+abbrev[19]: attr[5]: code = 39, form = 12, offset = 296
+abbrev[19]: attr[6]: code = 73, form = 19, offset = 298
+abbrev[19]: attr[7]: code = 17, form = 1, offset = 300
+abbrev[19]: attr[8]: code = 18, form = 1, offset = 302
+abbrev[19]: attr[9]: code = 64, form = 10, offset = 304
+abbrev[44]: code = 3, tag = 46, children = 1
+abbrev[44]: attr[0]: code = 1, form = 19, offset = 311
+abbrev[44]: attr[1]: code = 63, form = 12, offset = 313
+abbrev[44]: attr[2]: code = 3, form = 8, offset = 315
+abbrev[44]: attr[3]: code = 58, form = 11, offset = 317
+abbrev[44]: attr[4]: code = 59, form = 11, offset = 319
+abbrev[44]: attr[5]: code = 73, form = 19, offset = 321
+abbrev[44]: attr[6]: code = 60, form = 12, offset = 323
+abbrev[63]: code = 4, tag = 24, children = 0
+abbrev[68]: code = 5, tag = 46, children = 1
+abbrev[68]: attr[0]: code = 63, form = 12, offset = 335
+abbrev[68]: attr[1]: code = 3, form = 8, offset = 337
+abbrev[68]: attr[2]: code = 58, form = 11, offset = 339
+abbrev[68]: attr[3]: code = 59, form = 11, offset = 341
+abbrev[68]: attr[4]: code = 73, form = 19, offset = 343
+abbrev[68]: attr[5]: code = 60, form = 12, offset = 345
+abbrev[85]: code = 6, tag = 36, children = 0
+abbrev[85]: attr[0]: code = 3, form = 8, offset = 352
+abbrev[85]: attr[1]: code = 11, form = 11, offset = 354
+abbrev[85]: attr[2]: code = 62, form = 11, offset = 356
+abbrev[96]: code = 7, tag = 52, children = 0
+abbrev[96]: attr[0]: code = 3, form = 8, offset = 363
+abbrev[96]: attr[1]: code = 58, form = 11, offset = 365
+abbrev[96]: attr[2]: code = 59, form = 11, offset = 367
+abbrev[96]: attr[3]: code = 73, form = 19, offset = 369
+abbrev[96]: attr[4]: code = 63, form = 12, offset = 371
+abbrev[96]: attr[5]: code = 2, form = 10, offset = 373
+EOF
+
+exit 0
diff --git a/src/tests/run-show-die-info.sh b/src/tests/run-show-die-info.sh
new file mode 100755
index 00000000..f92ee488
--- /dev/null
+++ b/src/tests/run-show-die-info.sh
@@ -0,0 +1,985 @@
+#! /bin/sh
+# Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile5 testfile2
+
+testrun_compare ${abs_builddir}/show-die-info testfile5 testfile2 <<\EOF
+file: testfile5
+New CU: off = 0, hsize = 11, ab = 0, as = 4, os = 4
+ DW_TAG_compile_unit
+ Name : b.c
+ Offset : 11
+ CU offset : 11
+ Attrs : name stmt_list low_pc high_pc language comp_dir producer
+ low PC : 0x804842c
+ high PC : 0x8048436
+ language : 1
+ directory : /home/drepper/gnu/new-bu/build/ttt
+ producer : GNU C 2.96 20000731 (Red Hat Linux 7.0)
+ DW_TAG_subprogram
+ Name : bar
+ Offset : 104
+ CU offset : 104
+ Attrs : name low_pc high_pc prototyped decl_file decl_line external frame_base type
+ low PC : 0x804842c
+ high PC : 0x8048436
+ DW_TAG_base_type
+ Name : int
+ Offset : 127
+ CU offset : 127
+ Attrs : name byte_size encoding
+ byte size : 4
+New CU: off = 135, hsize = 11, ab = 54, as = 4, os = 4
+ DW_TAG_compile_unit
+ Name : f.c
+ Offset : 146
+ CU offset : 11
+ Attrs : name stmt_list low_pc high_pc language comp_dir producer
+ low PC : 0x8048438
+ high PC : 0x8048442
+ language : 1
+ directory : /home/drepper/gnu/new-bu/build/ttt
+ producer : GNU C 2.96 20000731 (Red Hat Linux 7.0)
+ DW_TAG_subprogram
+ Name : foo
+ Offset : 239
+ CU offset : 104
+ Attrs : name low_pc high_pc prototyped decl_file decl_line external frame_base type
+ low PC : 0x8048438
+ high PC : 0x8048442
+ DW_TAG_base_type
+ Name : int
+ Offset : 262
+ CU offset : 127
+ Attrs : name byte_size encoding
+ byte size : 4
+New CU: off = 270, hsize = 11, ab = 108, as = 4, os = 4
+ DW_TAG_compile_unit
+ Name : m.c
+ Offset : 281
+ CU offset : 11
+ Attrs : name stmt_list low_pc high_pc language comp_dir producer
+ low PC : 0x8048444
+ high PC : 0x8048472
+ language : 1
+ directory : /home/drepper/gnu/new-bu/build/ttt
+ producer : GNU C 2.96 20000731 (Red Hat Linux 7.0)
+ DW_TAG_subprogram
+ Name : main
+ Offset : 374
+ CU offset : 104
+ Attrs : sibling name low_pc high_pc prototyped decl_file decl_line external frame_base type
+ low PC : 0x8048444
+ high PC : 0x8048472
+ DW_TAG_subprogram
+ Name : bar
+ Offset : 402
+ CU offset : 132
+ Attrs : sibling name decl_file decl_line declaration external type
+ DW_TAG_unspecified_parameters
+ Name : * NO NAME *
+ Offset : 419
+ CU offset : 149
+ Attrs :
+ DW_TAG_subprogram
+ Name : foo
+ Offset : 421
+ CU offset : 151
+ Attrs : name decl_file decl_line declaration external type
+ DW_TAG_unspecified_parameters
+ Name : * NO NAME *
+ Offset : 434
+ CU offset : 164
+ Attrs :
+ DW_TAG_base_type
+ Name : int
+ Offset : 437
+ CU offset : 167
+ Attrs : name byte_size encoding
+ byte size : 4
+ DW_TAG_variable
+ Name : a
+ Offset : 444
+ CU offset : 174
+ Attrs : location name decl_file decl_line external type
+file: testfile2
+New CU: off = 0, hsize = 11, ab = 0, as = 4, os = 4
+ DW_TAG_compile_unit
+ Name : b.c
+ Offset : 11
+ CU offset : 11
+ Attrs : name stmt_list low_pc high_pc language comp_dir producer
+ low PC : 0x10000470
+ high PC : 0x10000490
+ language : 1
+ directory : /shoggoth/drepper
+ producer : GNU C 2.96-laurel-000912
+ DW_TAG_subprogram
+ Name : bar
+ Offset : 72
+ CU offset : 72
+ Attrs : name low_pc high_pc prototyped decl_file decl_line external frame_base type
+ low PC : 0x10000470
+ high PC : 0x10000490
+ DW_TAG_base_type
+ Name : int
+ Offset : 95
+ CU offset : 95
+ Attrs : name byte_size encoding
+ byte size : 4
+ DW_TAG_typedef
+ Name : size_t
+ Offset : 102
+ CU offset : 102
+ Attrs : name decl_file decl_line type
+ DW_TAG_base_type
+ Name : unsigned int
+ Offset : 116
+ CU offset : 116
+ Attrs : name byte_size encoding
+ byte size : 4
+ DW_TAG_typedef
+ Name : __gnuc_va_list
+ Offset : 132
+ CU offset : 132
+ Attrs : name decl_file decl_line type
+ DW_TAG_array_type
+ Name : __builtin_va_list
+ Offset : 154
+ CU offset : 154
+ Attrs : sibling name type
+ DW_TAG_subrange_type
+ Name : * NO NAME *
+ Offset : 181
+ CU offset : 181
+ Attrs : upper_bound type
+ DW_TAG_base_type
+ Name : unsigned int
+ Offset : 188
+ CU offset : 188
+ Attrs : name byte_size encoding
+ byte size : 4
+ DW_TAG_structure_type
+ Name : __va_list_tag
+ Offset : 204
+ CU offset : 204
+ Attrs : sibling name byte_size decl_file decl_line
+ byte size : 12
+ DW_TAG_member
+ Name : gpr
+ Offset : 226
+ CU offset : 226
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : fpr
+ Offset : 240
+ CU offset : 240
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : overflow_arg_area
+ Offset : 254
+ CU offset : 254
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : reg_save_area
+ Offset : 282
+ CU offset : 282
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_base_type
+ Name : unsigned char
+ Offset : 307
+ CU offset : 307
+ Attrs : name byte_size encoding
+ byte size : 1
+ DW_TAG_pointer_type
+ Name : * NO NAME *
+ Offset : 324
+ CU offset : 324
+ Attrs : byte_size
+ byte size : 4
+ DW_TAG_typedef
+ Name : __u_char
+ Offset : 326
+ CU offset : 326
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __u_short
+ Offset : 342
+ CU offset : 342
+ Attrs : name decl_file decl_line type
+ DW_TAG_base_type
+ Name : short unsigned int
+ Offset : 359
+ CU offset : 359
+ Attrs : name byte_size encoding
+ byte size : 2
+ DW_TAG_typedef
+ Name : __u_int
+ Offset : 381
+ CU offset : 381
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __u_long
+ Offset : 396
+ CU offset : 396
+ Attrs : name decl_file decl_line type
+ DW_TAG_base_type
+ Name : long unsigned int
+ Offset : 412
+ CU offset : 412
+ Attrs : name byte_size encoding
+ byte size : 4
+ DW_TAG_typedef
+ Name : __u_quad_t
+ Offset : 433
+ CU offset : 433
+ Attrs : name decl_file decl_line type
+ DW_TAG_base_type
+ Name : long long unsigned int
+ Offset : 451
+ CU offset : 451
+ Attrs : name byte_size encoding
+ byte size : 8
+ DW_TAG_typedef
+ Name : __quad_t
+ Offset : 477
+ CU offset : 477
+ Attrs : name decl_file decl_line type
+ DW_TAG_base_type
+ Name : long long int
+ Offset : 493
+ CU offset : 493
+ Attrs : name byte_size encoding
+ byte size : 8
+ DW_TAG_typedef
+ Name : __int8_t
+ Offset : 510
+ CU offset : 510
+ Attrs : name decl_file decl_line type
+ DW_TAG_base_type
+ Name : signed char
+ Offset : 526
+ CU offset : 526
+ Attrs : name byte_size encoding
+ byte size : 1
+ DW_TAG_typedef
+ Name : __uint8_t
+ Offset : 541
+ CU offset : 541
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __int16_t
+ Offset : 558
+ CU offset : 558
+ Attrs : name decl_file decl_line type
+ DW_TAG_base_type
+ Name : short int
+ Offset : 575
+ CU offset : 575
+ Attrs : name byte_size encoding
+ byte size : 2
+ DW_TAG_typedef
+ Name : __uint16_t
+ Offset : 588
+ CU offset : 588
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __int32_t
+ Offset : 606
+ CU offset : 606
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __uint32_t
+ Offset : 623
+ CU offset : 623
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __int64_t
+ Offset : 641
+ CU offset : 641
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __uint64_t
+ Offset : 658
+ CU offset : 658
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __qaddr_t
+ Offset : 676
+ CU offset : 676
+ Attrs : name decl_file decl_line type
+ DW_TAG_pointer_type
+ Name : * NO NAME *
+ Offset : 693
+ CU offset : 693
+ Attrs : byte_size type
+ byte size : 4
+ DW_TAG_typedef
+ Name : __dev_t
+ Offset : 699
+ CU offset : 699
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __uid_t
+ Offset : 714
+ CU offset : 714
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __gid_t
+ Offset : 729
+ CU offset : 729
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __ino_t
+ Offset : 744
+ CU offset : 744
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __mode_t
+ Offset : 759
+ CU offset : 759
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __nlink_t
+ Offset : 775
+ CU offset : 775
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __off_t
+ Offset : 792
+ CU offset : 792
+ Attrs : name decl_file decl_line type
+ DW_TAG_base_type
+ Name : long int
+ Offset : 807
+ CU offset : 807
+ Attrs : name byte_size encoding
+ byte size : 4
+ DW_TAG_typedef
+ Name : __loff_t
+ Offset : 819
+ CU offset : 819
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __pid_t
+ Offset : 835
+ CU offset : 835
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __ssize_t
+ Offset : 850
+ CU offset : 850
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __rlim_t
+ Offset : 867
+ CU offset : 867
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __rlim64_t
+ Offset : 883
+ CU offset : 883
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __id_t
+ Offset : 901
+ CU offset : 901
+ Attrs : name decl_file decl_line type
+ DW_TAG_structure_type
+ Name : * NO NAME *
+ Offset : 915
+ CU offset : 915
+ Attrs : sibling byte_size decl_file decl_line
+ byte size : 8
+ DW_TAG_member
+ Name : __val
+ Offset : 923
+ CU offset : 923
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_array_type
+ Name : * NO NAME *
+ Offset : 940
+ CU offset : 940
+ Attrs : sibling type
+ DW_TAG_subrange_type
+ Name : * NO NAME *
+ Offset : 949
+ CU offset : 949
+ Attrs : upper_bound type
+ DW_TAG_typedef
+ Name : __fsid_t
+ Offset : 956
+ CU offset : 956
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __daddr_t
+ Offset : 972
+ CU offset : 972
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __caddr_t
+ Offset : 989
+ CU offset : 989
+ Attrs : name decl_file decl_line type
+ DW_TAG_pointer_type
+ Name : * NO NAME *
+ Offset : 1006
+ CU offset : 1006
+ Attrs : byte_size type
+ byte size : 4
+ DW_TAG_base_type
+ Name : char
+ Offset : 1012
+ CU offset : 1012
+ Attrs : name byte_size encoding
+ byte size : 1
+ DW_TAG_typedef
+ Name : __time_t
+ Offset : 1020
+ CU offset : 1020
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __swblk_t
+ Offset : 1036
+ CU offset : 1036
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __clock_t
+ Offset : 1053
+ CU offset : 1053
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __fd_mask
+ Offset : 1070
+ CU offset : 1070
+ Attrs : name decl_file decl_line type
+ DW_TAG_structure_type
+ Name : * NO NAME *
+ Offset : 1087
+ CU offset : 1087
+ Attrs : sibling byte_size decl_file decl_line
+ byte size : 128
+ DW_TAG_member
+ Name : __fds_bits
+ Offset : 1095
+ CU offset : 1095
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_array_type
+ Name : * NO NAME *
+ Offset : 1117
+ CU offset : 1117
+ Attrs : sibling type
+ DW_TAG_subrange_type
+ Name : * NO NAME *
+ Offset : 1126
+ CU offset : 1126
+ Attrs : upper_bound type
+ DW_TAG_typedef
+ Name : __fd_set
+ Offset : 1133
+ CU offset : 1133
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __key_t
+ Offset : 1149
+ CU offset : 1149
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __ipc_pid_t
+ Offset : 1164
+ CU offset : 1164
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __blkcnt_t
+ Offset : 1183
+ CU offset : 1183
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __blkcnt64_t
+ Offset : 1201
+ CU offset : 1201
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __fsblkcnt_t
+ Offset : 1221
+ CU offset : 1221
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __fsblkcnt64_t
+ Offset : 1241
+ CU offset : 1241
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __fsfilcnt_t
+ Offset : 1263
+ CU offset : 1263
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __fsfilcnt64_t
+ Offset : 1283
+ CU offset : 1283
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __ino64_t
+ Offset : 1305
+ CU offset : 1305
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __off64_t
+ Offset : 1322
+ CU offset : 1322
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __t_scalar_t
+ Offset : 1339
+ CU offset : 1339
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __t_uscalar_t
+ Offset : 1359
+ CU offset : 1359
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : __intptr_t
+ Offset : 1380
+ CU offset : 1380
+ Attrs : name decl_file decl_line type
+ DW_TAG_structure_type
+ Name : _IO_FILE
+ Offset : 1398
+ CU offset : 1398
+ Attrs : sibling name byte_size decl_file decl_line
+ byte size : 152
+ DW_TAG_member
+ Name : _flags
+ Offset : 1415
+ CU offset : 1415
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _IO_read_ptr
+ Offset : 1432
+ CU offset : 1432
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _IO_read_end
+ Offset : 1455
+ CU offset : 1455
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _IO_read_base
+ Offset : 1478
+ CU offset : 1478
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _IO_write_base
+ Offset : 1502
+ CU offset : 1502
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _IO_write_ptr
+ Offset : 1527
+ CU offset : 1527
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _IO_write_end
+ Offset : 1551
+ CU offset : 1551
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _IO_buf_base
+ Offset : 1575
+ CU offset : 1575
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _IO_buf_end
+ Offset : 1598
+ CU offset : 1598
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _IO_save_base
+ Offset : 1620
+ CU offset : 1620
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _IO_backup_base
+ Offset : 1644
+ CU offset : 1644
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _IO_save_end
+ Offset : 1670
+ CU offset : 1670
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _markers
+ Offset : 1693
+ CU offset : 1693
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _chain
+ Offset : 1712
+ CU offset : 1712
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _fileno
+ Offset : 1729
+ CU offset : 1729
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _blksize
+ Offset : 1747
+ CU offset : 1747
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _old_offset
+ Offset : 1766
+ CU offset : 1766
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _cur_column
+ Offset : 1788
+ CU offset : 1788
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _vtable_offset
+ Offset : 1810
+ CU offset : 1810
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _shortbuf
+ Offset : 1835
+ CU offset : 1835
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _lock
+ Offset : 1855
+ CU offset : 1855
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _offset
+ Offset : 1871
+ CU offset : 1871
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _unused2
+ Offset : 1889
+ CU offset : 1889
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_structure_type
+ Name : _IO_marker
+ Offset : 1909
+ CU offset : 1909
+ Attrs : sibling name byte_size decl_file decl_line
+ byte size : 12
+ DW_TAG_member
+ Name : _next
+ Offset : 1928
+ CU offset : 1928
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _sbuf
+ Offset : 1944
+ CU offset : 1944
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_member
+ Name : _pos
+ Offset : 1960
+ CU offset : 1960
+ Attrs : name data_member_location decl_file decl_line type
+ DW_TAG_pointer_type
+ Name : * NO NAME *
+ Offset : 1976
+ CU offset : 1976
+ Attrs : byte_size type
+ byte size : 4
+ DW_TAG_pointer_type
+ Name : * NO NAME *
+ Offset : 1982
+ CU offset : 1982
+ Attrs : byte_size type
+ byte size : 4
+ DW_TAG_array_type
+ Name : * NO NAME *
+ Offset : 1988
+ CU offset : 1988
+ Attrs : sibling type
+ DW_TAG_subrange_type
+ Name : * NO NAME *
+ Offset : 1997
+ CU offset : 1997
+ Attrs : upper_bound type
+ DW_TAG_pointer_type
+ Name : * NO NAME *
+ Offset : 2004
+ CU offset : 2004
+ Attrs : byte_size
+ byte size : 4
+ DW_TAG_array_type
+ Name : * NO NAME *
+ Offset : 2006
+ CU offset : 2006
+ Attrs : sibling type
+ DW_TAG_subrange_type
+ Name : * NO NAME *
+ Offset : 2015
+ CU offset : 2015
+ Attrs : upper_bound type
+ DW_TAG_typedef
+ Name : FILE
+ Offset : 2022
+ CU offset : 2022
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : wchar_t
+ Offset : 2034
+ CU offset : 2034
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : wint_t
+ Offset : 2050
+ CU offset : 2050
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : _G_int16_t
+ Offset : 2065
+ CU offset : 2065
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : _G_int32_t
+ Offset : 2083
+ CU offset : 2083
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : _G_uint16_t
+ Offset : 2101
+ CU offset : 2101
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : _G_uint32_t
+ Offset : 2120
+ CU offset : 2120
+ Attrs : name decl_file decl_line type
+ DW_TAG_structure_type
+ Name : _IO_jump_t
+ Offset : 2139
+ CU offset : 2139
+ Attrs : name declaration
+ DW_TAG_typedef
+ Name : _IO_lock_t
+ Offset : 2152
+ CU offset : 2152
+ Attrs : name decl_file decl_line
+ DW_TAG_typedef
+ Name : _IO_FILE
+ Offset : 2166
+ CU offset : 2166
+ Attrs : name decl_file decl_line type
+ DW_TAG_structure_type
+ Name : _IO_FILE_plus
+ Offset : 2182
+ CU offset : 2182
+ Attrs : name declaration
+ DW_TAG_typedef
+ Name : __io_read_fn
+ Offset : 2198
+ CU offset : 2198
+ Attrs : name decl_file decl_line type
+ DW_TAG_subroutine_type
+ Name : * NO NAME *
+ Offset : 2219
+ CU offset : 2219
+ Attrs : sibling prototyped type
+ DW_TAG_formal_parameter
+ Name : * NO NAME *
+ Offset : 2229
+ CU offset : 2229
+ Attrs : type
+ DW_TAG_formal_parameter
+ Name : * NO NAME *
+ Offset : 2234
+ CU offset : 2234
+ Attrs : type
+ DW_TAG_formal_parameter
+ Name : * NO NAME *
+ Offset : 2239
+ CU offset : 2239
+ Attrs : type
+ DW_TAG_typedef
+ Name : __io_write_fn
+ Offset : 2245
+ CU offset : 2245
+ Attrs : name decl_file decl_line type
+ DW_TAG_subroutine_type
+ Name : * NO NAME *
+ Offset : 2267
+ CU offset : 2267
+ Attrs : sibling prototyped type
+ DW_TAG_formal_parameter
+ Name : * NO NAME *
+ Offset : 2277
+ CU offset : 2277
+ Attrs : type
+ DW_TAG_formal_parameter
+ Name : * NO NAME *
+ Offset : 2282
+ CU offset : 2282
+ Attrs : type
+ DW_TAG_formal_parameter
+ Name : * NO NAME *
+ Offset : 2287
+ CU offset : 2287
+ Attrs : type
+ DW_TAG_pointer_type
+ Name : * NO NAME *
+ Offset : 2293
+ CU offset : 2293
+ Attrs : byte_size type
+ byte size : 4
+ DW_TAG_const_type
+ Name : * NO NAME *
+ Offset : 2299
+ CU offset : 2299
+ Attrs : type
+ DW_TAG_typedef
+ Name : __io_seek_fn
+ Offset : 2304
+ CU offset : 2304
+ Attrs : name decl_file decl_line type
+ DW_TAG_subroutine_type
+ Name : * NO NAME *
+ Offset : 2325
+ CU offset : 2325
+ Attrs : sibling prototyped type
+ DW_TAG_formal_parameter
+ Name : * NO NAME *
+ Offset : 2335
+ CU offset : 2335
+ Attrs : type
+ DW_TAG_formal_parameter
+ Name : * NO NAME *
+ Offset : 2340
+ CU offset : 2340
+ Attrs : type
+ DW_TAG_formal_parameter
+ Name : * NO NAME *
+ Offset : 2345
+ CU offset : 2345
+ Attrs : type
+ DW_TAG_typedef
+ Name : __io_close_fn
+ Offset : 2351
+ CU offset : 2351
+ Attrs : name decl_file decl_line type
+ DW_TAG_subroutine_type
+ Name : * NO NAME *
+ Offset : 2373
+ CU offset : 2373
+ Attrs : sibling prototyped type
+ DW_TAG_formal_parameter
+ Name : * NO NAME *
+ Offset : 2383
+ CU offset : 2383
+ Attrs : type
+ DW_TAG_typedef
+ Name : fpos_t
+ Offset : 2389
+ CU offset : 2389
+ Attrs : name decl_file decl_line type
+ DW_TAG_typedef
+ Name : off_t
+ Offset : 2403
+ CU offset : 2403
+ Attrs : name decl_file decl_line type
+New CU: off = 2418, hsize = 11, ab = 213, as = 4, os = 4
+ DW_TAG_compile_unit
+ Name : f.c
+ Offset : 2429
+ CU offset : 11
+ Attrs : name stmt_list low_pc high_pc language comp_dir producer
+ low PC : 0x10000490
+ high PC : 0x100004b0
+ language : 1
+ directory : /shoggoth/drepper
+ producer : GNU C 2.96-laurel-000912
+ DW_TAG_subprogram
+ Name : foo
+ Offset : 2490
+ CU offset : 72
+ Attrs : name low_pc high_pc prototyped decl_file decl_line external frame_base type
+ low PC : 0x10000490
+ high PC : 0x100004b0
+ DW_TAG_base_type
+ Name : int
+ Offset : 2513
+ CU offset : 95
+ Attrs : name byte_size encoding
+ byte size : 4
+New CU: off = 2521, hsize = 11, ab = 267, as = 4, os = 4
+ DW_TAG_compile_unit
+ Name : m.c
+ Offset : 2532
+ CU offset : 11
+ Attrs : name stmt_list low_pc high_pc language comp_dir producer
+ low PC : 0x100004b0
+ high PC : 0x10000514
+ language : 1
+ directory : /shoggoth/drepper
+ producer : GNU C 2.96-laurel-000912
+ DW_TAG_subprogram
+ Name : main
+ Offset : 2593
+ CU offset : 72
+ Attrs : sibling name low_pc high_pc prototyped decl_file decl_line external frame_base type
+ low PC : 0x100004b0
+ high PC : 0x10000514
+ DW_TAG_subprogram
+ Name : bar
+ Offset : 2621
+ CU offset : 100
+ Attrs : sibling name decl_file decl_line declaration external type
+ DW_TAG_unspecified_parameters
+ Name : * NO NAME *
+ Offset : 2638
+ CU offset : 117
+ Attrs :
+ DW_TAG_subprogram
+ Name : foo
+ Offset : 2640
+ CU offset : 119
+ Attrs : name decl_file decl_line declaration external type
+ DW_TAG_unspecified_parameters
+ Name : * NO NAME *
+ Offset : 2653
+ CU offset : 132
+ Attrs :
+ DW_TAG_base_type
+ Name : int
+ Offset : 2656
+ CU offset : 135
+ Attrs : name byte_size encoding
+ byte size : 4
+ DW_TAG_variable
+ Name : a
+ Offset : 2663
+ CU offset : 142
+ Attrs : location name decl_file decl_line external type
+EOF
+
+exit 0
diff --git a/src/tests/run-stack-d-test.sh b/src/tests/run-stack-d-test.sh
new file mode 100755
index 00000000..040c2fa9
--- /dev/null
+++ b/src/tests/run-stack-d-test.sh
@@ -0,0 +1,112 @@
+#! /bin/sh
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# // g++ dwarfinlines.cpp -g -o testfiledwarfinlines -O2
+# int
+# fubar (int x)
+# {
+# __asm__ ( "nop" ::: );
+# return 42 / x - 2;
+# }
+#
+# void foobar (int z1, int z2)
+# {
+# __asm__ ( "nop" ::: );
+# int x = z1 + z2;
+# while (z1 + x + 1 != 42)
+# x = fubar (z1 + z2 + x);
+# }
+#
+# void bar (int z)
+# {
+# int a, b;
+# a = b = z / 2;
+# foobar(a, b);
+# }
+#
+# void foo (int x)
+# {
+# if (x > 0)
+# bar(x - 2);
+# }
+#
+# void fu (int y)
+# {
+# __asm__ ( "nop" ::: );
+# foo (y + 1);
+# }
+#
+# int
+# main (int argc, char **argv)
+# {
+# fu (argc);
+# }
+testfiles testfiledwarfinlines testfiledwarfinlines.core
+
+# Depending on whether we are running make check or make installcheck
+# the actual binary name under test might be different. It is used in
+# the error message, which we also try to match.
+if test "$elfutils_testrun" = "installed"; then
+STACKCMD=${bindir}/`program_transform stack`
+else
+STACKCMD=${abs_top_builddir}/src/stack
+fi
+
+# Without -d the top function comes out as fu.
+testrun_compare ${abs_top_builddir}/src/stack -n 2 -e testfiledwarfinlines --core testfiledwarfinlines.core<<EOF
+PID 13654 - core
+TID 13654:
+#0 0x00000000004006c8 fu(int)
+#1 0x00000000004004c5 main
+$STACKCMD: tid 13654: shown max number of frames (2, use -n 0 for unlimited)
+EOF
+
+# But when asking for source we see it is actually on line 6.
+# (Which is in function fubar, not fu).
+testrun_compare ${abs_top_builddir}/src/stack -n 2 -s -e testfiledwarfinlines --core testfiledwarfinlines.core<<EOF
+PID 13654 - core
+TID 13654:
+#0 0x00000000004006c8 fu(int)
+ /home/mark/src/tests/dwarfinlines.cpp:6
+#1 0x00000000004004c5 main
+ /home/mark/src/tests/dwarfinlines.cpp:39
+$STACKCMD: tid 13654: shown max number of frames (2, use -n 0 for unlimited)
+EOF
+
+# So with --debugname we get the function correct as fubar.
+testrun_compare ${abs_top_builddir}/src/stack -n 2 -d -e testfiledwarfinlines --core testfiledwarfinlines.core<<EOF
+PID 13654 - core
+TID 13654:
+#0 0x00000000004006c8 fubar
+#1 0x00000000004004c5 main
+$STACKCMD: tid 13654: shown max number of frames (2, use -n 0 for unlimited)
+EOF
+
+# Which now matches the source line (again 6 of course).
+testrun_compare ${abs_top_builddir}/src/stack -n 2 -s -d -e testfiledwarfinlines --core testfiledwarfinlines.core<<EOF
+PID 13654 - core
+TID 13654:
+#0 0x00000000004006c8 fubar
+ /home/mark/src/tests/dwarfinlines.cpp:6
+#1 0x00000000004004c5 main
+ /home/mark/src/tests/dwarfinlines.cpp:39
+$STACKCMD: tid 13654: shown max number of frames (2, use -n 0 for unlimited)
+EOF
+
+exit 0
diff --git a/src/tests/run-stack-i-test.sh b/src/tests/run-stack-i-test.sh
new file mode 100755
index 00000000..2d09ec0d
--- /dev/null
+++ b/src/tests/run-stack-i-test.sh
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# See run-stack-d-test.sh for dwarfinlines.cpp source.
+testfiles testfiledwarfinlines testfiledwarfinlines.core
+
+# Depending on whether we are running make check or make installcheck
+# the actual binary name under test might be different. It is used in
+# the error message, which we also try to match.
+if test "$elfutils_testrun" = "installed"; then
+STACKCMD=${bindir}/`program_transform stack`
+else
+STACKCMD=${abs_top_builddir}/src/stack
+fi
+
+# Compare with run-stack-d-test.sh to see the output without --inlines.
+# Only two call frames are visible (there is a jump from main to fu or
+# fubar).
+
+# With --inlines we get all inlined calls. Note they share the same
+# address.
+testrun_compare ${abs_top_builddir}/src/stack -n 6 -i -e testfiledwarfinlines --core testfiledwarfinlines.core<<EOF
+PID 13654 - core
+TID 13654:
+#0 0x00000000004006c8 fubar
+#1 0x00000000004006c8 foobar
+#2 0x00000000004006c8 bar
+#3 0x00000000004006c8 foo
+#4 0x00000000004006c8 fu(int)
+#5 0x00000000004004c5 main
+$STACKCMD: tid 13654: shown max number of frames (6, use -n 0 for unlimited)
+EOF
+
+# With --source we can also see where in the source the inlined frames
+# where originally called from.
+testrun_compare ${abs_top_builddir}/src/stack -n 6 -s -i -e testfiledwarfinlines --core testfiledwarfinlines.core<<EOF
+PID 13654 - core
+TID 13654:
+#0 0x00000000004006c8 fubar
+ /home/mark/src/tests/dwarfinlines.cpp:6
+#1 0x00000000004006c8 foobar
+ /home/mark/src/tests/dwarfinlines.cpp:14
+#2 0x00000000004006c8 bar
+ /home/mark/src/tests/dwarfinlines.cpp:21
+#3 0x00000000004006c8 foo
+ /home/mark/src/tests/dwarfinlines.cpp:27
+#4 0x00000000004006c8 fu(int)
+ /home/mark/src/tests/dwarfinlines.cpp:33
+#5 0x00000000004004c5 main
+ /home/mark/src/tests/dwarfinlines.cpp:39
+$STACKCMD: tid 13654: shown max number of frames (6, use -n 0 for unlimited)
+EOF
+
+exit 0
diff --git a/src/tests/run-strings-test.sh b/src/tests/run-strings-test.sh
new file mode 100755
index 00000000..33f2d641
--- /dev/null
+++ b/src/tests/run-strings-test.sh
@@ -0,0 +1,470 @@
+#! /bin/sh
+# Copyright (C) 2005, 2006, 2008 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+files="testfile `seq 2 9 | while read n; do echo testfile$n; done`"
+testfiles $files
+
+testrun_compare ${abs_top_builddir}/src/strings -tx -f $files <<\EOF
+testfile: f4 /lib/ld-linux.so.2
+testfile: 1c9 __gmon_start__
+testfile: 1d8 libc.so.6
+testfile: 1e2 __cxa_finalize
+testfile: 1f1 __deregister_frame_info
+testfile: 209 _IO_stdin_used
+testfile: 218 __libc_start_main
+testfile: 22a __register_frame_info
+testfile: 240 GLIBC_2.1.3
+testfile: 24c GLIBC_2.0
+testfile: 338 PTRh
+testfile: 345 QVh,
+testfile2: 114 /lib/ld.so.1
+testfile2: 1f1 __gmon_start__
+testfile2: 200 __deregister_frame_info
+testfile2: 218 __register_frame_info
+testfile2: 22e libc.so.6
+testfile2: 238 __cxa_finalize
+testfile2: 247 _IO_stdin_used
+testfile2: 256 __libc_start_main
+testfile2: 268 GLIBC_2.1.3
+testfile2: 274 GLIBC_2.0
+testfile2: 488 }a[xN
+testfile2: 4a8 }a[xN
+testfile2: 50c }a[xN
+testfile2: 540 }?Kx
+testfile3: f4 /lib/ld-linux.so.2
+testfile3: 1c9 __gmon_start__
+testfile3: 1d8 libc.so.6
+testfile3: 1e2 __cxa_finalize
+testfile3: 1f1 __deregister_frame_info
+testfile3: 209 _IO_stdin_used
+testfile3: 218 __libc_start_main
+testfile3: 22a __register_frame_info
+testfile3: 240 GLIBC_2.1.3
+testfile3: 24c GLIBC_2.0
+testfile3: 338 PTRh
+testfile3: 345 QVh,
+testfile4: f4 /lib/ld-linux.so.2
+testfile4: 8e1 __gmon_start__
+testfile4: 8f0 __terminate_func
+testfile4: 901 stderr
+testfile4: 908 __tf9type_info
+testfile4: 917 __tf16__user_type_info
+testfile4: 92e __tf19__pointer_type_info
+testfile4: 948 __tf16__attr_type_info
+testfile4: 95f __tf16__func_type_info
+testfile4: 976 __vt_9type_info
+testfile4: 986 __vt_19__pointer_type_info
+testfile4: 9a1 __vt_16__attr_type_info
+testfile4: 9b9 __vt_16__func_type_info
+testfile4: 9d1 __vt_16__ptmf_type_info
+testfile4: 9e9 __vt_16__ptmd_type_info
+testfile4: a01 __vt_17__array_type_info
+testfile4: a1a __tiv
+testfile4: a20 __vt_19__builtin_type_info
+testfile4: a3b __tix
+testfile4: a41 __til
+testfile4: a47 __tii
+testfile4: a4d __tis
+testfile4: a53 __tib
+testfile4: a59 __tic
+testfile4: a5f __tiw
+testfile4: a65 __tir
+testfile4: a6b __tid
+testfile4: a71 __tif
+testfile4: a77 __tiUi
+testfile4: a7e __tiUl
+testfile4: a85 __tiUx
+testfile4: a8c __tiUs
+testfile4: a93 __tiUc
+testfile4: a9a __tiSc
+testfile4: aa1 __ti19__pointer_type_info
+testfile4: abb __ti9type_info
+testfile4: aca __ti16__attr_type_info
+testfile4: ae1 __ti19__builtin_type_info
+testfile4: afb __ti16__func_type_info
+testfile4: b12 __ti16__ptmf_type_info
+testfile4: b29 __ti16__ptmd_type_info
+testfile4: b40 __ti17__array_type_info
+testfile4: b58 __cplus_type_matcher
+testfile4: b6d __vt_13bad_exception
+testfile4: b82 __vt_9exception
+testfile4: b92 _._13bad_exception
+testfile4: ba5 __vt_8bad_cast
+testfile4: bb4 _._8bad_cast
+testfile4: bc1 __vt_10bad_typeid
+testfile4: bd3 _._10bad_typeid
+testfile4: be3 __ti9exception
+testfile4: bf2 __ti13bad_exception
+testfile4: c06 __vt_16__user_type_info
+testfile4: c1e __vt_17__class_type_info
+testfile4: c37 __vt_14__si_type_info
+testfile4: c4d __ti8bad_cast
+testfile4: c5b __ti10bad_typeid
+testfile4: c6c __ti16__user_type_info
+testfile4: c83 __ti14__si_type_info
+testfile4: c98 __ti17__class_type_info
+testfile4: cb0 libc.so.6
+testfile4: cba __register_frame
+testfile4: ccb pthread_create
+testfile4: cda pthread_getspecific
+testfile4: cee pthread_key_delete
+testfile4: d01 __cxa_finalize
+testfile4: d10 malloc
+testfile4: d17 __frame_state_for
+testfile4: d29 abort
+testfile4: d2f __register_frame_table
+testfile4: d46 fprintf
+testfile4: d4e pthread_once
+testfile4: d5b __deregister_frame_info
+testfile4: d73 pthread_key_create
+testfile4: d86 memset
+testfile4: d8d strcmp
+testfile4: d94 pthread_mutex_unlock
+testfile4: da9 __deregister_frame
+testfile4: dbc pthread_mutex_lock
+testfile4: dcf _IO_stdin_used
+testfile4: dde __libc_start_main
+testfile4: df0 strlen
+testfile4: df7 __register_frame_info_table
+testfile4: e13 __register_frame_info
+testfile4: e29 pthread_setspecific
+testfile4: e3d free
+testfile4: e42 GLIBC_2.1.3
+testfile4: e4e GLIBC_2.0
+testfile4: 1308 PTRh<
+testfile4: 194b [^_]
+testfile4: 19bf [^_]
+testfile4: 1dd9 wT9L>
+testfile4: 1f3b [^_]
+testfile4: 1fae [^_]
+testfile4: 21c1 BZQRP
+testfile4: 237f [^_]
+testfile4: 2431 JWRV
+testfile4: 2454 [^_]
+testfile4: 2506 JWRV
+testfile4: 2529 [^_]
+testfile4: 2b6c [^_]
+testfile4: 2b9d ZYPV
+testfile4: 2c28 [^_]
+testfile4: 2c4d ZYPV
+testfile4: 2ce2 [^_]
+testfile4: 2dfb X^_]
+testfile4: 2fc8 [^_]
+testfile4: 307d tq;F
+testfile4: 315a [^_]
+testfile4: 31a5 :zt 1
+testfile4: 3238 [^_]
+testfile4: 32f8 AXY_VR
+testfile4: 334a [^_]
+testfile4: 37ab [^_]
+testfile4: 38b8 sU;E
+testfile4: 38f2 QRPV
+testfile4: 3926 [^_]
+testfile4: 3bfe QRWP
+testfile4: 3e65 [^_]
+testfile4: 4136 [^_]
+testfile4: 472d [^_]
+testfile4: 47a5 0[^_]
+testfile4: 48ab [^_]
+testfile4: 4ab1 _ZPV
+testfile4: 4b53 _ZPV
+testfile4: 4bd3 _ZPV
+testfile4: 4e05 PQWj
+testfile4: 4f75 [^_]
+testfile4: 4f9b u$;E u
+testfile4: 4feb [^_]
+testfile4: 5080 [^_]
+testfile4: 50a8 }$9u
+testfile4: 5149 [^_]
+testfile4: 51b0 [^_]
+testfile4: 539b [^_]
+testfile4: 53b5 E 9E
+testfile4: 540d x!)E
+testfile4: 5598 U$ B
+testfile4: 571c [^_]
+testfile4: 5819 [^_]
+testfile4: 5922 [^_]
+testfile4: 59c2 [^_]
+testfile4: 5a62 [^_]
+testfile4: 5b02 [^_]
+testfile4: 5ba2 [^_]
+testfile4: 5c42 [^_]
+testfile4: 5ce2 [^_]
+testfile4: 6112 [^_]
+testfile4: 62bb [^_]
+testfile4: 639b [^_]
+testfile4: 6436 [^_]
+testfile4: 6468 val is zero
+testfile4: 6480 Internal Compiler Bug: No runtime type matcher.
+testfile4: 64dc 19__pointer_type_info
+testfile4: 64f2 16__attr_type_info
+testfile4: 6505 19__builtin_type_info
+testfile4: 651b 16__func_type_info
+testfile4: 652e 16__ptmf_type_info
+testfile4: 6541 16__ptmd_type_info
+testfile4: 6554 17__array_type_info
+testfile4: 6568 9exception
+testfile4: 6573 13bad_exception
+testfile4: 6583 9type_info
+testfile4: 658e 8bad_cast
+testfile4: 6598 10bad_typeid
+testfile4: 65a5 16__user_type_info
+testfile4: 65b8 14__si_type_info
+testfile4: 65c9 17__class_type_info
+testfile4: 6fc1 H. $
+testfile5: f4 /lib/ld-linux.so.2
+testfile5: 1c9 __gmon_start__
+testfile5: 1d8 libc.so.6
+testfile5: 1e2 __cxa_finalize
+testfile5: 1f1 __deregister_frame_info
+testfile5: 209 _IO_stdin_used
+testfile5: 218 __libc_start_main
+testfile5: 22a __register_frame_info
+testfile5: 240 GLIBC_2.1.3
+testfile5: 24c GLIBC_2.0
+testfile5: 338 PTRh
+testfile5: 345 QVhD
+testfile6: 114 /lib/ld-linux.so.2
+testfile6: 3d9 libstdc++.so.5
+testfile6: 3e8 _ZTVSt16invalid_argument
+testfile6: 401 _ZNSaIcEC1Ev
+testfile6: 40e _ZTSSt16invalid_argument
+testfile6: 427 _ZTVN10__cxxabiv120__si_class_type_infoE
+testfile6: 450 _ZNSsD1Ev
+testfile6: 45a _ZdlPv
+testfile6: 461 __cxa_end_catch
+testfile6: 471 __gxx_personality_v0
+testfile6: 486 _ZTISt9exception
+testfile6: 497 _ZNSaIcED1Ev
+testfile6: 4a4 _ZTISt11logic_error
+testfile6: 4b8 _ZNSt16invalid_argumentD1Ev
+testfile6: 4d4 _ZTVN10__cxxabiv117__class_type_infoE
+testfile6: 4fa __cxa_throw
+testfile6: 506 _ZNSt16invalid_argumentC1ERKSs
+testfile6: 525 _ZNSsC1EPKcRKSaIcE
+testfile6: 538 _ZNSt11logic_errorD2Ev
+testfile6: 54f _ZTVN10__cxxabiv121__vmi_class_type_infoE
+testfile6: 579 _ZNSt16invalid_argumentD0Ev
+testfile6: 595 __cxa_begin_catch
+testfile6: 5a7 __cxa_allocate_exception
+testfile6: 5c0 _ZNKSt11logic_error4whatEv
+testfile6: 5db _Jv_RegisterClasses
+testfile6: 5ef _ZTISt16invalid_argument
+testfile6: 608 __gmon_start__
+testfile6: 617 libm.so.6
+testfile6: 621 _IO_stdin_used
+testfile6: 630 libgcc_s.so.1
+testfile6: 63e _Unwind_Resume
+testfile6: 64d libc.so.6
+testfile6: 657 __libc_start_main
+testfile6: 669 GCC_3.0
+testfile6: 671 GLIBC_2.0
+testfile6: 67b GLIBCPP_3.2
+testfile6: 687 CXXABI_1.2
+testfile6: 908 PTRh
+testfile6: e48 gdb.1
+testfile6: ec8 N10__gnu_test9gnu_obj_1E
+testfile6: ee1 N10__gnu_test9gnu_obj_2IiEE
+testfile6: efd N10__gnu_test9gnu_obj_2IlEE
+testfile6: f19 St16invalid_argument
+testfile7: 114 /lib/ld-linux.so.2
+testfile7: 3d9 libstdc++.so.5
+testfile7: 3e8 _ZTVSt16invalid_argument
+testfile7: 401 _ZNSaIcEC1Ev
+testfile7: 40e _ZTSSt16invalid_argument
+testfile7: 427 _ZTVN10__cxxabiv120__si_class_type_infoE
+testfile7: 450 _ZNSsD1Ev
+testfile7: 45a _ZdlPv
+testfile7: 461 __cxa_end_catch
+testfile7: 471 __gxx_personality_v0
+testfile7: 486 _ZTISt9exception
+testfile7: 497 _ZNSaIcED1Ev
+testfile7: 4a4 _ZTISt11logic_error
+testfile7: 4b8 _ZNSt16invalid_argumentD1Ev
+testfile7: 4d4 _ZTVN10__cxxabiv117__class_type_infoE
+testfile7: 4fa __cxa_throw
+testfile7: 506 _ZNSt16invalid_argumentC1ERKSs
+testfile7: 525 _ZNSsC1EPKcRKSaIcE
+testfile7: 538 _ZNSt11logic_errorD2Ev
+testfile7: 54f _ZTVN10__cxxabiv121__vmi_class_type_infoE
+testfile7: 579 _ZNSt16invalid_argumentD0Ev
+testfile7: 595 __cxa_begin_catch
+testfile7: 5a7 __cxa_allocate_exception
+testfile7: 5c0 _ZNKSt11logic_error4whatEv
+testfile7: 5db _Jv_RegisterClasses
+testfile7: 5ef _ZTISt16invalid_argument
+testfile7: 608 __gmon_start__
+testfile7: 617 libm.so.6
+testfile7: 621 _IO_stdin_used
+testfile7: 630 libgcc_s.so.1
+testfile7: 63e _Unwind_Resume
+testfile7: 64d libc.so.6
+testfile7: 657 __libc_start_main
+testfile7: 669 GCC_3.0
+testfile7: 671 GLIBC_2.0
+testfile7: 67b GLIBCPP_3.2
+testfile7: 687 CXXABI_1.2
+testfile7: 908 PTRh
+testfile7: e48 gdb.1
+testfile7: ec8 N10__gnu_test9gnu_obj_1E
+testfile7: ee1 N10__gnu_test9gnu_obj_2IiEE
+testfile7: efd N10__gnu_test9gnu_obj_2IlEE
+testfile7: f19 St16invalid_argument
+testfile8: 79 XZh;
+testfile8: 87 YXh<
+testfile8: 14f SQh[
+testfile8: 259 t5Wj
+testfile8: 502 WRVQ
+testfile8: 1fe7 ZYPj
+testfile8: 2115 u'Pj
+testfile8: 7bba FILE
+testfile8: 7bbf preserve-dates
+testfile8: 7bce remove-comment
+testfile8: 7bdd Remove .comment section
+testfile8: 7bf6 ${prefix}/share
+testfile8: 7c06 elfutils
+testfile8: 7c0f a.out
+testfile8: 7c15 0.58
+testfile8: 7c1a strip (Red Hat %s) %s
+testfile8: 7c31 2002
+testfile8: 7c36 Ulrich Drepper
+testfile8: 7c45 Written by %s.
+testfile8: 7c55 cannot stat input file "%s"
+testfile8: 7c71 %s: INTERNAL ERROR: %s
+testfile8: 7c88 while opening "%s"
+testfile8: 7c9b handle_elf
+testfile8: 7ca6 ../../src/strip.c
+testfile8: 7cb8 shdr_info[cnt].group_idx != 0
+testfile8: 7cd6 illformed file `%s'
+testfile8: 7cea elf_ndxscn (scn) == cnt
+testfile8: 7d02 .shstrtab
+testfile8: 7d0c while writing `%s': %s
+testfile8: 7d23 ((sym->st_info) & 0xf) == 3
+testfile8: 7d3f shndxdata != ((void *)0)
+testfile8: 7d58 scn != ((void *)0)
+testfile8: 7d6b .gnu_debuglink
+testfile8: 7d7a .comment
+testfile8: 7d83 cannot open `%s'
+testfile8: 7da0 Place stripped output into FILE
+testfile8: 7dc0 Extract the removed sections into FILE
+testfile8: 7e00 Copy modified/access timestamps to the output
+testfile8: 7e40 Only one input file allowed together with '-o' and '-f'
+testfile8: 7e80 Copyright (C) %s Red Hat, Inc.
+testfile8: 7e9f This is free software; see the source for copying conditions. There is NO
+testfile8: 7eea warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+testfile8: 7f40 Report bugs to <drepper@redhat.com>.
+testfile8: 7f80 %s: File format not recognized
+testfile8: 7fa0 cannot set access and modification date of "%s"
+testfile8: 7fe0 cannot create new file `%s': %s
+testfile8: 8000 error while finishing `%s': %s
+testfile8: 8020 shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0
+testfile8: 8060 shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0
+testfile8: 80a0 %s: error while creating ELF header: %s
+testfile8: 80e0 %s: error while reading the file: %s
+testfile8: 8120 sec < 0xff00 || shndxdata != ((void *)0)
+testfile8: 8160 (versiondata->d_size / sizeof (GElf_Versym)) >= shdr_info[cnt].data->d_size / elsize
+testfile8: 81c0 shdr_info[cnt].shdr.sh_type == 11
+testfile8: 8200 (versiondata->d_size / sizeof (Elf32_Word)) >= shdr_info[cnt].data->d_size / elsize
+testfile8: 8260 shdr_info[cnt].shdr.sh_type == 18
+testfile8: 82a0 shdr_info[cnt].data != ((void *)0)
+testfile8: 82e0 elf_ndxscn (shdr_info[cnt].newscn) == idx
+testfile8: 8320 while create section header section: %s
+testfile8: 8360 cannot allocate section data: %s
+testfile8: 83a0 elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx
+testfile8: 83e0 while generating output file: %s
+testfile8: 8420 while preparing output for `%s'
+testfile8: 8440 shdr_info[cnt].shdr.sh_type == 2
+testfile8: 8480 shdr_info[idx].data != ((void *)0)
+testfile8: 84c0 cannot determine number of sections: %s
+testfile8: 8500 cannot get section header string table index
+testfile8: 85c0 Discard symbols from object files.
+testfile8: 85e3 [FILE...]
+testfile9: 79 XZh;
+testfile9: 87 YXh<
+testfile9: 14f SQh[
+testfile9: 259 t5Wj
+testfile9: 502 WRVQ
+testfile9: 1fe7 ZYPj
+testfile9: 2115 u'Pj
+testfile9: 3414 FILE
+testfile9: 3419 preserve-dates
+testfile9: 3428 remove-comment
+testfile9: 3437 Remove .comment section
+testfile9: 3450 ${prefix}/share
+testfile9: 3460 elfutils
+testfile9: 3469 a.out
+testfile9: 346f 0.58
+testfile9: 3474 strip (Red Hat %s) %s
+testfile9: 348b 2002
+testfile9: 3490 Ulrich Drepper
+testfile9: 349f Written by %s.
+testfile9: 34af cannot stat input file "%s"
+testfile9: 34cb %s: INTERNAL ERROR: %s
+testfile9: 34e2 while opening "%s"
+testfile9: 34f5 handle_elf
+testfile9: 3500 ../../src/strip.c
+testfile9: 3512 shdr_info[cnt].group_idx != 0
+testfile9: 3530 illformed file `%s'
+testfile9: 3544 elf_ndxscn (scn) == cnt
+testfile9: 355c .shstrtab
+testfile9: 3566 while writing `%s': %s
+testfile9: 357d ((sym->st_info) & 0xf) == 3
+testfile9: 3599 shndxdata != ((void *)0)
+testfile9: 35b2 scn != ((void *)0)
+testfile9: 35c5 .gnu_debuglink
+testfile9: 35d4 .comment
+testfile9: 35dd cannot open `%s'
+testfile9: 3600 Place stripped output into FILE
+testfile9: 3620 Extract the removed sections into FILE
+testfile9: 3660 Copy modified/access timestamps to the output
+testfile9: 36a0 Only one input file allowed together with '-o' and '-f'
+testfile9: 36e0 Copyright (C) %s Red Hat, Inc.
+testfile9: 36ff This is free software; see the source for copying conditions. There is NO
+testfile9: 374a warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+testfile9: 37a0 Report bugs to <drepper@redhat.com>.
+testfile9: 37e0 %s: File format not recognized
+testfile9: 3800 cannot set access and modification date of "%s"
+testfile9: 3840 cannot create new file `%s': %s
+testfile9: 3860 error while finishing `%s': %s
+testfile9: 3880 shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0
+testfile9: 38c0 shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0
+testfile9: 3900 %s: error while creating ELF header: %s
+testfile9: 3940 %s: error while reading the file: %s
+testfile9: 3980 sec < 0xff00 || shndxdata != ((void *)0)
+testfile9: 39c0 (versiondata->d_size / sizeof (GElf_Versym)) >= shdr_info[cnt].data->d_size / elsize
+testfile9: 3a20 shdr_info[cnt].shdr.sh_type == 11
+testfile9: 3a60 (versiondata->d_size / sizeof (Elf32_Word)) >= shdr_info[cnt].data->d_size / elsize
+testfile9: 3ac0 shdr_info[cnt].shdr.sh_type == 18
+testfile9: 3b00 shdr_info[cnt].data != ((void *)0)
+testfile9: 3b40 elf_ndxscn (shdr_info[cnt].newscn) == idx
+testfile9: 3b80 while create section header section: %s
+testfile9: 3bc0 cannot allocate section data: %s
+testfile9: 3c00 elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx
+testfile9: 3c40 while generating output file: %s
+testfile9: 3c80 while preparing output for `%s'
+testfile9: 3ca0 shdr_info[cnt].shdr.sh_type == 2
+testfile9: 3ce0 shdr_info[idx].data != ((void *)0)
+testfile9: 3d20 cannot determine number of sections: %s
+testfile9: 3d60 cannot get section header string table index
+testfile9: 3e20 Discard symbols from object files.
+testfile9: 3e43 [FILE...]
+EOF
+
+exit 0
diff --git a/src/tests/run-strip-groups.sh b/src/tests/run-strip-groups.sh
new file mode 100755
index 00000000..1c836a4a
--- /dev/null
+++ b/src/tests/run-strip-groups.sh
@@ -0,0 +1,55 @@
+#! /bin/sh
+# Copyright (C) 2011 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# g++ -gdwarf-4 -c testfile58.cxx
+# class ct
+# {
+# private:
+# int i;
+#
+# public:
+# void foo ()
+# {
+# i = 1;
+# }
+#
+# int bar ()
+# {
+# return i;
+# }
+# };
+#
+# int baz ()
+# {
+# class ct c;
+# c.foo ();
+# return c.bar ();
+# }
+
+. $srcdir/test-subr.sh
+
+infile=testfile58
+outfile=$infile.stripped
+dbgfile=$infile.debug
+
+testfiles $infile
+tempfiles $outfile $dbgfile
+
+testrun ${abs_top_builddir}/src/strip -o $outfile -f $dbgfile $infile
+testrun ${abs_top_builddir}/src/elflint -q $infile
+testrun ${abs_top_builddir}/src/elflint -q $outfile
+testrun ${abs_top_builddir}/src/elflint -q -d $dbgfile
diff --git a/src/tests/run-strip-reloc.sh b/src/tests/run-strip-reloc.sh
new file mode 100755
index 00000000..a3245fd8
--- /dev/null
+++ b/src/tests/run-strip-reloc.sh
@@ -0,0 +1,110 @@
+#! /bin/sh
+# Copyright (C) 2011, 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles hello_i386.ko hello_x86_64.ko hello_ppc64.ko hello_s390.ko \
+ hello_aarch64.ko
+
+tempfiles readelf.out readelf.out1 readelf.out2
+tempfiles out.stripped1 out.debug1 out.stripped2 out.debug2
+
+status=0
+runtest() {
+ infile=$1
+ is_ET_REL=$2
+ outfile1=out.stripped1
+ debugfile1=out.debug1
+ outfile2=out.stripped2
+ debugfile2=out.debug2
+
+ testrun ${abs_top_builddir}/src/strip -o $outfile1 -f $debugfile1 $infile ||
+ { echo "*** failure strip $infile"; status=1; }
+
+ testrun ${abs_top_builddir}/src/strip --reloc-debug-sections -o $outfile2 \
+ -f $debugfile2 $infile ||
+ { echo "*** failure strip --reloc-debug-sections $infile"; status=1; }
+
+ # shouldn't make any difference for stripped files.
+ testrun ${abs_top_builddir}/src/readelf -a $outfile1 > readelf.out ||
+ { echo "*** failure readelf -a outfile1 $infile"; status=1; }
+
+ testrun_compare ${abs_top_builddir}/src/readelf -a $outfile2 < readelf.out ||
+ { echo "*** failure compare stripped files $infile"; status=1; }
+
+ # debug files however should be smaller, when ET_REL.
+ SIZE1=$(stat -c%s $debugfile1)
+ SIZE2=$(stat -c%s $debugfile2)
+ test \( \( $is_ET_REL -eq 1 \) -a \( $SIZE1 -gt $SIZE2 \) \) \
+ -o \( \( $is_ET_REL -eq 0 \) -a \( $SIZE1 -eq $SIZE2 \) \) ||
+ { echo "*** failure --reloc-debug-sections not smaller $infile"; status=1; }
+
+ # Strip of DWARF section lines, offset will not match.
+ # Everything else should match.
+ testrun ${abs_top_builddir}/src/readelf -w $debugfile1 \
+ | grep -v ^DWARF\ section > readelf.out1 ||
+ { echo "*** failure readelf -w debugfile1 $infile"; status=1; }
+
+ testrun ${abs_top_builddir}/src/readelf -w $debugfile2 \
+ | grep -v ^DWARF\ section > readelf.out2 ||
+ { echo "*** failure readelf -w debugfile2 $infile"; status=1; }
+
+ testrun_compare cat readelf.out1 < readelf.out2 ||
+ { echo "*** failure readelf -w compare $infile"; status=1; }
+}
+
+# Most simple hello world kernel module for various architectures.
+# ::::::::::::::
+# Makefile
+# ::::::::::::::
+# obj-m := hello.o
+# hello-y := init.o exit.o
+#
+# all:
+# make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
+# ::::::::::::::
+# init.c
+# ::::::::::::::
+# #include <linux/kernel.h>
+# #include <linux/module.h>
+#
+# int init_module(void)
+# {
+# printk(KERN_INFO "Hello, world!\n");
+# return 0;
+# }
+# ::::::::::::::
+# exit.c
+# ::::::::::::::
+# #include <linux/kernel.h>
+# #include <linux/module.h>
+#
+# void cleanup_module()
+# {
+# printk(KERN_INFO "Goodbye, World!\n");
+# }
+runtest hello_i386.ko 1
+runtest hello_x86_64.ko 1
+runtest hello_ppc64.ko 1
+runtest hello_s390.ko 1
+runtest hello_aarch64.ko 1
+
+# self test, shouldn't impact non-ET_REL files at all.
+runtest ${abs_top_builddir}/src/strip 0
+runtest ${abs_top_builddir}/src/strip.o 1
+
+exit $status
diff --git a/src/tests/run-strip-test.sh b/src/tests/run-strip-test.sh
new file mode 100755
index 00000000..c558e90b
--- /dev/null
+++ b/src/tests/run-strip-test.sh
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 1999, 2000, 2002, 2003, 2005, 2007, 2008 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+original=${original:-testfile11}
+stripped=${stripped:-testfile7}
+debugout=${debugfile:+-f testfile.debug.temp -F $debugfile}
+
+testfiles $original
+test x$stripped = xtestfile.temp || testfiles $stripped $debugfile
+
+tempfiles testfile.temp testfile.debug.temp testfile.unstrip
+
+testrun ${abs_top_builddir}/src/strip -o testfile.temp $debugout $original
+
+status=0
+
+cmp $stripped testfile.temp || status=$?
+
+# Check elflint and the expected result.
+testrun ${abs_top_builddir}/src/elflint -q testfile.temp || status=$?
+
+test -z "$debugfile" || {
+cmp $debugfile testfile.debug.temp || status=$?
+
+# Check elflint and the expected result.
+testrun ${abs_top_builddir}/src/elflint -q -d testfile.debug.temp || status=$?
+
+# Now test unstrip recombining those files.
+testrun ${abs_top_builddir}/src/unstrip -o testfile.unstrip testfile.temp testfile.debug.temp
+
+# Check that it came back whole.
+testrun ${abs_top_builddir}/src/elfcmp --hash-inexact $original testfile.unstrip
+}
+
+tempfiles testfile.sections
+testrun ${abs_top_builddir}/src/readelf -S testfile.temp > testfile.sections || status=$?
+fgrep ' .debug_' testfile.sections && status=1
+
+exit $status
diff --git a/src/tests/run-strip-test2.sh b/src/tests/run-strip-test2.sh
new file mode 100755
index 00000000..92171966
--- /dev/null
+++ b/src/tests/run-strip-test2.sh
@@ -0,0 +1,22 @@
+#! /bin/sh
+# Copyright (C) 1999, 2000, 2002, 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+original=testfile8
+stripped=testfile9
+. $srcdir/run-strip-test.sh
diff --git a/src/tests/run-strip-test3.sh b/src/tests/run-strip-test3.sh
new file mode 100755
index 00000000..fb37a769
--- /dev/null
+++ b/src/tests/run-strip-test3.sh
@@ -0,0 +1,22 @@
+#! /bin/sh
+# Copyright (C) 1999, 2000, 2002, 2003, 2005 Red Hat, Inc.
+# This file is part of elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+original=testfile12
+stripped=testfile13
+. $srcdir/run-strip-test.sh
diff --git a/src/tests/run-strip-test4.sh b/src/tests/run-strip-test4.sh
new file mode 100755
index 00000000..64924a92
--- /dev/null
+++ b/src/tests/run-strip-test4.sh
@@ -0,0 +1,5 @@
+original=testfile11
+stripped=testfile37
+debugfile=testfile37.debug
+
+. $srcdir/run-strip-test.sh
diff --git a/src/tests/run-strip-test5.sh b/src/tests/run-strip-test5.sh
new file mode 100755
index 00000000..9fa9ebef
--- /dev/null
+++ b/src/tests/run-strip-test5.sh
@@ -0,0 +1,5 @@
+original=testfile8
+stripped=testfile16
+debugfile=testfile16.debug
+
+. $srcdir/run-strip-test.sh
diff --git a/src/tests/run-strip-test6.sh b/src/tests/run-strip-test6.sh
new file mode 100755
index 00000000..c59bf5e4
--- /dev/null
+++ b/src/tests/run-strip-test6.sh
@@ -0,0 +1,5 @@
+original=testfile12
+stripped=testfile35
+debugfile=testfile35.debug
+
+. $srcdir/run-strip-test.sh
diff --git a/src/tests/run-strip-test7.sh b/src/tests/run-strip-test7.sh
new file mode 100755
index 00000000..c65cd050
--- /dev/null
+++ b/src/tests/run-strip-test7.sh
@@ -0,0 +1,5 @@
+original=testfile39
+stripped=testfile40
+debugfile=testfile40.debug
+
+. $srcdir/run-strip-test.sh
diff --git a/src/tests/run-strip-test8.sh b/src/tests/run-strip-test8.sh
new file mode 100755
index 00000000..fb9fa087
--- /dev/null
+++ b/src/tests/run-strip-test8.sh
@@ -0,0 +1,5 @@
+original=testfile47
+stripped=testfile48
+debugfile=testfile48.debug
+
+. $srcdir/run-strip-test.sh
diff --git a/src/tests/run-test-archive64.sh b/src/tests/run-test-archive64.sh
new file mode 100755
index 00000000..43df16e4
--- /dev/null
+++ b/src/tests/run-test-archive64.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Copyright (C) 2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# The test archive was produced on an s390x machine using the
+# following command sequence:
+# echo 'int aaa(void){}' | gcc -x c /dev/stdin -c -o aaa.o
+# echo 'int bbb(void){} int bbb2(void){}' | gcc -x c /dev/stdin -c -o bbb.o
+# echo 'int ccc(void){} int ccc2(void){} int ccc3(void){}' \
+# | gcc -x c /dev/stdin -c -o ccc.o
+# ar cru testarchive64.a aaa.o bbb.o ccc.o
+testfiles testarchive64.a
+
+testrun_compare ${abs_top_builddir}/src/readelf -c testarchive64.a <<\EOF
+
+Index of archive 'testarchive64.a' has 7 entries:
+Archive member 'aaa.o' contains:
+ aaa
+Archive member 'bbb.o' contains:
+ bbb
+ bbb2
+Archive member 'ccc.o' contains:
+ ccc
+ ccc2
+ ccc3
+EOF
+
+exit 0
diff --git a/src/tests/run-test-flag-nobits.sh b/src/tests/run-test-flag-nobits.sh
new file mode 100755
index 00000000..9bedf174
--- /dev/null
+++ b/src/tests/run-test-flag-nobits.sh
@@ -0,0 +1,22 @@
+#! /bin/sh
+# Copyright (C) 2010 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile
+
+testrun ${abs_builddir}/test-flag-nobits testfile
diff --git a/src/tests/run-typeiter.sh b/src/tests/run-typeiter.sh
new file mode 100755
index 00000000..605ee2a2
--- /dev/null
+++ b/src/tests/run-typeiter.sh
@@ -0,0 +1,54 @@
+#! /bin/sh
+# Copyright (C) 2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# struct s1
+# {
+# char c;
+# short s;
+# int i;
+# long l;
+# float f;
+# double d;
+# };
+#
+# s1 S1;
+#
+# int func (s1 *p)
+# {
+# return p->i;
+# }
+#
+# int main()
+# {
+# return func (&S1);
+# }
+#
+# g++ -gdwarf-4 -g -fdebug-types-section
+
+testfiles testfile59
+
+testrun_compare ${abs_builddir}/typeiter testfile59 <<\EOF
+ok
+EOF
+
+testrun_compare ${abs_builddir}/typeiter2 testfile59 <<\EOF
+ok
+EOF
+
+exit 0
diff --git a/src/tests/run-unstrip-M.sh b/src/tests/run-unstrip-M.sh
new file mode 100755
index 00000000..614a8aa5
--- /dev/null
+++ b/src/tests/run-unstrip-M.sh
@@ -0,0 +1,51 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Linux /proc/PID/maps file with some non-file entries (and fake exe/lib names).
+tempfiles testmaps
+cat > testmaps <<EOF
+00400000-024aa000 r-xp 00000000 08:02 159659 /opt/TestBins/bin/arwijn
+026aa000-026b2000 rwxp 020aa000 08:02 159659 /opt/TestBins/bin/arwijn
+026b2000-026bf000 rwxp 00000000 00:00 0
+0335a000-03e6f000 rwxp 00000000 00:00 0 [heap]
+2b7b38282000-2b7b38302000 rwxs 00000000 00:06 493872 socket:[493872]
+2b7b38302000-2b7b38312000 rwxs 00000000 00:06 493872 socket:[493872]
+2b7b38312000-2b7b38b12000 r-xs 00000000 00:06 493872 socket:[493872]
+2b7b38b12000-2b7b38b22000 rwxs 00000000 00:06 493872 socket:[493872]
+2b7b38b22000-2b7b39322000 rwxs 00000000 00:06 493872 socket:[493872]
+2b7b4439f000-2b7b45ea1000 rwxp 00000000 00:00 0
+7f31e7d9f000-7f31e7f29000 r-xp 00000000 fd:00 917531 /lib64/libc-1.13.so
+7f31e7f29000-7f31e8128000 ---p 0018a000 fd:00 917531 /lib64/libc-1.13.so
+7f31e8128000-7f31e812c000 r--p 00189000 fd:00 917531 /lib64/libc-1.13.so
+7f31e812c000-7f31e812d000 rw-p 0018d000 fd:00 917531 /lib64/libc-1.13.so
+7f31e812d000-7f31e8132000 rw-p 00000000 00:00 0
+7f31ea3f9000-7f31ea3fc000 rw-s 00000000 00:09 3744 anon_inode:kvm-vcpu
+7f31ea3fc000-7f31ea3ff000 rw-s 00000000 00:09 3744 anon_inode:kvm-vcpu
+7f31ea400000-7f31ea402000 rw-p 00000000 00:00 0
+7fff26cf7000-7fff26d0c000 rwxp 00000000 00:00 0 [stack]
+7fff26dff000-7fff26e00000 r-xp 00000000 00:00 0 [vdso]
+ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
+EOF
+
+testrun_compare ${abs_top_builddir}/src/unstrip -n -M testmaps <<\EOF
+0x400000+0x22b2000 - - - /opt/TestBins/bin/arwijn
+0x7f31e7d9f000+0x38e000 - - - /lib64/libc-1.13.so
+EOF
+
+exit 0
diff --git a/src/tests/run-unstrip-n.sh b/src/tests/run-unstrip-n.sh
new file mode 100755
index 00000000..37cbd607
--- /dev/null
+++ b/src/tests/run-unstrip-n.sh
@@ -0,0 +1,76 @@
+#! /bin/sh
+# Copyright (C) 2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=805447
+# eu-unstrip emits garbage for librt.so.1
+#
+# #include <stdio.h>
+# #include <sys/mman.h>
+#
+# int main(int argc, char **argv)
+# {
+# // Yes, this crashes... That is the point.
+# return shm_open(argv[1], 0, 0);
+# }
+#
+# gcc -m32 -o rt_crash -lrt rt_crash.c
+
+testfiles testcore-rtlib testcore-rtlib-ppc
+
+testrun_compare ${abs_top_builddir}/src/unstrip -n --core=testcore-rtlib <<\EOF
+0x8048000+0x2000 f1c600bc36cb91bf01f9a63a634ecb79aa4c3199@0x8048178 . - [exe]
+0xf75e9000+0x1a000 29a103420abe341e92072fb14274e250e4072148@0xf75e9164 - - libpthread.so.0
+0xf7603000+0x1b0000 0b9bf374699e141e5dfc14757ff42b8c2373b4de@0xf7603184 - - libc.so.6
+0xf77b3000+0x9000 c6c5b5e35ab9589d4762ac85b4bd56b1b2720e37@0xf77b3164 - - librt.so.1
+0xf77d6000+0x1000 676560b1b765cde9c2e53f134f4ee354ea894747@0xf77d6210 . - linux-gate.so.1
+0xf77d7000+0x21000 6d2cb32650054f1c176d01d48713a4a5e5e84c1a@0xf77d7124 - - ld-linux.so.2
+EOF
+
+testrun_compare ${abs_top_builddir}/src/unstrip -n --core=testcore-rtlib-ppc <<\EOF
+0x100000+0x10000 708b900b05176964512a6b0fe90c2a0c9d73d726@0x100334 . - linux-vdso32.so.1
+0xfd50000+0x30000 3f7d21508470322d2f47acddc20ab10516edba99@0xfd50164 . - librt.so.1
+0xfdb0000+0x40000 f6ee91d4c629bc7dacc10534cb30056914e7e0b5@0xfdb0164 - - libpthread.so.0
+0xfdf0000+0x1c0000 edf3dd232e09d01b90683889bd16b9406c52d4de@0xfdf0184 - - libc.so.6
+0xffb0000+0x50000 edec437a85026a1cf8cda94003706202733130c1@0xffb0124 - - ld.so.1
+0x10000000+0x20000 979b7a26747cc09bd84a42b311b5288c704baea5@0x10000174 . - [exe]
+EOF
+
+# FAIL was 0x7f67f2caf000 for test-core-lib.so .
+# /lib64/libc.so.6 and /lib64/ld-linux-x86-64.so.2 from link map
+# do not have ELF header stored in the core file.
+# ELF headers in the core file:
+# Offset VirtAddr
+# 0x014000 0x00007f67f2caf000 ./test-core-lib.so
+# 0x03a000 0x00007fff1596c000 linux-vdso.so.1
+testfiles test-core.core test-core.exec
+rm -f test-core-lib.so
+outfile=test-core.out
+testrun_out $outfile ${abs_top_builddir}/src/unstrip -n -e test-core.exec --core=test-core.core
+outfile2=test-core.out2
+remove_files="$remove_files $outfile2"
+grep -v libc.so.6 $outfile | sort >$outfile2
+diff -u $outfile2 - <<EOF
+0x400000+0x202038 - test-core.exec - test-core.exec
+0x7f67f2aaf000+0x202000 - . - /home/jkratoch/redhat/elfutils-libregr/test-core-lib.so
+0x7fff1596c000+0x1000 a9cf37f53897b5468ee018655760be61b8633d3c@0x7fff1596c340 . - linux-vdso.so.1
+EOF
+
+test_cleanup
+
+exit 0
diff --git a/src/tests/run-unstrip-test.sh b/src/tests/run-unstrip-test.sh
new file mode 100755
index 00000000..dc7d3a42
--- /dev/null
+++ b/src/tests/run-unstrip-test.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Copyright (C) 2007-2010 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+original=${original:-testfile12}
+stripped=${stripped:-testfile17}
+debugfile=${debugfile:-${stripped}.debug}
+
+testfiles $original $stripped $debugfile
+tempfiles testfile.unstrip testfile.inplace
+
+# These are old reference output from run-test-strip6.sh, when
+# strip left the .debug file with unchanged sh_size in
+# stripped sections that shrank in the stripped file. strip
+# no longer does that, but unstrip must still handle it.
+
+testrun ${abs_top_builddir}/src/unstrip -o testfile.unstrip $stripped $debugfile
+
+testrun ${abs_top_builddir}/src/elfcmp --hash-inexact $original testfile.unstrip
+
+# Also test modifying the file in place.
+
+rm -f testfile.inplace
+cp $debugfile testfile.inplace
+chmod 644 testfile.inplace
+testrun ${abs_top_builddir}/src/unstrip $stripped testfile.inplace
+
+testrun ${abs_top_builddir}/src/elfcmp --hash-inexact $original testfile.inplace
diff --git a/src/tests/run-unstrip-test2.sh b/src/tests/run-unstrip-test2.sh
new file mode 100755
index 00000000..44074c19
--- /dev/null
+++ b/src/tests/run-unstrip-test2.sh
@@ -0,0 +1,5 @@
+original=testfile11
+stripped=testfile15
+debugfile=testfile15.debug
+
+. $srcdir/run-unstrip-test.sh
diff --git a/src/tests/run-varlocs.sh b/src/tests/run-varlocs.sh
new file mode 100755
index 00000000..9c4b313e
--- /dev/null
+++ b/src/tests/run-varlocs.sh
@@ -0,0 +1,128 @@
+#! /bin/sh
+# Copyright (C) 2013 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# See the source files testfile_const_type.c testfile_implicit_value.c
+# testfile_entry_value.c testfile_parameter_ref.c testfile_implicit_pointer.c
+# how to regenerate the test files (needs GCC 4.8+).
+
+testfiles testfile_const_type testfile_implicit_value testfile_entry_value
+testfiles testfile_parameter_ref testfile_implicit_pointer
+
+testrun_compare ${abs_top_builddir}/tests/varlocs -e testfile_const_type <<\EOF
+module 'testfile_const_type'
+[b] CU 'const_type.c'@0
+ [33] function 'f1'@80483f0
+ frame_base: {call_frame_cfa {bregx(4,4)}}
+ [4b] parameter 'd'
+ [80483f0,804841b) {fbreg(0)}
+ [57] variable 'w'
+ [80483f0,804841b) {fbreg(0), GNU_deref_type(8){long long int,signed,64@[25]}, GNU_const_type{long long int,signed,64@[25]}(8)[0000806745230100], div, GNU_convert{long long unsigned int,unsigned,64@[2c]}, stack_value}
+ [7d] function 'main'@80482f0
+ frame_base: {call_frame_cfa {bregx(4,4)}}
+EOF
+
+testrun_compare ${abs_top_builddir}/tests/varlocs -e testfile_implicit_value <<\EOF
+module 'testfile_implicit_value'
+[b] CU 'implicit_value.c'@0
+ [25] function 'foo'@80483f0
+ frame_base: {call_frame_cfa {bregx(4,4)}}
+ [3e] variable 'a'
+ [80483f0,80483f6) {implicit_value(8){0200000000000000}, piece(8), implicit_value(8){1500000000000000}, piece(8)}
+ [86] function 'main'@80482f0
+ frame_base: {call_frame_cfa {bregx(4,4)}}
+EOF
+
+testrun_compare ${abs_top_builddir}/tests/varlocs -e testfile_entry_value <<\EOF
+module 'testfile_entry_value'
+[b] CU 'entry_value.c'@0
+ [29] function 'foo'@400500
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [4a] parameter 'x'
+ [400500,400504) {reg5}
+ [55] parameter 'y'
+ [400500,400504) {reg4}
+ [68] function 'bar'@400510
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [89] parameter 'x'
+ [400510,40051c) {reg5}
+ [40051c,40052b) {reg6}
+ [40052b,400531) {GNU_entry_value(1) {reg5}, stack_value}
+ [96] parameter 'y'
+ [400510,40051c) {reg4}
+ [40051c,40052a) {reg3}
+ [40052a,400531) {GNU_entry_value(1) {reg4}, stack_value}
+ [a3] variable 'z'
+ [400524,400528) {reg0}
+ [400528,400529) {reg12}
+ [400529,40052e) {breg0(0), breg12(0), plus, stack_value}
+ [40052e,400531) {reg0}
+ [e9] function 'main'@400400
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [10a] parameter 'argc'
+ [400400,400406) {reg5}
+ [400406,40040a) {breg5(-1), stack_value}
+ [40040a,40040b) {GNU_entry_value(1) {reg5}, stack_value}
+ [119] parameter 'argv'
+ [400400,400403) {reg4}
+ [400403,40040b) {GNU_entry_value(1) {reg4}, stack_value}
+EOF
+
+testrun_compare ${abs_top_builddir}/tests/varlocs -e testfile_parameter_ref <<\EOF
+module 'testfile_parameter_ref'
+[b] CU 'parameter_ref.c'@0
+ [77] function 'foo'@400510
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [92] parameter 'x'
+ [400510,400523) {reg5}
+ [99] parameter 'y'
+ [400510,400523) {GNU_parameter_ref[42], stack_value}
+ [a5] variable 'a'
+ [400510,400523) {breg5(0), lit1, shl, stack_value}
+ [b0] variable 'b'
+ [400510,400523) {GNU_parameter_ref[42], lit1, shl, stack_value}
+ [be] variable 'c'
+ <constant value>
+ [c4] parameter 'z'
+ <constant value>
+ [cb] function 'main'@400400
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [ec] parameter 'x'
+ [400400,400408) {reg5}
+ [400408,400421) {reg3}
+ [400421,400423) {GNU_entry_value(1) {reg5}, stack_value}
+ [f9] parameter 'argv'
+ [400400,400408) {reg4}
+ [400408,400423) {GNU_entry_value(1) {reg4}, stack_value}
+EOF
+
+testrun_compare ${abs_top_builddir}/tests/varlocs -e testfile_implicit_pointer <<\EOF
+module 'testfile_implicit_pointer'
+[b] CU 'implicit_pointer.c'@0
+ [29] function 'foo'@400500
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [4a] parameter 'i'
+ [400500,400503) {reg5}
+ [55] variable 'p'
+ [400500,400503) {GNU_implicit_pointer([4a],0) {reg5}}
+ [73] function 'main'@400400
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+EOF
+
+
+exit 0
diff --git a/src/tests/saridx.c b/src/tests/saridx.c
new file mode 100644
index 00000000..8a450d82
--- /dev/null
+++ b/src/tests/saridx.c
@@ -0,0 +1,257 @@
+/* Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1998.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <error.h>
+#include <fcntl.h>
+#include <gelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+
+static const char *machines[] =
+{
+#define MACHINE(name) [name] = #name
+ MACHINE (EM_NONE),
+ MACHINE (EM_M32),
+ MACHINE (EM_SPARC),
+ MACHINE (EM_386),
+ MACHINE (EM_68K),
+ MACHINE (EM_88K),
+ MACHINE (EM_860),
+ MACHINE (EM_MIPS),
+ MACHINE (EM_MIPS_RS3_LE),
+ MACHINE (EM_PARISC),
+ MACHINE (EM_VPP500),
+ MACHINE (EM_SPARC32PLUS),
+ MACHINE (EM_960),
+ MACHINE (EM_PPC),
+ MACHINE (EM_PPC64),
+ MACHINE (EM_V800),
+ MACHINE (EM_FR20),
+ MACHINE (EM_RH32),
+ MACHINE (EM_RCE),
+ MACHINE (EM_ARM),
+ MACHINE (EM_FAKE_ALPHA),
+ MACHINE (EM_SH),
+ MACHINE (EM_SPARCV9),
+ MACHINE (EM_TRICORE),
+ MACHINE (EM_ARC),
+ MACHINE (EM_H8_300),
+ MACHINE (EM_H8_300H),
+ MACHINE (EM_H8S),
+ MACHINE (EM_H8_500),
+ MACHINE (EM_IA_64),
+ MACHINE (EM_MIPS_X),
+ MACHINE (EM_COLDFIRE),
+ MACHINE (EM_68HC12),
+ MACHINE (EM_MMA),
+ MACHINE (EM_PCP),
+ MACHINE (EM_NCPU),
+ MACHINE (EM_NDR1),
+ MACHINE (EM_STARCORE),
+ MACHINE (EM_ME16),
+ MACHINE (EM_ST100),
+ MACHINE (EM_TINYJ),
+ MACHINE (EM_FX66),
+ MACHINE (EM_ST9PLUS),
+ MACHINE (EM_ST7),
+ MACHINE (EM_68HC16),
+ MACHINE (EM_68HC11),
+ MACHINE (EM_68HC08),
+ MACHINE (EM_68HC05),
+ MACHINE (EM_SVX),
+ MACHINE (EM_ST19),
+ MACHINE (EM_VAX)
+};
+
+
+int
+main (int argc, char *argv[])
+{
+ int fd;
+ Elf *elf;
+ Elf_Cmd cmd;
+ size_t n;
+ int arg = 1;
+ int verbose = 0;
+
+ /* Recognize optional verbosity flag. */
+ if (arg < argc && strcmp (argv[arg], "-v") == 0)
+ {
+ verbose = 1;
+ ++arg;
+ }
+
+ /* Any more arguments available. */
+ if (arg >= argc)
+ error (EXIT_FAILURE, 0, "No input file given");
+
+ /* Open the input file. */
+ fd = open (argv[arg], O_RDONLY);
+ if (fd == -1)
+ {
+ perror ("cannot open input file");
+ exit (1);
+ }
+
+ /* Set the ELF version we are using here. */
+ if (elf_version (EV_CURRENT) == EV_NONE)
+ {
+ puts ("ELF library too old");
+ exit (1);
+ }
+
+ /* Start reading the file. */
+ cmd = ELF_C_READ;
+ elf = elf_begin (fd, cmd, NULL);
+ if (elf == NULL)
+ {
+ printf ("elf_begin: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* If it is no archive punt. */
+ if (elf_kind (elf) != ELF_K_AR)
+ {
+ printf ("%s is not an archive\n", argv[1]);
+ exit (1);
+ }
+
+ if (verbose)
+ {
+ /* The verbose variant. We print a lot of information. */
+ Elf *subelf;
+ char buf[100];
+ time_t t;
+
+ /* Get the elements of the archive one after the other. */
+ while ((subelf = elf_begin (fd, cmd, elf)) != NULL)
+ {
+ /* The the header for this element. */
+ Elf_Arhdr *arhdr = elf_getarhdr (subelf);
+
+ if (arhdr == NULL)
+ {
+ printf ("cannot get arhdr: %s\n", elf_errmsg (-1));
+ break;
+ }
+
+ switch (elf_kind (subelf))
+ {
+ case ELF_K_ELF:
+ fputs ("ELF file:\n", stdout);
+ break;
+
+ case ELF_K_AR:
+ fputs ("archive:\n", stdout);
+ break;
+
+ default:
+ fputs ("unknown file:\n", stdout);
+ break;
+ }
+
+ /* Print general information. */
+ t = arhdr->ar_date;
+ strftime (buf, sizeof buf, "%Y-%m-%dT%H:%M:%S%z", gmtime (&t));
+ printf (" name : \"%s\"\n"
+ " time : %s\n"
+ " uid : %ld\n"
+ " gid : %ld\n"
+ " mode : %o\n"
+ " size : %ld\n"
+ " rawname : \"%s\"\n",
+ arhdr->ar_name,
+ buf,
+ (long int) arhdr->ar_uid,
+ (long int) arhdr->ar_gid,
+ arhdr->ar_mode,
+ (long int) arhdr->ar_size,
+ arhdr->ar_rawname);
+
+ /* For ELF files we can provide some more information. */
+ if (elf_kind (subelf) == ELF_K_ELF)
+ {
+ GElf_Ehdr ehdr;
+
+ /* Get the ELF header. */
+ if (gelf_getehdr (subelf, &ehdr) == NULL)
+ printf (" *** cannot get ELF header: %s\n", elf_errmsg (-1));
+ else
+ {
+ printf (" binary class : %s\n",
+ ehdr.e_ident[EI_CLASS] == ELFCLASS32
+ ? "ELFCLASS32" : "ELFCLASS64");
+ printf (" data encoding: %s\n",
+ ehdr.e_ident[EI_DATA] == ELFDATA2LSB
+ ? "ELFDATA2LSB" : "ELFDATA2MSB");
+ printf (" binary type : %s\n",
+ ehdr.e_type == ET_REL
+ ? "relocatable"
+ : (ehdr.e_type == ET_EXEC
+ ? "executable"
+ : (ehdr.e_type == ET_DYN
+ ? "dynamic"
+ : "core file")));
+ printf (" machine : %s\n",
+ (ehdr.e_machine >= (sizeof (machines)
+ / sizeof (machines[0]))
+ || machines[ehdr.e_machine] == NULL)
+ ? "???"
+ : machines[ehdr.e_machine]);
+ }
+ }
+
+ /* Get next archive element. */
+ cmd = elf_next (subelf);
+ if (elf_end (subelf) != 0)
+ printf ("error while freeing sub-ELF descriptor: %s\n",
+ elf_errmsg (-1));
+ }
+ }
+ else
+ {
+ /* The simple version. Only print a bit of information. */
+ Elf_Arsym *arsym = elf_getarsym (elf, &n);
+
+ if (n == 0)
+ printf ("no symbol table in archive: %s\n", elf_errmsg (-1));
+ else
+ {
+ --n;
+
+ while (n-- > 0)
+ printf ("name = \"%s\", offset = %ld, hash = %lx\n",
+ arsym[n].as_name, (long int) arsym[n].as_off,
+ arsym[n].as_hash);
+ }
+ }
+
+ /* Free the ELF handle. */
+ if (elf_end (elf) != 0)
+ printf ("error while freeing ELF descriptor: %s\n", elf_errmsg (-1));
+
+ /* Close the underlying file. */
+ close (fd);
+
+ return 0;
+}
diff --git a/src/tests/scnnames.c b/src/tests/scnnames.c
new file mode 100644
index 00000000..7f268258
--- /dev/null
+++ b/src/tests/scnnames.c
@@ -0,0 +1,91 @@
+/* Copyright (C) 1998, 1999, 2000, 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1998.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <gelf.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+int
+main (int argc, char *argv[])
+{
+ Elf *elf;
+ int fd;
+ GElf_Ehdr ehdr;
+ size_t strndx;
+ Elf_Scn *scn;
+
+ if (argc < 2)
+ {
+ puts ("missing parameter");
+ exit (1);
+ }
+
+ fd = open (argv[1], O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("cannot open \"%s\": %s\n", argv[1], strerror (errno));
+ exit (1);
+ }
+
+ elf_version (EV_CURRENT);
+
+ elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot open ELF file: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ if (elf_kind (elf) != ELF_K_ELF)
+ {
+ printf ("\"%s\" is not an ELF file\n", argv[1]);
+ exit (1);
+ }
+
+ if (gelf_getehdr (elf, &ehdr) == NULL)
+ {
+ printf ("cannot get the ELF header: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ strndx = ehdr.e_shstrndx;
+
+ scn = NULL;
+ while ((scn = elf_nextscn (elf, scn)) != NULL)
+ {
+ char *name = NULL;
+ GElf_Shdr shdr;
+
+ if (gelf_getshdr (scn, &shdr) != NULL)
+ name = elf_strptr (elf, strndx, (size_t) shdr.sh_name);
+
+ printf ("section: `%s'\n", name);
+ }
+
+ if (elf_end (elf) != 0)
+ {
+ printf ("error while freeing ELF descriptor: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ return 0;
+}
diff --git a/src/tests/sectiondump.c b/src/tests/sectiondump.c
new file mode 100644
index 00000000..f8659549
--- /dev/null
+++ b/src/tests/sectiondump.c
@@ -0,0 +1,182 @@
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1998.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <errno.h>
+#include <error.h>
+#include <fcntl.h>
+#include <gelf.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+
+/* Prototypes for local functions. */
+static int handle_section (Elf *elf, Elf_Scn *scn);
+static void print_bytes (Elf_Data *data);
+static void print_symtab (Elf *elf, Elf_Data *data);
+
+
+int
+main (int argc, char *argv[])
+{
+ Elf *elf;
+ int fd;
+ int cnt;
+
+ if (argc <= 1)
+ exit (1);
+
+ /* Open the test file. This is given as the first parameter to the
+ program. */
+ fd = open (argv[1], O_RDONLY);
+ if (fd == -1)
+ error (EXIT_FAILURE, errno, "cannot open input file `%s'", argv[1]);
+
+ /* Set the library versio we expect. */
+ elf_version (EV_CURRENT);
+
+ /* Create the ELF descriptor. */
+ elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ error (EXIT_FAILURE, 0, "cannot create ELF descriptor: %s",
+ elf_errmsg (0));
+
+ /* Now proces all the sections mentioned in the rest of the command line. */
+ for (cnt = 2; cnt < argc; ++cnt)
+ if (handle_section (elf, elf_getscn (elf, atoi (argv[cnt]))) != 0)
+ /* When we encounter an error stop immediately. */
+ error (EXIT_FAILURE, 0, "while processing section %d: %s", cnt,
+ elf_errmsg (0));
+
+ /* Close the descriptor. */
+ if (elf_end (elf) != 0)
+ error (EXIT_FAILURE, 0, "failure while closing ELF descriptor: %s",
+ elf_errmsg (0));
+
+ return 0;
+}
+
+
+static int
+handle_section (Elf *elf, Elf_Scn *scn)
+{
+ GElf_Ehdr *ehdr;
+ GElf_Ehdr ehdr_mem;
+ GElf_Shdr *shdr;
+ GElf_Shdr shdr_mem;
+ Elf_Data *data;
+
+ /* First get the ELF and section header. */
+ ehdr = gelf_getehdr (elf, &ehdr_mem);
+ shdr = gelf_getshdr (scn, &shdr_mem);
+ if (ehdr == NULL || shdr == NULL)
+ return 1;
+
+ /* Print the information from the ELF section header. */
+ printf ("name = %s\n"
+ "type = %" PRId32 "\n"
+ "flags = %" PRIx64 "\n"
+ "addr = %" PRIx64 "\n"
+ "offset = %" PRIx64 "\n"
+ "size = %" PRId64 "\n"
+ "link = %" PRId32 "\n"
+ "info = %" PRIx32 "\n"
+ "addralign = %" PRIx64 "\n"
+ "entsize = %" PRId64 "\n",
+ elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name),
+ shdr->sh_type,
+ shdr->sh_flags,
+ shdr->sh_addr,
+ shdr->sh_offset,
+ shdr->sh_size,
+ shdr->sh_link,
+ shdr->sh_info,
+ shdr->sh_addralign,
+ shdr->sh_entsize);
+
+ /* Get the section data now. */
+ data = elf_getdata (scn, NULL);
+ if (data == NULL)
+ return 1;
+
+ /* Now proces the different section types accordingly. */
+ switch (shdr->sh_type)
+ {
+ case SHT_SYMTAB:
+ print_symtab (elf, data);
+ break;
+
+ case SHT_PROGBITS:
+ default:
+ print_bytes (data);
+ break;
+ }
+
+ /* Separate form the next section. */
+ puts ("");
+
+ /* All done correctly. */
+ return 0;
+}
+
+
+static void
+print_bytes (Elf_Data *data)
+{
+ size_t size = data->d_size;
+ off_t offset = data->d_off;
+ unsigned char *buf = (unsigned char *) data->d_buf;
+ size_t cnt;
+
+ for (cnt = 0; cnt < size; cnt += 16)
+ {
+ size_t inner;
+
+ printf ("%*Zx: ", sizeof (size_t) == 4 ? 8 : 16, (size_t) offset + cnt);
+
+ for (inner = 0; inner < 16 && cnt + inner < size; ++inner)
+ printf (" %02hhx", buf[cnt + inner]);
+
+ puts ("");
+ }
+}
+
+
+static void
+print_symtab (Elf *elf, Elf_Data *data)
+{
+ int class = gelf_getclass (elf);
+ size_t nsym = data->d_size / (class == ELFCLASS32
+ ? sizeof (Elf32_Sym) : sizeof (Elf64_Sym));
+ size_t cnt;
+
+ for (cnt = 0; cnt < nsym; ++cnt)
+ {
+ GElf_Sym sym_mem;
+ GElf_Sym *sym = gelf_getsym (data, cnt, &sym_mem);
+
+ printf ("%5Zu: %*" PRIx64 " %6" PRIx64 " %4d\n",
+ cnt,
+ class == ELFCLASS32 ? 8 : 16,
+ sym->st_value,
+ sym->st_size,
+ GELF_ST_TYPE (sym->st_info));
+ }
+}
diff --git a/src/tests/show-abbrev.c b/src/tests/show-abbrev.c
new file mode 100644
index 00000000..b0af0297
--- /dev/null
+++ b/src/tests/show-abbrev.c
@@ -0,0 +1,131 @@
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1998.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <fcntl.h>
+#include <inttypes.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <unistd.h>
+
+
+int
+main (int argc, char *argv[])
+{
+ int cnt;
+
+ for (cnt = 1; cnt < argc; ++cnt)
+ {
+ int fd = open (argv[cnt], O_RDONLY);
+ Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ);
+ if (dbg == NULL)
+ {
+ printf ("%s not usable: %s\n", argv[cnt], dwarf_errmsg (-1));
+ close (fd);
+ continue;
+ }
+
+ Dwarf_Off cuoff = 0;
+ Dwarf_Off old_cuoff = 0;
+ size_t hsize;
+ while (dwarf_nextcu (dbg, cuoff, &cuoff, &hsize, NULL, NULL, NULL) == 0)
+ {
+ /* Get the DIE for the CU. */
+ Dwarf_Die die;
+ if (dwarf_offdie (dbg, old_cuoff + hsize, &die) == NULL)
+ /* Something went wrong. */
+ break;
+
+ Dwarf_Off offset = 0;
+
+ while (1)
+ {
+ size_t length;
+ Dwarf_Abbrev *abbrev = dwarf_getabbrev (&die, offset, &length);
+ if (abbrev == NULL || abbrev == DWARF_END_ABBREV)
+ /* End of the list. */
+ break;
+
+ unsigned tag = dwarf_getabbrevtag (abbrev);
+ if (tag == 0)
+ {
+ printf ("dwarf_getabbrevtag at offset %llu returned error: %s\n",
+ (unsigned long long int) offset,
+ dwarf_errmsg (-1));
+ break;
+ }
+
+ unsigned code = dwarf_getabbrevcode (abbrev);
+ if (code == 0)
+ {
+ printf ("dwarf_getabbrevcode at offset %llu returned error: %s\n",
+ (unsigned long long int) offset,
+ dwarf_errmsg (-1));
+ break;
+ }
+
+ int children = dwarf_abbrevhaschildren (abbrev);
+ if (children < 0)
+ {
+ printf ("dwarf_abbrevhaschildren at offset %llu returned error: %s\n",
+ (unsigned long long int) offset,
+ dwarf_errmsg (-1));
+ break;
+ }
+
+ printf ("abbrev[%llu]: code = %u, tag = %u, children = %d\n",
+ (unsigned long long int) offset, code, tag, children);
+
+ size_t attrcnt;
+ if (dwarf_getattrcnt (abbrev, &attrcnt) != 0)
+ {
+ printf ("dwarf_getattrcnt at offset %llu returned error: %s\n",
+ (unsigned long long int) offset,
+ dwarf_errmsg (-1));
+ break;
+ }
+
+ unsigned int attr_num;
+ unsigned int attr_form;
+ Dwarf_Off aboffset;
+ size_t j;
+ for (j = 0; j < attrcnt; ++j)
+ if (dwarf_getabbrevattr (abbrev, j, &attr_num, &attr_form,
+ &aboffset))
+ printf ("dwarf_getabbrevattr for abbrev[%llu] and index %zu failed\n",
+ (unsigned long long int) offset, j);
+ else
+ printf ("abbrev[%llu]: attr[%zu]: code = %u, form = %u, offset = %" PRIu64 "\n",
+ (unsigned long long int) offset, j, attr_num,
+ attr_form, (uint64_t) aboffset);
+
+ offset += length;
+ }
+
+ old_cuoff = cuoff;
+ }
+
+ if (dwarf_end (dbg) != 0)
+ printf ("dwarf_end failed for %s: %s\n", argv[cnt],
+ dwarf_errmsg (-1));
+
+ close (fd);
+ }
+
+ return 0;
+}
diff --git a/src/tests/show-die-info.c b/src/tests/show-die-info.c
new file mode 100644
index 00000000..0c298acd
--- /dev/null
+++ b/src/tests/show-die-info.c
@@ -0,0 +1,358 @@
+/* Copyright (C) 1998-2002, 2004, 2006, 2012 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1998.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <dwarf.h>
+#include <inttypes.h>
+#include <libelf.h>
+#include ELFUTILS_HEADER(dw)
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "../libdw/known-dwarf.h"
+
+static const char *
+dwarf_tag_string (unsigned int tag)
+{
+ switch (tag)
+ {
+#define ONE_KNOWN_DW_TAG(NAME, CODE) case CODE: return #NAME;
+ ALL_KNOWN_DW_TAG
+#undef ONE_KNOWN_DW_TAG
+ default:
+ return NULL;
+ }
+}
+
+static const char *
+dwarf_attr_string (unsigned int attrnum)
+{
+ switch (attrnum)
+ {
+#define ONE_KNOWN_DW_AT(NAME, CODE) case CODE: return #NAME;
+ ALL_KNOWN_DW_AT
+#undef ONE_KNOWN_DW_AT
+ default:
+ return NULL;
+ }
+}
+
+
+void
+handle (Dwarf *dbg, Dwarf_Die *die, int n)
+{
+ Dwarf_Die child;
+ unsigned int tag;
+ const char *str;
+ char buf[30];
+ const char *name;
+ Dwarf_Off off;
+ Dwarf_Off cuoff;
+ size_t cnt;
+ Dwarf_Addr addr;
+ int i;
+
+ tag = dwarf_tag (die);
+ if (tag != DW_TAG_invalid)
+ {
+ str = dwarf_tag_string (tag);
+ if (str == NULL)
+ {
+ snprintf (buf, sizeof buf, "%#x", tag);
+ str = buf;
+ }
+ }
+ else
+ str = "* NO TAG *";
+
+ name = dwarf_diename (die);
+ if (name == 0)
+ name = "* NO NAME *";
+
+ off = dwarf_dieoffset (die);
+ cuoff = dwarf_cuoffset (die);
+
+ printf ("%*sDW_TAG_%s\n", n * 5, "", str);
+ printf ("%*s Name : %s\n", n * 5, "", name);
+ printf ("%*s Offset : %lld\n", n * 5, "", (long long int) off);
+ printf ("%*s CU offset : %lld\n", n * 5, "", (long long int) cuoff);
+
+ printf ("%*s Attrs :", n * 5, "");
+ for (cnt = 0; cnt < 0xffff; ++cnt)
+ if (dwarf_hasattr (die, cnt))
+ printf (" %s", dwarf_attr_string (cnt));
+ puts ("");
+
+ if (dwarf_hasattr (die, DW_AT_low_pc) && dwarf_lowpc (die, &addr) == 0)
+ {
+ Dwarf_Attribute attr;
+ Dwarf_Addr addr2;
+ printf ("%*s low PC : %#llx\n",
+ n * 5, "", (unsigned long long int) addr);
+
+ if (dwarf_attr (die, DW_AT_low_pc, &attr) == NULL
+ || dwarf_formaddr (&attr, &addr2) != 0
+ || addr != addr2)
+ puts ("************* DW_AT_low_pc verify failed ************");
+ else if (! dwarf_hasform (&attr, DW_FORM_addr))
+ puts ("************* DW_AT_low_pc form failed ************");
+ else if (dwarf_whatform (&attr) != DW_FORM_addr)
+ puts ("************* DW_AT_low_pc form (2) failed ************");
+ else if (dwarf_whatattr (&attr) != DW_AT_low_pc)
+ puts ("************* DW_AT_low_pc attr failed ************");
+ }
+ if (dwarf_hasattr (die, DW_AT_high_pc) && dwarf_highpc (die, &addr) == 0)
+ {
+ Dwarf_Attribute attr;
+ Dwarf_Addr addr2;
+ printf ("%*s high PC : %#llx\n",
+ n * 5, "", (unsigned long long int) addr);
+ if (dwarf_attr (die, DW_AT_high_pc, &attr) == NULL
+ || dwarf_formaddr (&attr, &addr2) != 0
+ || addr != addr2)
+ puts ("************* DW_AT_high_pc verify failed ************");
+ else if (! dwarf_hasform (&attr, DW_FORM_addr))
+ puts ("************* DW_AT_high_pc form failed ************");
+ else if (dwarf_whatform (&attr) != DW_FORM_addr)
+ puts ("************* DW_AT_high_pc form (2) failed ************");
+ else if (dwarf_whatattr (&attr) != DW_AT_high_pc)
+ puts ("************* DW_AT_high_pc attr failed ************");
+ }
+
+ if (dwarf_hasattr (die, DW_AT_byte_size) && (i = dwarf_bytesize (die)) != -1)
+ {
+ Dwarf_Attribute attr;
+ Dwarf_Word u2;
+ unsigned int u;
+ printf ("%*s byte size : %d\n", n * 5, "", i);
+ if (dwarf_attr (die, DW_AT_byte_size, &attr) == NULL
+ || dwarf_formudata (&attr, &u2) != 0
+ || i != (int) u2)
+ puts ("************* DW_AT_byte_size verify failed ************");
+ else if (! dwarf_hasform (&attr, DW_FORM_data1)
+ && ! dwarf_hasform (&attr, DW_FORM_data2)
+ && ! dwarf_hasform (&attr, DW_FORM_data4)
+ && ! dwarf_hasform (&attr, DW_FORM_data8)
+ && ! dwarf_hasform (&attr, DW_FORM_sdata)
+ && ! dwarf_hasform (&attr, DW_FORM_udata))
+ puts ("************* DW_AT_byte_size form failed ************");
+ else if ((u = dwarf_whatform (&attr)) == 0
+ || (u != DW_FORM_data1
+ && u != DW_FORM_data2
+ && u != DW_FORM_data4
+ && u != DW_FORM_data8
+ && u != DW_FORM_sdata
+ && u != DW_FORM_udata))
+ puts ("************* DW_AT_byte_size form (2) failed ************");
+ else if (dwarf_whatattr (&attr) != DW_AT_byte_size)
+ puts ("************* DW_AT_byte_size attr failed ************");
+ }
+ if (dwarf_hasattr (die, DW_AT_bit_size) && (i = dwarf_bitsize (die)) != -1)
+ {
+ Dwarf_Attribute attr;
+ Dwarf_Word u2;
+ unsigned int u;
+ printf ("%*s bit size : %d\n", n * 5, "", i);
+ if (dwarf_attr (die, DW_AT_bit_size, &attr) == NULL
+ || dwarf_formudata (&attr, &u2) != 0
+ || i != (int) u2)
+ puts ("************* DW_AT_bit_size test failed ************");
+ else if (! dwarf_hasform (&attr, DW_FORM_data1)
+ && ! dwarf_hasform (&attr, DW_FORM_data2)
+ && ! dwarf_hasform (&attr, DW_FORM_data4)
+ && ! dwarf_hasform (&attr, DW_FORM_data8)
+ && ! dwarf_hasform (&attr, DW_FORM_sdata)
+ && ! dwarf_hasform (&attr, DW_FORM_udata))
+ puts ("************* DW_AT_bit_size form failed ************");
+ else if ((u = dwarf_whatform (&attr)) == 0
+ || (u != DW_FORM_data1
+ && u != DW_FORM_data2
+ && u != DW_FORM_data4
+ && u != DW_FORM_data8
+ && u != DW_FORM_sdata
+ && u != DW_FORM_udata))
+ puts ("************* DW_AT_bit_size form (2) failed ************");
+ else if (dwarf_whatattr (&attr) != DW_AT_bit_size)
+ puts ("************* DW_AT_bit_size attr failed ************");
+ }
+ if (dwarf_hasattr (die, DW_AT_bit_offset)
+ && (i = dwarf_bitoffset (die)) != -1)
+ {
+ Dwarf_Attribute attr;
+ Dwarf_Word u2;
+ unsigned int u;
+ printf ("%*s bit offset: %d\n", n * 5, "", i);
+ if (dwarf_attr (die, DW_AT_bit_offset, &attr) == NULL
+ || dwarf_formudata (&attr, &u2) != 0
+ || i != (int) u2)
+ puts ("************* DW_AT_bit_offset test failed ************");
+ else if (! dwarf_hasform (&attr, DW_FORM_data1)
+ && ! dwarf_hasform (&attr, DW_FORM_data2)
+ && ! dwarf_hasform (&attr, DW_FORM_data4)
+ && ! dwarf_hasform (&attr, DW_FORM_data8)
+ && ! dwarf_hasform (&attr, DW_FORM_sdata)
+ && ! dwarf_hasform (&attr, DW_FORM_udata))
+ puts ("************* DW_AT_bit_offset form failed ************");
+ else if ((u = dwarf_whatform (&attr)) == 0
+ || (u != DW_FORM_data1
+ && u != DW_FORM_data2
+ && u != DW_FORM_data4
+ && u != DW_FORM_data8
+ && u != DW_FORM_sdata
+ && u != DW_FORM_udata))
+ puts ("************* DW_AT_bit_offset form (2) failed ************");
+ else if (dwarf_whatattr (&attr) != DW_AT_bit_offset)
+ puts ("************* DW_AT_bit_offset attr failed ************");
+ }
+
+ if (dwarf_hasattr (die, DW_AT_language) && (i = dwarf_srclang (die)) != -1)
+ {
+ Dwarf_Attribute attr;
+ Dwarf_Word u2;
+ unsigned int u;
+ printf ("%*s language : %d\n", n * 5, "", i);
+ if (dwarf_attr (die, DW_AT_language, &attr) == NULL
+ || dwarf_formudata (&attr, &u2) != 0
+ || i != (int) u2)
+ puts ("************* DW_AT_language test failed ************");
+ else if (! dwarf_hasform (&attr, DW_FORM_data1)
+ && ! dwarf_hasform (&attr, DW_FORM_data2)
+ && ! dwarf_hasform (&attr, DW_FORM_data4)
+ && ! dwarf_hasform (&attr, DW_FORM_data8)
+ && ! dwarf_hasform (&attr, DW_FORM_sdata)
+ && ! dwarf_hasform (&attr, DW_FORM_udata))
+ puts ("************* DW_AT_language form failed ************");
+ else if ((u = dwarf_whatform (&attr)) == 0
+ || (u != DW_FORM_data1
+ && u != DW_FORM_data2
+ && u != DW_FORM_data4
+ && u != DW_FORM_data8
+ && u != DW_FORM_sdata
+ && u != DW_FORM_udata))
+ puts ("************* DW_AT_language form (2) failed ************");
+ else if (dwarf_whatattr (&attr) != DW_AT_language)
+ puts ("************* DW_AT_language attr failed ************");
+ }
+
+ if (dwarf_hasattr (die, DW_AT_ordering)
+ && (i = dwarf_arrayorder (die)) != -1)
+ {
+ Dwarf_Attribute attr;
+ Dwarf_Word u2;
+ unsigned int u;
+ printf ("%*s ordering : %d\n", n * 5, "", i);
+ if (dwarf_attr (die, DW_AT_ordering, &attr) == NULL
+ || dwarf_formudata (&attr, &u2) != 0
+ || i != (int) u2)
+ puts ("************* DW_AT_ordering test failed ************");
+ else if (! dwarf_hasform (&attr, DW_FORM_data1)
+ && ! dwarf_hasform (&attr, DW_FORM_data2)
+ && ! dwarf_hasform (&attr, DW_FORM_data4)
+ && ! dwarf_hasform (&attr, DW_FORM_data8)
+ && ! dwarf_hasform (&attr, DW_FORM_sdata)
+ && ! dwarf_hasform (&attr, DW_FORM_udata))
+ puts ("************* DW_AT_ordering failed ************");
+ else if ((u = dwarf_whatform (&attr)) == 0
+ || (u != DW_FORM_data1
+ && u != DW_FORM_data2
+ && u != DW_FORM_data4
+ && u != DW_FORM_data8
+ && u != DW_FORM_sdata
+ && u != DW_FORM_udata))
+ puts ("************* DW_AT_ordering form (2) failed ************");
+ else if (dwarf_whatattr (&attr) != DW_AT_ordering)
+ puts ("************* DW_AT_ordering attr failed ************");
+ }
+
+ if (dwarf_hasattr (die, DW_AT_comp_dir))
+ {
+ Dwarf_Attribute attr;
+ if (dwarf_attr (die, DW_AT_comp_dir, &attr) == NULL
+ || (name = dwarf_formstring (&attr)) == NULL)
+ puts ("************* DW_AT_comp_dir attr failed ************");
+ else
+ printf ("%*s directory : %s\n", n * 5, "", name);
+ }
+
+ if (dwarf_hasattr (die, DW_AT_producer))
+ {
+ Dwarf_Attribute attr;
+ if (dwarf_attr (die, DW_AT_producer, &attr) == NULL
+ || (name = dwarf_formstring (&attr)) == NULL)
+ puts ("************* DW_AT_comp_dir attr failed ************");
+ else
+ printf ("%*s producer : %s\n", n * 5, "", name);
+ }
+
+ if (dwarf_haschildren (die) != 0 && dwarf_child (die, &child) == 0)
+ handle (dbg, &child, n + 1);
+ if (dwarf_siblingof (die, die) == 0)
+ handle (dbg, die, n);
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ int cnt;
+
+ for (cnt = 1; cnt < argc; ++cnt)
+ {
+ int fd = open (argv[cnt], O_RDONLY);
+ Dwarf *dbg;
+
+ printf ("file: %s\n", basename (argv[cnt]));
+
+ dbg = dwarf_begin (fd, DWARF_C_READ);
+ if (dbg == NULL)
+ {
+ printf ("%s not usable\n", argv[cnt]);
+ close (fd);
+ continue;
+ }
+
+ Dwarf_Off off = 0;
+ Dwarf_Off old_off = 0;
+ size_t hsize;
+ Dwarf_Off abbrev;
+ uint8_t addresssize;
+ uint8_t offsetsize;
+ while (dwarf_nextcu (dbg, off, &off, &hsize, &abbrev, &addresssize,
+ &offsetsize) == 0)
+ {
+ printf ("New CU: off = %llu, hsize = %zu, ab = %llu, as = %" PRIu8
+ ", os = %" PRIu8 "\n",
+ (unsigned long long int) old_off, hsize,
+ (unsigned long long int) abbrev, addresssize,
+ offsetsize);
+
+ Dwarf_Die die;
+ if (dwarf_offdie (dbg, old_off + hsize, &die) != NULL)
+ handle (dbg, &die, 1);
+
+ old_off = off;
+ }
+
+ dwarf_end (dbg);
+ close (fd);
+ }
+
+ return 0;
+}
diff --git a/src/tests/showptable.c b/src/tests/showptable.c
new file mode 100644
index 00000000..a794b0e8
--- /dev/null
+++ b/src/tests/showptable.c
@@ -0,0 +1,139 @@
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1998.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <gelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int
+main (int argc, char *argv[])
+{
+ Elf *elf;
+ int fd;
+ GElf_Ehdr ehdr;
+ int cnt;
+
+ if (argc < 2)
+ {
+ puts ("missing parameter");
+ exit (1);
+ }
+
+ fd = open (argv[1], O_RDONLY);
+ if (fd == -1)
+ {
+ printf ("cannot open \"%s\": %s\n", argv[1], strerror (errno));
+ exit (1);
+ }
+
+ elf_version (EV_CURRENT);
+
+ elf = elf_begin (fd, ELF_C_READ, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot open ELF file: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ if (elf_kind (elf) != ELF_K_ELF)
+ {
+ printf ("\"%s\" is not an ELF file\n", argv[1]);
+ exit (1);
+ }
+
+ if (gelf_getehdr (elf, &ehdr) == NULL)
+ {
+ printf ("cannot get the ELF header: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ printf ("idx type %*s %*s %*s %*s %*s align flags\n",
+ gelf_getclass (elf) == ELFCLASS32 ? 9 : 17, "offset",
+ gelf_getclass (elf) == ELFCLASS32 ? 10 : 18, "vaddr",
+ gelf_getclass (elf) == ELFCLASS32 ? 10 : 18, "paddr",
+ gelf_getclass (elf) == ELFCLASS32 ? 9 : 12, "filesz",
+ gelf_getclass (elf) == ELFCLASS32 ? 9 : 12, "memsz");
+
+ for (cnt = 0; cnt < ehdr.e_phnum; ++cnt)
+ {
+ static const char *typenames[] =
+ {
+ [PT_NULL] = "NULL",
+ [PT_LOAD] = "LOAD",
+ [PT_DYNAMIC] = "DYNAMIC",
+ [PT_INTERP] = "INTERP",
+ [PT_NOTE] = "NOTE",
+ [PT_SHLIB] = "SHLIB",
+ [PT_PHDR] = "PHDR"
+ };
+ GElf_Phdr mem;
+ GElf_Phdr *phdr = gelf_getphdr (elf, cnt, &mem);
+ char buf[19];
+ const char *p_type = typenames[phdr->p_type];
+
+ /* If we don't know the name of the type we use the number value. */
+ if (phdr->p_type >= PT_NUM)
+ {
+ snprintf (buf, sizeof (buf), "%x", phdr->p_type);
+ p_type = buf;
+ }
+
+ printf ("%3d %-7s %#0*llx %#0*llx %#0*llx %#0*llx %#0*llx %#6llx ",
+ cnt, p_type,
+ gelf_getclass (elf) == ELFCLASS32 ? 9 : 17,
+ (unsigned long long int) phdr->p_offset,
+ gelf_getclass (elf) == ELFCLASS32 ? 10 : 18,
+ (unsigned long long int) phdr->p_vaddr,
+ gelf_getclass (elf) == ELFCLASS32 ? 10 : 18,
+ (unsigned long long int) phdr->p_paddr,
+ gelf_getclass (elf) == ELFCLASS32 ? 9 : 12,
+ (unsigned long long int) phdr->p_filesz,
+ gelf_getclass (elf) == ELFCLASS32 ? 9 : 12,
+ (unsigned long long int) phdr->p_memsz,
+ (unsigned long long int) phdr->p_align);
+
+ putc_unlocked ((phdr->p_flags & PF_X) ? 'X' : ' ', stdout);
+ putc_unlocked ((phdr->p_flags & PF_W) ? 'W' : ' ', stdout);
+ putc_unlocked ((phdr->p_flags & PF_R) ? 'R' : ' ', stdout);
+
+ putc_unlocked ('\n', stdout);
+
+ if (phdr->p_type == PT_INTERP)
+ {
+ /* We can show the user the name of the interpreter. */
+ size_t maxsize;
+ char *filedata = elf_rawfile (elf, &maxsize);
+
+ if (filedata != NULL && phdr->p_offset < maxsize)
+ printf ("\t[Requesting program interpreter: %s]\n",
+ filedata + phdr->p_offset);
+ }
+ }
+
+ if (elf_end (elf) != 0)
+ {
+ printf ("error while freeing ELF descriptor: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ return 0;
+}
diff --git a/src/tests/test-core-lib.so.bz2 b/src/tests/test-core-lib.so.bz2
new file mode 100755
index 00000000..bb2da888
--- /dev/null
+++ b/src/tests/test-core-lib.so.bz2
Binary files differ
diff --git a/src/tests/test-core.core.bz2 b/src/tests/test-core.core.bz2
new file mode 100644
index 00000000..4d4346b9
--- /dev/null
+++ b/src/tests/test-core.core.bz2
Binary files differ
diff --git a/src/tests/test-core.exec.bz2 b/src/tests/test-core.exec.bz2
new file mode 100755
index 00000000..49ce5519
--- /dev/null
+++ b/src/tests/test-core.exec.bz2
Binary files differ
diff --git a/src/tests/test-elf_cntl_gelf_getshdr.c b/src/tests/test-elf_cntl_gelf_getshdr.c
new file mode 100644
index 00000000..b561b53c
--- /dev/null
+++ b/src/tests/test-elf_cntl_gelf_getshdr.c
@@ -0,0 +1,103 @@
+/* Copyright (C) 2012 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+#include <fcntl.h>
+#include <gelf.h>
+#include <libelf.h>
+#include <stdbool.h>
+#include <inttypes.h>
+
+int
+main (int argc, char *argv[])
+{
+ if (argc != 3)
+ {
+ fprintf (stderr, "Needs two arguments.\n");
+ fprintf (stderr, "First needs to be 'READ', 'MMAP' or 'FDREAD'\n");
+ fprintf (stderr, "Second is the ELF file to read.\n");
+ exit (2); /* user error */
+ }
+
+ bool do_mmap = false;
+ bool close_fd = false;
+ if (strcmp (argv[1], "READ") == 0)
+ {
+ do_mmap = false;
+ close_fd = false;
+ }
+ else if (strcmp (argv[1], "MMAP") == 0)
+ {
+ do_mmap = true;
+ close_fd = false;
+ }
+ else if (strcmp (argv[1], "FDREAD") == 0)
+ {
+ do_mmap = false;
+ close_fd = true;
+ }
+ else
+ {
+ fprintf (stderr, "First arg needs to be 'READ', 'MMAP' or 'FDREAD'\n");
+ exit (2); /* user error */
+ }
+
+ elf_version (EV_CURRENT);
+
+ int fd = open (argv[2], O_RDONLY);
+ if (fd < 0)
+ {
+ fprintf (stderr, "Cannot open input file %s: %s\n", argv[2],
+ strerror (errno));
+ exit (2);
+ }
+
+ Elf *elf = elf_begin (fd, do_mmap ? ELF_C_READ_MMAP : ELF_C_READ, NULL);
+ if (elf == NULL)
+ {
+ fprintf (stderr, "elf_begin failed for %s: %s\n", argv[2],
+ elf_errmsg (-1));
+ exit (2);
+ }
+
+ if (! do_mmap && close_fd)
+ {
+ if (elf_cntl (elf, ELF_C_FDREAD) < 0)
+ {
+ fprintf (stderr, "elf_cntl failed for %s: %s\n", argv[2],
+ elf_errmsg (-1));
+ exit (1);
+ }
+ close (fd);
+ }
+
+ Elf_Scn *scn = NULL;
+ while ((scn = elf_nextscn (elf, scn)) != NULL)
+ {
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
+ printf ("Section at offset %#0" PRIx64 "\n", shdr->sh_offset);
+ }
+
+ elf_end (elf);
+ exit (0);
+}
diff --git a/src/tests/test-flag-nobits.c b/src/tests/test-flag-nobits.c
new file mode 100644
index 00000000..e58d8c3d
--- /dev/null
+++ b/src/tests/test-flag-nobits.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 2010 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <fcntl.h>
+#include <stdlib.h>
+#include <gelf.h>
+
+int
+main (int argc, char **argv)
+{
+ if (argc != 2)
+ abort ();
+
+ elf_version (EV_CURRENT);
+
+ int fd = open64 (argv[1], O_RDONLY);
+ Elf *stripped = elf_begin (fd, ELF_C_READ, NULL);
+
+ Elf_Scn *scn = NULL;
+ while ((scn = elf_nextscn (stripped, scn)) != NULL)
+ elf_flagdata (elf_getdata (scn, NULL), ELF_C_SET, ELF_F_DIRTY);
+}
diff --git a/src/tests/test-nlist.c b/src/tests/test-nlist.c
new file mode 100644
index 00000000..679c911b
--- /dev/null
+++ b/src/tests/test-nlist.c
@@ -0,0 +1,83 @@
+/* Copyright (C) 2000, 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <nlist.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+
+int var = 1;
+
+int bss;
+
+
+int
+foo (int a)
+{
+ return a;
+}
+
+int
+main (int argc, char *argv[] __attribute__ ((unused)))
+{
+ struct nlist nl[6] =
+ {
+ [0] = { .n_name = "var" },
+ [1] = { .n_name = "bss" },
+ [2] = { .n_name = "main" },
+ [3] = { .n_name = "foo" },
+ [4] = { .n_name = "not-there" },
+ [5] = { .n_name = NULL },
+ };
+ int cnt;
+ int result = 0;
+
+ if (nlist (".libs/test-nlist", nl) != 0
+ && nlist ("./test-nlist", nl) != 0)
+ {
+ puts ("nlist failed");
+ exit (1);
+ }
+
+ for (cnt = 0; nl[cnt].n_name != NULL; ++cnt)
+ {
+ if (argc > 1)
+ /* For debugging. */
+ printf ("nl[%d].n_name = \"%s\"\n"
+ "nl[%d].n_value = %ld\n"
+ "nl[%d].n_scnum = %d\n"
+ "nl[%d].n_type = %u\n"
+ "nl[%d].n_sclass = %d\n"
+ "nl[%d].n_numaux = %d\n\n",
+ cnt, nl[cnt].n_name,
+ cnt, nl[cnt].n_value,
+ cnt, nl[cnt].n_scnum,
+ cnt, nl[cnt].n_type,
+ cnt, nl[cnt].n_sclass,
+ cnt, nl[cnt].n_numaux);
+
+ if ((cnt != 4 && nl[cnt].n_value == 0 && nl[cnt].n_scnum == 0
+ && nl[cnt].n_type == 0 && nl[cnt].n_sclass == 0
+ && nl[cnt].n_numaux == 0)
+ || (cnt == 4 && (nl[cnt].n_value != 0 || nl[cnt].n_scnum != 0
+ || nl[cnt].n_type != 0 || nl[cnt].n_sclass != 0
+ || nl[cnt].n_numaux != 0)))
+ result = 1;
+ }
+
+ return foo (result);
+}
diff --git a/src/tests/test-offset-loop.alt.bz2 b/src/tests/test-offset-loop.alt.bz2
new file mode 100644
index 00000000..c1906b6d
--- /dev/null
+++ b/src/tests/test-offset-loop.alt.bz2
Binary files differ
diff --git a/src/tests/test-offset-loop.bz2 b/src/tests/test-offset-loop.bz2
new file mode 100755
index 00000000..62185c0a
--- /dev/null
+++ b/src/tests/test-offset-loop.bz2
Binary files differ
diff --git a/src/tests/test-subr.sh b/src/tests/test-subr.sh
new file mode 100644
index 00000000..5e796b4d
--- /dev/null
+++ b/src/tests/test-subr.sh
@@ -0,0 +1,154 @@
+#! /bin/sh
+# Copyright (C) 2005-2014 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+# This file is sourced by ". $srcdir/test-subr.sh" at the start of
+# each test script. It defines some functions they use and sets up
+# canonical sh state for test runs.
+
+set -e
+
+# Each test runs in its own directory to make sure they can run in parallel.
+test_dir="test-$$"
+mkdir -p "$test_dir"
+cd "$test_dir"
+
+#LC_ALL=C
+#export LC_ALL
+
+remove_files=
+
+# Tests that trap EXIT (0) themselves should call this explicitly.
+exit_cleanup()
+{
+ rm -f $remove_files; cd ..; rmdir $test_dir
+}
+trap exit_cleanup 0
+
+tempfiles()
+{
+ remove_files="$remove_files $*"
+}
+
+testfiles()
+{
+ for file; do
+ bunzip2 -c ${abs_srcdir}/${file}.bz2 > ${file} 2>/dev/null || exit 77
+ remove_files="$remove_files $file"
+ done
+}
+
+testrun_out()
+{
+ outfile="$1"
+ shift
+ remove_files="$remove_files $outfile"
+ testrun "$@" > $outfile 2>&1 || :
+}
+
+testrun_compare()
+{
+ outfile="${1##*/}.out"
+ testrun_out $outfile "$@"
+ diff -u $outfile -
+ # diff's exit status will kill the script.
+}
+
+test_cleanup()
+{
+ rm -f $remove_files
+ remove_files=
+}
+
+# See test-wrapper.sh, which sets the environment for this.
+testrun()
+{
+ ${elfutils_testrun}_testrun "$@"
+}
+
+built_testrun()
+{
+ LD_LIBRARY_PATH="${built_library_path}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"\
+ $VALGRIND_CMD "$@"
+}
+
+installed_testrun()
+{
+ program="$1"
+ shift
+ case "$program" in
+ ${abs_builddir}/*)
+ if [ "x$elfutils_tests_rpath" != xno ]; then
+ echo >&2 installcheck not possible with --enable-tests-rpath
+ exit 77
+ fi
+ ;;
+ ${abs_top_builddir}/src/*)
+ program=${bindir}/`program_transform ${program##*/}`
+ ;;
+ esac
+ if [ "${libdir}" != /usr/lib ] && [ "${libdir}" != /usr/lib64 ]; then
+ LD_LIBRARY_PATH="${libdir}:${libdir}/elfutils\
+${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
+ $VALGRIND_CMD $program ${1+"$@"}
+ else
+ $VALGRIND_CMD $program ${1+"$@"}
+ fi
+}
+
+program_transform()
+{
+ echo "$*" | sed "${program_transform_name}"
+}
+
+self_test_files=`echo ${abs_top_builddir}/src/addr2line \
+${abs_top_builddir}/src/elfcmp ${abs_top_builddir}/src/elflint \
+${abs_top_builddir}/src/nm ${abs_top_builddir}/src/objdump \
+${abs_top_builddir}/src/readelf \
+${abs_top_builddir}/src/size.o ${abs_top_builddir}/src/strip.o \
+${abs_top_builddir}/libelf/libelf.so \
+${abs_top_builddir}/libdw/libdw.so \
+${abs_top_builddir}/backends/libebl_i386.so \
+${abs_top_builddir}/backends/libebl_x86_64.so`
+
+# Provide a command to run on all self-test files with testrun.
+testrun_on_self()
+{
+ exit_status=0
+
+ for file in $self_test_files; do
+ testrun $* $file \
+ || { echo "*** failure in $* $file"; exit_status=1; }
+ done
+
+ # Only exit if something failed
+ if test $exit_status != 0; then exit $exit_status; fi
+}
+
+# Same as above, but redirects stdout to /dev/null
+testrun_on_self_quiet()
+{
+ exit_status=0
+
+ for file in $self_test_files; do
+ testrun $* $file > /dev/null \
+ || { echo "*** failure in $* $file"; exit_status=1; }
+ done
+
+ # Only exit if something failed
+ if test $exit_status != 0; then exit $exit_status; fi
+}
diff --git a/src/tests/test-wrapper.sh b/src/tests/test-wrapper.sh
new file mode 100755
index 00000000..09b4d49f
--- /dev/null
+++ b/src/tests/test-wrapper.sh
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2005-2012 Red Hat, Inc.
+# This file is part of elfutils.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+# We don't compile in an rpath because we want "make installcheck" to
+# use the installed libraries. So for local test runs we need to point
+# the library path at this build.
+
+# This wrapper script is called by the makefile, in one of two ways:
+# $(srcdir)/test-wrapper.sh ../libelf:... run-test.sh ...
+# or:
+# $(srcdir)/test-wrapper.sh installed s,^,eu-, run-test.sh ...
+
+if [ "$1" = installed ]; then
+ shift
+ elfutils_tests_rpath=$1
+ shift
+ program_transform_name="$1"
+ shift
+ elfutils_testrun=installed
+else
+ built_library_path="$1"
+ shift
+ elfutils_testrun=built
+fi
+
+old_path="${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
+
+case "$1" in
+*.sh)
+ export built_library_path program_transform_name elfutils_testrun
+ export elfutils_tests_rpath
+ ;;
+*)
+ if [ $elfutils_testrun = built ]; then
+ LD_LIBRARY_PATH="$built_library_path$old_path"
+ elif [ $elfutils_tests_rpath = yes ]; then
+ echo >&2 installcheck not possible with --enable-tests-rpath
+ exit 77
+ elif [ "x$libdir" != x/usr/lib ] && [ "x$libdir" != x/usr/lib64 ]; then
+ LD_LIBRARY_PATH="${libdir}:${libdir}/elfutils$old_path"
+ fi
+ export LD_LIBRARY_PATH
+ ;;
+esac
+
+if [ "x$VALGRIND_CMD" != "x" ]; then
+ export VALGRIND_CMD
+fi
+
+exec "$@"
diff --git a/src/tests/testarchive64.a.bz2 b/src/tests/testarchive64.a.bz2
new file mode 100644
index 00000000..4b546033
--- /dev/null
+++ b/src/tests/testarchive64.a.bz2
Binary files differ
diff --git a/src/tests/testcore-rtlib-ppc.bz2 b/src/tests/testcore-rtlib-ppc.bz2
new file mode 100644
index 00000000..a3cec603
--- /dev/null
+++ b/src/tests/testcore-rtlib-ppc.bz2
Binary files differ
diff --git a/src/tests/testcore-rtlib.bz2 b/src/tests/testcore-rtlib.bz2
new file mode 100644
index 00000000..1dc0f1a3
--- /dev/null
+++ b/src/tests/testcore-rtlib.bz2
Binary files differ
diff --git a/src/tests/testfile-backtrace-demangle.bz2 b/src/tests/testfile-backtrace-demangle.bz2
new file mode 100755
index 00000000..f0294df1
--- /dev/null
+++ b/src/tests/testfile-backtrace-demangle.bz2
Binary files differ
diff --git a/src/tests/testfile-backtrace-demangle.cc b/src/tests/testfile-backtrace-demangle.cc
new file mode 100644
index 00000000..27fff685
--- /dev/null
+++ b/src/tests/testfile-backtrace-demangle.cc
@@ -0,0 +1,47 @@
+/* Test program for C++ demangled unwinding.
+ Copyright (C) 2014 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+#define NOINLINE_NOCLONE __attribute__ ((noinline, noclone))
+#else
+#define NOINLINE_NOCLONE __attribute__ ((noinline))
+#endif
+
+void NOINLINE_NOCLONE
+cxxfunc (int i)
+{
+ *(volatile int *)0=0;
+ // Avoid tail call optimization.
+ asm volatile ("");
+}
+
+extern "C"
+{
+ void NOINLINE_NOCLONE
+ f (void)
+ {
+ cxxfunc(1);
+ // Avoid tail call optimization.
+ asm volatile ("");
+ }
+}
+
+int
+main()
+{
+ f();
+}
diff --git a/src/tests/testfile-backtrace-demangle.core.bz2 b/src/tests/testfile-backtrace-demangle.core.bz2
new file mode 100644
index 00000000..263c3049
--- /dev/null
+++ b/src/tests/testfile-backtrace-demangle.core.bz2
Binary files differ
diff --git a/src/tests/testfile-debug.bz2 b/src/tests/testfile-debug.bz2
new file mode 100755
index 00000000..88e59de7
--- /dev/null
+++ b/src/tests/testfile-debug.bz2
Binary files differ
diff --git a/src/tests/testfile-dwfl-report-elf-align-shlib.so.bz2 b/src/tests/testfile-dwfl-report-elf-align-shlib.so.bz2
new file mode 100755
index 00000000..1f35df98
--- /dev/null
+++ b/src/tests/testfile-dwfl-report-elf-align-shlib.so.bz2
Binary files differ
diff --git a/src/tests/testfile-dwzstr.bz2 b/src/tests/testfile-dwzstr.bz2
new file mode 100755
index 00000000..8d2d326e
--- /dev/null
+++ b/src/tests/testfile-dwzstr.bz2
Binary files differ
diff --git a/src/tests/testfile-dwzstr.multi.bz2 b/src/tests/testfile-dwzstr.multi.bz2
new file mode 100644
index 00000000..5e84991d
--- /dev/null
+++ b/src/tests/testfile-dwzstr.multi.bz2
Binary files differ
diff --git a/src/tests/testfile-inlines.bz2 b/src/tests/testfile-inlines.bz2
new file mode 100755
index 00000000..6a0c7c57
--- /dev/null
+++ b/src/tests/testfile-inlines.bz2
Binary files differ
diff --git a/src/tests/testfile-lex-inlines.bz2 b/src/tests/testfile-lex-inlines.bz2
new file mode 100755
index 00000000..716e7927
--- /dev/null
+++ b/src/tests/testfile-lex-inlines.bz2
Binary files differ
diff --git a/src/tests/testfile-macinfo.bz2 b/src/tests/testfile-macinfo.bz2
new file mode 100755
index 00000000..e6cc5f1c
--- /dev/null
+++ b/src/tests/testfile-macinfo.bz2
Binary files differ
diff --git a/src/tests/testfile-macros-0xff.bz2 b/src/tests/testfile-macros-0xff.bz2
new file mode 100755
index 00000000..a19662a3
--- /dev/null
+++ b/src/tests/testfile-macros-0xff.bz2
Binary files differ
diff --git a/src/tests/testfile-macros.bz2 b/src/tests/testfile-macros.bz2
new file mode 100755
index 00000000..d74df94c
--- /dev/null
+++ b/src/tests/testfile-macros.bz2
Binary files differ
diff --git a/src/tests/testfile-sizes1.o.bz2 b/src/tests/testfile-sizes1.o.bz2
new file mode 100644
index 00000000..479ecb20
--- /dev/null
+++ b/src/tests/testfile-sizes1.o.bz2
Binary files differ
diff --git a/src/tests/testfile-sizes2.o.bz2 b/src/tests/testfile-sizes2.o.bz2
new file mode 100644
index 00000000..7bd7b47f
--- /dev/null
+++ b/src/tests/testfile-sizes2.o.bz2
Binary files differ
diff --git a/src/tests/testfile-sizes3.o.bz2 b/src/tests/testfile-sizes3.o.bz2
new file mode 100644
index 00000000..7fa6a8a5
--- /dev/null
+++ b/src/tests/testfile-sizes3.o.bz2
Binary files differ
diff --git a/src/tests/testfile-zdebug.bz2 b/src/tests/testfile-zdebug.bz2
new file mode 100755
index 00000000..784041ce
--- /dev/null
+++ b/src/tests/testfile-zdebug.bz2
Binary files differ
diff --git a/src/tests/testfile.bz2 b/src/tests/testfile.bz2
new file mode 100644
index 00000000..bde9b126
--- /dev/null
+++ b/src/tests/testfile.bz2
Binary files differ
diff --git a/src/tests/testfile10.bz2 b/src/tests/testfile10.bz2
new file mode 100644
index 00000000..e9dd5046
--- /dev/null
+++ b/src/tests/testfile10.bz2
Binary files differ
diff --git a/src/tests/testfile11.bz2 b/src/tests/testfile11.bz2
new file mode 100644
index 00000000..d094b848
--- /dev/null
+++ b/src/tests/testfile11.bz2
Binary files differ
diff --git a/src/tests/testfile12.bz2 b/src/tests/testfile12.bz2
new file mode 100644
index 00000000..8bb5ad33
--- /dev/null
+++ b/src/tests/testfile12.bz2
Binary files differ
diff --git a/src/tests/testfile13.bz2 b/src/tests/testfile13.bz2
new file mode 100644
index 00000000..3b0bcb93
--- /dev/null
+++ b/src/tests/testfile13.bz2
Binary files differ
diff --git a/src/tests/testfile14.bz2 b/src/tests/testfile14.bz2
new file mode 100644
index 00000000..ac7c69e1
--- /dev/null
+++ b/src/tests/testfile14.bz2
Binary files differ
diff --git a/src/tests/testfile15.bz2 b/src/tests/testfile15.bz2
new file mode 100644
index 00000000..e75f4575
--- /dev/null
+++ b/src/tests/testfile15.bz2
Binary files differ
diff --git a/src/tests/testfile15.debug.bz2 b/src/tests/testfile15.debug.bz2
new file mode 100644
index 00000000..5c869001
--- /dev/null
+++ b/src/tests/testfile15.debug.bz2
Binary files differ
diff --git a/src/tests/testfile16.bz2 b/src/tests/testfile16.bz2
new file mode 100644
index 00000000..4d7160c0
--- /dev/null
+++ b/src/tests/testfile16.bz2
Binary files differ
diff --git a/src/tests/testfile16.debug.bz2 b/src/tests/testfile16.debug.bz2
new file mode 100644
index 00000000..f02a9723
--- /dev/null
+++ b/src/tests/testfile16.debug.bz2
Binary files differ
diff --git a/src/tests/testfile17.bz2 b/src/tests/testfile17.bz2
new file mode 100644
index 00000000..5a123204
--- /dev/null
+++ b/src/tests/testfile17.bz2
Binary files differ
diff --git a/src/tests/testfile17.debug.bz2 b/src/tests/testfile17.debug.bz2
new file mode 100644
index 00000000..86a76ab7
--- /dev/null
+++ b/src/tests/testfile17.debug.bz2
Binary files differ
diff --git a/src/tests/testfile18.bz2 b/src/tests/testfile18.bz2
new file mode 100644
index 00000000..8b5326cc
--- /dev/null
+++ b/src/tests/testfile18.bz2
Binary files differ
diff --git a/src/tests/testfile19.bz2 b/src/tests/testfile19.bz2
new file mode 100644
index 00000000..f3e6512e
--- /dev/null
+++ b/src/tests/testfile19.bz2
Binary files differ
diff --git a/src/tests/testfile19.index.bz2 b/src/tests/testfile19.index.bz2
new file mode 100644
index 00000000..c0a0a7ac
--- /dev/null
+++ b/src/tests/testfile19.index.bz2
Binary files differ
diff --git a/src/tests/testfile2.bz2 b/src/tests/testfile2.bz2
new file mode 100644
index 00000000..0771311b
--- /dev/null
+++ b/src/tests/testfile2.bz2
Binary files differ
diff --git a/src/tests/testfile20.bz2 b/src/tests/testfile20.bz2
new file mode 100644
index 00000000..a379f6bf
--- /dev/null
+++ b/src/tests/testfile20.bz2
Binary files differ
diff --git a/src/tests/testfile20.index.bz2 b/src/tests/testfile20.index.bz2
new file mode 100644
index 00000000..08dedaf4
--- /dev/null
+++ b/src/tests/testfile20.index.bz2
Binary files differ
diff --git a/src/tests/testfile21.bz2 b/src/tests/testfile21.bz2
new file mode 100644
index 00000000..bab7e6d1
--- /dev/null
+++ b/src/tests/testfile21.bz2
Binary files differ
diff --git a/src/tests/testfile21.index.bz2 b/src/tests/testfile21.index.bz2
new file mode 100644
index 00000000..5192219b
--- /dev/null
+++ b/src/tests/testfile21.index.bz2
Binary files differ
diff --git a/src/tests/testfile22.bz2 b/src/tests/testfile22.bz2
new file mode 100644
index 00000000..8c262709
--- /dev/null
+++ b/src/tests/testfile22.bz2
Binary files differ
diff --git a/src/tests/testfile23.bz2 b/src/tests/testfile23.bz2
new file mode 100644
index 00000000..cf0ce559
--- /dev/null
+++ b/src/tests/testfile23.bz2
Binary files differ
diff --git a/src/tests/testfile24.bz2 b/src/tests/testfile24.bz2
new file mode 100644
index 00000000..2320acb3
--- /dev/null
+++ b/src/tests/testfile24.bz2
Binary files differ
diff --git a/src/tests/testfile25.bz2 b/src/tests/testfile25.bz2
new file mode 100644
index 00000000..51e04213
--- /dev/null
+++ b/src/tests/testfile25.bz2
Binary files differ
diff --git a/src/tests/testfile26.bz2 b/src/tests/testfile26.bz2
new file mode 100644
index 00000000..1f86285c
--- /dev/null
+++ b/src/tests/testfile26.bz2
Binary files differ
diff --git a/src/tests/testfile27.bz2 b/src/tests/testfile27.bz2
new file mode 100644
index 00000000..9d06cd93
--- /dev/null
+++ b/src/tests/testfile27.bz2
Binary files differ
diff --git a/src/tests/testfile28.bz2 b/src/tests/testfile28.bz2
new file mode 100644
index 00000000..ca0dff3d
--- /dev/null
+++ b/src/tests/testfile28.bz2
Binary files differ
diff --git a/src/tests/testfile28.rdwr.bz2 b/src/tests/testfile28.rdwr.bz2
new file mode 100644
index 00000000..4c658484
--- /dev/null
+++ b/src/tests/testfile28.rdwr.bz2
Binary files differ
diff --git a/src/tests/testfile29.bz2 b/src/tests/testfile29.bz2
new file mode 100644
index 00000000..b46451bf
--- /dev/null
+++ b/src/tests/testfile29.bz2
Binary files differ
diff --git a/src/tests/testfile29.rdwr.bz2 b/src/tests/testfile29.rdwr.bz2
new file mode 100644
index 00000000..42eadc70
--- /dev/null
+++ b/src/tests/testfile29.rdwr.bz2
Binary files differ
diff --git a/src/tests/testfile3.bz2 b/src/tests/testfile3.bz2
new file mode 100644
index 00000000..30a456c7
--- /dev/null
+++ b/src/tests/testfile3.bz2
Binary files differ
diff --git a/src/tests/testfile30.bz2 b/src/tests/testfile30.bz2
new file mode 100644
index 00000000..9ee93c00
--- /dev/null
+++ b/src/tests/testfile30.bz2
Binary files differ
diff --git a/src/tests/testfile31.bz2 b/src/tests/testfile31.bz2
new file mode 100644
index 00000000..73451d22
--- /dev/null
+++ b/src/tests/testfile31.bz2
Binary files differ
diff --git a/src/tests/testfile32.bz2 b/src/tests/testfile32.bz2
new file mode 100644
index 00000000..7e3c73e6
--- /dev/null
+++ b/src/tests/testfile32.bz2
Binary files differ
diff --git a/src/tests/testfile33.bz2 b/src/tests/testfile33.bz2
new file mode 100644
index 00000000..f3dbc73c
--- /dev/null
+++ b/src/tests/testfile33.bz2
Binary files differ
diff --git a/src/tests/testfile34.bz2 b/src/tests/testfile34.bz2
new file mode 100644
index 00000000..a417fcb5
--- /dev/null
+++ b/src/tests/testfile34.bz2
Binary files differ
diff --git a/src/tests/testfile35.bz2 b/src/tests/testfile35.bz2
new file mode 100644
index 00000000..b5913015
--- /dev/null
+++ b/src/tests/testfile35.bz2
Binary files differ
diff --git a/src/tests/testfile35.debug.bz2 b/src/tests/testfile35.debug.bz2
new file mode 100644
index 00000000..f1918627
--- /dev/null
+++ b/src/tests/testfile35.debug.bz2
Binary files differ
diff --git a/src/tests/testfile36.bz2 b/src/tests/testfile36.bz2
new file mode 100644
index 00000000..e912a197
--- /dev/null
+++ b/src/tests/testfile36.bz2
Binary files differ
diff --git a/src/tests/testfile36.debug.bz2 b/src/tests/testfile36.debug.bz2
new file mode 100644
index 00000000..76aca42e
--- /dev/null
+++ b/src/tests/testfile36.debug.bz2
Binary files differ
diff --git a/src/tests/testfile37.bz2 b/src/tests/testfile37.bz2
new file mode 100644
index 00000000..254ce324
--- /dev/null
+++ b/src/tests/testfile37.bz2
Binary files differ
diff --git a/src/tests/testfile37.debug.bz2 b/src/tests/testfile37.debug.bz2
new file mode 100644
index 00000000..74e46a87
--- /dev/null
+++ b/src/tests/testfile37.debug.bz2
Binary files differ
diff --git a/src/tests/testfile38.bz2 b/src/tests/testfile38.bz2
new file mode 100644
index 00000000..42adb774
--- /dev/null
+++ b/src/tests/testfile38.bz2
Binary files differ
diff --git a/src/tests/testfile39.bz2 b/src/tests/testfile39.bz2
new file mode 100644
index 00000000..42d0fbce
--- /dev/null
+++ b/src/tests/testfile39.bz2
Binary files differ
diff --git a/src/tests/testfile4.bz2 b/src/tests/testfile4.bz2
new file mode 100644
index 00000000..25b25dfc
--- /dev/null
+++ b/src/tests/testfile4.bz2
Binary files differ
diff --git a/src/tests/testfile40.bz2 b/src/tests/testfile40.bz2
new file mode 100644
index 00000000..ad41985c
--- /dev/null
+++ b/src/tests/testfile40.bz2
Binary files differ
diff --git a/src/tests/testfile40.debug.bz2 b/src/tests/testfile40.debug.bz2
new file mode 100644
index 00000000..2eec4d7a
--- /dev/null
+++ b/src/tests/testfile40.debug.bz2
Binary files differ
diff --git a/src/tests/testfile41.bz2 b/src/tests/testfile41.bz2
new file mode 100644
index 00000000..f9bf5a48
--- /dev/null
+++ b/src/tests/testfile41.bz2
Binary files differ
diff --git a/src/tests/testfile42.bz2 b/src/tests/testfile42.bz2
new file mode 100644
index 00000000..2530aba2
--- /dev/null
+++ b/src/tests/testfile42.bz2
Binary files differ
diff --git a/src/tests/testfile42_noshdrs.bz2 b/src/tests/testfile42_noshdrs.bz2
new file mode 100644
index 00000000..e50f7500
--- /dev/null
+++ b/src/tests/testfile42_noshdrs.bz2
Binary files differ
diff --git a/src/tests/testfile43.bz2 b/src/tests/testfile43.bz2
new file mode 100644
index 00000000..c99db24a
--- /dev/null
+++ b/src/tests/testfile43.bz2
Binary files differ
diff --git a/src/tests/testfile44.S.bz2 b/src/tests/testfile44.S.bz2
new file mode 100644
index 00000000..4e874340
--- /dev/null
+++ b/src/tests/testfile44.S.bz2
Binary files differ
diff --git a/src/tests/testfile44.expect.bz2 b/src/tests/testfile44.expect.bz2
new file mode 100644
index 00000000..b3937b9c
--- /dev/null
+++ b/src/tests/testfile44.expect.bz2
Binary files differ
diff --git a/src/tests/testfile45.S.bz2 b/src/tests/testfile45.S.bz2
new file mode 100644
index 00000000..00e819e0
--- /dev/null
+++ b/src/tests/testfile45.S.bz2
Binary files differ
diff --git a/src/tests/testfile45.expect.bz2 b/src/tests/testfile45.expect.bz2
new file mode 100644
index 00000000..b8b33e9b
--- /dev/null
+++ b/src/tests/testfile45.expect.bz2
Binary files differ
diff --git a/src/tests/testfile46.bz2 b/src/tests/testfile46.bz2
new file mode 100644
index 00000000..db83b278
--- /dev/null
+++ b/src/tests/testfile46.bz2
Binary files differ
diff --git a/src/tests/testfile47.bz2 b/src/tests/testfile47.bz2
new file mode 100644
index 00000000..334bd6c4
--- /dev/null
+++ b/src/tests/testfile47.bz2
Binary files differ
diff --git a/src/tests/testfile48.bz2 b/src/tests/testfile48.bz2
new file mode 100644
index 00000000..da0d9dab
--- /dev/null
+++ b/src/tests/testfile48.bz2
Binary files differ
diff --git a/src/tests/testfile48.debug.bz2 b/src/tests/testfile48.debug.bz2
new file mode 100644
index 00000000..7b84c4ca
--- /dev/null
+++ b/src/tests/testfile48.debug.bz2
Binary files differ
diff --git a/src/tests/testfile49.bz2 b/src/tests/testfile49.bz2
new file mode 100644
index 00000000..8741a6b3
--- /dev/null
+++ b/src/tests/testfile49.bz2
Binary files differ
diff --git a/src/tests/testfile5.bz2 b/src/tests/testfile5.bz2
new file mode 100644
index 00000000..247313e0
--- /dev/null
+++ b/src/tests/testfile5.bz2
Binary files differ
diff --git a/src/tests/testfile50.bz2 b/src/tests/testfile50.bz2
new file mode 100644
index 00000000..fce43321
--- /dev/null
+++ b/src/tests/testfile50.bz2
Binary files differ
diff --git a/src/tests/testfile51.bz2 b/src/tests/testfile51.bz2
new file mode 100755
index 00000000..5ff45c61
--- /dev/null
+++ b/src/tests/testfile51.bz2
Binary files differ
diff --git a/src/tests/testfile52-32.noshdrs.so.bz2 b/src/tests/testfile52-32.noshdrs.so.bz2
new file mode 100755
index 00000000..01d27424
--- /dev/null
+++ b/src/tests/testfile52-32.noshdrs.so.bz2
Binary files differ
diff --git a/src/tests/testfile52-32.prelink.so.bz2 b/src/tests/testfile52-32.prelink.so.bz2
new file mode 100755
index 00000000..ccb9ae32
--- /dev/null
+++ b/src/tests/testfile52-32.prelink.so.bz2
Binary files differ
diff --git a/src/tests/testfile52-32.so.bz2 b/src/tests/testfile52-32.so.bz2
new file mode 100755
index 00000000..2a5b56ea
--- /dev/null
+++ b/src/tests/testfile52-32.so.bz2
Binary files differ
diff --git a/src/tests/testfile52-32.so.debug.bz2 b/src/tests/testfile52-32.so.debug.bz2
new file mode 100755
index 00000000..818b36d5
--- /dev/null
+++ b/src/tests/testfile52-32.so.debug.bz2
Binary files differ
diff --git a/src/tests/testfile52-64.noshdrs.so.bz2 b/src/tests/testfile52-64.noshdrs.so.bz2
new file mode 100755
index 00000000..5ca310f0
--- /dev/null
+++ b/src/tests/testfile52-64.noshdrs.so.bz2
Binary files differ
diff --git a/src/tests/testfile52-64.prelink.so.bz2 b/src/tests/testfile52-64.prelink.so.bz2
new file mode 100755
index 00000000..8cb8f482
--- /dev/null
+++ b/src/tests/testfile52-64.prelink.so.bz2
Binary files differ
diff --git a/src/tests/testfile52-64.so.bz2 b/src/tests/testfile52-64.so.bz2
new file mode 100755
index 00000000..8009f07c
--- /dev/null
+++ b/src/tests/testfile52-64.so.bz2
Binary files differ
diff --git a/src/tests/testfile52-64.so.debug.bz2 b/src/tests/testfile52-64.so.debug.bz2
new file mode 100755
index 00000000..4397788f
--- /dev/null
+++ b/src/tests/testfile52-64.so.debug.bz2
Binary files differ
diff --git a/src/tests/testfile53-32.bz2 b/src/tests/testfile53-32.bz2
new file mode 100755
index 00000000..7bf48d9f
--- /dev/null
+++ b/src/tests/testfile53-32.bz2
Binary files differ
diff --git a/src/tests/testfile53-32.debug.bz2 b/src/tests/testfile53-32.debug.bz2
new file mode 100755
index 00000000..79ea566d
--- /dev/null
+++ b/src/tests/testfile53-32.debug.bz2
Binary files differ
diff --git a/src/tests/testfile53-32.prelink.bz2 b/src/tests/testfile53-32.prelink.bz2
new file mode 100755
index 00000000..8e05abf0
--- /dev/null
+++ b/src/tests/testfile53-32.prelink.bz2
Binary files differ
diff --git a/src/tests/testfile53-64.bz2 b/src/tests/testfile53-64.bz2
new file mode 100755
index 00000000..235a7631
--- /dev/null
+++ b/src/tests/testfile53-64.bz2
Binary files differ
diff --git a/src/tests/testfile53-64.debug.bz2 b/src/tests/testfile53-64.debug.bz2
new file mode 100755
index 00000000..675c6eaf
--- /dev/null
+++ b/src/tests/testfile53-64.debug.bz2
Binary files differ
diff --git a/src/tests/testfile53-64.prelink.bz2 b/src/tests/testfile53-64.prelink.bz2
new file mode 100755
index 00000000..853aba78
--- /dev/null
+++ b/src/tests/testfile53-64.prelink.bz2
Binary files differ
diff --git a/src/tests/testfile54-32.noshdrs.so.bz2 b/src/tests/testfile54-32.noshdrs.so.bz2
new file mode 100755
index 00000000..846bc91e
--- /dev/null
+++ b/src/tests/testfile54-32.noshdrs.so.bz2
Binary files differ
diff --git a/src/tests/testfile54-32.prelink.so.bz2 b/src/tests/testfile54-32.prelink.so.bz2
new file mode 100755
index 00000000..85c8526c
--- /dev/null
+++ b/src/tests/testfile54-32.prelink.so.bz2
Binary files differ
diff --git a/src/tests/testfile54-32.so.bz2 b/src/tests/testfile54-32.so.bz2
new file mode 100755
index 00000000..4bc4fa37
--- /dev/null
+++ b/src/tests/testfile54-32.so.bz2
Binary files differ
diff --git a/src/tests/testfile54-32.so.debug.bz2 b/src/tests/testfile54-32.so.debug.bz2
new file mode 100755
index 00000000..79dd614d
--- /dev/null
+++ b/src/tests/testfile54-32.so.debug.bz2
Binary files differ
diff --git a/src/tests/testfile54-64.noshdrs.so.bz2 b/src/tests/testfile54-64.noshdrs.so.bz2
new file mode 100755
index 00000000..3da726a6
--- /dev/null
+++ b/src/tests/testfile54-64.noshdrs.so.bz2
Binary files differ
diff --git a/src/tests/testfile54-64.prelink.so.bz2 b/src/tests/testfile54-64.prelink.so.bz2
new file mode 100755
index 00000000..e296a1d9
--- /dev/null
+++ b/src/tests/testfile54-64.prelink.so.bz2
Binary files differ
diff --git a/src/tests/testfile54-64.so.bz2 b/src/tests/testfile54-64.so.bz2
new file mode 100755
index 00000000..6072bf19
--- /dev/null
+++ b/src/tests/testfile54-64.so.bz2
Binary files differ
diff --git a/src/tests/testfile54-64.so.debug.bz2 b/src/tests/testfile54-64.so.debug.bz2
new file mode 100755
index 00000000..6b45390e
--- /dev/null
+++ b/src/tests/testfile54-64.so.debug.bz2
Binary files differ
diff --git a/src/tests/testfile55-32.bz2 b/src/tests/testfile55-32.bz2
new file mode 100755
index 00000000..d4cc9860
--- /dev/null
+++ b/src/tests/testfile55-32.bz2
Binary files differ
diff --git a/src/tests/testfile55-32.debug.bz2 b/src/tests/testfile55-32.debug.bz2
new file mode 100755
index 00000000..c5aa3f63
--- /dev/null
+++ b/src/tests/testfile55-32.debug.bz2
Binary files differ
diff --git a/src/tests/testfile55-32.prelink.bz2 b/src/tests/testfile55-32.prelink.bz2
new file mode 100755
index 00000000..4fc171af
--- /dev/null
+++ b/src/tests/testfile55-32.prelink.bz2
Binary files differ
diff --git a/src/tests/testfile55-64.bz2 b/src/tests/testfile55-64.bz2
new file mode 100755
index 00000000..27341fa0
--- /dev/null
+++ b/src/tests/testfile55-64.bz2
Binary files differ
diff --git a/src/tests/testfile55-64.debug.bz2 b/src/tests/testfile55-64.debug.bz2
new file mode 100755
index 00000000..d975c70a
--- /dev/null
+++ b/src/tests/testfile55-64.debug.bz2
Binary files differ
diff --git a/src/tests/testfile55-64.prelink.bz2 b/src/tests/testfile55-64.prelink.bz2
new file mode 100755
index 00000000..a4338fe0
--- /dev/null
+++ b/src/tests/testfile55-64.prelink.bz2
Binary files differ
diff --git a/src/tests/testfile56.bz2 b/src/tests/testfile56.bz2
new file mode 100644
index 00000000..0e2257cf
--- /dev/null
+++ b/src/tests/testfile56.bz2
Binary files differ
diff --git a/src/tests/testfile57.bz2 b/src/tests/testfile57.bz2
new file mode 100644
index 00000000..59dbde10
--- /dev/null
+++ b/src/tests/testfile57.bz2
Binary files differ
diff --git a/src/tests/testfile58.bz2 b/src/tests/testfile58.bz2
new file mode 100644
index 00000000..839efd92
--- /dev/null
+++ b/src/tests/testfile58.bz2
Binary files differ
diff --git a/src/tests/testfile59.bz2 b/src/tests/testfile59.bz2
new file mode 100755
index 00000000..bcee648c
--- /dev/null
+++ b/src/tests/testfile59.bz2
Binary files differ
diff --git a/src/tests/testfile6.bz2 b/src/tests/testfile6.bz2
new file mode 100644
index 00000000..fd376b27
--- /dev/null
+++ b/src/tests/testfile6.bz2
Binary files differ
diff --git a/src/tests/testfile60.bz2 b/src/tests/testfile60.bz2
new file mode 100755
index 00000000..6a0cd7bc
--- /dev/null
+++ b/src/tests/testfile60.bz2
Binary files differ
diff --git a/src/tests/testfile61.bz2 b/src/tests/testfile61.bz2
new file mode 100644
index 00000000..d139389e
--- /dev/null
+++ b/src/tests/testfile61.bz2
Binary files differ
diff --git a/src/tests/testfile62.bz2 b/src/tests/testfile62.bz2
new file mode 100644
index 00000000..8a42cf66
--- /dev/null
+++ b/src/tests/testfile62.bz2
Binary files differ
diff --git a/src/tests/testfile63.bz2 b/src/tests/testfile63.bz2
new file mode 100644
index 00000000..4be87cd4
--- /dev/null
+++ b/src/tests/testfile63.bz2
Binary files differ
diff --git a/src/tests/testfile64.bz2 b/src/tests/testfile64.bz2
new file mode 100644
index 00000000..674bd539
--- /dev/null
+++ b/src/tests/testfile64.bz2
Binary files differ
diff --git a/src/tests/testfile65.bz2 b/src/tests/testfile65.bz2
new file mode 100644
index 00000000..5e925f87
--- /dev/null
+++ b/src/tests/testfile65.bz2
Binary files differ
diff --git a/src/tests/testfile66.bz2 b/src/tests/testfile66.bz2
new file mode 100755
index 00000000..4797590e
--- /dev/null
+++ b/src/tests/testfile66.bz2
Binary files differ
diff --git a/src/tests/testfile66.core.bz2 b/src/tests/testfile66.core.bz2
new file mode 100644
index 00000000..12e2d444
--- /dev/null
+++ b/src/tests/testfile66.core.bz2
Binary files differ
diff --git a/src/tests/testfile67.bz2 b/src/tests/testfile67.bz2
new file mode 100644
index 00000000..bb64745d
--- /dev/null
+++ b/src/tests/testfile67.bz2
Binary files differ
diff --git a/src/tests/testfile68.bz2 b/src/tests/testfile68.bz2
new file mode 100644
index 00000000..3fe67921
--- /dev/null
+++ b/src/tests/testfile68.bz2
Binary files differ
diff --git a/src/tests/testfile69.core.bz2 b/src/tests/testfile69.core.bz2
new file mode 100644
index 00000000..99553182
--- /dev/null
+++ b/src/tests/testfile69.core.bz2
Binary files differ
diff --git a/src/tests/testfile69.so.bz2 b/src/tests/testfile69.so.bz2
new file mode 100755
index 00000000..fdddab98
--- /dev/null
+++ b/src/tests/testfile69.so.bz2
Binary files differ
diff --git a/src/tests/testfile7.bz2 b/src/tests/testfile7.bz2
new file mode 100644
index 00000000..73452bbb
--- /dev/null
+++ b/src/tests/testfile7.bz2
Binary files differ
diff --git a/src/tests/testfile70.core.bz2 b/src/tests/testfile70.core.bz2
new file mode 100644
index 00000000..6c47c6d4
--- /dev/null
+++ b/src/tests/testfile70.core.bz2
Binary files differ
diff --git a/src/tests/testfile70.exec.bz2 b/src/tests/testfile70.exec.bz2
new file mode 100644
index 00000000..f1b969af
--- /dev/null
+++ b/src/tests/testfile70.exec.bz2
Binary files differ
diff --git a/src/tests/testfile71.bz2 b/src/tests/testfile71.bz2
new file mode 100644
index 00000000..ce5b08fe
--- /dev/null
+++ b/src/tests/testfile71.bz2
Binary files differ
diff --git a/src/tests/testfile8.bz2 b/src/tests/testfile8.bz2
new file mode 100644
index 00000000..1ff4994c
--- /dev/null
+++ b/src/tests/testfile8.bz2
Binary files differ
diff --git a/src/tests/testfile9.bz2 b/src/tests/testfile9.bz2
new file mode 100644
index 00000000..40454bce
--- /dev/null
+++ b/src/tests/testfile9.bz2
Binary files differ
diff --git a/src/tests/testfile_aarch64_core.bz2 b/src/tests/testfile_aarch64_core.bz2
new file mode 100644
index 00000000..9d562688
--- /dev/null
+++ b/src/tests/testfile_aarch64_core.bz2
Binary files differ
diff --git a/src/tests/testfile_class_func.bz2 b/src/tests/testfile_class_func.bz2
new file mode 100755
index 00000000..e40dcf26
--- /dev/null
+++ b/src/tests/testfile_class_func.bz2
Binary files differ
diff --git a/src/tests/testfile_const_type.bz2 b/src/tests/testfile_const_type.bz2
new file mode 100755
index 00000000..fea4a9cb
--- /dev/null
+++ b/src/tests/testfile_const_type.bz2
Binary files differ
diff --git a/src/tests/testfile_const_type.c b/src/tests/testfile_const_type.c
new file mode 100644
index 00000000..259007d0
--- /dev/null
+++ b/src/tests/testfile_const_type.c
@@ -0,0 +1,14 @@
+// gcc -m32 -g -O2 -o const_type const_type.c
+
+__attribute__((noinline, noclone)) int
+f1 (long long d)
+{
+ long long w = d / 0x1234567800000LL;
+ return w;
+}
+
+int
+main ()
+{
+ return f1 (4LL) - f1 (4LL);
+}
diff --git a/src/tests/testfile_entry_value.bz2 b/src/tests/testfile_entry_value.bz2
new file mode 100755
index 00000000..fde86c61
--- /dev/null
+++ b/src/tests/testfile_entry_value.bz2
Binary files differ
diff --git a/src/tests/testfile_entry_value.c b/src/tests/testfile_entry_value.c
new file mode 100644
index 00000000..d2f232b2
--- /dev/null
+++ b/src/tests/testfile_entry_value.c
@@ -0,0 +1,19 @@
+// gcc -g -O2 -o entry_value entry_value.c
+int __attribute__((noinline, noclone)) foo (int x, int y)
+{
+ return x + y;
+}
+
+int __attribute__((noinline, noclone)) bar (int x, int y)
+{
+ int z;
+ z = foo (x, y);
+ z += foo (y, x);
+ return z;
+}
+
+int
+main (int argc, char **argv)
+{
+ return bar (argc + 1, argc - 1);
+}
diff --git a/src/tests/testfile_i686_core.bz2 b/src/tests/testfile_i686_core.bz2
new file mode 100644
index 00000000..8412776e
--- /dev/null
+++ b/src/tests/testfile_i686_core.bz2
Binary files differ
diff --git a/src/tests/testfile_implicit_pointer.bz2 b/src/tests/testfile_implicit_pointer.bz2
new file mode 100755
index 00000000..72f6a694
--- /dev/null
+++ b/src/tests/testfile_implicit_pointer.bz2
Binary files differ
diff --git a/src/tests/testfile_implicit_pointer.c b/src/tests/testfile_implicit_pointer.c
new file mode 100644
index 00000000..d7e28a0e
--- /dev/null
+++ b/src/tests/testfile_implicit_pointer.c
@@ -0,0 +1,12 @@
+// gcc -g -O2 -o implicit_pointer implicit_pointer.c
+
+static __attribute__((noinline, noclone)) int foo (int i)
+{
+ int *p = &i;
+ return *p;
+}
+
+int main (void)
+{
+ return foo (23) - 23;
+}
diff --git a/src/tests/testfile_implicit_value.bz2 b/src/tests/testfile_implicit_value.bz2
new file mode 100755
index 00000000..c365a99d
--- /dev/null
+++ b/src/tests/testfile_implicit_value.bz2
Binary files differ
diff --git a/src/tests/testfile_implicit_value.c b/src/tests/testfile_implicit_value.c
new file mode 100644
index 00000000..8885bbf3
--- /dev/null
+++ b/src/tests/testfile_implicit_value.c
@@ -0,0 +1,12 @@
+// gcc -m32 -g -O2 -o implicit_value implicit_value.c
+
+static __attribute__((noinline, noclone)) int foo ()
+{
+ unsigned long long a[] = { 2, 21 };
+ return a[0] * a[1];
+}
+
+int main (void)
+{
+ return foo () - 42;
+}
diff --git a/src/tests/testfile_low_high_pc.bz2 b/src/tests/testfile_low_high_pc.bz2
new file mode 100755
index 00000000..f20814aa
--- /dev/null
+++ b/src/tests/testfile_low_high_pc.bz2
Binary files differ
diff --git a/src/tests/testfile_multi.dwz.bz2 b/src/tests/testfile_multi.dwz.bz2
new file mode 100644
index 00000000..1f52fb69
--- /dev/null
+++ b/src/tests/testfile_multi.dwz.bz2
Binary files differ
diff --git a/src/tests/testfile_multi_main.bz2 b/src/tests/testfile_multi_main.bz2
new file mode 100755
index 00000000..bc6ca5fd
--- /dev/null
+++ b/src/tests/testfile_multi_main.bz2
Binary files differ
diff --git a/src/tests/testfile_nested_funcs.bz2 b/src/tests/testfile_nested_funcs.bz2
new file mode 100755
index 00000000..d36b603e
--- /dev/null
+++ b/src/tests/testfile_nested_funcs.bz2
Binary files differ
diff --git a/src/tests/testfile_parameter_ref.bz2 b/src/tests/testfile_parameter_ref.bz2
new file mode 100755
index 00000000..8ff900de
--- /dev/null
+++ b/src/tests/testfile_parameter_ref.bz2
Binary files differ
diff --git a/src/tests/testfile_parameter_ref.c b/src/tests/testfile_parameter_ref.c
new file mode 100644
index 00000000..7fe985f3
--- /dev/null
+++ b/src/tests/testfile_parameter_ref.c
@@ -0,0 +1,20 @@
+// gcc -g -O2 -o parameter_ref parameter_ref.c
+
+volatile int vv;
+
+/* Don't inline, but do allow clone to create specialized versions. */
+static __attribute__((noinline)) int
+foo (int x, int y, int z)
+{
+ int a = x * 2;
+ int b = y * 2;
+ int c = z * 2;
+ vv++;
+ return x + z;
+}
+
+int
+main (int x, char **argv)
+{
+ return foo (x, 2, 3) + foo (x, 4, 3) + foo (x + 6, x, 3) + x;
+}
diff --git a/src/tests/testfileaarch64.bz2 b/src/tests/testfileaarch64.bz2
new file mode 100755
index 00000000..72e5ef0d
--- /dev/null
+++ b/src/tests/testfileaarch64.bz2
Binary files differ
diff --git a/src/tests/testfilearm.bz2 b/src/tests/testfilearm.bz2
new file mode 100755
index 00000000..d6cd090e
--- /dev/null
+++ b/src/tests/testfilearm.bz2
Binary files differ
diff --git a/src/tests/testfilebasmin.bz2 b/src/tests/testfilebasmin.bz2
new file mode 100755
index 00000000..38439720
--- /dev/null
+++ b/src/tests/testfilebasmin.bz2
Binary files differ
diff --git a/src/tests/testfilebaxmin.bz2 b/src/tests/testfilebaxmin.bz2
new file mode 100755
index 00000000..c450cc82
--- /dev/null
+++ b/src/tests/testfilebaxmin.bz2
Binary files differ
diff --git a/src/tests/testfilebazdbg.bz2 b/src/tests/testfilebazdbg.bz2
new file mode 100755
index 00000000..8e586361
--- /dev/null
+++ b/src/tests/testfilebazdbg.bz2
Binary files differ
diff --git a/src/tests/testfilebazdbg.debug.bz2 b/src/tests/testfilebazdbg.debug.bz2
new file mode 100755
index 00000000..3b011763
--- /dev/null
+++ b/src/tests/testfilebazdbg.debug.bz2
Binary files differ
diff --git a/src/tests/testfilebazdbg_pl.bz2 b/src/tests/testfilebazdbg_pl.bz2
new file mode 100755
index 00000000..9e06a806
--- /dev/null
+++ b/src/tests/testfilebazdbg_pl.bz2
Binary files differ
diff --git a/src/tests/testfilebazdbg_plr.bz2 b/src/tests/testfilebazdbg_plr.bz2
new file mode 100755
index 00000000..1bc43dd2
--- /dev/null
+++ b/src/tests/testfilebazdbg_plr.bz2
Binary files differ
diff --git a/src/tests/testfilebazdbgppc64.bz2 b/src/tests/testfilebazdbgppc64.bz2
new file mode 100755
index 00000000..17e77d6d
--- /dev/null
+++ b/src/tests/testfilebazdbgppc64.bz2
Binary files differ
diff --git a/src/tests/testfilebazdbgppc64.debug.bz2 b/src/tests/testfilebazdbgppc64.debug.bz2
new file mode 100755
index 00000000..8faa17af
--- /dev/null
+++ b/src/tests/testfilebazdbgppc64.debug.bz2
Binary files differ
diff --git a/src/tests/testfilebazdbgppc64_pl.bz2 b/src/tests/testfilebazdbgppc64_pl.bz2
new file mode 100755
index 00000000..9f372fb9
--- /dev/null
+++ b/src/tests/testfilebazdbgppc64_pl.bz2
Binary files differ
diff --git a/src/tests/testfilebazdbgppc64_plr.bz2 b/src/tests/testfilebazdbgppc64_plr.bz2
new file mode 100755
index 00000000..70f8e005
--- /dev/null
+++ b/src/tests/testfilebazdbgppc64_plr.bz2
Binary files differ
diff --git a/src/tests/testfilebazdyn.bz2 b/src/tests/testfilebazdyn.bz2
new file mode 100755
index 00000000..bb623bb0
--- /dev/null
+++ b/src/tests/testfilebazdyn.bz2
Binary files differ
diff --git a/src/tests/testfilebazdynppc64.bz2 b/src/tests/testfilebazdynppc64.bz2
new file mode 100755
index 00000000..2e01699e
--- /dev/null
+++ b/src/tests/testfilebazdynppc64.bz2
Binary files differ
diff --git a/src/tests/testfilebazmdb.bz2 b/src/tests/testfilebazmdb.bz2
new file mode 100755
index 00000000..561eca11
--- /dev/null
+++ b/src/tests/testfilebazmdb.bz2
Binary files differ
diff --git a/src/tests/testfilebazmdbppc64.bz2 b/src/tests/testfilebazmdbppc64.bz2
new file mode 100755
index 00000000..16c2dd0a
--- /dev/null
+++ b/src/tests/testfilebazmdbppc64.bz2
Binary files differ
diff --git a/src/tests/testfilebazmin.bz2 b/src/tests/testfilebazmin.bz2
new file mode 100755
index 00000000..12bcc6b5
--- /dev/null
+++ b/src/tests/testfilebazmin.bz2
Binary files differ
diff --git a/src/tests/testfilebazmin_pl.bz2 b/src/tests/testfilebazmin_pl.bz2
new file mode 100755
index 00000000..73cef4ae
--- /dev/null
+++ b/src/tests/testfilebazmin_pl.bz2
Binary files differ
diff --git a/src/tests/testfilebazmin_plr.bz2 b/src/tests/testfilebazmin_plr.bz2
new file mode 100755
index 00000000..e4fcf85d
--- /dev/null
+++ b/src/tests/testfilebazmin_plr.bz2
Binary files differ
diff --git a/src/tests/testfilebazminppc64.bz2 b/src/tests/testfilebazminppc64.bz2
new file mode 100755
index 00000000..364d84c4
--- /dev/null
+++ b/src/tests/testfilebazminppc64.bz2
Binary files differ
diff --git a/src/tests/testfilebazminppc64_pl.bz2 b/src/tests/testfilebazminppc64_pl.bz2
new file mode 100755
index 00000000..66863403
--- /dev/null
+++ b/src/tests/testfilebazminppc64_pl.bz2
Binary files differ
diff --git a/src/tests/testfilebazminppc64_plr.bz2 b/src/tests/testfilebazminppc64_plr.bz2
new file mode 100755
index 00000000..46102853
--- /dev/null
+++ b/src/tests/testfilebazminppc64_plr.bz2
Binary files differ
diff --git a/src/tests/testfilebaztab.bz2 b/src/tests/testfilebaztab.bz2
new file mode 100755
index 00000000..a99b7394
--- /dev/null
+++ b/src/tests/testfilebaztab.bz2
Binary files differ
diff --git a/src/tests/testfilebaztabppc64.bz2 b/src/tests/testfilebaztabppc64.bz2
new file mode 100755
index 00000000..03afb8c9
--- /dev/null
+++ b/src/tests/testfilebaztabppc64.bz2
Binary files differ
diff --git a/src/tests/testfiledwarfinlines.bz2 b/src/tests/testfiledwarfinlines.bz2
new file mode 100755
index 00000000..db14f816
--- /dev/null
+++ b/src/tests/testfiledwarfinlines.bz2
Binary files differ
diff --git a/src/tests/testfiledwarfinlines.core.bz2 b/src/tests/testfiledwarfinlines.core.bz2
new file mode 100644
index 00000000..2299e1e7
--- /dev/null
+++ b/src/tests/testfiledwarfinlines.core.bz2
Binary files differ
diff --git a/src/tests/testfilefoobarbaz.bz2 b/src/tests/testfilefoobarbaz.bz2
new file mode 100755
index 00000000..0e721ffe
--- /dev/null
+++ b/src/tests/testfilefoobarbaz.bz2
Binary files differ
diff --git a/src/tests/testfilegdbindex5.bz2 b/src/tests/testfilegdbindex5.bz2
new file mode 100755
index 00000000..45ee945a
--- /dev/null
+++ b/src/tests/testfilegdbindex5.bz2
Binary files differ
diff --git a/src/tests/testfilegdbindex7.bz2 b/src/tests/testfilegdbindex7.bz2
new file mode 100755
index 00000000..2a7c6c2c
--- /dev/null
+++ b/src/tests/testfilegdbindex7.bz2
Binary files differ
diff --git a/src/tests/testfileloc.bz2 b/src/tests/testfileloc.bz2
new file mode 100755
index 00000000..a436965b
--- /dev/null
+++ b/src/tests/testfileloc.bz2
Binary files differ
diff --git a/src/tests/testfilemacro.bz2 b/src/tests/testfilemacro.bz2
new file mode 100755
index 00000000..7db51ff5
--- /dev/null
+++ b/src/tests/testfilemacro.bz2
Binary files differ
diff --git a/src/tests/testfilenolines.bz2 b/src/tests/testfilenolines.bz2
new file mode 100755
index 00000000..23cd7223
--- /dev/null
+++ b/src/tests/testfilenolines.bz2
Binary files differ
diff --git a/src/tests/testfileppc32.bz2 b/src/tests/testfileppc32.bz2
new file mode 100755
index 00000000..f57763a1
--- /dev/null
+++ b/src/tests/testfileppc32.bz2
Binary files differ
diff --git a/src/tests/testfileppc32attrs.o.bz2 b/src/tests/testfileppc32attrs.o.bz2
new file mode 100644
index 00000000..c8d80a99
--- /dev/null
+++ b/src/tests/testfileppc32attrs.o.bz2
Binary files differ
diff --git a/src/tests/testfileppc64.bz2 b/src/tests/testfileppc64.bz2
new file mode 100755
index 00000000..870046b1
--- /dev/null
+++ b/src/tests/testfileppc64.bz2
Binary files differ
diff --git a/src/tests/testfiles390.bz2 b/src/tests/testfiles390.bz2
new file mode 100755
index 00000000..14ebf6c7
--- /dev/null
+++ b/src/tests/testfiles390.bz2
Binary files differ
diff --git a/src/tests/testfiles390x.bz2 b/src/tests/testfiles390x.bz2
new file mode 100755
index 00000000..eb63ed8d
--- /dev/null
+++ b/src/tests/testfiles390x.bz2
Binary files differ
diff --git a/src/tests/testlib_dynseg.so.bz2 b/src/tests/testlib_dynseg.so.bz2
new file mode 100755
index 00000000..94296a4c
--- /dev/null
+++ b/src/tests/testlib_dynseg.so.bz2
Binary files differ
diff --git a/src/tests/typeiter.c b/src/tests/typeiter.c
new file mode 100644
index 00000000..dff45260
--- /dev/null
+++ b/src/tests/typeiter.c
@@ -0,0 +1,90 @@
+/* Copyright (C) 2012 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <unistd.h>
+#include <dwarf.h>
+
+int
+main (int argc, char *argv[])
+{
+ for (int i = 1; i < argc; ++i)
+ {
+ int fd = open (argv[i], O_RDONLY);
+
+ Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ);
+ if (dbg != NULL)
+ {
+ Dwarf_Off off = 0;
+ size_t cuhl;
+ Dwarf_Off noff;
+
+ while (dwarf_nextcu (dbg, off, &noff, &cuhl, NULL, NULL, NULL) == 0)
+ {
+ Dwarf_Die die_mem;
+ Dwarf_Die *die = dwarf_offdie (dbg, off + cuhl, &die_mem);
+
+ Dwarf_Die iter_mem;
+ Dwarf_Die *iter = &iter_mem;
+ dwarf_child (die, &iter_mem);
+
+ while (1)
+ {
+ if (dwarf_tag (iter) == DW_TAG_variable)
+ {
+ Dwarf_Attribute attr_mem;
+ Dwarf_Die form_mem;
+ dwarf_formref_die (dwarf_attr (iter, DW_AT_type,
+ &attr_mem),
+ &form_mem);
+ }
+
+ if (dwarf_siblingof (iter, &iter_mem) != 0)
+ break;
+ }
+
+ off = noff;
+ }
+
+ off = 0;
+ uint64_t type_sig;
+
+ while (dwarf_next_unit (dbg, off, &noff, &cuhl, NULL, NULL, NULL,
+ NULL, &type_sig, NULL) == 0)
+ {
+ Dwarf_Die die_mem;
+ Dwarf_Die *die = dwarf_offdie_types (dbg, off + cuhl, &die_mem);
+
+ if (die == NULL)
+ printf ("fail\n");
+ else
+ printf ("ok\n");
+
+ off = noff;
+ }
+
+ dwarf_end (dbg);
+ }
+
+ close (fd);
+ }
+}
diff --git a/src/tests/typeiter2.c b/src/tests/typeiter2.c
new file mode 100644
index 00000000..6ddfa388
--- /dev/null
+++ b/src/tests/typeiter2.c
@@ -0,0 +1,89 @@
+/* Copyright (C) 2012, 2013 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <unistd.h>
+#include <dwarf.h>
+
+int
+main (int argc, char *argv[])
+{
+ for (int i = 1; i < argc; ++i)
+ {
+ int fd = open (argv[i], O_RDONLY);
+
+ Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ);
+ if (dbg != NULL)
+ {
+ Dwarf_Off off = 0;
+ size_t cuhl;
+ Dwarf_Off noff;
+ uint64_t type_sig;
+
+ while (dwarf_next_unit (dbg, off, &noff, &cuhl, NULL, NULL, NULL,
+ NULL, &type_sig, NULL) == 0)
+ {
+ Dwarf_Die die_mem;
+ dwarf_offdie_types (dbg, off + cuhl, &die_mem);
+ off = noff;
+ }
+
+ off = 0;
+
+ while (dwarf_nextcu (dbg, off, &noff, &cuhl, NULL, NULL, NULL) == 0)
+ {
+ Dwarf_Die die_mem;
+ Dwarf_Die *die = dwarf_offdie (dbg, off + cuhl, &die_mem);
+
+ Dwarf_Die iter_mem;
+ Dwarf_Die *iter = &iter_mem;
+ dwarf_child (die, &iter_mem);
+
+ while (1)
+ {
+ if (dwarf_tag (iter) == DW_TAG_variable)
+ {
+ Dwarf_Attribute attr_mem;
+ Dwarf_Die form_mem, *form;
+ form = dwarf_formref_die (dwarf_attr (iter, DW_AT_type,
+ &attr_mem),
+ &form_mem);
+
+ if (form == NULL)
+ printf ("fail\n");
+ else
+ printf ("ok\n");
+ }
+
+ if (dwarf_siblingof (iter, &iter_mem) != 0)
+ break;
+ }
+
+ off = noff;
+ }
+
+ dwarf_end (dbg);
+ }
+
+ close (fd);
+ }
+}
diff --git a/src/tests/update1.c b/src/tests/update1.c
new file mode 100644
index 00000000..f4c14753
--- /dev/null
+++ b/src/tests/update1.c
@@ -0,0 +1,127 @@
+/* Test program for elf_update function.
+ Copyright (C) 2000, 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <errno.h>
+#include <fcntl.h>
+#include <libelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+
+int
+main (int argc, char *argv[] __attribute__ ((unused)))
+{
+ const char *fname = "xxx_update1";
+ int fd;
+ Elf *elf;
+ Elf32_Ehdr *ehdr;
+ int i;
+
+ fd = open (fname, O_RDWR | O_CREAT | O_TRUNC, 0666);
+ if (fd == -1)
+ {
+ printf ("cannot open `%s': %s\n", fname, strerror (errno));
+ exit (1);
+ }
+
+ elf_version (EV_CURRENT);
+
+ elf = elf_begin (fd, ELF_C_WRITE, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Create an ELF header. */
+ ehdr = elf32_newehdr (elf);
+ if (ehdr == NULL)
+ {
+ printf ("cannot create ELF header: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Print the ELF header values. */
+ if (argc > 1)
+ {
+ for (i = 0; i < EI_NIDENT; ++i)
+ printf (" %02x", ehdr->e_ident[i]);
+ printf ("\
+\ntype = %hu\nmachine = %hu\nversion = %u\nentry = %u\nphoff = %u\n"
+ "shoff = %u\nflags = %u\nehsize = %hu\nphentsize = %hu\n"
+ "phnum = %hu\nshentsize = %hu\nshnum = %hu\nshstrndx = %hu\n",
+ ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
+ ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize,
+ ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize,
+ ehdr->e_shnum, ehdr->e_shstrndx);
+ }
+
+ ehdr->e_ident[0] = 42;
+ ehdr->e_ident[4] = 1;
+ ehdr->e_ident[5] = 1;
+ ehdr->e_ident[6] = 2;
+ ehdr->e_ident[9] = 2;
+ ehdr->e_version = 1;
+ ehdr->e_ehsize = 1;
+
+ /* Write out the file. */
+ if (elf_update (elf, ELF_C_WRITE) < 0)
+ {
+ printf ("failure in elf_update: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Create an ELF header. */
+ ehdr = elf32_newehdr (elf);
+ if (ehdr == NULL)
+ {
+ printf ("cannot create ELF header: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Print the ELF header values. */
+ if (argc > 1)
+ {
+ for (i = 0; i < EI_NIDENT; ++i)
+ printf (" %02x", ehdr->e_ident[i]);
+ printf ("\
+\ntype = %hu\nmachine = %hu\nversion = %u\nentry = %u\nphoff = %u\n"
+ "shoff = %u\nflags = %u\nehsize = %hu\nphentsize = %hu\n"
+ "phnum = %hu\nshentsize = %hu\nshnum = %hu\nshstrndx = %hu\n",
+ ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
+ ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize,
+ ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize,
+ ehdr->e_shnum, ehdr->e_shstrndx);
+ }
+
+ if (elf_end (elf) != 0)
+ {
+ printf ("failure in elf_end: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ unlink (fname);
+
+ return 0;
+}
diff --git a/src/tests/update2.c b/src/tests/update2.c
new file mode 100644
index 00000000..5805163d
--- /dev/null
+++ b/src/tests/update2.c
@@ -0,0 +1,150 @@
+/* Test program for elf_update function.
+ Copyright (C) 2000, 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <errno.h>
+#include <fcntl.h>
+#include <libelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+
+int
+main (int argc, char *argv[] __attribute__ ((unused)))
+{
+ const char *fname = "xxx_update2";
+ int fd;
+ Elf *elf;
+ Elf32_Ehdr *ehdr;
+ Elf32_Phdr *phdr;
+ int i;
+
+ fd = open (fname, O_RDWR | O_CREAT | O_TRUNC, 0666);
+ if (fd == -1)
+ {
+ printf ("cannot open `%s': %s\n", fname, strerror (errno));
+ exit (1);
+ }
+
+ elf_version (EV_CURRENT);
+
+ elf = elf_begin (fd, ELF_C_WRITE, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Create an ELF header. */
+ ehdr = elf32_newehdr (elf);
+ if (ehdr == NULL)
+ {
+ printf ("cannot create ELF header: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Print the ELF header values. */
+ if (argc > 1)
+ {
+ for (i = 0; i < EI_NIDENT; ++i)
+ printf (" %02x", ehdr->e_ident[i]);
+ printf ("\
+\ntype = %hu\nmachine = %hu\nversion = %u\nentry = %u\nphoff = %u\n"
+ "shoff = %u\nflags = %u\nehsize = %hu\nphentsize = %hu\n"
+ "phnum = %hu\nshentsize = %hu\nshnum = %hu\nshstrndx = %hu\n",
+ ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
+ ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize,
+ ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize,
+ ehdr->e_shnum, ehdr->e_shstrndx);
+ }
+
+ ehdr->e_ident[0] = 42;
+ ehdr->e_ident[4] = 1;
+ ehdr->e_ident[5] = 1;
+ ehdr->e_ident[6] = 2;
+ ehdr->e_type = ET_EXEC;
+ ehdr->e_version = 1;
+ ehdr->e_ehsize = 1;
+ elf_flagehdr (elf, ELF_C_SET, ELF_F_DIRTY);
+
+ /* Create the program header. */
+ phdr = elf32_newphdr (elf, 1);
+ if (phdr == NULL)
+ {
+ printf ("cannot create program header: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ phdr[0].p_type = PT_PHDR;
+ elf_flagphdr (elf, ELF_C_SET, ELF_F_DIRTY);
+
+ /* Let the library compute the internal structure information. */
+ if (elf_update (elf, ELF_C_NULL) < 0)
+ {
+ printf ("failure in elf_update(NULL): %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ ehdr = elf32_getehdr (elf);
+
+ phdr[0].p_offset = ehdr->e_phoff;
+ phdr[0].p_offset = ehdr->e_phoff;
+ phdr[0].p_vaddr = ehdr->e_phoff;
+ phdr[0].p_paddr = ehdr->e_phoff;
+ phdr[0].p_flags = PF_R | PF_X;
+ phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT);
+ phdr[0].p_memsz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT);
+ phdr[0].p_align = sizeof (Elf32_Word);
+
+ /* Write out the file. */
+ if (elf_update (elf, ELF_C_WRITE) < 0)
+ {
+ printf ("failure in elf_update(WRITE): %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Print the ELF header values. */
+ if (argc > 1)
+ {
+ for (i = 0; i < EI_NIDENT; ++i)
+ printf (" %02x", ehdr->e_ident[i]);
+ printf ("\
+\ntype = %hu\nmachine = %hu\nversion = %u\nentry = %u\nphoff = %u\n"
+ "shoff = %u\nflags = %u\nehsize = %hu\nphentsize = %hu\n"
+ "phnum = %hu\nshentsize = %hu\nshnum = %hu\nshstrndx = %hu\n",
+ ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
+ ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize,
+ ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize,
+ ehdr->e_shnum, ehdr->e_shstrndx);
+ }
+
+ if (elf_end (elf) != 0)
+ {
+ printf ("failure in elf_end: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ unlink (fname);
+
+ return 0;
+}
diff --git a/src/tests/update3.c b/src/tests/update3.c
new file mode 100644
index 00000000..d760687a
--- /dev/null
+++ b/src/tests/update3.c
@@ -0,0 +1,205 @@
+/* Test program for elf_update function.
+ Copyright (C) 2000, 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <errno.h>
+#include <fcntl.h>
+#include <libelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include ELFUTILS_HEADER(ebl)
+
+
+int
+main (int argc, char *argv[] __attribute__ ((unused)))
+{
+ const char *fname = "xxx_update3";
+ int fd;
+ Elf *elf;
+ Elf32_Ehdr *ehdr;
+ Elf32_Phdr *phdr;
+ Elf_Scn *scn;
+ Elf32_Shdr *shdr;
+ Elf_Data *data;
+ struct Ebl_Strtab *shst;
+ struct Ebl_Strent *shstrtabse;
+ int i;
+
+ fd = open (fname, O_RDWR | O_CREAT | O_TRUNC, 0666);
+ if (fd == -1)
+ {
+ printf ("cannot open `%s': %s\n", fname, strerror (errno));
+ exit (1);
+ }
+
+ elf_version (EV_CURRENT);
+
+ elf_fill (0x42);
+
+ elf = elf_begin (fd, ELF_C_WRITE, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Create an ELF header. */
+ ehdr = elf32_newehdr (elf);
+ if (ehdr == NULL)
+ {
+ printf ("cannot create ELF header: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Print the ELF header values. */
+ if (argc > 1)
+ {
+ for (i = 0; i < EI_NIDENT; ++i)
+ printf (" %02x", ehdr->e_ident[i]);
+ printf ("\
+\ntype = %hu\nmachine = %hu\nversion = %u\nentry = %u\nphoff = %u\n"
+ "shoff = %u\nflags = %u\nehsize = %hu\nphentsize = %hu\n"
+ "phnum = %hu\nshentsize = %hu\nshnum = %hu\nshstrndx = %hu\n",
+ ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
+ ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize,
+ ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize,
+ ehdr->e_shnum, ehdr->e_shstrndx);
+ }
+
+ ehdr->e_ident[0] = 42;
+ ehdr->e_ident[4] = 1;
+ ehdr->e_ident[5] = 1;
+ ehdr->e_ident[6] = 2;
+ ehdr->e_type = ET_EXEC;
+ ehdr->e_version = 1;
+ ehdr->e_ehsize = 1;
+ elf_flagehdr (elf, ELF_C_SET, ELF_F_DIRTY);
+
+ /* Create the program header. */
+ phdr = elf32_newphdr (elf, 1);
+ if (phdr == NULL)
+ {
+ printf ("cannot create program header: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ phdr[0].p_type = PT_PHDR;
+ elf_flagphdr (elf, ELF_C_SET, ELF_F_DIRTY);
+
+ shst = ebl_strtabinit (true);
+
+ scn = elf_newscn (elf);
+ if (scn == NULL)
+ {
+ printf ("cannot create SHSTRTAB section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+ shdr = elf32_getshdr (scn);
+ if (shdr == NULL)
+ {
+ printf ("cannot get header for SHSTRTAB section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ shstrtabse = ebl_strtabadd (shst, ".shstrtab", 0);
+
+ shdr->sh_type = SHT_STRTAB;
+ shdr->sh_flags = 0;
+ shdr->sh_addr = 0;
+ shdr->sh_link = SHN_UNDEF;
+ shdr->sh_info = SHN_UNDEF;
+ shdr->sh_addralign = 1;
+ shdr->sh_entsize = 0;
+
+ /* We have to store the section index in the ELF header. */
+ ehdr->e_shstrndx = elf_ndxscn (scn);
+
+ data = elf_newdata (scn);
+ if (data == NULL)
+ {
+ printf ("cannot create data SHSTRTAB section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* No more sections, finalize the section header string table. */
+ ebl_strtabfinalize (shst, data);
+
+ shdr->sh_name = ebl_strtaboffset (shstrtabse);
+
+ /* Let the library compute the internal structure information. */
+ if (elf_update (elf, ELF_C_NULL) < 0)
+ {
+ printf ("failure in elf_update(NULL): %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ ehdr = elf32_getehdr (elf);
+
+ phdr[0].p_offset = ehdr->e_phoff;
+ phdr[0].p_offset = ehdr->e_phoff;
+ phdr[0].p_vaddr = ehdr->e_phoff;
+ phdr[0].p_paddr = ehdr->e_phoff;
+ phdr[0].p_flags = PF_R | PF_X;
+ phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT);
+ phdr[0].p_memsz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT);
+ phdr[0].p_align = sizeof (Elf32_Word);
+
+ /* Write out the file. */
+ if (elf_update (elf, ELF_C_WRITE) < 0)
+ {
+ printf ("failure in elf_update(WRITE): %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* We don't need the string table anymore. */
+ ebl_strtabfree (shst);
+
+ /* And the data allocated in the .shstrtab section. */
+ free (data->d_buf);
+
+ /* Print the ELF header values. */
+ if (argc > 1)
+ {
+ for (i = 0; i < EI_NIDENT; ++i)
+ printf (" %02x", ehdr->e_ident[i]);
+ printf ("\
+\ntype = %hu\nmachine = %hu\nversion = %u\nentry = %u\nphoff = %u\n"
+ "shoff = %u\nflags = %u\nehsize = %hu\nphentsize = %hu\n"
+ "phnum = %hu\nshentsize = %hu\nshnum = %hu\nshstrndx = %hu\n",
+ ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
+ ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize,
+ ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize,
+ ehdr->e_shnum, ehdr->e_shstrndx);
+ }
+
+ if (elf_end (elf) != 0)
+ {
+ printf ("failure in elf_end: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ unlink (fname);
+
+ return 0;
+}
diff --git a/src/tests/update4.c b/src/tests/update4.c
new file mode 100644
index 00000000..85de6c35
--- /dev/null
+++ b/src/tests/update4.c
@@ -0,0 +1,357 @@
+/* Test program for elf_update function.
+ Copyright (C) 2000, 2001, 2002, 2005 Red Hat, Inc.
+ This file is part of elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <errno.h>
+#include <fcntl.h>
+#include <libelf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include ELFUTILS_HEADER(ebl)
+
+
+int
+main (int argc, char *argv[] __attribute__ ((unused)))
+{
+ const char fname[] = "xxx_update4";
+ int fd;
+ Elf *elf;
+ Elf32_Ehdr *ehdr;
+ Elf32_Phdr *phdr;
+ Elf_Scn *scn;
+ Elf32_Shdr *shdr;
+ Elf_Data *data;
+ struct Ebl_Strtab *shst;
+ struct Ebl_Strent *firstse;
+ struct Ebl_Strent *secondse;
+ struct Ebl_Strent *thirdse;
+ struct Ebl_Strent *fourthse;
+ struct Ebl_Strent *shstrtabse;
+ int i;
+
+ fd = open (fname, O_RDWR | O_CREAT | O_TRUNC, 0666);
+ if (fd == -1)
+ {
+ printf ("cannot open `%s': %s\n", fname, strerror (errno));
+ exit (1);
+ }
+
+ elf_version (EV_CURRENT);
+
+ elf_fill (0x42);
+
+ elf = elf_begin (fd, ELF_C_WRITE, NULL);
+ if (elf == NULL)
+ {
+ printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Create an ELF header. */
+ ehdr = elf32_newehdr (elf);
+ if (ehdr == NULL)
+ {
+ printf ("cannot create ELF header: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* Print the ELF header values. */
+ if (argc > 1)
+ {
+ for (i = 0; i < EI_NIDENT; ++i)
+ printf (" %02x", ehdr->e_ident[i]);
+ printf ("\
+\ntype = %hu\nmachine = %hu\nversion = %u\nentry = %u\nphoff = %u\n"
+ "shoff = %u\nflags = %u\nehsize = %hu\nphentsize = %hu\n"
+ "phnum = %hu\nshentsize = %hu\nshnum = %hu\nshstrndx = %hu\n",
+ ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
+ ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize,
+ ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize,
+ ehdr->e_shnum, ehdr->e_shstrndx);
+ }
+
+ ehdr->e_ident[0] = 42;
+ ehdr->e_ident[4] = 1;
+ ehdr->e_ident[5] = 1;
+ ehdr->e_ident[6] = 2;
+ ehdr->e_type = ET_EXEC;
+ ehdr->e_version = 1;
+ ehdr->e_ehsize = 1;
+ elf_flagehdr (elf, ELF_C_SET, ELF_F_DIRTY);
+
+ /* Create the program header. */
+ phdr = elf32_newphdr (elf, 1);
+ if (phdr == NULL)
+ {
+ printf ("cannot create program header: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ phdr[0].p_type = PT_PHDR;
+ elf_flagphdr (elf, ELF_C_SET, ELF_F_DIRTY);
+
+ shst = ebl_strtabinit (true);
+
+ scn = elf_newscn (elf);
+ if (scn == NULL)
+ {
+ printf ("cannot create first section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+ shdr = elf32_getshdr (scn);
+ if (shdr == NULL)
+ {
+ printf ("cannot get header for first section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ firstse = ebl_strtabadd (shst, ".first", 0);
+
+ shdr->sh_type = SHT_PROGBITS;
+ shdr->sh_flags = SHF_ALLOC | SHF_EXECINSTR;
+ shdr->sh_addr = 0;
+ shdr->sh_link = 0;
+ shdr->sh_info = 0;
+ shdr->sh_entsize = 1;
+
+ data = elf_newdata (scn);
+ if (data == NULL)
+ {
+ printf ("cannot create data first section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ data->d_buf = "hello";
+ data->d_type = ELF_T_BYTE;
+ data->d_version = EV_CURRENT;
+ data->d_size = 5;
+ data->d_align = 16;
+
+
+ scn = elf_newscn (elf);
+ if (scn == NULL)
+ {
+ printf ("cannot create second section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+ shdr = elf32_getshdr (scn);
+ if (shdr == NULL)
+ {
+ printf ("cannot get header for second section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ secondse = ebl_strtabadd (shst, ".second", 0);
+
+ shdr->sh_type = SHT_PROGBITS;
+ shdr->sh_flags = SHF_ALLOC | SHF_WRITE;
+ shdr->sh_addr = 0;
+ shdr->sh_link = 0;
+ shdr->sh_info = 0;
+ shdr->sh_entsize = 1;
+
+ data = elf_newdata (scn);
+ if (data == NULL)
+ {
+ printf ("cannot create data second section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ data->d_buf = "world";
+ data->d_type = ELF_T_BYTE;
+ data->d_version = EV_CURRENT;
+ data->d_size = 5;
+ data->d_align = 16;
+
+
+ scn = elf_newscn (elf);
+ if (scn == NULL)
+ {
+ printf ("cannot create third section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+ shdr = elf32_getshdr (scn);
+ if (shdr == NULL)
+ {
+ printf ("cannot get header for third section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ thirdse = ebl_strtabadd (shst, ".third", 0);
+
+ shdr->sh_type = SHT_PROGBITS;
+ shdr->sh_flags = SHF_ALLOC | SHF_EXECINSTR;
+ shdr->sh_addr = 0;
+ shdr->sh_link = 0;
+ shdr->sh_info = 0;
+ shdr->sh_entsize = 1;
+
+ data = elf_newdata (scn);
+ if (data == NULL)
+ {
+ printf ("cannot create data third section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ data->d_buf = "!!!!!";
+ data->d_type = ELF_T_BYTE;
+ data->d_version = EV_CURRENT;
+ data->d_size = 5;
+ data->d_align = 16;
+
+
+ scn = elf_newscn (elf);
+ if (scn == NULL)
+ {
+ printf ("cannot create fourth section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+ shdr = elf32_getshdr (scn);
+ if (shdr == NULL)
+ {
+ printf ("cannot get header for fourth section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ fourthse = ebl_strtabadd (shst, ".fourth", 0);
+
+ shdr->sh_type = SHT_NOBITS;
+ shdr->sh_flags = SHF_ALLOC | SHF_EXECINSTR;
+ shdr->sh_addr = 0;
+ shdr->sh_link = 0;
+ shdr->sh_info = 0;
+ shdr->sh_entsize = 1;
+ shdr->sh_size = 100;
+
+ data = elf_newdata (scn);
+ if (data == NULL)
+ {
+ printf ("cannot create data fourth section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ data->d_buf = NULL;
+ data->d_type = ELF_T_BYTE;
+ data->d_version = EV_CURRENT;
+ data->d_size = 100;
+ data->d_align = 16;
+
+
+ scn = elf_newscn (elf);
+ if (scn == NULL)
+ {
+ printf ("cannot create SHSTRTAB section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+ shdr = elf32_getshdr (scn);
+ if (shdr == NULL)
+ {
+ printf ("cannot get header for SHSTRTAB section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ shstrtabse = ebl_strtabadd (shst, ".shstrtab", 0);
+
+ shdr->sh_type = SHT_STRTAB;
+ shdr->sh_flags = 0;
+ shdr->sh_addr = 0;
+ shdr->sh_link = SHN_UNDEF;
+ shdr->sh_info = SHN_UNDEF;
+ shdr->sh_entsize = 1;
+
+ /* We have to store the section index in the ELF header. */
+ ehdr->e_shstrndx = elf_ndxscn (scn);
+
+ data = elf_newdata (scn);
+ if (data == NULL)
+ {
+ printf ("cannot create data SHSTRTAB section: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* No more sections, finalize the section header string table. */
+ ebl_strtabfinalize (shst, data);
+
+ elf32_getshdr (elf_getscn (elf, 1))->sh_name = ebl_strtaboffset (firstse);
+ elf32_getshdr (elf_getscn (elf, 2))->sh_name = ebl_strtaboffset (secondse);
+ elf32_getshdr (elf_getscn (elf, 3))->sh_name = ebl_strtaboffset (thirdse);
+ elf32_getshdr (elf_getscn (elf, 4))->sh_name = ebl_strtaboffset (fourthse);
+ shdr->sh_name = ebl_strtaboffset (shstrtabse);
+
+ /* Let the library compute the internal structure information. */
+ if (elf_update (elf, ELF_C_NULL) < 0)
+ {
+ printf ("failure in elf_update(NULL): %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ ehdr = elf32_getehdr (elf);
+
+ phdr[0].p_offset = ehdr->e_phoff;
+ phdr[0].p_offset = ehdr->e_phoff;
+ phdr[0].p_vaddr = ehdr->e_phoff;
+ phdr[0].p_paddr = ehdr->e_phoff;
+ phdr[0].p_flags = PF_R | PF_X;
+ phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT);
+ phdr[0].p_memsz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT);
+ phdr[0].p_align = sizeof (Elf32_Word);
+
+ /* Write out the file. */
+ if (elf_update (elf, ELF_C_WRITE) < 0)
+ {
+ printf ("failure in elf_update(WRITE): %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ /* We don't need the string table anymore. */
+ ebl_strtabfree (shst);
+
+ /* And the data allocated in the .shstrtab section. */
+ free (data->d_buf);
+
+ /* Print the ELF header values. */
+ if (argc > 1)
+ {
+ for (i = 0; i < EI_NIDENT; ++i)
+ printf (" %02x", ehdr->e_ident[i]);
+ printf ("\
+\ntype = %hu\nmachine = %hu\nversion = %u\nentry = %u\nphoff = %u\n"
+ "shoff = %u\nflags = %u\nehsize = %hu\nphentsize = %hu\n"
+ "phnum = %hu\nshentsize = %hu\nshnum = %hu\nshstrndx = %hu\n",
+ ehdr->e_type, ehdr->e_machine, ehdr->e_version, ehdr->e_entry,
+ ehdr->e_phoff, ehdr->e_shoff, ehdr->e_flags, ehdr->e_ehsize,
+ ehdr->e_phentsize, ehdr->e_phnum, ehdr->e_shentsize,
+ ehdr->e_shnum, ehdr->e_shstrndx);
+ }
+
+ if (elf_end (elf) != 0)
+ {
+ printf ("failure in elf_end: %s\n", elf_errmsg (-1));
+ exit (1);
+ }
+
+ unlink (fname);
+
+ return 0;
+}
diff --git a/src/tests/varlocs.c b/src/tests/varlocs.c
new file mode 100644
index 00000000..04f17ff2
--- /dev/null
+++ b/src/tests/varlocs.c
@@ -0,0 +1,826 @@
+/* Test program for dwarf location functions.
+ Copyright (C) 2013 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <argp.h>
+#include <inttypes.h>
+#include <errno.h>
+#include ELFUTILS_HEADER(dw)
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <error.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "../libdw/known-dwarf.h"
+
+// The Dwarf, Dwarf_CFIs and address bias of
+// cfi table to adjust DWARF addresses against.
+// Needed for DW_OP_call_frame_cfa.
+static Dwarf *dw;
+Dwarf_CFI *cfi_debug;
+Dwarf_CFI *cfi_eh;
+Dwarf_Addr cfi_eh_bias;
+
+// Whether the current function has a DW_AT_frame_base defined.
+// Needed for DW_OP_fbreg.
+bool has_frame_base;
+
+static void
+print_die (Dwarf_Die *die, const char *what, int indent)
+{
+ Dwarf_Addr entrypc;
+ const char *name = dwarf_diename (die) ?: "<unknown>";
+ if (dwarf_entrypc (die, &entrypc) == 0)
+ printf ("%*s[%" PRIx64 "] %s '%s'@%" PRIx64 "\n", indent * 2, "",
+ dwarf_dieoffset (die), what, name, entrypc);
+ else
+ printf ("%*s[%" PRIx64 "] %s '%s'\n", indent * 2, "",
+ dwarf_dieoffset (die), what, name);
+}
+
+static const char *
+dwarf_encoding_string (unsigned int code)
+{
+ static const char *const known[] =
+ {
+#define ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME,
+ ALL_KNOWN_DW_ATE
+#undef ONE_KNOWN_DW_ATE
+ };
+
+ if (likely (code < sizeof (known) / sizeof (known[0])))
+ return known[code];
+
+ return NULL;
+}
+
+/* BASE must be a base type DIE referenced by a typed DWARF expression op. */
+static void
+print_base_type (Dwarf_Die *base)
+{
+ assert (dwarf_tag (base) == DW_TAG_base_type);
+
+ Dwarf_Attribute encoding;
+ Dwarf_Word enctype;
+ if (dwarf_attr (base, DW_AT_encoding, &encoding) == NULL
+ || dwarf_formudata (&encoding, &enctype) != 0)
+ error (EXIT_FAILURE, 0, "base type without encoding");
+
+ Dwarf_Attribute bsize;
+ Dwarf_Word bits;
+ if (dwarf_attr (base, DW_AT_byte_size, &bsize) != NULL
+ && dwarf_formudata (&bsize, &bits) == 0)
+ bits *= 8;
+ else if (dwarf_attr (base, DW_AT_bit_size, &bsize) == NULL
+ || dwarf_formudata (&bsize, &bits) != 0)
+ error (EXIT_FAILURE, 0, "base type without byte or bit size");
+
+ printf ("{%s,%s,%" PRIu64 "@[%" PRIx64 "]}",
+ dwarf_diename (base),
+ dwarf_encoding_string (enctype),
+ bits,
+ dwarf_dieoffset (base));
+}
+
+static const char *
+dwarf_opcode_string (unsigned int code)
+{
+ static const char *const known[] =
+ {
+#define ONE_KNOWN_DW_OP_DESC(NAME, CODE, DESC) ONE_KNOWN_DW_OP (NAME, CODE)
+#define ONE_KNOWN_DW_OP(NAME, CODE) [CODE] = #NAME,
+ ALL_KNOWN_DW_OP
+#undef ONE_KNOWN_DW_OP
+#undef ONE_KNOWN_DW_OP_DESC
+ };
+
+ if (likely (code < sizeof (known) / sizeof (known[0])))
+ return known[code];
+
+ return NULL;
+}
+
+// Forward reference for print_expr_block.
+static void print_expr (Dwarf_Attribute *, Dwarf_Op *, Dwarf_Addr);
+
+static void
+print_expr_block (Dwarf_Attribute *attr, Dwarf_Op *exprs, int len,
+ Dwarf_Addr addr)
+{
+ printf ("{");
+ for (int i = 0; i < len; i++)
+ {
+ print_expr (attr, &exprs[i], addr);
+ printf ("%s", (i + 1 < len ? ", " : ""));
+ }
+ printf ("}");
+}
+
+static void
+print_expr_block_addrs (Dwarf_Attribute *attr,
+ Dwarf_Addr begin, Dwarf_Addr end,
+ Dwarf_Op *exprs, int len)
+{
+ printf (" [%" PRIx64 ",%" PRIx64 ") ", begin, end);
+ print_expr_block (attr, exprs, len, begin);
+ printf ("\n");
+}
+
+static void
+print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr)
+{
+ uint8_t atom = expr->atom;
+ const char *opname = dwarf_opcode_string (atom);
+ assert (opname != NULL);
+
+ switch (atom)
+ {
+ case DW_OP_deref:
+ case DW_OP_dup:
+ case DW_OP_drop:
+ case DW_OP_over:
+ case DW_OP_swap:
+ case DW_OP_rot:
+ case DW_OP_xderef:
+ case DW_OP_abs:
+ case DW_OP_and:
+ case DW_OP_div:
+ case DW_OP_minus:
+ case DW_OP_mod:
+ case DW_OP_mul:
+ case DW_OP_neg:
+ case DW_OP_not:
+ case DW_OP_or:
+ case DW_OP_plus:
+ case DW_OP_shl:
+ case DW_OP_shr:
+ case DW_OP_shra:
+ case DW_OP_xor:
+ case DW_OP_eq:
+ case DW_OP_ge:
+ case DW_OP_gt:
+ case DW_OP_le:
+ case DW_OP_lt:
+ case DW_OP_ne:
+ case DW_OP_lit0 ... DW_OP_lit31:
+ case DW_OP_reg0 ... DW_OP_reg31:
+ case DW_OP_nop:
+ case DW_OP_stack_value:
+ /* No arguments. */
+ printf ("%s", opname);
+ break;
+
+ case DW_OP_form_tls_address:
+ /* No arguments. Special. Pops an address and pushes the
+ corresponding address in the current thread local
+ storage. Uses the thread local storage block of the defining
+ module (executable, shared library). */
+ printf ("%s", opname);
+ break;
+
+ case DW_OP_GNU_push_tls_address:
+ /* No arguments. Special. Not the same as DW_OP_form_tls_address.
+ Pops an offset into the current thread local strorage and
+ pushes back the actual address. */
+ printf ("%s", opname);
+ break;
+
+ case DW_OP_call_frame_cfa:
+ /* No arguments. Special. Pushes Call Frame Address as computed
+ by CFI data (dwarf_cfi_addrframe will fetch that info (either from
+ the .eh_frame or .debug_frame CFI) and dwarf_frame_cfa translatesr
+ the CFI instructions into a plain DWARF expression.
+ Never used in CFI itself. */
+
+ if (attr == NULL)
+ error (EXIT_FAILURE, 0, "%s used in CFI", opname);
+
+ printf ("%s ", opname);
+ if (cfi_eh == NULL && cfi_debug == NULL)
+ error (EXIT_FAILURE, 0, "DW_OP_call_frame_cfa used but no cfi found.");
+
+ Dwarf_Frame *frame;
+ if (dwarf_cfi_addrframe (cfi_eh, addr + cfi_eh_bias, &frame) != 0
+ && dwarf_cfi_addrframe (cfi_debug, addr, &frame) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_cfi_addrframe 0x%" PRIx64 ": %s",
+ addr, dwarf_errmsg (-1));
+
+ Dwarf_Op *cfa_ops;
+ size_t cfa_nops;
+ if (dwarf_frame_cfa (frame, &cfa_ops, &cfa_nops) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_frame_cfa 0x%" PRIx64 ": %s",
+ addr, dwarf_errmsg (-1));
+ if (cfa_nops < 1)
+ error (EXIT_FAILURE, 0, "dwarf_frame_cfa no ops");
+ print_expr_block (NULL, cfa_ops, cfa_nops, 0);
+ free (frame);
+ break;
+
+ case DW_OP_push_object_address:
+ /* No arguments. Special. Pushes object address explicitly.
+ Normally only done implicitly by DW_AT_data_member_location.
+ Never used in CFI. */
+ if (attr == NULL)
+ error (EXIT_FAILURE, 0, "%s used in CFI", opname);
+ printf ("%s", opname);
+ break;
+
+ case DW_OP_addr:
+ /* 1 address argument. */
+ printf ("%s(0x%" PRIx64 ")", opname, (Dwarf_Addr) expr->number);
+ break;
+
+ case DW_OP_const1u:
+ case DW_OP_const2u:
+ case DW_OP_const4u:
+ case DW_OP_const8u:
+ case DW_OP_constu:
+ case DW_OP_pick:
+ case DW_OP_plus_uconst:
+ case DW_OP_regx:
+ case DW_OP_piece:
+ case DW_OP_deref_size:
+ case DW_OP_xderef_size:
+ /* 1 numeric unsigned argument. */
+ printf ("%s(%" PRIu64 ")", opname, expr->number);
+ break;
+
+ case DW_OP_call2:
+ case DW_OP_call4:
+ case DW_OP_call_ref:
+ /* 1 DIE offset argument for more ops in location attribute of DIE.
+ Never used in CFI. */
+ {
+ if (attr == NULL)
+ error (EXIT_FAILURE, 0, "%s used in CFI", opname);
+
+ Dwarf_Attribute call_attr;
+ if (dwarf_getlocation_attr (attr, expr, &call_attr) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_attr for %s error %s",
+ opname, dwarf_errmsg (-1));
+
+ Dwarf_Die call_die;
+ if (dwarf_getlocation_die (attr, expr, &call_die) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_die for %s error %s",
+ opname, dwarf_errmsg (-1));
+
+ Dwarf_Op *call_ops;
+ size_t call_len;
+ if (dwarf_getlocation (&call_attr, &call_ops, &call_len) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation for entry: %s",
+ dwarf_errmsg (-1));
+
+ printf ("%s([%" PRIx64 "]) ", opname, dwarf_dieoffset (&call_die));
+ print_expr_block (&call_attr, call_ops, call_len, addr);
+ }
+ break;
+
+ case DW_OP_const1s:
+ case DW_OP_const2s:
+ case DW_OP_const4s:
+ case DW_OP_const8s:
+ case DW_OP_consts:
+ case DW_OP_skip:
+ case DW_OP_bra:
+ case DW_OP_breg0 ... DW_OP_breg31:
+ /* 1 numeric signed argument. */
+ printf ("%s(%" PRId64 ")", opname, (Dwarf_Sword) expr->number);
+ break;
+
+ case DW_OP_fbreg:
+ /* 1 numeric signed argument. Offset from frame base. */
+ if (attr == NULL)
+ error (EXIT_FAILURE, 0, "%s used in CFI", opname);
+
+ if (! has_frame_base)
+ error (EXIT_FAILURE, 0, "DW_OP_fbreg used without a frame base");
+
+ printf ("%s(%" PRId64 ")", opname, (Dwarf_Sword) expr->number);
+ break;
+
+ case DW_OP_bregx:
+ /* 2 arguments, unsigned register number, signed offset. */
+ printf ("%s(%" PRIu64 ",%" PRId64 ")", opname,
+ expr->number, (Dwarf_Sword) expr->number2);
+ break;
+
+ case DW_OP_bit_piece:
+ /* 2 arguments, unsigned size, unsigned offset. */
+ printf ("%s(%" PRIu64 ",%" PRIu64 ")", opname,
+ expr->number, expr->number2);
+ break;
+
+ case DW_OP_implicit_value:
+ /* Special, unsigned size plus block. */
+ {
+ Dwarf_Attribute const_attr;
+ Dwarf_Block block;
+ if (dwarf_getlocation_attr (attr, expr, &const_attr) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_attr: %s",
+ dwarf_errmsg (-1));
+
+ if (dwarf_formblock (&const_attr, &block) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_formblock: %s",
+ dwarf_errmsg (-1));
+
+ /* This is the "old" way. Check they result in the same. */
+ Dwarf_Block block_impl;
+ if (dwarf_getlocation_implicit_value (attr, expr, &block_impl) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_implicit_value: %s",
+ dwarf_errmsg (-1));
+
+ assert (expr->number == block.length);
+ assert (block.length == block_impl.length);
+ printf ("%s(%" PRIu64 "){", opname, block.length);
+ for (size_t i = 0; i < block.length; i++)
+ {
+ printf ("%02x", block.data[i]);
+ assert (block.data[i] == block_impl.data[i]);
+ }
+ printf("}");
+ }
+ break;
+
+ case DW_OP_GNU_implicit_pointer:
+ /* Special, DIE offset, signed offset. Referenced DIE has a
+ location or const_value attribute. */
+ {
+ if (attr == NULL)
+ error (EXIT_FAILURE, 0, "%s used in CFI", opname);
+
+ Dwarf_Attribute attrval;
+ if (dwarf_getlocation_implicit_pointer (attr, expr, &attrval) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_implicit_pointer: %s",
+ dwarf_errmsg (-1));
+
+ // Sanity check, results should be the same.
+ Dwarf_Attribute attrval2;
+ if (dwarf_getlocation_attr (attr, expr, &attrval2) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_attr: %s",
+ dwarf_errmsg (-1));
+
+ assert (dwarf_whatattr (&attrval) == dwarf_whatattr (&attrval2));
+ assert (dwarf_whatform (&attrval) == dwarf_whatform (&attrval2));
+ // In theory two different valp pointers could point to the same
+ // value. But here we really expect them to be the equal.
+ assert (attrval.valp == attrval2.valp);
+
+ Dwarf_Die impl_die;
+ if (dwarf_getlocation_die (attr, expr, &impl_die) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_due: %s",
+ dwarf_errmsg (-1));
+
+ printf ("%s([%" PRIx64 "],%" PRId64 ") ", opname,
+ dwarf_dieoffset (&impl_die), expr->number2);
+
+ if (dwarf_whatattr (&attrval) == DW_AT_const_value)
+ printf ("<constant value>"); // Lookup type...
+ else
+ {
+ // Lookup the location description at the current address.
+ Dwarf_Op *exprval;
+ size_t exprval_len;
+ int locs = dwarf_getlocation_addr (&attrval, addr,
+ &exprval, &exprval_len, 1);
+ if (locs == 0)
+ printf ("<no location>"); // This means "optimized out".
+ else if (locs == 1)
+ print_expr_block (&attrval, exprval, exprval_len, addr);
+ else
+ error (EXIT_FAILURE, 0,
+ "dwarf_getlocation_addr attrval at addr 0x%" PRIx64
+ ", locs (%d): %s", addr, locs, dwarf_errmsg (-1));
+ }
+ }
+ break;
+
+ case DW_OP_GNU_entry_value:
+ /* Special, unsigned size plus expression block. All registers
+ inside the block should be interpreted as they had on
+ entering the function. dwarf_getlocation_attr will return an
+ attribute containing the block as locexpr which can be
+ retrieved with dwarf_getlocation. */
+ {
+ Dwarf_Attribute entry_attr;
+ if (dwarf_getlocation_attr (attr, expr, &entry_attr) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_attr: %s",
+ dwarf_errmsg (-1));
+
+ Dwarf_Op *entry_ops;
+ size_t entry_len;
+ if (dwarf_getlocation (&entry_attr, &entry_ops, &entry_len) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation for entry: %s",
+ dwarf_errmsg (-1));
+
+ printf ("%s(%zd) ", opname, entry_len);
+ print_expr_block (attr, entry_ops, entry_len, addr);
+ }
+ break;
+
+ case DW_OP_GNU_parameter_ref:
+ /* Special, unsigned CU relative DIE offset pointing to a
+ DW_TAG_formal_parameter. The value that parameter had at the
+ call site of the current function will be put on the DWARF
+ stack. The value can be retrieved by finding the
+ DW_TAG_GNU_call_site_parameter which has as
+ DW_AT_abstract_origin the same formal parameter DIE. */
+ {
+ Dwarf_Die param;
+ if (dwarf_getlocation_die (attr, expr, &param) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_die: %s",
+ dwarf_errmsg (-1));
+ // XXX actually lookup DW_TAG_GNU_call_site_parameter
+ printf ("%s[%" PRIx64 "]", opname, dwarf_dieoffset (&param));
+ assert (expr->number == dwarf_cuoffset (&param));
+ assert (dwarf_tag (&param) == DW_TAG_formal_parameter);
+ }
+ break;
+
+ case DW_OP_GNU_convert:
+ case DW_OP_GNU_reinterpret:
+ /* Special, unsigned CU relative DIE offset pointing to a
+ DW_TAG_base_type. Pops a value, converts or reinterprets the
+ value to the given type. When the argument is zero the value
+ becomes untyped again. */
+ {
+ Dwarf_Die type;
+ Dwarf_Off off = expr->number;
+ if (off != 0)
+ {
+ if (dwarf_getlocation_die (attr, expr, &type) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_die: %s",
+ dwarf_errmsg (-1));
+ off = dwarf_dieoffset (&type);
+ assert (expr->number == dwarf_cuoffset (&type));
+ printf ("%s", opname);
+ print_base_type (&type);
+ }
+ else
+ printf ("%s[%" PRIu64 "]", opname, off);
+
+ }
+ break;
+
+ case DW_OP_GNU_regval_type:
+ /* Special, unsigned register number plus unsigned CU relative
+ DIE offset pointing to a DW_TAG_base_type. */
+ {
+ Dwarf_Die type;
+ if (dwarf_getlocation_die (attr, expr, &type) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_die: %s",
+ dwarf_errmsg (-1));
+ assert (expr->number2 == dwarf_cuoffset (&type));
+ // XXX check size against base_type size?
+ printf ("%s(reg%" PRIu64 ")", opname, expr->number);
+ print_base_type (&type);
+ }
+ break;
+
+ case DW_OP_GNU_deref_type:
+ /* Special, unsigned size plus unsigned CU relative DIE offset
+ pointing to a DW_TAG_base_type. */
+ {
+ Dwarf_Die type;
+ if (dwarf_getlocation_die (attr, expr, &type) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_die: %s",
+ dwarf_errmsg (-1));
+ assert (expr->number2 == dwarf_cuoffset (&type));
+ // XXX check size against base_type size?
+ printf ("%s(%" PRIu64 ")", opname, expr->number);
+ print_base_type (&type);
+ }
+ break;
+
+ case DW_OP_GNU_const_type:
+ /* Special, unsigned CU relative DIE offset pointing to a
+ DW_TAG_base_type, an unsigned size length plus a block with
+ the constant value. */
+ {
+ Dwarf_Die type;
+ if (dwarf_getlocation_die (attr, expr, &type) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_die: %s",
+ dwarf_errmsg (-1));
+ assert (expr->number == dwarf_cuoffset (&type));
+
+ Dwarf_Attribute const_attr;
+ if (dwarf_getlocation_attr (attr, expr, &const_attr) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocation_attr for type: %s",
+ dwarf_errmsg (-1));
+
+ Dwarf_Block block;
+ if (dwarf_formblock (&const_attr, &block) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_formblock for type: %s",
+ dwarf_errmsg (-1));
+
+ printf ("%s", opname);
+ print_base_type (&type);
+ printf ("(%" PRIu64 ")[", block.length);
+ for (size_t i = 0; i < block.length; i++)
+ printf ("%02x", block.data[i]);
+ printf("]");
+ }
+ break;
+
+ default:
+ error (EXIT_FAILURE, 0, "unhandled opcode: DW_OP_%s (0x%x)",
+ opname, atom);
+ }
+}
+
+/* Get all variables and print their value expressions. */
+static void
+print_varlocs (Dwarf_Die *funcdie)
+{
+ // Display frame base for function if it exists.
+ // Should be used for DW_OP_fbreg.
+ has_frame_base = dwarf_hasattr (funcdie, DW_AT_frame_base);
+ if (has_frame_base)
+ {
+ Dwarf_Attribute fb_attr;
+ if (dwarf_attr (funcdie, DW_AT_frame_base, &fb_attr) == NULL)
+ error (EXIT_FAILURE, 0, "dwarf_attr fb: %s", dwarf_errmsg (-1));
+
+ Dwarf_Op *fb_expr;
+ size_t fb_exprlen;
+ if (dwarf_getlocation (&fb_attr, &fb_expr, &fb_exprlen) == 0)
+ {
+ // Covers all of function.
+ Dwarf_Addr entrypc;
+ if (dwarf_entrypc (funcdie, &entrypc) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_entrypc: %s", dwarf_errmsg (-1));
+
+ printf (" frame_base: ");
+ if (entrypc == 0)
+ printf ("XXX zero address"); // XXX bad DWARF?
+ else
+ print_expr_block (&fb_attr, fb_expr, fb_exprlen, entrypc);
+ printf ("\n");
+ }
+ else
+ {
+ Dwarf_Addr base, start, end;
+ ptrdiff_t off = 0;
+ printf (" frame_base:\n");
+ while ((off = dwarf_getlocations (&fb_attr, off, &base,
+ &start, &end,
+ &fb_expr, &fb_exprlen)) > 0)
+ {
+ printf (" (%" PRIx64 ",%" PRIx64 ") ", start, end);
+ print_expr_block (&fb_attr, fb_expr, fb_exprlen, start);
+ printf ("\n");
+ }
+
+ if (off < 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocations fb: %s",
+ dwarf_errmsg (-1));
+ }
+ }
+ else if (dwarf_tag (funcdie) == DW_TAG_inlined_subroutine)
+ {
+ // See whether the subprogram we are inlined into has a frame
+ // base we should use.
+ Dwarf_Die *scopes;
+ int n = dwarf_getscopes_die (funcdie, &scopes);
+ if (n <= 0)
+ error (EXIT_FAILURE, 0, "dwarf_getscopes_die: %s", dwarf_errmsg (-1));
+
+ while (n-- > 0)
+ if (dwarf_tag (&scopes[n]) == DW_TAG_subprogram
+ && dwarf_hasattr (&scopes[n], DW_AT_frame_base))
+ {
+ has_frame_base = true;
+ break;
+ }
+ free (scopes);
+ }
+
+ if (! dwarf_haschildren (funcdie))
+ return;
+
+ Dwarf_Die child;
+ int res = dwarf_child (funcdie, &child);
+ if (res < 0)
+ error (EXIT_FAILURE, 0, "dwarf_child: %s", dwarf_errmsg (-1));
+
+ /* We thought there was a child, but the child list was actually
+ empty. This isn't technically an error in the DWARF, but it is
+ certainly non-optimimal. */
+ if (res == 1)
+ return;
+
+ do
+ {
+ int tag = dwarf_tag (&child);
+ if (tag == DW_TAG_variable || tag == DW_TAG_formal_parameter)
+ {
+ const char *what = tag == DW_TAG_variable ? "variable" : "parameter";
+ print_die (&child, what, 2);
+
+ if (dwarf_hasattr (&child, DW_AT_location))
+ {
+ Dwarf_Attribute attr;
+ if (dwarf_attr (&child, DW_AT_location, &attr) == NULL)
+ error (EXIT_FAILURE, 0, "dwarf_attr: %s", dwarf_errmsg (-1));
+
+ Dwarf_Op *expr;
+ size_t exprlen;
+ if (dwarf_getlocation (&attr, &expr, &exprlen) == 0)
+ {
+ // Covers all ranges of the function.
+ // Evaluate the expression block for each range.
+ ptrdiff_t offset = 0;
+ Dwarf_Addr base, begin, end;
+ do
+ {
+ offset = dwarf_ranges (funcdie, offset, &base,
+ &begin, &end);
+ if (offset < 0)
+ error (EXIT_FAILURE, 0, "dwarf_ranges: %s",
+ dwarf_errmsg (-1));
+
+ if (offset > 0)
+ {
+ if (exprlen == 0)
+ printf (" (%"
+ PRIx64 ",%" PRIx64
+ ") <empty expression>\n", begin, end);
+ else
+ print_expr_block_addrs (&attr, begin, end,
+ expr, exprlen);
+ }
+ }
+ while (offset > 0);
+
+ if (offset < 0)
+ error (EXIT_FAILURE, 0, "dwarf_ranges: %s",
+ dwarf_errmsg (-1));
+ }
+ else
+ {
+ Dwarf_Addr base, begin, end;
+ ptrdiff_t offset = 0;
+ while ((offset = dwarf_getlocations (&attr, offset,
+ &base, &begin, &end,
+ &expr, &exprlen)) > 0)
+ if (begin >= end)
+ printf (" (%" PRIx64 ",%" PRIx64
+ ") <empty range>\n", begin, end); // XXX report?
+ else
+ {
+ print_expr_block_addrs (&attr, begin, end,
+ expr, exprlen);
+
+ // Extra sanity check for dwarf_getlocation_addr
+ // Must at least find one range for begin and end-1.
+ Dwarf_Op *expraddr;
+ size_t expraddr_len;
+ int locs = dwarf_getlocation_addr (&attr, begin,
+ &expraddr,
+ &expraddr_len, 1);
+ assert (locs == 1);
+ locs = dwarf_getlocation_addr (&attr, end - 1,
+ &expraddr,
+ &expraddr_len, 1);
+ assert (locs == 1);
+ }
+
+ if (offset < 0)
+ error (EXIT_FAILURE, 0, "dwarf_getlocations: %s",
+ dwarf_errmsg (-1));
+ }
+ }
+ else if (dwarf_hasattr (&child, DW_AT_const_value))
+ {
+ printf (" <constant value>\n"); // Lookup type and print.
+ }
+ else
+ {
+ printf (" <no value>\n");
+ }
+ }
+ }
+ while (dwarf_siblingof (&child, &child) == 0);
+}
+
+static int
+handle_instance (Dwarf_Die *funcdie, void *arg __attribute__ ((unused)))
+{
+ print_die (funcdie, "inlined function", 1);
+ print_varlocs (funcdie);
+
+ return DWARF_CB_OK;
+}
+
+static int
+handle_function (Dwarf_Die *funcdie, void *arg __attribute__((unused)))
+{
+ if (dwarf_func_inline (funcdie) > 0)
+ {
+ // abstract inline definition, find all inlined instances.
+
+ // Note this is convenient for listing all instances together
+ // so you can easily compare the location expressions describing
+ // the variables and parameters, but it isn't very efficient
+ // since it will walk the DIE tree multiple times.
+ if (dwarf_func_inline_instances (funcdie, &handle_instance, NULL) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_func_inline_instances: %s",
+ dwarf_errmsg (-1));
+ }
+ else
+ {
+ // Contains actual code, not just a declaration?
+ Dwarf_Addr entrypc;
+ if (dwarf_entrypc (funcdie, &entrypc) == 0)
+ {
+ print_die (funcdie, "function", 1);
+ print_varlocs (funcdie);
+ }
+ }
+
+ return DWARF_CB_OK;
+}
+
+int
+main (int argc, char *argv[])
+{
+ int remaining;
+ Dwfl *dwfl;
+ (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining,
+ &dwfl);
+ assert (dwfl != NULL);
+
+ Dwarf_Die *cu = NULL;
+ Dwarf_Addr dwbias;
+ while ((cu = dwfl_nextcu (dwfl, cu, &dwbias)) != NULL)
+ {
+ /* Only walk actual compile units (not partial units) that
+ contain code. */
+ Dwarf_Addr cubase;
+ if (dwarf_tag (cu) == DW_TAG_compile_unit
+ && dwarf_lowpc (cu, &cubase) == 0)
+ {
+ Dwfl_Module *mod = dwfl_cumodule (cu);
+ Dwarf_Addr modbias;
+ dw = dwfl_module_getdwarf (mod, &modbias);
+ assert (dwbias == modbias);
+
+ const char *mainfile;
+ const char *modname = dwfl_module_info (mod, NULL,
+ NULL, NULL,
+ NULL, NULL,
+ &mainfile,
+ NULL);
+ if (modname == NULL)
+ error (EXIT_FAILURE, 0, "dwfl_module_info: %s", dwarf_errmsg (-1));
+
+ const char *name = (modname[0] != '\0'
+ ? modname
+ : basename (mainfile));
+ printf ("module '%s'\n", name);
+ print_die (cu, "CU", 0);
+
+ Dwarf_Addr elfbias;
+ Elf *elf = dwfl_module_getelf (mod, &elfbias);
+
+ // CFI. We need both since sometimes neither is complete.
+ cfi_debug = dwarf_getcfi (dw); // No bias needed, same file.
+ cfi_eh = dwarf_getcfi_elf (elf);
+ cfi_eh_bias = dwbias - elfbias;
+
+ // Get the actual CU DIE and walk all functions inside it.
+ Dwarf_Die cudie;
+ uint8_t offsize;
+ uint8_t addrsize;
+ if (dwarf_diecu (cu, &cudie, &addrsize, &offsize) == NULL)
+ error (EXIT_FAILURE, 0, "dwarf_diecu %s", dwarf_errmsg (-1));
+
+ if (dwarf_getfuncs (cu, handle_function, NULL, 0) != 0)
+ error (EXIT_FAILURE, 0, "dwarf_getfuncs %s",
+ dwarf_errmsg (-1));
+ }
+ }
+
+ dwfl_end (dwfl);
+ return 0;
+}
diff --git a/src/tests/vdsosyms.c b/src/tests/vdsosyms.c
new file mode 100644
index 00000000..c1f8d89f
--- /dev/null
+++ b/src/tests/vdsosyms.c
@@ -0,0 +1,109 @@
+/* Test program for getting symbol table from vdso module.
+ Copyright (C) 2014 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <errno.h>
+#include <error.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include ELFUTILS_HEADER(dwfl)
+
+#ifndef __linux__
+int
+main (int argc __attribute__ ((unused)), char **argv)
+{
+ printf ("Getting the vdso is unsupported.\n");
+ return 77;
+}
+#else /* __linux__ */
+static int vdso_syms = 0;
+
+static int
+module_callback (Dwfl_Module *mod, void **userdata __attribute__((unused)),
+ const char *name, Dwarf_Addr start __attribute__((unused)),
+ void *arg __attribute__((unused)))
+{
+ /* We can only recognize the vdso by inspecting the "magic name". */
+ printf ("module name: %s\n", name);
+ if (strncmp ("[vdso: ", name, 7) == 0)
+ {
+ vdso_syms = dwfl_module_getsymtab (mod);
+ printf ("vdso syms: %d\n", vdso_syms);
+ if (vdso_syms < 0)
+ error (2, 0, "dwfl_module_getsymtab: %s", dwfl_errmsg (-1));
+
+ for (int i = 0; i < vdso_syms; i++)
+ {
+ GElf_Sym sym;
+ GElf_Addr addr;
+ const char *sname = dwfl_module_getsym_info (mod, i, &sym, &addr,
+ NULL, NULL, NULL);
+ assert (sname != NULL);
+ printf ("%d: '%s' %" PRIx64 " (%" PRIx64 ")\n",
+ i, sname, sym.st_value, addr);
+ }
+ }
+
+ return DWARF_CB_OK;
+}
+
+int
+main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)))
+{
+ static char *debuginfo_path;
+ static const Dwfl_Callbacks proc_callbacks =
+ {
+ .find_debuginfo = dwfl_standard_find_debuginfo,
+ .debuginfo_path = &debuginfo_path,
+
+ .find_elf = dwfl_linux_proc_find_elf,
+ };
+ Dwfl *dwfl = dwfl_begin (&proc_callbacks);
+ if (dwfl == NULL)
+ error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1));
+
+ /* Take our parent as "arbitrary" process to inspect. */
+ pid_t pid = getppid();
+
+ int result = dwfl_linux_proc_report (dwfl, pid);
+ if (result < 0)
+ error (2, 0, "dwfl_linux_proc_report: %s", dwfl_errmsg (-1));
+ else if (result > 0)
+ error (2, result, "dwfl_linux_proc_report");
+
+ /* Also explicitly attach for older kernels (cannot read vdso otherwise). */
+ result = dwfl_linux_proc_attach (dwfl, pid, false);
+ if (result < 0)
+ error (2, 0, "dwfl_linux_proc_attach: %s", dwfl_errmsg (-1));
+ else if (result > 0)
+ error (2, result, "dwfl_linux_proc_attach");
+
+ if (dwfl_report_end (dwfl, NULL, NULL) != 0)
+ error (2, 0, "dwfl_report_end: %s", dwfl_errmsg (-1));
+
+ if (dwfl_getmodules (dwfl, module_callback, NULL, 0) != 0)
+ error (1, 0, "dwfl_getmodules: %s", dwfl_errmsg (-1));
+
+ /* No symbols is ok, then we haven't seen the vdso at all on this arch. */
+ return vdso_syms >= 0 ? 0 : -1;
+}
+
+#endif /* ! __linux__ */