Bug 28592 - objdump -d --source is very slow with certain ELF
Summary: objdump -d --source is very slow with certain ELF
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.38
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-13 11:43 UTC by jcmvbkbc
Modified: 2024-02-15 06:17 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jcmvbkbc 2021-11-13 11:43:45 UTC
Hello,

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
Comment 1 Sourceware Commits 2022-04-03 11:40:31 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=924cf858c94ebc3f54e1e2e0710099fb94e2c901

commit 924cf858c94ebc3f54e1e2e0710099fb94e2c901
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Mar 24 15:42:52 2022 +1030

    Revert commit 240d6706c6a2
    
            PR 28592
            PR 15994
            PR 15935
            * 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.
Comment 2 Alan Modra 2024-02-15 06:17:24 UTC
Fixed