[PATCH v2] Add debugedit-classify-ar and use it before running do_ar_file

Mark Wielaard mark@klomp.org
Wed Sep 3 10:33:58 GMT 2025


Hi Florian,

On Wed, Sep 03, 2025 at 12:28:37PM +0200, Florian Weimer wrote:
> * Mark Wielaard:
> 
> > do_ar_file in find-debuginfo can be somewhat slow extracting archive
> > members and adding them to a new ar file after debugedit processing.
> >
> > debugedit-classify-ar is a new helper that checks if an ar file has to
> > be processed, so no unnecessary work is done. It checks that the given
> > file is a regular archive containing ELF members that have .debug
> > sections and that no errors occur while reading the archive and
> > members. It can also check that there is a maximum number of members.
> >
> > Use this in debuginfo with a limit of 768 members.
> 
> We have ~2200 members in libc.a, and yet we want this type of
> processing.
> 
> Could we get a tool instead that iterates through an ar file (perhaps
> even in parallel) and applies another command to its contents?
> Operating on files in a temporary directory.

There is this idea: eu-ar --map mode
https://sourceware.org/bugzilla/show_bug.cgi?id=33329

But that doesn't exist yet.

Cheers,

Mark


More information about the Debugedit mailing list