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