diff options
author | midipix <writeonce@midipix.org> | 2024-02-04 19:33:09 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-04 19:56:33 +0000 |
commit | 8a77f66005f77d9f8173c1e646ff521517d9c452 (patch) | |
tree | 2f6d70a318d30bb869f8dac092e52a72e2aad86e | |
parent | fcfea7a7220dcd73e945197079c7bd8d67a4cade (diff) | |
download | slibtool-8a77f66005f77d9f8173c1e646ff521517d9c452.tar.bz2 slibtool-8a77f66005f77d9f8173c1e646ff521517d9c452.tar.xz |
struct slbt_archive_meta: store reference to the (optional) long names member.
-rw-r--r-- | include/slibtool/slibtool.h | 1 | ||||
-rw-r--r-- | src/arbits/slbt_archive_meta.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h index 8e80811..180d009 100644 --- a/include/slibtool/slibtool.h +++ b/include/slibtool/slibtool.h @@ -316,6 +316,7 @@ struct slbt_archive_meta { struct ar_meta_signature * m_signature; struct ar_meta_member_info ** a_memberv; + struct ar_meta_member_info * a_arref_longnames; struct ar_meta_armap_info a_armap_primary; struct ar_meta_armap_info a_armap_pecoff; }; diff --git a/src/arbits/slbt_archive_meta.c b/src/arbits/slbt_archive_meta.c index dae7202..1af0ab8 100644 --- a/src/arbits/slbt_archive_meta.c +++ b/src/arbits/slbt_archive_meta.c @@ -830,6 +830,12 @@ int slbt_get_archive_meta( /* pe/coff armap attributes (second linker member) */ (void)m->armeta.a_armap_pecoff; + /* reference to the long names member */ + if (arlongnames) + for (idx=0; idx<nentries && !m->armeta.a_arref_longnames; idx++) + if (m->memberv[idx]->ar_member_data == arlongnames) + m->armeta.a_arref_longnames = m->memberv[idx]; + /* member vector */ m->armeta.a_memberv = m->memberv; |