aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-11-30 14:58:02 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-11-30 14:58:02 +0100
commit6cc4962b60d451e918e338ccca98afda99f49f6e (patch)
treeaf98468492c063ea74d53307678786339447cb5e
parent965b795b87c59ed45cc7f16a62301dbae65b1627 (diff)
downloadbusybox-w32-6cc4962b60d451e918e338ccca98afda99f49f6e.tar.gz
busybox-w32-6cc4962b60d451e918e338ccca98afda99f49f6e.tar.bz2
busybox-w32-6cc4962b60d451e918e338ccca98afda99f49f6e.zip
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>
-rw-r--r--archival/libarchive/decompress_gunzip.c4
-rw-r--r--miscutils/bc.c2
-rw-r--r--miscutils/i2c_tools.c4
-rw-r--r--networking/ifconfig.c4
-rw-r--r--networking/inetd.c2
-rw-r--r--networking/netstat.c2
-rw-r--r--networking/nslookup.c4
-rw-r--r--networking/traceroute.c4
-rw-r--r--util-linux/blockdev.c2
9 files changed, 14 insertions, 14 deletions
diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
index 03049cc9b..eb3b64930 100644
--- a/archival/libarchive/decompress_gunzip.c
+++ b/archival/libarchive/decompress_gunzip.c
@@ -194,14 +194,14 @@ struct cp_ext {
194}; 194};
195/* Copy lengths and extra bits for literal codes 257..285 */ 195/* Copy lengths and extra bits for literal codes 257..285 */
196/* note: see note #13 above about the 258 in this list. */ 196/* note: see note #13 above about the 258 in this list. */
197static const struct cp_ext lit = { 197static const struct cp_ext lit ALIGN2 = {
198 /*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 */ 198 /*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 */
199 /*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 */ 199 /*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 */
200 { 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 }, 200 { 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 },
201 { 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 */ 201 { 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 */
202}; 202};
203/* Copy offsets and extra bits for distance codes 0..29 */ 203/* Copy offsets and extra bits for distance codes 0..29 */
204static const struct cp_ext dist = { 204static const struct cp_ext dist ALIGN2 = {
205 /*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 */ 205 /*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 */
206 { 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 }, 206 { 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 },
207 { 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 } 207 { 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 }
diff --git a/miscutils/bc.c b/miscutils/bc.c
index 4d987325e..f339b895c 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -517,7 +517,7 @@ struct BcLexKeyword {
517}; 517};
518#define LEX_KW_ENTRY(a, b) \ 518#define LEX_KW_ENTRY(a, b) \
519 { .name8 = a /*, .posix = b */ } 519 { .name8 = a /*, .posix = b */ }
520static const struct BcLexKeyword bc_lex_kws[20] = { 520static const struct BcLexKeyword bc_lex_kws[20] ALIGN8 = {
521 LEX_KW_ENTRY("auto" , 1), // 0 521 LEX_KW_ENTRY("auto" , 1), // 0
522 LEX_KW_ENTRY("break" , 1), // 1 522 LEX_KW_ENTRY("break" , 1), // 1
523 LEX_KW_ENTRY("continue", 0), // 2 note: this one has no terminating NUL 523 LEX_KW_ENTRY("continue", 0), // 2 note: this one has no terminating NUL
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 09364e396..57cac5d47 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -1052,7 +1052,7 @@ struct adap_desc {
1052 const char *algo; 1052 const char *algo;
1053}; 1053};
1054 1054
1055static const struct adap_desc adap_descs[] = { 1055static const struct adap_desc adap_descs[] ALIGN_PTR = {
1056 { .funcs = "dummy", .algo = "Dummy bus", }, 1056 { .funcs = "dummy", .algo = "Dummy bus", },
1057 { .funcs = "isa", .algo = "ISA bus", }, 1057 { .funcs = "isa", .algo = "ISA bus", },
1058 { .funcs = "i2c", .algo = "I2C adapter", }, 1058 { .funcs = "i2c", .algo = "I2C adapter", },
@@ -1064,7 +1064,7 @@ struct i2c_func {
1064 const char* name; 1064 const char* name;
1065}; 1065};
1066 1066
1067static const struct i2c_func i2c_funcs_tab[] = { 1067static const struct i2c_func i2c_funcs_tab[] ALIGN_PTR = {
1068 { .value = I2C_FUNC_I2C, 1068 { .value = I2C_FUNC_I2C,
1069 .name = "I2C" }, 1069 .name = "I2C" },
1070 { .value = I2C_FUNC_SMBUS_QUICK, 1070 { .value = I2C_FUNC_SMBUS_QUICK,
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index 3c9a2dfb3..c3e448be0 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -247,7 +247,7 @@ struct options {
247 * Set up the tables. Warning! They must have corresponding order! 247 * Set up the tables. Warning! They must have corresponding order!
248 */ 248 */
249 249
250static const struct arg1opt Arg1Opt[] = { 250static const struct arg1opt Arg1Opt[] ALIGN_PTR = {
251 { "SIFMETRIC", SIOCSIFMETRIC, ifreq_offsetof(ifr_metric) }, 251 { "SIFMETRIC", SIOCSIFMETRIC, ifreq_offsetof(ifr_metric) },
252 { "SIFMTU", SIOCSIFMTU, ifreq_offsetof(ifr_mtu) }, 252 { "SIFMTU", SIOCSIFMTU, ifreq_offsetof(ifr_mtu) },
253 { "SIFTXQLEN", SIOCSIFTXQLEN, ifreq_offsetof(ifr_qlen) }, 253 { "SIFTXQLEN", SIOCSIFTXQLEN, ifreq_offsetof(ifr_qlen) },
@@ -277,7 +277,7 @@ static const struct arg1opt Arg1Opt[] = {
277 { "SIFADDR", SIOCSIFADDR, ifreq_offsetof(ifr_addr) }, 277 { "SIFADDR", SIOCSIFADDR, ifreq_offsetof(ifr_addr) },
278}; 278};
279 279
280static const struct options OptArray[] = { 280static const struct options OptArray[] ALIGN_PTR = {
281 { "metric", N_ARG, ARG_METRIC, 0 }, 281 { "metric", N_ARG, ARG_METRIC, 0 },
282 { "mtu", N_ARG, ARG_MTU, 0 }, 282 { "mtu", N_ARG, ARG_MTU, 0 },
283 { "txqueuelen", N_ARG, ARG_TXQUEUELEN, 0 }, 283 { "txqueuelen", N_ARG, ARG_TXQUEUELEN, 0 },
diff --git a/networking/inetd.c b/networking/inetd.c
index 44b1ac700..9f5a436d6 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -361,7 +361,7 @@ struct builtin {
361 void (*bi_dgram_fn)(int, servtab_t *) FAST_FUNC; 361 void (*bi_dgram_fn)(int, servtab_t *) FAST_FUNC;
362}; 362};
363 363
364static const struct builtin builtins[] = { 364static const struct builtin builtins[] ALIGN_PTR = {
365#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO 365#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO
366 { "echo", 1, echo_stream, echo_dg }, 366 { "echo", 1, echo_stream, echo_dg },
367#endif 367#endif
diff --git a/networking/netstat.c b/networking/netstat.c
index 3ab7b0d21..807800a62 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -114,7 +114,7 @@ enum {
114 TCP_CLOSING, /* now a valid state */ 114 TCP_CLOSING, /* now a valid state */
115}; 115};
116 116
117static const char *const tcp_state[] = { 117static const char *const tcp_state[] ALIGN_PTR = {
118 "", 118 "",
119 "ESTABLISHED", 119 "ESTABLISHED",
120 "SYN_SENT", 120 "SYN_SENT",
diff --git a/networking/nslookup.c b/networking/nslookup.c
index 759de5c83..dda22de0e 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -273,7 +273,7 @@ struct query {
273static const struct { 273static const struct {
274 unsigned char type; 274 unsigned char type;
275 char name[7]; 275 char name[7];
276} qtypes[] = { 276} qtypes[] ALIGN1 = {
277 { ns_t_soa, "SOA" }, 277 { ns_t_soa, "SOA" },
278 { ns_t_ns, "NS" }, 278 { ns_t_ns, "NS" },
279 { ns_t_a, "A" }, 279 { ns_t_a, "A" },
@@ -288,7 +288,7 @@ static const struct {
288 { ns_t_any, "ANY" }, 288 { ns_t_any, "ANY" },
289}; 289};
290 290
291static const char *const rcodes[] = { 291static const char *const rcodes[] ALIGN_PTR = {
292 "NOERROR", // 0 292 "NOERROR", // 0
293 "FORMERR", // 1 293 "FORMERR", // 1
294 "SERVFAIL", // 2 294 "SERVFAIL", // 2
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 34d2a09dd..7dde10524 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -536,7 +536,7 @@ send_probe(int seq, int ttl)
536static const char * 536static const char *
537pr_type(unsigned char t) 537pr_type(unsigned char t)
538{ 538{
539 static const char *const ttab[] = { 539 static const char *const ttab[] ALIGN_PTR = {
540 "Echo Reply", "ICMP 1", "ICMP 2", "Dest Unreachable", 540 "Echo Reply", "ICMP 1", "ICMP 2", "Dest Unreachable",
541 "Source Quench", "Redirect", "ICMP 6", "ICMP 7", 541 "Source Quench", "Redirect", "ICMP 6", "ICMP 7",
542 "Echo", "Router Advert", "Router Solicit", "Time Exceeded", 542 "Echo", "Router Advert", "Router Solicit", "Time Exceeded",
@@ -544,7 +544,7 @@ pr_type(unsigned char t)
544 "Info Reply", "Mask Request", "Mask Reply" 544 "Info Reply", "Mask Request", "Mask Reply"
545 }; 545 };
546# if ENABLE_TRACEROUTE6 546# if ENABLE_TRACEROUTE6
547 static const char *const ttab6[] = { 547 static const char *const ttab6[] ALIGN_PTR = {
548[0] = "Error", "Dest Unreachable", "Packet Too Big", "Time Exceeded", 548[0] = "Error", "Dest Unreachable", "Packet Too Big", "Time Exceeded",
549[4] = "Param Problem", 549[4] = "Param Problem",
550[8] = "Echo Request", "Echo Reply", "Membership Query", "Membership Report", 550[8] = "Echo Request", "Echo Reply", "Membership Query", "Membership Report",
diff --git a/util-linux/blockdev.c b/util-linux/blockdev.c
index e60bbe609..20a031377 100644
--- a/util-linux/blockdev.c
+++ b/util-linux/blockdev.c
@@ -60,7 +60,7 @@ static const char bdcmd_names[] ALIGN1 =
60 "flushbufs" "\0" 60 "flushbufs" "\0"
61 "rereadpt" "\0" 61 "rereadpt" "\0"
62; 62;
63static const uint32_t bdcmd_ioctl[] = { 63static const uint32_t bdcmd_ioctl[] ALIGN4 = {
64 BLKROSET, //setro 64 BLKROSET, //setro
65 BLKROSET, //setrw 65 BLKROSET, //setrw
66 BLKROGET, //getro 66 BLKROGET, //getro