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

2025-07-02 Thread Mark Wielaard
Hi Aaron, On Sun, Jun 29, 2025 at 11:51:58PM -0400, Aaron Merey wrote: > 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 us

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

2025-07-02 Thread Henning Meyer
Btw, I would really like to add colored output to readelf, but the way gettext is used currently, translating raw printf format strings instead of actual words makes that impossible without breaking all translations. From a security perspective, _("%zu byte block") allows a translator to reord

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

2025-07-02 Thread Mark Wielaard
Hi Aaron, On Sun, 2025-06-29 at 23:51 -0400, Aaron Merey wrote: > 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

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

2025-07-02 Thread Mark Wielaard
Hi Aaron, On Sun, 2025-06-29 at 23:51 -0400, Aaron Merey wrote: > 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 tra

Re: [PATCH 2/3 v3] src/readelf.c: Add support for print_debug_* output buffering

2025-07-02 Thread Mark Wielaard
On Sun, 2025-06-29 at 23:51 -0400, Aaron Merey wrote: > Safely handle stdout output during concurrent calls to print_debug_* > functions. > > For any print_debug_* function and any function that could be called > from print_debug_* which also prints to stdout: add a FILE * argument > and replace a