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 <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2020-11-30 13:03:03 +01:00
parent 2fba2f5bb9
commit 965b795b87
51 changed files with 92 additions and 96 deletions

View File

@@ -304,7 +304,7 @@ static const char api_modes[] ALIGN1 = "empwia";
static const struct {
const char *name;
smallint (*func)(void);
} method_table[] = {
} method_table[] ALIGN_PTR = {
{ "SIOCETHTOOL" , &detect_link_ethtool },
{ "SIOCGMIIPHY" , &detect_link_mii },
{ "SIOCDEVPRIVATE" , &detect_link_priv },

View File

@@ -746,7 +746,7 @@ static const struct hwtype *const hwtypes[] = {
};
#ifdef IFF_PORTSEL
static const char *const if_port_text[] = {
static const char *const if_port_text[] ALIGN_PTR = {
/* Keep in step with <linux/netdevice.h> */
"unknown",
"10base2",

View File

@@ -400,7 +400,7 @@ int ip_main(int argc UNUSED_PARAM, char **argv)
IF_FEATURE_IP_RULE("rule\0")
IF_FEATURE_IP_NEIGH("neigh\0")
;
static const ip_func_ptr_t ip_func_ptrs[] = {
static const ip_func_ptr_t ip_func_ptrs[] ALIGN_PTR = {
ip_print_help,
IF_FEATURE_IP_ADDRESS(do_ipaddr,)
IF_FEATURE_IP_ROUTE(do_iproute,)

View File

@@ -77,7 +77,7 @@ static rtnl_tab_t *rtnl_rtprot_tab;
static void rtnl_rtprot_initialize(void)
{
static const char *const init_tab[] = {
static const char *const init_tab[] ALIGN_PTR = {
"none",
"redirect",
"kernel",

View File

@@ -460,9 +460,9 @@ static NOINLINE void INET6_setroute(int action, char **args)
#endif
static const
IF_NOT_FEATURE_IPV6(uint16_t)
IF_FEATURE_IPV6(unsigned)
flagvals[] = { /* Must agree with flagchars[]. */
IF_NOT_FEATURE_IPV6(uint16_t flagvals[] ALIGN2 = )
IF_FEATURE_IPV6(uint32_t flagvals[] ALIGN4 = )
{ /* Must agree with flagchars[]. */
RTF_UP,
RTF_GATEWAY,
RTF_HOST,

View File

@@ -1953,7 +1953,7 @@ static void send_client_key_exchange(tls_state_t *tls)
premaster_size = sizeof(rsa_premaster);
} else {
/* ECDHE */
static const uint8_t basepoint9[CURVE25519_KEYSIZE] = {9};
static const uint8_t basepoint9[CURVE25519_KEYSIZE] ALIGN1 = {9};
uint8_t privkey[CURVE25519_KEYSIZE]; //[32]
if (!(tls->flags & GOT_EC_KEY))

View File

@@ -398,7 +398,7 @@ struct config_keyword {
#define OFS(field) offsetof(struct server_data_t, field)
static const struct config_keyword keywords[] = {
static const struct config_keyword keywords[] ALIGN_PTR = {
/* keyword handler variable address default */
{"start" , udhcp_str2nip , OFS(start_ip ), "192.168.0.20"},
{"end" , udhcp_str2nip , OFS(end_ip ), "192.168.0.254"},