Page MenuHomeFreeBSD

Implement support for "/SYM64/" archives in ar

Authored by on Jan 9 2019, 5:01 PM.
Referenced Files
Unknown Object (File)
Thu, Feb 15, 9:04 AM
Unknown Object (File)
Thu, Feb 15, 3:44 AM
Unknown Object (File)
Thu, Feb 15, 3:40 AM
Unknown Object (File)
Thu, Feb 15, 3:37 AM
Unknown Object (File)
Thu, Feb 15, 3:37 AM
Unknown Object (File)
Thu, Feb 15, 2:59 AM
Unknown Object (File)
Sat, Feb 10, 9:35 PM
Unknown Object (File)
Fri, Feb 2, 10:48 PM



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

rS FreeBSD src repository - subversion
Lint Not Applicable
Tests Not Applicable

Event Timeline

We can submit the libarchive changes directly upstream at

GitHub pull request 1116 has been merged, and I'm hopeful it will come back into a libarchive update in the near future. 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.

710 ↗(On Diff #56004)

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 ↗(On Diff #56004)

This may be too wide.

This revision is now accepted and ready to land.Apr 9 2019, 5:28 PM
678 ↗(On Diff #56004)

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


if (w_sz == sizeof(uint32_t))
        *(bsdar->s_so + i) = 
            (uint64_t)htobe32((uint32_t)(*(bsdar->s_so +
            i)) + pm_sz);
        *(bsdar->s_so + i) = 
            htobe64(*(bsdar->s_so + i) + pm_sz);
681 ↗(On Diff #56004)

the final + here is col 81

723 ↗(On Diff #56004)

, is col 81

713 ↗(On Diff #56004)

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

936 ↗(On Diff #56004)

Also these casts are not necessary.

This revision was automatically updated to reflect the committed changes.