Backport binutils upstream patch fixing sporadic link errors in c++ code.
This triggers at least on arm32 and aarch64 with qt5 based applications.

The ChangeLog part of the patch as well as space change is omitted.

Binutils bug report for this problem is here:
https://sourceware.org/bugzilla/show_bug.cgi?id=26520

Signed-off-by: Marek Vasut <ma...@denx.de>
Cc: Richard Purdie <richard.pur...@linuxfoundation.org>
Cc: Steve Sakoman <st...@sakoman.com>
---
 .../binutils/binutils-2.34.inc                |  1 +
 ...in-the-variable-table-used-when-reso.patch | 32 +++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 
meta/recipes-devtools/binutils/binutils/0018-Include-members-in-the-variable-table-used-when-reso.patch

diff --git a/meta/recipes-devtools/binutils/binutils-2.34.inc 
b/meta/recipes-devtools/binutils/binutils-2.34.inc
index 6104bec591..903b9d7b01 100644
--- a/meta/recipes-devtools/binutils/binutils-2.34.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.34.inc
@@ -42,6 +42,7 @@ SRC_URI = "\
      file://0015-sync-with-OE-libtool-changes.patch \
      file://0016-Check-for-clang-before-checking-gcc-version.patch \
      file://0017-binutils-drop-redundant-program_name-definition-fno-.patch \
+     file://0018-Include-members-in-the-variable-table-used-when-reso.patch \
      file://CVE-2020-0551.patch \
      file://0001-gas-improve-reproducibility-for-stabs-debugging-data.patch \
      file://CVE-2020-16592.patch \
diff --git 
a/meta/recipes-devtools/binutils/binutils/0018-Include-members-in-the-variable-table-used-when-reso.patch
 
b/meta/recipes-devtools/binutils/binutils/0018-Include-members-in-the-variable-table-used-when-reso.patch
new file mode 100644
index 0000000000..dc1e09d46b
--- /dev/null
+++ 
b/meta/recipes-devtools/binutils/binutils/0018-Include-members-in-the-variable-table-used-when-reso.patch
@@ -0,0 +1,32 @@
+From bf2252dca8c76e4c1f1c2dbf98dab7ffc9f5e5af Mon Sep 17 00:00:00 2001
+From: Nick Clifton <ni...@redhat.com>
+Date: Sat, 29 Aug 2020 08:03:15 +0100
+Subject: [PATCH] Include members in the variable table used when resolving
+ DW_AT_specification tags.
+
+       PR 26520
+       * dwarf2.c (scan_unit_for_symbols): Add member entries to the
+       variable table.
+
+Upstream-Status: Backport 
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e6f04d55f681149a69102a73937d0987719c3f16]
+---
+ bfd/dwarf2.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
+index dd3568a8532..ef2f6a3c63c 100644
+--- a/bfd/dwarf2.c
++++ b/bfd/dwarf2.c
+@@ -3248,7 +3248,8 @@ scan_unit_for_symbols (struct comp_unit *unit)
+       else
+       {
+         func = NULL;
+-        if (abbrev->tag == DW_TAG_variable)
++        if (abbrev->tag == DW_TAG_variable
++            || abbrev->tag == DW_TAG_member)
+           {
+             bfd_size_type amt = sizeof (struct varinfo);
+             var = (struct varinfo *) bfd_zalloc (abfd, amt);
+-- 
+2.34.1
+
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160861): 
https://lists.openembedded.org/g/openembedded-core/message/160861
Mute This Topic: https://lists.openembedded.org/mt/88618210/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to