summaryrefslogtreecommitdiff
path: root/src/arbits
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-18 17:06:27 +0000
committermidipix <writeonce@midipix.org>2024-02-18 17:06:27 +0000
commit0006f718b62316336a9f27a008ea8525173a5b56 (patch)
tree309686013965c87e3f3569bbe808746ff0604c7d /src/arbits
parentbc3103627a97e7ee437c7bf7a0fae5eefc309a62 (diff)
downloadslibtool-0006f718b62316336a9f27a008ea8525173a5b56.tar.bz2
slibtool-0006f718b62316336a9f27a008ea8525173a5b56.tar.xz
slbt_get_archive_meta(): check whether all object members share binary format.
Diffstat (limited to 'src/arbits')
-rw-r--r--src/arbits/slbt_archive_meta.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/arbits/slbt_archive_meta.c b/src/arbits/slbt_archive_meta.c
index f3dd39e..7279602 100644
--- a/src/arbits/slbt_archive_meta.c
+++ b/src/arbits/slbt_archive_meta.c
@@ -842,6 +842,18 @@ int slbt_get_archive_meta(
if (m->memberv[idx]->ar_member_data == arlongnames)
m->armeta.a_arref_longnames = m->memberv[idx];
+ /* common binary format (information only) */
+ for (idx=0,nmembers=0; idx<nentries; idx++) {
+ if (m->memberv[idx]->ar_member_attr == AR_MEMBER_ATTR_OBJECT) {
+ if (m->ofmtattr && (m->ofmtattr != m->memberv[idx]->ar_object_attr)) {
+ m->ofmtattr = 0;
+ idx = nentries;
+ } else if (!m->ofmtattr) {
+ m->ofmtattr = m->memberv[idx]->ar_object_attr;
+ }
+ }
+ }
+
/* member vector */
m->armeta.a_memberv = m->memberv;