aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-11-30 13:03:03 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-11-30 13:03:03 +0100
commit965b795b87c59ed45cc7f16a62301dbae65b1627 (patch)
tree958e486f4f23177746ddee11913d3b59ff4e7f8e
parent2fba2f5bb99145eaa1635fe5a162426158d56a2c (diff)
downloadbusybox-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>
-rw-r--r--archival/dpkg.c2
-rw-r--r--archival/libarchive/bz/blocksort.c2
-rw-r--r--archival/libarchive/data_extract_to_command.c2
-rw-r--r--coreutils/od_bloaty.c4
-rw-r--r--coreutils/split.c2
-rw-r--r--coreutils/stat.c2
-rw-r--r--coreutils/stty.c4
-rw-r--r--coreutils/test.c2
-rw-r--r--e2fsprogs/e2fs_lib.c2
-rw-r--r--editors/awk.c2
-rw-r--r--findutils/find.c2
-rw-r--r--include/libbb.h3
-rw-r--r--include/platform.h2
-rw-r--r--libbb/capability.c2
-rw-r--r--libbb/duration.c2
-rw-r--r--libbb/hash_md5_sha.c22
-rw-r--r--libbb/mode_string.c2
-rw-r--r--libbb/pw_encrypt_des.c15
-rw-r--r--libbb/speed_table.c2
-rw-r--r--libbb/xatonum.c6
-rw-r--r--miscutils/crond.c2
-rw-r--r--miscutils/dc.c2
-rw-r--r--miscutils/hdparm.c2
-rw-r--r--miscutils/i2c_tools.c15
-rw-r--r--miscutils/mt.c2
-rw-r--r--miscutils/setserial.c3
-rw-r--r--miscutils/ubi_tools.c2
-rw-r--r--miscutils/watchdog.c2
-rw-r--r--modutils/modinfo.c2
-rw-r--r--networking/ifplugd.c2
-rw-r--r--networking/interface.c2
-rw-r--r--networking/ip.c2
-rw-r--r--networking/libiproute/rt_names.c2
-rw-r--r--networking/route.c6
-rw-r--r--networking/tls.c2
-rw-r--r--networking/udhcp/dhcpd.c2
-rw-r--r--procps/nmeter.c2
-rw-r--r--procps/ps.c2
-rw-r--r--runit/svlogd.c2
-rw-r--r--shell/ash.c6
-rw-r--r--shell/hush.c12
-rw-r--r--shell/shell_common.c2
-rw-r--r--util-linux/acpid.c4
-rw-r--r--util-linux/fbset.c2
-rw-r--r--util-linux/fdisk.c2
-rw-r--r--util-linux/fdisk_osf.c4
-rw-r--r--util-linux/fdisk_sgi.c2
-rw-r--r--util-linux/fdisk_sun.c4
-rw-r--r--util-linux/mkfs_ext2.c2
-rw-r--r--util-linux/mount.c2
-rw-r--r--util-linux/volume_id/volume_id.c8
51 files changed, 92 insertions, 96 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 68a40bf6e..bf070a001 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1304,7 +1304,7 @@ postrm abort-install <old_version>
1304postrm abort-upgrade <old_version> 1304postrm abort-upgrade <old_version>
1305postrm disappear <overwriter> <version> 1305postrm disappear <overwriter> <version>
1306*/ 1306*/
1307static const char *const all_control_files[] = { 1307static const char *const all_control_files[] ALIGN_PTR = {
1308 "preinst", "postinst", "prerm", "postrm", 1308 "preinst", "postinst", "prerm", "postrm",
1309 "list", "md5sums", "shlibs", "conffiles", 1309 "list", "md5sums", "shlibs", "conffiles",
1310 "config", "templates" 1310 "config", "templates"
diff --git a/archival/libarchive/bz/blocksort.c b/archival/libarchive/bz/blocksort.c
index 92d6d8251..062fd0f54 100644
--- a/archival/libarchive/bz/blocksort.c
+++ b/archival/libarchive/bz/blocksort.c
@@ -459,7 +459,7 @@ int mainGtU(EState* state,
459 * usually small, typically <= 20. 459 * usually small, typically <= 20.
460 */ 460 */
461static 461static
462const uint32_t incs[14] = { 462const uint32_t incs[14] ALIGN4 = {
463 1, 4, 13, 40, 121, 364, 1093, 3280, 463 1, 4, 13, 40, 121, 364, 1093, 3280,
464 9841, 29524, 88573, 265720, 464 9841, 29524, 88573, 265720,
465 797161, 2391484 465 797161, 2391484
diff --git a/archival/libarchive/data_extract_to_command.c b/archival/libarchive/data_extract_to_command.c
index 0fcabb4a9..f8b2ff8d2 100644
--- a/archival/libarchive/data_extract_to_command.c
+++ b/archival/libarchive/data_extract_to_command.c
@@ -20,7 +20,7 @@ enum {
20 TAR_MAX, 20 TAR_MAX,
21}; 21};
22 22
23static const char *const tar_var[] = { 23static const char *const tar_var[] ALIGN_PTR = {
24 // "FILETYPE", 24 // "FILETYPE",
25 "MODE", 25 "MODE",
26 "FILENAME", 26 "FILENAME",
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index e9c071f3a..d5bd7bfe8 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -627,7 +627,7 @@ decode_one_format(const char *s_orig, const char *s, struct tspec *tspec)
627 bytes_to_unsigned_dec_digits, 627 bytes_to_unsigned_dec_digits,
628 bytes_to_hex_digits, 628 bytes_to_hex_digits,
629 }; 629 };
630 static const char doux_fmtstring[][sizeof(" %%0%u%s")] = { 630 static const char doux_fmtstring[][sizeof(" %%0%u%s")] ALIGN1 = {
631 " %%%u%s", 631 " %%%u%s",
632 " %%0%u%s", 632 " %%0%u%s",
633 " %%%u%s", 633 " %%%u%s",
@@ -1148,7 +1148,7 @@ dump_strings(off_t address, off_t end_offset)
1148static int 1148static int
1149parse_old_offset(const char *s, off_t *offset) 1149parse_old_offset(const char *s, off_t *offset)
1150{ 1150{
1151 static const struct suffix_mult Bb[] = { 1151 static const struct suffix_mult Bb[] ALIGN_SUFFIX = {
1152 { "B", 1024 }, 1152 { "B", 1024 },
1153 { "b", 512 }, 1153 { "b", 512 },
1154 { "", 0 } 1154 { "", 0 }
diff --git a/coreutils/split.c b/coreutils/split.c
index ecbc9d2d8..3fcfd95f2 100644
--- a/coreutils/split.c
+++ b/coreutils/split.c
@@ -44,7 +44,7 @@
44#include "common_bufsiz.h" 44#include "common_bufsiz.h"
45 45
46#if ENABLE_FEATURE_SPLIT_FANCY 46#if ENABLE_FEATURE_SPLIT_FANCY
47static const struct suffix_mult split_suffixes[] = { 47static const struct suffix_mult split_suffixes[] ALIGN_SUFFIX = {
48 { "b", 512 }, 48 { "b", 512 },
49 { "k", 1024 }, 49 { "k", 1024 },
50 { "m", 1024*1024 }, 50 { "m", 1024*1024 },
diff --git a/coreutils/stat.c b/coreutils/stat.c
index 8a23d687b..ee5e03edd 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -208,7 +208,7 @@ FS_TYPE(0x62656572, "sysfs")
208static const char *human_fstype(uint32_t f_type) 208static const char *human_fstype(uint32_t f_type)
209{ 209{
210# define FS_TYPE(type, name) type, 210# define FS_TYPE(type, name) type,
211 static const uint32_t fstype[] = { 211 static const uint32_t fstype[] ALIGN4 = {
212 FS_TYPE_LIST 212 FS_TYPE_LIST
213 }; 213 };
214# undef FS_TYPE 214# undef FS_TYPE
diff --git a/coreutils/stty.c b/coreutils/stty.c
index 40e812799..19253964c 100644
--- a/coreutils/stty.c
+++ b/coreutils/stty.c
@@ -487,7 +487,7 @@ static const char mode_name[] ALIGN1 =
487#undef MI_ENTRY 487#undef MI_ENTRY
488#define MI_ENTRY(N,T,F,B,M) { T, F, M, B }, 488#define MI_ENTRY(N,T,F,B,M) { T, F, M, B },
489 489
490static const struct mode_info mode_info[] = { 490static const struct mode_info mode_info[] ALIGN4 = {
491 /* This should be verbatim cut-n-paste copy of the above MI_ENTRYs */ 491 /* This should be verbatim cut-n-paste copy of the above MI_ENTRYs */
492 MI_ENTRY("evenp", combination, REV | OMIT, 0, 0 ) 492 MI_ENTRY("evenp", combination, REV | OMIT, 0, 0 )
493 MI_ENTRY("parity", combination, REV | OMIT, 0, 0 ) 493 MI_ENTRY("parity", combination, REV | OMIT, 0, 0 )
@@ -905,7 +905,7 @@ static void display_window_size(int fancy)
905 } 905 }
906} 906}
907 907
908static const struct suffix_mult stty_suffixes[] = { 908static const struct suffix_mult stty_suffixes[] ALIGN_SUFFIX = {
909 { "b", 512 }, 909 { "b", 512 },
910 { "k", 1024 }, 910 { "k", 1024 },
911 { "B", 1024 }, 911 { "B", 1024 },
diff --git a/coreutils/test.c b/coreutils/test.c
index ac7b546a3..7c6574334 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -306,7 +306,7 @@ struct operator_t {
306 unsigned char op_num, op_type; 306 unsigned char op_num, op_type;
307}; 307};
308 308
309static const struct operator_t ops_table[] = { 309static const struct operator_t ops_table[] ALIGN2 = {
310 { /* "-r" */ FILRD , UNOP }, 310 { /* "-r" */ FILRD , UNOP },
311 { /* "-w" */ FILWR , UNOP }, 311 { /* "-w" */ FILWR , UNOP },
312 { /* "-x" */ FILEX , UNOP }, 312 { /* "-x" */ FILEX , UNOP },
diff --git a/e2fsprogs/e2fs_lib.c b/e2fsprogs/e2fs_lib.c
index 6ce655be3..8bd4da622 100644
--- a/e2fsprogs/e2fs_lib.c
+++ b/e2fsprogs/e2fs_lib.c
@@ -127,7 +127,7 @@ int fgetsetflags(const char *name, unsigned long *get_flags, unsigned long set_f
127 127
128 128
129/* Print file attributes on an ext2 file system */ 129/* Print file attributes on an ext2 file system */
130const uint32_t e2attr_flags_value[] = { 130const uint32_t e2attr_flags_value[] ALIGN4 = {
131#ifdef ENABLE_COMPRESSION 131#ifdef ENABLE_COMPRESSION
132 EXT2_COMPRBLK_FL, 132 EXT2_COMPRBLK_FL,
133 EXT2_DIRTY_FL, 133 EXT2_DIRTY_FL,
diff --git a/editors/awk.c b/editors/awk.c
index 59dae4770..d56d6330d 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -405,7 +405,7 @@ static const char tokenlist[] ALIGN1 =
405 405
406#define OC_B OC_BUILTIN 406#define OC_B OC_BUILTIN
407 407
408static const uint32_t tokeninfo[] = { 408static const uint32_t tokeninfo[] ALIGN4 = {
409 0, 409 0,
410 0, 410 0,
411 OC_REGEXP, 411 OC_REGEXP,
diff --git a/findutils/find.c b/findutils/find.c
index e2947afb4..a8c3fa346 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -1441,7 +1441,7 @@ static action*** parse_params(char **argv)
1441#else 1441#else
1442#define XATOU_SFX xatoul_sfx 1442#define XATOU_SFX xatoul_sfx
1443#endif 1443#endif
1444 static const struct suffix_mult find_suffixes[] = { 1444 static const struct suffix_mult find_suffixes[] ALIGN_SUFFIX = {
1445 { "c", 1 }, 1445 { "c", 1 },
1446 { "w", 2 }, 1446 { "w", 2 },
1447 { "", 512 }, 1447 { "", 512 },
diff --git a/include/libbb.h b/include/libbb.h
index 18dc9f935..9872dc1fb 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1026,8 +1026,9 @@ void generate_uuid(uint8_t *buf) FAST_FUNC;
1026/* Last element is marked by mult == 0 */ 1026/* Last element is marked by mult == 0 */
1027struct suffix_mult { 1027struct suffix_mult {
1028 char suffix[4]; 1028 char suffix[4];
1029 unsigned mult; 1029 uint32_t mult;
1030}; 1030};
1031#define ALIGN_SUFFIX ALIGN4
1031extern const struct suffix_mult bkm_suffixes[]; 1032extern const struct suffix_mult bkm_suffixes[];
1032#define km_suffixes (bkm_suffixes + 1) 1033#define km_suffixes (bkm_suffixes + 1)
1033extern const struct suffix_mult cwbkMG_suffixes[]; 1034extern const struct suffix_mult cwbkMG_suffixes[];
diff --git a/include/platform.h b/include/platform.h
index 43bb391bd..085387fd8 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -342,6 +342,8 @@ typedef unsigned smalluint;
342# define ALIGN2 342# define ALIGN2
343# define ALIGN4 343# define ALIGN4
344#endif 344#endif
345#define ALIGN8 __attribute__((aligned(8)))
346#define ALIGN_PTR __attribute__((aligned(sizeof(void*))))
345 347
346/* 348/*
347 * For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably. 349 * For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably.
diff --git a/libbb/capability.c b/libbb/capability.c
index 23afd8eb9..e3c252a5a 100644
--- a/libbb/capability.c
+++ b/libbb/capability.c
@@ -17,7 +17,7 @@ extern int capget(cap_user_header_t header, const cap_user_data_t data);
17// This way, libcap needs not be installed in build environment. 17// This way, libcap needs not be installed in build environment.
18#include "libbb.h" 18#include "libbb.h"
19 19
20static const char *const capabilities[] = { 20static const char *const capabilities[] ALIGN_PTR = {
21 "chown", 21 "chown",
22 "dac_override", 22 "dac_override",
23 "dac_read_search", 23 "dac_read_search",
diff --git a/libbb/duration.c b/libbb/duration.c
index 22b209f4d..086da15fb 100644
--- a/libbb/duration.c
+++ b/libbb/duration.c
@@ -21,7 +21,7 @@
21 21
22#include "libbb.h" 22#include "libbb.h"
23 23
24static const struct suffix_mult duration_suffixes[] = { 24static const struct suffix_mult duration_suffixes[] ALIGN_SUFFIX = {
25 { "s", 1 }, 25 { "s", 1 },
26 { "m", 60 }, 26 { "m", 60 },
27 { "h", 60*60 }, 27 { "h", 60*60 },
diff --git a/libbb/hash_md5_sha.c b/libbb/hash_md5_sha.c
index d8f210173..e0db8ce67 100644
--- a/libbb/hash_md5_sha.c
+++ b/libbb/hash_md5_sha.c
@@ -111,7 +111,7 @@ static void FAST_FUNC md5_process_block64(md5_ctx_t *ctx)
111 They are defined in RFC 1321 as 111 They are defined in RFC 1321 as
112 T[i] = (int)(2^32 * fabs(sin(i))), i=1..64 112 T[i] = (int)(2^32 * fabs(sin(i))), i=1..64
113 */ 113 */
114 static const uint32_t C_array[] = { 114 static const uint32_t C_array[] ALIGN4 = {
115 /* round 1 */ 115 /* round 1 */
116 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 116 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee,
117 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, 117 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501,
@@ -492,7 +492,7 @@ unsigned FAST_FUNC md5_end(md5_ctx_t *ctx, void *resbuf)
492 492
493static void FAST_FUNC sha1_process_block64(sha1_ctx_t *ctx) 493static void FAST_FUNC sha1_process_block64(sha1_ctx_t *ctx)
494{ 494{
495 static const uint32_t rconsts[] = { 495 static const uint32_t rconsts[] ALIGN4 = {
496 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 496 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6
497 }; 497 };
498 int i, j; 498 int i, j;
@@ -567,7 +567,7 @@ typedef uint64_t sha_K_int;
567typedef uint32_t sha_K_int; 567typedef uint32_t sha_K_int;
568# define K(v) (uint32_t)(v >> 32) 568# define K(v) (uint32_t)(v >> 32)
569#endif 569#endif
570static const sha_K_int sha_K[] = { 570static const sha_K_int sha_K[] ALIGN8 = {
571 K(0x428a2f98d728ae22ULL), K(0x7137449123ef65cdULL), 571 K(0x428a2f98d728ae22ULL), K(0x7137449123ef65cdULL),
572 K(0xb5c0fbcfec4d3b2fULL), K(0xe9b5dba58189dbbcULL), 572 K(0xb5c0fbcfec4d3b2fULL), K(0xe9b5dba58189dbbcULL),
573 K(0x3956c25bf348b538ULL), K(0x59f111f1b605d019ULL), 573 K(0x3956c25bf348b538ULL), K(0x59f111f1b605d019ULL),
@@ -760,7 +760,7 @@ void FAST_FUNC sha1_begin(sha1_ctx_t *ctx)
760 ctx->process_block = sha1_process_block64; 760 ctx->process_block = sha1_process_block64;
761} 761}
762 762
763static const uint32_t init256[] = { 763static const uint32_t init256[] ALIGN4 = {
764 0, 764 0,
765 0, 765 0,
766 0x6a09e667, 766 0x6a09e667,
@@ -773,7 +773,7 @@ static const uint32_t init256[] = {
773 0x5be0cd19, 773 0x5be0cd19,
774}; 774};
775#if NEED_SHA512 775#if NEED_SHA512
776static const uint32_t init512_lo[] = { 776static const uint32_t init512_lo[] ALIGN4 = {
777 0, 777 0,
778 0, 778 0,
779 0xf3bcc908, 779 0xf3bcc908,
@@ -1009,7 +1009,7 @@ static void sha3_process_block72(uint64_t *state)
1009 1009
1010#if OPTIMIZE_SHA3_FOR_32 1010#if OPTIMIZE_SHA3_FOR_32
1011 /* 1011 /*
1012 static const uint32_t IOTA_CONST_0[NROUNDS] = { 1012 static const uint32_t IOTA_CONST_0[NROUNDS] ALIGN4 = {
1013 0x00000001UL, 1013 0x00000001UL,
1014 0x00000000UL, 1014 0x00000000UL,
1015 0x00000000UL, 1015 0x00000000UL,
@@ -1038,7 +1038,7 @@ static void sha3_process_block72(uint64_t *state)
1038 ** bits are in lsb: 0101 0000 1111 0100 1111 0001 1038 ** bits are in lsb: 0101 0000 1111 0100 1111 0001
1039 */ 1039 */
1040 uint32_t IOTA_CONST_0bits = (uint32_t)(0x0050f4f1); 1040 uint32_t IOTA_CONST_0bits = (uint32_t)(0x0050f4f1);
1041 static const uint32_t IOTA_CONST_1[NROUNDS] = { 1041 static const uint32_t IOTA_CONST_1[NROUNDS] ALIGN4 = {
1042 0x00000000UL, 1042 0x00000000UL,
1043 0x00000089UL, 1043 0x00000089UL,
1044 0x8000008bUL, 1044 0x8000008bUL,
@@ -1174,7 +1174,7 @@ static void sha3_process_block72(uint64_t *state)
1174 combine_halves(state); 1174 combine_halves(state);
1175#else 1175#else
1176 /* Native 64-bit algorithm */ 1176 /* Native 64-bit algorithm */
1177 static const uint16_t IOTA_CONST[NROUNDS] = { 1177 static const uint16_t IOTA_CONST[NROUNDS] ALIGN2 = {
1178 /* Elements should be 64-bit, but top half is always zero 1178 /* Elements should be 64-bit, but top half is always zero
1179 * or 0x80000000. We encode 63rd bits in a separate word below. 1179 * or 0x80000000. We encode 63rd bits in a separate word below.
1180 * Same is true for 31th bits, which lets us use 16-bit table 1180 * Same is true for 31th bits, which lets us use 16-bit table
@@ -1210,15 +1210,15 @@ static void sha3_process_block72(uint64_t *state)
1210 /* bit for CONST[0] is in msb: 0001 0110 0011 1000 0001 1011 */ 1210 /* bit for CONST[0] is in msb: 0001 0110 0011 1000 0001 1011 */
1211 const uint32_t IOTA_CONST_bit31 = (uint32_t)(0x16381b00); 1211 const uint32_t IOTA_CONST_bit31 = (uint32_t)(0x16381b00);
1212 1212
1213 static const uint8_t ROT_CONST[24] = { 1213 static const uint8_t ROT_CONST[24] ALIGN1 = {
1214 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 2, 14, 1214 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 2, 14,
1215 27, 41, 56, 8, 25, 43, 62, 18, 39, 61, 20, 44, 1215 27, 41, 56, 8, 25, 43, 62, 18, 39, 61, 20, 44,
1216 }; 1216 };
1217 static const uint8_t PI_LANE[24] = { 1217 static const uint8_t PI_LANE[24] ALIGN1 = {
1218 10, 7, 11, 17, 18, 3, 5, 16, 8, 21, 24, 4, 1218 10, 7, 11, 17, 18, 3, 5, 16, 8, 21, 24, 4,
1219 15, 23, 19, 13, 12, 2, 20, 14, 22, 9, 6, 1, 1219 15, 23, 19, 13, 12, 2, 20, 14, 22, 9, 6, 1,
1220 }; 1220 };
1221 /*static const uint8_t MOD5[10] = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, };*/ 1221 /*static const uint8_t MOD5[10] ALIGN1 = { 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, };*/
1222 1222
1223 unsigned x; 1223 unsigned x;
1224 unsigned round; 1224 unsigned round;
diff --git a/libbb/mode_string.c b/libbb/mode_string.c
index 5ffd5683e..9a286f3ff 100644
--- a/libbb/mode_string.c
+++ b/libbb/mode_string.c
@@ -27,7 +27,7 @@
27#define mode_t unsigned short 27#define mode_t unsigned short
28#endif 28#endif
29 29
30static const mode_t mode_flags[] = { 30static const mode_t mode_flags[] ALIGN4 = {
31 S_IRUSR, S_IWUSR, S_IXUSR, S_ISUID, 31 S_IRUSR, S_IWUSR, S_IXUSR, S_ISUID,
32 S_IRGRP, S_IWGRP, S_IXGRP, S_ISGID, 32 S_IRGRP, S_IWGRP, S_IXGRP, S_ISGID,
33 S_IROTH, S_IWOTH, S_IXOTH, S_ISVTX 33 S_IROTH, S_IWOTH, S_IXOTH, S_ISVTX
diff --git a/libbb/pw_encrypt_des.c b/libbb/pw_encrypt_des.c
index 19a9ab15b..c6fc328d8 100644
--- a/libbb/pw_encrypt_des.c
+++ b/libbb/pw_encrypt_des.c
@@ -65,25 +65,25 @@
65 65
66 66
67/* A pile of data */ 67/* A pile of data */
68static const uint8_t IP[64] = { 68static const uint8_t IP[64] ALIGN1 = {
69 58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4, 69 58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4,
70 62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8, 70 62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8,
71 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3, 71 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3,
72 61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7 72 61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7
73}; 73};
74 74
75static const uint8_t key_perm[56] = { 75static const uint8_t key_perm[56] ALIGN1 = {
76 57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 76 57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18,
77 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 77 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36,
78 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 78 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22,
79 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4 79 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4
80}; 80};
81 81
82static const uint8_t key_shifts[16] = { 82static const uint8_t key_shifts[16] ALIGN1 = {
83 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1 83 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1
84}; 84};
85 85
86static const uint8_t comp_perm[48] = { 86static const uint8_t comp_perm[48] ALIGN1 = {
87 14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 87 14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10,
88 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 88 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2,
89 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 89 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48,
@@ -181,13 +181,12 @@ static const uint8_t u_sbox[8][32] = {
181}; 181};
182#endif 182#endif
183 183
184static const uint8_t pbox[32] = { 184static const uint8_t pbox[32] ALIGN1 = {
185 16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10, 185 16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10,
186 2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25 186 2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25
187}; 187};
188 188
189static const uint32_t bits32[32] = 189static const uint32_t bits32[32] ALIGN4 = {
190{
191 0x80000000, 0x40000000, 0x20000000, 0x10000000, 190 0x80000000, 0x40000000, 0x20000000, 0x10000000,
192 0x08000000, 0x04000000, 0x02000000, 0x01000000, 191 0x08000000, 0x04000000, 0x02000000, 0x01000000,
193 0x00800000, 0x00400000, 0x00200000, 0x00100000, 192 0x00800000, 0x00400000, 0x00200000, 0x00100000,
@@ -198,7 +197,7 @@ static const uint32_t bits32[32] =
198 0x00000008, 0x00000004, 0x00000002, 0x00000001 197 0x00000008, 0x00000004, 0x00000002, 0x00000001
199}; 198};
200 199
201static const uint8_t bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; 200static const uint8_t bits8[8] ALIGN1 = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
202 201
203 202
204static int 203static int
diff --git a/libbb/speed_table.c b/libbb/speed_table.c
index 967cf8de8..cf7101e64 100644
--- a/libbb/speed_table.c
+++ b/libbb/speed_table.c
@@ -28,7 +28,7 @@ struct speed_map {
28}; 28};
29 29
30/* On Linux, Bxx constants are 0..15 (up to B38400) and 0x1001..0x100f */ 30/* On Linux, Bxx constants are 0..15 (up to B38400) and 0x1001..0x100f */
31static const struct speed_map speeds[] = { 31static const struct speed_map speeds[] ALIGN4 = {
32 {B0, 0}, 32 {B0, 0},
33 {B50, 50}, 33 {B50, 50},
34 {B75, 75}, 34 {B75, 75},
diff --git a/libbb/xatonum.c b/libbb/xatonum.c
index 7639a62aa..36b06c849 100644
--- a/libbb/xatonum.c
+++ b/libbb/xatonum.c
@@ -68,14 +68,14 @@ uint16_t FAST_FUNC xatou16(const char *numstr)
68 return xatou_range(numstr, 0, 0xffff); 68 return xatou_range(numstr, 0, 0xffff);
69} 69}
70 70
71const struct suffix_mult bkm_suffixes[] = { 71const struct suffix_mult bkm_suffixes[] ALIGN_SUFFIX = {
72 { "b", 512 }, 72 { "b", 512 },
73 { "k", 1024 }, 73 { "k", 1024 },
74 { "m", 1024*1024 }, 74 { "m", 1024*1024 },
75 { "", 0 } 75 { "", 0 }
76}; 76};
77 77
78const struct suffix_mult cwbkMG_suffixes[] = { 78const struct suffix_mult cwbkMG_suffixes[] ALIGN_SUFFIX = {
79 { "c", 1 }, 79 { "c", 1 },
80 { "w", 2 }, 80 { "w", 2 },
81 { "b", 512 }, 81 { "b", 512 },
@@ -96,7 +96,7 @@ const struct suffix_mult cwbkMG_suffixes[] = {
96 { "", 0 } 96 { "", 0 }
97}; 97};
98 98
99const struct suffix_mult kmg_i_suffixes[] = { 99const struct suffix_mult kmg_i_suffixes[] ALIGN_SUFFIX = {
100 { "KiB", 1024 }, 100 { "KiB", 1024 },
101 { "kiB", 1024 }, 101 { "kiB", 1024 },
102 { "K", 1024 }, 102 { "K", 1024 },
diff --git a/miscutils/crond.c b/miscutils/crond.c
index 2e8ca8b68..fb3adc180 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -492,7 +492,7 @@ static void load_crontab(const char *fileName)
492 const char *name; 492 const char *name;
493 const char tokens[8]; 493 const char tokens[8];
494 } SpecialEntry; 494 } SpecialEntry;
495 static const SpecialEntry SpecAry[] = { 495 static const SpecialEntry SpecAry[] ALIGN8 = {
496 /* hour day month weekday */ 496 /* hour day month weekday */
497 { "yearly", "0\0" "1\0" "1\0" "*" }, 497 { "yearly", "0\0" "1\0" "1\0" "*" },
498 { "annually", "0\0" "1\0" "1\0" "*" }, 498 { "annually", "0\0" "1\0" "1\0" "*" },
diff --git a/miscutils/dc.c b/miscutils/dc.c
index ef93c20ba..51376dd75 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -195,7 +195,7 @@ struct op {
195 void (*function) (void); 195 void (*function) (void);
196}; 196};
197 197
198static const struct op operators[] = { 198static const struct op operators[] ALIGN_PTR = {
199#if ENABLE_FEATURE_DC_LIBM 199#if ENABLE_FEATURE_DC_LIBM
200 {"^", power}, 200 {"^", power},
201// {"exp", power}, 201// {"exp", power},
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 431a0ad96..01b4e8e2e 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -1366,7 +1366,7 @@ static NOINLINE void dump_identity(const struct hd_driveid *id)
1366 } 1366 }
1367 if (id->capability & 1) { 1367 if (id->capability & 1) {
1368 if (id->dma_1word | id->dma_mword) { 1368 if (id->dma_1word | id->dma_mword) {
1369 static const int dma_wmode_masks[] = { 0x100, 1, 0x200, 2, 0x400, 4, 0xf800, 0xf8 }; 1369 static const int dma_wmode_masks[] ALIGN4 = { 0x100, 1, 0x200, 2, 0x400, 4, 0xf800, 0xf8 };
1370 printf("\n DMA modes: "); 1370 printf("\n DMA modes: ");
1371 print_flags_separated(dma_wmode_masks, 1371 print_flags_separated(dma_wmode_masks,
1372 "*\0""sdma0 \0""*\0""sdma1 \0""*\0""sdma2 \0""*\0""sdma? \0", 1372 "*\0""sdma0 \0""*\0""sdma1 \0""*\0""sdma2 \0""*\0""sdma? \0",
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index cc8b99a92..09364e396 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -1053,18 +1053,13 @@ struct adap_desc {
1053}; 1053};
1054 1054
1055static const struct adap_desc adap_descs[] = { 1055static const struct adap_desc adap_descs[] = {
1056 { .funcs = "dummy", 1056 { .funcs = "dummy", .algo = "Dummy bus", },
1057 .algo = "Dummy bus", }, 1057 { .funcs = "isa", .algo = "ISA bus", },
1058 { .funcs = "isa", 1058 { .funcs = "i2c", .algo = "I2C adapter", },
1059 .algo = "ISA bus", }, 1059 { .funcs = "smbus", .algo = "SMBus adapter", },
1060 { .funcs = "i2c",
1061 .algo = "I2C adapter", },
1062 { .funcs = "smbus",
1063 .algo = "SMBus adapter", },
1064}; 1060};
1065 1061
1066struct i2c_func 1062struct i2c_func {
1067{
1068 long value; 1063 long value;
1069 const char* name; 1064 const char* name;
1070}; 1065};
diff --git a/miscutils/mt.c b/miscutils/mt.c
index 9f1aecfca..dbb8c13ad 100644
--- a/miscutils/mt.c
+++ b/miscutils/mt.c
@@ -30,7 +30,7 @@
30#include <sys/mtio.h> 30#include <sys/mtio.h>
31 31
32/* missing: eod/seod, stoptions, stwrthreshold, densities */ 32/* missing: eod/seod, stoptions, stwrthreshold, densities */
33static const short opcode_value[] = { 33static const short opcode_value[] ALIGN2 = {
34 MTBSF, 34 MTBSF,
35 MTBSFM, 35 MTBSFM,
36 MTBSR, 36 MTBSR,
diff --git a/miscutils/setserial.c b/miscutils/setserial.c
index 1e75bf433..2006861e2 100644
--- a/miscutils/setserial.c
+++ b/miscutils/setserial.c
@@ -381,8 +381,7 @@ static bool cmd_needs_arg(int cmd)
381# error "Unexpected flags size" 381# error "Unexpected flags size"
382#endif 382#endif
383 383
384static const uint16_t setbits[CMD_FLAG_LAST + 1] = 384static const uint16_t setbits[CMD_FLAG_LAST + 1] ALIGN2 = {
385{
386 0, 385 0,
387 ASYNC_SPD_HI, 386 ASYNC_SPD_HI,
388 ASYNC_SPD_VHI, 387 ASYNC_SPD_VHI,
diff --git a/miscutils/ubi_tools.c b/miscutils/ubi_tools.c
index 94a637eee..69ead7a13 100644
--- a/miscutils/ubi_tools.c
+++ b/miscutils/ubi_tools.c
@@ -97,7 +97,7 @@ static unsigned get_num_from_file(const char *path, unsigned max)
97int ubi_tools_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 97int ubi_tools_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
98int ubi_tools_main(int argc UNUSED_PARAM, char **argv) 98int ubi_tools_main(int argc UNUSED_PARAM, char **argv)
99{ 99{
100 static const struct suffix_mult size_suffixes[] = { 100 static const struct suffix_mult size_suffixes[] ALIGN_SUFFIX = {
101 { "KiB", 1024 }, 101 { "KiB", 1024 },
102 { "MiB", 1024*1024 }, 102 { "MiB", 1024*1024 },
103 { "GiB", 1024*1024*1024 }, 103 { "GiB", 1024*1024*1024 },
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c
index 971b777a3..0ed10bcf1 100644
--- a/miscutils/watchdog.c
+++ b/miscutils/watchdog.c
@@ -88,7 +88,7 @@ int watchdog_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
88int watchdog_main(int argc UNUSED_PARAM, char **argv) 88int watchdog_main(int argc UNUSED_PARAM, char **argv)
89{ 89{
90 static const int enable = WDIOS_ENABLECARD; 90 static const int enable = WDIOS_ENABLECARD;
91 static const struct suffix_mult suffixes[] = { 91 static const struct suffix_mult suffixes[] ALIGN_SUFFIX = {
92 { "ms", 1 }, 92 { "ms", 1 },
93 { "", 1000 }, 93 { "", 1000 },
94 { "", 0 } 94 { "", 0 }
diff --git a/modutils/modinfo.c b/modutils/modinfo.c
index c5cdc7980..d15772f0d 100644
--- a/modutils/modinfo.c
+++ b/modutils/modinfo.c
@@ -20,7 +20,7 @@
20#include "libbb.h" 20#include "libbb.h"
21#include "modutils.h" 21#include "modutils.h"
22 22
23static const char *const shortcuts[] = { 23static const char *const shortcuts[] ALIGN_PTR = {
24 "filename", // -n 24 "filename", // -n
25 "author", // -a 25 "author", // -a
26 "description", // -d 26 "description", // -d
diff --git a/networking/ifplugd.c b/networking/ifplugd.c
index 60916eae6..18dcaff96 100644
--- a/networking/ifplugd.c
+++ b/networking/ifplugd.c
@@ -304,7 +304,7 @@ static const char api_modes[] ALIGN1 = "empwia";
304static const struct { 304static const struct {
305 const char *name; 305 const char *name;
306 smallint (*func)(void); 306 smallint (*func)(void);
307} method_table[] = { 307} method_table[] ALIGN_PTR = {
308 { "SIOCETHTOOL" , &detect_link_ethtool }, 308 { "SIOCETHTOOL" , &detect_link_ethtool },
309 { "SIOCGMIIPHY" , &detect_link_mii }, 309 { "SIOCGMIIPHY" , &detect_link_mii },
310 { "SIOCDEVPRIVATE" , &detect_link_priv }, 310 { "SIOCDEVPRIVATE" , &detect_link_priv },
diff --git a/networking/interface.c b/networking/interface.c
index e5e55d8d4..ea6a2c8a8 100644
--- a/networking/interface.c
+++ b/networking/interface.c
@@ -746,7 +746,7 @@ static const struct hwtype *const hwtypes[] = {
746}; 746};
747 747
748#ifdef IFF_PORTSEL 748#ifdef IFF_PORTSEL
749static const char *const if_port_text[] = { 749static const char *const if_port_text[] ALIGN_PTR = {
750 /* Keep in step with <linux/netdevice.h> */ 750 /* Keep in step with <linux/netdevice.h> */
751 "unknown", 751 "unknown",
752 "10base2", 752 "10base2",
diff --git a/networking/ip.c b/networking/ip.c
index 33bea5f49..85b1ba080 100644
--- a/networking/ip.c
+++ b/networking/ip.c
@@ -400,7 +400,7 @@ int ip_main(int argc UNUSED_PARAM, char **argv)
400 IF_FEATURE_IP_RULE("rule\0") 400 IF_FEATURE_IP_RULE("rule\0")
401 IF_FEATURE_IP_NEIGH("neigh\0") 401 IF_FEATURE_IP_NEIGH("neigh\0")
402 ; 402 ;
403 static const ip_func_ptr_t ip_func_ptrs[] = { 403 static const ip_func_ptr_t ip_func_ptrs[] ALIGN_PTR = {
404 ip_print_help, 404 ip_print_help,
405 IF_FEATURE_IP_ADDRESS(do_ipaddr,) 405 IF_FEATURE_IP_ADDRESS(do_ipaddr,)
406 IF_FEATURE_IP_ROUTE(do_iproute,) 406 IF_FEATURE_IP_ROUTE(do_iproute,)
diff --git a/networking/libiproute/rt_names.c b/networking/libiproute/rt_names.c
index 51f2e9bdb..3c2fad912 100644
--- a/networking/libiproute/rt_names.c
+++ b/networking/libiproute/rt_names.c
@@ -77,7 +77,7 @@ static rtnl_tab_t *rtnl_rtprot_tab;
77 77
78static void rtnl_rtprot_initialize(void) 78static void rtnl_rtprot_initialize(void)
79{ 79{
80 static const char *const init_tab[] = { 80 static const char *const init_tab[] ALIGN_PTR = {
81 "none", 81 "none",
82 "redirect", 82 "redirect",
83 "kernel", 83 "kernel",
diff --git a/networking/route.c b/networking/route.c
index 4d9aad6cc..4901109f1 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -460,9 +460,9 @@ static NOINLINE void INET6_setroute(int action, char **args)
460#endif 460#endif
461 461
462static const 462static const
463IF_NOT_FEATURE_IPV6(uint16_t) 463IF_NOT_FEATURE_IPV6(uint16_t flagvals[] ALIGN2 = )
464IF_FEATURE_IPV6(unsigned) 464IF_FEATURE_IPV6(uint32_t flagvals[] ALIGN4 = )
465flagvals[] = { /* Must agree with flagchars[]. */ 465{ /* Must agree with flagchars[]. */
466 RTF_UP, 466 RTF_UP,
467 RTF_GATEWAY, 467 RTF_GATEWAY,
468 RTF_HOST, 468 RTF_HOST,
diff --git a/networking/tls.c b/networking/tls.c
index 341225207..e34acd69f 100644
--- a/networking/tls.c
+++ b/networking/tls.c
@@ -1953,7 +1953,7 @@ static void send_client_key_exchange(tls_state_t *tls)
1953 premaster_size = sizeof(rsa_premaster); 1953 premaster_size = sizeof(rsa_premaster);
1954 } else { 1954 } else {
1955 /* ECDHE */ 1955 /* ECDHE */
1956 static const uint8_t basepoint9[CURVE25519_KEYSIZE] = {9}; 1956 static const uint8_t basepoint9[CURVE25519_KEYSIZE] ALIGN1 = {9};
1957 uint8_t privkey[CURVE25519_KEYSIZE]; //[32] 1957 uint8_t privkey[CURVE25519_KEYSIZE]; //[32]
1958 1958
1959 if (!(tls->flags & GOT_EC_KEY)) 1959 if (!(tls->flags & GOT_EC_KEY))
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index acfdaa8c3..de16cf955 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -398,7 +398,7 @@ struct config_keyword {
398 398
399#define OFS(field) offsetof(struct server_data_t, field) 399#define OFS(field) offsetof(struct server_data_t, field)
400 400
401static const struct config_keyword keywords[] = { 401static const struct config_keyword keywords[] ALIGN_PTR = {
402 /* keyword handler variable address default */ 402 /* keyword handler variable address default */
403 {"start" , udhcp_str2nip , OFS(start_ip ), "192.168.0.20"}, 403 {"start" , udhcp_str2nip , OFS(start_ip ), "192.168.0.20"},
404 {"end" , udhcp_str2nip , OFS(end_ip ), "192.168.0.254"}, 404 {"end" , udhcp_str2nip , OFS(end_ip ), "192.168.0.254"},
diff --git a/procps/nmeter.c b/procps/nmeter.c
index 856ce0202..07b7abe2f 100644
--- a/procps/nmeter.c
+++ b/procps/nmeter.c
@@ -838,7 +838,7 @@ static void FAST_FUNC collect_info(s_stat *s)
838typedef s_stat* init_func(const char *param); 838typedef s_stat* init_func(const char *param);
839 839
840static const char options[] ALIGN1 = "ncmsfixptTbr"; 840static const char options[] ALIGN1 = "ncmsfixptTbr";
841static init_func *const init_functions[] = { 841static init_func *const init_functions[] ALIGN_PTR = {
842 init_if, 842 init_if,
843 init_cpu, 843 init_cpu,
844 init_mem, 844 init_mem,
diff --git a/procps/ps.c b/procps/ps.c
index 48f96209f..711b180a0 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -375,7 +375,7 @@ static void func_pcpu(char *buf, int size, const procps_status_t *ps)
375} 375}
376*/ 376*/
377 377
378static const ps_out_t out_spec[] = { 378static const ps_out_t out_spec[] ALIGN_PTR = {
379/* Mandated by http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html: */ 379/* Mandated by http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html: */
380 { 8 , "user" ,"USER" ,func_user ,PSSCAN_UIDGID }, 380 { 8 , "user" ,"USER" ,func_user ,PSSCAN_UIDGID },
381 { 8 , "group" ,"GROUP" ,func_group ,PSSCAN_UIDGID }, 381 { 8 , "group" ,"GROUP" ,func_group ,PSSCAN_UIDGID },
diff --git a/runit/svlogd.c b/runit/svlogd.c
index a250058a1..040e71104 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -775,7 +775,7 @@ static NOINLINE unsigned logdir_open(struct logdir *ld, const char *fn)
775 ld->nmin = xatoi_positive(&s[1]); 775 ld->nmin = xatoi_positive(&s[1]);
776 break; 776 break;
777 case 't': { 777 case 't': {
778 static const struct suffix_mult mh_suffixes[] = { 778 static const struct suffix_mult mh_suffixes[] ALIGN_SUFFIX = {
779 { "m", 60 }, 779 { "m", 60 },
780 { "h", 60*60 }, 780 { "h", 60*60 },
781 /*{ "d", 24*60*60 },*/ 781 /*{ "d", 24*60*60 },*/
diff --git a/shell/ash.c b/shell/ash.c
index 8c9a590d1..40695dee0 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -2091,7 +2091,7 @@ static const struct {
2091 int flags; 2091 int flags;
2092 const char *var_text; 2092 const char *var_text;
2093 void (*var_func)(const char *) FAST_FUNC; 2093 void (*var_func)(const char *) FAST_FUNC;
2094} varinit_data[] = { 2094} varinit_data[] ALIGN_PTR = {
2095 /* 2095 /*
2096 * Note: VEXPORT would not work correctly here for NOFORK applets: 2096 * Note: VEXPORT would not work correctly here for NOFORK applets:
2097 * some environment strings may be constant. 2097 * some environment strings may be constant.
@@ -4811,7 +4811,7 @@ static char *cmdnextc;
4811static void 4811static void
4812cmdputs(const char *s) 4812cmdputs(const char *s)
4813{ 4813{
4814 static const char vstype[VSTYPE + 1][3] = { 4814 static const char vstype[VSTYPE + 1][3] ALIGN1 = {
4815 "", "}", "-", "+", "?", "=", 4815 "", "}", "-", "+", "?", "=",
4816 "%", "%%", "#", "##" 4816 "%", "%%", "#", "##"
4817 IF_BASH_SUBSTR(, ":") 4817 IF_BASH_SUBSTR(, ":")
@@ -8510,7 +8510,7 @@ enum {
8510 , /* thus far 29 bits used */ 8510 , /* thus far 29 bits used */
8511}; 8511};
8512 8512
8513static const char *const tokname_array[] = { 8513static const char *const tokname_array[] ALIGN_PTR = {
8514 "end of file", 8514 "end of file",
8515 "newline", 8515 "newline",
8516 "redirection", 8516 "redirection",
diff --git a/shell/hush.c b/shell/hush.c
index f1a7e07ee..b6d9d7abb 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -596,10 +596,10 @@ typedef struct in_str {
596/* The descrip member of this structure is only used to make 596/* The descrip member of this structure is only used to make
597 * debugging output pretty */ 597 * debugging output pretty */
598static const struct { 598static const struct {
599 int mode; 599 int32_t mode;
600 signed char default_fd; 600 signed char default_fd;
601 char descrip[3]; 601 char descrip[3];
602} redir_table[] = { 602} redir_table[] ALIGN4 = {
603 { O_RDONLY, 0, "<" }, 603 { O_RDONLY, 0, "<" },
604 { O_CREAT|O_TRUNC|O_WRONLY, 1, ">" }, 604 { O_CREAT|O_TRUNC|O_WRONLY, 1, ">" },
605 { O_CREAT|O_APPEND|O_WRONLY, 1, ">>" }, 605 { O_CREAT|O_APPEND|O_WRONLY, 1, ">>" },
@@ -1143,7 +1143,7 @@ struct built_in_command {
1143#endif 1143#endif
1144}; 1144};
1145 1145
1146static const struct built_in_command bltins1[] = { 1146static const struct built_in_command bltins1[] ALIGN_PTR = {
1147 BLTIN("." , builtin_source , "Run commands in file"), 1147 BLTIN("." , builtin_source , "Run commands in file"),
1148 BLTIN(":" , builtin_true , NULL), 1148 BLTIN(":" , builtin_true , NULL),
1149#if ENABLE_HUSH_JOB 1149#if ENABLE_HUSH_JOB
@@ -1228,7 +1228,7 @@ static const struct built_in_command bltins1[] = {
1228/* These builtins won't be used if we are on NOMMU and need to re-exec 1228/* These builtins won't be used if we are on NOMMU and need to re-exec
1229 * (it's cheaper to run an external program in this case): 1229 * (it's cheaper to run an external program in this case):
1230 */ 1230 */
1231static const struct built_in_command bltins2[] = { 1231static const struct built_in_command bltins2[] ALIGN_PTR = {
1232#if ENABLE_HUSH_TEST 1232#if ENABLE_HUSH_TEST
1233 BLTIN("[" , builtin_test , NULL), 1233 BLTIN("[" , builtin_test , NULL),
1234#endif 1234#endif
@@ -3895,7 +3895,7 @@ struct reserved_combo {
3895 char literal[6]; 3895 char literal[6];
3896 unsigned char res; 3896 unsigned char res;
3897 unsigned char assignment_flag; 3897 unsigned char assignment_flag;
3898 int flag; 3898 uint32_t flag;
3899}; 3899};
3900enum { 3900enum {
3901 FLAG_END = (1 << RES_NONE ), 3901 FLAG_END = (1 << RES_NONE ),
@@ -3928,7 +3928,7 @@ static const struct reserved_combo* match_reserved_word(o_string *word)
3928 * to turn the compound list into a command. 3928 * to turn the compound list into a command.
3929 * FLAG_START means the word must start a new compound list. 3929 * FLAG_START means the word must start a new compound list.
3930 */ 3930 */
3931 static const struct reserved_combo reserved_list[] = { 3931 static const struct reserved_combo reserved_list[] ALIGN4 = {
3932# if ENABLE_HUSH_IF 3932# if ENABLE_HUSH_IF
3933 { "!", RES_NONE, NOT_ASSIGNMENT , 0 }, 3933 { "!", RES_NONE, NOT_ASSIGNMENT , 0 },
3934 { "if", RES_IF, MAYBE_ASSIGNMENT, FLAG_THEN | FLAG_START }, 3934 { "if", RES_IF, MAYBE_ASSIGNMENT, FLAG_THEN | FLAG_START },
diff --git a/shell/shell_common.c b/shell/shell_common.c
index 42c4c9c97..dcbe0d109 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -324,7 +324,7 @@ struct limits {
324 uint8_t factor_shift; /* shift by to get rlim_{cur,max} values */ 324 uint8_t factor_shift; /* shift by to get rlim_{cur,max} values */
325}; 325};
326 326
327static const struct limits limits_tbl[] = { 327static const struct limits limits_tbl[] ALIGN2 = {
328 { RLIMIT_CORE, 9, }, // -c 328 { RLIMIT_CORE, 9, }, // -c
329 { RLIMIT_DATA, 10, }, // -d 329 { RLIMIT_DATA, 10, }, // -d
330 { RLIMIT_NICE, 0, }, // -e 330 { RLIMIT_NICE, 0, }, // -e
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
102static const struct acpi_event f_evt_tab[] = { 102static 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
113static const struct acpi_action f_act_tab[] = { 113static 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
306static const char *const i386_sys_types[] = { 306static 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
147static const char *const xbsd_dktypenames[] = { 147static 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
193static const char *const xbsd_fstypes[] = { 193static 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
177static const char *const sgi_sys_types[] = { 177static 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
64static const char *const sun_sys_types[] = { 64static 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
131static uint32_t has_super(uint32_t x) 131static 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
326static const int32_t mount_options[] = { 326static 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 @@
49typedef int FAST_FUNC (*raid_probe_fptr)(struct volume_id *id, /*uint64_t off,*/ uint64_t size); 49typedef int FAST_FUNC (*raid_probe_fptr)(struct volume_id *id, /*uint64_t off,*/ uint64_t size);
50typedef int FAST_FUNC (*probe_fptr)(struct volume_id *id /*, uint64_t off*/); 50typedef int FAST_FUNC (*probe_fptr)(struct volume_id *id /*, uint64_t off*/);
51 51
52static const raid_probe_fptr raid1[] = { 52static 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
79static const probe_fptr raid2[] = { 79static 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 */
93static const probe_fptr fs1[] = { 93static 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 */
121static const probe_fptr fs2[] = { 121static 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