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

@@ -492,7 +492,7 @@ static void load_crontab(const char *fileName)
const char *name;
const char tokens[8];
} SpecialEntry;
static const SpecialEntry SpecAry[] = {
static const SpecialEntry SpecAry[] ALIGN8 = {
/* hour day month weekday */
{ "yearly", "0\0" "1\0" "1\0" "*" },
{ "annually", "0\0" "1\0" "1\0" "*" },

View File

@@ -195,7 +195,7 @@ struct op {
void (*function) (void);
};
static const struct op operators[] = {
static const struct op operators[] ALIGN_PTR = {
#if ENABLE_FEATURE_DC_LIBM
{"^", power},
// {"exp", power},

View File

@@ -1366,7 +1366,7 @@ static NOINLINE void dump_identity(const struct hd_driveid *id)
}
if (id->capability & 1) {
if (id->dma_1word | id->dma_mword) {
static const int dma_wmode_masks[] = { 0x100, 1, 0x200, 2, 0x400, 4, 0xf800, 0xf8 };
static const int dma_wmode_masks[] ALIGN4 = { 0x100, 1, 0x200, 2, 0x400, 4, 0xf800, 0xf8 };
printf("\n DMA modes: ");
print_flags_separated(dma_wmode_masks,
"*\0""sdma0 \0""*\0""sdma1 \0""*\0""sdma2 \0""*\0""sdma? \0",

View File

@@ -1053,18 +1053,13 @@ struct adap_desc {
};
static const struct adap_desc adap_descs[] = {
{ .funcs = "dummy",
.algo = "Dummy bus", },
{ .funcs = "isa",
.algo = "ISA bus", },
{ .funcs = "i2c",
.algo = "I2C adapter", },
{ .funcs = "smbus",
.algo = "SMBus adapter", },
{ .funcs = "dummy", .algo = "Dummy bus", },
{ .funcs = "isa", .algo = "ISA bus", },
{ .funcs = "i2c", .algo = "I2C adapter", },
{ .funcs = "smbus", .algo = "SMBus adapter", },
};
struct i2c_func
{
struct i2c_func {
long value;
const char* name;
};

View File

@@ -30,7 +30,7 @@
#include <sys/mtio.h>
/* missing: eod/seod, stoptions, stwrthreshold, densities */
static const short opcode_value[] = {
static const short opcode_value[] ALIGN2 = {
MTBSF,
MTBSFM,
MTBSR,

View File

@@ -381,8 +381,7 @@ static bool cmd_needs_arg(int cmd)
# error "Unexpected flags size"
#endif
static const uint16_t setbits[CMD_FLAG_LAST + 1] =
{
static const uint16_t setbits[CMD_FLAG_LAST + 1] ALIGN2 = {
0,
ASYNC_SPD_HI,
ASYNC_SPD_VHI,

View File

@@ -97,7 +97,7 @@ static unsigned get_num_from_file(const char *path, unsigned max)
int ubi_tools_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ubi_tools_main(int argc UNUSED_PARAM, char **argv)
{
static const struct suffix_mult size_suffixes[] = {
static const struct suffix_mult size_suffixes[] ALIGN_SUFFIX = {
{ "KiB", 1024 },
{ "MiB", 1024*1024 },
{ "GiB", 1024*1024*1024 },

View File

@@ -88,7 +88,7 @@ int watchdog_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int watchdog_main(int argc UNUSED_PARAM, char **argv)
{
static const int enable = WDIOS_ENABLECARD;
static const struct suffix_mult suffixes[] = {
static const struct suffix_mult suffixes[] ALIGN_SUFFIX = {
{ "ms", 1 },
{ "", 1000 },
{ "", 0 }