Lines 137-143
static bool get_build_id(bfd * ibfd, uns
Link Here
|
137 |
} |
137 |
} |
138 |
} |
138 |
} |
139 |
|
139 |
|
140 |
bfd_size_type buildid_sect_size = bfd_section_size(ibfd, sect); |
140 |
bfd_size_type buildid_sect_size = bfd_section_size(sect); |
141 |
char * contents = (char *) xmalloc(buildid_sect_size); |
141 |
char * contents = (char *) xmalloc(buildid_sect_size); |
142 |
errno = 0; |
142 |
errno = 0; |
143 |
if (!bfd_get_section_contents(ibfd, sect, |
143 |
if (!bfd_get_section_contents(ibfd, sect, |
Lines 188-194
bool get_debug_link_info(bfd * ibfd, str
Link Here
|
188 |
if (sect == NULL) |
188 |
if (sect == NULL) |
189 |
return false; |
189 |
return false; |
190 |
|
190 |
|
191 |
bfd_size_type debuglink_size = bfd_section_size(ibfd, sect); |
191 |
bfd_size_type debuglink_size = bfd_section_size(sect); |
192 |
char * contents = (char *) xmalloc(debuglink_size); |
192 |
char * contents = (char *) xmalloc(debuglink_size); |
193 |
cverb << vbfd |
193 |
cverb << vbfd |
194 |
<< ".gnu_debuglink section has size " << debuglink_size << endl; |
194 |
<< ".gnu_debuglink section has size " << debuglink_size << endl; |
Lines 346-352
void fixup_linenr(bfd * abfd, asection *
Link Here
|
346 |
// first restrict the search on a sensible range of vma, 16 is |
346 |
// first restrict the search on a sensible range of vma, 16 is |
347 |
// an intuitive value based on epilog code look |
347 |
// an intuitive value based on epilog code look |
348 |
size_t max_search = 16; |
348 |
size_t max_search = 16; |
349 |
size_t section_size = bfd_section_size(abfd, section); |
349 |
size_t section_size = bfd_section_size(section); |
350 |
if (pc + max_search > section_size) |
350 |
if (pc + max_search > section_size) |
351 |
max_search = section_size - pc; |
351 |
max_search = section_size - pc; |
352 |
|
352 |
|
Lines 819-828
find_nearest_line(bfd_info const & b, op
Link Here
|
819 |
else |
819 |
else |
820 |
pc = (sym.value() + offset) - sym.filepos(); |
820 |
pc = (sym.value() + offset) - sym.filepos(); |
821 |
|
821 |
|
822 |
if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0) |
822 |
if ((bfd_section_flags(section) & SEC_ALLOC) == 0) |
823 |
goto fail; |
823 |
goto fail; |
824 |
|
824 |
|
825 |
if (pc >= bfd_section_size(abfd, section)) |
825 |
if (pc >= bfd_section_size(section)) |
826 |
goto fail; |
826 |
goto fail; |
827 |
|
827 |
|
828 |
ret = bfd_find_nearest_line(abfd, section, syms, pc, &cfilename, |
828 |
ret = bfd_find_nearest_line(abfd, section, syms, pc, &cfilename, |