Apparently, some shared libraries from TCL can have a section of type
SHT_PROGBITS in the .dynamic segment. get_soname_of_elf_file
unexpectedly encounters this when trying to poke at the soname of the
usr/lib/irsim/tcl/diglib.so library and asserts out. It was expecting
the section to be of type SHT_DYNAMIC, obviously. The different
between theory and practise, I guess. Fixed thus.
This fixes the run of the following command:
$ fedabipkgdiff --self-compare --from fc36 irsim
* src/abg-dwarf-reader.cc (get_soname_of_elf_file): Accept
SHT_PROGBITS sections in the dynamic segment.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
: gelf_fsize (elf, ELF_T_DYN, 1, EV_CURRENT));
int maxcnt = (shdr != NULL
? shdr->sh_size / entsize : INT_MAX);
- ABG_ASSERT (shdr == NULL || shdr->sh_type == SHT_DYNAMIC);
+ ABG_ASSERT (shdr == NULL || (shdr->sh_type == SHT_DYNAMIC
+ || shdr->sh_type == SHT_PROGBITS));
Elf_Data* data = elf_getdata (scn, NULL);
if (data == NULL)
break;