Blame SOURCES/binutils-missing-notes.patch

869a11
--- binutils.orig/gas/write.c	2018-07-06 11:49:29.149532896 +0100
869a11
+++ binutils-2.30/gas/write.c	2018-07-06 11:49:37.550441810 +0100
869a11
@@ -1963,7 +1963,7 @@ maybe_generate_build_notes (void)
869a11
     if (sym->bsym != NULL
869a11
 	&& sym->bsym->flags & BSF_SECTION_SYM
869a11
 	&& sym->bsym->section != NULL
869a11
-	/* Skip linkonce sections - we cannot these section symbols as they may disappear.  */
869a11
+	/* Skip linkonce sections - we cannot use these section symbols as they may disappear.  */
869a11
 	&& (sym->bsym->section->flags & (SEC_CODE | SEC_LINK_ONCE)) == SEC_CODE
869a11
 	/* Not all linkonce sections are flagged...  */
869a11
 	&& strncmp (S_GET_NAME (sym), ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) != 0)
869a11
@@ -1993,10 +1993,10 @@ maybe_generate_build_notes (void)
869a11
 	memcpy (note + 12, "GA$?3a1", 8);
869a11
 
869a11
 	/* Create a relocation to install the start address of the note...  */
869a11
-	create_note_reloc (sec, sym, 20, desc_reloc, 0, note);
869a11
+	create_note_reloc (sec, sym, total_size + 20, desc_reloc, 0, note);
869a11
 
869a11
 	/* ...and another one to install the end address.  */
869a11
-	create_note_reloc (sec, sym, desc2_offset, desc_reloc,
869a11
+	create_note_reloc (sec, sym, total_size + desc2_offset, desc_reloc,
869a11
 			   bfd_get_section_size (sym->bsym->section),
869a11
 			   note);
869a11