mirror of
https://github.com/landley/toybox.git
synced 2025-11-07 19:04:58 +00:00
9 lines
308 B
Bash
Executable File
9 lines
308 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Show bytes used by each command's GLOBALS() block, based on last build
|
|
{
|
|
echo -e '#include "toys.h"\nint main(void) {'
|
|
sed -n 's/^\tstruct \(.*\)_data .*/printf("%d \1\\n", (int)sizeof(struct \1_data));/p' generated/globals.h
|
|
echo '}'
|
|
} | "${CROSS_COMPILE}"cc -xc - && ./a.out | sort -n
|