Blame SOURCES/elfutils-0.174-dts.patch

2ba9b1
diff --git a/backends/Makefile.am b/backends/Makefile.am
2ba9b1
index 9d34042..3d85cde 100644
2ba9b1
--- a/backends/Makefile.am
2ba9b1
+++ b/backends/Makefile.am
2ba9b1
@@ -41,12 +41,38 @@ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a    \
2ba9b1
 	     libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a
2ba9b1
 noinst_LIBRARIES = $(libebl_pic)
2ba9b1
 noinst_DATA = $(libebl_pic:_pic.a=.so)
2ba9b1
+lib_LIBRARIES = libebl_static_pic.a
2ba9b1
 
2ba9b1
 
2ba9b1
 libelf = ../libelf/libelf.so
2ba9b1
 libdw = ../libdw/libdw.so
2ba9b1
 libeu = ../lib/libeu.a
2ba9b1
 
2ba9b1
+# The following is minimal set of backends that we link with libdw to
2ba9b1
+# avoid dlopen. Note repeats files below because some backends reuse
2ba9b1
+# each others files.
2ba9b1
+static_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \
2ba9b1
+	     i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \
2ba9b1
+	     i386_initreg.c i386_unwind.c \
2ba9b1
+	     x86_64_init.c x86_64_symbol.c x86_64_corenote.c x86_64_cfi.c \
2ba9b1
+	     x86_64_retval.c x86_64_regs.c x86_64_syscall.c \
2ba9b1
+	     x86_64_initreg.c x86_64_unwind.c x32_corenote.c \
2ba9b1
+	     ia64_init.c ia64_symbol.c ia64_regs.c ia64_retval.c \
2ba9b1
+	     aarch64_init.c aarch64_regs.c aarch64_symbol.c   \
2ba9b1
+	     aarch64_corenote.c aarch64_retval.c aarch64_cfi.c \
2ba9b1
+	     aarch64_initreg.c aarch64_unwind.c \
2ba9b1
+	     ppc_init.c ppc_symbol.c ppc_retval.c ppc_regs.c \
2ba9b1
+	     ppc_corenote.c ppc_auxv.c ppc_attrs.c ppc_syscall.c \
2ba9b1
+	     ppc_cfi.c ppc_initreg.c \
2ba9b1
+	     ppc64_init.c ppc64_symbol.c ppc64_retval.c ppc64_corenote.c \
2ba9b1
+	     ppc64_resolve_sym.c ppc64_unwind.c \
2ba9b1
+	     s390_init.c s390_symbol.c s390_regs.c s390_retval.c \
2ba9b1
+	     s390_corenote.c s390x_corenote.c s390_cfi.c s390_initreg.c \
2ba9b1
+	     s390_unwind.c bpf_init.c bpf_regs.c bpf_symbol.c
2ba9b1
+
2ba9b1
+libebl_static_pic_a_SOURCES = $(static_SRCS)
2ba9b1
+am_libebl_static_pic_a_OBJECTS = $(static_SRCS:.c=.os)
2ba9b1
+
2ba9b1
 i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \
2ba9b1
 	    i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \
2ba9b1
 	    i386_initreg.c i386_unwind.c
2ba9b1
diff --git a/configure.ac b/configure.ac
2ba9b1
index da9f8cb..9decd61 100644
2ba9b1
--- a/configure.ac
2ba9b1
+++ b/configure.ac
2ba9b1
@@ -25,6 +25,12 @@ m4_ifndef([AC_PACKAGE_URL],
2ba9b1
                     [Define to home page for this package])
2ba9b1
           AC_SUBST([PACKAGE_URL], ["http://elfutils.org/"])])
2ba9b1
 
2ba9b1
+dnl Workaround for older autoconf < 2.64
2ba9b1
+m4_ifndef([AC_PACKAGE_URL],
2ba9b1
+         [AC_DEFINE([PACKAGE_URL], ["http://elfutils.org/"],
2ba9b1
+                    [Define to home page for this package])
2ba9b1
+          AC_SUBST([PACKAGE_URL], ["http://elfutils.org/"])])
2ba9b1
+
2ba9b1
 # We want eu- as default program prefix if none was given by the user.
2ba9b1
 # But if the user explicitly provided --program-prefix="" then pretend
2ba9b1
 # it wasn't set at all (NONE). We want to test this really early before
2ba9b1
diff --git a/libasm/Makefile.am b/libasm/Makefile.am
2ba9b1
index 19fef50..fcc7ffc 100644
2ba9b1
--- a/libasm/Makefile.am
2ba9b1
+++ b/libasm/Makefile.am
2ba9b1
@@ -38,6 +38,7 @@ noinst_LIBRARIES = libasm_pic.a
2ba9b1
 noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
2ba9b1
 pkginclude_HEADERS = libasm.h
2ba9b1
 
2ba9b1
+libasm_a_CFLAGS = -fPIC -fvisibility=hidden $(AM_CFLAGS)
2ba9b1
 libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \
2ba9b1
 		   asm_getelf.c asm_newscn.c asm_newscn_ingrp.c \
2ba9b1
 		   asm_newsubscn.c asm_newsym.c asm_newcomsym.c \
2ba9b1
diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
2ba9b1
index 4c8778d..f0a1cb8 100644
2ba9b1
--- a/libcpu/Makefile.am
2ba9b1
+++ b/libcpu/Makefile.am
2ba9b1
@@ -36,9 +36,11 @@ LEX_OUTPUT_ROOT = lex.$(
2ba9b1
 AM_YFLAGS = -p$(
2ba9b1
 
2ba9b1
 noinst_LIBRARIES = libcpu_i386.a libcpu_x86_64.a
2ba9b1
+lib_LIBRARIES = libcpu_static_pic.a
2ba9b1
 
2ba9b1
 libcpu_i386_a_SOURCES = i386_disasm.c i386_dis.h
2ba9b1
 libcpu_x86_64_a_SOURCES = x86_64_disasm.c x86_64_dis.h
2ba9b1
+libcpu_static_pic_a_SOURCES = $(libcpu_i386_a_SOURCES) $(libcpu_x86_64_a_SOURCES)
2ba9b1
 
2ba9b1
 i386_gendis_SOURCES = i386_gendis.c i386_lex.l i386_parse.y
2ba9b1
 
2ba9b1
@@ -48,6 +50,8 @@ x86_64_disasm.o: x86_64.mnemonics $(srcdir)/x86_64_dis.h
2ba9b1
 noinst_LIBRARIES += libcpu_bpf.a
2ba9b1
 libcpu_bpf_a_SOURCES = bpf_disasm.c
2ba9b1
 libcpu_bpf_a_CFLAGS = $(AM_CFLAGS) -Wno-format-nonliteral
2ba9b1
+libcpu_static_pic_a_SOURCES += $(libcpu_bpf_a_SOURCES)
2ba9b1
+bpf_disasm_CFLAGS = -fPIC -Wno-format-nonliteral
2ba9b1
 
2ba9b1
 %_defs: $(srcdir)/defs/i386
2ba9b1
 	$(AM_V_GEN)m4 -D$* -DDISASSEMBLER $< > $@T
2ba9b1
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
2ba9b1
index 7a3d532..166e37c 100644
2ba9b1
--- a/libdw/Makefile.am
2ba9b1
+++ b/libdw/Makefile.am
2ba9b1
@@ -35,12 +35,13 @@ AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdwelf
2ba9b1
 VERSION = 1
2ba9b1
 
2ba9b1
 lib_LIBRARIES = libdw.a
2ba9b1
-noinst_LIBRARIES = libdw_pic.a
2ba9b1
-noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
2ba9b1
+noinst_LIBRARIES = libdw_pic.a libdw_static_pic.a
2ba9b1
+noinst_PROGRAMS = libdw.so
2ba9b1
 
2ba9b1
 include_HEADERS = dwarf.h
2ba9b1
 pkginclude_HEADERS = libdw.h known-dwarf.h
2ba9b1
 
2ba9b1
+libdw_a_CFLAGS = -fPIC -fvisibility=hidden $(AM_CFLAGS)
2ba9b1
 libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \
2ba9b1
 		  dwarf_getpubnames.c dwarf_getabbrev.c dwarf_tag.c \
2ba9b1
 		  dwarf_error.c dwarf_nextcu.c dwarf_diename.c dwarf_offdie.c \
2ba9b1
@@ -94,6 +95,25 @@ libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \
2ba9b1
 		  libdw_find_split_unit.c dwarf_cu_info.c \
2ba9b1
 		  dwarf_next_lines.c
2ba9b1
 
2ba9b1
+# Minimal library with symbols needed by those libebl backends that we
2ba9b1
+# ship statically.  This is so that e.g. strip doesn't end up bringing
2ba9b1
+# in the whole of libdw, and depending on libbz2, liblzma, etc.
2ba9b1
+libdw_static_pic_a_SOURCES = libdw_form.c dwarf_child.c dwarf_attr.c \
2ba9b1
+		dwarf_attr_integrate.c dwarf_formref_die.c dwarf_error.c \
2ba9b1
+		dwarf_tag.c dwarf_formref.c \
2ba9b1
+		dwarf_abbrev_hash.c dwarf_sig8_hash.c \
2ba9b1
+		dwarf_formudata.c libdw_findcu.c dwarf_offdie.c \
2ba9b1
+		dwarf_getabbrev.c dwarf_nextcu.c libdw_alloc.c \
2ba9b1
+		dwarf_hasattr_integrate.c dwarf_hasattr.c \
2ba9b1
+		dwarf_aggregate_size.c dwarf_siblingof.c dwarf_formsdata.c \
2ba9b1
+		dwarf_srclang.c dwarf_formflag.c dwarf_diecu.c \
2ba9b1
+		dwarf_bytesize.c dwarf_bitsize.c dwarf_peel_type.c \
2ba9b1
+		dwarf_default_lower_bound.c libdw_find_split_unit.c \
2ba9b1
+		dwarf_getalt.c dwarf_haschildren.c \
2ba9b1
+		dwarf_begin.c dwarf_begin_elf.c dwarf_end.c frame-cache.c \
2ba9b1
+		dwarf_get_units.c dwarf_formstring.c \
2ba9b1
+		../libdwelf/dwelf_dwarf_gnu_debugaltlink.c
2ba9b1
+
2ba9b1
 if MAINTAINER_MODE
2ba9b1
 BUILT_SOURCES = $(srcdir)/known-dwarf.h
2ba9b1
 MAINTAINERCLEANFILES = $(srcdir)/known-dwarf.h
2ba9b1
@@ -104,9 +124,12 @@ endif
2ba9b1
 
2ba9b1
 libdw_pic_a_SOURCES =
2ba9b1
 am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
2ba9b1
+am_libdw_static_pic_a_OBJECTS = $(libdw_static_pic_a_SOURCES:.c=.os)
2ba9b1
 
2ba9b1
 libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \
2ba9b1
-	  ../libdwfl/libdwfl_pic.a ../libebl/libebl.a
2ba9b1
+	  ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
2ba9b1
+	  ../backends/libebl_static_pic.a \
2ba9b1
+	  ../libcpu/libcpu_static_pic.a
2ba9b1
 libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
2ba9b1
 libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS)
2ba9b1
 libdw_so_SOURCES =
2ba9b1
diff --git a/libdwelf/Makefile.am b/libdwelf/Makefile.am
2ba9b1
index 7ca767a..b526b7c 100644
2ba9b1
--- a/libdwelf/Makefile.am
2ba9b1
+++ b/libdwelf/Makefile.am
2ba9b1
@@ -39,6 +39,7 @@ noinst_LIBRARIES = libdwelf.a libdwelf_pic.a
2ba9b1
 pkginclude_HEADERS = libdwelf.h
2ba9b1
 noinst_HEADERS = libdwelfP.h
2ba9b1
 
2ba9b1
+libdwelf_a_CFLAGS = -fPIC -fvisibility=hidden $(AM_CFLAGS)
2ba9b1
 libdwelf_a_SOURCES = dwelf_elf_gnu_debuglink.c dwelf_dwarf_gnu_debugaltlink.c \
2ba9b1
 		     dwelf_elf_gnu_build_id.c dwelf_scn_gnu_compressed_size.c \
2ba9b1
 		     dwelf_strtab.c
2ba9b1
diff --git a/libdwfl/Makefile.am b/libdwfl/Makefile.am
2ba9b1
index 89ca92e..d9d13b2 100644
2ba9b1
--- a/libdwfl/Makefile.am
2ba9b1
+++ b/libdwfl/Makefile.am
2ba9b1
@@ -39,6 +39,7 @@ noinst_LIBRARIES += libdwfl_pic.a
2ba9b1
 
2ba9b1
 pkginclude_HEADERS = libdwfl.h
2ba9b1
 
2ba9b1
+libdwfl_a_CFLAGS = -fPIC -fvisibility=hidden $(AM_CFLAGS)
2ba9b1
 libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c dwfl_version.c \
2ba9b1
 		    dwfl_module.c dwfl_report_elf.c relocate.c \
2ba9b1
 		    dwfl_module_build_id.c dwfl_module_report_build_id.c \
2ba9b1
diff --git a/libebl/Makefile.am b/libebl/Makefile.am
2ba9b1
index 737de6b..ecebdd0 100644
2ba9b1
--- a/libebl/Makefile.am
2ba9b1
+++ b/libebl/Makefile.am
2ba9b1
@@ -56,6 +56,7 @@ gen_SOURCES = eblopenbackend.c eblclosebackend.c \
2ba9b1
 	      eblunwind.c eblresolvesym.c eblcheckreloctargettype.c \
2ba9b1
 	      ebl_data_marker_symbol.c
2ba9b1
 
2ba9b1
+libebl_a_CFLAGS = -fvisibility=hidden $(AM_CFLAGS)
2ba9b1
 libebl_a_SOURCES = $(gen_SOURCES)
2ba9b1
 
2ba9b1
 noinst_HEADERS = libeblP.h ebl-hooks.h
2ba9b1
diff --git a/libebl/eblclosebackend.c b/libebl/eblclosebackend.c
2ba9b1
index 67fbdfe..501e5c7 100644
2ba9b1
--- a/libebl/eblclosebackend.c
2ba9b1
+++ b/libebl/eblclosebackend.c
2ba9b1
@@ -44,10 +44,6 @@ ebl_closebackend (Ebl *ebl)
2ba9b1
       /* Run the destructor.  */
2ba9b1
       ebl->destr (ebl);
2ba9b1
 
2ba9b1
-      /* Close the dynamically loaded object.  */
2ba9b1
-      if (ebl->dlhandle != NULL)
2ba9b1
-	(void) dlclose (ebl->dlhandle);
2ba9b1
-
2ba9b1
       /* Free the resources.  */
2ba9b1
       free (ebl);
2ba9b1
     }
2ba9b1
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
2ba9b1
index f5b3de2..b04768f 100644
2ba9b1
--- a/libebl/eblopenbackend.c
2ba9b1
+++ b/libebl/eblopenbackend.c
2ba9b1
@@ -41,6 +41,14 @@
2ba9b1
 #include <system.h>
2ba9b1
 #include <libeblP.h>
2ba9b1
 
2ba9b1
+const char *i386_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen);
2ba9b1
+const char *x86_64_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen);
2ba9b1
+const char *ppc_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen);
2ba9b1
+const char *ppc64_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen);
2ba9b1
+const char *ia64_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen);
2ba9b1
+const char *s390_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen);
2ba9b1
+const char *aarch64_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen);
2ba9b1
+const char *bpf_init (Elf *elf, GElf_Half machine, Ebl *eh, size_t ehlen);
2ba9b1
 
2ba9b1
 /* This table should contain the complete list of architectures as far
2ba9b1
    as the ELF specification is concerned.  */
2ba9b1
@@ -48,7 +56,7 @@
2ba9b1
    arrays to avoid relocations.  */
2ba9b1
 static const struct
2ba9b1
 {
2ba9b1
-  const char *dsoname;
2ba9b1
+  ebl_bhinit_t initptr;
2ba9b1
   const char *emulation;
2ba9b1
   const char *prefix;
2ba9b1
   int prefix_len;
2ba9b1
@@ -57,84 +65,84 @@ static const struct
2ba9b1
   int data;
2ba9b1
 } machines[] =
2ba9b1
 {
2ba9b1
-  { "i386", "elf_i386", "i386", 4, EM_386, ELFCLASS32, ELFDATA2LSB },
2ba9b1
-  { "ia64", "elf_ia64", "ia64", 4, EM_IA_64, ELFCLASS64, ELFDATA2LSB },
2ba9b1
-  { "alpha", "elf_alpha", "alpha", 5, EM_ALPHA, ELFCLASS64, ELFDATA2LSB },
2ba9b1
-  { "x86_64", "elf_x86_64", "x86_64", 6, EM_X86_64, ELFCLASS64, ELFDATA2LSB },
2ba9b1
-  { "ppc", "elf_ppc", "ppc", 3, EM_PPC, ELFCLASS32, ELFDATA2MSB },
2ba9b1
-  { "ppc64", "elf_ppc64", "ppc64", 5, EM_PPC64, ELFCLASS64, ELFDATA2MSB },
2ba9b1
-  { "tilegx", "elf_tilegx", "tilegx", 6, EM_TILEGX, ELFCLASS64, ELFDATA2LSB },
2ba9b1
+  { i386_init, "elf_i386", "i386", 4, EM_386, ELFCLASS32, ELFDATA2LSB },
2ba9b1
+  { ia64_init, "elf_ia64", "ia64", 4, EM_IA_64, ELFCLASS64, ELFDATA2LSB },
2ba9b1
+  { NULL, "elf_alpha", "alpha", 5, EM_ALPHA, ELFCLASS64, ELFDATA2LSB },
2ba9b1
+  { x86_64_init, "elf_x86_64", "x86_64", 6, EM_X86_64, ELFCLASS64, ELFDATA2LSB },
2ba9b1
+  { ppc_init, "elf_ppc", "ppc", 3, EM_PPC, ELFCLASS32, ELFDATA2MSB },
2ba9b1
+  { ppc64_init, "elf_ppc64", "ppc64", 5, EM_PPC64, ELFCLASS64, ELFDATA2MSB },
2ba9b1
+  { NULL, "elf_tilegx", "tilegx", 6, EM_TILEGX, ELFCLASS64, ELFDATA2LSB },
2ba9b1
   // XXX class and machine fields need to be filled in for all archs.
2ba9b1
-  { "sh", "elf_sh", "sh", 2, EM_SH, 0, 0 },
2ba9b1
-  { "arm", "ebl_arm", "arm", 3, EM_ARM, 0, 0 },
2ba9b1
-  { "sparc", "elf_sparcv9", "sparc", 5, EM_SPARCV9, 0, 0 },
2ba9b1
-  { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
2ba9b1
-  { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
2ba9b1
-  { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 },
2ba9b1
-
2ba9b1
-  { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
2ba9b1
-  { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB },
2ba9b1
-  { "m88k", "elf_m88k", "m88k", 4, EM_88K, 0, 0 },
2ba9b1
-  { "i860", "elf_i860", "i860", 4, EM_860, 0, 0 },
2ba9b1
-  { "s370", "ebl_s370", "s370", 4, EM_S370, 0, 0 },
2ba9b1
-  { "parisc", "elf_parisc", "parisc", 6, EM_PARISC, 0, 0 },
2ba9b1
-  { "vpp500", "elf_vpp500", "vpp500", 5, EM_VPP500, 0, 0 },
2ba9b1
-  { "sparc", "elf_v8plus", "v8plus", 6, EM_SPARC32PLUS, 0, 0 },
2ba9b1
-  { "i960", "elf_i960", "i960", 4, EM_960, 0, 0 },
2ba9b1
-  { "v800", "ebl_v800", "v800", 4, EM_V800, 0, 0 },
2ba9b1
-  { "fr20", "ebl_fr20", "fr20", 4, EM_FR20, 0, 0 },
2ba9b1
-  { "rh32", "ebl_rh32", "rh32", 4, EM_RH32, 0, 0 },
2ba9b1
-  { "rce", "ebl_rce", "rce", 3, EM_RCE, 0, 0 },
2ba9b1
-  { "tricore", "elf_tricore", "tricore", 7, EM_TRICORE, 0, 0 },
2ba9b1
-  { "arc", "elf_arc", "arc", 3, EM_ARC, 0, 0 },
2ba9b1
-  { "h8", "elf_h8_300", "h8_300", 6, EM_H8_300, 0, 0 },
2ba9b1
-  { "h8", "elf_h8_300h", "h8_300h", 6, EM_H8_300H, 0, 0 },
2ba9b1
-  { "h8", "elf_h8s", "h8s", 6, EM_H8S, 0, 0 },
2ba9b1
-  { "h8", "elf_h8_500", "h8_500", 6, EM_H8_500, 0, 0 },
2ba9b1
-  { "coldfire", "elf_coldfire", "coldfire", 8, EM_COLDFIRE, 0, 0 },
2ba9b1
-  { "m68k", "elf_68hc12", "68hc12", 6, EM_68HC12, 0, 0 },
2ba9b1
-  { "mma", "elf_mma", "mma", 3, EM_MMA, 0, 0 },
2ba9b1
-  { "pcp", "elf_pcp", "pcp", 3, EM_PCP, 0, 0 },
2ba9b1
-  { "ncpu", "elf_ncpu", "ncpu", 4, EM_NCPU, 0, 0 },
2ba9b1
-  { "ndr1", "elf_ndr1", "ndr1", 4, EM_NDR1, 0, 0 },
2ba9b1
-  { "starcore", "elf_starcore", "starcore", 8, EM_STARCORE, 0, 0 },
2ba9b1
-  { "me16", "elf_me16", "em16", 4, EM_ME16, 0, 0 },
2ba9b1
-  { "st100", "elf_st100", "st100", 5, EM_ST100, 0, 0 },
2ba9b1
-  { "tinyj", "elf_tinyj", "tinyj", 5, EM_TINYJ, 0, 0 },
2ba9b1
-  { "pdsp", "elf_pdsp", "pdsp", 4, EM_PDSP, 0, 0 },
2ba9b1
-  { "fx66", "elf_fx66", "fx66", 4, EM_FX66, 0, 0 },
2ba9b1
-  { "st9plus", "elf_st9plus", "st9plus", 7, EM_ST9PLUS, 0, 0 },
2ba9b1
-  { "st7", "elf_st7", "st7", 3, EM_ST7, 0, 0 },
2ba9b1
-  { "m68k", "elf_68hc16", "68hc16", 6, EM_68HC16, 0, 0 },
2ba9b1
-  { "m68k", "elf_68hc11", "68hc11", 6, EM_68HC11, 0, 0 },
2ba9b1
-  { "m68k", "elf_68hc08", "68hc08", 6, EM_68HC08, 0, 0 },
2ba9b1
-  { "m68k", "elf_68hc05", "68hc05", 6, EM_68HC05, 0, 0 },
2ba9b1
-  { "svx", "elf_svx", "svx", 3, EM_SVX, 0, 0 },
2ba9b1
-  { "st19", "elf_st19", "st19", 4, EM_ST19, 0, 0 },
2ba9b1
-  { "vax", "elf_vax", "vax", 3, EM_VAX, 0, 0 },
2ba9b1
-  { "cris", "elf_cris", "cris", 4, EM_CRIS, 0, 0 },
2ba9b1
-  { "javelin", "elf_javelin", "javelin", 7, EM_JAVELIN, 0, 0 },
2ba9b1
-  { "firepath", "elf_firepath", "firepath", 8, EM_FIREPATH, 0, 0 },
2ba9b1
-  { "zsp", "elf_zsp", "zsp", 3, EM_ZSP, 0, 0 },
2ba9b1
-  { "mmix", "elf_mmix", "mmix", 4, EM_MMIX, 0, 0 },
2ba9b1
-  { "hunay", "elf_huany", "huany", 5, EM_HUANY, 0, 0 },
2ba9b1
-  { "prism", "elf_prism", "prism", 5, EM_PRISM, 0, 0 },
2ba9b1
-  { "avr", "elf_avr", "avr", 3, EM_AVR, 0, 0 },
2ba9b1
-  { "fr30", "elf_fr30", "fr30", 4, EM_FR30, 0, 0 },
2ba9b1
-  { "dv10", "elf_dv10", "dv10", 4, EM_D10V, 0, 0 },
2ba9b1
-  { "dv30", "elf_dv30", "dv30", 4, EM_D30V, 0, 0 },
2ba9b1
-  { "v850", "elf_v850", "v850", 4, EM_V850, 0, 0 },
2ba9b1
-  { "m32r", "elf_m32r", "m32r", 4, EM_M32R, 0, 0 },
2ba9b1
-  { "mn10300", "elf_mn10300", "mn10300", 7, EM_MN10300, 0, 0 },
2ba9b1
-  { "mn10200", "elf_mn10200", "mn10200", 7, EM_MN10200, 0, 0 },
2ba9b1
-  { "pj", "elf_pj", "pj", 2, EM_PJ, 0, 0 },
2ba9b1
-  { "openrisc", "elf_openrisc", "openrisc", 8, EM_OPENRISC, 0, 0 },
2ba9b1
-  { "arc", "elf_arc_a5", "arc_a5", 6, EM_ARC_A5, 0, 0 },
2ba9b1
-  { "xtensa", "elf_xtensa", "xtensa", 6, EM_XTENSA, 0, 0 },
2ba9b1
-  { "aarch64", "elf_aarch64", "aarch64", 7, EM_AARCH64, ELFCLASS64, 0 },
2ba9b1
-  { "bpf", "elf_bpf", "bpf", 3, EM_BPF, 0, 0 },
2ba9b1
-  { "riscv", "elf_riscv", "riscv", 5, EM_RISCV, ELFCLASS64, ELFDATA2LSB },
2ba9b1
-  { "riscv", "elf_riscv", "riscv", 5, EM_RISCV, ELFCLASS32, ELFDATA2LSB },
2ba9b1
+  { NULL, "elf_sh", "sh", 2, EM_SH, 0, 0 },
2ba9b1
+  { NULL, "ebl_arm", "arm", 3, EM_ARM, 0, 0 },
2ba9b1
+  { NULL, "elf_sparcv9", "sparc", 5, EM_SPARCV9, 0, 0 },
2ba9b1
+  { NULL, "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
2ba9b1
+  { NULL, "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
2ba9b1
+  { s390_init, "ebl_s390", "s390", 4, EM_S390, 0, 0 },
2ba9b1
+
2ba9b1
+  { NULL, "elf_m32", "m32", 3, EM_M32, 0, 0 },
2ba9b1
+  { NULL, "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB },
2ba9b1
+  { NULL, "elf_m88k", "m88k", 4, EM_88K, 0, 0 },
2ba9b1
+  { NULL, "elf_i860", "i860", 4, EM_860, 0, 0 },
2ba9b1
+  { NULL, "ebl_s370", "s370", 4, EM_S370, 0, 0 },
2ba9b1
+  { NULL, "elf_parisc", "parisc", 6, EM_PARISC, 0, 0 },
2ba9b1
+  { NULL, "elf_vpp500", "vpp500", 5, EM_VPP500, 0, 0 },
2ba9b1
+  { NULL, "elf_v8plus", "v8plus", 6, EM_SPARC32PLUS, 0, 0 },
2ba9b1
+  { NULL, "elf_i960", "i960", 4, EM_960, 0, 0 },
2ba9b1
+  { NULL, "ebl_v800", "v800", 4, EM_V800, 0, 0 },
2ba9b1
+  { NULL, "ebl_fr20", "fr20", 4, EM_FR20, 0, 0 },
2ba9b1
+  { NULL, "ebl_rh32", "rh32", 4, EM_RH32, 0, 0 },
2ba9b1
+  { NULL, "ebl_rce", "rce", 3, EM_RCE, 0, 0 },
2ba9b1
+  { NULL, "elf_tricore", "tricore", 7, EM_TRICORE, 0, 0 },
2ba9b1
+  { NULL, "elf_arc", "arc", 3, EM_ARC, 0, 0 },
2ba9b1
+  { NULL, "elf_h8_300", "h8_300", 6, EM_H8_300, 0, 0 },
2ba9b1
+  { NULL, "elf_h8_300h", "h8_300h", 6, EM_H8_300H, 0, 0 },
2ba9b1
+  { NULL, "elf_h8s", "h8s", 6, EM_H8S, 0, 0 },
2ba9b1
+  { NULL, "elf_h8_500", "h8_500", 6, EM_H8_500, 0, 0 },
2ba9b1
+  { NULL, "elf_coldfire", "coldfire", 8, EM_COLDFIRE, 0, 0 },
2ba9b1
+  { NULL, "elf_68hc12", "68hc12", 6, EM_68HC12, 0, 0 },
2ba9b1
+  { NULL, "elf_mma", "mma", 3, EM_MMA, 0, 0 },
2ba9b1
+  { NULL, "elf_pcp", "pcp", 3, EM_PCP, 0, 0 },
2ba9b1
+  { NULL, "elf_ncpu", "ncpu", 4, EM_NCPU, 0, 0 },
2ba9b1
+  { NULL, "elf_ndr1", "ndr1", 4, EM_NDR1, 0, 0 },
2ba9b1
+  { NULL, "elf_starcore", "starcore", 8, EM_STARCORE, 0, 0 },
2ba9b1
+  { NULL, "elf_me16", "em16", 4, EM_ME16, 0, 0 },
2ba9b1
+  { NULL, "elf_st100", "st100", 5, EM_ST100, 0, 0 },
2ba9b1
+  { NULL, "elf_tinyj", "tinyj", 5, EM_TINYJ, 0, 0 },
2ba9b1
+  { NULL, "elf_pdsp", "pdsp", 4, EM_PDSP, 0, 0 },
2ba9b1
+  { NULL, "elf_fx66", "fx66", 4, EM_FX66, 0, 0 },
2ba9b1
+  { NULL, "elf_st9plus", "st9plus", 7, EM_ST9PLUS, 0, 0 },
2ba9b1
+  { NULL, "elf_st7", "st7", 3, EM_ST7, 0, 0 },
2ba9b1
+  { NULL, "elf_68hc16", "68hc16", 6, EM_68HC16, 0, 0 },
2ba9b1
+  { NULL, "elf_68hc11", "68hc11", 6, EM_68HC11, 0, 0 },
2ba9b1
+  { NULL, "elf_68hc08", "68hc08", 6, EM_68HC08, 0, 0 },
2ba9b1
+  { NULL, "elf_68hc05", "68hc05", 6, EM_68HC05, 0, 0 },
2ba9b1
+  { NULL, "elf_svx", "svx", 3, EM_SVX, 0, 0 },
2ba9b1
+  { NULL, "elf_st19", "st19", 4, EM_ST19, 0, 0 },
2ba9b1
+  { NULL, "elf_vax", "vax", 3, EM_VAX, 0, 0 },
2ba9b1
+  { NULL, "elf_cris", "cris", 4, EM_CRIS, 0, 0 },
2ba9b1
+  { NULL, "elf_javelin", "javelin", 7, EM_JAVELIN, 0, 0 },
2ba9b1
+  { NULL, "elf_firepath", "firepath", 8, EM_FIREPATH, 0, 0 },
2ba9b1
+  { NULL, "elf_zsp", "zsp", 3, EM_ZSP, 0, 0 },
2ba9b1
+  { NULL, "elf_mmix", "mmix", 4, EM_MMIX, 0, 0 },
2ba9b1
+  { NULL, "elf_huany", "huany", 5, EM_HUANY, 0, 0 },
2ba9b1
+  { NULL, "elf_prism", "prism", 5, EM_PRISM, 0, 0 },
2ba9b1
+  { NULL, "elf_avr", "avr", 3, EM_AVR, 0, 0 },
2ba9b1
+  { NULL, "elf_fr30", "fr30", 4, EM_FR30, 0, 0 },
2ba9b1
+  { NULL, "elf_dv10", "dv10", 4, EM_D10V, 0, 0 },
2ba9b1
+  { NULL, "elf_dv30", "dv30", 4, EM_D30V, 0, 0 },
2ba9b1
+  { NULL, "elf_v850", "v850", 4, EM_V850, 0, 0 },
2ba9b1
+  { NULL, "elf_m32r", "m32r", 4, EM_M32R, 0, 0 },
2ba9b1
+  { NULL, "elf_mn10300", "mn10300", 7, EM_MN10300, 0, 0 },
2ba9b1
+  { NULL, "elf_mn10200", "mn10200", 7, EM_MN10200, 0, 0 },
2ba9b1
+  { NULL, "elf_pj", "pj", 2, EM_PJ, 0, 0 },
2ba9b1
+  { NULL, "elf_openrisc", "openrisc", 8, EM_OPENRISC, 0, 0 },
2ba9b1
+  { NULL, "elf_arc_a5", "arc_a5", 6, EM_ARC_A5, 0, 0 },
2ba9b1
+  { NULL, "elf_xtensa", "xtensa", 6, EM_XTENSA, 0, 0 },
2ba9b1
+  { aarch64_init, "elf_aarch64", "aarch64", 7, EM_AARCH64, ELFCLASS64, 0 },
2ba9b1
+  { bpf_init, "elf_bpf", "bpf", 3, EM_BPF, 0, 0 },
2ba9b1
+  { NULL, "elf_riscv", "riscv", 5, EM_RISCV, ELFCLASS64, ELFDATA2LSB },
2ba9b1
+  { NULL, "elf_riscv", "riscv", 5, EM_RISCV, ELFCLASS32, ELFDATA2LSB },
2ba9b1
 };
2ba9b1
 #define nmachines (sizeof (machines) / sizeof (machines[0]))
2ba9b1
 
2ba9b1
@@ -318,46 +326,17 @@ openbackend (Elf *elf, const char *emulation, GElf_Half machine)
2ba9b1
 #endif
2ba9b1
 #define ORIGINDIR "$ORIGIN/../$LIB/" LIBEBL_SUBDIR "/"
2ba9b1
 
2ba9b1
-	/* Give it a try.  At least the machine type matches.  First
2ba9b1
-           try to load the module.  */
2ba9b1
-	char dsoname[100];
2ba9b1
-	strcpy (stpcpy (stpcpy (dsoname, ORIGINDIR "libebl_"),
2ba9b1
-			machines[cnt].dsoname),
2ba9b1
-		".so");
2ba9b1
-
2ba9b1
-	void *h = dlopen (dsoname, RTLD_LAZY);
2ba9b1
-	if (h == NULL)
2ba9b1
-	  {
2ba9b1
-	    strcpy (stpcpy (stpcpy (dsoname, "libebl_"),
2ba9b1
-			    machines[cnt].dsoname),
2ba9b1
-		    ".so");
2ba9b1
-	    h = dlopen (dsoname, RTLD_LAZY);
2ba9b1
-	  }
2ba9b1
-
2ba9b1
-	  /* Try without an explicit path.  */
2ba9b1
-	if (h != NULL)
2ba9b1
+	ebl_bhinit_t initp = machines[cnt].initptr;
2ba9b1
+	if (1)
2ba9b1
 	  {
2ba9b1
-	    /* We managed to load the object.  Now see whether the
2ba9b1
-	       initialization function likes our file.  */
2ba9b1
 	    static const char version[] = MODVERSION;
2ba9b1
 	    const char *modversion;
2ba9b1
-	    ebl_bhinit_t initp;
2ba9b1
-
2ba9b1
-	    // We use a static number to help the compiler see we don't
2ba9b1
-	    // overflow the stack with an arbitrary number.
2ba9b1
-	    assert (machines[cnt].prefix_len <= MAX_PREFIX_LEN);
2ba9b1
-	    char symname[MAX_PREFIX_LEN + sizeof "_init"];
2ba9b1
-
2ba9b1
-	    strcpy (mempcpy (symname, machines[cnt].prefix,
2ba9b1
-			     machines[cnt].prefix_len), "_init");
2ba9b1
-
2ba9b1
-	    initp = (ebl_bhinit_t) dlsym (h, symname);
2ba9b1
 	    if (initp != NULL
2ba9b1
 		&& (modversion = initp (elf, machine, result, sizeof (Ebl)))
2ba9b1
 		&& strcmp (version, modversion) == 0)
2ba9b1
 	      {
2ba9b1
 		/* We found a module to handle our file.  */
2ba9b1
-		result->dlhandle = h;
2ba9b1
+		result->dlhandle = NULL;
2ba9b1
 		result->elf = elf;
2ba9b1
 
2ba9b1
 		/* A few entries are mandatory.  */
2ba9b1
@@ -366,9 +345,6 @@ openbackend (Elf *elf, const char *emulation, GElf_Half machine)
2ba9b1
 
2ba9b1
 		return result;
2ba9b1
 	      }
2ba9b1
-
2ba9b1
-	    /* Not the module we need.  */
2ba9b1
-	    (void) dlclose (h);
2ba9b1
 	  }
2ba9b1
 
2ba9b1
 	/* We cannot find a DSO but the emulation/machine ID matches.
2ba9b1
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
2ba9b1
index ddaeaa2..ba4e3eb 100644
2ba9b1
--- a/libelf/Makefile.am
2ba9b1
+++ b/libelf/Makefile.am
2ba9b1
@@ -41,6 +41,7 @@ include_HEADERS = libelf.h gelf.h nlist.h
2ba9b1
 
2ba9b1
 pkginclude_HEADERS = elf-knowledge.h
2ba9b1
 
2ba9b1
+libelf_a_CFLAGS = -fPIC -fvisibility=hidden $(AM_CFLAGS)
2ba9b1
 libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
2ba9b1
 		   elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \
2ba9b1
 		   gelf_getclass.c elf_getbase.c elf_getident.c \
2ba9b1
diff --git a/src/Makefile.am b/src/Makefile.am
2ba9b1
index 2b1c0dc..657b21a 100644
2ba9b1
--- a/src/Makefile.am
2ba9b1
+++ b/src/Makefile.am
2ba9b1
@@ -47,7 +47,8 @@ libasm = ../libasm/libasm.so
2ba9b1
 libdw = ../libdw/libdw.so
2ba9b1
 libelf = ../libelf/libelf.so
2ba9b1
 endif
2ba9b1
-libebl = ../libebl/libebl.a
2ba9b1
+libebl = ../libebl/libebl.a ../backends/libebl_static_pic.a ../libcpu/libcpu_static_pic.a
2ba9b1
+libdw_static = ../libdw/libdw_static_pic.a
2ba9b1
 libeu = ../lib/libeu.a
2ba9b1
 
2ba9b1
 if DEMANGLE
2ba9b1
@@ -67,16 +68,17 @@ ranlib_no_Wstack_usage = yes
2ba9b1
 ar_no_Wstack_usage = yes
2ba9b1
 unstrip_no_Wstack_usage = yes
2ba9b1
 
2ba9b1
+
2ba9b1
 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
2ba9b1
 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \
2ba9b1
 	   $(demanglelib)
2ba9b1
 size_LDADD = $(libelf) $(libeu) $(argp_LDADD)
2ba9b1
 strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl
2ba9b1
-elflint_LDADD  = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
2ba9b1
+elflint_LDADD  = $(libebl) $(libdw_static) $(libelf) $(libeu) $(argp_LDADD) -ldl
2ba9b1
 findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD)
2ba9b1
 addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
2ba9b1
-elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
2ba9b1
-objdump_LDADD  = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
2ba9b1
+elfcmp_LDADD = $(libebl) $(libdw_static) $(libeu) $(libelf) $(argp_LDADD) -ldl
2ba9b1
+objdump_LDADD  = $(libasm) $(libebl) $(libdw_static) $(libelf) $(libeu) $(argp_LDADD) -ldl
2ba9b1
 ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
2ba9b1
 strings_LDADD = $(libelf) $(libeu) $(argp_LDADD)
2ba9b1
 ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
2ba9b1
diff --git a/tests/Makefile.am b/tests/Makefile.am
2ba9b1
index 74c477e..b060587 100644
2ba9b1
--- a/tests/Makefile.am
2ba9b1
+++ b/tests/Makefile.am
2ba9b1
@@ -86,9 +86,8 @@ TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
2ba9b1
 	newscn run-strip-test.sh run-strip-test2.sh \
2ba9b1
 	run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
2ba9b1
 	run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \
2ba9b1
-	run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \
2ba9b1
-	run-strip-test12.sh \
2ba9b1
-	run-strip-nothing.sh run-strip-g.sh run-annobingroup.sh \
2ba9b1
+	run-strip-test9.sh run-strip-test10.sh \
2ba9b1
+	run-strip-nothing.sh run-strip-g.sh \
2ba9b1
 	run-strip-groups.sh run-strip-reloc.sh run-strip-strmerge.sh \
2ba9b1
 	run-strip-nobitsalign.sh run-strip-remove-keep.sh \
2ba9b1
 	run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-test3.sh \
2ba9b1
@@ -465,7 +464,8 @@ libdw = ../libdw/libdw.so
2ba9b1
 libelf = ../libelf/libelf.so
2ba9b1
 libasm = ../libasm/libasm.so
2ba9b1
 endif
2ba9b1
-libebl = ../libebl/libebl.a
2ba9b1
+libebl = ../libebl/libebl.a ../backends/libebl_static_pic.a ../libcpu/libcpu_static_pic.a
2ba9b1
+libdw_static = ../libdw/libdw_static_pic.a
2ba9b1
 libeu = ../lib/libeu.a
2ba9b1
 endif !STANDALONE
2ba9b1
 
2ba9b1
@@ -495,6 +495,7 @@ get_files_LDADD = $(libdw) $(libelf)
2ba9b1
 next_files_LDADD = $(libdw) $(libelf)
2ba9b1
 get_aranges_LDADD = $(libdw) $(libelf)
2ba9b1
 allfcts_LDADD = $(libdw) $(libelf)
2ba9b1
+line2addr_no_Wformat = yes
2ba9b1
 line2addr_LDADD = $(libdw) $(argp_LDADD)
2ba9b1
 addrscopes_LDADD = $(libdw) $(argp_LDADD)
2ba9b1
 funcscopes_LDADD = $(libdw) $(argp_LDADD)
2ba9b1
diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh
2ba9b1
index fd89d02..76db7d2 100755
2ba9b1
--- a/tests/run-addrcfi.sh
2ba9b1
+++ b/tests/run-addrcfi.sh
2ba9b1
@@ -3521,82 +3521,6 @@ testrun_compare ${abs_builddir}/addrcfi -e testfiles390x 0x0000000080000510 <<\E
2ba9b1
 handle_cfi no CFI (.debug_frame): no error
2ba9b1
 EOF
2ba9b1
 
2ba9b1
-# EM_ARM (function bar 0x00008510)
2ba9b1
-# Note. Only in .debug_frame, the .eh_frame is actually empty.
2ba9b1
-# Same as s390 and ppc above.
2ba9b1
-testfiles testfilearm
2ba9b1
-testrun_compare ${abs_builddir}/addrcfi -e testfilearm 0x00008510 <<\EOF
2ba9b1
-dwarf_cfi_addrframe (.eh_frame): no matching address range
2ba9b1
-.debug_frame has 0x8510 => [0x8510, 0x8524):
2ba9b1
-	return address in reg14
2ba9b1
-	CFA location expression: bregx(13)
2ba9b1
-	integer reg0 (r0): undefined
2ba9b1
-	integer reg1 (r1): undefined
2ba9b1
-	integer reg2 (r2): undefined
2ba9b1
-	integer reg3 (r3): undefined
2ba9b1
-	integer reg4 (r4): same_value
2ba9b1
-	integer reg5 (r5): same_value
2ba9b1
-	integer reg6 (r6): same_value
2ba9b1
-	integer reg7 (r7): same_value
2ba9b1
-	integer reg8 (r8): same_value
2ba9b1
-	integer reg9 (r9): undefined
2ba9b1
-	integer reg10 (r10): same_value
2ba9b1
-	integer reg11 (r11): same_value
2ba9b1
-	integer reg12 (r12): undefined
2ba9b1
-	integer reg13 (sp): location expression: call_frame_cfa stack_value
2ba9b1
-	integer reg14 (lr): same_value
2ba9b1
-	integer reg15 (pc): location expression: regx(14)
2ba9b1
-	FPA reg16 (f0): undefined
2ba9b1
-	FPA reg17 (f1): undefined
2ba9b1
-	FPA reg18 (f2): undefined
2ba9b1
-	FPA reg19 (f3): undefined
2ba9b1
-	FPA reg20 (f4): undefined
2ba9b1
-	FPA reg21 (f5): undefined
2ba9b1
-	FPA reg22 (f6): undefined
2ba9b1
-	FPA reg23 (f7): undefined
2ba9b1
-	FPA reg96 (f0): undefined
2ba9b1
-	FPA reg97 (f1): undefined
2ba9b1
-	FPA reg98 (f2): undefined
2ba9b1
-	FPA reg99 (f3): undefined
2ba9b1
-	FPA reg100 (f4): undefined
2ba9b1
-	FPA reg101 (f5): undefined
2ba9b1
-	FPA reg102 (f6): undefined
2ba9b1
-	FPA reg103 (f7): undefined
2ba9b1
-	integer reg128 (spsr): undefined
2ba9b1
-	VFP reg256 (d0): undefined
2ba9b1
-	VFP reg257 (d1): undefined
2ba9b1
-	VFP reg258 (d2): undefined
2ba9b1
-	VFP reg259 (d3): undefined
2ba9b1
-	VFP reg260 (d4): undefined
2ba9b1
-	VFP reg261 (d5): undefined
2ba9b1
-	VFP reg262 (d6): undefined
2ba9b1
-	VFP reg263 (d7): undefined
2ba9b1
-	VFP reg264 (d8): same_value
2ba9b1
-	VFP reg265 (d9): same_value
2ba9b1
-	VFP reg266 (d10): same_value
2ba9b1
-	VFP reg267 (d11): same_value
2ba9b1
-	VFP reg268 (d12): same_value
2ba9b1
-	VFP reg269 (d13): same_value
2ba9b1
-	VFP reg270 (d14): same_value
2ba9b1
-	VFP reg271 (d15): same_value
2ba9b1
-	VFP reg272 (d16): undefined
2ba9b1
-	VFP reg273 (d17): undefined
2ba9b1
-	VFP reg274 (d18): undefined
2ba9b1
-	VFP reg275 (d19): undefined
2ba9b1
-	VFP reg276 (d20): undefined
2ba9b1
-	VFP reg277 (d21): undefined
2ba9b1
-	VFP reg278 (d22): undefined
2ba9b1
-	VFP reg279 (d23): undefined
2ba9b1
-	VFP reg280 (d24): undefined
2ba9b1
-	VFP reg281 (d25): undefined
2ba9b1
-	VFP reg282 (d26): undefined
2ba9b1
-	VFP reg283 (d27): undefined
2ba9b1
-	VFP reg284 (d28): undefined
2ba9b1
-	VFP reg285 (d29): undefined
2ba9b1
-	VFP reg286 (d30): undefined
2ba9b1
-	VFP reg287 (d31): undefined
2ba9b1
-EOF
2ba9b1
-
2ba9b1
 # EM_AARCH64 (function bar 0x400550)
2ba9b1
 # Same as arm, 390 and ppc above.
2ba9b1
 # Note missing coverage in .eh_frame.
2ba9b1
diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh
2ba9b1
index 1422bd6..0d2eb52 100755
2ba9b1
--- a/tests/run-allregs.sh
2ba9b1
+++ b/tests/run-allregs.sh
2ba9b1
@@ -2344,387 +2344,6 @@ control registers:
2ba9b1
 	 65: %pswa (pswa), address 64 bits
2ba9b1
 EOF
2ba9b1
 
2ba9b1
-regs_test testfile30 <<\EOF
2ba9b1
-integer registers:
2ba9b1
-	  0: %g0 (g0), signed 32 bits
2ba9b1
-	  1: %g1 (g1), signed 32 bits
2ba9b1
-	  2: %g2 (g2), signed 32 bits
2ba9b1
-	  3: %g3 (g3), signed 32 bits
2ba9b1
-	  4: %g4 (g4), signed 32 bits
2ba9b1
-	  5: %g5 (g5), signed 32 bits
2ba9b1
-	  6: %g6 (g6), signed 32 bits
2ba9b1
-	  7: %g7 (g7), signed 32 bits
2ba9b1
-	  8: %o0 (o0), signed 32 bits
2ba9b1
-	  9: %o1 (o1), signed 32 bits
2ba9b1
-	 10: %o2 (o2), signed 32 bits
2ba9b1
-	 11: %o3 (o3), signed 32 bits
2ba9b1
-	 12: %o4 (o4), signed 32 bits
2ba9b1
-	 13: %o5 (o5), signed 32 bits
2ba9b1
-	 14: %o6 (o6), address 32 bits
2ba9b1
-	 15: %o7 (o7), signed 32 bits
2ba9b1
-	 16: %l0 (l0), signed 32 bits
2ba9b1
-	 17: %l1 (l1), signed 32 bits
2ba9b1
-	 18: %l2 (l2), signed 32 bits
2ba9b1
-	 19: %l3 (l3), signed 32 bits
2ba9b1
-	 20: %l4 (l4), signed 32 bits
2ba9b1
-	 21: %l5 (l5), signed 32 bits
2ba9b1
-	 22: %l6 (l6), signed 32 bits
2ba9b1
-	 23: %l7 (l7), signed 32 bits
2ba9b1
-	 24: %i0 (i0), signed 32 bits
2ba9b1
-	 25: %i1 (i1), signed 32 bits
2ba9b1
-	 26: %i2 (i2), signed 32 bits
2ba9b1
-	 27: %i3 (i3), signed 32 bits
2ba9b1
-	 28: %i4 (i4), signed 32 bits
2ba9b1
-	 29: %i5 (i5), signed 32 bits
2ba9b1
-	 30: %i6 (i6), address 32 bits
2ba9b1
-	 31: %i7 (i7), signed 32 bits
2ba9b1
-FPU registers:
2ba9b1
-	 32: %f0 (f0), float 32 bits
2ba9b1
-	 33: %f1 (f1), float 32 bits
2ba9b1
-	 34: %f2 (f2), float 32 bits
2ba9b1
-	 35: %f3 (f3), float 32 bits
2ba9b1
-	 36: %f4 (f4), float 32 bits
2ba9b1
-	 37: %f5 (f5), float 32 bits
2ba9b1
-	 38: %f6 (f6), float 32 bits
2ba9b1
-	 39: %f7 (f7), float 32 bits
2ba9b1
-	 40: %f8 (f8), float 32 bits
2ba9b1
-	 41: %f9 (f9), float 32 bits
2ba9b1
-	 42: %f10 (f10), float 32 bits
2ba9b1
-	 43: %f11 (f11), float 32 bits
2ba9b1
-	 44: %f12 (f12), float 32 bits
2ba9b1
-	 45: %f13 (f13), float 32 bits
2ba9b1
-	 46: %f14 (f14), float 32 bits
2ba9b1
-	 47: %f15 (f15), float 32 bits
2ba9b1
-	 48: %f16 (f16), float 32 bits
2ba9b1
-	 49: %f17 (f17), float 32 bits
2ba9b1
-	 50: %f18 (f18), float 32 bits
2ba9b1
-	 51: %f19 (f19), float 32 bits
2ba9b1
-	 52: %f20 (f20), float 32 bits
2ba9b1
-	 53: %f21 (f21), float 32 bits
2ba9b1
-	 54: %f22 (f22), float 32 bits
2ba9b1
-	 55: %f23 (f23), float 32 bits
2ba9b1
-	 56: %f24 (f24), float 32 bits
2ba9b1
-	 57: %f25 (f25), float 32 bits
2ba9b1
-	 58: %f26 (f26), float 32 bits
2ba9b1
-	 59: %f27 (f27), float 32 bits
2ba9b1
-	 60: %f28 (f28), float 32 bits
2ba9b1
-	 61: %f29 (f29), float 32 bits
2ba9b1
-	 62: %f30 (f30), float 32 bits
2ba9b1
-	 63: %f31 (f31), float 32 bits
2ba9b1
-control registers:
2ba9b1
-	 64: %y (y), unsigned 32 bits
2ba9b1
-	 65: %psr (psr), unsigned 32 bits
2ba9b1
-	 66: %wim (wim), unsigned 32 bits
2ba9b1
-	 67: %tbr (tbr), unsigned 32 bits
2ba9b1
-	 68: %pc (pc), address 32 bits
2ba9b1
-	 69: %npc (npc), address 32 bits
2ba9b1
-	 70: %fsr (fsr), unsigned 32 bits
2ba9b1
-	 71: %csr (csr), unsigned 32 bits
2ba9b1
-EOF
2ba9b1
-
2ba9b1
-regs_test testfile31 <<\EOF
2ba9b1
-integer registers:
2ba9b1
-	  0: %g0 (g0), signed 64 bits
2ba9b1
-	  1: %g1 (g1), signed 64 bits
2ba9b1
-	  2: %g2 (g2), signed 64 bits
2ba9b1
-	  3: %g3 (g3), signed 64 bits
2ba9b1
-	  4: %g4 (g4), signed 64 bits
2ba9b1
-	  5: %g5 (g5), signed 64 bits
2ba9b1
-	  6: %g6 (g6), signed 64 bits
2ba9b1
-	  7: %g7 (g7), signed 64 bits
2ba9b1
-	  8: %o0 (o0), signed 64 bits
2ba9b1
-	  9: %o1 (o1), signed 64 bits
2ba9b1
-	 10: %o2 (o2), signed 64 bits
2ba9b1
-	 11: %o3 (o3), signed 64 bits
2ba9b1
-	 12: %o4 (o4), signed 64 bits
2ba9b1
-	 13: %o5 (o5), signed 64 bits
2ba9b1
-	 14: %o6 (o6), address 64 bits
2ba9b1
-	 15: %o7 (o7), signed 64 bits
2ba9b1
-	 16: %l0 (l0), signed 64 bits
2ba9b1
-	 17: %l1 (l1), signed 64 bits
2ba9b1
-	 18: %l2 (l2), signed 64 bits
2ba9b1
-	 19: %l3 (l3), signed 64 bits
2ba9b1
-	 20: %l4 (l4), signed 64 bits
2ba9b1
-	 21: %l5 (l5), signed 64 bits
2ba9b1
-	 22: %l6 (l6), signed 64 bits
2ba9b1
-	 23: %l7 (l7), signed 64 bits
2ba9b1
-	 24: %i0 (i0), signed 64 bits
2ba9b1
-	 25: %i1 (i1), signed 64 bits
2ba9b1
-	 26: %i2 (i2), signed 64 bits
2ba9b1
-	 27: %i3 (i3), signed 64 bits
2ba9b1
-	 28: %i4 (i4), signed 64 bits
2ba9b1
-	 29: %i5 (i5), signed 64 bits
2ba9b1
-	 30: %i6 (i6), address 64 bits
2ba9b1
-	 31: %i7 (i7), signed 64 bits
2ba9b1
-FPU registers:
2ba9b1
-	 32: %f0 (f0), float 32 bits
2ba9b1
-	 33: %f1 (f1), float 32 bits
2ba9b1
-	 34: %f2 (f2), float 32 bits
2ba9b1
-	 35: %f3 (f3), float 32 bits
2ba9b1
-	 36: %f4 (f4), float 32 bits
2ba9b1
-	 37: %f5 (f5), float 32 bits
2ba9b1
-	 38: %f6 (f6), float 32 bits
2ba9b1
-	 39: %f7 (f7), float 32 bits
2ba9b1
-	 40: %f8 (f8), float 32 bits
2ba9b1
-	 41: %f9 (f9), float 32 bits
2ba9b1
-	 42: %f10 (f10), float 32 bits
2ba9b1
-	 43: %f11 (f11), float 32 bits
2ba9b1
-	 44: %f12 (f12), float 32 bits
2ba9b1
-	 45: %f13 (f13), float 32 bits
2ba9b1
-	 46: %f14 (f14), float 32 bits
2ba9b1
-	 47: %f15 (f15), float 32 bits
2ba9b1
-	 48: %f16 (f16), float 32 bits
2ba9b1
-	 49: %f17 (f17), float 32 bits
2ba9b1
-	 50: %f18 (f18), float 32 bits
2ba9b1
-	 51: %f19 (f19), float 32 bits
2ba9b1
-	 52: %f20 (f20), float 32 bits
2ba9b1
-	 53: %f21 (f21), float 32 bits
2ba9b1
-	 54: %f22 (f22), float 32 bits
2ba9b1
-	 55: %f23 (f23), float 32 bits
2ba9b1
-	 56: %f24 (f24), float 32 bits
2ba9b1
-	 57: %f25 (f25), float 32 bits
2ba9b1
-	 58: %f26 (f26), float 32 bits
2ba9b1
-	 59: %f27 (f27), float 32 bits
2ba9b1
-	 60: %f28 (f28), float 32 bits
2ba9b1
-	 61: %f29 (f29), float 32 bits
2ba9b1
-	 62: %f30 (f30), float 32 bits
2ba9b1
-	 63: %f31 (f31), float 32 bits
2ba9b1
-	 64: %f32 (f32), float 64 bits
2ba9b1
-	 65: %f34 (f34), float 64 bits
2ba9b1
-	 66: %f36 (f36), float 64 bits
2ba9b1
-	 67: %f38 (f38), float 64 bits
2ba9b1
-	 68: %f40 (f40), float 64 bits
2ba9b1
-	 69: %f42 (f42), float 64 bits
2ba9b1
-	 70: %f44 (f44), float 64 bits
2ba9b1
-	 71: %f46 (f46), float 64 bits
2ba9b1
-	 72: %f48 (f48), float 64 bits
2ba9b1
-	 73: %f50 (f50), float 64 bits
2ba9b1
-	 74: %f52 (f52), float 64 bits
2ba9b1
-	 75: %f54 (f54), float 64 bits
2ba9b1
-	 76: %f56 (f56), float 64 bits
2ba9b1
-	 77: %f58 (f58), float 64 bits
2ba9b1
-	 78: %f60 (f60), float 64 bits
2ba9b1
-	 79: %f62 (f62), float 64 bits
2ba9b1
-control registers:
2ba9b1
-	 80: %pc (pc), address 64 bits
2ba9b1
-	 81: %npc (npc), address 64 bits
2ba9b1
-	 82: %state (state), unsigned 64 bits
2ba9b1
-	 83: %fsr (fsr), unsigned 64 bits
2ba9b1
-	 84: %fprs (fprs), unsigned 64 bits
2ba9b1
-	 85: %y (y), unsigned 64 bits
2ba9b1
-EOF
2ba9b1
-
2ba9b1
-regs_test testfile10 <<\EOF
2ba9b1
-integer registers:
2ba9b1
-	  0: $v0 (v0), signed 64 bits
2ba9b1
-	  1: $t0 (t0), signed 64 bits
2ba9b1
-	  2: $t1 (t1), signed 64 bits
2ba9b1
-	  3: $t2 (t2), signed 64 bits
2ba9b1
-	  4: $t3 (t3), signed 64 bits
2ba9b1
-	  5: $t4 (t4), signed 64 bits
2ba9b1
-	  6: $t5 (t5), signed 64 bits
2ba9b1
-	  7: $t6 (t6), signed 64 bits
2ba9b1
-	  8: $t7 (t7), signed 64 bits
2ba9b1
-	  9: $s0 (s0), signed 64 bits
2ba9b1
-	 10: $s1 (s1), signed 64 bits
2ba9b1
-	 11: $s2 (s2), signed 64 bits
2ba9b1
-	 12: $s3 (s3), signed 64 bits
2ba9b1
-	 13: $s4 (s4), signed 64 bits
2ba9b1
-	 14: $s5 (s5), signed 64 bits
2ba9b1
-	 15: $s6 (s6), signed 64 bits
2ba9b1
-	 16: $a0 (a0), signed 64 bits
2ba9b1
-	 17: $a1 (a1), signed 64 bits
2ba9b1
-	 18: $a2 (a2), signed 64 bits
2ba9b1
-	 19: $a3 (a3), signed 64 bits
2ba9b1
-	 20: $a4 (a4), signed 64 bits
2ba9b1
-	 21: $a5 (a5), signed 64 bits
2ba9b1
-	 22: $t8 (t8), signed 64 bits
2ba9b1
-	 23: $t9 (t9), signed 64 bits
2ba9b1
-	 24: $t10 (t10), signed 64 bits
2ba9b1
-	 25: $t11 (t11), signed 64 bits
2ba9b1
-	 26: $ra (ra), address 64 bits
2ba9b1
-	 27: $t12 (t12), signed 64 bits
2ba9b1
-	 28: $at (at), signed 64 bits
2ba9b1
-	 29: $gp (gp), address 64 bits
2ba9b1
-	 30: $sp (sp), address 64 bits
2ba9b1
-	 31: $zero (zero), signed 64 bits
2ba9b1
-	 64: $pc (pc), address 64 bits
2ba9b1
-	 66: $unique (unique), address 64 bits
2ba9b1
-FPU registers:
2ba9b1
-	 32: $f0 (f0), float 64 bits
2ba9b1
-	 33: $f1 (f1), float 64 bits
2ba9b1
-	 34: $f2 (f2), float 64 bits
2ba9b1
-	 35: $f3 (f3), float 64 bits
2ba9b1
-	 36: $f4 (f4), float 64 bits
2ba9b1
-	 37: $f5 (f5), float 64 bits
2ba9b1
-	 38: $f6 (f6), float 64 bits
2ba9b1
-	 39: $f7 (f7), float 64 bits
2ba9b1
-	 40: $f8 (f8), float 64 bits
2ba9b1
-	 41: $f9 (f9), float 64 bits
2ba9b1
-	 42: $f10 (f10), float 64 bits
2ba9b1
-	 43: $f11 (f11), float 64 bits
2ba9b1
-	 44: $f12 (f12), float 64 bits
2ba9b1
-	 45: $f13 (f13), float 64 bits
2ba9b1
-	 46: $f14 (f14), float 64 bits
2ba9b1
-	 47: $f15 (f15), float 64 bits
2ba9b1
-	 48: $f16 (f16), float 64 bits
2ba9b1
-	 49: $f17 (f17), float 64 bits
2ba9b1
-	 50: $f18 (f18), float 64 bits
2ba9b1
-	 51: $f19 (f19), float 64 bits
2ba9b1
-	 52: $f20 (f20), float 64 bits
2ba9b1
-	 53: $f21 (f21), float 64 bits
2ba9b1
-	 54: $f22 (f22), float 64 bits
2ba9b1
-	 55: $f23 (f23), float 64 bits
2ba9b1
-	 56: $f24 (f24), float 64 bits
2ba9b1
-	 57: $f25 (f25), float 64 bits
2ba9b1
-	 58: $f26 (f26), float 64 bits
2ba9b1
-	 59: $f27 (f27), float 64 bits
2ba9b1
-	 60: $f28 (f28), float 64 bits
2ba9b1
-	 61: $f29 (f29), float 64 bits
2ba9b1
-	 62: $f30 (f30), float 64 bits
2ba9b1
-	 63: $fpcr (fpcr), unsigned 64 bits
2ba9b1
-EOF
2ba9b1
-
2ba9b1
-regs_test testfile60 <<\EOF
2ba9b1
-integer registers:
2ba9b1
-	  0: r0 (r0), signed 64 bits
2ba9b1
-	  1: r1 (r1), signed 64 bits
2ba9b1
-	  2: r2 (r2), signed 64 bits
2ba9b1
-	  3: r3 (r3), signed 64 bits
2ba9b1
-	  4: r4 (r4), signed 64 bits
2ba9b1
-	  5: r5 (r5), signed 64 bits
2ba9b1
-	  6: r6 (r6), signed 64 bits
2ba9b1
-	  7: r7 (r7), signed 64 bits
2ba9b1
-	  8: r8 (r8), signed 64 bits
2ba9b1
-	  9: r9 (r9), signed 64 bits
2ba9b1
-	 10: r10 (r10), signed 64 bits
2ba9b1
-	 11: r11 (r11), signed 64 bits
2ba9b1
-	 12: r12 (r12), signed 64 bits
2ba9b1
-	 13: r13 (r13), signed 64 bits
2ba9b1
-	 14: r14 (r14), signed 64 bits
2ba9b1
-	 15: r15 (r15), signed 64 bits
2ba9b1
-	 16: r16 (r16), signed 64 bits
2ba9b1
-	 17: r17 (r17), signed 64 bits
2ba9b1
-	 18: r18 (r18), signed 64 bits
2ba9b1
-	 19: r19 (r19), signed 64 bits
2ba9b1
-	 20: r20 (r20), signed 64 bits
2ba9b1
-	 21: r21 (r21), signed 64 bits
2ba9b1
-	 22: r22 (r22), signed 64 bits
2ba9b1
-	 23: r23 (r23), signed 64 bits
2ba9b1
-	 24: r24 (r24), signed 64 bits
2ba9b1
-	 25: r25 (r25), signed 64 bits
2ba9b1
-	 26: r26 (r26), signed 64 bits
2ba9b1
-	 27: r27 (r27), signed 64 bits
2ba9b1
-	 28: r28 (r28), signed 64 bits
2ba9b1
-	 29: r29 (r29), signed 64 bits
2ba9b1
-	 30: r30 (r30), signed 64 bits
2ba9b1
-	 31: r31 (r31), signed 64 bits
2ba9b1
-	 32: r32 (r32), signed 64 bits
2ba9b1
-	 33: r33 (r33), signed 64 bits
2ba9b1
-	 34: r34 (r34), signed 64 bits
2ba9b1
-	 35: r35 (r35), signed 64 bits
2ba9b1
-	 36: r36 (r36), signed 64 bits
2ba9b1
-	 37: r37 (r37), signed 64 bits
2ba9b1
-	 38: r38 (r38), signed 64 bits
2ba9b1
-	 39: r39 (r39), signed 64 bits
2ba9b1
-	 40: r40 (r40), signed 64 bits
2ba9b1
-	 41: r41 (r41), signed 64 bits
2ba9b1
-	 42: r42 (r42), signed 64 bits
2ba9b1
-	 43: r43 (r43), signed 64 bits
2ba9b1
-	 44: r44 (r44), signed 64 bits
2ba9b1
-	 45: r45 (r45), signed 64 bits
2ba9b1
-	 46: r46 (r46), signed 64 bits
2ba9b1
-	 47: r47 (r47), signed 64 bits
2ba9b1
-	 48: r48 (r48), signed 64 bits
2ba9b1
-	 49: r49 (r49), signed 64 bits
2ba9b1
-	 50: r50 (r50), signed 64 bits
2ba9b1
-	 51: r51 (r51), signed 64 bits
2ba9b1
-	 52: r52 (r52), signed 64 bits
2ba9b1
-	 53: tp (tp), address 64 bits
2ba9b1
-	 54: sp (sp), address 64 bits
2ba9b1
-	 55: lr (lr), address 64 bits
2ba9b1
-	 56: sn (sn), unsigned 64 bits
2ba9b1
-	 57: idn0 (idn0), unsigned 64 bits
2ba9b1
-	 58: idn1 (idn1), unsigned 64 bits
2ba9b1
-	 59: udn0 (udn0), unsigned 64 bits
2ba9b1
-	 60: udn1 (udn1), unsigned 64 bits
2ba9b1
-	 61: udn2 (udn2), unsigned 64 bits
2ba9b1
-	 62: udn3 (udn3), unsigned 64 bits
2ba9b1
-	 63: zero (zero), unsigned 64 bits
2ba9b1
-	 64: pc (pc), address 64 bits
2ba9b1
-EOF
2ba9b1
-
2ba9b1
-regs_test testfile61 <<\EOF
2ba9b1
-integer registers:
2ba9b1
-	  0: r0 (r0), signed 32 bits
2ba9b1
-	  1: r1 (r1), signed 32 bits
2ba9b1
-	  2: r2 (r2), signed 32 bits
2ba9b1
-	  3: r3 (r3), signed 32 bits
2ba9b1
-	  4: r4 (r4), signed 32 bits
2ba9b1
-	  5: r5 (r5), signed 32 bits
2ba9b1
-	  6: r6 (r6), signed 32 bits
2ba9b1
-	  7: r7 (r7), signed 32 bits
2ba9b1
-	  8: r8 (r8), signed 32 bits
2ba9b1
-	  9: r9 (r9), signed 32 bits
2ba9b1
-	 10: r10 (r10), signed 32 bits
2ba9b1
-	 11: r11 (r11), signed 32 bits
2ba9b1
-	 12: r12 (r12), signed 32 bits
2ba9b1
-	 13: sp (sp), address 32 bits
2ba9b1
-	 14: lr (lr), address 32 bits
2ba9b1
-	 15: pc (pc), address 32 bits
2ba9b1
-	128: spsr (spsr), unsigned 32 bits
2ba9b1
-FPA registers:
2ba9b1
-	 16: f0 (f0), float 96 bits
2ba9b1
-	 17: f1 (f1), float 96 bits
2ba9b1
-	 18: f2 (f2), float 96 bits
2ba9b1
-	 19: f3 (f3), float 96 bits
2ba9b1
-	 20: f4 (f4), float 96 bits
2ba9b1
-	 21: f5 (f5), float 96 bits
2ba9b1
-	 22: f6 (f6), float 96 bits
2ba9b1
-	 23: f7 (f7), float 96 bits
2ba9b1
-	 96: f0 (f0), float 96 bits
2ba9b1
-	 97: f1 (f1), float 96 bits
2ba9b1
-	 98: f2 (f2), float 96 bits
2ba9b1
-	 99: f3 (f3), float 96 bits
2ba9b1
-	100: f4 (f4), float 96 bits
2ba9b1
-	101: f5 (f5), float 96 bits
2ba9b1
-	102: f6 (f6), float 96 bits
2ba9b1
-	103: f7 (f7), float 96 bits
2ba9b1
-VFP registers:
2ba9b1
-	256: d0 (d0), float 64 bits
2ba9b1
-	257: d1 (d1), float 64 bits
2ba9b1
-	258: d2 (d2), float 64 bits
2ba9b1
-	259: d3 (d3), float 64 bits
2ba9b1
-	260: d4 (d4), float 64 bits
2ba9b1
-	261: d5 (d5), float 64 bits
2ba9b1
-	262: d6 (d6), float 64 bits
2ba9b1
-	263: d7 (d7), float 64 bits
2ba9b1
-	264: d8 (d8), float 64 bits
2ba9b1
-	265: d9 (d9), float 64 bits
2ba9b1
-	266: d10 (d10), float 64 bits
2ba9b1
-	267: d11 (d11), float 64 bits
2ba9b1
-	268: d12 (d12), float 64 bits
2ba9b1
-	269: d13 (d13), float 64 bits
2ba9b1
-	270: d14 (d14), float 64 bits
2ba9b1
-	271: d15 (d15), float 64 bits
2ba9b1
-	272: d16 (d16), float 64 bits
2ba9b1
-	273: d17 (d17), float 64 bits
2ba9b1
-	274: d18 (d18), float 64 bits
2ba9b1
-	275: d19 (d19), float 64 bits
2ba9b1
-	276: d20 (d20), float 64 bits
2ba9b1
-	277: d21 (d21), float 64 bits
2ba9b1
-	278: d22 (d22), float 64 bits
2ba9b1
-	279: d23 (d23), float 64 bits
2ba9b1
-	280: d24 (d24), float 64 bits
2ba9b1
-	281: d25 (d25), float 64 bits
2ba9b1
-	282: d26 (d26), float 64 bits
2ba9b1
-	283: d27 (d27), float 64 bits
2ba9b1
-	284: d28 (d28), float 64 bits
2ba9b1
-	285: d29 (d29), float 64 bits
2ba9b1
-	286: d30 (d30), float 64 bits
2ba9b1
-	287: d31 (d31), float 64 bits
2ba9b1
-EOF
2ba9b1
-
2ba9b1
 # See run-readelf-mixed-corenote.sh for instructions to regenerate
2ba9b1
 # this core file.
2ba9b1
 regs_test testfile_aarch64_core <<\EOF
2ba9b1
@@ -2871,106 +2490,4 @@ x87 registers:
2ba9b1
 	 40: %st7 (st7), float 80 bits
2ba9b1
 EOF
2ba9b1
 
2ba9b1
-# See run-readelf-mixed-corenote.sh for instructions to regenerate
2ba9b1
-# this core file.
2ba9b1
-regs_test testfile-m68k-core <<\EOF
2ba9b1
-integer registers:
2ba9b1
-	  0: %d0 (d0), signed 32 bits
2ba9b1
-	  1: %d1 (d1), signed 32 bits
2ba9b1
-	  2: %d2 (d2), signed 32 bits
2ba9b1
-	  3: %d3 (d3), signed 32 bits
2ba9b1
-	  4: %d4 (d4), signed 32 bits
2ba9b1
-	  5: %d5 (d5), signed 32 bits
2ba9b1
-	  6: %d6 (d6), signed 32 bits
2ba9b1
-	  7: %d7 (d7), signed 32 bits
2ba9b1
-	  8: %a0 (a0), address 32 bits
2ba9b1
-	  9: %a1 (a1), address 32 bits
2ba9b1
-	 10: %a2 (a2), address 32 bits
2ba9b1
-	 11: %a3 (a3), address 32 bits
2ba9b1
-	 12: %a4 (a4), address 32 bits
2ba9b1
-	 13: %a5 (a5), address 32 bits
2ba9b1
-	 14: %a6 (a6), address 32 bits
2ba9b1
-	 15: %a7 (a7), address 32 bits
2ba9b1
-	 24: %pc (pc), address 32 bits
2ba9b1
-FPU registers:
2ba9b1
-	 16: %fp0 (fp0), float 96 bits
2ba9b1
-	 17: %fp1 (fp1), float 96 bits
2ba9b1
-	 18: %fp2 (fp2), float 96 bits
2ba9b1
-	 19: %fp3 (fp3), float 96 bits
2ba9b1
-	 20: %fp4 (fp4), float 96 bits
2ba9b1
-	 21: %fp5 (fp5), float 96 bits
2ba9b1
-	 22: %fp6 (fp6), float 96 bits
2ba9b1
-	 23: %fp7 (fp7), float 96 bits
2ba9b1
-EOF
2ba9b1
-
2ba9b1
-# See run-readelf-mixed-corenote.sh for instructions to regenerate
2ba9b1
-# this core file.
2ba9b1
-regs_test testfile-riscv64-core <<\EOF
2ba9b1
-integer registers:
2ba9b1
-	  0: zero (zero), signed 64 bits
2ba9b1
-	  1: ra (ra), address 64 bits
2ba9b1
-	  2: sp (sp), address 64 bits
2ba9b1
-	  3: gp (gp), address 64 bits
2ba9b1
-	  4: tp (tp), address 64 bits
2ba9b1
-	  5: t0 (t0), signed 64 bits
2ba9b1
-	  6: t1 (t1), signed 64 bits
2ba9b1
-	  7: t2 (t2), signed 64 bits
2ba9b1
-	  8: s0 (s0), signed 64 bits
2ba9b1
-	  9: s1 (s1), signed 64 bits
2ba9b1
-	 10: a0 (a0), signed 64 bits
2ba9b1
-	 11: a1 (a1), signed 64 bits
2ba9b1
-	 12: a2 (a2), signed 64 bits
2ba9b1
-	 13: a3 (a3), signed 64 bits
2ba9b1
-	 14: a4 (a4), signed 64 bits
2ba9b1
-	 15: a5 (a5), signed 64 bits
2ba9b1
-	 16: a6 (a6), signed 64 bits
2ba9b1
-	 17: a7 (a7), signed 64 bits
2ba9b1
-	 18: s2 (s2), signed 64 bits
2ba9b1
-	 19: s3 (s3), signed 64 bits
2ba9b1
-	 20: s4 (s4), signed 64 bits
2ba9b1
-	 21: s5 (s5), signed 64 bits
2ba9b1
-	 22: s6 (s6), signed 64 bits
2ba9b1
-	 23: s7 (s7), signed 64 bits
2ba9b1
-	 24: s8 (s8), signed 64 bits
2ba9b1
-	 25: s9 (s9), signed 64 bits
2ba9b1
-	 26: s10 (s10), signed 64 bits
2ba9b1
-	 27: s11 (s11), signed 64 bits
2ba9b1
-	 28: t3 (t3), signed 64 bits
2ba9b1
-	 29: t4 (t4), signed 64 bits
2ba9b1
-	 30: t5 (t5), signed 64 bits
2ba9b1
-	 31: t6 (t6), signed 64 bits
2ba9b1
-FPU registers:
2ba9b1
-	 32: ft0 (ft0), float 64 bits
2ba9b1
-	 33: ft1 (ft1), float 64 bits
2ba9b1
-	 34: ft2 (ft2), float 64 bits
2ba9b1
-	 35: ft3 (ft3), float 64 bits
2ba9b1
-	 36: ft4 (ft4), float 64 bits
2ba9b1
-	 37: ft5 (ft5), float 64 bits
2ba9b1
-	 38: ft6 (ft6), float 64 bits
2ba9b1
-	 39: ft7 (ft7), float 64 bits
2ba9b1
-	 40: fs0 (fs0), float 64 bits
2ba9b1
-	 41: fs1 (fs1), float 64 bits
2ba9b1
-	 42: fa0 (fa0), float 64 bits
2ba9b1
-	 43: fa1 (fa1), float 64 bits
2ba9b1
-	 44: fa2 (fa2), float 64 bits
2ba9b1
-	 45: fa3 (fa3), float 64 bits
2ba9b1
-	 46: fa4 (fa4), float 64 bits
2ba9b1
-	 47: fa5 (fa5), float 64 bits
2ba9b1
-	 48: fa6 (fa6), float 64 bits
2ba9b1
-	 49: fa7 (fa7), float 64 bits
2ba9b1
-	 50: fs2 (fs2), float 64 bits
2ba9b1
-	 51: fs3 (fs3), float 64 bits
2ba9b1
-	 52: fs4 (fs4), float 64 bits
2ba9b1
-	 53: fs5 (fs5), float 64 bits
2ba9b1
-	 54: fs6 (fs6), float 64 bits
2ba9b1
-	 55: fs7 (fs7), float 64 bits
2ba9b1
-	 56: fs8 (fs8), float 64 bits
2ba9b1
-	 57: fs9 (fs9), float 64 bits
2ba9b1
-	 58: fs10 (fs10), float 64 bits
2ba9b1
-	 59: fs11 (fs11), float 64 bits
2ba9b1
-	 60: ft8 (ft8), float 64 bits
2ba9b1
-	 61: ft9 (ft9), float 64 bits
2ba9b1
-	 62: ft10 (ft10), float 64 bits
2ba9b1
-	 63: ft11 (ft11), float 64 bits
2ba9b1
-EOF
2ba9b1
 exit 0
2ba9b1
diff --git a/tests/run-arextract.sh b/tests/run-arextract.sh
2ba9b1
index 44f4a52..0532952 100755
2ba9b1
--- a/tests/run-arextract.sh
2ba9b1
+++ b/tests/run-arextract.sh
2ba9b1
@@ -26,7 +26,7 @@ if test -f $archive; then
2ba9b1
     echo -n "Extracting symbols... $ac_c"
2ba9b1
 
2ba9b1
     # The files we are looking at.
2ba9b1
-    for f in ${abs_top_builddir}/libelf/*.o; do
2ba9b1
+    for f in ${abs_top_builddir}/libelf/libelf_a-*.o; do
2ba9b1
 	testrun ${abs_builddir}/arextract $archive `basename $f` arextract.test || exit 1
2ba9b1
 	cmp $f arextract.test || {
2ba9b1
 	    echo "Extraction of $1 failed"
2ba9b1
diff --git a/tests/run-dwarfcfi.sh b/tests/run-dwarfcfi.sh
2ba9b1
index 98fa171..87691ae 100755
2ba9b1
--- a/tests/run-dwarfcfi.sh
2ba9b1
+++ b/tests/run-dwarfcfi.sh
2ba9b1
@@ -98,23 +98,6 @@ testrun_compare ${abs_builddir}/dwarfcfi testfileppc64-debugframe 0x000000001000
2ba9b1
 	reg9: undefined
2ba9b1
 EOF
2ba9b1
 
2ba9b1
-testfiles testfilearm-debugframe
2ba9b1
-testrun_compare ${abs_builddir}/dwarfcfi testfilearm-debugframe 0x00008510 <<\EOF
2ba9b1
-0x8510 => [0x8510, 0x8524):
2ba9b1
-	return address in reg14
2ba9b1
-	CFA location expression: bregx(13)
2ba9b1
-	reg0: undefined
2ba9b1
-	reg1: undefined
2ba9b1
-	reg2: undefined
2ba9b1
-	reg3: undefined
2ba9b1
-	reg4: same_value
2ba9b1
-	reg5: same_value
2ba9b1
-	reg6: same_value
2ba9b1
-	reg7: same_value
2ba9b1
-	reg8: same_value
2ba9b1
-	reg9: undefined
2ba9b1
-EOF
2ba9b1
-
2ba9b1
 testfiles testfileaarch64-debugframe
2ba9b1
 testrun_compare ${abs_builddir}/dwarfcfi testfileaarch64-debugframe 0x400550 <<\EOF
2ba9b1
 0x400550 => [0x400550, 0x400568):
2ba9b1
diff --git a/tests/run-elflint-test.sh b/tests/run-elflint-test.sh
2ba9b1
index caf172a..bd88611 100755
2ba9b1
--- a/tests/run-elflint-test.sh
2ba9b1
+++ b/tests/run-elflint-test.sh
2ba9b1
@@ -31,12 +31,14 @@ testfiles testfile33
2ba9b1
 testrun ${abs_top_builddir}/src/elflint -q testfile33
2ba9b1
 
2ba9b1
 testfiles testfile42
2ba9b1
-testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile42
2ba9b1
+# sparc unsupported
2ba9b1
+#testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile42
2ba9b1
 
2ba9b1
 # Contains debuginfo, compress it, recheck
2ba9b1
 tempfiles testfile42z
2ba9b1
 testrun ${abs_top_builddir}/src/elfcompress -f -q -o testfile42z testfile42
2ba9b1
-testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile42z
2ba9b1
+# sparc unsupported
2ba9b1
+#testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile42z
2ba9b1
 
2ba9b1
 testfiles testfile46
2ba9b1
 testrun ${abs_top_builddir}/src/elflint -q testfile46
2ba9b1
diff --git a/tests/run-readelf-A.sh b/tests/run-readelf-A.sh
2ba9b1
index b7432be..46e7a42 100755
2ba9b1
--- a/tests/run-readelf-A.sh
2ba9b1
+++ b/tests/run-readelf-A.sh
2ba9b1
@@ -18,51 +18,19 @@
2ba9b1
 
2ba9b1
 . $srcdir/test-subr.sh
2ba9b1
 
2ba9b1
-# See run-addrcfi.sh for testfilearm.
2ba9b1
-
2ba9b1
 # = testfileppc32attrs.s =
2ba9b1
 # .gnu_attribute 8,1
2ba9b1
 # .gnu_attribute 12,1
2ba9b1
 #
2ba9b1
 # gcc -m32 -c testfileppc32attrs.s
2ba9b1
 
2ba9b1
-# = testfilesparc64attrs.s =
2ba9b1
-# .gnu_attribute 4,0x0aaaaaaa
2ba9b1
-# .gnu_attribute 8,0x00000055
2ba9b1
-#
2ba9b1
-# gcc -c testfilesparc64attrs.s
2ba9b1
-
2ba9b1
 # = testfileppc64attrs.s =
2ba9b1
 # .gnu_attribute 4,3
2ba9b1
 #
2ba9b1
 # gcc -c testfileppc64attrs.s
2ba9b1
 
2ba9b1
-testfiles testfilearm testfileppc32attrs.o testfilesparc64attrs.o testfileppc64attrs.o
2ba9b1
 
2ba9b1
-testrun_compare ${abs_top_builddir}/src/readelf -A testfilearm <<\EOF
2ba9b1
-
2ba9b1
-Object attributes section [27] '.ARM.attributes' of 53 bytes at offset 0x718:
2ba9b1
-  Owner          Size
2ba9b1
-  aeabi            52
2ba9b1
-    File:          42
2ba9b1
-      CPU_name: 7-A
2ba9b1
-      CPU_arch: v7
2ba9b1
-      CPU_arch_profile: Application
2ba9b1
-      ARM_ISA_use: Yes
2ba9b1
-      THUMB_ISA_use: Thumb-2
2ba9b1
-      VFP_arch: VFPv3-D16
2ba9b1
-      ABI_PCS_wchar_t: 4
2ba9b1
-      ABI_FP_rounding: Needed
2ba9b1
-      ABI_FP_denormal: Needed
2ba9b1
-      ABI_FP_exceptions: Needed
2ba9b1
-      ABI_FP_number_model: IEEE 754
2ba9b1
-      ABI_align8_needed: Yes
2ba9b1
-      ABI_align8_preserved: Yes, except leaf SP
2ba9b1
-      ABI_enum_size: int
2ba9b1
-      ABI_HardFP_use: SP and DP
2ba9b1
-      ABI_VFP_args: VFP registers
2ba9b1
-      CPU_unaligned_access: v6
2ba9b1
-EOF
2ba9b1
+testfiles testfileppc32attrs.o testfileppc64attrs.o
2ba9b1
 
2ba9b1
 testrun_compare ${abs_top_builddir}/src/readelf -A testfileppc32attrs.o <<\EOF
2ba9b1
 
2ba9b1
@@ -74,16 +42,6 @@ Object attributes section [ 4] '.gnu.attributes' of 18 bytes at offset 0x34:
2ba9b1
       GNU_Power_ABI_Struct_Return: r3/r4
2ba9b1
 EOF
2ba9b1
 
2ba9b1
-testrun_compare ${abs_top_builddir}/src/readelf -A testfilesparc64attrs.o <<\EOF
2ba9b1
-
2ba9b1
-Object attributes section [ 4] '.gnu.attributes' of 21 bytes at offset 0x40:
2ba9b1
-  Owner          Size
2ba9b1
-  gnu              20
2ba9b1
-    File:          12
2ba9b1
-      GNU_Sparc_HWCAPS: div32,v8plus,vis,asi_blk_init,vis3,random,fjfmau,asi_cache_sparing,des,camellia,sha1,sha512,mont,cbcond
2ba9b1
-      GNU_Sparc_HWCAPS2: fjathplus,adp,mwait,xmont
2ba9b1
-EOF
2ba9b1
-
2ba9b1
 testrun_compare ${abs_top_builddir}/src/readelf -A testfileppc64attrs.o <<\EOF
2ba9b1
 
2ba9b1
 Object attributes section [ 4] '.gnu.attributes' of 16 bytes at offset 0x40:
2ba9b1
diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh
2ba9b1
index 07cfc39..382ea14 100755
2ba9b1
--- a/tests/run-readelf-mixed-corenote.sh
2ba9b1
+++ b/tests/run-readelf-mixed-corenote.sh
2ba9b1
@@ -18,73 +18,6 @@
2ba9b1
 
2ba9b1
 . $srcdir/test-subr.sh
2ba9b1
 
2ba9b1
-testfiles testfile63
2ba9b1
-
2ba9b1
-testrun_compare ${abs_top_builddir}/src/readelf -n testfile63 <<\EOF
2ba9b1
-
2ba9b1
-Note segment of 892 bytes at offset 0x274:
2ba9b1
-  Owner          Data size  Type
2ba9b1
-  CORE                 148  PRSTATUS
2ba9b1
-    info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11
2ba9b1
-    sigpend: <>
2ba9b1
-    sighold: <>
2ba9b1
-    pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
2ba9b1
-    utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
2ba9b1
-    orig_r0: -1, fpvalid: 1
2ba9b1
-    r0:             1  r1:   -1091672508  r2:   -1091672500
2ba9b1
-    r3:             0  r4:             0  r5:             0
2ba9b1
-    r6:         33728  r7:             0  r8:             0
2ba9b1
-    r9:             0  r10:  -1225703496  r11:  -1091672844
2ba9b1
-    r12:            0  sp:    0xbeee64f4  lr:    0xb6dc3f48
2ba9b1
-    pc:    0x00008500  spsr:  0x60000010
2ba9b1
-  CORE                 124  PRPSINFO
2ba9b1
-    state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
2ba9b1
-    uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
2ba9b1
-    fname: a.out, psargs: ./a.out 
2ba9b1
-  CORE                 144  AUXV
2ba9b1
-    HWCAP: 0xe8d7  <swp half thumb fast-mult vfp edsp>
2ba9b1
-    PAGESZ: 4096
2ba9b1
-    CLKTCK: 100
2ba9b1
-    PHDR: 0x8034
2ba9b1
-    PHENT: 32
2ba9b1
-    PHNUM: 8
2ba9b1
-    BASE: 0xb6eee000
2ba9b1
-    FLAGS: 0
2ba9b1
-    ENTRY: 0x83c0
2ba9b1
-    UID: 0
2ba9b1
-    EUID: 0
2ba9b1
-    GID: 0
2ba9b1
-    EGID: 0
2ba9b1
-    SECURE: 0
2ba9b1
-    RANDOM: 0xbeee674e
2ba9b1
-    EXECFN: 0xbeee6ff4
2ba9b1
-    PLATFORM: 0xbeee675e
2ba9b1
-    NULL
2ba9b1
-  CORE                 116  FPREGSET
2ba9b1
-    f0: 0x000000000000000000000000  f1: 0x000000000000000000000000
2ba9b1
-    f2: 0x000000000000000000000000  f3: 0x000000000000000000000000
2ba9b1
-    f4: 0x000000000000000000000000  f5: 0x000000000000000000000000
2ba9b1
-    f6: 0x000000000000000000000000  f7: 0x000000000000000000000000
2ba9b1
-  LINUX                260  ARM_VFP
2ba9b1
-    fpscr: 0x00000000
2ba9b1
-    d0:  0x0000000000000000  d1:  0x0000000000000000
2ba9b1
-    d2:  0x0000000000000000  d3:  0x0000000000000000
2ba9b1
-    d4:  0x0000000000000000  d5:  0x0000000000000000
2ba9b1
-    d6:  0x0000000000000000  d7:  0x0000000000000000
2ba9b1
-    d8:  0x0000000000000000  d9:  0x0000000000000000
2ba9b1
-    d10: 0x0000000000000000  d11: 0x0000000000000000
2ba9b1
-    d12: 0x0000000000000000  d13: 0x0000000000000000
2ba9b1
-    d14: 0x0000000000000000  d15: 0x0000000000000000
2ba9b1
-    d16: 0x0000000000000000  d17: 0x0000000000000000
2ba9b1
-    d18: 0x0000000000000000  d19: 0x0000000000000000
2ba9b1
-    d20: 0x0000000000000000  d21: 0x0000000000000000
2ba9b1
-    d22: 0x0000000000000000  d23: 0x0000000000000000
2ba9b1
-    d24: 0x0000000000000000  d25: 0x0000000000000000
2ba9b1
-    d26: 0x0000000000000000  d27: 0x0000000000000000
2ba9b1
-    d28: 0x0000000000000000  d29: 0x0000000000000000
2ba9b1
-    d30: 0x0000000000000000  d31: 0x0000000000000000
2ba9b1
-EOF
2ba9b1
-
2ba9b1
 testfiles testfile67
2ba9b1
 testrun_compare ${abs_top_builddir}/src/readelf -n testfile67 <<\EOF
2ba9b1
 
2ba9b1
@@ -582,138 +515,4 @@ Note segment of 2548 bytes at offset 0x234:
2ba9b1
   LINUX                832  X86_XSTATE
2ba9b1
 EOF
2ba9b1
 
2ba9b1
-# To reproduce this core dump, do this on an m68k machine:
2ba9b1
-# $ gcc -x c <(echo 'int main () { return *(int *)0x12345678; }')
2ba9b1
-# $ ./a.out
2ba9b1
-testfiles testfile-m68k-core
2ba9b1
-testrun_compare ${abs_top_builddir}/src/readelf -n testfile-m68k-core <<\EOF
2ba9b1
-
2ba9b1
-Note segment of 1056 bytes at offset 0x1f4:
2ba9b1
-  Owner          Data size  Type
2ba9b1
-  CORE                 154  PRSTATUS
2ba9b1
-    info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11
2ba9b1
-    sigpend: <>
2ba9b1
-    sighold: <>
2ba9b1
-    pid: 1963, ppid: 1084, pgrp: 1963, sid: 1084
2ba9b1
-    utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
2ba9b1
-    fpvalid: 1
2ba9b1
-    d1:           1  d2:           0  d3: -2146476616  d4: -2146476616
2ba9b1
-    d5:           0  d6: -2147393212  d7: -2144827216  a0:  0x12345678
2ba9b1
-    a1:  0xefe71460  a2:  0x00000000  a3:  0x80288df8  a4:  0x80000340
2ba9b1
-    a5:  0xc017a000  a6:  0xefe71434  d0: -1073595312  a7:  0xefe71434
2ba9b1
-    pc:  0x800003fe
2ba9b1
-  CORE                 124  PRPSINFO
2ba9b1
-    state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400600
2ba9b1
-    uid: 1000, gid: 501, pid: 1963, ppid: 1084, pgrp: 1963, sid: 1084
2ba9b1
-    fname: a.out, psargs: ./a.out 
2ba9b1
-  CORE                 128  SIGINFO
2ba9b1
-    si_signo: 11, si_errno: 0, si_code: 1
2ba9b1
-    fault address: 0x12345678
2ba9b1
-  CORE                 136  AUXV
2ba9b1
-    HWCAP: 0
2ba9b1
-    PAGESZ: 4096
2ba9b1
-    CLKTCK: 100
2ba9b1
-    PHDR: 0x80000034
2ba9b1
-    PHENT: 32
2ba9b1
-    PHNUM: 9
2ba9b1
-    BASE: 0xc0000000
2ba9b1
-    FLAGS: 0
2ba9b1
-    ENTRY: 0x80000340
2ba9b1
-    UID: 1000
2ba9b1
-    EUID: 1000
2ba9b1
-    GID: 501
2ba9b1
-    EGID: 501
2ba9b1
-    SECURE: 0
2ba9b1
-    RANDOM: 0xefe716d9
2ba9b1
-    EXECFN: 0xefe71ff4
2ba9b1
-    NULL
2ba9b1
-  CORE                 281  FILE
2ba9b1
-    10 files:
2ba9b1
-      80000000-80001000 00000000 4096                /tmp/a.out
2ba9b1
-      80003000-80004000 00001000 4096                /tmp/a.out
2ba9b1
-      80004000-80005000 00002000 4096                /tmp/a.out
2ba9b1
-      c0000000-c001c000 00000000 114688              /lib/ld-2.23.so
2ba9b1
-      c001f000-c0020000 0001d000 4096                /lib/ld-2.23.so
2ba9b1
-      c0020000-c0021000 0001e000 4096                /lib/ld-2.23.so
2ba9b1
-      c0032000-c0177000 00000000 1331200             /lib/libc-2.23.so
2ba9b1
-      c0177000-c0178000 00145000 4096                /lib/libc-2.23.so
2ba9b1
-      c0178000-c017a000 00144000 8192                /lib/libc-2.23.so
2ba9b1
-      c017a000-c017e000 00146000 16384               /lib/libc-2.23.so
2ba9b1
-  CORE                 108  FPREGSET
2ba9b1
-    fp0: 0x7fff0000ffffffffffffffff  fp1: 0x7fff0000ffffffffffffffff
2ba9b1
-    fp2: 0x7fff0000ffffffffffffffff  fp3: 0x7fff0000ffffffffffffffff
2ba9b1
-    fp4: 0x7fff0000ffffffffffffffff  fp5: 0x7fff0000ffffffffffffffff
2ba9b1
-    fp6: 0x7fff0000ffffffffffffffff  fp7: 0x7fff0000ffffffffffffffff
2ba9b1
-EOF
2ba9b1
-
2ba9b1
-# To reproduce this core dump, do this on a riscv64 machine:
2ba9b1
-# $ gcc -x c <(echo 'int main () { return *(int *)0x12345678; }')
2ba9b1
-# $ ./a.out
2ba9b1
-testfiles testfile-riscv64-core
2ba9b1
-testrun_compare ${abs_top_builddir}/src/readelf -n testfile-riscv64-core <<\EOF
2ba9b1
-
2ba9b1
-Note segment of 1408 bytes at offset 0x388:
2ba9b1
-  Owner          Data size  Type
2ba9b1
-  CORE                 376  PRSTATUS
2ba9b1
-    info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11
2ba9b1
-    sigpend: <>
2ba9b1
-    sighold: <>
2ba9b1
-    pid: 6801, ppid: 1155, pgrp: 6801, sid: 1155
2ba9b1
-    utime: 0.000000, stime: 0.110000, cutime: 0.000000, cstime: 0.000000
2ba9b1
-    fpvalid: 0
2ba9b1
-    ra:    0x9a00000000000104  sp:    0x400000002000051c
2ba9b1
-    gp:    0x280000003fff9812  tp:    0xd000000000000128
2ba9b1
-    t0:   5764607523571106577  t1:   -432345563690696255
2ba9b1
-    t2:  -5764607522497362661  s0:   5764607523034235171
2ba9b1
-    s1:  -6629298650415654894  a0:     72057594037928196
2ba9b1
-    a1:  -6341068275337658368  a2:  -5188146769657096173
2ba9b1
-    a3:            1073715219  a4:   8646911284551352320
2ba9b1
-    a5:   8646911285625067538  a6:   1729382256911463510
2ba9b1
-    a7:             536876397  s2:  -1152921504606846976
2ba9b1
-    s3:   1152921505322686797  s4:             536871337
2ba9b1
-    s5:  -3458764513820540928  s6:  -9223372036138925403
2ba9b1
-    s7:             715843991  s8:  -2594073385365405696
2ba9b1
-    s9:   4611686019143218592  s10:            715850259
2ba9b1
-    s11:            715850393  t3:   -432345564227567616
2ba9b1
-    t4:    144115188075856379  t5:    216172782113783808
2ba9b1
-    t6:   1152921504606846976
2ba9b1
-  CORE                 136  PRPSINFO
2ba9b1
-    state: 0, sname: R, zomb: 0, nice: 0, flag: 0x0000000000400600
2ba9b1
-    uid: 0, gid: 0, pid: 6801, ppid: 1155, pgrp: 6801, sid: 1155
2ba9b1
-    fname: a.out, psargs: /tmp/a.out 
2ba9b1
-  CORE                 128  SIGINFO
2ba9b1
-    si_signo: 11, si_errno: 0, si_code: 1
2ba9b1
-    fault address: 0x12345678
2ba9b1
-  CORE                 288  AUXV
2ba9b1
-    SYSINFO_EHDR: 0x200001d000
2ba9b1
-    HWCAP: 0x1105
2ba9b1
-    PAGESZ: 4096
2ba9b1
-    CLKTCK: 100
2ba9b1
-    PHDR: 0x10040
2ba9b1
-    PHENT: 56
2ba9b1
-    PHNUM: 9
2ba9b1
-    BASE: 0x2000000000
2ba9b1
-    FLAGS: 0
2ba9b1
-    ENTRY: 0x103e0
2ba9b1
-    UID: 0
2ba9b1
-    EUID: 0
2ba9b1
-    GID: 0
2ba9b1
-    EGID: 0
2ba9b1
-    SECURE: 0
2ba9b1
-    RANDOM: 0x3fff9816d6
2ba9b1
-    EXECFN: 0x3fff981fed
2ba9b1
-    NULL
2ba9b1
-  CORE                 379  FILE
2ba9b1
-    9 files:
2ba9b1
-      00010000-00011000 00000000 4096                /tmp/a.out
2ba9b1
-      00011000-00012000 00000000 4096                /tmp/a.out
2ba9b1
-      00012000-00013000 00001000 4096                /tmp/a.out
2ba9b1
-      2000000000-200001a000 00000000 106496          /lib64/ld-2.27.so
2ba9b1
-      200001a000-200001b000 00019000 4096            /lib64/ld-2.27.so
2ba9b1
-      200001b000-200001c000 0001a000 4096            /lib64/ld-2.27.so
2ba9b1
-      2000032000-2000151000 00000000 1175552         /lib64/libc-2.27.so
2ba9b1
-      2000151000-2000155000 0011e000 16384           /lib64/libc-2.27.so
2ba9b1
-      2000155000-2000157000 00122000 8192            /lib64/libc-2.27.so
2ba9b1
-EOF
2ba9b1
-
2ba9b1
 exit 0
2ba9b1
diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh
2ba9b1
index 1303819..8024aa5 100755
2ba9b1
--- a/tests/run-strip-g.sh
2ba9b1
+++ b/tests/run-strip-g.sh
2ba9b1
@@ -49,31 +49,6 @@ if test $status -ne 1; then
2ba9b1
   exit 1
2ba9b1
 fi
2ba9b1
 
2ba9b1
-# arm (with data marker in .debug_frame). See tests/run-addrcfi.sh
2ba9b1
-testfiles testfilearm
2ba9b1
-
2ba9b1
-echo arm strip -g to file with debug file
2ba9b1
-testrun ${abs_top_builddir}/src/strip -g -o strip.out -f debug.out testfilearm ||
2ba9b1
-  { echo "*** failed to strip -g -o strip.out -f debug.out a.out"; exit -1; }
2ba9b1
-
2ba9b1
-status=0
2ba9b1
-testrun ${abs_top_builddir}/src/readelf -S strip.out > readelf.out
2ba9b1
-grep SYMTAB readelf.out || status=$?
2ba9b1
-echo $status
2ba9b1
-if test $status -ne 0; then
2ba9b1
-  echo no symtab found in strip.out
2ba9b1
-  exit 1
2ba9b1
-fi
2ba9b1
-
2ba9b1
-status=0
2ba9b1
-testrun ${abs_top_builddir}/src/readelf -S debug.out > readelf.out
2ba9b1
-grep SYMTAB readelf.out || status=$?
2ba9b1
-echo $status
2ba9b1
-if test $status -ne 1; then
2ba9b1
-  echo symtab found in debug.out
2ba9b1
-  exit 1
2ba9b1
-fi
2ba9b1
-
2ba9b1
 # aarch64 (with data marker in .debug_frame). See tests/run-addrcfi.sh
2ba9b1
 testfiles testfileaarch64
2ba9b1
 
2ba9b1
diff --git a/tests/run-strip-reloc.sh b/tests/run-strip-reloc.sh
2ba9b1
index bbc9f58..caa7eb5 100755
2ba9b1
--- a/tests/run-strip-reloc.sh
2ba9b1
+++ b/tests/run-strip-reloc.sh
2ba9b1
@@ -18,7 +18,7 @@
2ba9b1
 . $srcdir/test-subr.sh
2ba9b1
 
2ba9b1
 testfiles hello_i386.ko hello_x86_64.ko hello_ppc64.ko hello_s390.ko \
2ba9b1
-	hello_aarch64.ko hello_m68k.ko hello_riscv64.ko
2ba9b1
+	hello_aarch64.ko
2ba9b1
 
2ba9b1
 tempfiles readelf.out readelf.out1 readelf.out2
2ba9b1
 tempfiles out.stripped1 out.debug1 out.stripped2 out.debug2
2ba9b1
@@ -106,8 +106,6 @@ runtest hello_x86_64.ko 1
2ba9b1
 runtest hello_ppc64.ko 1
2ba9b1
 runtest hello_s390.ko 1
2ba9b1
 runtest hello_aarch64.ko 1
2ba9b1
-runtest hello_m68k.ko 1
2ba9b1
-runtest hello_riscv64.ko 1
2ba9b1
 
2ba9b1
 # self test, shouldn't impact non-ET_REL files at all.
2ba9b1
 runtest ${abs_top_builddir}/src/strip 0