]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Add support for the 64-bit ar format 1116/head
authorGerald NDA <gndaryee@uwaterloo.ca>
Wed, 9 Jan 2019 19:36:02 +0000 (14:36 -0500)
committerGerald NDA <gndaryee@uwaterloo.ca>
Wed, 9 Jan 2019 19:36:02 +0000 (14:36 -0500)
libarchive/archive_read_support_format_ar.c
libarchive/archive_write_set_format_ar.c

index 1b0205cc70580bbd6439a8ab42cefb97f6e6b033..d96b95eabf6716c12cbe93f093cfc108521af963 100644 (file)
@@ -388,9 +388,10 @@ _ar_read_header(struct archive_read *a, struct archive_entry *entry,
 
        /*
         * "/" is the SVR4/GNU archive symbol table.
+        * "/SYM64/" is the SVR4/GNU 64-bit variant archive symbol table.
         */
-       if (strcmp(filename, "/") == 0) {
-               archive_entry_copy_pathname(entry, "/");
+       if (strcmp(filename, "/") == 0 || strcmp(filename, "/SYM64/") == 0) {
+               archive_entry_copy_pathname(entry, filename);
                /* Parse the time, owner, mode, size fields. */
                r = ar_parse_common_header(ar, entry, h);
                /* Force the file type to a regular file. */
index 50305ccbeda77ada1c134678e15a50c2de7518f5..253cac82efe6a304642a1024a69f30bf691e4f35 100644 (file)
@@ -187,6 +187,11 @@ archive_write_ar_header(struct archive_write *a, struct archive_entry *entry)
                buff[AR_name_offset] = '/';
                goto stat;
        }
+       if (strcmp(pathname, "/SYM64/") == 0) {
+               /* Entry is archive symbol table in GNU 64-bit format */
+               memcpy(buff + AR_name_offset, "/SYM64/", 7);
+               goto stat;
+       }
        if (strcmp(pathname, "__.SYMDEF") == 0) {
                /* Entry is archive symbol table in BSD format */
                memcpy(buff + AR_name_offset, "__.SYMDEF", 9);