summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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++;