summaryrefslogtreecommitdiffhomepage
path: root/src/arbits
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-25 15:41:45 +0000
committermidipix <writeonce@midipix.org>2024-01-25 15:41:45 +0000
commit1af4bb56195d25b63c59f61dbb489577166da043 (patch)
treec314117672ebe63c0db27448f090c17aa2ee6cdb /src/arbits
parent1b515cefb85e83c444690950bae9ee03bc8def52 (diff)
downloadslibtool-1af4bb56195d25b63c59f61dbb489577166da043.tar.bz2
slibtool-1af4bb56195d25b63c59f61dbb489577166da043.tar.xz
slbt_get_archive_meta(): properly special-case the /SYM64/ member name.
Diffstat (limited to 'src/arbits')
-rw-r--r--src/arbits/slbt_archive_meta.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/arbits/slbt_archive_meta.c b/src/arbits/slbt_archive_meta.c
index f87d262..5b6874f 100644
--- a/src/arbits/slbt_archive_meta.c
+++ b/src/arbits/slbt_archive_meta.c
@@ -706,6 +706,18 @@ int slbt_get_archive_meta(
arlongnames = arhdr;
+ /* the /SYM64/ string must be special cased, also below when it gets copied */
+ } else if (!strncmp(arhdr->ar_file_id,"/SYM64/",7)) {
+ for (ch=&arhdr->ar_file_id[7]; ch<fldcap; ch++)
+ if (*ch != AR_DEC_PADDING)
+ return slbt_free_archive_meta_impl(
+ m,SLBT_CUSTOM_ERROR(
+ dctx,
+ SLBT_ERR_AR_INVALID_HEADER));
+
+ attr = AR_HEADER_ATTR_FILE_ID | AR_HEADER_ATTR_SYSV;
+ stblsize += 8;
+
/* sysv armap member or sysv long name reference? */
} else if (arhdr->ar_file_id[0] == '/') {
if (slbt_ar_read_decimal_64(
@@ -872,6 +884,16 @@ int slbt_get_archive_meta(
*longnamep++ = '/';
longnamep++;
+ } else if ((arhdr->ar_file_id[0] == '/') && (arhdr->ar_file_id[1] == 'S')) {
+ *longnamep++ = '/';
+ *longnamep++ = 'S';
+ *longnamep++ = 'Y';
+ *longnamep++ = 'M';
+ *longnamep++ = '6';
+ *longnamep++ = '4';
+ *longnamep++ = '/';
+ longnamep++;
+
} else if (arhdr->ar_file_id[0] == '/') {
*longnamep++ = '/';
longnamep++;