From 965b795b87c59ed45cc7f16a62301dbae65b1627 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 30 Nov 2020 13:03:03 +0100 Subject: decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly text data bss dec hex filename 1021988 559 5052 1027599 fae0f busybox_old 1021236 559 5052 1026847 fab1f busybox_unstripped Signed-off-by: Denys Vlasenko --- coreutils/od_bloaty.c | 4 ++-- coreutils/split.c | 2 +- coreutils/stat.c | 2 +- coreutils/stty.c | 4 ++-- coreutils/test.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'coreutils') diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index e9c071f3a..d5bd7bfe8 100644 --- a/coreutils/od_bloaty.c +++ b/coreutils/od_bloaty.c @@ -627,7 +627,7 @@ decode_one_format(const char *s_orig, const char *s, struct tspec *tspec) bytes_to_unsigned_dec_digits, bytes_to_hex_digits, }; - static const char doux_fmtstring[][sizeof(" %%0%u%s")] = { + static const char doux_fmtstring[][sizeof(" %%0%u%s")] ALIGN1 = { " %%%u%s", " %%0%u%s", " %%%u%s", @@ -1148,7 +1148,7 @@ dump_strings(off_t address, off_t end_offset) static int parse_old_offset(const char *s, off_t *offset) { - static const struct suffix_mult Bb[] = { + static const struct suffix_mult Bb[] ALIGN_SUFFIX = { { "B", 1024 }, { "b", 512 }, { "", 0 } diff --git a/coreutils/split.c b/coreutils/split.c index ecbc9d2d8..3fcfd95f2 100644 --- a/coreutils/split.c +++ b/coreutils/split.c @@ -44,7 +44,7 @@ #include "common_bufsiz.h" #if ENABLE_FEATURE_SPLIT_FANCY -static const struct suffix_mult split_suffixes[] = { +static const struct suffix_mult split_suffixes[] ALIGN_SUFFIX = { { "b", 512 }, { "k", 1024 }, { "m", 1024*1024 }, diff --git a/coreutils/stat.c b/coreutils/stat.c index 8a23d687b..ee5e03edd 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c @@ -208,7 +208,7 @@ FS_TYPE(0x62656572, "sysfs") static const char *human_fstype(uint32_t f_type) { # define FS_TYPE(type, name) type, - static const uint32_t fstype[] = { + static const uint32_t fstype[] ALIGN4 = { FS_TYPE_LIST }; # undef FS_TYPE diff --git a/coreutils/stty.c b/coreutils/stty.c index 40e812799..19253964c 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c @@ -487,7 +487,7 @@ static const char mode_name[] ALIGN1 = #undef MI_ENTRY #define MI_ENTRY(N,T,F,B,M) { T, F, M, B }, -static const struct mode_info mode_info[] = { +static const struct mode_info mode_info[] ALIGN4 = { /* This should be verbatim cut-n-paste copy of the above MI_ENTRYs */ MI_ENTRY("evenp", combination, REV | OMIT, 0, 0 ) MI_ENTRY("parity", combination, REV | OMIT, 0, 0 ) @@ -905,7 +905,7 @@ static void display_window_size(int fancy) } } -static const struct suffix_mult stty_suffixes[] = { +static const struct suffix_mult stty_suffixes[] ALIGN_SUFFIX = { { "b", 512 }, { "k", 1024 }, { "B", 1024 }, diff --git a/coreutils/test.c b/coreutils/test.c index ac7b546a3..7c6574334 100644 --- a/coreutils/test.c +++ b/coreutils/test.c @@ -306,7 +306,7 @@ struct operator_t { unsigned char op_num, op_type; }; -static const struct operator_t ops_table[] = { +static const struct operator_t ops_table[] ALIGN2 = { { /* "-r" */ FILRD , UNOP }, { /* "-w" */ FILWR , UNOP }, { /* "-x" */ FILEX , UNOP }, -- cgit v1.2.3