freebsd-skq/usr.bin/ar
emaste ffca4becd7 ar: shuffle symbol offsets during conversion for 32-bit ar archives
During processing we maintain symbol offsets in the 64-bit s_so array,
and when writing the archive convert to 32-bit if no offsets are greater
than 4GB.  However, this was somewhat inefficient as we looped over the
array twice: first, converting to big endian and second, writing each
32-bit value one at a time (and incorrectly so on big-endian platforms).

Instead, when writing a 32-bit archive shuffle convert symbol data to
big endian (as required by the ar format) and shuffle to the beginning
of the allocation at the same time.

Also correct emission of the symbol count on big endian platforms.

Further changes are planned, but this should fix powerpc64.

Reported by:	jhibbits, mlinimon
Reviewed by:	jhibbits, Gerald Aryeetey (earlier)
Tested by:	jhibbits
MFC after:	10 days
MFC with:	r346079
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20007
2019-04-22 19:55:47 +00:00
..
acplex.l usr.bin/ar: use standard 2-Clause FreeBSD license 2018-06-19 17:28:05 +00:00
acpyacc.y ar: report errno on warning/error 2018-10-23 13:07:03 +00:00
ar.1
ar.c usr.bin/ar: use standard 2-Clause FreeBSD license 2018-06-20 18:43:17 +00:00
ar.h ar: implement support for /SYM64/ 64-bit archives 2019-04-10 13:13:34 +00:00
Makefile
Makefile.depend
read.c ar: implement support for /SYM64/ 64-bit archives 2019-04-10 13:13:34 +00:00
util.c usr.bin/ar: use standard 2-Clause FreeBSD license 2018-06-20 18:43:17 +00:00
write.c ar: shuffle symbol offsets during conversion for 32-bit ar archives 2019-04-22 19:55:47 +00:00