diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-03-18 18:34:38 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-03-18 18:34:48 -0700 |
commit | 51f6e7a9f4210aed0f8156c1d2e348de6f96f37d (patch) | |
tree | 46e67b86dcd68881082f402958821056ab2e5d5b /bfd/dwarf2.c | |
parent | fb099b8a51906d2189e8f1ba4dcda1f85ff0a78d (diff) | |
download | gdb-51f6e7a9f4210aed0f8156c1d2e348de6f96f37d.zip gdb-51f6e7a9f4210aed0f8156c1d2e348de6f96f37d.tar.gz gdb-51f6e7a9f4210aed0f8156c1d2e348de6f96f37d.tar.bz2 |
DWARF: Check version >= 3 for DW_FORM_ref_addr
Check version >= 3, instead of version == 3 || version == 4, for
DW_FORM_ref_addr.
bfd/
PR ld/27587
* dwarf2.c (read_attribute_value): Check version >= 3 for
DW_FORM_ref_addr.
ld/
PR ld/27587
* testsuite/ld-x86-64/pr27587.err: New file.
* testsuite/ld-x86-64/pr27587a.obj.bz2: Likewise.
* testsuite/ld-x86-64/pr27587b.obj.bz2: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/27587 test.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r-- | bfd/dwarf2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index b42e641..1d5ddef 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -1213,7 +1213,7 @@ read_attribute_value (struct attribute * attr, case DW_FORM_ref_addr: /* DW_FORM_ref_addr is an address in DWARF2, and an offset in DWARF3. */ - if (unit->version == 3 || unit->version == 4) + if (unit->version >= 3) { if (unit->offset_size == 4) attr->u.val = read_4_bytes (unit->abfd, info_ptr, info_ptr_end); |