def _parseRelocs(self):
        """
        Parse all the relocation entries out of any sections with
        sh_type == SHT_REL
        """
        for sec in self.sections:
            if sec.sh_type == SHT_REL:
                bytes = self.readAtOffset(sec.sh_offset, sec.sh_size)
                while bytes:
                    if self.bits == 32:
                        reloc = Elf32Reloc(self.r_types)
                    elif self.bits == 64:
                        reloc = Elf64Reloc(self.r_types)
                    else:
                        raise Exception('Platform not supported: %d' % (self.bits))
                    reloc.vsParse(bytes)
                    index = reloc.getSymTabIndex()
                    try:
                        sym = self.dynamic_symbols[index]
                        reloc.setName(sym.getName())
                    except:
                        traceback.print_exc()
                    self.relocs.append(reloc)
                    bytes = bytes[len(reloc):]

            elif sec.sh_type == SHT_RELA:
                bytes = self.readAtOffset(sec.sh_offset, sec.sh_size)
                while bytes:
                    if self.bits == 32:
                        reloc = Elf32Reloca(self.r_types)
                    elif self.bits == 64:
                        reloc = Elf64Reloca(self.r_types)
                    else:
                        raise Exception((self.bits) % 'Platform not supported: %d')
                    reloc.vsParse(bytes)
                    index = reloc.getSymTabIndex()
                    try:
                        sym = self.dynamic_symbols[index]
                        reloc.setName(sym.getName())
                    except:
                        traceback.print_exc()
                    self.relocs.append(reloc)
                    bytes = bytes[len(reloc):]
dataset/ETHPy150Open columbia/libtrack/libtrack/elfmod/Elf/__init__.py/Elf._parseRelocs/swapped operands of `%`