summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-26 04:31:10 +0000
committermidipix <writeonce@midipix.org>2024-01-26 04:31:10 +0000
commit335caf5b4c8d61b42620d1435fdae6f1c6be0938 (patch)
tree0251ba2902a1ebbd5d61c77c24b3089903b24c3e
parentad78c3b38f9d9d54da0e987b81d312b4b6c1fff7 (diff)
downloadslibtool-335caf5b4c8d61b42620d1435fdae6f1c6be0938.tar.bz2
slibtool-335caf5b4c8d61b42620d1435fdae6f1c6be0938.tar.xz
struct ar_meta_member_info: added pointer to the archive member's raw header.
-rw-r--r--include/slibtool/slibtool_arbits.h1
-rw-r--r--src/arbits/slbt_archive_meta.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/include/slibtool/slibtool_arbits.h b/include/slibtool/slibtool_arbits.h
index 9a5ab4d..7c953be 100644
--- a/include/slibtool/slibtool_arbits.h
+++ b/include/slibtool/slibtool_arbits.h
@@ -118,6 +118,7 @@ struct ar_meta_file_header {
struct ar_meta_member_info {
struct ar_meta_file_header ar_file_header;
+ struct ar_raw_file_header * ar_member_data;
uint32_t ar_member_attr;
uint32_t ar_object_attr;
uint64_t ar_object_size;
diff --git a/src/arbits/slbt_archive_meta.c b/src/arbits/slbt_archive_meta.c
index a0b5f24..ba6e273 100644
--- a/src/arbits/slbt_archive_meta.c
+++ b/src/arbits/slbt_archive_meta.c
@@ -1068,7 +1068,7 @@ int slbt_get_archive_meta(
longnamep++;
}
- /* object size, object data */
+ /* member raw header, object size, object data */
mark = arhdr->ar_file_id;
mark += sizeof(*arhdr);
namelen = 0;
@@ -1086,6 +1086,7 @@ int slbt_get_archive_meta(
mark += namelen;
};
+ memberp->ar_member_data = arhdr;
memberp->ar_object_data = (void *)mark;
memberp->ar_object_size = memberp->ar_file_header.ar_file_size - namelen;