I have an ELF file that goes through the binutils-2.37 objdump -d --source in about a minute, but through the same command of binutils-2.23.2 in about 4 seconds. The output in both cases is identical. Unfortunately I cannot share that ELF file. Bisection points to the following commit as the reason for the slowdown: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=240d6706c6a2497aa545f9ceda023196ae1e8606
The master branch has been updated by Alan Modra <email@example.com>:
Author: Alan Modra <firstname.lastname@example.org>
Date: Thu Mar 24 15:42:52 2022 +1030
Revert commit 240d6706c6a2
* dwarf2.c (lookup_address_in_line_info_table): Return bool rather
than a range.
(comp_unit_find_nearest_line): Likewise. Return true if function
info found without line info.
(_bfd_dwarf2_find_nearest_line): Revert range handling code.