Page MenuHomeFreeBSD

Implement support for "/SYM64/" archives in ar
ClosedPublic

Authored by aryeeteygerald_rogers.com on Jan 9 2019, 5:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 15, 10:12 AM
Unknown Object (File)
Sun, May 12, 5:56 PM
Unknown Object (File)
Sun, May 12, 5:56 PM
Unknown Object (File)
Sun, May 12, 5:56 PM
Unknown Object (File)
Sun, May 12, 5:56 PM
Unknown Object (File)
Thu, May 9, 7:12 PM
Unknown Object (File)
Wed, May 1, 2:38 PM
Unknown Object (File)
Apr 23 2024, 9:58 AM
Subscribers

Details

Summary

Changes to ar and libarchive to support 64-bit archives

Allows archives greater than 4GB to be created.

PR: 234454

Test Plan

Created 10 object files of 512M (using a global array of 512 million chars) and created an archive.

Also combined a 5 of these files to ensure regular archives still work.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

We can submit the libarchive changes directly upstream at https://github.com/libarchive/libarchive

GitHub pull request 1116 has been merged, and I'm hopeful it will come back into a libarchive update in the near future.

aryeeteygerald_rogers.com edited the test plan for this revision. (Show Details)

Rebase changes to reflect upstream update to libarchive

Couple of minor style nits, but the code looks good to my brain.

usr.bin/ar/write.c
710

Any chance you could snug the w_sz onto the prior line? Then the line break is at an operator with a lower order of precedence which is more natural.

937

This may be too wide.

This revision is now accepted and ready to land.Apr 9 2019, 5:28 PM
usr.bin/ar/write.c
678

this line is > 80 cols but is hard to wrap at fewer...

Maybe:

if (w_sz == sizeof(uint32_t))
        *(bsdar->s_so + i) = 
            (uint64_t)htobe32((uint32_t)(*(bsdar->s_so +
            i)) + pm_sz);
else
        *(bsdar->s_so + i) = 
            htobe64(*(bsdar->s_so + i) + pm_sz);
681

the final + here is col 81

723

, is col 81

usr.bin/ar/write.c
713โ€“724

style(9) nit here, space between if and (

usr.bin/ar/write.c
936โ€“937

Also these casts are not necessary.

This revision was automatically updated to reflect the committed changes.