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

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