diff options
Diffstat (limited to 'gold/gdb-index.cc')
-rw-r--r-- | gold/gdb-index.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gold/gdb-index.cc b/gold/gdb-index.cc index a6db505..6666988 100644 --- a/gold/gdb-index.cc +++ b/gold/gdb-index.cc @@ -823,9 +823,15 @@ Gdb_index_info_reader::record_cu_ranges(Dwarf_die* die) return; } - off_t low_pc = die->ref_attribute(elfcpp::DW_AT_low_pc, &shndx); - off_t high_pc = die->ref_attribute(elfcpp::DW_AT_high_pc, &shndx2); - if ((low_pc != 0 || high_pc != 0) && low_pc != -1 && high_pc != -1) + off_t low_pc = die->address_attribute(elfcpp::DW_AT_low_pc, &shndx); + off_t high_pc = die->address_attribute(elfcpp::DW_AT_high_pc, &shndx2); + if (high_pc == -1) + { + high_pc = die->uint_attribute(elfcpp::DW_AT_high_pc); + high_pc += low_pc; + shndx2 = shndx; + } + if ((low_pc != 0 || high_pc != 0) && low_pc != -1) { if (shndx != shndx2) { |