summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-28 08:02:24 +0000
committermidipix <writeonce@midipix.org>2024-01-28 08:02:24 +0000
commitb6b8ce4e9628a8900002ccbe2a583133b87259b2 (patch)
tree799d0475defd9530a3bccc1e3e645916bf8acd43
parentb342fcb10835062f43fb6f41ce7bed8cefc69e78 (diff)
downloadslibtool-b6b8ce4e9628a8900002ccbe2a583133b87259b2.tar.bz2
slibtool-b6b8ce4e9628a8900002ccbe2a583133b87259b2.tar.xz
slbt_get_archive_meta(): symrefs vector: record name offsets.
-rw-r--r--src/arbits/slbt_archive_meta.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/arbits/slbt_archive_meta.c b/src/arbits/slbt_archive_meta.c
index 5bc1c2f..435641e 100644
--- a/src/arbits/slbt_archive_meta.c
+++ b/src/arbits/slbt_archive_meta.c
@@ -824,6 +824,8 @@ int slbt_get_archive_meta(
struct ar_meta_member_info * memberp;
char * longnamep;
size_t idx;
+ struct ar_meta_armap_ref_32 * symrefs_32;
+ struct ar_meta_armap_ref_64 * symrefs_64;
struct ar_header_info * hdrinfov;
struct ar_header_info * hdrinfov_cap;
struct ar_header_info * hdrinfov_next;
@@ -1247,6 +1249,20 @@ int slbt_get_archive_meta(
ch++;
}
+ if (m->armaps.armap_common_32.ar_member) {
+ 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_64.ar_member) {
+ 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];
+ }
+
/* number of public archive members */
for (idx=0,nmembers=0; idx<nentries; idx++) {
switch (m->memberv[idx]->ar_member_attr) {