Blame SOURCES/elfutils-0.176-xlate-note.patch

4133cd
commit 28b5f578ae772bb2404c3847e4e22ad1c407af54
4133cd
Author: Mark Wielaard <mark@klomp.org>
4133cd
Date:   Tue Apr 30 13:00:17 2019 +0200
4133cd
4133cd
    libelf: If xlate can only convert the ELF note header, just do that.
4133cd
    
4133cd
    When we started parsing new style ELF_T_NHDR8 notes we added extra
4133cd
    checks on alignment and padding. When those failed we would stop
4133cd
    converting and just return the rest of the ELF Note unconverted.
4133cd
    In the case were we just had enough data for just the ELF Note header
4133cd
    and the destionation and source weren't the same we would then
4133cd
    accidentially throw away the Note header conversion we just did.
4133cd
    
4133cd
    Fix that by indicating we did correctly convert just the header.
4133cd
    
4133cd
    Adds testcase that compares parsing ELF notes with gelf_getnote
4133cd
    and parsing the raw data by hand using elf32_xlatetom using just
4133cd
    the Note header and ignoring the (raw) note data.
4133cd
    
4133cd
    Signed-off-by: Mark Wielaard <mark@klomp.org>
4133cd
4133cd
diff --git a/libelf/note_xlate.h b/libelf/note_xlate.h
4133cd
index bc9950f..7e2784b 100644
4133cd
--- a/libelf/note_xlate.h
4133cd
+++ b/libelf/note_xlate.h
4133cd
@@ -47,13 +47,25 @@ elf_cvt_note (void *dest, const void *src, size_t len, int encode,
4133cd
       note_len += n->n_namesz;
4133cd
       note_len = nhdr8 ? NOTE_ALIGN8 (note_len) : NOTE_ALIGN4 (note_len);
4133cd
       if (note_len > len || note_len < sizeof *n)
4133cd
-	break;
4133cd
+	{
4133cd
+	  /* Header was translated, nothing else.  */
4133cd
+	  len -= sizeof *n;
4133cd
+	  src += sizeof *n;
4133cd
+	  dest += sizeof *n;
4133cd
+	  break;
4133cd
+	}
4133cd
 
4133cd
       /* data as a whole needs to be aligned.  */
4133cd
       note_len += n->n_descsz;
4133cd
       note_len = nhdr8 ? NOTE_ALIGN8 (note_len) : NOTE_ALIGN4 (note_len);
4133cd
       if (note_len > len || note_len < sizeof *n)
4133cd
-	break;
4133cd
+	{
4133cd
+	  /* Header was translated, nothing else.  */
4133cd
+	  len -= sizeof *n;
4133cd
+	  src += sizeof *n;
4133cd
+	  dest += sizeof *n;
4133cd
+	  break;
4133cd
+	}
4133cd
 
4133cd
       /* Copy or skip the note data.  */
4133cd
       size_t note_data_len = note_len - sizeof *n;
4133cd
diff --git a/tests/Makefile.am b/tests/Makefile.am
4133cd
index 1b0c7d3..498c1db 100644
4133cd
--- a/tests/Makefile.am
4133cd
+++ b/tests/Makefile.am
4133cd
@@ -60,7 +60,7 @@ check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
4133cd
 		  fillfile dwarf_default_lower_bound dwarf-die-addr-die \
4133cd
 		  get-units-invalid get-units-split attr-integrate-skel \
4133cd
 		  all-dwarf-ranges unit-info next_cfi \
4133cd
-		  elfcopy addsections
4133cd
+		  elfcopy addsections xlate_notes
4133cd
 
4133cd
 asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
4133cd
 	    asm-tst6 asm-tst7 asm-tst8 asm-tst9
4133cd
@@ -159,7 +159,7 @@ TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
4133cd
 	run-next-cfi.sh run-next-cfi-self.sh \
4133cd
 	run-copyadd-sections.sh run-copymany-sections.sh \
4133cd
 	run-typeiter-many.sh run-strip-test-many.sh \
4133cd
-	run-strip-version.sh
4133cd
+	run-strip-version.sh run-xlate-note.sh
4133cd
 
4133cd
 if !BIARCH
4133cd
 export ELFUTILS_DISABLE_BIARCH = 1
4133cd
@@ -423,7 +423,8 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \
4133cd
 	     testfile-debug-rel-ppc64-g.o.bz2 \
4133cd
 	     testfile-debug-rel-ppc64-z.o.bz2 \
4133cd
 	     testfile-debug-rel-ppc64.o.bz2 \
4133cd
-	     run-strip-version.sh testfile-version.bz2
4133cd
+	     run-strip-version.sh testfile-version.bz2 \
4133cd
+	     run-xlate-note.sh
4133cd
 
4133cd
 if USE_VALGRIND
4133cd
 valgrind_cmd='valgrind -q --leak-check=full --error-exitcode=1'
4133cd
@@ -593,6 +594,7 @@ unit_info_LDADD = $(libdw)
4133cd
 next_cfi_LDADD = $(libelf) $(libdw)
4133cd
 elfcopy_LDADD = $(libelf)
4133cd
 addsections_LDADD = $(libelf)
4133cd
+xlate_notes_LDADD = $(libelf)
4133cd
 
4133cd
 # We want to test the libelf header against the system elf.h header.
4133cd
 # Don't include any -I CPPFLAGS. Except when we install our own elf.h.
4133cd
diff --git a/tests/run-xlate-note.sh b/tests/run-xlate-note.sh
4133cd
new file mode 100755
4133cd
index 0000000..a907418
4133cd
--- /dev/null
4133cd
+++ b/tests/run-xlate-note.sh
4133cd
@@ -0,0 +1,93 @@
4133cd
+# Copyright (C) 2019 Red Hat, Inc.
4133cd
+# This file is part of elfutils.
4133cd
+#
4133cd
+# This file is free software; you can redistribute it and/or modify
4133cd
+# it under the terms of the GNU General Public License as published by
4133cd
+# the Free Software Foundation; either version 3 of the License, or
4133cd
+# (at your option) any later version.
4133cd
+#
4133cd
+# elfutils is distributed in the hope that it will be useful, but
4133cd
+# WITHOUT ANY WARRANTY; without even the implied warranty of
4133cd
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4133cd
+# GNU General Public License for more details.
4133cd
+#
4133cd
+# You should have received a copy of the GNU General Public License
4133cd
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
4133cd
+
4133cd
+. $srcdir/test-subr.sh
4133cd
+
4133cd
+testfiles testfileppc32
4133cd
+testrun_compare ${abs_top_builddir}/tests/xlate_notes testfileppc32 << EOF
4133cd
+Notes in section 2:
4133cd
+type: 1,1, namesz: 4,4, descsz: 16,16
4133cd
+Notes in section 3:
4133cd
+type: 3,3, namesz: 4,4, descsz: 20,20
4133cd
+EOF
4133cd
+
4133cd
+testfiles testfileppc64
4133cd
+testrun_compare ${abs_top_builddir}/tests/xlate_notes testfileppc64 << EOF
4133cd
+Notes in section 2:
4133cd
+type: 1,1, namesz: 4,4, descsz: 16,16
4133cd
+Notes in section 3:
4133cd
+type: 3,3, namesz: 4,4, descsz: 20,20
4133cd
+EOF
4133cd
+
4133cd
+testfiles testfiles390
4133cd
+testrun_compare ${abs_top_builddir}/tests/xlate_notes testfiles390 << EOF
4133cd
+Notes in section 2:
4133cd
+type: 1,1, namesz: 4,4, descsz: 16,16
4133cd
+Notes in section 3:
4133cd
+type: 3,3, namesz: 4,4, descsz: 20,20
4133cd
+EOF
4133cd
+
4133cd
+testfiles testfiles390x
4133cd
+testrun_compare ${abs_top_builddir}/tests/xlate_notes testfiles390x << EOF
4133cd
+Notes in section 2:
4133cd
+type: 1,1, namesz: 4,4, descsz: 16,16
4133cd
+Notes in section 3:
4133cd
+type: 3,3, namesz: 4,4, descsz: 20,20
4133cd
+EOF
4133cd
+
4133cd
+testfiles testfileaarch64
4133cd
+testrun_compare ${abs_top_builddir}/tests/xlate_notes testfileaarch64 << EOF
4133cd
+Notes in section 2:
4133cd
+type: 1,1, namesz: 4,4, descsz: 16,16
4133cd
+Notes in section 3:
4133cd
+type: 3,3, namesz: 4,4, descsz: 20,20
4133cd
+EOF
4133cd
+
4133cd
+testfiles testfilearm
4133cd
+testrun_compare ${abs_top_builddir}/tests/xlate_notes testfilearm << EOF
4133cd
+Notes in section 2:
4133cd
+type: 1,1, namesz: 4,4, descsz: 16,16
4133cd
+Notes in section 3:
4133cd
+type: 3,3, namesz: 4,4, descsz: 20,20
4133cd
+EOF
4133cd
+
4133cd
+testfiles testfile_gnu_props.32be.o
4133cd
+testrun_compare ${abs_top_builddir}/tests/xlate_notes testfile_gnu_props.32be.o << EOF
4133cd
+Notes in section 4:
4133cd
+type: 5,5, namesz: 4,4, descsz: 12,12
4133cd
+type: 5,5, namesz: 4,4, descsz: 8,8
4133cd
+EOF
4133cd
+
4133cd
+testfiles testfile_gnu_props.32le.o
4133cd
+testrun_compare ${abs_top_builddir}/tests/xlate_notes testfile_gnu_props.32le.o << EOF
4133cd
+Notes in section 4:
4133cd
+type: 5,5, namesz: 4,4, descsz: 12,12
4133cd
+type: 5,5, namesz: 4,4, descsz: 8,8
4133cd
+EOF
4133cd
+
4133cd
+testfiles testfile_gnu_props.64be.o
4133cd
+testrun_compare ${abs_top_builddir}/tests/xlate_notes testfile_gnu_props.64be.o << EOF
4133cd
+Notes in section 4:
4133cd
+type: 5,5, namesz: 4,4, descsz: 16,16
4133cd
+type: 5,5, namesz: 4,4, descsz: 8,8
4133cd
+EOF
4133cd
+
4133cd
+testfiles testfile_gnu_props.64le.o
4133cd
+testrun_compare ${abs_top_builddir}/tests/xlate_notes testfile_gnu_props.64le.o << EOF
4133cd
+Notes in section 4:
4133cd
+type: 5,5, namesz: 4,4, descsz: 16,16
4133cd
+type: 5,5, namesz: 4,4, descsz: 8,8
4133cd
+EOF
4133cd
diff --git a/tests/xlate_notes.c b/tests/xlate_notes.c
4133cd
new file mode 100644
4133cd
index 0000000..90a4ae2
4133cd
--- /dev/null
4133cd
+++ b/tests/xlate_notes.c
4133cd
@@ -0,0 +1,157 @@
4133cd
+/* Test program for extracting ELF Note headers and getting whole notes.
4133cd
+   Copyright (C) 2019 Red Hat, Inc.
4133cd
+   This file is part of elfutils.
4133cd
+
4133cd
+   This file is free software; you can redistribute it and/or modify
4133cd
+   it under the terms of the GNU General Public License as published by
4133cd
+   the Free Software Foundation; either version 3 of the License, or
4133cd
+   (at your option) any later version.
4133cd
+
4133cd
+   elfutils is distributed in the hope that it will be useful, but
4133cd
+   WITHOUT ANY WARRANTY; without even the implied warranty of
4133cd
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4133cd
+   GNU General Public License for more details.
4133cd
+
4133cd
+   You should have received a copy of the GNU General Public License
4133cd
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
4133cd
+
4133cd
+#ifdef HAVE_CONFIG_H
4133cd
+# include <config.h>
4133cd
+#endif
4133cd
+
4133cd
+#include <errno.h>
4133cd
+#include <fcntl.h>
4133cd
+#include <inttypes.h>
4133cd
+#include <stdio.h>
4133cd
+#include <stdlib.h>
4133cd
+#include <string.h>
4133cd
+#include <unistd.h>
4133cd
+
4133cd
+#include ELFUTILS_HEADER(elf)
4133cd
+#include <gelf.h>
4133cd
+
4133cd
+int
4133cd
+main (int argc, char *argv[])
4133cd
+{
4133cd
+  if (argc != 2)
4133cd
+    {
4133cd
+      printf ("No ELF file given as argument\n");
4133cd
+      exit (1);
4133cd
+    }
4133cd
+
4133cd
+  const char *fname = argv[1];
4133cd
+
4133cd
+  // Initialize libelf.
4133cd
+  elf_version (EV_CURRENT);
4133cd
+
4133cd
+  /* Read the ELF from disk now.  */
4133cd
+  int fd = open (fname, O_RDONLY);
4133cd
+  if (fd == -1)
4133cd
+    {
4133cd
+      printf ("cannot open '%s': %s\n", fname, strerror (errno));
4133cd
+      exit (1);
4133cd
+    }
4133cd
+
4133cd
+  Elf *elf = elf_begin (fd, ELF_C_READ, NULL);
4133cd
+  if (elf == NULL)
4133cd
+    {
4133cd
+      printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
4133cd
+      exit (1);
4133cd
+    }
4133cd
+
4133cd
+  GElf_Ehdr ehdr;
4133cd
+  if (gelf_getehdr (elf, &ehdr) == NULL)
4133cd
+    {
4133cd
+      printf ("cannot get Ehdr: %s\n", elf_errmsg (-1));
4133cd
+      exit (1);
4133cd
+    }
4133cd
+
4133cd
+  /* Search for all SHT_NOTE sections.  */
4133cd
+  Elf_Scn *scn = NULL;
4133cd
+  while ((scn = elf_nextscn (elf, scn)) != NULL)
4133cd
+    {
4133cd
+      /* Get the header.  */
4133cd
+      GElf_Shdr shdr;
4133cd
+      if (gelf_getshdr (scn, &shdr) == NULL)
4133cd
+	{
4133cd
+	  printf ("couldn't get shdr: %s\n", elf_errmsg (-1));
4133cd
+	  exit (1);
4133cd
+	}
4133cd
+
4133cd
+      if (shdr.sh_type == SHT_NOTE)
4133cd
+	{
4133cd
+	  printf ("Notes in section %zd:\n", elf_ndxscn (scn));
4133cd
+
4133cd
+	  Elf_Data *raw = elf_rawdata (scn, NULL);
4133cd
+	  if (raw == NULL)
4133cd
+	    {
4133cd
+	      printf ("couldn't get raw data: %s\n", elf_errmsg (-1));
4133cd
+	      exit (1);
4133cd
+	    }
4133cd
+
4133cd
+	  Elf_Data *data = elf_getdata (scn, NULL);
4133cd
+	  if (data == NULL)
4133cd
+	    {
4133cd
+	      printf ("couldn't get data: %s\n", elf_errmsg (-1));
4133cd
+	      exit (1);
4133cd
+	    }
4133cd
+
4133cd
+	  size_t off = 0;
4133cd
+	  size_t next;
4133cd
+	  GElf_Nhdr nhdr;
4133cd
+	  size_t n_off;
4133cd
+	  size_t d_off;
4133cd
+	  while ((next = gelf_getnote (data, off, &nhdr, &n_off, &d_off)) > 0)
4133cd
+	    {
4133cd
+	      /* Now just get the note header "raw" (don't
4133cd
+		 copy/translate the note data). This only handles
4133cd
+		 traditional GNU ELF Notes, so we still use the next
4133cd
+		 from gelf_getnote (padding is different for new style
4133cd
+		 ELF_T_NHDR8 notes).  */
4133cd
+	      Elf32_Nhdr nh;
4133cd
+	      Elf_Data src =
4133cd
+                {
4133cd
+                  .d_version = EV_CURRENT, .d_type = ELF_T_NHDR,
4133cd
+		  .d_size = sizeof nh
4133cd
+                };
4133cd
+	      Elf_Data dst = src;
4133cd
+	      src.d_buf = raw->d_buf + off;
4133cd
+	      dst.d_buf = &nh;
4133cd
+
4133cd
+	      if (elf32_xlatetom (&dst, &src, ehdr.e_ident[EI_DATA]) == NULL)
4133cd
+		{
4133cd
+		  printf ("couldn't xlate note: %s\n", elf_errmsg (-1));
4133cd
+		  exit (1);
4133cd
+		}
4133cd
+
4133cd
+	      printf ("type: %" PRId32 ",%" PRId32
4133cd
+		      ", namesz: %" PRId32 ",%" PRId32
4133cd
+		      ", descsz: %" PRId32 ",%" PRId32 "\n",
4133cd
+		      nhdr.n_type, nh.n_type,
4133cd
+		      nhdr.n_namesz, nh.n_namesz,
4133cd
+		      nhdr.n_descsz, nh.n_descsz);
4133cd
+
4133cd
+	      if (nhdr.n_type != nh.n_type
4133cd
+		  || nhdr.n_namesz != nh.n_namesz
4133cd
+		  || nhdr.n_descsz != nh.n_descsz)
4133cd
+		{
4133cd
+		  printf ("Nhdrs not equal!\n");
4133cd
+		  exit (1);
4133cd
+		}
4133cd
+
4133cd
+	      off = next;
4133cd
+	    }
4133cd
+	}
4133cd
+
4133cd
+    }
4133cd
+
4133cd
+  if (elf_end (elf) != 0)
4133cd
+    {
4133cd
+      printf ("failure in elf_end: %s\n", elf_errmsg (-1));
4133cd
+      exit (1);
4133cd
+    }
4133cd
+
4133cd
+  close (fd);
4133cd
+
4133cd
+  return 0;
4133cd
+}
4133cd
diff -ur elfutils-0.176.orig/tests/Makefile.in elfutils-0.176/tests/Makefile.in
4133cd
--- elfutils-0.176.orig/tests/Makefile.in	2019-04-30 22:42:49.534655124 +0200
4133cd
+++ elfutils-0.176/tests/Makefile.in	2019-04-30 22:46:30.046656790 +0200
4133cd
@@ -131,8 +131,8 @@
4133cd
 	get-units-invalid$(EXEEXT) get-units-split$(EXEEXT) \
4133cd
 	attr-integrate-skel$(EXEEXT) all-dwarf-ranges$(EXEEXT) \
4133cd
 	unit-info$(EXEEXT) next_cfi$(EXEEXT) elfcopy$(EXEEXT) \
4133cd
-	addsections$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \
4133cd
-	$(am__EXEEXT_4)
4133cd
+	addsections$(EXEEXT) xlate_notes$(EXEEXT) $(am__EXEEXT_1) \
4133cd
+	$(am__EXEEXT_2) $(am__EXEEXT_4)
4133cd
 @BIARCH_TRUE@am__append_5 = backtrace-child-biarch
4133cd
 TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile$(EXEEXT) \
4133cd
 	test-nlist$(EXEEXT) update1$(EXEEXT) update2$(EXEEXT) \
4133cd
@@ -211,8 +211,8 @@
4133cd
 	run-unit-info.sh run-reloc-bpf.sh run-next-cfi.sh \
4133cd
 	run-next-cfi-self.sh run-copyadd-sections.sh \
4133cd
 	run-copymany-sections.sh run-typeiter-many.sh \
4133cd
-	run-strip-test-many.sh run-strip-version.sh $(am__EXEEXT_2) \
4133cd
-	$(am__append_8) $(am__EXEEXT_5)
4133cd
+	run-strip-test-many.sh run-strip-version.sh run-xlate-note.sh \
4133cd
+	$(am__EXEEXT_2) $(am__append_8) $(am__EXEEXT_5)
4133cd
 @STANDALONE_FALSE@am__append_6 = msg_tst system-elf-libelf-test
4133cd
 @STANDALONE_FALSE@am__append_7 = msg_tst system-elf-libelf-test
4133cd
 @LZMA_TRUE@am__append_8 = run-readelf-s.sh run-dwflsyms.sh
4133cd
@@ -606,6 +606,9 @@
4133cd
 vendorelf_SOURCES = vendorelf.c
4133cd
 vendorelf_OBJECTS = vendorelf.$(OBJEXT)
4133cd
 vendorelf_DEPENDENCIES = $(am__DEPENDENCIES_2)
4133cd
+xlate_notes_SOURCES = xlate_notes.c
4133cd
+xlate_notes_OBJECTS = xlate_notes.$(OBJEXT)
4133cd
+xlate_notes_DEPENDENCIES = $(am__DEPENDENCIES_2)
4133cd
 zstrptr_SOURCES = zstrptr.c
4133cd
 zstrptr_OBJECTS = zstrptr.$(OBJEXT)
4133cd
 zstrptr_DEPENDENCIES = $(am__DEPENDENCIES_2)
4133cd
@@ -683,7 +686,7 @@
4133cd
 	./$(DEPDIR)/update2.Po ./$(DEPDIR)/update3.Po \
4133cd
 	./$(DEPDIR)/update4.Po ./$(DEPDIR)/varlocs.Po \
4133cd
 	./$(DEPDIR)/vdsosyms.Po ./$(DEPDIR)/vendorelf.Po \
4133cd
-	./$(DEPDIR)/zstrptr.Po
4133cd
+	./$(DEPDIR)/xlate_notes.Po ./$(DEPDIR)/zstrptr.Po
4133cd
 am__mv = mv -f
4133cd
 AM_V_lt = $(am__v_lt_@AM_V@)
4133cd
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
4133cd
@@ -726,7 +729,8 @@
4133cd
 	showptable.c strptr.c system-elf-libelf-test.c \
4133cd
 	test-elf_cntl_gelf_getshdr.c test-flag-nobits.c test-nlist.c \
4133cd
 	typeiter.c typeiter2.c unit-info.c update1.c update2.c \
4133cd
-	update3.c update4.c varlocs.c vdsosyms.c vendorelf.c zstrptr.c
4133cd
+	update3.c update4.c varlocs.c vdsosyms.c vendorelf.c \
4133cd
+	xlate_notes.c zstrptr.c
4133cd
 DIST_SOURCES = addrcfi.c addrscopes.c addsections.c aggregate_size.c \
4133cd
 	all-dwarf-ranges.c alldts.c allfcts.c allregs.c arextract.c \
4133cd
 	arls.c arsymtest.c asm-tst1.c asm-tst2.c asm-tst3.c asm-tst4.c \
4133cd
@@ -752,7 +756,8 @@
4133cd
 	showptable.c strptr.c system-elf-libelf-test.c \
4133cd
 	test-elf_cntl_gelf_getshdr.c test-flag-nobits.c test-nlist.c \
4133cd
 	typeiter.c typeiter2.c unit-info.c update1.c update2.c \
4133cd
-	update3.c update4.c varlocs.c vdsosyms.c vendorelf.c zstrptr.c
4133cd
+	update3.c update4.c varlocs.c vdsosyms.c vendorelf.c \
4133cd
+	xlate_notes.c zstrptr.c
4133cd
 am__can_run_installinfo = \
4133cd
   case $$AM_UPDATE_INFO_DIR in \
4133cd
     n|no|NO) false;; \
4133cd
@@ -1405,7 +1410,8 @@
4133cd
 	     testfile-debug-rel-ppc64-g.o.bz2 \
4133cd
 	     testfile-debug-rel-ppc64-z.o.bz2 \
4133cd
 	     testfile-debug-rel-ppc64.o.bz2 \
4133cd
-	     run-strip-version.sh testfile-version.bz2
4133cd
+	     run-strip-version.sh testfile-version.bz2 \
4133cd
+	     run-xlate-note.sh
4133cd
 
4133cd
 @USE_VALGRIND_TRUE@valgrind_cmd = 'valgrind -q --leak-check=full --error-exitcode=1'
4133cd
 installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \
4133cd
@@ -1559,6 +1565,7 @@
4133cd
 next_cfi_LDADD = $(libelf) $(libdw)
4133cd
 elfcopy_LDADD = $(libelf)
4133cd
 addsections_LDADD = $(libelf)
4133cd
+xlate_notes_LDADD = $(libelf)
4133cd
 
4133cd
 # We want to test the libelf header against the system elf.h header.
4133cd
 # Don't include any -I CPPFLAGS. Except when we install our own elf.h.
4133cd
@@ -2011,6 +2018,10 @@
4133cd
 	@rm -f vendorelf$(EXEEXT)
4133cd
 	$(AM_V_CCLD)$(LINK) $(vendorelf_OBJECTS) $(vendorelf_LDADD) $(LIBS)
4133cd
 
4133cd
+xlate_notes$(EXEEXT): $(xlate_notes_OBJECTS) $(xlate_notes_DEPENDENCIES) $(EXTRA_xlate_notes_DEPENDENCIES) 
4133cd
+	@rm -f xlate_notes$(EXEEXT)
4133cd
+	$(AM_V_CCLD)$(LINK) $(xlate_notes_OBJECTS) $(xlate_notes_LDADD) $(LIBS)
4133cd
+
4133cd
 zstrptr$(EXEEXT): $(zstrptr_OBJECTS) $(zstrptr_DEPENDENCIES) $(EXTRA_zstrptr_DEPENDENCIES) 
4133cd
 	@rm -f zstrptr$(EXEEXT)
4133cd
 	$(AM_V_CCLD)$(LINK) $(zstrptr_OBJECTS) $(zstrptr_LDADD) $(LIBS)
4133cd
@@ -2124,6 +2135,7 @@
4133cd
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/varlocs.Po@am__quote@ # am--include-marker
4133cd
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vdsosyms.Po@am__quote@ # am--include-marker
4133cd
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vendorelf.Po@am__quote@ # am--include-marker
4133cd
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xlate_notes.Po@am__quote@ # am--include-marker
4133cd
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zstrptr.Po@am__quote@ # am--include-marker
4133cd
 
4133cd
 $(am__depfiles_remade):
4133cd
@@ -3732,6 +3744,13 @@
4133cd
 	--log-file $$b.log --trs-file $$b.trs \
4133cd
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
4133cd
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
4133cd
+run-xlate-note.sh.log: run-xlate-note.sh
4133cd
+	@p='run-xlate-note.sh'; \
4133cd
+	b='run-xlate-note.sh'; \
4133cd
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
4133cd
+	--log-file $$b.log --trs-file $$b.trs \
4133cd
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
4133cd
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
4133cd
 msg_tst.log: msg_tst$(EXEEXT)
4133cd
 	@p='msg_tst$(EXEEXT)'; \
4133cd
 	b='msg_tst'; \
4133cd
@@ -4027,6 +4046,7 @@
4133cd
 	-rm -f ./$(DEPDIR)/varlocs.Po
4133cd
 	-rm -f ./$(DEPDIR)/vdsosyms.Po
4133cd
 	-rm -f ./$(DEPDIR)/vendorelf.Po
4133cd
+	-rm -f ./$(DEPDIR)/xlate_notes.Po
4133cd
 	-rm -f ./$(DEPDIR)/zstrptr.Po
4133cd
 	-rm -f Makefile
4133cd
 distclean-am: clean-am distclean-compile distclean-generic \
4133cd
@@ -4176,6 +4196,7 @@
4133cd
 	-rm -f ./$(DEPDIR)/varlocs.Po
4133cd
 	-rm -f ./$(DEPDIR)/vdsosyms.Po
4133cd
 	-rm -f ./$(DEPDIR)/vendorelf.Po
4133cd
+	-rm -f ./$(DEPDIR)/xlate_notes.Po
4133cd
 	-rm -f ./$(DEPDIR)/zstrptr.Po
4133cd
 	-rm -f Makefile
4133cd
 maintainer-clean-am: distclean-am maintainer-clean-generic