mirror of https://github.com/vitalif/grive2
[SymbolInfo.cc] Support compilation with binutils >= 2.33.1 on Debian.
bfd_get_section_vma macro was removed. bfd_section_size changed signature. See inline comment for details.pull/299/head
parent
a3cce71643
commit
b4d6ac055f
|
@ -118,13 +118,20 @@ void SymbolInfo::BacktraceInfo::Callback( bfd *abfd, asection *section,
|
||||||
if ((section->flags & SEC_ALLOC) == 0)
|
if ((section->flags & SEC_ALLOC) == 0)
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
bfd_vma vma = bfd_get_section_vma(abfd, section);
|
// bfd_get_section_vma works up to 7b1cfbcf1a27951fb1b3a212995075dd6fdf985b,
|
||||||
|
// removed in 7c13bc8c91abf291f0206b6608b31955c5ea70d8 (binutils 2.33.1 or so)
|
||||||
|
// so it's substituted by its implementation to avoid checking for binutils
|
||||||
|
// version (which at least on Debian SID it's not that easy because the
|
||||||
|
// version.h is not included with the official package)
|
||||||
|
bfd_vma vma = section->vma;
|
||||||
|
|
||||||
unsigned long address = (unsigned long)(info->m_addr);
|
unsigned long address = (unsigned long)(info->m_addr);
|
||||||
if ( address < vma )
|
if ( address < vma )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bfd_size_type size = bfd_section_size(abfd, section);
|
// bfd_section_size changed between the two objects described above,
|
||||||
|
// same rationale applies
|
||||||
|
bfd_size_type size = section->size;
|
||||||
if ( address > (vma + size))
|
if ( address > (vma + size))
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue