summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-26 20:50:53 +0000
committermidipix <writeonce@midipix.org>2024-01-26 20:50:53 +0000
commit562b43d4ae67035b58489bbda6362c858b801f53 (patch)
tree2f7e01d4c7357591f1a98e56583450732e4a36c6
parent8fc5e1774a0ce2e46a05e5332bc5d3aff9685259 (diff)
downloadslibtool-562b43d4ae67035b58489bbda6362c858b801f53.tar.bz2
slibtool-562b43d4ae67035b58489bbda6362c858b801f53.tar.xz
struct slbt_archive_meta_impl: also store the number of [raw] archive entries.
-rw-r--r--src/arbits/slbt_archive_meta.c3
-rw-r--r--src/internal/slibtool_ar_impl.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/arbits/slbt_archive_meta.c b/src/arbits/slbt_archive_meta.c
index 24009a4..9a5d542 100644
--- a/src/arbits/slbt_archive_meta.c
+++ b/src/arbits/slbt_archive_meta.c
@@ -1165,6 +1165,9 @@ int slbt_get_archive_meta(
if (m->armaps.armap_common_64.ar_member)
m->armaps.armap_common_64.ar_num_of_members = nmembers;
+ /* number of archive members, including internal ones */
+ m->nentries = nentries;
+
/* pe/coff armap attributes (second linker member) */
(void)m->armeta.a_armap_pecoff;
diff --git a/src/internal/slibtool_ar_impl.h b/src/internal/slibtool_ar_impl.h
index ac4ffff..22fe0e3 100644
--- a/src/internal/slibtool_ar_impl.h
+++ b/src/internal/slibtool_ar_impl.h
@@ -18,6 +18,7 @@ struct ar_armaps_impl {
};
struct slbt_archive_meta_impl {
+ size_t nentries;
void * hdrinfov;
char * namestrs;
const char * symstrs;