summaryrefslogtreecommitdiff
path: root/libbb/pw_encrypt_des.c
diff options
context:
space:
mode:
authorDenys Vlasenko2020-11-30 13:03:03 +0100
committerDenys Vlasenko2020-11-30 13:03:03 +0100
commit965b795b87c59ed45cc7f16a62301dbae65b1627 (patch)
tree958e486f4f23177746ddee11913d3b59ff4e7f8e /libbb/pw_encrypt_des.c
parent2fba2f5bb99145eaa1635fe5a162426158d56a2c (diff)
downloadbusybox-965b795b87c59ed45cc7f16a62301dbae65b1627.zip
busybox-965b795b87c59ed45cc7f16a62301dbae65b1627.tar.gz
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 'libbb/pw_encrypt_des.c')
-rw-r--r--libbb/pw_encrypt_des.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/libbb/pw_encrypt_des.c b/libbb/pw_encrypt_des.c
index 19a9ab1..c6fc328 100644
--- a/libbb/pw_encrypt_des.c
+++ b/libbb/pw_encrypt_des.c
@@ -65,25 +65,25 @@
/* A pile of data */
-static const uint8_t IP[64] = {
+static const uint8_t IP[64] ALIGN1 = {
58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4,
62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8,
57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3,
61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7
};
-static const uint8_t key_perm[56] = {
+static const uint8_t key_perm[56] ALIGN1 = {
57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18,
10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36,
63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22,
14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4
};
-static const uint8_t key_shifts[16] = {
+static const uint8_t key_shifts[16] ALIGN1 = {
1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1
};
-static const uint8_t comp_perm[48] = {
+static const uint8_t comp_perm[48] ALIGN1 = {
14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10,
23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2,
41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48,
@@ -181,13 +181,12 @@ static const uint8_t u_sbox[8][32] = {
};
#endif
-static const uint8_t pbox[32] = {
+static const uint8_t pbox[32] ALIGN1 = {
16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10,
2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25
};
-static const uint32_t bits32[32] =
-{
+static const uint32_t bits32[32] ALIGN4 = {
0x80000000, 0x40000000, 0x20000000, 0x10000000,
0x08000000, 0x04000000, 0x02000000, 0x01000000,
0x00800000, 0x00400000, 0x00200000, 0x00100000,
@@ -198,7 +197,7 @@ static const uint32_t bits32[32] =
0x00000008, 0x00000004, 0x00000002, 0x00000001
};
-static const uint8_t bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
+static const uint8_t bits8[8] ALIGN1 = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
static int