[PATCH 06/13 v2] doc: Add elf_getshdrnum.3 and elf_getshnum.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: mark elf_getshnum as obsolete in SYNOPSIS. Describe extended section headers breifly. Clarify that elf can be NULL, dst cannot be NULL. Mention reason for elf_getshnum deprication and introduction of elf_getshdrnum in HISTORY. doc/Makefile.am | 2 + doc/e

[PATCH 01/13 v2] doc: Add elf_memory.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: replace "open memory buffer" with "open file descriptor". Clarify behavior when image is NULL as well as the minimum size of the image. doc/Makefile.am | 1 + doc/elf_memory.3 | 85 2 files changed, 86 insertio

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

2025-08-04 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

[PATCH 13/13 v4] doc: Add elf_next.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v4: Minor rewording in DESCRIPTION and code comment in EXAMPLES doc/Makefile.am | 1 + doc/elf_next.3 | 120 2 files changed, 121 insertions(+) create mode 100644 doc/elf_next.3 diff --git a/doc/Makefile.am b/do

[PATCH 09/13 v2] doc: Add elf_newdata.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: Describe default field values of Elf_Data returned by elf_newdata. Minor rewording changes doc/Makefile.am | 1 + doc/elf_newdata.3 | 92 +++ 2 files changed, 93 insertions(+) create mode 100644 doc/elf_newdata.3

[PATCH 08/13 v2] doc: Add elf_gnu_hash.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: Minor rewording in description and synopsis doc/Makefile.am| 1 + doc/elf_gnu_hash.3 | 1 + doc/elf_hash.3 | 19 --- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 doc/elf_gnu_hash.3 diff --git a/doc/Makefile.am

[PATCH 07/13 v2] doc: Add elf_getshdrstrndx.3 and elf_getshstrndx.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: Mark elf_getshstrndx as deprecated in SYNOPSIS. Add note to HISTORY about reason for introducing elf_getshdrndx. Explain how to use with elf_strptr and Elf{32,64}_getshdr. doc/Makefile.am | 2 + doc/elf_getshdrstrndx.3 | 102 ++

[PATCH 10/13 v2] doc: Add elf_newscn.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: fix function declaration in SYNOPSIS. Clarify that the null section is added automatically if absent and never returned. Remove comment about requiring ELF_C_WRITE or ELF_C_RDWR. doc/Makefile.am | 1 + doc/elf_newscn.3 | 88 +++

[PATCH 05/13 v2] doc: Add elf_getphdrnum.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: Clarify that return value will not exceed bounds of elf32_getphdr/elf64_getphdr array when used as an index. doc/Makefile.am | 1 + doc/elf_getphdrnum.3 | 81 2 files changed, 82 insertions(+) create mode 1006

[PATCH 04/13 v2] doc: Add elf_getident.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: some minor rewording. mention EI_* macros by name. doc/Makefile.am| 1 + doc/elf_getident.3 | 95 ++ 2 files changed, 96 insertions(+) create mode 100644 doc/elf_getident.3 diff --git a/doc/Makefile.am b/doc/Ma

[PATCH 11/13 v2] doc: Add elf_rand.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: Some rewording. Also remove comment about elf_rand affecting subsequent calls to elf_next. I will post a patch that prevents this behavior. doc/Makefile.am | 1 + doc/elf_rand.3 | 71 + 2 files changed, 72 inse

[PATCH 12/13 v2] doc: Add elf_rawdata.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: Some rewording. Describe differences between elf_rawdata and elf_getdata. Also mention that the returned Elf_Data is owned by libelf and should not be manually freed. doc/Makefile.am | 1 + doc/elf_rawdata.3 | 100 ++

[PATCH 03/13 v2] doc: Add elf_getdata_rawchunk.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: Remove mention of implementation details. Mention that conversion to native byte order and direct access alignment resembles elf_getdata. Mention elf_errmsg. On Mon, Jul 7, 2025 at 1:26 PM Mark Wielaard wrote: > > Nice overview of ELF data types. But might ther

[PATCH 02/13 v2] doc: Add elf_flag*.3

2025-08-04 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: Mention that ELF_F_LAYOUT and ELF_F_PERMISSIVE are used with elf_flagelf only and mention which fields may be manually modified. Clarify when an error code is set. Explain exactly which check ELF_F_PERMISSIVE disables during elf_update. doc/Makefile.am| 6

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

2025-08-04 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