[diffoscope] [PATCH] Implement ElfFile as a container of sections

Dhole dhole at openmailbox.org
Wed Jan 20 00:26:22 CET 2016


On 01/18/2016 07:03 PM, Jérémy Bobbio wrote:
> Dhole:
>> This works perfectly :) I've implemented it in the revision I'm attaching.
>>
>> Let me know what you think.
> 
> Commited. Many thanks! This fixes Debian #808197.

Cool!

> I just made a tiny change:
> 
>> +class ElfContainer(Container):
>> +    _sec_types = {'X': ElfCodeSection, 'S': ElfStringSection, '_': ElfSection}
>        ^^^^^^^^^^
> 
> This is a constant, so I've renamed this to `SECTION_TYPES`.
> 
>> +                type = [self._sec_types[type] for type in flag if \
>> +                        type in self._sec_types][0]
> 
> Even if it works, I think using `self` here is misleading as we are
> using a class constant. I've replaced it with `ElfContainer`.

Those tiny changes look good :)

I've seen all the commits you pushed today, great work!

I would like to complement this series of patches with what I think is
the only remaining thing mentioned by Mike Hommey: split the output from
`readelf --debug-dump`.

I'm attaching the patch, which I believe should truly close Debian Bug
#808197.
As always any comments or improvement suggestions welcome.

And feel free to make any change if you see fit.

-- 
Dhole
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Split-readelf-debug-dump-output-when-examining-ELF-f.patch
Type: text/x-patch
Size: 2047 bytes
Desc: not available
URL: <http://lists.reproducible-builds.org/pipermail/diffoscope/attachments/20160120/9ed9cfaa/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.reproducible-builds.org/pipermail/diffoscope/attachments/20160120/9ed9cfaa/attachment.sig>


More information about the diffoscope mailing list