[PATCH 1/3 v3] src: Add threadlib library for parallel job execution

2025-06-29 Thread Aaron Merey
Add new internal static library libthread.a that provides infrastructure for eu-* tools to run functions concurrently using pthreads. threadlib.c manages per-job threads as well as per-job buffers for stdout output. Output for each job is printed to stdout in the order that the jobs were added to

[PATCH] readelf.c: Avoid repeating calls to gettext _() in hotpath

2025-06-29 Thread Aaron Merey
Calls to the gettext _() macro in hotpaths cause many runtime lookups of the same translation strings. This patch introduces macro __() which caches the result of _() at each call site where __() is used. When a cached translation string is used as the format string for fprintf, the compiler migh

[PATCH 3/3 v4] src/readelf.c: Support concurrency for -w, --debug-dump

2025-06-29 Thread Aaron Merey
Implement concurrent execution of print_debug_* functions during handling of -w, --debug-dump using libthread.a. A new `-C, --concurrency=NUM` command line option controls the maximum number of threads that may be used. This value defaults to the number of CPUs. Job output is buffered and printed