[diffoscope] Need a way to select objdump for different architectures
Martin Husemann
martin at NetBSD.org
Fri Jul 4 17:34:12 UTC 2025
Hi folks,
I am trying to use diffoscoe to find differences in builds generated for
atari and this is quite tricky due to the native objdump not being able
to decode atari elf binaries.
The suggested workaround in
https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/375
does not work with current diffoscope, if I make the m68k objdump available
as "objdump" in some dir in my $PATH early diffoscope will fail to start
up at all - apparently the ffi code accessing libarchive.so requires a
native objdump.
So I am lost, short of hacking the installed script (which I did for now)
like this (in the python site-packages diffoscope/comparators/elf.py):
@tool_required("objdump")
def cmdline(self):
return (
# HACK: hard code path to proper cross-objdump
# [get_tool_name("objdump")]
['/home/builds/ab/HEAD/atari/20250703130037Z-tools/bin/m68k--netbsdelf-objdump']
+ self.objdump_options()
+ ["--section={}".format(self._section_name), self.path]
)
Would be cool if that path could be overriden by a command line option.
Martin
More information about the diffoscope
mailing list