3 ms·
IIRC, that 14-byte limit stayed relevant for quite a while because ar (https://en.wikipedia.org/wiki/Ar_(Unix)#File_header https://en.wikipedia.org/wiki/Ar_(Uni
by Someone 1y ago
IIRC, that 14-byte limit stayed relevant for quite a while because ar (https://en.wikipedia.org/wiki/Ar_(Unix)#File_header https://en.wikipedia.org/wiki/Ar_(Unix)#File_header), on some systems, was limited to 14-byte file names, even though the default file system allowed way longer names.
I remember hitting that problem on HP-UX while building gcc and GNU tools.
Aside: https://en.wikipedia.org/wiki/Ar_(Unix) https://en.wikipedia.org/wiki/Ar_(Unix) says both “The ar format has never been standardized” and “Depending on the format, many ar implementations include a global symbol table (aka armap, directory or index) for fast linking without needing to scan the whole archive for a symbol. POSIX recognizes this feature, and requires ar implementations to have an -s option for updating it.”
Does that mean POSIX defines what the CLI ar tool must do, but not what the files it writes must look like?
- MathMonkeyMan 1y agoLooks like it. There's [ar][1] and that's all I can find about it. [pax][2] is linked at the bottom, but is not required to understand the ar format. [1]: https://pubs.opengroup.org/onlinepubs/7908799/xcu/ar.html https://pubs.opengroup.org/onlinepubs/7908799/xcu/ar.html [2]: https://pubs.opengroup.org/onlinepubs/7908799/xcu/pax.html https://pubs.opengroup.org/onlinepubs/7908799/xcu/pax.html
- mhw 1y agoI think pax was more of a POSIX replacement for cpio and tar. While those three and ar all could be used to bundle files together into a single file, only ar had the special affinity with the linker as a way of bundling object files together into libraries. The others were more aimed at backing up directories to a tape drive, as the example on the pax man page shows.
- pjmlp 1y agoYes, that is the joy people discover regarding UNIX/POSIX portablitly, or any other standards based environment actually.