https://sourceware.org/bugzilla/show_bug.cgi?id=24499
Bug ID: 24499
Summary: [PATCH] objcopy: provide cache for gnu_debuglink's
target CRC
Product: binutils
Version: 2.33 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: janisozaur+sourceware at gmail dot com
Target Milestone: ---
Created attachment 11754
--> https://sourceware.org/bugzilla/attachment.cgi?id=11754&action=edit
0001-objcopy-provide-cache-for-gnu_debuglink-s-target-CRC.patch
I noticed objcopy takes really long time to complete some actions, namely
objcopy --add-gnu-debuglink=foo.a.dbg foo.a.
Upon investigation I found out it calculates the CRC32 of immutable foo.a.dbg
for each of the entries in foo.a.
I have added a place to cache the calculated CRC value, based on following
observations:
* The gnu_debuglink filename is immutable and provided only once
* The target file is not expected to be changed ever
* There are already some global-scoped variables for objcopy
This provided expected speedup: over 200x faster than before on 14MiB foo.a
containing 298 entries and 136MiB foo.a.dbg.
I hope the attached patch is of sufficient quality.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils