binutils/SOURCES/binutils-missing-notes.patch
2021-10-08 09:55:04 +00:00

25 lines
1.2 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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