Upgrade elfutils from version 0.97 to 0.138

This upgrade is in preparation for adding perf to the Android tree, where
perf needs newer version of elfutils.

This particular snapshot also cleans up the current makefile where only
the host version of libelf.a (needed by elftree). Additional build
targets for libebl.a, libebl_arm.a, and libebl_sh.a are eliminated since
they are not used in the tree at all.

Changes that build other target modules and associated modifications to
work with bionic will be added later.

Change-Id: Ifa808ba5ad2881ccb2c0cf44d134931faad801e1
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 05e3633..958255a 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,875 @@
+2008-12-31  Ulrich Drepper  <drepper@redhat.com>
+
+	* 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.
diff --git a/tests/Makefile b/tests/Makefile
deleted file mode 100644
index 14b0e33..0000000
--- a/tests/Makefile
+++ /dev/null
@@ -1,794 +0,0 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
-# tests/Makefile.  Generated from Makefile.in by configure.
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004  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.
-
-
-
-SOURCES = arextract.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 ecp.c get-aranges.c get-files.c get-lines.c get-pubnames.c hash.c msg_tst.c newfile.c newscn.c saridx.c scnnames.c sectiondump.c show-abbrev.c show-die-info.c showptable.c test-nlist.c update1.c update2.c update3.c update4.c
-
-srcdir = .
-top_srcdir = ..
-
-pkgdatadir = $(datadir)/elfutils
-pkglibdir = $(libdir)/elfutils
-pkgincludedir = $(includedir)/elfutils
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = /usr/bin/install -c
-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 = i686-pc-linux-gnu
-host_triplet = i686-pc-linux-gnu
-noinst_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) \
-	show-abbrev$(EXEEXT) hash$(EXEEXT) 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) msg_tst$(EXEEXT) \
-	newscn$(EXEEXT) ecp$(EXEEXT)
-subdir = tests
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
-	$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
-	$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
-	$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-arextract_SOURCES = arextract.c
-arextract_OBJECTS = arextract.$(OBJEXT)
-am__DEPENDENCIES_1 = ../libelf/libelf.so
-#am__DEPENDENCIES_1 = ../libelf/libelf.a
-arextract_DEPENDENCIES = $(am__DEPENDENCIES_1)
-arsymtest_SOURCES = arsymtest.c
-arsymtest_OBJECTS = arsymtest.$(OBJEXT)
-arsymtest_DEPENDENCIES = $(am__DEPENDENCIES_1)
-asm_tst1_SOURCES = asm-tst1.c
-asm_tst1_OBJECTS = asm-tst1.$(OBJEXT)
-am__DEPENDENCIES_2 = ../libasm/libasm.so
-#am__DEPENDENCIES_2 = ../libasm/libasm.a
-am__DEPENDENCIES_3 = ../libebl/libebl.a
-asm_tst1_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
-asm_tst2_SOURCES = asm-tst2.c
-asm_tst2_OBJECTS = asm-tst2.$(OBJEXT)
-asm_tst2_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
-asm_tst3_SOURCES = asm-tst3.c
-asm_tst3_OBJECTS = asm-tst3.$(OBJEXT)
-asm_tst3_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
-asm_tst4_SOURCES = asm-tst4.c
-asm_tst4_OBJECTS = asm-tst4.$(OBJEXT)
-asm_tst4_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
-asm_tst5_SOURCES = asm-tst5.c
-asm_tst5_OBJECTS = asm-tst5.$(OBJEXT)
-asm_tst5_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
-asm_tst6_SOURCES = asm-tst6.c
-asm_tst6_OBJECTS = asm-tst6.$(OBJEXT)
-asm_tst6_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
-asm_tst7_SOURCES = asm-tst7.c
-asm_tst7_OBJECTS = asm-tst7.$(OBJEXT)
-asm_tst7_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
-asm_tst8_SOURCES = asm-tst8.c
-asm_tst8_OBJECTS = asm-tst8.$(OBJEXT)
-asm_tst8_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
-asm_tst9_SOURCES = asm-tst9.c
-asm_tst9_OBJECTS = asm-tst9.$(OBJEXT)
-asm_tst9_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
-ecp_SOURCES = ecp.c
-ecp_OBJECTS = ecp.$(OBJEXT)
-ecp_DEPENDENCIES = $(am__DEPENDENCIES_1)
-get_aranges_SOURCES = get-aranges.c
-get_aranges_OBJECTS = get-aranges.$(OBJEXT)
-am__DEPENDENCIES_4 = ../libdw/libdw.so
-#am__DEPENDENCIES_4 = ../libdw/libdw.a
-get_aranges_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1)
-get_files_SOURCES = get-files.c
-get_files_OBJECTS = get-files.$(OBJEXT)
-get_files_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1)
-get_lines_SOURCES = get-lines.c
-get_lines_OBJECTS = get-lines.$(OBJEXT)
-get_lines_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1)
-get_pubnames_SOURCES = get-pubnames.c
-get_pubnames_OBJECTS = get-pubnames.$(OBJEXT)
-get_pubnames_DEPENDENCIES = $(am__DEPENDENCIES_4) \
-	$(am__DEPENDENCIES_1)
-hash_SOURCES = hash.c
-hash_OBJECTS = hash.$(OBJEXT)
-hash_DEPENDENCIES = $(am__DEPENDENCIES_1)
-msg_tst_SOURCES = msg_tst.c
-msg_tst_OBJECTS = msg_tst.$(OBJEXT)
-msg_tst_DEPENDENCIES = $(am__DEPENDENCIES_1)
-newfile_SOURCES = newfile.c
-newfile_OBJECTS = newfile.$(OBJEXT)
-newfile_DEPENDENCIES = $(am__DEPENDENCIES_1)
-newscn_SOURCES = newscn.c
-newscn_OBJECTS = newscn.$(OBJEXT)
-newscn_DEPENDENCIES = $(am__DEPENDENCIES_1)
-saridx_SOURCES = saridx.c
-saridx_OBJECTS = saridx.$(OBJEXT)
-saridx_DEPENDENCIES = $(am__DEPENDENCIES_1)
-scnnames_SOURCES = scnnames.c
-scnnames_OBJECTS = scnnames.$(OBJEXT)
-scnnames_DEPENDENCIES = $(am__DEPENDENCIES_1)
-sectiondump_SOURCES = sectiondump.c
-sectiondump_OBJECTS = sectiondump.$(OBJEXT)
-sectiondump_DEPENDENCIES = $(am__DEPENDENCIES_1)
-show_abbrev_SOURCES = show-abbrev.c
-show_abbrev_OBJECTS = show-abbrev.$(OBJEXT)
-show_abbrev_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1)
-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_1)
-showptable_SOURCES = showptable.c
-showptable_OBJECTS = showptable.$(OBJEXT)
-showptable_DEPENDENCIES = $(am__DEPENDENCIES_1)
-test_nlist_SOURCES = test-nlist.c
-test_nlist_OBJECTS = test-nlist.$(OBJEXT)
-test_nlist_DEPENDENCIES = $(am__DEPENDENCIES_1)
-update1_SOURCES = update1.c
-update1_OBJECTS = update1.$(OBJEXT)
-update1_DEPENDENCIES = $(am__DEPENDENCIES_1)
-update2_SOURCES = update2.c
-update2_OBJECTS = update2.$(OBJEXT)
-update2_DEPENDENCIES = $(am__DEPENDENCIES_1)
-update3_SOURCES = update3.c
-update3_OBJECTS = update3.$(OBJEXT)
-update3_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
-update4_SOURCES = update4.c
-update4_OBJECTS = update4.$(OBJEXT)
-update4_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = arextract.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 ecp.c get-aranges.c get-files.c get-lines.c \
-	get-pubnames.c hash.c msg_tst.c newfile.c newscn.c saridx.c \
-	scnnames.c sectiondump.c show-abbrev.c show-die-info.c \
-	showptable.c test-nlist.c update1.c update2.c update3.c \
-	update4.c
-DIST_SOURCES = arextract.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 ecp.c get-aranges.c get-files.c \
-	get-lines.c get-pubnames.c hash.c msg_tst.c newfile.c newscn.c \
-	saridx.c scnnames.c sectiondump.c show-abbrev.c \
-	show-die-info.c showptable.c test-nlist.c update1.c update2.c \
-	update3.c update4.c
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /work/elfutils/stock/elfutils-0.97/config/missing --run aclocal-1.9
-AMDEP_FALSE = #
-AMDEP_TRUE = 
-AMTAR = ${SHELL} /work/elfutils/stock/elfutils-0.97/config/missing --run tar
-AUTOCONF = ${SHELL} /work/elfutils/stock/elfutils-0.97/config/missing --run autoconf
-AUTOHEADER = ${SHELL} /work/elfutils/stock/elfutils-0.97/config/missing --run autoheader
-AUTOMAKE = ${SHELL} /work/elfutils/stock/elfutils-0.97/config/missing --run automake-1.9
-AWK = gawk
-CC = gcc
-CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2
-CPP = gcc -E
-CPPFLAGS = 
-CYGPATH_W = echo
-DATADIRNAME = ${prefix}/share
-DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
-DEPDIR = .deps
-ECHO_C = 
-ECHO_N = -n
-ECHO_T = 
-EGREP = grep -E
-EXEEXT = 
-GMSGFMT = /usr/bin/msgfmt
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
-INTLLIBS = 
-LDFLAGS = 
-LEX = flex
-LEXLIB = -lfl
-LEX_OUTPUT_ROOT = lex.yy
-LIBICONV = -liconv
-LIBINTL = 
-LIBOBJS = 
-LIBS = 
-LOCALEDIR = ${prefix}/share
-LTLIBICONV = -liconv
-LTLIBINTL = 
-LTLIBOBJS = 
-MAKEINFO = ${SHELL} /work/elfutils/stock/elfutils-0.97/config/missing --run makeinfo
-MKINSTALLDIRS = config/mkinstalldirs
-MSGFMT = /usr/bin/msgfmt
-MSGMERGE = /usr/bin/msgmerge
-MUDFLAP_FALSE = 
-MUDFLAP_TRUE = #
-NATIVE_LD_FALSE = 
-NATIVE_LD_TRUE = #
-OBJEXT = o
-PACKAGE = elfutils
-PACKAGE_BUGREPORT = http://bugzilla.redhat.com/bugzilla/
-PACKAGE_NAME = Red Hat elfutils
-PACKAGE_STRING = Red Hat elfutils 0.97
-PACKAGE_TARNAME = elfutils
-PACKAGE_VERSION = 0.97
-PATH_SEPARATOR = :
-POSUB = po
-RANLIB = ranlib
-SET_MAKE = 
-SHELL = /bin/sh
-STRIP = 
-USE_NLS = yes
-VERSION = 0.97
-XGETTEXT = /usr/bin/xgettext
-YACC = bison -y
-ac_ct_CC = gcc
-ac_ct_RANLIB = ranlib
-ac_ct_STRIP = 
-am__fastdepCC_FALSE = #
-am__fastdepCC_TRUE = 
-am__include = include
-am__leading_dot = .
-am__quote = 
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-base_cpu = none
-bindir = ${exec_prefix}/bin
-build = i686-pc-linux-gnu
-build_alias = 
-build_cpu = i686
-build_os = linux-gnu
-build_vendor = pc
-datadir = ${prefix}/share
-exec_prefix = ${prefix}
-host = i686-pc-linux-gnu
-host_alias = 
-host_cpu = i686
-host_os = linux-gnu
-host_vendor = pc
-includedir = ${prefix}/include
-infodir = ${prefix}/info
-install_sh = /work/elfutils/stock/elfutils-0.97/config/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localstatedir = ${prefix}/var
-mandir = ${prefix}/man
-mkdir_p = mkdir -p --
-oldincludedir = /usr/include
-prefix = /work/elfutils/google/linux-install-elfutils-0.97/
-program_transform_name = s,x,x,
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-sysconfdir = ${prefix}/etc
-target_alias = 
-AM_CFLAGS = -Wall -Werror -std=gnu99
-AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
-INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
-	   -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
-	   -I$(top_srcdir)/lib -I..
-
-# get-ciefde
-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-show-abbrev.sh hash asm-tst1 asm-tst2 \
-	asm-tst3 asm-tst4 asm-tst5 asm-tst6 asm-tst7 asm-tst8 asm-tst9 \
-	msg_tst newscn run-strip-test.sh run-strip-test2.sh \
-	run-strip-test3.sh run-ecp-test.sh run-ecp-test2.sh
-
-# run-show-ciefde.sh
-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-ciefde.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
-
-libdw = ../libdw/libdw.so
-#libdw = ../libdw/libdw.a
-libelf = ../libelf/libelf.so
-#libelf = ../libelf/libelf.a
-libasm = ../libasm/libasm.so
-#libasm = ../libasm/libasm.a
-libebl = ../libebl/libebl.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)
-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)
-#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf)
-asm_tst1_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst2_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst3_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst4_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst5_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst6_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst7_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst8_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst9_LDADD = $(libasm) $(libebl) $(libelf)
-CLEANFILES = xxx
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits  tests/Makefile'; \
-	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_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
-
-clean-noinstPROGRAMS:
-	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-arextract$(EXEEXT): $(arextract_OBJECTS) $(arextract_DEPENDENCIES) 
-	@rm -f arextract$(EXEEXT)
-	$(LINK) $(arextract_LDFLAGS) $(arextract_OBJECTS) $(arextract_LDADD) $(LIBS)
-arsymtest$(EXEEXT): $(arsymtest_OBJECTS) $(arsymtest_DEPENDENCIES) 
-	@rm -f arsymtest$(EXEEXT)
-	$(LINK) $(arsymtest_LDFLAGS) $(arsymtest_OBJECTS) $(arsymtest_LDADD) $(LIBS)
-asm-tst1$(EXEEXT): $(asm_tst1_OBJECTS) $(asm_tst1_DEPENDENCIES) 
-	@rm -f asm-tst1$(EXEEXT)
-	$(LINK) $(asm_tst1_LDFLAGS) $(asm_tst1_OBJECTS) $(asm_tst1_LDADD) $(LIBS)
-asm-tst2$(EXEEXT): $(asm_tst2_OBJECTS) $(asm_tst2_DEPENDENCIES) 
-	@rm -f asm-tst2$(EXEEXT)
-	$(LINK) $(asm_tst2_LDFLAGS) $(asm_tst2_OBJECTS) $(asm_tst2_LDADD) $(LIBS)
-asm-tst3$(EXEEXT): $(asm_tst3_OBJECTS) $(asm_tst3_DEPENDENCIES) 
-	@rm -f asm-tst3$(EXEEXT)
-	$(LINK) $(asm_tst3_LDFLAGS) $(asm_tst3_OBJECTS) $(asm_tst3_LDADD) $(LIBS)
-asm-tst4$(EXEEXT): $(asm_tst4_OBJECTS) $(asm_tst4_DEPENDENCIES) 
-	@rm -f asm-tst4$(EXEEXT)
-	$(LINK) $(asm_tst4_LDFLAGS) $(asm_tst4_OBJECTS) $(asm_tst4_LDADD) $(LIBS)
-asm-tst5$(EXEEXT): $(asm_tst5_OBJECTS) $(asm_tst5_DEPENDENCIES) 
-	@rm -f asm-tst5$(EXEEXT)
-	$(LINK) $(asm_tst5_LDFLAGS) $(asm_tst5_OBJECTS) $(asm_tst5_LDADD) $(LIBS)
-asm-tst6$(EXEEXT): $(asm_tst6_OBJECTS) $(asm_tst6_DEPENDENCIES) 
-	@rm -f asm-tst6$(EXEEXT)
-	$(LINK) $(asm_tst6_LDFLAGS) $(asm_tst6_OBJECTS) $(asm_tst6_LDADD) $(LIBS)
-asm-tst7$(EXEEXT): $(asm_tst7_OBJECTS) $(asm_tst7_DEPENDENCIES) 
-	@rm -f asm-tst7$(EXEEXT)
-	$(LINK) $(asm_tst7_LDFLAGS) $(asm_tst7_OBJECTS) $(asm_tst7_LDADD) $(LIBS)
-asm-tst8$(EXEEXT): $(asm_tst8_OBJECTS) $(asm_tst8_DEPENDENCIES) 
-	@rm -f asm-tst8$(EXEEXT)
-	$(LINK) $(asm_tst8_LDFLAGS) $(asm_tst8_OBJECTS) $(asm_tst8_LDADD) $(LIBS)
-asm-tst9$(EXEEXT): $(asm_tst9_OBJECTS) $(asm_tst9_DEPENDENCIES) 
-	@rm -f asm-tst9$(EXEEXT)
-	$(LINK) $(asm_tst9_LDFLAGS) $(asm_tst9_OBJECTS) $(asm_tst9_LDADD) $(LIBS)
-ecp$(EXEEXT): $(ecp_OBJECTS) $(ecp_DEPENDENCIES) 
-	@rm -f ecp$(EXEEXT)
-	$(LINK) $(ecp_LDFLAGS) $(ecp_OBJECTS) $(ecp_LDADD) $(LIBS)
-get-aranges$(EXEEXT): $(get_aranges_OBJECTS) $(get_aranges_DEPENDENCIES) 
-	@rm -f get-aranges$(EXEEXT)
-	$(LINK) $(get_aranges_LDFLAGS) $(get_aranges_OBJECTS) $(get_aranges_LDADD) $(LIBS)
-get-files$(EXEEXT): $(get_files_OBJECTS) $(get_files_DEPENDENCIES) 
-	@rm -f get-files$(EXEEXT)
-	$(LINK) $(get_files_LDFLAGS) $(get_files_OBJECTS) $(get_files_LDADD) $(LIBS)
-get-lines$(EXEEXT): $(get_lines_OBJECTS) $(get_lines_DEPENDENCIES) 
-	@rm -f get-lines$(EXEEXT)
-	$(LINK) $(get_lines_LDFLAGS) $(get_lines_OBJECTS) $(get_lines_LDADD) $(LIBS)
-get-pubnames$(EXEEXT): $(get_pubnames_OBJECTS) $(get_pubnames_DEPENDENCIES) 
-	@rm -f get-pubnames$(EXEEXT)
-	$(LINK) $(get_pubnames_LDFLAGS) $(get_pubnames_OBJECTS) $(get_pubnames_LDADD) $(LIBS)
-hash$(EXEEXT): $(hash_OBJECTS) $(hash_DEPENDENCIES) 
-	@rm -f hash$(EXEEXT)
-	$(LINK) $(hash_LDFLAGS) $(hash_OBJECTS) $(hash_LDADD) $(LIBS)
-msg_tst$(EXEEXT): $(msg_tst_OBJECTS) $(msg_tst_DEPENDENCIES) 
-	@rm -f msg_tst$(EXEEXT)
-	$(LINK) $(msg_tst_LDFLAGS) $(msg_tst_OBJECTS) $(msg_tst_LDADD) $(LIBS)
-newfile$(EXEEXT): $(newfile_OBJECTS) $(newfile_DEPENDENCIES) 
-	@rm -f newfile$(EXEEXT)
-	$(LINK) $(newfile_LDFLAGS) $(newfile_OBJECTS) $(newfile_LDADD) $(LIBS)
-newscn$(EXEEXT): $(newscn_OBJECTS) $(newscn_DEPENDENCIES) 
-	@rm -f newscn$(EXEEXT)
-	$(LINK) $(newscn_LDFLAGS) $(newscn_OBJECTS) $(newscn_LDADD) $(LIBS)
-saridx$(EXEEXT): $(saridx_OBJECTS) $(saridx_DEPENDENCIES) 
-	@rm -f saridx$(EXEEXT)
-	$(LINK) $(saridx_LDFLAGS) $(saridx_OBJECTS) $(saridx_LDADD) $(LIBS)
-scnnames$(EXEEXT): $(scnnames_OBJECTS) $(scnnames_DEPENDENCIES) 
-	@rm -f scnnames$(EXEEXT)
-	$(LINK) $(scnnames_LDFLAGS) $(scnnames_OBJECTS) $(scnnames_LDADD) $(LIBS)
-sectiondump$(EXEEXT): $(sectiondump_OBJECTS) $(sectiondump_DEPENDENCIES) 
-	@rm -f sectiondump$(EXEEXT)
-	$(LINK) $(sectiondump_LDFLAGS) $(sectiondump_OBJECTS) $(sectiondump_LDADD) $(LIBS)
-show-abbrev$(EXEEXT): $(show_abbrev_OBJECTS) $(show_abbrev_DEPENDENCIES) 
-	@rm -f show-abbrev$(EXEEXT)
-	$(LINK) $(show_abbrev_LDFLAGS) $(show_abbrev_OBJECTS) $(show_abbrev_LDADD) $(LIBS)
-show-die-info$(EXEEXT): $(show_die_info_OBJECTS) $(show_die_info_DEPENDENCIES) 
-	@rm -f show-die-info$(EXEEXT)
-	$(LINK) $(show_die_info_LDFLAGS) $(show_die_info_OBJECTS) $(show_die_info_LDADD) $(LIBS)
-showptable$(EXEEXT): $(showptable_OBJECTS) $(showptable_DEPENDENCIES) 
-	@rm -f showptable$(EXEEXT)
-	$(LINK) $(showptable_LDFLAGS) $(showptable_OBJECTS) $(showptable_LDADD) $(LIBS)
-test-nlist$(EXEEXT): $(test_nlist_OBJECTS) $(test_nlist_DEPENDENCIES) 
-	@rm -f test-nlist$(EXEEXT)
-	$(LINK) $(test_nlist_LDFLAGS) $(test_nlist_OBJECTS) $(test_nlist_LDADD) $(LIBS)
-update1$(EXEEXT): $(update1_OBJECTS) $(update1_DEPENDENCIES) 
-	@rm -f update1$(EXEEXT)
-	$(LINK) $(update1_LDFLAGS) $(update1_OBJECTS) $(update1_LDADD) $(LIBS)
-update2$(EXEEXT): $(update2_OBJECTS) $(update2_DEPENDENCIES) 
-	@rm -f update2$(EXEEXT)
-	$(LINK) $(update2_LDFLAGS) $(update2_OBJECTS) $(update2_LDADD) $(LIBS)
-update3$(EXEEXT): $(update3_OBJECTS) $(update3_DEPENDENCIES) 
-	@rm -f update3$(EXEEXT)
-	$(LINK) $(update3_LDFLAGS) $(update3_OBJECTS) $(update3_LDADD) $(LIBS)
-update4$(EXEEXT): $(update4_OBJECTS) $(update4_DEPENDENCIES) 
-	@rm -f update4$(EXEEXT)
-	$(LINK) $(update4_LDFLAGS) $(update4_OBJECTS) $(update4_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-include ./$(DEPDIR)/arextract.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)/ecp.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)/msg_tst.Po
-include ./$(DEPDIR)/newfile.Po
-include ./$(DEPDIR)/newscn.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-nlist.Po
-include ./$(DEPDIR)/update1.Po
-include ./$(DEPDIR)/update2.Po
-include ./$(DEPDIR)/update3.Po
-include ./$(DEPDIR)/update4.Po
-
-.c.o:
-	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-#	source='$<' object='$@' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(COMPILE) -c $<
-
-.c.obj:
-	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-#	source='$<' object='$@' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-check-TESTS: $(TESTS)
-	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
-	srcdir=$(srcdir); export srcdir; \
-	list='$(TESTS)'; \
-	if test -n "$$list"; then \
-	  for tst in $$list; do \
-	    if test -f ./$$tst; then dir=./; \
-	    elif test -f $$tst; then dir=; \
-	    else dir="$(srcdir)/"; fi; \
-	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
-	      all=`expr $$all + 1`; \
-	      case " $(XFAIL_TESTS) " in \
-	      *" $$tst "*) \
-		xpass=`expr $$xpass + 1`; \
-		failed=`expr $$failed + 1`; \
-		echo "XPASS: $$tst"; \
-	      ;; \
-	      *) \
-		echo "PASS: $$tst"; \
-	      ;; \
-	      esac; \
-	    elif test $$? -ne 77; then \
-	      all=`expr $$all + 1`; \
-	      case " $(XFAIL_TESTS) " in \
-	      *" $$tst "*) \
-		xfail=`expr $$xfail + 1`; \
-		echo "XFAIL: $$tst"; \
-	      ;; \
-	      *) \
-		failed=`expr $$failed + 1`; \
-		echo "FAIL: $$tst"; \
-	      ;; \
-	      esac; \
-	    else \
-	      skip=`expr $$skip + 1`; \
-	      echo "SKIP: $$tst"; \
-	    fi; \
-	  done; \
-	  if test "$$failed" -eq 0; then \
-	    if test "$$xfail" -eq 0; then \
-	      banner="All $$all tests passed"; \
-	    else \
-	      banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
-	    fi; \
-	  else \
-	    if test "$$xpass" -eq 0; then \
-	      banner="$$failed of $$all tests failed"; \
-	    else \
-	      banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
-	    fi; \
-	  fi; \
-	  dashes="$$banner"; \
-	  skipped=""; \
-	  if test "$$skip" -ne 0; then \
-	    skipped="($$skip tests were not run)"; \
-	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
-	      dashes="$$skipped"; \
-	  fi; \
-	  report=""; \
-	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
-	    report="Please report to $(PACKAGE_BUGREPORT)"; \
-	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
-	      dashes="$$report"; \
-	  fi; \
-	  dashes=`echo "$$dashes" | sed s/./=/g`; \
-	  echo "$$dashes"; \
-	  echo "$$banner"; \
-	  test -z "$$skipped" || echo "$$skipped"; \
-	  test -z "$$report" || echo "$$report"; \
-	  echo "$$dashes"; \
-	  test "$$failed" -eq 0; \
-	else :; fi
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
-	  if test -d $$d/$$file; then \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-	    fi; \
-	    cp -pR $$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-TESTS
-check: check-am
-all-am: Makefile $(PROGRAMS)
-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:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-noinstPROGRAMS 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
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-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: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
-	clean-generic clean-noinstPROGRAMS ctags 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-exec install-exec-am \
-	install-info install-info-am install-man install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-info-am
-
-# 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/tests/Makefile.am b/tests/Makefile.am
index 1e4f9a8..b533521 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,46 +1,105 @@
 ## Process this file with automake to create Makefile.in
-## Configure input file for elfutils.
 ##
-## Copyright (C) 1996-2002, 2003, 2004 Red Hat, Inc.
+## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
+## This file is part of Red Hat elfutils.
 ##
-## This program is Open Source software; you can redistribute it and/or
-## modify it under the terms of the Open Software License version 1.0 as
-## published by the Open Source Initiative.
+## Red Hat elfutils 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; version 2 of the License.
 ##
-## You should have received a copy of the Open Software License along
-## with this program; if not, you may obtain a copy of the Open Software
-## License version 1.0 from http://www.opensource.org/licenses/osl.php or
-## by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-## 3001 King Ranch Road, Ukiah, CA 95482.
+## Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+## Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+##
+## Red Hat elfutils is an included package of the Open Invention Network.
+## An included package of the Open Invention Network is a package for which
+## Open Invention Network licensees cross-license their patents.  No patent
+## license is granted, either expressly or impliedly, by designation as an
+## included package.  Should you wish to participate in the Open Invention
+## Network licensing program, please visit www.openinventionnetwork.com
+## <http://www.openinventionnetwork.com>.
 ##
 DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
-AM_CFLAGS = -Wall -Werror -std=gnu99
-if !MUDFLAP
-AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
+if MUDFLAP
+AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\
+	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
+BUILD_RPATH = \$$ORIGIN/../backends
+else
+AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \
+	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
+BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
 endif
+
+AM_LDFLAGS =
+
+if !STANDALONE
 INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
+	   -I$(top_srcdir)/libdwfl \
 	   -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
 	   -I$(top_srcdir)/lib -I..
+AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf
+endif !STANDALONE
+
+if TESTS_RPATH
+AM_LDFLAGS += -Wl,-rpath,$(BUILT_RPATH)
+tests_rpath = yes
+else
+tests_rpath = no
+endif
 
 noinst_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 \
-		  show-abbrev hash asm-tst1 asm-tst2 asm-tst3 \
-		  asm-tst4 asm-tst5 asm-tst6 asm-tst7 asm-tst8 asm-tst9 \
-		  msg_tst newscn ecp
+		  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
 # get-ciefde
+asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
+	    asm-tst6 asm-tst7 asm-tst8 asm-tst9
 
 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-show-abbrev.sh hash asm-tst1 asm-tst2 \
-	asm-tst3 asm-tst4 asm-tst5 asm-tst6 asm-tst7 asm-tst8 asm-tst9 \
-	msg_tst newscn run-strip-test.sh run-strip-test2.sh \
-	run-strip-test3.sh run-ecp-test.sh run-ecp-test2.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-unstrip-test.sh run-unstrip-test2.sh \
+	run-ecp-test.sh run-ecp-test2.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-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
+	run-readelf-test4.sh \
+	run-native-test.sh run-bug1-test.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-show-ciefde.sh
 
+if !STANDALONE
+noinst_PROGRAMS += msg_tst sha1-tst
+TESTS += msg_tst sha1-tst
+endif
+
+if HAVE_LIBASM
+noinst_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 \
@@ -49,10 +108,70 @@
 	     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
+	     testfile13.bz2 run-strip-test3.sh run-allfcts.sh \
+	     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-unstrip-test.sh run-unstrip-test2.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-native-test.sh \
+	     run-addrname-test.sh run-dwfl-bug-offline-rel.sh \
+	     run-dwfl-addr-sect.sh run-early-offscn.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-bug1-test.sh testfile28.bz2 testfile28.rdwr.bz2 \
+	     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 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
+
+installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
+			      bindir=$(DESTDIR)$(bindir) \
+			      $(srcdir)/test-wrapper.sh \
+			      installed $(tests_rpath) \
+			      $(program_transform_name)
+if STANDALONE
+TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
+else !STANDALONE
+TESTS_ENVIRONMENT = $(srcdir)/test-wrapper.sh \
+		    ../libdw:../backends:../libelf:../libasm
+
+installcheck-local:
+	$(MAKE) $(AM_MAKEFLAGS) \
+		TESTS_ENVIRONMENT='$(installed_TESTS_ENVIRONMENT)' check-TESTS
+endif !STANDALONE
 
 if MUDFLAP
-libdw = ../libdw/libdw.a
+static_build=yes
+libmudflap = -lmudflap
+endif
+
+if STANDALONE
+libdw = -ldw
+libelf = -lelf
+libasm = -lasm
+libebl = -lebl
+else !STANDALONE
+if BUILD_STATIC
+libdw = ../libdw/libdw.a $(libelf) $(libebl) -ldl
 libelf = ../libelf/libelf.a
 libasm = ../libasm/libasm.a
 else
@@ -61,38 +180,65 @@
 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)
-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)
-#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf)
-asm_tst1_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst2_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst3_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst4_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst5_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst6_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst7_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst8_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst9_LDADD = $(libasm) $(libebl) $(libelf)
+arextract_LDADD = $(libelf) $(libmudflap)
+arsymtest_LDADD = $(libelf) $(libmudflap)
+newfile_LDADD = $(libelf) $(libmudflap)
+saridx_LDADD = $(libelf) $(libmudflap)
+scnnames_LDADD = $(libelf) $(libmudflap)
+sectiondump_LDADD = $(libelf) $(libmudflap)
+showptable_LDADD = $(libelf) $(libmudflap)
+hash_LDADD = $(libelf) $(libmudflap)
+test_nlist_LDADD = $(libelf) $(libmudflap)
+msg_tst_LDADD = $(libelf) $(libmudflap)
+newscn_LDADD = $(libelf) $(libmudflap)
+early_offscn_LDADD = $(libelf) $(libmudflap)
+ecp_LDADD = $(libelf) $(libmudflap)
+update1_LDADD = $(libelf) $(libmudflap)
+update2_LDADD = $(libelf) $(libmudflap)
+update3_LDADD = $(libebl) $(libelf) $(libmudflap)
+update4_LDADD = $(libebl) $(libelf) $(libmudflap)
+show_die_info_LDADD = $(libdw) $(libelf) $(libmudflap)
+get_pubnames_LDADD = $(libdw) $(libelf) $(libmudflap)
+show_abbrev_LDADD = $(libdw) $(libelf) $(libmudflap)
+get_lines_LDADD = $(libdw) $(libelf) $(libmudflap)
+get_files_LDADD = $(libdw) $(libelf) $(libmudflap)
+get_aranges_LDADD = $(libdw) $(libelf) $(libmudflap)
+allfcts_LDADD = $(libdw) $(libelf) $(libmudflap)
+line2addr_no_Wformat = yes
+line2addr_LDADD = $(libdw) $(libmudflap)
+addrscopes_LDADD = $(libdw) $(libmudflap)
+funcscopes_LDADD = $(libdw) $(libmudflap)
+funcretval_LDADD = $(libdw) $(libmudflap)
+allregs_LDADD = $(libdw) $(libmudflap)
+find_prologues_LDADD = $(libdw) $(libmudflap)
+#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf) $(libmudflap)
+asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+rdwrmmap_LDADD = $(libelf)
+dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+arls_LDADD = $(libelf) $(libmudflap)
+dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+sha1_tst_LDADD = $(libeu) $(libmudflap)
 
-CLEANFILES = xxx
+CLEANFILES = xxx *.gcno *.gcda *gconv
+
+if GCOV
+check: check-am coverage
+.PHONY: coverage
+coverage:
+	-$(srcdir)/coverage.sh
+endif
diff --git a/tests/Makefile.in b/tests/Makefile.in
index c5dd652..47a1cb9 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  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.
@@ -14,17 +14,11 @@
 
 @SET_MAKE@
 
-SOURCES = arextract.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 ecp.c get-aranges.c get-files.c get-lines.c get-pubnames.c hash.c msg_tst.c newfile.c newscn.c saridx.c scnnames.c sectiondump.c show-abbrev.c show-die-info.c showptable.c test-nlist.c update1.c update2.c update3.c update4.c
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -38,168 +32,289 @@
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
+@STANDALONE_FALSE@am__append_1 = -Wl,-rpath-link,../libasm:../libdw:../libelf
+@TESTS_RPATH_TRUE@am__append_2 = -Wl,-rpath,$(BUILT_RPATH)
 noinst_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) \
-	show-abbrev$(EXEEXT) hash$(EXEEXT) 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) msg_tst$(EXEEXT) \
-	newscn$(EXEEXT) ecp$(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) \
+	$(am__EXEEXT_1) $(am__EXEEXT_3)
+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-unstrip-test.sh \
+	run-unstrip-test2.sh run-ecp-test.sh run-ecp-test2.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-readelf-test1.sh \
+	run-readelf-test2.sh run-readelf-test3.sh run-readelf-test4.sh \
+	run-native-test.sh run-bug1-test.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 \
+	$(am__EXEEXT_1) $(am__EXEEXT_3)
+# run-show-ciefde.sh
+@STANDALONE_FALSE@am__append_3 = msg_tst sha1-tst
+@STANDALONE_FALSE@am__append_4 = msg_tst sha1-tst
+@HAVE_LIBASM_TRUE@am__append_5 = $(asm_TESTS)
+@HAVE_LIBASM_TRUE@am__append_6 = $(asm_TESTS)
 subdir = tests
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
-	$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
-	$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
 	$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+@STANDALONE_FALSE@am__EXEEXT_1 = msg_tst$(EXEEXT) sha1-tst$(EXEEXT)
+am__EXEEXT_2 = 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_3 = $(am__EXEEXT_2)
 PROGRAMS = $(noinst_PROGRAMS)
+addrscopes_SOURCES = addrscopes.c
+addrscopes_OBJECTS = addrscopes.$(OBJEXT)
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@am__DEPENDENCIES_1 =  \
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@	../libelf/libelf.so
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@am__DEPENDENCIES_1 =  \
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@	../libelf/libelf.a
+@STANDALONE_FALSE@am__DEPENDENCIES_2 = ../libebl/libebl.a
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@am__DEPENDENCIES_3 =  \
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@	../libdw/libdw.so
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@am__DEPENDENCIES_3 =  \
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@	../libdw/libdw.a \
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@	$(am__DEPENDENCIES_1) \
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@	$(am__DEPENDENCIES_2)
+am__DEPENDENCIES_4 =
+addrscopes_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4)
+allfcts_SOURCES = allfcts.c
+allfcts_OBJECTS = allfcts.$(OBJEXT)
+allfcts_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
+allregs_SOURCES = allregs.c
+allregs_OBJECTS = allregs.$(OBJEXT)
+allregs_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4)
 arextract_SOURCES = arextract.c
 arextract_OBJECTS = arextract.$(OBJEXT)
-@MUDFLAP_FALSE@am__DEPENDENCIES_1 = ../libelf/libelf.so
-@MUDFLAP_TRUE@am__DEPENDENCIES_1 = ../libelf/libelf.a
-arextract_DEPENDENCIES = $(am__DEPENDENCIES_1)
+arextract_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
+arls_SOURCES = arls.c
+arls_OBJECTS = arls.$(OBJEXT)
+arls_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 arsymtest_SOURCES = arsymtest.c
 arsymtest_OBJECTS = arsymtest.$(OBJEXT)
-arsymtest_DEPENDENCIES = $(am__DEPENDENCIES_1)
+arsymtest_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 asm_tst1_SOURCES = asm-tst1.c
 asm_tst1_OBJECTS = asm-tst1.$(OBJEXT)
-@MUDFLAP_FALSE@am__DEPENDENCIES_2 = ../libasm/libasm.so
-@MUDFLAP_TRUE@am__DEPENDENCIES_2 = ../libasm/libasm.a
-am__DEPENDENCIES_3 = ../libebl/libebl.a
-asm_tst1_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+@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_2) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 asm_tst2_SOURCES = asm-tst2.c
 asm_tst2_OBJECTS = asm-tst2.$(OBJEXT)
-asm_tst2_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+asm_tst2_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 asm_tst3_SOURCES = asm-tst3.c
 asm_tst3_OBJECTS = asm-tst3.$(OBJEXT)
-asm_tst3_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+asm_tst3_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 asm_tst4_SOURCES = asm-tst4.c
 asm_tst4_OBJECTS = asm-tst4.$(OBJEXT)
-asm_tst4_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+asm_tst4_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 asm_tst5_SOURCES = asm-tst5.c
 asm_tst5_OBJECTS = asm-tst5.$(OBJEXT)
-asm_tst5_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+asm_tst5_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 asm_tst6_SOURCES = asm-tst6.c
 asm_tst6_OBJECTS = asm-tst6.$(OBJEXT)
-asm_tst6_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+asm_tst6_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 asm_tst7_SOURCES = asm-tst7.c
 asm_tst7_OBJECTS = asm-tst7.$(OBJEXT)
-asm_tst7_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+asm_tst7_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 asm_tst8_SOURCES = asm-tst8.c
 asm_tst8_OBJECTS = asm-tst8.$(OBJEXT)
-asm_tst8_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+asm_tst8_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 asm_tst9_SOURCES = asm-tst9.c
 asm_tst9_OBJECTS = asm-tst9.$(OBJEXT)
-asm_tst9_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+asm_tst9_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1) $(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_3) \
+	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
+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_3) \
+	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
+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_3) \
+	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
+dwfl_bug_getmodules_SOURCES = dwfl-bug-getmodules.c
+dwfl_bug_getmodules_OBJECTS = dwfl-bug-getmodules.$(OBJEXT)
+dwfl_bug_getmodules_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
+dwfl_bug_report_SOURCES = dwfl-bug-report.c
+dwfl_bug_report_OBJECTS = dwfl-bug-report.$(OBJEXT)
+dwfl_bug_report_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
+dwflmodtest_SOURCES = dwflmodtest.c
+dwflmodtest_OBJECTS = dwflmodtest.$(OBJEXT)
+dwflmodtest_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
+early_offscn_SOURCES = early-offscn.c
+early_offscn_OBJECTS = early-offscn.$(OBJEXT)
+early_offscn_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
 ecp_SOURCES = ecp.c
 ecp_OBJECTS = ecp.$(OBJEXT)
-ecp_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ecp_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
+find_prologues_SOURCES = find-prologues.c
+find_prologues_OBJECTS = find-prologues.$(OBJEXT)
+find_prologues_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+	$(am__DEPENDENCIES_4)
+funcretval_SOURCES = funcretval.c
+funcretval_OBJECTS = funcretval.$(OBJEXT)
+funcretval_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4)
+funcscopes_SOURCES = funcscopes.c
+funcscopes_OBJECTS = funcscopes.$(OBJEXT)
+funcscopes_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4)
 get_aranges_SOURCES = get-aranges.c
 get_aranges_OBJECTS = get-aranges.$(OBJEXT)
-@MUDFLAP_FALSE@am__DEPENDENCIES_4 = ../libdw/libdw.so
-@MUDFLAP_TRUE@am__DEPENDENCIES_4 = ../libdw/libdw.a
-get_aranges_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1)
+get_aranges_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
 get_files_SOURCES = get-files.c
 get_files_OBJECTS = get-files.$(OBJEXT)
-get_files_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1)
+get_files_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
 get_lines_SOURCES = get-lines.c
 get_lines_OBJECTS = get-lines.$(OBJEXT)
-get_lines_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1)
+get_lines_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
 get_pubnames_SOURCES = get-pubnames.c
 get_pubnames_OBJECTS = get-pubnames.$(OBJEXT)
-get_pubnames_DEPENDENCIES = $(am__DEPENDENCIES_4) \
-	$(am__DEPENDENCIES_1)
+get_pubnames_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 hash_SOURCES = hash.c
 hash_OBJECTS = hash.$(OBJEXT)
-hash_DEPENDENCIES = $(am__DEPENDENCIES_1)
+hash_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
+line2addr_SOURCES = line2addr.c
+line2addr_OBJECTS = line2addr.$(OBJEXT)
+line2addr_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4)
 msg_tst_SOURCES = msg_tst.c
 msg_tst_OBJECTS = msg_tst.$(OBJEXT)
-msg_tst_DEPENDENCIES = $(am__DEPENDENCIES_1)
+msg_tst_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 newfile_SOURCES = newfile.c
 newfile_OBJECTS = newfile.$(OBJEXT)
-newfile_DEPENDENCIES = $(am__DEPENDENCIES_1)
+newfile_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 newscn_SOURCES = newscn.c
 newscn_OBJECTS = newscn.$(OBJEXT)
-newscn_DEPENDENCIES = $(am__DEPENDENCIES_1)
+newscn_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
+rdwrmmap_SOURCES = rdwrmmap.c
+rdwrmmap_OBJECTS = rdwrmmap.$(OBJEXT)
+rdwrmmap_DEPENDENCIES = $(am__DEPENDENCIES_1)
 saridx_SOURCES = saridx.c
 saridx_OBJECTS = saridx.$(OBJEXT)
-saridx_DEPENDENCIES = $(am__DEPENDENCIES_1)
+saridx_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 scnnames_SOURCES = scnnames.c
 scnnames_OBJECTS = scnnames.$(OBJEXT)
-scnnames_DEPENDENCIES = $(am__DEPENDENCIES_1)
+scnnames_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 sectiondump_SOURCES = sectiondump.c
 sectiondump_OBJECTS = sectiondump.$(OBJEXT)
-sectiondump_DEPENDENCIES = $(am__DEPENDENCIES_1)
+sectiondump_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
+sha1_tst_SOURCES = sha1-tst.c
+sha1_tst_OBJECTS = sha1-tst.$(OBJEXT)
+sha1_tst_DEPENDENCIES = $(libeu) $(am__DEPENDENCIES_4)
 show_abbrev_SOURCES = show-abbrev.c
 show_abbrev_OBJECTS = show-abbrev.$(OBJEXT)
-show_abbrev_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1)
+show_abbrev_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
 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_1)
+show_die_info_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 showptable_SOURCES = showptable.c
 showptable_OBJECTS = showptable.$(OBJEXT)
-showptable_DEPENDENCIES = $(am__DEPENDENCIES_1)
+showptable_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 test_nlist_SOURCES = test-nlist.c
 test_nlist_OBJECTS = test-nlist.$(OBJEXT)
-test_nlist_DEPENDENCIES = $(am__DEPENDENCIES_1)
+test_nlist_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 update1_SOURCES = update1.c
 update1_OBJECTS = update1.$(OBJEXT)
-update1_DEPENDENCIES = $(am__DEPENDENCIES_1)
+update1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 update2_SOURCES = update2.c
 update2_OBJECTS = update2.$(OBJEXT)
-update2_DEPENDENCIES = $(am__DEPENDENCIES_1)
+update2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4)
 update3_SOURCES = update3.c
 update3_OBJECTS = update3.$(OBJEXT)
-update3_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
+update3_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
 update4_SOURCES = update4.c
 update4_OBJECTS = update4.$(OBJEXT)
-update4_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+update4_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_4)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = arextract.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 ecp.c get-aranges.c get-files.c get-lines.c \
-	get-pubnames.c hash.c msg_tst.c newfile.c newscn.c saridx.c \
-	scnnames.c sectiondump.c show-abbrev.c show-die-info.c \
-	showptable.c test-nlist.c update1.c update2.c update3.c \
-	update4.c
-DIST_SOURCES = arextract.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 ecp.c get-aranges.c get-files.c \
-	get-lines.c get-pubnames.c hash.c msg_tst.c newfile.c newscn.c \
-	saridx.c scnnames.c sectiondump.c show-abbrev.c \
-	show-die-info.c showptable.c test-nlist.c update1.c update2.c \
-	update3.c update4.c
+SOURCES = addrscopes.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 \
+	dwfl-addr-sect.c dwfl-bug-addr-overflow.c dwfl-bug-fd-leak.c \
+	dwfl-bug-getmodules.c dwfl-bug-report.c dwflmodtest.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 msg_tst.c newfile.c newscn.c \
+	rdwrmmap.c saridx.c scnnames.c sectiondump.c sha1-tst.c \
+	show-abbrev.c show-die-info.c showptable.c test-nlist.c \
+	update1.c update2.c update3.c update4.c
+DIST_SOURCES = addrscopes.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 \
+	dwfl-addr-sect.c dwfl-bug-addr-overflow.c dwfl-bug-fd-leak.c \
+	dwfl-bug-getmodules.c dwfl-bug-report.c dwflmodtest.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 msg_tst.c newfile.c newscn.c \
+	rdwrmmap.c saridx.c scnnames.c sectiondump.c sha1-tst.c \
+	show-abbrev.c show-die-info.c showptable.c test-nlist.c \
+	update1.c update2.c update3.c update4.c
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -208,43 +323,39 @@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
-CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DATADIRNAME = @DATADIRNAME@
+DEBUGPRED = @DEBUGPRED@
 DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
 DEPDIR = @DEPDIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
-EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTLLIBS = @INTLLIBS@
 LDFLAGS = @LDFLAGS@
 LEX = @LEX@
 LEXLIB = @LEXLIB@
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
+LIBEBL_SUBDIR = @LIBEBL_SUBDIR@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LOCALEDIR = @LOCALEDIR@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
-MKINSTALLDIRS = @MKINSTALLDIRS@
+MKDIR_P = @MKDIR_P@
+MODVERSION = @MODVERSION@
 MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
 MSGMERGE = @MSGMERGE@
-MUDFLAP_FALSE = @MUDFLAP_FALSE@
-MUDFLAP_TRUE = @MUDFLAP_TRUE@
-NATIVE_LD_FALSE = @NATIVE_LD_FALSE@
-NATIVE_LD_TRUE = @NATIVE_LD_TRUE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -253,7 +364,6 @@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
-POSUB = @POSUB@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -261,12 +371,14 @@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
 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_CC = @ac_ct_CC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -279,45 +391,61 @@
 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@
-AM_CFLAGS = -Wall -Werror -std=gnu99
-@MUDFLAP_FALSE@AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
-INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
-	   -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
-	   -I$(top_srcdir)/lib -I..
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \
+@MUDFLAP_FALSE@	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
 
+@MUDFLAP_TRUE@AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\
+@MUDFLAP_TRUE@	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
+
+@MUDFLAP_TRUE@BUILD_RPATH = \$$ORIGIN/../backends
+@MUDFLAP_FALSE@BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
+AM_LDFLAGS = $(am__append_1) $(am__append_2)
+@STANDALONE_FALSE@INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
+@STANDALONE_FALSE@	   -I$(top_srcdir)/libdwfl \
+@STANDALONE_FALSE@	   -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
+@STANDALONE_FALSE@	   -I$(top_srcdir)/lib -I..
+
+@TESTS_RPATH_FALSE@tests_rpath = no
+@TESTS_RPATH_TRUE@tests_rpath = yes
 # get-ciefde
-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-show-abbrev.sh hash asm-tst1 asm-tst2 \
-	asm-tst3 asm-tst4 asm-tst5 asm-tst6 asm-tst7 asm-tst8 asm-tst9 \
-	msg_tst newscn run-strip-test.sh run-strip-test2.sh \
-	run-strip-test3.sh run-ecp-test.sh run-ecp-test2.sh
+asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
+	    asm-tst6 asm-tst7 asm-tst8 asm-tst9
 
-# run-show-ciefde.sh
 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 \
@@ -326,53 +454,121 @@
 	     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
+	     testfile13.bz2 run-strip-test3.sh run-allfcts.sh \
+	     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-unstrip-test.sh run-unstrip-test2.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-native-test.sh \
+	     run-addrname-test.sh run-dwfl-bug-offline-rel.sh \
+	     run-dwfl-addr-sect.sh run-early-offscn.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-bug1-test.sh testfile28.bz2 testfile28.rdwr.bz2 \
+	     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 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
 
-@MUDFLAP_FALSE@libdw = ../libdw/libdw.so
-@MUDFLAP_TRUE@libdw = ../libdw/libdw.a
-@MUDFLAP_FALSE@libelf = ../libelf/libelf.so
-@MUDFLAP_TRUE@libelf = ../libelf/libelf.a
-@MUDFLAP_FALSE@libasm = ../libasm/libasm.so
-@MUDFLAP_TRUE@libasm = ../libasm/libasm.a
-libebl = ../libebl/libebl.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)
-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)
-#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf)
-asm_tst1_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst2_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst3_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst4_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst5_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst6_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst7_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst8_LDADD = $(libasm) $(libebl) $(libelf)
-asm_tst9_LDADD = $(libasm) $(libebl) $(libelf)
-CLEANFILES = xxx
+installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
+			      bindir=$(DESTDIR)$(bindir) \
+			      $(srcdir)/test-wrapper.sh \
+			      installed $(tests_rpath) \
+			      $(program_transform_name)
+
+@STANDALONE_FALSE@TESTS_ENVIRONMENT = $(srcdir)/test-wrapper.sh \
+@STANDALONE_FALSE@		    ../libdw:../backends:../libelf:../libasm
+
+@STANDALONE_TRUE@TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
+@MUDFLAP_TRUE@static_build = yes
+@MUDFLAP_TRUE@libmudflap = -lmudflap
+@BUILD_STATIC_FALSE@@STANDALONE_FALSE@libdw = ../libdw/libdw.so
+@BUILD_STATIC_TRUE@@STANDALONE_FALSE@libdw = ../libdw/libdw.a $(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) $(libmudflap)
+arsymtest_LDADD = $(libelf) $(libmudflap)
+newfile_LDADD = $(libelf) $(libmudflap)
+saridx_LDADD = $(libelf) $(libmudflap)
+scnnames_LDADD = $(libelf) $(libmudflap)
+sectiondump_LDADD = $(libelf) $(libmudflap)
+showptable_LDADD = $(libelf) $(libmudflap)
+hash_LDADD = $(libelf) $(libmudflap)
+test_nlist_LDADD = $(libelf) $(libmudflap)
+msg_tst_LDADD = $(libelf) $(libmudflap)
+newscn_LDADD = $(libelf) $(libmudflap)
+early_offscn_LDADD = $(libelf) $(libmudflap)
+ecp_LDADD = $(libelf) $(libmudflap)
+update1_LDADD = $(libelf) $(libmudflap)
+update2_LDADD = $(libelf) $(libmudflap)
+update3_LDADD = $(libebl) $(libelf) $(libmudflap)
+update4_LDADD = $(libebl) $(libelf) $(libmudflap)
+show_die_info_LDADD = $(libdw) $(libelf) $(libmudflap)
+get_pubnames_LDADD = $(libdw) $(libelf) $(libmudflap)
+show_abbrev_LDADD = $(libdw) $(libelf) $(libmudflap)
+get_lines_LDADD = $(libdw) $(libelf) $(libmudflap)
+get_files_LDADD = $(libdw) $(libelf) $(libmudflap)
+get_aranges_LDADD = $(libdw) $(libelf) $(libmudflap)
+allfcts_LDADD = $(libdw) $(libelf) $(libmudflap)
+line2addr_no_Wformat = yes
+line2addr_LDADD = $(libdw) $(libmudflap)
+addrscopes_LDADD = $(libdw) $(libmudflap)
+funcscopes_LDADD = $(libdw) $(libmudflap)
+funcretval_LDADD = $(libdw) $(libmudflap)
+allregs_LDADD = $(libdw) $(libmudflap)
+find_prologues_LDADD = $(libdw) $(libmudflap)
+#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf) $(libmudflap)
+asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
+dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+rdwrmmap_LDADD = $(libelf)
+dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+arls_LDADD = $(libelf) $(libmudflap)
+dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+sha1_tst_LDADD = $(libeu) $(libmudflap)
+CLEANFILES = xxx *.gcno *.gcda *gconv
 all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
@@ -397,106 +593,157 @@
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure:  $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 clean-noinstPROGRAMS:
 	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+addrscopes$(EXEEXT): $(addrscopes_OBJECTS) $(addrscopes_DEPENDENCIES) 
+	@rm -f addrscopes$(EXEEXT)
+	$(LINK) $(addrscopes_OBJECTS) $(addrscopes_LDADD) $(LIBS)
+allfcts$(EXEEXT): $(allfcts_OBJECTS) $(allfcts_DEPENDENCIES) 
+	@rm -f allfcts$(EXEEXT)
+	$(LINK) $(allfcts_OBJECTS) $(allfcts_LDADD) $(LIBS)
+allregs$(EXEEXT): $(allregs_OBJECTS) $(allregs_DEPENDENCIES) 
+	@rm -f allregs$(EXEEXT)
+	$(LINK) $(allregs_OBJECTS) $(allregs_LDADD) $(LIBS)
 arextract$(EXEEXT): $(arextract_OBJECTS) $(arextract_DEPENDENCIES) 
 	@rm -f arextract$(EXEEXT)
-	$(LINK) $(arextract_LDFLAGS) $(arextract_OBJECTS) $(arextract_LDADD) $(LIBS)
+	$(LINK) $(arextract_OBJECTS) $(arextract_LDADD) $(LIBS)
+arls$(EXEEXT): $(arls_OBJECTS) $(arls_DEPENDENCIES) 
+	@rm -f arls$(EXEEXT)
+	$(LINK) $(arls_OBJECTS) $(arls_LDADD) $(LIBS)
 arsymtest$(EXEEXT): $(arsymtest_OBJECTS) $(arsymtest_DEPENDENCIES) 
 	@rm -f arsymtest$(EXEEXT)
-	$(LINK) $(arsymtest_LDFLAGS) $(arsymtest_OBJECTS) $(arsymtest_LDADD) $(LIBS)
+	$(LINK) $(arsymtest_OBJECTS) $(arsymtest_LDADD) $(LIBS)
 asm-tst1$(EXEEXT): $(asm_tst1_OBJECTS) $(asm_tst1_DEPENDENCIES) 
 	@rm -f asm-tst1$(EXEEXT)
-	$(LINK) $(asm_tst1_LDFLAGS) $(asm_tst1_OBJECTS) $(asm_tst1_LDADD) $(LIBS)
+	$(LINK) $(asm_tst1_OBJECTS) $(asm_tst1_LDADD) $(LIBS)
 asm-tst2$(EXEEXT): $(asm_tst2_OBJECTS) $(asm_tst2_DEPENDENCIES) 
 	@rm -f asm-tst2$(EXEEXT)
-	$(LINK) $(asm_tst2_LDFLAGS) $(asm_tst2_OBJECTS) $(asm_tst2_LDADD) $(LIBS)
+	$(LINK) $(asm_tst2_OBJECTS) $(asm_tst2_LDADD) $(LIBS)
 asm-tst3$(EXEEXT): $(asm_tst3_OBJECTS) $(asm_tst3_DEPENDENCIES) 
 	@rm -f asm-tst3$(EXEEXT)
-	$(LINK) $(asm_tst3_LDFLAGS) $(asm_tst3_OBJECTS) $(asm_tst3_LDADD) $(LIBS)
+	$(LINK) $(asm_tst3_OBJECTS) $(asm_tst3_LDADD) $(LIBS)
 asm-tst4$(EXEEXT): $(asm_tst4_OBJECTS) $(asm_tst4_DEPENDENCIES) 
 	@rm -f asm-tst4$(EXEEXT)
-	$(LINK) $(asm_tst4_LDFLAGS) $(asm_tst4_OBJECTS) $(asm_tst4_LDADD) $(LIBS)
+	$(LINK) $(asm_tst4_OBJECTS) $(asm_tst4_LDADD) $(LIBS)
 asm-tst5$(EXEEXT): $(asm_tst5_OBJECTS) $(asm_tst5_DEPENDENCIES) 
 	@rm -f asm-tst5$(EXEEXT)
-	$(LINK) $(asm_tst5_LDFLAGS) $(asm_tst5_OBJECTS) $(asm_tst5_LDADD) $(LIBS)
+	$(LINK) $(asm_tst5_OBJECTS) $(asm_tst5_LDADD) $(LIBS)
 asm-tst6$(EXEEXT): $(asm_tst6_OBJECTS) $(asm_tst6_DEPENDENCIES) 
 	@rm -f asm-tst6$(EXEEXT)
-	$(LINK) $(asm_tst6_LDFLAGS) $(asm_tst6_OBJECTS) $(asm_tst6_LDADD) $(LIBS)
+	$(LINK) $(asm_tst6_OBJECTS) $(asm_tst6_LDADD) $(LIBS)
 asm-tst7$(EXEEXT): $(asm_tst7_OBJECTS) $(asm_tst7_DEPENDENCIES) 
 	@rm -f asm-tst7$(EXEEXT)
-	$(LINK) $(asm_tst7_LDFLAGS) $(asm_tst7_OBJECTS) $(asm_tst7_LDADD) $(LIBS)
+	$(LINK) $(asm_tst7_OBJECTS) $(asm_tst7_LDADD) $(LIBS)
 asm-tst8$(EXEEXT): $(asm_tst8_OBJECTS) $(asm_tst8_DEPENDENCIES) 
 	@rm -f asm-tst8$(EXEEXT)
-	$(LINK) $(asm_tst8_LDFLAGS) $(asm_tst8_OBJECTS) $(asm_tst8_LDADD) $(LIBS)
+	$(LINK) $(asm_tst8_OBJECTS) $(asm_tst8_LDADD) $(LIBS)
 asm-tst9$(EXEEXT): $(asm_tst9_OBJECTS) $(asm_tst9_DEPENDENCIES) 
 	@rm -f asm-tst9$(EXEEXT)
-	$(LINK) $(asm_tst9_LDFLAGS) $(asm_tst9_OBJECTS) $(asm_tst9_LDADD) $(LIBS)
+	$(LINK) $(asm_tst9_OBJECTS) $(asm_tst9_LDADD) $(LIBS)
+dwfl-addr-sect$(EXEEXT): $(dwfl_addr_sect_OBJECTS) $(dwfl_addr_sect_DEPENDENCIES) 
+	@rm -f dwfl-addr-sect$(EXEEXT)
+	$(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) 
+	@rm -f dwfl-bug-addr-overflow$(EXEEXT)
+	$(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) 
+	@rm -f dwfl-bug-fd-leak$(EXEEXT)
+	$(LINK) $(dwfl_bug_fd_leak_OBJECTS) $(dwfl_bug_fd_leak_LDADD) $(LIBS)
+dwfl-bug-getmodules$(EXEEXT): $(dwfl_bug_getmodules_OBJECTS) $(dwfl_bug_getmodules_DEPENDENCIES) 
+	@rm -f dwfl-bug-getmodules$(EXEEXT)
+	$(LINK) $(dwfl_bug_getmodules_OBJECTS) $(dwfl_bug_getmodules_LDADD) $(LIBS)
+dwfl-bug-report$(EXEEXT): $(dwfl_bug_report_OBJECTS) $(dwfl_bug_report_DEPENDENCIES) 
+	@rm -f dwfl-bug-report$(EXEEXT)
+	$(LINK) $(dwfl_bug_report_OBJECTS) $(dwfl_bug_report_LDADD) $(LIBS)
+dwflmodtest$(EXEEXT): $(dwflmodtest_OBJECTS) $(dwflmodtest_DEPENDENCIES) 
+	@rm -f dwflmodtest$(EXEEXT)
+	$(LINK) $(dwflmodtest_OBJECTS) $(dwflmodtest_LDADD) $(LIBS)
+early-offscn$(EXEEXT): $(early_offscn_OBJECTS) $(early_offscn_DEPENDENCIES) 
+	@rm -f early-offscn$(EXEEXT)
+	$(LINK) $(early_offscn_OBJECTS) $(early_offscn_LDADD) $(LIBS)
 ecp$(EXEEXT): $(ecp_OBJECTS) $(ecp_DEPENDENCIES) 
 	@rm -f ecp$(EXEEXT)
-	$(LINK) $(ecp_LDFLAGS) $(ecp_OBJECTS) $(ecp_LDADD) $(LIBS)
+	$(LINK) $(ecp_OBJECTS) $(ecp_LDADD) $(LIBS)
+find-prologues$(EXEEXT): $(find_prologues_OBJECTS) $(find_prologues_DEPENDENCIES) 
+	@rm -f find-prologues$(EXEEXT)
+	$(LINK) $(find_prologues_OBJECTS) $(find_prologues_LDADD) $(LIBS)
+funcretval$(EXEEXT): $(funcretval_OBJECTS) $(funcretval_DEPENDENCIES) 
+	@rm -f funcretval$(EXEEXT)
+	$(LINK) $(funcretval_OBJECTS) $(funcretval_LDADD) $(LIBS)
+funcscopes$(EXEEXT): $(funcscopes_OBJECTS) $(funcscopes_DEPENDENCIES) 
+	@rm -f funcscopes$(EXEEXT)
+	$(LINK) $(funcscopes_OBJECTS) $(funcscopes_LDADD) $(LIBS)
 get-aranges$(EXEEXT): $(get_aranges_OBJECTS) $(get_aranges_DEPENDENCIES) 
 	@rm -f get-aranges$(EXEEXT)
-	$(LINK) $(get_aranges_LDFLAGS) $(get_aranges_OBJECTS) $(get_aranges_LDADD) $(LIBS)
+	$(LINK) $(get_aranges_OBJECTS) $(get_aranges_LDADD) $(LIBS)
 get-files$(EXEEXT): $(get_files_OBJECTS) $(get_files_DEPENDENCIES) 
 	@rm -f get-files$(EXEEXT)
-	$(LINK) $(get_files_LDFLAGS) $(get_files_OBJECTS) $(get_files_LDADD) $(LIBS)
+	$(LINK) $(get_files_OBJECTS) $(get_files_LDADD) $(LIBS)
 get-lines$(EXEEXT): $(get_lines_OBJECTS) $(get_lines_DEPENDENCIES) 
 	@rm -f get-lines$(EXEEXT)
-	$(LINK) $(get_lines_LDFLAGS) $(get_lines_OBJECTS) $(get_lines_LDADD) $(LIBS)
+	$(LINK) $(get_lines_OBJECTS) $(get_lines_LDADD) $(LIBS)
 get-pubnames$(EXEEXT): $(get_pubnames_OBJECTS) $(get_pubnames_DEPENDENCIES) 
 	@rm -f get-pubnames$(EXEEXT)
-	$(LINK) $(get_pubnames_LDFLAGS) $(get_pubnames_OBJECTS) $(get_pubnames_LDADD) $(LIBS)
+	$(LINK) $(get_pubnames_OBJECTS) $(get_pubnames_LDADD) $(LIBS)
 hash$(EXEEXT): $(hash_OBJECTS) $(hash_DEPENDENCIES) 
 	@rm -f hash$(EXEEXT)
-	$(LINK) $(hash_LDFLAGS) $(hash_OBJECTS) $(hash_LDADD) $(LIBS)
+	$(LINK) $(hash_OBJECTS) $(hash_LDADD) $(LIBS)
+line2addr$(EXEEXT): $(line2addr_OBJECTS) $(line2addr_DEPENDENCIES) 
+	@rm -f line2addr$(EXEEXT)
+	$(LINK) $(line2addr_OBJECTS) $(line2addr_LDADD) $(LIBS)
 msg_tst$(EXEEXT): $(msg_tst_OBJECTS) $(msg_tst_DEPENDENCIES) 
 	@rm -f msg_tst$(EXEEXT)
-	$(LINK) $(msg_tst_LDFLAGS) $(msg_tst_OBJECTS) $(msg_tst_LDADD) $(LIBS)
+	$(LINK) $(msg_tst_OBJECTS) $(msg_tst_LDADD) $(LIBS)
 newfile$(EXEEXT): $(newfile_OBJECTS) $(newfile_DEPENDENCIES) 
 	@rm -f newfile$(EXEEXT)
-	$(LINK) $(newfile_LDFLAGS) $(newfile_OBJECTS) $(newfile_LDADD) $(LIBS)
+	$(LINK) $(newfile_OBJECTS) $(newfile_LDADD) $(LIBS)
 newscn$(EXEEXT): $(newscn_OBJECTS) $(newscn_DEPENDENCIES) 
 	@rm -f newscn$(EXEEXT)
-	$(LINK) $(newscn_LDFLAGS) $(newscn_OBJECTS) $(newscn_LDADD) $(LIBS)
+	$(LINK) $(newscn_OBJECTS) $(newscn_LDADD) $(LIBS)
+rdwrmmap$(EXEEXT): $(rdwrmmap_OBJECTS) $(rdwrmmap_DEPENDENCIES) 
+	@rm -f rdwrmmap$(EXEEXT)
+	$(LINK) $(rdwrmmap_OBJECTS) $(rdwrmmap_LDADD) $(LIBS)
 saridx$(EXEEXT): $(saridx_OBJECTS) $(saridx_DEPENDENCIES) 
 	@rm -f saridx$(EXEEXT)
-	$(LINK) $(saridx_LDFLAGS) $(saridx_OBJECTS) $(saridx_LDADD) $(LIBS)
+	$(LINK) $(saridx_OBJECTS) $(saridx_LDADD) $(LIBS)
 scnnames$(EXEEXT): $(scnnames_OBJECTS) $(scnnames_DEPENDENCIES) 
 	@rm -f scnnames$(EXEEXT)
-	$(LINK) $(scnnames_LDFLAGS) $(scnnames_OBJECTS) $(scnnames_LDADD) $(LIBS)
+	$(LINK) $(scnnames_OBJECTS) $(scnnames_LDADD) $(LIBS)
 sectiondump$(EXEEXT): $(sectiondump_OBJECTS) $(sectiondump_DEPENDENCIES) 
 	@rm -f sectiondump$(EXEEXT)
-	$(LINK) $(sectiondump_LDFLAGS) $(sectiondump_OBJECTS) $(sectiondump_LDADD) $(LIBS)
+	$(LINK) $(sectiondump_OBJECTS) $(sectiondump_LDADD) $(LIBS)
+sha1-tst$(EXEEXT): $(sha1_tst_OBJECTS) $(sha1_tst_DEPENDENCIES) 
+	@rm -f sha1-tst$(EXEEXT)
+	$(LINK) $(sha1_tst_OBJECTS) $(sha1_tst_LDADD) $(LIBS)
 show-abbrev$(EXEEXT): $(show_abbrev_OBJECTS) $(show_abbrev_DEPENDENCIES) 
 	@rm -f show-abbrev$(EXEEXT)
-	$(LINK) $(show_abbrev_LDFLAGS) $(show_abbrev_OBJECTS) $(show_abbrev_LDADD) $(LIBS)
+	$(LINK) $(show_abbrev_OBJECTS) $(show_abbrev_LDADD) $(LIBS)
 show-die-info$(EXEEXT): $(show_die_info_OBJECTS) $(show_die_info_DEPENDENCIES) 
 	@rm -f show-die-info$(EXEEXT)
-	$(LINK) $(show_die_info_LDFLAGS) $(show_die_info_OBJECTS) $(show_die_info_LDADD) $(LIBS)
+	$(LINK) $(show_die_info_OBJECTS) $(show_die_info_LDADD) $(LIBS)
 showptable$(EXEEXT): $(showptable_OBJECTS) $(showptable_DEPENDENCIES) 
 	@rm -f showptable$(EXEEXT)
-	$(LINK) $(showptable_LDFLAGS) $(showptable_OBJECTS) $(showptable_LDADD) $(LIBS)
+	$(LINK) $(showptable_OBJECTS) $(showptable_LDADD) $(LIBS)
 test-nlist$(EXEEXT): $(test_nlist_OBJECTS) $(test_nlist_DEPENDENCIES) 
 	@rm -f test-nlist$(EXEEXT)
-	$(LINK) $(test_nlist_LDFLAGS) $(test_nlist_OBJECTS) $(test_nlist_LDADD) $(LIBS)
+	$(LINK) $(test_nlist_OBJECTS) $(test_nlist_LDADD) $(LIBS)
 update1$(EXEEXT): $(update1_OBJECTS) $(update1_DEPENDENCIES) 
 	@rm -f update1$(EXEEXT)
-	$(LINK) $(update1_LDFLAGS) $(update1_OBJECTS) $(update1_LDADD) $(LIBS)
+	$(LINK) $(update1_OBJECTS) $(update1_LDADD) $(LIBS)
 update2$(EXEEXT): $(update2_OBJECTS) $(update2_DEPENDENCIES) 
 	@rm -f update2$(EXEEXT)
-	$(LINK) $(update2_LDFLAGS) $(update2_OBJECTS) $(update2_LDADD) $(LIBS)
+	$(LINK) $(update2_OBJECTS) $(update2_LDADD) $(LIBS)
 update3$(EXEEXT): $(update3_OBJECTS) $(update3_DEPENDENCIES) 
 	@rm -f update3$(EXEEXT)
-	$(LINK) $(update3_LDFLAGS) $(update3_OBJECTS) $(update3_LDADD) $(LIBS)
+	$(LINK) $(update3_OBJECTS) $(update3_LDADD) $(LIBS)
 update4$(EXEEXT): $(update4_OBJECTS) $(update4_DEPENDENCIES) 
 	@rm -f update4$(EXEEXT)
-	$(LINK) $(update4_LDFLAGS) $(update4_OBJECTS) $(update4_LDADD) $(LIBS)
+	$(LINK) $(update4_OBJECTS) $(update4_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -504,7 +751,11 @@
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addrscopes.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@
@@ -515,18 +766,31 @@
 @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)/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)/dwflmodtest.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)/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)/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)/sha1-tst.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@
@@ -537,27 +801,26 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update4.Po@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-uninstall-info-am:
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
@@ -569,8 +832,8 @@
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
 	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -580,13 +843,12 @@
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	test -z "$(CTAGS_ARGS)$$tags$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$tags $$unique
@@ -600,9 +862,9 @@
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 check-TESTS: $(TESTS)
-	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[	 ]'; \
 	srcdir=$(srcdir); export srcdir; \
-	list='$(TESTS)'; \
+	list=' $(TESTS) '; \
 	if test -n "$$list"; then \
 	  for tst in $$list; do \
 	    if test -f ./$$tst; then dir=./; \
@@ -611,7 +873,7 @@
 	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
 	      all=`expr $$all + 1`; \
 	      case " $(XFAIL_TESTS) " in \
-	      *" $$tst "*) \
+	      *$$ws$$tst$$ws*) \
 		xpass=`expr $$xpass + 1`; \
 		failed=`expr $$failed + 1`; \
 		echo "XPASS: $$tst"; \
@@ -623,7 +885,7 @@
 	    elif test $$? -ne 77; then \
 	      all=`expr $$all + 1`; \
 	      case " $(XFAIL_TESTS) " in \
-	      *" $$tst "*) \
+	      *$$ws$$tst$$ws*) \
 		xfail=`expr $$xfail + 1`; \
 		echo "XFAIL: $$tst"; \
 	      ;; \
@@ -673,22 +935,21 @@
 	else :; fi
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@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; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -729,6 +990,7 @@
 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-generic clean-noinstPROGRAMS mostlyclean-am
@@ -751,13 +1013,21 @@
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
 install-exec-am:
 
+install-html: install-html-am
+
 install-info: install-info-am
 
 install-man:
 
-installcheck-am:
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am: installcheck-local
 
 maintainer-clean: maintainer-clean-am
 	-rm -rf ./$(DEPDIR)
@@ -776,19 +1046,32 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
 	clean-generic clean-noinstPROGRAMS ctags 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-exec install-exec-am \
-	install-info install-info-am install-man install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-info-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 \
+	tags uninstall uninstall-am
 
+
+@STANDALONE_FALSE@installcheck-local:
+@STANDALONE_FALSE@	$(MAKE) $(AM_MAKEFLAGS) \
+@STANDALONE_FALSE@		TESTS_ENVIRONMENT='$(installed_TESTS_ENVIRONMENT)' 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/tests/addrscopes.c b/tests/addrscopes.c
new file mode 100644
index 0000000..3394cd2
--- /dev/null
+++ b/tests/addrscopes.c
@@ -0,0 +1,203 @@
+/* Test program for dwarf_getscopes.
+   Copyright (C) 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/allfcts.c b/tests/allfcts.c
new file mode 100644
index 0000000..5fed814
--- /dev/null
+++ b/tests/allfcts.c
@@ -0,0 +1,78 @@
+/* Copyright (C) 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include ELFUTILS_HEADER(dw)
+#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_OK;
+}
+
+
+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);
+
+	      (void) dwarf_getfuncs (die, cb, NULL, 0);
+
+	      off = noff;
+	    }
+
+	  dwarf_end (dbg);
+	}
+
+      close (fd);
+    }
+}
diff --git a/tests/allregs.c b/tests/allregs.c
new file mode 100644
index 0000000..f1856df
--- /dev/null
+++ b/tests/allregs.c
@@ -0,0 +1,229 @@
+/* Copyright (C) 2005, 2006 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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>
+
+
+static const char *
+dwarf_encoding_string (unsigned int code)
+{
+  static const char *known[] =
+    {
+      [DW_ATE_void] = "void",
+      [DW_ATE_address] = "address",
+      [DW_ATE_boolean] = "boolean",
+      [DW_ATE_complex_float] = "complex_float",
+      [DW_ATE_float] = "float",
+      [DW_ATE_signed] = "signed",
+      [DW_ATE_signed_char] = "signed_char",
+      [DW_ATE_unsigned] = "unsigned",
+      [DW_ATE_unsigned_char] = "unsigned_char",
+      [DW_ATE_imaginary_float] = "imaginary_float",
+      [DW_ATE_packed_decimal] = "packed_decimal",
+      [DW_ATE_numeric_string] = "numeric_string",
+      [DW_ATE_edited] = "edited",
+      [DW_ATE_signed_fixed] = "signed_fixed",
+      [DW_ATE_unsigned_fixed] = "unsigned_fixed",
+      [DW_ATE_decimal_float] = "decimal_float",
+    };
+
+  if (code < sizeof (known) / sizeof (known[0]))
+    return known[code];
+
+  if (code >= DW_ATE_lo_user && code <= DW_ATE_hi_user)
+    {
+      static char buf[30];
+      snprintf (buf, sizeof (buf), "lo_user+%u", code - DW_ATE_lo_user);
+      return buf;
+    }
+
+  return "???";
+}
+
+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/tests/arextract.c b/tests/arextract.c
index aa86fb4..5bc4f27 100644
--- a/tests/arextract.c
+++ b/tests/arextract.c
@@ -1,15 +1,27 @@
 /* Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
diff --git a/tests/arls.c b/tests/arls.c
new file mode 100644
index 0000000..79b867d
--- /dev/null
+++ b/tests/arls.c
@@ -0,0 +1,91 @@
+#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/tests/arsymtest.c b/tests/arsymtest.c
index e4c2cf0..86d82cf 100644
--- a/tests/arsymtest.c
+++ b/tests/arsymtest.c
@@ -1,15 +1,27 @@
 /* Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #include <config.h>
 
diff --git a/tests/asm-tst1.c b/tests/asm-tst1.c
index b76930d..123346a 100644
--- a/tests/asm-tst1.c
+++ b/tests/asm-tst1.c
@@ -1,18 +1,34 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <string.h>
@@ -66,7 +82,14 @@
 
   elf_version (EV_CURRENT);
 
-  ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+  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));
@@ -235,5 +258,7 @@
   /* We don't need the file anymore.  */
   unlink (fname);
 
+  ebl_closebackend (ebl);
+
   return result;
 }
diff --git a/tests/asm-tst2.c b/tests/asm-tst2.c
index a309976..7caaf36 100644
--- a/tests/asm-tst2.c
+++ b/tests/asm-tst2.c
@@ -1,18 +1,34 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <string.h>
@@ -65,7 +81,14 @@
 
   elf_version (EV_CURRENT);
 
-  ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+  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));
@@ -257,5 +280,7 @@
   /* We don't need the file anymore.  */
   unlink (fname);
 
+  ebl_closebackend (ebl);
+
   return result;
 }
diff --git a/tests/asm-tst3.c b/tests/asm-tst3.c
index fb79ea7..f38feeb 100644
--- a/tests/asm-tst3.c
+++ b/tests/asm-tst3.c
@@ -1,18 +1,34 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <string.h>
@@ -57,7 +73,14 @@
 
   elf_version (EV_CURRENT);
 
-  ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+  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));
@@ -318,5 +341,7 @@
   /* We don't need the file anymore.  */
   unlink (fname);
 
+  ebl_closebackend (ebl);
+
   return result;
 }
diff --git a/tests/asm-tst4.c b/tests/asm-tst4.c
index 29d6485..54d054c 100644
--- a/tests/asm-tst4.c
+++ b/tests/asm-tst4.c
@@ -1,18 +1,34 @@
-/* Copyright (C) 2002, 2004 Red Hat, Inc.
+/* Copyright (C) 2002, 2004, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -33,7 +49,14 @@
 
   elf_version (EV_CURRENT);
 
-  ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+  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));
@@ -84,5 +107,7 @@
   /* We don't need the file anymore.  */
   unlink (fname);
 
+  ebl_closebackend (ebl);
+
   return result;
 }
diff --git a/tests/asm-tst5.c b/tests/asm-tst5.c
index 4f761ae..2a8b3f0 100644
--- a/tests/asm-tst5.c
+++ b/tests/asm-tst5.c
@@ -1,18 +1,34 @@
-/* Copyright (C) 2002, 2004 Red Hat, Inc.
+/* Copyright (C) 2002, 2004, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -35,7 +51,14 @@
 
   elf_version (EV_CURRENT);
 
-  ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+  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));
@@ -96,5 +119,7 @@
   /* We don't need the file anymore.  */
   unlink (fname);
 
+  ebl_closebackend (ebl);
+
   return result;
 }
diff --git a/tests/asm-tst6.c b/tests/asm-tst6.c
index ece69bc..bd6a71d 100644
--- a/tests/asm-tst6.c
+++ b/tests/asm-tst6.c
@@ -1,17 +1,33 @@
-/* Copyright (C) 2002, 2004 Red Hat, Inc.
+/* Copyright (C) 2002, 2004, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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.
 
-#include <libasm.h>
+   You should have received a copy of the GNU General Public License along
+   with Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -33,7 +49,14 @@
 
   elf_version (EV_CURRENT);
 
-  ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+  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));
@@ -130,5 +153,7 @@
   /* We don't need the file anymore.  */
   unlink (fname);
 
+  ebl_closebackend (ebl);
+
   return result;
 }
diff --git a/tests/asm-tst7.c b/tests/asm-tst7.c
index ebd4559..329f03b 100644
--- a/tests/asm-tst7.c
+++ b/tests/asm-tst7.c
@@ -1,19 +1,35 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
 #include <inttypes.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -33,7 +49,14 @@
 
   elf_version (EV_CURRENT);
 
-  ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+  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));
@@ -160,5 +183,7 @@
   /* We don't need the file anymore.  */
   unlink (fname);
 
+  ebl_closebackend (ebl);
+
   return result;
 }
diff --git a/tests/asm-tst8.c b/tests/asm-tst8.c
index 6ce7c9c..19c7aa9 100644
--- a/tests/asm-tst8.c
+++ b/tests/asm-tst8.c
@@ -1,19 +1,35 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
 #include <inttypes.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -33,7 +49,14 @@
 
   elf_version (EV_CURRENT);
 
-  ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+  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));
@@ -168,5 +191,7 @@
   /* We don't need the file anymore.  */
   unlink (fname);
 
+  ebl_closebackend (ebl);
+
   return result;
 }
diff --git a/tests/asm-tst9.c b/tests/asm-tst9.c
index 28bb478..1797e48 100644
--- a/tests/asm-tst9.c
+++ b/tests/asm-tst9.c
@@ -1,19 +1,35 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
 #include <inttypes.h>
-#include <libasm.h>
+#include ELFUTILS_HEADER(asm)
 #include <libelf.h>
 #include <stdio.h>
 #include <string.h>
@@ -85,7 +101,14 @@
 
   elf_version (EV_CURRENT);
 
-  ctx = asm_begin (fname, false, EM_386, ELFCLASS32, ELFDATA2LSB);
+  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));
@@ -314,5 +337,7 @@
   /* We don't need the file anymore.  */
   unlink (fname);
 
+  ebl_closebackend (ebl);
+
   return result;
 }
diff --git a/tests/coverage.sh b/tests/coverage.sh
new file mode 100755
index 0000000..5cc353c
--- /dev/null
+++ b/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/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c
new file mode 100644
index 0000000..62d1154
--- /dev/null
+++ b/tests/dwfl-addr-sect.c
@@ -0,0 +1,88 @@
+/* Test program for libdwfl ... foo
+   Copyright (C) 2007 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/dwfl-bug-addr-overflow.c b/tests/dwfl-bug-addr-overflow.c
new file mode 100644
index 0000000..0e875da
--- /dev/null
+++ b/tests/dwfl-bug-addr-overflow.c
@@ -0,0 +1,81 @@
+/* Test program for libdwfl basic module tracking, relocation.
+   Copyright (C) 2007 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c
new file mode 100644
index 0000000..37ff402
--- /dev/null
+++ b/tests/dwfl-bug-fd-leak.c
@@ -0,0 +1,110 @@
+/* Test program for libdwfl file decriptors leakage.
+   Copyright (C) 2007, 2008 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/dwfl-bug-getmodules.c b/tests/dwfl-bug-getmodules.c
new file mode 100644
index 0000000..f7042c0
--- /dev/null
+++ b/tests/dwfl-bug-getmodules.c
@@ -0,0 +1,74 @@
+/* Test program for dwfl_getmodules bug.
+   Copyright (C) 2008 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/dwfl-bug-report.c b/tests/dwfl-bug-report.c
new file mode 100644
index 0000000..459a41a
--- /dev/null
+++ b/tests/dwfl-bug-report.c
@@ -0,0 +1,56 @@
+/* Test program for dwfl_report_end bug.
+   Copyright (C) 2007 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/dwflmodtest.c b/tests/dwflmodtest.c
new file mode 100644
index 0000000..94f960f
--- /dev/null
+++ b/tests/dwflmodtest.c
@@ -0,0 +1,295 @@
+/* Test program for libdwfl basic module tracking, relocation.
+   Copyright (C) 2005, 2007 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/early-offscn.c b/tests/early-offscn.c
new file mode 100644
index 0000000..8778d50
--- /dev/null
+++ b/tests/early-offscn.c
@@ -0,0 +1,60 @@
+/* Copyright (C) 2008 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/ecp.c b/tests/ecp.c
index 15bc71c..9d0a706 100644
--- a/tests/ecp.c
+++ b/tests/ecp.c
@@ -1,15 +1,27 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #include <errno.h>
 #include <error.h>
@@ -82,7 +94,10 @@
   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/tests/find-prologues.c b/tests/find-prologues.c
new file mode 100644
index 0000000..c0e73d0
--- /dev/null
+++ b/tests/find-prologues.c
@@ -0,0 +1,116 @@
+/* Test program for dwarf_entry_breakpoints.
+   Copyright (C) 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/funcretval.c b/tests/funcretval.c
new file mode 100644
index 0000000..3a8750f
--- /dev/null
+++ b/tests/funcretval.c
@@ -0,0 +1,114 @@
+/* Test program for dwfl_module_return_value_location.
+   Copyright (C) 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/funcscopes.c b/tests/funcscopes.c
new file mode 100644
index 0000000..4b58369
--- /dev/null
+++ b/tests/funcscopes.c
@@ -0,0 +1,202 @@
+/* Test program for dwarf_getscopes.
+   Copyright (C) 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/get-aranges.c b/tests/get-aranges.c
index 1be76b2..c6cd511 100644
--- a/tests/get-aranges.c
+++ b/tests/get-aranges.c
@@ -1,19 +1,35 @@
 /* Copyright (C) 2002, 2004 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
 #include <libelf.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <stdio.h>
 #include <unistd.h>
 
diff --git a/tests/get-files.c b/tests/get-files.c
index 537d1ea..81daea2 100644
--- a/tests/get-files.c
+++ b/tests/get-files.c
@@ -1,19 +1,35 @@
-/* Copyright (C) 2002, 2004 Red Hat, Inc.
+/* Copyright (C) 2002, 2004, 2005, 2007 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
 #include <libelf.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <stdio.h>
 #include <unistd.h>
 
@@ -68,8 +84,24 @@
 	      break;
 	    }
 
-	  for (int i = 0; i < nfiles; ++i)
-	    printf (" file[%d] = \"%s\"\n", i,
+	  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;
diff --git a/tests/get-lines.c b/tests/get-lines.c
index 6a8c076..45d2c8d 100644
--- a/tests/get-lines.c
+++ b/tests/get-lines.c
@@ -1,20 +1,36 @@
 /* Copyright (C) 2002, 2004 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
 #include <inttypes.h>
 #include <libelf.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <stdio.h>
 #include <unistd.h>
 
diff --git a/tests/get-pubnames.c b/tests/get-pubnames.c
index 3523f72..f1361c6 100644
--- a/tests/get-pubnames.c
+++ b/tests/get-pubnames.c
@@ -1,19 +1,35 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <fcntl.h>
 #include <libelf.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <stdio.h>
 #include <unistd.h>
 
@@ -21,7 +37,7 @@
 static int globcnt;
 
 static int
-callback (Dwarf *dbg, Dwarf_Global *gl, void *arg)
+callback (Dwarf *dbg, Dwarf_Global *gl, void *arg __attribute__ ((unused)))
 {
   int result = DWARF_CB_OK;
 
diff --git a/tests/hash.c b/tests/hash.c
index afe853b..ab7efeb 100644
--- a/tests/hash.c
+++ b/tests/hash.c
@@ -1,15 +1,27 @@
 /* Copyright (C) 2002 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
diff --git a/tests/line2addr.c b/tests/line2addr.c
new file mode 100644
index 0000000..5630da3
--- /dev/null
+++ b/tests/line2addr.c
@@ -0,0 +1,156 @@
+/* Copyright (C) 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#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/tests/msg_tst.c b/tests/msg_tst.c
index 67e63c0..db07853 100644
--- a/tests/msg_tst.c
+++ b/tests/msg_tst.c
@@ -1,15 +1,27 @@
-/* Copyright (C) 2002 Red Hat, Inc.
+/* Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #include <config.h>
 
@@ -67,9 +79,10 @@
     { ELF_E_GROUP_NOT_REL,
       "only relocatable files can contain section groups" },
     { ELF_E_INVALID_PHDR,
-      "program header only allowed in executables and shared objects" },
-    { ELF_E_NO_PHDR,
-      "file has no program header" }
+      "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" }
   };
 
 
diff --git a/tests/newfile.c b/tests/newfile.c
index 5efc862..f8b132f 100644
--- a/tests/newfile.c
+++ b/tests/newfile.c
@@ -1,15 +1,27 @@
-/* Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #include <config.h>
 
@@ -46,7 +58,7 @@
 }
 
 int
-main (int argc, char *argv[])
+main (int argc, char *argv[] __attribute__ ((unused)))
 {
   Elf *elf;
   int result = 0;
diff --git a/tests/newscn.c b/tests/newscn.c
index bc97513..56eae97 100644
--- a/tests/newscn.c
+++ b/tests/newscn.c
@@ -1,14 +1,30 @@
-/* Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <assert.h>
 #include <fcntl.h>
@@ -19,7 +35,7 @@
 
 
 int
-main (int argc, char *argv[])
+main (void)
 {
   Elf *elf;
   int fd;
diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c
new file mode 100644
index 0000000..263be0f
--- /dev/null
+++ b/tests/rdwrmmap.c
@@ -0,0 +1,29 @@
+#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/tests/run-addrname-test.sh b/tests/run-addrname-test.sh
new file mode 100755
index 0000000..d525523
--- /dev/null
+++ b/tests/run-addrname-test.sh
@@ -0,0 +1,222 @@
+#! /bin/sh
+# Copyright (C) 2007, 2008 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile34 testfile38 testfile41 testfile49
+
+testrun_compare ../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 ../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 ../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 ../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 ../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
+
+exit 0
diff --git a/tests/run-addrscopes.sh b/tests/run-addrscopes.sh
new file mode 100755
index 0000000..d13c55d
--- /dev/null
+++ b/tests/run-addrscopes.sh
@@ -0,0 +1,51 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile22
+
+testrun_compare ./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 ./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/tests/run-allfcts.sh b/tests/run-allfcts.sh
new file mode 100755
index 0000000..e990a63
--- /dev/null
+++ b/tests/run-allfcts.sh
@@ -0,0 +1,48 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile2 testfile8
+
+testrun_compare ./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
+
+exit 0
diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh
new file mode 100755
index 0000000..7ebaa71
--- /dev/null
+++ b/tests/run-allregs.sh
@@ -0,0 +1,2595 @@
+#! /bin/sh
+# Copyright (C) 2005, 2006, 2007 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+regs_test()
+{
+  tempfiles good.regs
+  cat > good.regs
+  testfiles "$@"
+  for f; do testrun_compare ./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
+
+exit 0
diff --git a/tests/run-arextract.sh b/tests/run-arextract.sh
index 839a679..29119a1 100644
--- a/tests/run-arextract.sh
+++ b/tests/run-arextract.sh
@@ -1,31 +1,45 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2005, 2006 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-archive=../libelf/.libs/libelf.a
-test -f $archive || archive=../libelf/libelf.a
+. $srcdir/test-subr.sh
+
+tempfiles arextract.test
+
+archive=../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 ../libelf/*.o; do
-	./arextract $archive `basename $f` arextract.test || exit 1
+	testrun ./arextract $archive `basename $f` arextract.test || exit 1
 	cmp $f arextract.test || {
 	    echo "Extraction of $1 failed"
 	    exit 1
 	}
-	rm -f ${objpfx}arextract.test
     done
 
     echo "done"
diff --git a/tests/run-arsymtest.sh b/tests/run-arsymtest.sh
index 793cdb8..d47df7a 100644
--- a/tests/run-arsymtest.sh
+++ b/tests/run-arsymtest.sh
@@ -1,23 +1,39 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2006 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
 
 lib=../libelf/libelf.a
 okfile=arsymtest.ok
 tmpfile=arsymtest.tmp
 testfile=arsymtest.test
 
-result=0
+tempfiles $okfile $tmpfile $testfile
+
+result=77
 if test -f $lib; then
     # Generate list using `nm' we check against.
     nm -s $lib |
@@ -25,14 +41,12 @@
     sort > $okfile
 
     # Now run our program using libelf.
-    ./arsymtest $lib $tmpfile || exit 1
+    testrun ./arsymtest $lib $tmpfile || exit 1
     sort $tmpfile > $testfile
-    rm $tmpfile
 
     # Compare the outputs.
     if cmp $okfile $testfile; then
 	result=0
-	rm $testfile $okfile
     else
 	result=1
     fi
diff --git a/tests/run-bug1-test.sh b/tests/run-bug1-test.sh
new file mode 100755
index 0000000..7367a4e
--- /dev/null
+++ b/tests/run-bug1-test.sh
@@ -0,0 +1,42 @@
+#! /bin/sh
+# Copyright (C) 2006 Red Hat, Inc.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2006.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile28 testfile28.rdwr
+
+testrun ./rdwrmmap testfile28
+
+cmp testfile28 testfile28.rdwr
+
+test_cleanup
+
+testfiles testfile29 testfile29.rdwr
+
+testrun ./rdwrmmap testfile29
+
+cmp testfile29 testfile29.rdwr
+
+exit 0
diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh
new file mode 100755
index 0000000..01803c0
--- /dev/null
+++ b/tests/run-disasm-x86-64.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Copyright (C) 2007, 2008 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $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 ../src/objdump -d testfile45.o < testfile45.expect
+    ;;
+esac
diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh
new file mode 100755
index 0000000..efd734c
--- /dev/null
+++ b/tests/run-disasm-x86.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Copyright (C) 2007, 2008 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $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 ../src/objdump -d testfile44.o < testfile44.expect
+    ;;
+esac
diff --git a/tests/run-dwfl-addr-sect.sh b/tests/run-dwfl-addr-sect.sh
new file mode 100755
index 0000000..98666f3
--- /dev/null
+++ b/tests/run-dwfl-addr-sect.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Copyright (C) 2007, 2008 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile43
+
+testrun_compare ./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
+
+exit 0
diff --git a/tests/run-dwfl-bug-offline-rel.sh b/tests/run-dwfl-bug-offline-rel.sh
new file mode 100755
index 0000000..d1f6149
--- /dev/null
+++ b/tests/run-dwfl-bug-offline-rel.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Copyright (C) 2007 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile36 testfile36.debug
+
+testrun_compare ./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/tests/run-early-offscn.sh b/tests/run-early-offscn.sh
new file mode 100755
index 0000000..70be219
--- /dev/null
+++ b/tests/run-early-offscn.sh
@@ -0,0 +1,32 @@
+#! /bin/sh
+# Copyright (C) 2008 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile
+
+testrun ./early-offscn testfile 0x500
+
+exit 0
diff --git a/tests/run-ecp-test.sh b/tests/run-ecp-test.sh
index e430496..941f3e9 100644
--- a/tests/run-ecp-test.sh
+++ b/tests/run-ecp-test.sh
@@ -1,25 +1,36 @@
 #! /bin/sh
-# Copyright (C) 2002 Red Hat, Inc.
+# Copyright (C) 2002, 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Jakub Jelinek <jakub@redhat.com>, 2002.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile10.bz2 > testfile10 2>/dev/null || exit 0
+. $srcdir/test-subr.sh
 
-./ecp testfile10 testfile10.tmp
+testfiles testfile10
+tempfiles testfile10.tmp
+
+testrun ./ecp testfile10 testfile10.tmp
 
 cmp testfile10 testfile10.tmp
 
-rm -f testfile10 testfile10.tmp
-
 exit 0
diff --git a/tests/run-ecp-test2.sh b/tests/run-ecp-test2.sh
index 143c70a..4231708 100644
--- a/tests/run-ecp-test2.sh
+++ b/tests/run-ecp-test2.sh
@@ -1,23 +1,34 @@
 #! /bin/sh
-# Copyright (C) 2002 Red Hat, Inc.
+# Copyright (C) 2002, 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Jakub Jelinek <jakub@redhat.com>, 2002.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+. $srcdir/test-subr.sh
 
-./ecp testfile2 testfile2.tmp
+testfiles testfile2
+tempfiles testfile2.tmp
 
-rm -f testfile2 testfile2.tmp
+testrun ./ecp testfile2 testfile2.tmp
 
 exit 0
diff --git a/tests/run-elflint-self.sh b/tests/run-elflint-self.sh
new file mode 100755
index 0000000..7da0886
--- /dev/null
+++ b/tests/run-elflint-self.sh
@@ -0,0 +1,62 @@
+#! /bin/sh
+# Copyright (C) 2005, 2007 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+status=0
+runtest() {
+# Uncomment for debuging
+#  echo $1
+  if [ -f $1 ]; then
+    testrun ../src/elflint --quiet --gnu-ld $1 ||
+    { echo "*** failure in $1"; status=1; }
+  fi
+}
+
+runtest ../src/addr2line
+runtest ../src/elfcmp
+runtest ../src/elflint
+runtest ../src/findtextrel
+runtest ../src/ld
+runtest ../src/nm
+runtest ../src/objdump
+runtest ../src/readelf
+runtest ../src/size
+runtest ../src/strip
+runtest ../libelf/libelf.so
+runtest ../libdw/libdw.so
+runtest ../libasm/libasm.so
+runtest ../libebl/libebl_alpha.so
+runtest ../libebl/libebl_arm.so
+runtest ../libebl/libebl_i386.so
+runtest ../libebl/libebl_ia64.so
+runtest ../libebl/libebl_ppc.so
+runtest ../libebl/libebl_ppc64.so
+runtest ../libebl/libebl_sh.so
+runtest ../libebl/libebl_sparc.so
+runtest ../libebl/libebl_x86_64.so
+
+exit $status
diff --git a/tests/run-elflint-test.sh b/tests/run-elflint-test.sh
new file mode 100755
index 0000000..e0e1c54
--- /dev/null
+++ b/tests/run-elflint-test.sh
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 2005, 2007, 2008 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile18
+
+testrun_compare ../src/elflint --gnu-ld testfile18 <<\EOF
+section [ 8] '.rela.dyn': relocation 1: copy relocation against symbol of type FUNC
+EOF
+
+testfiles testfile32
+testrun ../src/elflint -q testfile32
+
+testfiles testfile33
+testrun ../src/elflint -q testfile33
+
+testfiles testfile42
+testrun ../src/elflint -q --gnu-ld testfile42
+
+testfiles testfile46
+testrun ../src/elflint -q testfile46
+
+exit 0
diff --git a/tests/run-find-prologues.sh b/tests/run-find-prologues.sh
new file mode 100755
index 0000000..eddc9ee
--- /dev/null
+++ b/tests/run-find-prologues.sh
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile11 testfile22 testfile24 \
+	  testfile25 testfile3 testfile4 testfile5 testfile6
+
+testrun_compare ./find-prologues -e testfile <<\EOF
+main             0x000000000804842c 0x0000000008048432
+bar              0x000000000804845c 0x000000000804845f
+foo              0x0000000008048468 0x000000000804846b
+EOF
+
+testrun_compare ./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 ./find-prologues -e testfile22 <<\EOF
+function         0x0000000008048348 0x000000000804834e
+main             0x000000000804835b 0x0000000008048377
+EOF
+
+testrun_compare ./find-prologues -e testfile24 <<\EOF
+incr             0x0000000008048348 0x000000000804834e
+main             0x0000000008048354 0x0000000008048360
+EOF
+
+testrun_compare ./find-prologues -e testfile25 <<\EOF
+incr             0x0000000008048348 0x000000000804834c
+EOF
+
+testrun_compare ./find-prologues -e testfile3 <<\EOF
+main             0x000000000804842c 0x0000000008048433
+bar              0x0000000008048458 0x000000000804845b
+foo              0x0000000008048464 0x0000000008048467
+EOF
+
+testrun_compare ./find-prologues -e testfile4 <<\EOF
+get              0x00000000080493fc 0x0000000008049402
+main             0x0000000008049498 0x000000000804949e
+a                0x000000000804d85c 0x000000000804d85c
+__tfPCc          0x000000000804d86c 0x000000000804d872
+__tfCc           0x000000000804d8a4 0x000000000804d8a4
+EOF
+
+testrun_compare ./find-prologues -e testfile5 <<\EOF
+bar              0x000000000804842c 0x000000000804842f
+foo              0x0000000008048438 0x000000000804843b
+main             0x0000000008048444 0x000000000804844a
+EOF
+
+testrun_compare ./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/tests/run-funcscopes.sh b/tests/run-funcscopes.sh
new file mode 100755
index 0000000..52e50f4
--- /dev/null
+++ b/tests/run-funcscopes.sh
@@ -0,0 +1,37 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile25
+
+testrun_compare ./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/tests/run-get-aranges.sh b/tests/run-get-aranges.sh
index 26b2986..f78a4a1 100644
--- a/tests/run-get-aranges.sh
+++ b/tests/run-get-aranges.sh
@@ -1,27 +1,34 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+. $srcdir/test-subr.sh
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+testfiles testfile testfile2
 
-./get-aranges testfile testfile2 > get-aranges.out
-
-cmp get-aranges.out - <<"EOF"
+testrun_compare ./get-aranges testfile testfile2 <<\EOF
 0x804842b: not in range
 CU name: "m.c"
 CU name: "m.c"
@@ -66,6 +73,4 @@
 CU name: "m.c"
 EOF
 
-rm -f testfile testfile2 get-aranges.out
-
 exit 0
diff --git a/tests/run-get-files.sh b/tests/run-get-files.sh
index 7af5c13..7d51f5f 100644
--- a/tests/run-get-files.sh
+++ b/tests/run-get-files.sh
@@ -1,31 +1,40 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2004 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2004, 2005, 2007 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+. $srcdir/test-subr.sh
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+testfiles testfile testfile2
 
-./get-files testfile testfile2 > get-files.out
-
-diff -u get-files.out - <<"EOF"
+testrun_compare ./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"
@@ -39,9 +48,11 @@
  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"
@@ -52,13 +63,13 @@
  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
 
-rm -f testfile testfil2 get-files.out
-
 exit 0
diff --git a/tests/run-get-lines.sh b/tests/run-get-lines.sh
index 70c9cd8..fb675dc 100644
--- a/tests/run-get-lines.sh
+++ b/tests/run-get-lines.sh
@@ -1,27 +1,34 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2004 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2004, 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+. $srcdir/test-subr.sh
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+testfiles testfile testfile2
 
-./get-lines testfile testfile2 > get-lines.out
-
-diff -u get-lines.out - <<"EOF"
+testrun_compare ./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
@@ -62,6 +69,4 @@
 10000514: /shoggoth/drepper/m.c:8:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no
 EOF
 
-rm -f testfile testfile2 get-lines.out
-
 exit 0
diff --git a/tests/run-get-pubnames.sh b/tests/run-get-pubnames.sh
index a232bfd..131baf0 100644
--- a/tests/run-get-pubnames.sh
+++ b/tests/run-get-pubnames.sh
@@ -1,27 +1,34 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2003 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2003, 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+. $srcdir/test-subr.sh
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+testfiles testfile testfile2
 
-./get-pubnames testfile testfile2 > get-pubnames.out
-
-diff -u get-pubnames.out - <<"EOF"
+testrun_compare ./get-pubnames testfile testfile2 <<\EOF
  [ 0] "main", die: 104, cu: 11
 CU name: "m.c"
 object name: "main"
@@ -48,6 +55,4 @@
 object name: "a"
 EOF
 
-rm -f testfile testfile2 get-pubnames.out
-
 exit 0
diff --git a/tests/run-line2addr.sh b/tests/run-line2addr.sh
new file mode 100755
index 0000000..3fb6f47
--- /dev/null
+++ b/tests/run-line2addr.sh
@@ -0,0 +1,57 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile testfile2 testfile8 testfile14 testfile23
+
+testrun_compare ./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 ./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 ./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 ./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 ./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/tests/run-native-test.sh b/tests/run-native-test.sh
new file mode 100755
index 0000000..99926b0
--- /dev/null
+++ b/tests/run-native-test.sh
@@ -0,0 +1,89 @@
+#! /bin/sh
+# Copyright (C) 2005, 2006 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+
+. $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
+}
+
+trap native_cleanup 0 1 2 15
+
+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 ./allregs
+native_test ./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/tests/run-ranlib-test.sh b/tests/run-ranlib-test.sh
new file mode 100755
index 0000000..01c0d0b
--- /dev/null
+++ b/tests/run-ranlib-test.sh
@@ -0,0 +1,46 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $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 ../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/tests/run-ranlib-test2.sh b/tests/run-ranlib-test2.sh
new file mode 100755
index 0000000..8704037
--- /dev/null
+++ b/tests/run-ranlib-test2.sh
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+original=${original:-testfile19}
+indexed=${indexed:-testfile19.index}
+
+testfiles $original $indexed
+
+testrun ../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/tests/run-ranlib-test3.sh b/tests/run-ranlib-test3.sh
new file mode 100755
index 0000000..7be6ddd
--- /dev/null
+++ b/tests/run-ranlib-test3.sh
@@ -0,0 +1,30 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+
+original=testfile20
+indexed=testfile20.index
+. $srcdir/run-ranlib-test2.sh
diff --git a/tests/run-ranlib-test4.sh b/tests/run-ranlib-test4.sh
new file mode 100755
index 0000000..eeeb56f
--- /dev/null
+++ b/tests/run-ranlib-test4.sh
@@ -0,0 +1,31 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+
+original=testfile21
+indexed=testfile21.index
+noindex=1
+. $srcdir/run-ranlib-test2.sh
diff --git a/tests/run-readelf-test1.sh b/tests/run-readelf-test1.sh
new file mode 100755
index 0000000..aaa03ed
--- /dev/null
+++ b/tests/run-readelf-test1.sh
@@ -0,0 +1,53 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+original=${original:-testfile11}
+stripped=${stripped:-testfile7}
+debugout=${debugfile:+-f testfile.debug.temp -F $debugfile}
+
+testfiles testfile3
+
+tempfiles testfile.temp
+
+testrun ../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/tests/run-readelf-test2.sh b/tests/run-readelf-test2.sh
new file mode 100755
index 0000000..4edaea6
--- /dev/null
+++ b/tests/run-readelf-test2.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Copyright (C) 2007 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile28
+
+testrun_compare ../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/tests/run-readelf-test3.sh b/tests/run-readelf-test3.sh
new file mode 100755
index 0000000..71dd8ae
--- /dev/null
+++ b/tests/run-readelf-test3.sh
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2007 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile40.debug
+
+testrun_compare ../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/tests/run-readelf-test4.sh b/tests/run-readelf-test4.sh
new file mode 100755
index 0000000..85e76ed
--- /dev/null
+++ b/tests/run-readelf-test4.sh
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 2007 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile19.index
+
+testrun_compare ../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/tests/run-show-abbrev.sh b/tests/run-show-abbrev.sh
index 78812a5..a148dff 100644
--- a/tests/run-show-abbrev.sh
+++ b/tests/run-show-abbrev.sh
@@ -1,27 +1,34 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2003, 2004 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile.bz2 > testfile 2>/dev/null || exit 0
+. $srcdir/test-subr.sh
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+testfiles testfile testfile2
 
-./show-abbrev testfile testfile2 > show-abbrev.out
-
-diff -u show-abbrev.out - <<"EOF"
+testrun_compare ./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
@@ -350,6 +357,4 @@
 abbrev[96]: attr[5]: code = 2, form = 10, offset = 373
 EOF
 
-rm -f testfile testfile2 show-abbrev.out
-
 exit 0
diff --git a/tests/run-show-ciefde.sh b/tests/run-show-ciefde.sh
index b335533..37505c0 100644
--- a/tests/run-show-ciefde.sh
+++ b/tests/run-show-ciefde.sh
@@ -1,27 +1,34 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile3.bz2 > testfile3 2>/dev/null || exit 0
+. $srcdir/test-subr.sh
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile4.bz2 > testfile4 2>/dev/null || exit 0
+testfiles testfile3 testfile4
 
-./show-ciefde testfile3 testfile4 > show-ciefde.out
-
-diff -u show-ciefde.out - <<"EOF"
+testrun_compare ./show-ciefde testfile3 testfile4 <<\EOF
 testfile3 has 1 CIEs and 1 FDEs
 CIE[0]: bytes_in_cie = 16, version = 1, augmenter = ""
 CIE[0]: code_alignment_factor = 1
@@ -314,6 +321,4 @@
 FDE[@80493fc]: cie_offset = 0, cie_index = 0, fde_offset = 28
 EOF
 
-rm -f testfile3 testfile4 show-ciefde.out
-
 exit 0
diff --git a/tests/run-show-die-info.sh b/tests/run-show-die-info.sh
index 0426326..47b5151 100644
--- a/tests/run-show-die-info.sh
+++ b/tests/run-show-die-info.sh
@@ -1,27 +1,34 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2003, 2004 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile5.bz2 > testfile5 2>/dev/null || exit 0
+. $srcdir/test-subr.sh
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile2.bz2 > testfile2 2>/dev/null || exit 0
+testfiles testfile5 testfile2
 
-./show-die-info testfile5 testfile2 > show-die-info.out
-
-diff -u show-die-info.out - <<"EOF"
+testrun_compare ./show-die-info testfile5 testfile2 <<\EOF
 file: testfile5
 New CU: off = 0, hsize = 11, ab = 0, as = 4, os = 4
      DW_TAG_compile_unit
@@ -983,6 +990,4 @@
            Attrs     : location name decl_file decl_line external type
 EOF
 
-rm -f testfile2 testfile5 show-die-info.out
-
 exit 0
diff --git a/tests/run-strings-test.sh b/tests/run-strings-test.sh
new file mode 100755
index 0000000..a5dac63
--- /dev/null
+++ b/tests/run-strings-test.sh
@@ -0,0 +1,478 @@
+#! /bin/sh
+# Copyright (C) 2005, 2006, 2008 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+files="testfile `seq 2 9 | while read n; do echo testfile$n; done`"
+testfiles $files
+
+testrun_compare ../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/tests/run-strip-test.sh b/tests/run-strip-test.sh
index aab37f4..e056f89 100644
--- a/tests/run-strip-test.sh
+++ b/tests/run-strip-test.sh
@@ -1,33 +1,64 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2003 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2003, 2005, 2007, 2008 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile11.bz2 > testfile11 2>/dev/null || exit 0
+. $srcdir/test-subr.sh
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile7.bz2 > testfile7 2>/dev/null || exit 0
+original=${original:-testfile11}
+stripped=${stripped:-testfile7}
+debugout=${debugfile:+-f testfile.debug.temp -F $debugfile}
 
-LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
-  ../src/strip -o testfile.temp testfile11
+testfiles $original
+test x$stripped = xtestfile.temp || testfiles $stripped $debugfile
 
-cmp testfile7 testfile.temp
+tempfiles testfile.temp testfile.debug.temp testfile.unstrip
+
+testrun ../src/strip -o testfile.temp $debugout $original
+
+status=0
+
+cmp $stripped testfile.temp || status=$?
 
 # Check elflint and the expected result.
-LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
-  ../src/elflint -q testfile.temp
+testrun ../src/elflint -q testfile.temp || status=$?
 
-rm -f testfile11 testfile7 testfile.temp
+test -z "$debugfile" || {
+cmp $debugfile testfile.debug.temp || status=$?
 
-exit 0
+# Check elflint and the expected result.
+testrun ../src/elflint -q -d testfile.debug.temp || status=$?
+
+# Now test unstrip recombining those files.
+testrun ../src/unstrip -o testfile.unstrip testfile.temp testfile.debug.temp
+
+# Check that it came back whole.
+testrun ../src/elfcmp --hash-inexact $original testfile.unstrip
+}
+
+tempfiles testfile.sections
+testrun ../src/readelf -S testfile.temp > testfile.sections || status=$?
+fgrep ' .debug_' testfile.sections && status=1
+
+exit $status
diff --git a/tests/run-strip-test2.sh b/tests/run-strip-test2.sh
index f385a86..a5858d2 100644
--- a/tests/run-strip-test2.sh
+++ b/tests/run-strip-test2.sh
@@ -1,33 +1,30 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile8.bz2 > testfile8 2>/dev/null || exit 0
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile9.bz2 > testfile9 2>/dev/null || exit 0
-
-LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
-  ../src/strip -o testfile.temp testfile8
-
-cmp testfile9 testfile.temp
-
-# Check elflint and the expected result.
-LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
-  ../src/elflint -q testfile.temp
-
-rm -f testfile8 testfile9 testfile.temp
-
-exit 0
+original=testfile8
+stripped=testfile9
+. $srcdir/run-strip-test.sh
diff --git a/tests/run-strip-test3.sh b/tests/run-strip-test3.sh
index 5ff4a5a..3d52f6e 100644
--- a/tests/run-strip-test3.sh
+++ b/tests/run-strip-test3.sh
@@ -1,33 +1,30 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2003 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2003, 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
+# Red Hat elfutils 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; version 2 of the License.
 #
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile12.bz2 > testfile12 2>/dev/null || exit 0
 
-# Don't fail if we cannot decompress the file.
-bunzip2 -c $srcdir/testfile13.bz2 > testfile13 2>/dev/null || exit 0
-
-LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
-  ../src/strip -o testfile.temp testfile12
-
-cmp testfile13 testfile.temp
-
-# Check elflint and the expected result.
-LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
-  ../src/elflint -q testfile.temp
-
-rm -f testfile12 testfile13 testfile.temp
-
-exit 0
+original=testfile12
+stripped=testfile13
+. $srcdir/run-strip-test.sh
diff --git a/tests/run-strip-test4.sh b/tests/run-strip-test4.sh
new file mode 100755
index 0000000..64924a9
--- /dev/null
+++ b/tests/run-strip-test4.sh
@@ -0,0 +1,5 @@
+original=testfile11
+stripped=testfile37
+debugfile=testfile37.debug
+
+. $srcdir/run-strip-test.sh
diff --git a/tests/run-strip-test5.sh b/tests/run-strip-test5.sh
new file mode 100755
index 0000000..9fa9ebe
--- /dev/null
+++ b/tests/run-strip-test5.sh
@@ -0,0 +1,5 @@
+original=testfile8
+stripped=testfile16
+debugfile=testfile16.debug
+
+. $srcdir/run-strip-test.sh
diff --git a/tests/run-strip-test6.sh b/tests/run-strip-test6.sh
new file mode 100755
index 0000000..c59bf5e
--- /dev/null
+++ b/tests/run-strip-test6.sh
@@ -0,0 +1,5 @@
+original=testfile12
+stripped=testfile35
+debugfile=testfile35.debug
+
+. $srcdir/run-strip-test.sh
diff --git a/tests/run-strip-test7.sh b/tests/run-strip-test7.sh
new file mode 100755
index 0000000..c65cd05
--- /dev/null
+++ b/tests/run-strip-test7.sh
@@ -0,0 +1,5 @@
+original=testfile39
+stripped=testfile40
+debugfile=testfile40.debug
+
+. $srcdir/run-strip-test.sh
diff --git a/tests/run-strip-test8.sh b/tests/run-strip-test8.sh
new file mode 100755
index 0000000..fb9fa08
--- /dev/null
+++ b/tests/run-strip-test8.sh
@@ -0,0 +1,5 @@
+original=testfile47
+stripped=testfile48
+debugfile=testfile48.debug
+
+. $srcdir/run-strip-test.sh
diff --git a/tests/run-unstrip-test.sh b/tests/run-unstrip-test.sh
new file mode 100755
index 0000000..8f0fc69
--- /dev/null
+++ b/tests/run-unstrip-test.sh
@@ -0,0 +1,42 @@
+#! /bin/sh
+# Copyright (C) 2007 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/test-subr.sh
+
+original=${original:-testfile12}
+stripped=${stripped:-testfile17}
+debugfile=${debugfile:-${stripped}.debug}
+
+testfiles $original $stripped $debugfile
+tempfiles testfile.unstrip
+
+# 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 ../src/unstrip -o testfile.unstrip $stripped $debugfile
+
+testrun ../src/elfcmp --hash-inexact $original testfile.unstrip
diff --git a/tests/run-unstrip-test2.sh b/tests/run-unstrip-test2.sh
new file mode 100755
index 0000000..44074c1
--- /dev/null
+++ b/tests/run-unstrip-test2.sh
@@ -0,0 +1,5 @@
+original=testfile11
+stripped=testfile15
+debugfile=testfile15.debug
+
+. $srcdir/run-unstrip-test.sh
diff --git a/tests/saridx.c b/tests/saridx.c
index 4abc892..d95777f 100644
--- a/tests/saridx.c
+++ b/tests/saridx.c
@@ -1,15 +1,27 @@
 /* Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1998.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #include <config.h>
 
diff --git a/tests/scnnames.c b/tests/scnnames.c
index de30312..4ced85c 100644
--- a/tests/scnnames.c
+++ b/tests/scnnames.c
@@ -1,15 +1,27 @@
-/* Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1998.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #include <config.h>
 
@@ -29,6 +41,12 @@
   size_t strndx;
   Elf_Scn *scn;
 
+  if (argc < 2)
+    {
+      puts ("missing parameter");
+      exit (1);
+    }
+
   fd = open (argv[1], O_RDONLY);
   if (fd == -1)
     {
diff --git a/tests/sectiondump.c b/tests/sectiondump.c
index f19a215..3fdde54 100644
--- a/tests/sectiondump.c
+++ b/tests/sectiondump.c
@@ -1,15 +1,27 @@
 /* Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1998.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #include <config.h>
 
diff --git a/tests/sha1-tst.c b/tests/sha1-tst.c
new file mode 100644
index 0000000..9ff8141
--- /dev/null
+++ b/tests/sha1-tst.c
@@ -0,0 +1,79 @@
+/* Copyright (C) 2008 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+   Written by Ulrich Drepper <drepper@redhat.com>, 2008.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#include <stdio.h>
+#include <string.h>
+
+#include <sha1.h>
+
+
+int
+main (void)
+{
+  char buf[1000];
+  int result = 0;
+
+  struct sha1_ctx ctx;
+  sha1_init_ctx (&ctx);
+  sha1_process_bytes ("abc", 3, &ctx);
+  sha1_finish_ctx (&ctx, buf);
+  static const char expected1[SHA1_DIGEST_SIZE] =
+    "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
+    "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d";
+  if (memcmp (buf, expected1, SHA1_DIGEST_SIZE) != 0)
+    {
+      puts ("test 1 failed");
+      result = 1;
+    }
+
+  sha1_init_ctx (&ctx);
+  sha1_process_bytes ("\
+abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", 56, &ctx);
+  sha1_finish_ctx (&ctx, buf);
+  static const char expected2[SHA1_DIGEST_SIZE] =
+    "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
+    "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1";
+  if (memcmp (buf, expected2, SHA1_DIGEST_SIZE) != 0)
+    {
+      puts ("test 2 failed");
+      result = 1;
+    }
+
+  sha1_init_ctx (&ctx);
+  memset (buf, 'a', sizeof (buf));
+  for (int i = 0; i < 1000; ++i)
+    sha1_process_bytes (buf, sizeof (buf), &ctx);
+  sha1_finish_ctx (&ctx, buf);
+  static const char expected3[SHA1_DIGEST_SIZE] =
+    "\x34\xaa\x97\x3c\xd4\xc4\xda\xa4\xf6\x1e"
+    "\xeb\x2b\xdb\xad\x27\x31\x65\x34\x01\x6f";
+  if (memcmp (buf, expected3, SHA1_DIGEST_SIZE) != 0)
+    {
+      puts ("test 3 failed");
+      result = 1;
+    }
+
+  return result;
+}
diff --git a/tests/show-abbrev.c b/tests/show-abbrev.c
index 7017932..75fddf5 100644
--- a/tests/show-abbrev.c
+++ b/tests/show-abbrev.c
@@ -1,21 +1,33 @@
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1998.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #include <config.h>
 
 #include <fcntl.h>
 #include <inttypes.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <stdio.h>
 #include <unistd.h>
 
@@ -53,7 +65,7 @@
 	    {
 	      size_t length;
 	      Dwarf_Abbrev *abbrev = dwarf_getabbrev (&die, offset, &length);
-	      if (abbrev == NULL)
+	      if (abbrev == NULL || abbrev == DWARF_END_ABBREV)
 		/* End of the list.  */
 		break;
 
diff --git a/tests/show-die-info.c b/tests/show-die-info.c
index d4f992f..19015ca 100644
--- a/tests/show-die-info.c
+++ b/tests/show-die-info.c
@@ -1,22 +1,34 @@
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1998.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #include <config.h>
 
 #include <dwarf.h>
 #include <inttypes.h>
 #include <libelf.h>
-#include <libdw.h>
+#include ELFUTILS_HEADER(dw)
 #include <fcntl.h>
 #include <stdio.h>
 #include <string.h>
@@ -65,13 +77,24 @@
   [DW_TAG_namelist_item] = "DW_TAG_namelist_item",
   [DW_TAG_packed_type] = "DW_TAG_packed_type",
   [DW_TAG_subprogram] = "DW_TAG_subprogram",
-  [DW_TAG_template_type_param] = "DW_TAG_template_type_param",
-  [DW_TAG_template_value_param] = "DW_TAG_template_value_param",
+  [DW_TAG_template_type_parameter] = "DW_TAG_template_type_parameter",
+  [DW_TAG_template_value_parameter] = "DW_TAG_template_value_parameter",
   [DW_TAG_thrown_type] = "DW_TAG_thrown_type",
   [DW_TAG_try_block] = "DW_TAG_try_block",
   [DW_TAG_variant_part] = "DW_TAG_variant_part",
   [DW_TAG_variable] = "DW_TAG_variable",
-  [DW_TAG_volatile_type] = "DW_TAG_volatile_type"
+  [DW_TAG_volatile_type] = "DW_TAG_volatile_type",
+  [DW_TAG_dwarf_procedure] = "DW_TAG_dwarf_procedure",
+  [DW_TAG_restrict_type] = "DW_TAG_restrict_type",
+  [DW_TAG_interface_type] = "DW_TAG_interface_type",
+  [DW_TAG_namespace] = "DW_TAG_namespace",
+  [DW_TAG_imported_module] = "DW_TAG_imported_module",
+  [DW_TAG_unspecified_type] = "DW_TAG_unspecified_type",
+  [DW_TAG_partial_unit] = "DW_TAG_partial_unit",
+  [DW_TAG_imported_unit] = "DW_TAG_imported_unit",
+  [DW_TAG_mutable_type] = "DW_TAG_mutable_type",
+  [DW_TAG_condition] = "DW_TAG_condition",
+  [DW_TAG_shared_type] = "DW_TAG_shared_type",
 };
 #define ntagnames (sizeof (tagnames) / sizeof (tagnames[0]))
 
@@ -113,7 +136,7 @@
   { DW_AT_prototyped, "prototyped" },
   { DW_AT_return_addr, "return_addr" },
   { DW_AT_start_scope, "start_scope" },
-  { DW_AT_stride_size, "stride_size" },
+  { DW_AT_bit_stride, "bit_stride" },
   { DW_AT_upper_bound, "upper_bound" },
   { DW_AT_abstract_origin, "abstract_origin" },
   { DW_AT_accessibility, "accessibility" },
@@ -134,7 +157,7 @@
   { DW_AT_friend, "friend" },
   { DW_AT_identifier_case, "identifier_case" },
   { DW_AT_macro_info, "macro_info" },
-  { DW_AT_namelist_items, "namelist_items" },
+  { DW_AT_namelist_item, "namelist_item" },
   { DW_AT_priority, "priority" },
   { DW_AT_segment, "segment" },
   { DW_AT_specification, "specification" },
@@ -144,6 +167,33 @@
   { DW_AT_variable_parameter, "variable_parameter" },
   { DW_AT_virtuality, "virtuality" },
   { DW_AT_vtable_elem_location, "vtable_elem_location" },
+  { DW_AT_allocated, "allocated" },
+  { DW_AT_associated, "associated" },
+  { DW_AT_data_location, "data_location" },
+  { DW_AT_byte_stride, "byte_stride" },
+  { DW_AT_entry_pc, "entry_pc" },
+  { DW_AT_use_UTF8, "use_UTF8" },
+  { DW_AT_extension, "extension" },
+  { DW_AT_ranges, "ranges" },
+  { DW_AT_trampoline, "trampoline" },
+  { DW_AT_call_column, "call_column" },
+  { DW_AT_call_file, "call_file" },
+  { DW_AT_call_line, "call_line" },
+  { DW_AT_description, "description" },
+  { DW_AT_binary_scale, "binary_scale" },
+  { DW_AT_decimal_scale, "decimal_scale" },
+  { DW_AT_small, "small" },
+  { DW_AT_decimal_sign, "decimal_sign" },
+  { DW_AT_digit_count, "digit_count" },
+  { DW_AT_picture_string, "picture_string" },
+  { DW_AT_mutable, "mutable" },
+  { DW_AT_threads_scaled, "threads_scaled" },
+  { DW_AT_explicit, "explicit" },
+  { DW_AT_object_pointer, "object_pointer" },
+  { DW_AT_endianity, "endianity" },
+  { DW_AT_elemental, "elemental" },
+  { DW_AT_pure, "pure" },
+  { DW_AT_recursive, "recursive" },
   { DW_AT_MIPS_fde, "MIPS_fde" },
   { DW_AT_MIPS_loop_begin, "MIPS_loop_begin" },
   { DW_AT_MIPS_tail_loop_begin, "MIPS_tail_loop_begin" },
@@ -166,7 +216,7 @@
   { DW_AT_mac_info, "mac_info" },
   { DW_AT_src_coords, "src_coords" },
   { DW_AT_body_begin, "body_begin" },
-  { DW_AT_body_end, "body_end" }
+  { DW_AT_body_end, "body_end" },
 };
 #define nattrs (sizeof (attrs) / sizeof (attrs[0]))
 
diff --git a/tests/showptable.c b/tests/showptable.c
index afc1f26..bae17f3 100644
--- a/tests/showptable.c
+++ b/tests/showptable.c
@@ -1,15 +1,27 @@
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1998.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #include <config.h>
 
@@ -28,6 +40,12 @@
   GElf_Ehdr ehdr;
   int cnt;
 
+  if (argc < 2)
+    {
+      puts ("missing parameter");
+      exit (1);
+    }
+
   fd = open (argv[1], O_RDONLY);
   if (fd == -1)
     {
diff --git a/tests/test-nlist.c b/tests/test-nlist.c
index 40eb320..f73955f 100644
--- a/tests/test-nlist.c
+++ b/tests/test-nlist.c
@@ -1,15 +1,27 @@
-/* Copyright (C) 2000, 2002 Red Hat, Inc.
+/* Copyright (C) 2000, 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2000.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #include <nlist.h>
 #include <stdio.h>
@@ -28,7 +40,7 @@
 }
 
 int
-main (int argc, char *argv[])
+main (int argc, char *argv[] __attribute__ ((unused)))
 {
   struct nlist nl[6] =
   {
diff --git a/tests/test-subr.sh b/tests/test-subr.sh
new file mode 100644
index 0000000..cb34b93
--- /dev/null
+++ b/tests/test-subr.sh
@@ -0,0 +1,112 @@
+#! /bin/sh
+# Copyright (C) 2005, 2007, 2008 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+
+# 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
+
+#LC_ALL=C
+#export LC_ALL
+
+remove_files=
+trap 'rm -f $remove_files' 0
+
+tempfiles()
+{
+  remove_files="$remove_files $*"
+}
+
+testfiles()
+{
+  for file; do
+    bunzip2 -c $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"\
+  "$@"
+}
+
+installed_testrun()
+{
+  program="$1"
+  shift
+  case "$program" in
+  ./*)
+    if [ "x$elfutils_tests_rpath" != xno ]; then
+      echo >&2 installcheck not possible with --enable-tests-rpath
+      exit 77
+    fi
+    ;;
+  ../*)
+    program=${bindir}/`program_transform ${program##*/}`
+    ;;
+  esac
+  if [ "${libdir}" != /usr/lib ] && [ "${libdir}" != /usr/lib64 ]; then
+    LD_LIBRARY_PATH="${libdir}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
+    $program ${1+"$@"}
+  else
+    $program ${1+"$@"}
+  fi
+}
+
+program_transform()
+{
+  echo "$*" | sed "${program_transform_name}"
+}
diff --git a/tests/test-wrapper.sh b/tests/test-wrapper.sh
new file mode 100755
index 0000000..3477e38
--- /dev/null
+++ b/tests/test-wrapper.sh
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2005 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils 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; version 2 of the License.
+#
+# Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents.  No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package.  Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+
+# 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
+
+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${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
+    export LD_LIBRARY_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${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
+    export LD_LIBRARY_PATH
+  fi
+  ;;
+esac
+
+exec "$@"
diff --git a/tests/testfile14.bz2 b/tests/testfile14.bz2
new file mode 100644
index 0000000..ac7c69e
--- /dev/null
+++ b/tests/testfile14.bz2
Binary files differ
diff --git a/tests/testfile15.bz2 b/tests/testfile15.bz2
new file mode 100644
index 0000000..e75f457
--- /dev/null
+++ b/tests/testfile15.bz2
Binary files differ
diff --git a/tests/testfile15.debug.bz2 b/tests/testfile15.debug.bz2
new file mode 100644
index 0000000..5c86900
--- /dev/null
+++ b/tests/testfile15.debug.bz2
Binary files differ
diff --git a/tests/testfile16.bz2 b/tests/testfile16.bz2
new file mode 100644
index 0000000..4d7160c
--- /dev/null
+++ b/tests/testfile16.bz2
Binary files differ
diff --git a/tests/testfile16.debug.bz2 b/tests/testfile16.debug.bz2
new file mode 100644
index 0000000..f02a972
--- /dev/null
+++ b/tests/testfile16.debug.bz2
Binary files differ
diff --git a/tests/testfile17.bz2 b/tests/testfile17.bz2
new file mode 100644
index 0000000..5a12320
--- /dev/null
+++ b/tests/testfile17.bz2
Binary files differ
diff --git a/tests/testfile17.debug.bz2 b/tests/testfile17.debug.bz2
new file mode 100644
index 0000000..86a76ab
--- /dev/null
+++ b/tests/testfile17.debug.bz2
Binary files differ
diff --git a/tests/testfile18.bz2 b/tests/testfile18.bz2
new file mode 100644
index 0000000..8b5326c
--- /dev/null
+++ b/tests/testfile18.bz2
Binary files differ
diff --git a/tests/testfile19.bz2 b/tests/testfile19.bz2
new file mode 100644
index 0000000..f3e6512
--- /dev/null
+++ b/tests/testfile19.bz2
Binary files differ
diff --git a/tests/testfile19.index.bz2 b/tests/testfile19.index.bz2
new file mode 100644
index 0000000..c0a0a7a
--- /dev/null
+++ b/tests/testfile19.index.bz2
Binary files differ
diff --git a/tests/testfile20.bz2 b/tests/testfile20.bz2
new file mode 100644
index 0000000..a379f6b
--- /dev/null
+++ b/tests/testfile20.bz2
Binary files differ
diff --git a/tests/testfile20.index.bz2 b/tests/testfile20.index.bz2
new file mode 100644
index 0000000..08dedaf
--- /dev/null
+++ b/tests/testfile20.index.bz2
Binary files differ
diff --git a/tests/testfile21.bz2 b/tests/testfile21.bz2
new file mode 100644
index 0000000..bab7e6d
--- /dev/null
+++ b/tests/testfile21.bz2
Binary files differ
diff --git a/tests/testfile21.index.bz2 b/tests/testfile21.index.bz2
new file mode 100644
index 0000000..5192219
--- /dev/null
+++ b/tests/testfile21.index.bz2
Binary files differ
diff --git a/tests/testfile22.bz2 b/tests/testfile22.bz2
new file mode 100644
index 0000000..8c26270
--- /dev/null
+++ b/tests/testfile22.bz2
Binary files differ
diff --git a/tests/testfile23.bz2 b/tests/testfile23.bz2
new file mode 100644
index 0000000..cf0ce55
--- /dev/null
+++ b/tests/testfile23.bz2
Binary files differ
diff --git a/tests/testfile24.bz2 b/tests/testfile24.bz2
new file mode 100644
index 0000000..2320acb
--- /dev/null
+++ b/tests/testfile24.bz2
Binary files differ
diff --git a/tests/testfile25.bz2 b/tests/testfile25.bz2
new file mode 100644
index 0000000..51e0421
--- /dev/null
+++ b/tests/testfile25.bz2
Binary files differ
diff --git a/tests/testfile26.bz2 b/tests/testfile26.bz2
new file mode 100644
index 0000000..1f86285
--- /dev/null
+++ b/tests/testfile26.bz2
Binary files differ
diff --git a/tests/testfile27.bz2 b/tests/testfile27.bz2
new file mode 100644
index 0000000..9d06cd9
--- /dev/null
+++ b/tests/testfile27.bz2
Binary files differ
diff --git a/tests/testfile28.bz2 b/tests/testfile28.bz2
new file mode 100644
index 0000000..ca0dff3
--- /dev/null
+++ b/tests/testfile28.bz2
Binary files differ
diff --git a/tests/testfile28.rdwr.bz2 b/tests/testfile28.rdwr.bz2
new file mode 100644
index 0000000..4c65848
--- /dev/null
+++ b/tests/testfile28.rdwr.bz2
Binary files differ
diff --git a/tests/testfile29.bz2 b/tests/testfile29.bz2
new file mode 100644
index 0000000..b46451b
--- /dev/null
+++ b/tests/testfile29.bz2
Binary files differ
diff --git a/tests/testfile29.rdwr.bz2 b/tests/testfile29.rdwr.bz2
new file mode 100644
index 0000000..42eadc7
--- /dev/null
+++ b/tests/testfile29.rdwr.bz2
Binary files differ
diff --git a/tests/testfile30.bz2 b/tests/testfile30.bz2
new file mode 100644
index 0000000..9ee93c0
--- /dev/null
+++ b/tests/testfile30.bz2
Binary files differ
diff --git a/tests/testfile31.bz2 b/tests/testfile31.bz2
new file mode 100644
index 0000000..73451d2
--- /dev/null
+++ b/tests/testfile31.bz2
Binary files differ
diff --git a/tests/testfile32.bz2 b/tests/testfile32.bz2
new file mode 100644
index 0000000..7e3c73e
--- /dev/null
+++ b/tests/testfile32.bz2
Binary files differ
diff --git a/tests/testfile33.bz2 b/tests/testfile33.bz2
new file mode 100644
index 0000000..f3dbc73
--- /dev/null
+++ b/tests/testfile33.bz2
Binary files differ
diff --git a/tests/testfile34.bz2 b/tests/testfile34.bz2
new file mode 100644
index 0000000..a417fcb
--- /dev/null
+++ b/tests/testfile34.bz2
Binary files differ
diff --git a/tests/testfile35.bz2 b/tests/testfile35.bz2
new file mode 100644
index 0000000..b591301
--- /dev/null
+++ b/tests/testfile35.bz2
Binary files differ
diff --git a/tests/testfile35.debug.bz2 b/tests/testfile35.debug.bz2
new file mode 100644
index 0000000..f191862
--- /dev/null
+++ b/tests/testfile35.debug.bz2
Binary files differ
diff --git a/tests/testfile36.bz2 b/tests/testfile36.bz2
new file mode 100644
index 0000000..e912a19
--- /dev/null
+++ b/tests/testfile36.bz2
Binary files differ
diff --git a/tests/testfile36.debug.bz2 b/tests/testfile36.debug.bz2
new file mode 100644
index 0000000..76aca42
--- /dev/null
+++ b/tests/testfile36.debug.bz2
Binary files differ
diff --git a/tests/testfile37.bz2 b/tests/testfile37.bz2
new file mode 100644
index 0000000..254ce32
--- /dev/null
+++ b/tests/testfile37.bz2
Binary files differ
diff --git a/tests/testfile37.debug.bz2 b/tests/testfile37.debug.bz2
new file mode 100644
index 0000000..74e46a8
--- /dev/null
+++ b/tests/testfile37.debug.bz2
Binary files differ
diff --git a/tests/testfile38.bz2 b/tests/testfile38.bz2
new file mode 100644
index 0000000..42adb77
--- /dev/null
+++ b/tests/testfile38.bz2
Binary files differ
diff --git a/tests/testfile39.bz2 b/tests/testfile39.bz2
new file mode 100644
index 0000000..42d0fbc
--- /dev/null
+++ b/tests/testfile39.bz2
Binary files differ
diff --git a/tests/testfile40.bz2 b/tests/testfile40.bz2
new file mode 100644
index 0000000..ad41985
--- /dev/null
+++ b/tests/testfile40.bz2
Binary files differ
diff --git a/tests/testfile40.debug.bz2 b/tests/testfile40.debug.bz2
new file mode 100644
index 0000000..2eec4d7
--- /dev/null
+++ b/tests/testfile40.debug.bz2
Binary files differ
diff --git a/tests/testfile41.bz2 b/tests/testfile41.bz2
new file mode 100644
index 0000000..f9bf5a4
--- /dev/null
+++ b/tests/testfile41.bz2
Binary files differ
diff --git a/tests/testfile42.bz2 b/tests/testfile42.bz2
new file mode 100644
index 0000000..2530aba
--- /dev/null
+++ b/tests/testfile42.bz2
Binary files differ
diff --git a/tests/testfile43.bz2 b/tests/testfile43.bz2
new file mode 100644
index 0000000..c99db24
--- /dev/null
+++ b/tests/testfile43.bz2
Binary files differ
diff --git a/tests/testfile44.S.bz2 b/tests/testfile44.S.bz2
new file mode 100644
index 0000000..fb401e5
--- /dev/null
+++ b/tests/testfile44.S.bz2
Binary files differ
diff --git a/tests/testfile44.expect.bz2 b/tests/testfile44.expect.bz2
new file mode 100644
index 0000000..9e50462
--- /dev/null
+++ b/tests/testfile44.expect.bz2
Binary files differ
diff --git a/tests/testfile45.S.bz2 b/tests/testfile45.S.bz2
new file mode 100644
index 0000000..58bb16b
--- /dev/null
+++ b/tests/testfile45.S.bz2
Binary files differ
diff --git a/tests/testfile45.expect.bz2 b/tests/testfile45.expect.bz2
new file mode 100644
index 0000000..2cf60b7
--- /dev/null
+++ b/tests/testfile45.expect.bz2
Binary files differ
diff --git a/tests/testfile46.bz2 b/tests/testfile46.bz2
new file mode 100644
index 0000000..db83b27
--- /dev/null
+++ b/tests/testfile46.bz2
Binary files differ
diff --git a/tests/testfile47.bz2 b/tests/testfile47.bz2
new file mode 100644
index 0000000..334bd6c
--- /dev/null
+++ b/tests/testfile47.bz2
Binary files differ
diff --git a/tests/testfile48.bz2 b/tests/testfile48.bz2
new file mode 100644
index 0000000..da0d9da
--- /dev/null
+++ b/tests/testfile48.bz2
Binary files differ
diff --git a/tests/testfile48.debug.bz2 b/tests/testfile48.debug.bz2
new file mode 100644
index 0000000..7b84c4c
--- /dev/null
+++ b/tests/testfile48.debug.bz2
Binary files differ
diff --git a/tests/testfile49.bz2 b/tests/testfile49.bz2
new file mode 100644
index 0000000..8741a6b
--- /dev/null
+++ b/tests/testfile49.bz2
Binary files differ
diff --git a/tests/update1.c b/tests/update1.c
index decb09b..6c038c9 100644
--- a/tests/update1.c
+++ b/tests/update1.c
@@ -1,16 +1,28 @@
 /* Test program for elf_update function.
-   Copyright (C) 2000, 2002 Red Hat, Inc.
+   Copyright (C) 2000, 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2000.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -25,7 +37,7 @@
 
 
 int
-main (int argc, char *argv[])
+main (int argc, char *argv[] __attribute__ ((unused)))
 {
   const char *fname = "xxx";
   int fd;
diff --git a/tests/update2.c b/tests/update2.c
index c595fba..330e731 100644
--- a/tests/update2.c
+++ b/tests/update2.c
@@ -1,16 +1,28 @@
 /* Test program for elf_update function.
-   Copyright (C) 2000, 2002 Red Hat, Inc.
+   Copyright (C) 2000, 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2000.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -25,7 +37,7 @@
 
 
 int
-main (int argc, char *argv[])
+main (int argc, char *argv[] __attribute__ ((unused)))
 {
   const char *fname = "xxx";
   int fd;
diff --git a/tests/update3.c b/tests/update3.c
index 06bc8ff..756d015 100644
--- a/tests/update3.c
+++ b/tests/update3.c
@@ -1,16 +1,28 @@
 /* Test program for elf_update function.
-   Copyright (C) 2000, 2002 Red Hat, Inc.
+   Copyright (C) 2000, 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2000.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -23,11 +35,11 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <libebl.h>
+#include ELFUTILS_HEADER(ebl)
 
 
 int
-main (int argc, char *argv[])
+main (int argc, char *argv[] __attribute__ ((unused)))
 {
   const char *fname = "xxx";
   int fd;
diff --git a/tests/update4.c b/tests/update4.c
index 17ef470..e426378 100644
--- a/tests/update4.c
+++ b/tests/update4.c
@@ -1,16 +1,28 @@
 /* Test program for elf_update function.
-   Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
+   Copyright (C) 2000, 2001, 2002, 2005 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2000.
 
-   This program is Open Source software; you can redistribute it and/or
-   modify it under the terms of the Open Software License version 1.0 as
-   published by the Open Source Initiative.
+   Red Hat elfutils 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; version 2 of the License.
 
-   You should have received a copy of the Open Software License along
-   with this program; if not, you may obtain a copy of the Open Software
-   License version 1.0 from http://www.opensource.org/licenses/osl.php or
-   by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-   3001 King Ranch Road, Ukiah, CA 95482.   */
+   Red Hat 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -24,11 +36,11 @@
 #include <string.h>
 #include <unistd.h>
 
-#include <libebl.h>
+#include ELFUTILS_HEADER(ebl)
 
 
 int
-main (int argc, char *argv[])
+main (int argc, char *argv[] __attribute__ ((unused)))
 {
   const char fname[] = "xxx";
   int fd;