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 /libbb/pw_encrypt_des.c | |
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 'libbb/pw_encrypt_des.c')
-rw-r--r-- | libbb/pw_encrypt_des.c | 15 |
1 files changed, 7 insertions, 8 deletions
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 */ |
68 | static const uint8_t IP[64] = { | 68 | static 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 | ||
75 | static const uint8_t key_perm[56] = { | 75 | static 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 | ||
82 | static const uint8_t key_shifts[16] = { | 82 | static 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 | ||
86 | static const uint8_t comp_perm[48] = { | 86 | static 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 | ||
184 | static const uint8_t pbox[32] = { | 184 | static 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 | ||
189 | static const uint32_t bits32[32] = | 189 | static 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 | ||
201 | static const uint8_t bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; | 200 | static const uint8_t bits8[8] ALIGN1 = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; |
202 | 201 | ||
203 | 202 | ||
204 | static int | 203 | static int |