decrease padding: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly

text	   data	    bss	    dec	    hex	filename
1021236	    559	   5052	1026847	  fab1f	busybox_old
1021120	    559	   5052	1026731	  faaab	busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2020-11-30 14:58:02 +01:00
parent 965b795b87
commit 6cc4962b60
9 changed files with 14 additions and 14 deletions

View File

@ -194,14 +194,14 @@ struct cp_ext {
}; };
/* Copy lengths and extra bits for literal codes 257..285 */ /* Copy lengths and extra bits for literal codes 257..285 */
/* note: see note #13 above about the 258 in this list. */ /* note: see note #13 above about the 258 in this list. */
static const struct cp_ext lit = { static const struct cp_ext lit ALIGN2 = {
/*257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 */ /*257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 */
/*0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 */ /*0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 */
{ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 }, { 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99 } /* 99 == invalid */ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99 } /* 99 == invalid */
}; };
/* Copy offsets and extra bits for distance codes 0..29 */ /* Copy offsets and extra bits for distance codes 0..29 */
static const struct cp_ext dist = { static const struct cp_ext dist ALIGN2 = {
/*0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 */ /*0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 */
{ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 }, { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 },
{ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 } { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 }

View File

@ -517,7 +517,7 @@ struct BcLexKeyword {
}; };
#define LEX_KW_ENTRY(a, b) \ #define LEX_KW_ENTRY(a, b) \
{ .name8 = a /*, .posix = b */ } { .name8 = a /*, .posix = b */ }
static const struct BcLexKeyword bc_lex_kws[20] = { static const struct BcLexKeyword bc_lex_kws[20] ALIGN8 = {
LEX_KW_ENTRY("auto" , 1), // 0 LEX_KW_ENTRY("auto" , 1), // 0
LEX_KW_ENTRY("break" , 1), // 1 LEX_KW_ENTRY("break" , 1), // 1
LEX_KW_ENTRY("continue", 0), // 2 note: this one has no terminating NUL LEX_KW_ENTRY("continue", 0), // 2 note: this one has no terminating NUL

View File

@ -1052,7 +1052,7 @@ struct adap_desc {
const char *algo; const char *algo;
}; };
static const struct adap_desc adap_descs[] = { static const struct adap_desc adap_descs[] ALIGN_PTR = {
{ .funcs = "dummy", .algo = "Dummy bus", }, { .funcs = "dummy", .algo = "Dummy bus", },
{ .funcs = "isa", .algo = "ISA bus", }, { .funcs = "isa", .algo = "ISA bus", },
{ .funcs = "i2c", .algo = "I2C adapter", }, { .funcs = "i2c", .algo = "I2C adapter", },
@ -1064,7 +1064,7 @@ struct i2c_func {
const char* name; const char* name;
}; };
static const struct i2c_func i2c_funcs_tab[] = { static const struct i2c_func i2c_funcs_tab[] ALIGN_PTR = {
{ .value = I2C_FUNC_I2C, { .value = I2C_FUNC_I2C,
.name = "I2C" }, .name = "I2C" },
{ .value = I2C_FUNC_SMBUS_QUICK, { .value = I2C_FUNC_SMBUS_QUICK,

View File

@ -247,7 +247,7 @@ struct options {
* Set up the tables. Warning! They must have corresponding order! * Set up the tables. Warning! They must have corresponding order!
*/ */
static const struct arg1opt Arg1Opt[] = { static const struct arg1opt Arg1Opt[] ALIGN_PTR = {
{ "SIFMETRIC", SIOCSIFMETRIC, ifreq_offsetof(ifr_metric) }, { "SIFMETRIC", SIOCSIFMETRIC, ifreq_offsetof(ifr_metric) },
{ "SIFMTU", SIOCSIFMTU, ifreq_offsetof(ifr_mtu) }, { "SIFMTU", SIOCSIFMTU, ifreq_offsetof(ifr_mtu) },
{ "SIFTXQLEN", SIOCSIFTXQLEN, ifreq_offsetof(ifr_qlen) }, { "SIFTXQLEN", SIOCSIFTXQLEN, ifreq_offsetof(ifr_qlen) },
@ -277,7 +277,7 @@ static const struct arg1opt Arg1Opt[] = {
{ "SIFADDR", SIOCSIFADDR, ifreq_offsetof(ifr_addr) }, { "SIFADDR", SIOCSIFADDR, ifreq_offsetof(ifr_addr) },
}; };
static const struct options OptArray[] = { static const struct options OptArray[] ALIGN_PTR = {
{ "metric", N_ARG, ARG_METRIC, 0 }, { "metric", N_ARG, ARG_METRIC, 0 },
{ "mtu", N_ARG, ARG_MTU, 0 }, { "mtu", N_ARG, ARG_MTU, 0 },
{ "txqueuelen", N_ARG, ARG_TXQUEUELEN, 0 }, { "txqueuelen", N_ARG, ARG_TXQUEUELEN, 0 },

View File

@ -361,7 +361,7 @@ struct builtin {
void (*bi_dgram_fn)(int, servtab_t *) FAST_FUNC; void (*bi_dgram_fn)(int, servtab_t *) FAST_FUNC;
}; };
static const struct builtin builtins[] = { static const struct builtin builtins[] ALIGN_PTR = {
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO
{ "echo", 1, echo_stream, echo_dg }, { "echo", 1, echo_stream, echo_dg },
#endif #endif

View File

@ -114,7 +114,7 @@ enum {
TCP_CLOSING, /* now a valid state */ TCP_CLOSING, /* now a valid state */
}; };
static const char *const tcp_state[] = { static const char *const tcp_state[] ALIGN_PTR = {
"", "",
"ESTABLISHED", "ESTABLISHED",
"SYN_SENT", "SYN_SENT",

View File

@ -273,7 +273,7 @@ struct query {
static const struct { static const struct {
unsigned char type; unsigned char type;
char name[7]; char name[7];
} qtypes[] = { } qtypes[] ALIGN1 = {
{ ns_t_soa, "SOA" }, { ns_t_soa, "SOA" },
{ ns_t_ns, "NS" }, { ns_t_ns, "NS" },
{ ns_t_a, "A" }, { ns_t_a, "A" },
@ -288,7 +288,7 @@ static const struct {
{ ns_t_any, "ANY" }, { ns_t_any, "ANY" },
}; };
static const char *const rcodes[] = { static const char *const rcodes[] ALIGN_PTR = {
"NOERROR", // 0 "NOERROR", // 0
"FORMERR", // 1 "FORMERR", // 1
"SERVFAIL", // 2 "SERVFAIL", // 2

View File

@ -536,7 +536,7 @@ send_probe(int seq, int ttl)
static const char * static const char *
pr_type(unsigned char t) pr_type(unsigned char t)
{ {
static const char *const ttab[] = { static const char *const ttab[] ALIGN_PTR = {
"Echo Reply", "ICMP 1", "ICMP 2", "Dest Unreachable", "Echo Reply", "ICMP 1", "ICMP 2", "Dest Unreachable",
"Source Quench", "Redirect", "ICMP 6", "ICMP 7", "Source Quench", "Redirect", "ICMP 6", "ICMP 7",
"Echo", "Router Advert", "Router Solicit", "Time Exceeded", "Echo", "Router Advert", "Router Solicit", "Time Exceeded",
@ -544,7 +544,7 @@ pr_type(unsigned char t)
"Info Reply", "Mask Request", "Mask Reply" "Info Reply", "Mask Request", "Mask Reply"
}; };
# if ENABLE_TRACEROUTE6 # if ENABLE_TRACEROUTE6
static const char *const ttab6[] = { static const char *const ttab6[] ALIGN_PTR = {
[0] = "Error", "Dest Unreachable", "Packet Too Big", "Time Exceeded", [0] = "Error", "Dest Unreachable", "Packet Too Big", "Time Exceeded",
[4] = "Param Problem", [4] = "Param Problem",
[8] = "Echo Request", "Echo Reply", "Membership Query", "Membership Report", [8] = "Echo Request", "Echo Reply", "Membership Query", "Membership Report",

View File

@ -60,7 +60,7 @@ static const char bdcmd_names[] ALIGN1 =
"flushbufs" "\0" "flushbufs" "\0"
"rereadpt" "\0" "rereadpt" "\0"
; ;
static const uint32_t bdcmd_ioctl[] = { static const uint32_t bdcmd_ioctl[] ALIGN4 = {
BLKROSET, //setro BLKROSET, //setro
BLKROSET, //setrw BLKROSET, //setrw
BLKROGET, //getro BLKROGET, //getro