aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-09-24 13:42:04 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2020-10-21 00:54:49 +0300
commit6afbe387ab5b7f8f56e9d2c69b2097d6900bc044 (patch)
tree7f4ac4cbb3b387e751b35a3c29ae1c2afb6dd4ff
parent[GOLD] PowerPC64 __tls_get_addr_opt stub (diff)
downloadbinutils-gdb-6afbe387ab5b7f8f56e9d2c69b2097d6900bc044.tar.gz
binutils-gdb-6afbe387ab5b7f8f56e9d2c69b2097d6900bc044.tar.bz2
binutils-gdb-6afbe387ab5b7f8f56e9d2c69b2097d6900bc044.zip
Import patch from mainline to fix decoding DWARF information in the BFD library.
PR 26520 * dwarf2.c (scan_unit_for_symbols): Add member entries to the variable table. (cherry picked from commit 269d40a2ef3b020b5beb3f3de5b8e909c43ab53b)
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/dwarf2.c5
2 files changed, 12 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index da976cac0f..49232b84c5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+2020-09-24 Nick Clifton <nickc@redhat.com>
+
+ Import from mainline:
+ 2020-08-29 Nick Clifton <nickc@redhat.com>
+
+ PR 26520
+ * dwarf2.c (scan_unit_for_symbols): Add member entries to the
+ variable table.
+
2020-09-24 Alan Modra <amodra@gmail.com>
PR 26656
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index b8f0008a10..977bf43a6a 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -3404,7 +3404,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)
{
size_t amt = sizeof (struct varinfo);
var = (struct varinfo *) bfd_zalloc (abfd, amt);
@@ -3516,7 +3517,7 @@ scan_unit_for_symbols (struct comp_unit *unit)
spec_var = lookup_var_by_offset (attr.u.val,
unit->variable_table);
if (spec_var == NULL)
- {
+ {
_bfd_error_handler (_("DWARF error: could not find "
"variable specification "
"at offset %lx"),