diff options
| author | Pádraig Brady <P@draigBrady.com> | 2025-12-06 13:47:11 +0000 |
|---|---|---|
| committer | Pádraig Brady <P@draigBrady.com> | 2025-12-13 17:18:47 +0000 |
| commit | cd52292221adaff8cf67299106d78007b8fa8616 (patch) | |
| tree | ea2770a99d84051d1005210d8e07157275de33de /scripts/git-hooks/commit-msg | |
| parent | cdb966adb30e2744f7584fafad13f80341ac8f4a (diff) | |
| download | coreutils-cd52292221adaff8cf67299106d78007b8fa8616.tar.gz coreutils-cd52292221adaff8cf67299106d78007b8fa8616.zip | |
build: reduce size of multi-call binary by reusing cksum logic
Map md5sum and sha{1,224,256,385,512} to use cksum logic,
which selects appropriate behavior at runtime, rather than
separate binaries for each closely related utility.
$ size src/coreutils # before
text data bss dec hex filename
1349509 6812 619312 1975633 1e2551 src/coreutils
$ size src/coreutils # after
text data bss dec hex filename
1306933 6748 619152 1932833 1d7e21 src/coreutils
* build-aux/gen-single-binary.sh: Map sha*sum to use cksum.c
* src/cksum.c: Adjust to behave more like sha*sum,
when the algorithm to something other than "crc".
* src/cksum.h: Expose the cksum_algorithm global and enum.
* src/coreutils-md5sum.c: Set cksum_algorithm and call cksum logic.
* src/coreutils-sha1sum.c: Likewise.
* src/coreutils-sha224sum.c Likewise.
* src/coreutils-sha256sum.c Likewise.
* src/coreutils-sha384sum.c Likewise.
* src/coreutils-sha512sum.c Likewise.
* NEWS: Mention the improvement.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions
