diff options
author | midipix <writeonce@midipix.org> | 2024-02-06 20:43:10 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-07 03:50:47 +0000 |
commit | 4223c83c4bb6ea3aeee68f1810ca86a8fb785f86 (patch) | |
tree | dcc2c7bcd01a840d6ba75bd3c63f842e2f4c4d58 /src/arbits/slbt_archive_meta.c | |
parent | 8a77f66005f77d9f8173c1e646ff521517d9c452 (diff) | |
download | slibtool-4223c83c4bb6ea3aeee68f1810ca86a8fb785f86.tar.bz2 slibtool-4223c83c4bb6ea3aeee68f1810ca86a8fb785f86.tar.xz |
slbt_get_archive_meta(): bsd symrefs vector: fix ar_name_offset logic.
Diffstat (limited to 'src/arbits/slbt_archive_meta.c')
-rw-r--r-- | src/arbits/slbt_archive_meta.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arbits/slbt_archive_meta.c b/src/arbits/slbt_archive_meta.c index 1af0ab8..8c8f999 100644 --- a/src/arbits/slbt_archive_meta.c +++ b/src/arbits/slbt_archive_meta.c @@ -762,7 +762,8 @@ int slbt_get_archive_meta( symrefs_32 = m->armaps.armap_symrefs_32; for (idx=0; idx<m->armaps.armap_nsyms; idx++) { - symrefs_32[idx].ar_name_offset = m->symstrv[idx] - m->symstrv[0]; + if (m->armaps.armap_common_32.ar_armap_attr & AR_ARMAP_ATTR_SYSV) + symrefs_32[idx].ar_name_offset = m->symstrv[idx] - m->symstrv[0]; if (!slbt_archive_member_from_offset(m,symrefs_32[idx].ar_member_offset)) return slbt_free_archive_meta_impl( @@ -787,7 +788,8 @@ int slbt_get_archive_meta( symrefs_64 = m->armaps.armap_symrefs_64; for (idx=0; idx<m->armaps.armap_nsyms; idx++) { - symrefs_64[idx].ar_name_offset = m->symstrv[idx] - m->symstrv[0]; + if (m->armaps.armap_common_64.ar_armap_attr & AR_ARMAP_ATTR_SYSV) + symrefs_64[idx].ar_name_offset = m->symstrv[idx] - m->symstrv[0]; if (!slbt_archive_member_from_offset(m,symrefs_64[idx].ar_member_offset)) return slbt_free_archive_meta_impl( |