From 0fdceb52c78eacd4f3235a67929dd1378655c158 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 27 Jul 2022 22:19:21 +0100 Subject: [PATCH] diffoscope: use multitarget binutils MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit multitarget binutils is useful for diffing for directories with binaries foreign to system where diffoscope runs. before the change: $ nix run nixpkgs#diffoscope /tmp/a-Mcrt1.o /tmp/b-Mcrt1.o 2022-07-27 21:20:35 E: diffoscope.comparators.elf: Command '['objdump --line-numbers --disassemble --demangle --reloc --no-show-raw-insn --section=.text {}']' returned non-zero exit status 1. 2022-07-27 21:20:35 E: diffoscope.comparators.elf: Command '['objdump --disassemble --demangle --no-show-raw-insn --section=.text {}']' returned non-zero exit status 1. --- /tmp/a-Mcrt1.o +++ /tmp/b-Mcrt1.o ├── readelf --wide --decompress --string-dump=.debug_str {} ... After the change: ./result/bin/diffoscope /tmp/a-Mcrt1.o /tmp/b-Mcrt1.o --- /tmp/a-Mcrt1.o +++ /tmp/b-Mcrt1.o ├── readelf --wide --decompress --string-dump=.debug_str {} ... --- pkgs/tools/misc/diffoscope/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index d12b6ecf6606..72a72b34373c 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, python3Packages, docutils, help2man, installShellFiles -, abootimg, acl, apksigner, apktool, binutils-unwrapped, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, db, diffutils, dtc +, abootimg, acl, apksigner, apktool, binutils-unwrapped-all-targets, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, db, diffutils, dtc , e2fsprogs, enjarify, file, findutils, fontforge-fonttools, ffmpeg, fpc, gettext, ghc, ghostscriptX, giflib, gnumeric, gnupg, gnutar , gzip, hdf5, imagemagick, jdk, libarchive, libcaca, llvm, lz4, mono, ocaml, oggvideotools, openssh, openssl, pdftk, pgpdump, poppler_utils, procyon, qemu, R , radare2, sng, sqlite, squashfsTools, tcpdump, ubootTools, odt2txt, unzip, wabt, xmlbeans, xxd, xz, zip, zstd @@ -44,7 +44,7 @@ python3Packages.buildPythonApplication rec { # # Still missing these tools: docx2txt lipo otool r2pipe pythonPath = [ - binutils-unwrapped bzip2 colordiff coreutils cpio db diffutils + binutils-unwrapped-all-targets bzip2 colordiff coreutils cpio db diffutils e2fsprogs file findutils fontforge-fonttools gettext gnutar gzip libarchive lz4 openssl pgpdump sng sqlite squashfsTools unzip xxd xz zip zstd