diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-11-30 13:03:03 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-11-30 13:03:03 +0100 |
commit | 965b795b87c59ed45cc7f16a62301dbae65b1627 (patch) | |
tree | 958e486f4f23177746ddee11913d3b59ff4e7f8e /util-linux | |
parent | 2fba2f5bb99145eaa1635fe5a162426158d56a2c (diff) | |
download | busybox-w32-965b795b87c59ed45cc7f16a62301dbae65b1627.tar.gz busybox-w32-965b795b87c59ed45cc7f16a62301dbae65b1627.tar.bz2 busybox-w32-965b795b87c59ed45cc7f16a62301dbae65b1627.zip |
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>
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/acpid.c | 4 | ||||
-rw-r--r-- | util-linux/fbset.c | 2 | ||||
-rw-r--r-- | util-linux/fdisk.c | 2 | ||||
-rw-r--r-- | util-linux/fdisk_osf.c | 4 | ||||
-rw-r--r-- | util-linux/fdisk_sgi.c | 2 | ||||
-rw-r--r-- | util-linux/fdisk_sun.c | 4 | ||||
-rw-r--r-- | util-linux/mkfs_ext2.c | 2 | ||||
-rw-r--r-- | util-linux/mount.c | 2 | ||||
-rw-r--r-- | util-linux/volume_id/volume_id.c | 8 |
9 files changed, 15 insertions, 15 deletions
diff --git a/util-linux/acpid.c b/util-linux/acpid.c index d473e24fc..00613f8e3 100644 --- a/util-linux/acpid.c +++ b/util-linux/acpid.c | |||
@@ -99,7 +99,7 @@ struct acpi_event { | |||
99 | const char *desc; | 99 | const char *desc; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | static const struct acpi_event f_evt_tab[] = { | 102 | static const struct acpi_event f_evt_tab[] ALIGN_PTR = { |
103 | { "EV_KEY", 0x01, "KEY_POWER", 116, 1, "button/power PWRF 00000080" }, | 103 | { "EV_KEY", 0x01, "KEY_POWER", 116, 1, "button/power PWRF 00000080" }, |
104 | { "EV_KEY", 0x01, "KEY_POWER", 116, 1, "button/power PWRB 00000080" }, | 104 | { "EV_KEY", 0x01, "KEY_POWER", 116, 1, "button/power PWRB 00000080" }, |
105 | { "EV_SW", 0x05, "SW_LID", 0x00, 1, "button/lid LID0 00000080" }, | 105 | { "EV_SW", 0x05, "SW_LID", 0x00, 1, "button/lid LID0 00000080" }, |
@@ -110,7 +110,7 @@ struct acpi_action { | |||
110 | const char *action; | 110 | const char *action; |
111 | }; | 111 | }; |
112 | 112 | ||
113 | static const struct acpi_action f_act_tab[] = { | 113 | static const struct acpi_action f_act_tab[] ALIGN_PTR = { |
114 | { "PWRF", "PWRF/00000080" }, | 114 | { "PWRF", "PWRF/00000080" }, |
115 | { "LID0", "LID/00000080" }, | 115 | { "LID0", "LID/00000080" }, |
116 | }; | 116 | }; |
diff --git a/util-linux/fbset.c b/util-linux/fbset.c index 0b9a9a6bc..cc5413b40 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c | |||
@@ -193,7 +193,7 @@ static const struct cmdoptions_t { | |||
193 | const char name[9]; | 193 | const char name[9]; |
194 | const unsigned char param_count; | 194 | const unsigned char param_count; |
195 | const unsigned char code; | 195 | const unsigned char code; |
196 | } g_cmdoptions[] = { | 196 | } g_cmdoptions[] ALIGN1 = { |
197 | /*"12345678" + NUL */ | 197 | /*"12345678" + NUL */ |
198 | //TODO: convert to index_in_strings() | 198 | //TODO: convert to index_in_strings() |
199 | { "fb" , 1, CMD_FB }, | 199 | { "fb" , 1, CMD_FB }, |
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 0df3ebf7d..6454baab8 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
@@ -303,7 +303,7 @@ static sector_t get_nr_sects(const struct partition *p); | |||
303 | 303 | ||
304 | /* DOS partition types */ | 304 | /* DOS partition types */ |
305 | 305 | ||
306 | static const char *const i386_sys_types[] = { | 306 | static const char *const i386_sys_types[] ALIGN_PTR = { |
307 | "\x00" "Empty", | 307 | "\x00" "Empty", |
308 | "\x01" "FAT12", | 308 | "\x01" "FAT12", |
309 | "\x04" "FAT16 <32M", | 309 | "\x04" "FAT16 <32M", |
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c index 92180b2bc..765740ff1 100644 --- a/util-linux/fdisk_osf.c +++ b/util-linux/fdisk_osf.c | |||
@@ -144,7 +144,7 @@ struct xbsd_disklabel { | |||
144 | #define BSD_DSTYPE_DOSPART(s) ((s) & 3) /* dos partition number */ | 144 | #define BSD_DSTYPE_DOSPART(s) ((s) & 3) /* dos partition number */ |
145 | #define BSD_DSTYPE_GEOMETRY 0x10 /* drive params in label */ | 145 | #define BSD_DSTYPE_GEOMETRY 0x10 /* drive params in label */ |
146 | 146 | ||
147 | static const char *const xbsd_dktypenames[] = { | 147 | static const char *const xbsd_dktypenames[] ALIGN_PTR = { |
148 | "unknown", | 148 | "unknown", |
149 | "SMD", | 149 | "SMD", |
150 | "MSCP", | 150 | "MSCP", |
@@ -190,7 +190,7 @@ static const char *const xbsd_dktypenames[] = { | |||
190 | #define BSD_FS_MSDOS 8 /* MS-DOS file system */ | 190 | #define BSD_FS_MSDOS 8 /* MS-DOS file system */ |
191 | #endif | 191 | #endif |
192 | 192 | ||
193 | static const char *const xbsd_fstypes[] = { | 193 | static const char *const xbsd_fstypes[] ALIGN_PTR = { |
194 | "\x00" "unused", /* BSD_FS_UNUSED */ | 194 | "\x00" "unused", /* BSD_FS_UNUSED */ |
195 | "\x01" "swap", /* BSD_FS_SWAP */ | 195 | "\x01" "swap", /* BSD_FS_SWAP */ |
196 | "\x02" "Version 6", /* BSD_FS_V6 */ | 196 | "\x02" "Version 6", /* BSD_FS_V6 */ |
diff --git a/util-linux/fdisk_sgi.c b/util-linux/fdisk_sgi.c index c90c801e2..acb438ac0 100644 --- a/util-linux/fdisk_sgi.c +++ b/util-linux/fdisk_sgi.c | |||
@@ -174,7 +174,7 @@ isinfreelist(unsigned int b) | |||
174 | * end of free blocks section | 174 | * end of free blocks section |
175 | */ | 175 | */ |
176 | 176 | ||
177 | static const char *const sgi_sys_types[] = { | 177 | static const char *const sgi_sys_types[] ALIGN_PTR = { |
178 | /* SGI_VOLHDR */ "\x00" "SGI volhdr" , | 178 | /* SGI_VOLHDR */ "\x00" "SGI volhdr" , |
179 | /* 0x01 */ "\x01" "SGI trkrepl" , | 179 | /* 0x01 */ "\x01" "SGI trkrepl" , |
180 | /* 0x02 */ "\x02" "SGI secrepl" , | 180 | /* 0x02 */ "\x02" "SGI secrepl" , |
diff --git a/util-linux/fdisk_sun.c b/util-linux/fdisk_sun.c index 29d7c283a..427b9487b 100644 --- a/util-linux/fdisk_sun.c +++ b/util-linux/fdisk_sun.c | |||
@@ -61,7 +61,7 @@ guess_device_type(void) | |||
61 | } | 61 | } |
62 | } | 62 | } |
63 | 63 | ||
64 | static const char *const sun_sys_types[] = { | 64 | static const char *const sun_sys_types[] ALIGN_PTR = { |
65 | "\x00" "Empty" , /* 0 */ | 65 | "\x00" "Empty" , /* 0 */ |
66 | "\x01" "Boot" , /* 1 */ | 66 | "\x01" "Boot" , /* 1 */ |
67 | "\x02" "SunOS root" , /* 2 */ | 67 | "\x02" "SunOS root" , /* 2 */ |
@@ -133,7 +133,7 @@ static const struct sun_predefined_drives { | |||
133 | unsigned short ntrks; | 133 | unsigned short ntrks; |
134 | unsigned short nsect; | 134 | unsigned short nsect; |
135 | unsigned short rspeed; | 135 | unsigned short rspeed; |
136 | } sun_drives[] = { | 136 | } sun_drives[] ALIGN_PTR = { |
137 | { "Quantum","ProDrive 80S",1,832,2,834,6,34,3662}, | 137 | { "Quantum","ProDrive 80S",1,832,2,834,6,34,3662}, |
138 | { "Quantum","ProDrive 105S",1,974,2,1019,6,35,3662}, | 138 | { "Quantum","ProDrive 105S",1,974,2,1019,6,35,3662}, |
139 | { "CDC","Wren IV 94171-344",3,1545,2,1549,9,46,3600}, | 139 | { "CDC","Wren IV 94171-344",3,1545,2,1549,9,46,3600}, |
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index 1f525d75b..fcf374b2d 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c | |||
@@ -131,7 +131,7 @@ static void allocate(uint8_t *bitmap, uint32_t blocksize, uint32_t start, uint32 | |||
131 | static uint32_t has_super(uint32_t x) | 131 | static uint32_t has_super(uint32_t x) |
132 | { | 132 | { |
133 | // 0, 1 and powers of 3, 5, 7 up to 2^32 limit | 133 | // 0, 1 and powers of 3, 5, 7 up to 2^32 limit |
134 | static const uint32_t supers[] = { | 134 | static const uint32_t supers[] ALIGN4 = { |
135 | 0, 1, 3, 5, 7, 9, 25, 27, 49, 81, 125, 243, 343, 625, 729, | 135 | 0, 1, 3, 5, 7, 9, 25, 27, 49, 81, 125, 243, 343, 625, 729, |
136 | 2187, 2401, 3125, 6561, 15625, 16807, 19683, 59049, 78125, | 136 | 2187, 2401, 3125, 6561, 15625, 16807, 19683, 59049, 78125, |
137 | 117649, 177147, 390625, 531441, 823543, 1594323, 1953125, | 137 | 117649, 177147, 390625, 531441, 823543, 1594323, 1953125, |
diff --git a/util-linux/mount.c b/util-linux/mount.c index fc5161d7f..aa38847ec 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -323,7 +323,7 @@ enum { | |||
323 | 323 | ||
324 | // Standard mount options (from -o options or --options), | 324 | // Standard mount options (from -o options or --options), |
325 | // with corresponding flags | 325 | // with corresponding flags |
326 | static const int32_t mount_options[] = { | 326 | static const int32_t mount_options[] ALIGN4 = { |
327 | // MS_FLAGS set a bit. ~MS_FLAGS disable that bit. 0 flags are NOPs. | 327 | // MS_FLAGS set a bit. ~MS_FLAGS disable that bit. 0 flags are NOPs. |
328 | 328 | ||
329 | IF_FEATURE_MOUNT_LOOP( | 329 | IF_FEATURE_MOUNT_LOOP( |
diff --git a/util-linux/volume_id/volume_id.c b/util-linux/volume_id/volume_id.c index 99150a5b7..8ceb61bde 100644 --- a/util-linux/volume_id/volume_id.c +++ b/util-linux/volume_id/volume_id.c | |||
@@ -49,7 +49,7 @@ | |||
49 | typedef int FAST_FUNC (*raid_probe_fptr)(struct volume_id *id, /*uint64_t off,*/ uint64_t size); | 49 | typedef int FAST_FUNC (*raid_probe_fptr)(struct volume_id *id, /*uint64_t off,*/ uint64_t size); |
50 | typedef int FAST_FUNC (*probe_fptr)(struct volume_id *id /*, uint64_t off*/); | 50 | typedef int FAST_FUNC (*probe_fptr)(struct volume_id *id /*, uint64_t off*/); |
51 | 51 | ||
52 | static const raid_probe_fptr raid1[] = { | 52 | static const raid_probe_fptr raid1[] ALIGN_PTR = { |
53 | #if ENABLE_FEATURE_VOLUMEID_LINUXRAID | 53 | #if ENABLE_FEATURE_VOLUMEID_LINUXRAID |
54 | volume_id_probe_linux_raid, | 54 | volume_id_probe_linux_raid, |
55 | #endif | 55 | #endif |
@@ -76,7 +76,7 @@ static const raid_probe_fptr raid1[] = { | |||
76 | #endif | 76 | #endif |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static const probe_fptr raid2[] = { | 79 | static const probe_fptr raid2[] ALIGN_PTR = { |
80 | #if ENABLE_FEATURE_VOLUMEID_LVM | 80 | #if ENABLE_FEATURE_VOLUMEID_LVM |
81 | volume_id_probe_lvm1, | 81 | volume_id_probe_lvm1, |
82 | volume_id_probe_lvm2, | 82 | volume_id_probe_lvm2, |
@@ -90,7 +90,7 @@ static const probe_fptr raid2[] = { | |||
90 | }; | 90 | }; |
91 | 91 | ||
92 | /* signature in the first block, only small buffer needed */ | 92 | /* signature in the first block, only small buffer needed */ |
93 | static const probe_fptr fs1[] = { | 93 | static const probe_fptr fs1[] ALIGN_PTR = { |
94 | #if ENABLE_FEATURE_VOLUMEID_FAT | 94 | #if ENABLE_FEATURE_VOLUMEID_FAT |
95 | volume_id_probe_vfat, | 95 | volume_id_probe_vfat, |
96 | #endif | 96 | #endif |
@@ -118,7 +118,7 @@ static const probe_fptr fs1[] = { | |||
118 | }; | 118 | }; |
119 | 119 | ||
120 | /* fill buffer with maximum */ | 120 | /* fill buffer with maximum */ |
121 | static const probe_fptr fs2[] = { | 121 | static const probe_fptr fs2[] ALIGN_PTR = { |
122 | #if ENABLE_FEATURE_VOLUMEID_LINUXSWAP | 122 | #if ENABLE_FEATURE_VOLUMEID_LINUXSWAP |
123 | volume_id_probe_linux_swap, | 123 | volume_id_probe_linux_swap, |
124 | #endif | 124 | #endif |