]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libcrypto/lib/aes_linux_586/aes.c
update
[l4.git] / l4 / pkg / libcrypto / lib / aes_linux_586 / aes.c
1 /* 
2  * 
3  * Glue Code for optimized 586 assembler version of AES
4  *
5  * Copyright (c) 2002, Dr Brian Gladman <>, Worcester, UK.
6  * All rights reserved.
7  *
8  * LICENSE TERMS
9  *
10  * The free distribution and use of this software in both source and binary
11  * form is allowed (with or without changes) provided that:
12  *
13  *   1. distributions of this source code include the above copyright
14  *      notice, this list of conditions and the following disclaimer;
15  *
16  *   2. distributions in binary form include the above copyright
17  *      notice, this list of conditions and the following disclaimer
18  *      in the documentation and/or other associated materials;
19  *
20  *   3. the copyright holder's name is not used to endorse products
21  *      built using this software without specific written permission.
22  *
23  * ALTERNATIVELY, provided that this notice is retained in full, this product
24  * may be distributed under the terms of the GNU General Public License (GPL),
25  * in which case the provisions of the GPL apply INSTEAD OF those given above.
26  *
27  * DISCLAIMER
28  *
29  * This software is provided 'as is' with no explicit or implied warranties
30  * in respect of its properties, including, but not limited to, correctness
31  * and/or fitness for purpose.
32  *
33  * Copyright (c) 2003, Adam J. Richter <adam@yggdrasil.com> (conversion to
34  * 2.5 API).
35  * Copyright (c) 2003, 2004 Fruhwirth Clemens <clemens@endorphin.org>
36  * Copyright (c) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com>
37  *
38  */
39
40 #define BUILD_FOR_L4 1
41 #ifndef BUILD_FOR_L4
42
43 #include <asm/byteorder.h>
44 #include <linux/kernel.h>
45 #include <linux/module.h>
46 #include <linux/init.h>
47 #include <linux/types.h>
48 #include <linux/crypto.h>
49 #include <linux/linkage.h>
50
51 #else
52
53 #define __LIBCRYPTO_INTERNAL__
54 #include "aes.h"
55
56 #endif /* BUILD_FOR_L4 */
57
58
59 asmlinkage void aes_enc_blk(const u8 *src, u8 *dst, void *ctx);
60 asmlinkage void aes_dec_blk(const u8 *src, u8 *dst, void *ctx);
61
62 #ifndef BUILD_FOR_L4
63
64 #define AES_MIN_KEY_SIZE        16
65 #define AES_MAX_KEY_SIZE        32
66 #define AES_BLOCK_SIZE          16
67 #define AES_KS_LENGTH           4 * AES_BLOCK_SIZE
68 #define RC_LENGTH               29
69
70 struct aes_ctx {
71         u32 ekey[AES_KS_LENGTH];
72         u32 rounds;
73         u32 dkey[AES_KS_LENGTH];
74 };
75 #else
76 # define aes_ctx aes_586_ctx
77 #endif
78
79
80 #define WPOLY 0x011b
81 #define bytes2word(b0, b1, b2, b3)  \
82         (((u32)(b3) << 24) | ((u32)(b2) << 16) | ((u32)(b1) << 8) | (b0))
83
84 /* define the finite field multiplies required for Rijndael */
85 #define f2(x) ((x) ? pow[log[x] + 0x19] : 0)
86 #define f3(x) ((x) ? pow[log[x] + 0x01] : 0)
87 #define f9(x) ((x) ? pow[log[x] + 0xc7] : 0)
88 #define fb(x) ((x) ? pow[log[x] + 0x68] : 0)
89 #define fd(x) ((x) ? pow[log[x] + 0xee] : 0)
90 #define fe(x) ((x) ? pow[log[x] + 0xdf] : 0)
91 #define fi(x) ((x) ?   pow[255 - log[x]]: 0)
92
93 static inline u32 upr(u32 x, int n)
94 {
95         return (x << 8 * n) | (x >> (32 - 8 * n));
96 }
97
98 static inline u8 bval(u32 x, int n)
99 {
100         return x >> 8 * n;
101 }
102
103 /* The forward and inverse affine transformations used in the S-box */
104 #define fwd_affine(x) \
105         (w = (u32)x, w ^= (w<<1)^(w<<2)^(w<<3)^(w<<4), 0x63^(u8)(w^(w>>8)))
106
107 #define inv_affine(x) \
108         (w = (u32)x, w = (w<<1)^(w<<3)^(w<<6), 0x05^(u8)(w^(w>>8)))
109
110 static u32 rcon_tab[RC_LENGTH];
111
112 u32 ft_tab[4][256];
113 u32 fl_tab[4][256];
114 static u32 im_tab[4][256];
115 u32 il_tab[4][256];
116 u32 it_tab[4][256];
117
118 static void gen_tabs(void)
119 {
120         u32 i, w;
121         u8 pow[512], log[256];
122
123         /*
124          * log and power tables for GF(2^8) finite field with
125          * WPOLY as modular polynomial - the simplest primitive
126          * root is 0x03, used here to generate the tables.
127          */
128         i = 0; w = 1; 
129         
130         do {
131                 pow[i] = (u8)w;
132                 pow[i + 255] = (u8)w;
133                 log[w] = (u8)i++;
134                 w ^=  (w << 1) ^ (w & 0x80 ? WPOLY : 0);
135         } while (w != 1);
136         
137         for(i = 0, w = 1; i < RC_LENGTH; ++i) {
138                 rcon_tab[i] = bytes2word(w, 0, 0, 0);
139                 w = f2(w);
140         }
141
142         for(i = 0; i < 256; ++i) {
143                 u8 b;
144                 
145                 b = fwd_affine(fi((u8)i));
146                 w = bytes2word(f2(b), b, b, f3(b));
147
148                 /* tables for a normal encryption round */
149                 ft_tab[0][i] = w;
150                 ft_tab[1][i] = upr(w, 1);
151                 ft_tab[2][i] = upr(w, 2);
152                 ft_tab[3][i] = upr(w, 3);
153                 w = bytes2word(b, 0, 0, 0);
154                 
155                 /*
156                  * tables for last encryption round
157                  * (may also be used in the key schedule)
158                  */
159                 fl_tab[0][i] = w;
160                 fl_tab[1][i] = upr(w, 1);
161                 fl_tab[2][i] = upr(w, 2);
162                 fl_tab[3][i] = upr(w, 3);
163                 
164                 b = fi(inv_affine((u8)i));
165                 w = bytes2word(fe(b), f9(b), fd(b), fb(b));
166
167                 /* tables for the inverse mix column operation  */
168                 im_tab[0][b] = w;
169                 im_tab[1][b] = upr(w, 1);
170                 im_tab[2][b] = upr(w, 2);
171                 im_tab[3][b] = upr(w, 3);
172
173                 /* tables for a normal decryption round */
174                 it_tab[0][i] = w;
175                 it_tab[1][i] = upr(w,1);
176                 it_tab[2][i] = upr(w,2);
177                 it_tab[3][i] = upr(w,3);
178
179                 w = bytes2word(b, 0, 0, 0);
180                 
181                 /* tables for last decryption round */
182                 il_tab[0][i] = w;
183                 il_tab[1][i] = upr(w,1);
184                 il_tab[2][i] = upr(w,2);
185                 il_tab[3][i] = upr(w,3);
186     }
187 }
188
189 #define four_tables(x,tab,vf,rf,c)              \
190 (       tab[0][bval(vf(x,0,c),rf(0,c))] ^       \
191         tab[1][bval(vf(x,1,c),rf(1,c))] ^       \
192         tab[2][bval(vf(x,2,c),rf(2,c))] ^       \
193         tab[3][bval(vf(x,3,c),rf(3,c))]         \
194 )
195
196 #define vf1(x,r,c)  (x)
197 #define rf1(r,c)    (r)
198 #define rf2(r,c)    ((r-c)&3)
199
200 #define inv_mcol(x) four_tables(x,im_tab,vf1,rf1,0)
201 #define ls_box(x,c) four_tables(x,fl_tab,vf1,rf2,c)
202
203 #define ff(x) inv_mcol(x)
204
205 #define ke4(k,i)                                                        \
206 {                                                                       \
207         k[4*(i)+4] = ss[0] ^= ls_box(ss[3],3) ^ rcon_tab[i];            \
208         k[4*(i)+5] = ss[1] ^= ss[0];                                    \
209         k[4*(i)+6] = ss[2] ^= ss[1];                                    \
210         k[4*(i)+7] = ss[3] ^= ss[2];                                    \
211 }
212
213 #define kel4(k,i)                                                       \
214 {                                                                       \
215         k[4*(i)+4] = ss[0] ^= ls_box(ss[3],3) ^ rcon_tab[i];            \
216         k[4*(i)+5] = ss[1] ^= ss[0];                                    \
217         k[4*(i)+6] = ss[2] ^= ss[1]; k[4*(i)+7] = ss[3] ^= ss[2];       \
218 }
219
220 #define ke6(k,i)                                                        \
221 {                                                                       \
222         k[6*(i)+ 6] = ss[0] ^= ls_box(ss[5],3) ^ rcon_tab[i];           \
223         k[6*(i)+ 7] = ss[1] ^= ss[0];                                   \
224         k[6*(i)+ 8] = ss[2] ^= ss[1];                                   \
225         k[6*(i)+ 9] = ss[3] ^= ss[2];                                   \
226         k[6*(i)+10] = ss[4] ^= ss[3];                                   \
227         k[6*(i)+11] = ss[5] ^= ss[4];                                   \
228 }
229
230 #define kel6(k,i)                                                       \
231 {                                                                       \
232         k[6*(i)+ 6] = ss[0] ^= ls_box(ss[5],3) ^ rcon_tab[i];           \
233         k[6*(i)+ 7] = ss[1] ^= ss[0];                                   \
234         k[6*(i)+ 8] = ss[2] ^= ss[1];                                   \
235         k[6*(i)+ 9] = ss[3] ^= ss[2];                                   \
236 }
237
238 #define ke8(k,i)                                                        \
239 {                                                                       \
240         k[8*(i)+ 8] = ss[0] ^= ls_box(ss[7],3) ^ rcon_tab[i];           \
241         k[8*(i)+ 9] = ss[1] ^= ss[0];                                   \
242         k[8*(i)+10] = ss[2] ^= ss[1];                                   \
243         k[8*(i)+11] = ss[3] ^= ss[2];                                   \
244         k[8*(i)+12] = ss[4] ^= ls_box(ss[3],0);                         \
245         k[8*(i)+13] = ss[5] ^= ss[4];                                   \
246         k[8*(i)+14] = ss[6] ^= ss[5];                                   \
247         k[8*(i)+15] = ss[7] ^= ss[6];                                   \
248 }
249
250 #define kel8(k,i)                                                       \
251 {                                                                       \
252         k[8*(i)+ 8] = ss[0] ^= ls_box(ss[7],3) ^ rcon_tab[i];           \
253         k[8*(i)+ 9] = ss[1] ^= ss[0];                                   \
254         k[8*(i)+10] = ss[2] ^= ss[1];                                   \
255         k[8*(i)+11] = ss[3] ^= ss[2];                                   \
256 }
257
258 #define kdf4(k,i)                                                       \
259 {                                                                       \
260         ss[0] = ss[0] ^ ss[2] ^ ss[1] ^ ss[3];                          \
261         ss[1] = ss[1] ^ ss[3];                                          \
262         ss[2] = ss[2] ^ ss[3];                                          \
263         ss[3] = ss[3];                                                  \
264         ss[4] = ls_box(ss[(i+3) % 4], 3) ^ rcon_tab[i];                 \
265         ss[i % 4] ^= ss[4];                                             \
266         ss[4] ^= k[4*(i)];                                              \
267         k[4*(i)+4] = ff(ss[4]);                                         \
268         ss[4] ^= k[4*(i)+1];                                            \
269         k[4*(i)+5] = ff(ss[4]);                                         \
270         ss[4] ^= k[4*(i)+2];                                            \
271         k[4*(i)+6] = ff(ss[4]);                                         \
272         ss[4] ^= k[4*(i)+3];                                            \
273         k[4*(i)+7] = ff(ss[4]);                                         \
274 }
275
276 #define kd4(k,i)                                                        \
277 {                                                                       \
278         ss[4] = ls_box(ss[(i+3) % 4], 3) ^ rcon_tab[i];                 \
279         ss[i % 4] ^= ss[4];                                             \
280         ss[4] = ff(ss[4]);                                              \
281         k[4*(i)+4] = ss[4] ^= k[4*(i)];                                 \
282         k[4*(i)+5] = ss[4] ^= k[4*(i)+1];                               \
283         k[4*(i)+6] = ss[4] ^= k[4*(i)+2];                               \
284         k[4*(i)+7] = ss[4] ^= k[4*(i)+3];                               \
285 }
286
287 #define kdl4(k,i)                                                       \
288 {                                                                       \
289         ss[4] = ls_box(ss[(i+3) % 4], 3) ^ rcon_tab[i];                 \
290         ss[i % 4] ^= ss[4];                                             \
291         k[4*(i)+4] = (ss[0] ^= ss[1]) ^ ss[2] ^ ss[3];                  \
292         k[4*(i)+5] = ss[1] ^ ss[3];                                     \
293         k[4*(i)+6] = ss[0];                                             \
294         k[4*(i)+7] = ss[1];                                             \
295 }
296
297 #define kdf6(k,i)                                                       \
298 {                                                                       \
299         ss[0] ^= ls_box(ss[5],3) ^ rcon_tab[i];                         \
300         k[6*(i)+ 6] = ff(ss[0]);                                        \
301         ss[1] ^= ss[0];                                                 \
302         k[6*(i)+ 7] = ff(ss[1]);                                        \
303         ss[2] ^= ss[1];                                                 \
304         k[6*(i)+ 8] = ff(ss[2]);                                        \
305         ss[3] ^= ss[2];                                                 \
306         k[6*(i)+ 9] = ff(ss[3]);                                        \
307         ss[4] ^= ss[3];                                                 \
308         k[6*(i)+10] = ff(ss[4]);                                        \
309         ss[5] ^= ss[4];                                                 \
310         k[6*(i)+11] = ff(ss[5]);                                        \
311 }
312
313 #define kd6(k,i)                                                        \
314 {                                                                       \
315         ss[6] = ls_box(ss[5],3) ^ rcon_tab[i];                          \
316         ss[0] ^= ss[6]; ss[6] = ff(ss[6]);                              \
317         k[6*(i)+ 6] = ss[6] ^= k[6*(i)];                                \
318         ss[1] ^= ss[0];                                                 \
319         k[6*(i)+ 7] = ss[6] ^= k[6*(i)+ 1];                             \
320         ss[2] ^= ss[1];                                                 \
321         k[6*(i)+ 8] = ss[6] ^= k[6*(i)+ 2];                             \
322         ss[3] ^= ss[2];                                                 \
323         k[6*(i)+ 9] = ss[6] ^= k[6*(i)+ 3];                             \
324         ss[4] ^= ss[3];                                                 \
325         k[6*(i)+10] = ss[6] ^= k[6*(i)+ 4];                             \
326         ss[5] ^= ss[4];                                                 \
327         k[6*(i)+11] = ss[6] ^= k[6*(i)+ 5];                             \
328 }
329
330 #define kdl6(k,i)                                                       \
331 {                                                                       \
332         ss[0] ^= ls_box(ss[5],3) ^ rcon_tab[i];                         \
333         k[6*(i)+ 6] = ss[0];                                            \
334         ss[1] ^= ss[0];                                                 \
335         k[6*(i)+ 7] = ss[1];                                            \
336         ss[2] ^= ss[1];                                                 \
337         k[6*(i)+ 8] = ss[2];                                            \
338         ss[3] ^= ss[2];                                                 \
339         k[6*(i)+ 9] = ss[3];                                            \
340 }
341
342 #define kdf8(k,i)                                                       \
343 {                                                                       \
344         ss[0] ^= ls_box(ss[7],3) ^ rcon_tab[i];                         \
345         k[8*(i)+ 8] = ff(ss[0]);                                        \
346         ss[1] ^= ss[0];                                                 \
347         k[8*(i)+ 9] = ff(ss[1]);                                        \
348         ss[2] ^= ss[1];                                                 \
349         k[8*(i)+10] = ff(ss[2]);                                        \
350         ss[3] ^= ss[2];                                                 \
351         k[8*(i)+11] = ff(ss[3]);                                        \
352         ss[4] ^= ls_box(ss[3],0);                                       \
353         k[8*(i)+12] = ff(ss[4]);                                        \
354         ss[5] ^= ss[4];                                                 \
355         k[8*(i)+13] = ff(ss[5]);                                        \
356         ss[6] ^= ss[5];                                                 \
357         k[8*(i)+14] = ff(ss[6]);                                        \
358         ss[7] ^= ss[6];                                                 \
359         k[8*(i)+15] = ff(ss[7]);                                        \
360 }
361
362 #define kd8(k,i)                                                        \
363 {                                                                       \
364         u32 __g = ls_box(ss[7],3) ^ rcon_tab[i];                        \
365         ss[0] ^= __g;                                                   \
366         __g = ff(__g);                                                  \
367         k[8*(i)+ 8] = __g ^= k[8*(i)];                                  \
368         ss[1] ^= ss[0];                                                 \
369         k[8*(i)+ 9] = __g ^= k[8*(i)+ 1];                               \
370         ss[2] ^= ss[1];                                                 \
371         k[8*(i)+10] = __g ^= k[8*(i)+ 2];                               \
372         ss[3] ^= ss[2];                                                 \
373         k[8*(i)+11] = __g ^= k[8*(i)+ 3];                               \
374         __g = ls_box(ss[3],0);                                          \
375         ss[4] ^= __g;                                                   \
376         __g = ff(__g);                                                  \
377         k[8*(i)+12] = __g ^= k[8*(i)+ 4];                               \
378         ss[5] ^= ss[4];                                                 \
379         k[8*(i)+13] = __g ^= k[8*(i)+ 5];                               \
380         ss[6] ^= ss[5];                                                 \
381         k[8*(i)+14] = __g ^= k[8*(i)+ 6];                               \
382         ss[7] ^= ss[6];                                                 \
383         k[8*(i)+15] = __g ^= k[8*(i)+ 7];                               \
384 }
385
386 #define kdl8(k,i)                                                       \
387 {                                                                       \
388         ss[0] ^= ls_box(ss[7],3) ^ rcon_tab[i];                         \
389         k[8*(i)+ 8] = ss[0];                                            \
390         ss[1] ^= ss[0];                                                 \
391         k[8*(i)+ 9] = ss[1];                                            \
392         ss[2] ^= ss[1];                                                 \
393         k[8*(i)+10] = ss[2];                                            \
394         ss[3] ^= ss[2];                                                 \
395         k[8*(i)+11] = ss[3];                                            \
396 }
397
398 static int
399 aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
400 {
401         int i;
402         u32 ss[8];
403         struct aes_ctx *ctx = ctx_arg;
404         const __le32 *key = (const __le32 *)in_key;
405
406         /* encryption schedule */
407         
408         ctx->ekey[0] = ss[0] = le32_to_cpu(key[0]);
409         ctx->ekey[1] = ss[1] = le32_to_cpu(key[1]);
410         ctx->ekey[2] = ss[2] = le32_to_cpu(key[2]);
411         ctx->ekey[3] = ss[3] = le32_to_cpu(key[3]);
412
413         switch(key_len) {
414         case 16:
415                 for (i = 0; i < 9; i++)
416                         ke4(ctx->ekey, i);
417                 kel4(ctx->ekey, 9);
418                 ctx->rounds = 10;
419                 break;
420                 
421         case 24:
422                 ctx->ekey[4] = ss[4] = le32_to_cpu(key[4]);
423                 ctx->ekey[5] = ss[5] = le32_to_cpu(key[5]);
424                 for (i = 0; i < 7; i++)
425                         ke6(ctx->ekey, i);
426                 kel6(ctx->ekey, 7); 
427                 ctx->rounds = 12;
428                 break;
429
430         case 32:
431                 ctx->ekey[4] = ss[4] = le32_to_cpu(key[4]);
432                 ctx->ekey[5] = ss[5] = le32_to_cpu(key[5]);
433                 ctx->ekey[6] = ss[6] = le32_to_cpu(key[6]);
434                 ctx->ekey[7] = ss[7] = le32_to_cpu(key[7]);
435                 for (i = 0; i < 6; i++)
436                         ke8(ctx->ekey, i);
437                 kel8(ctx->ekey, 6);
438                 ctx->rounds = 14;
439                 break;
440
441         default:
442                 *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
443                 return -EINVAL;
444         }
445         
446         /* decryption schedule */
447         
448         ctx->dkey[0] = ss[0] = le32_to_cpu(key[0]);
449         ctx->dkey[1] = ss[1] = le32_to_cpu(key[1]);
450         ctx->dkey[2] = ss[2] = le32_to_cpu(key[2]);
451         ctx->dkey[3] = ss[3] = le32_to_cpu(key[3]);
452
453         switch (key_len) {
454         case 16:
455                 kdf4(ctx->dkey, 0);
456                 for (i = 1; i < 9; i++)
457                         kd4(ctx->dkey, i);
458                 kdl4(ctx->dkey, 9);
459                 break;
460                 
461         case 24:
462                 ctx->dkey[4] = ff(ss[4] = le32_to_cpu(key[4]));
463                 ctx->dkey[5] = ff(ss[5] = le32_to_cpu(key[5]));
464                 kdf6(ctx->dkey, 0);
465                 for (i = 1; i < 7; i++)
466                         kd6(ctx->dkey, i);
467                 kdl6(ctx->dkey, 7);
468                 break;
469
470         case 32:
471                 ctx->dkey[4] = ff(ss[4] = le32_to_cpu(key[4]));
472                 ctx->dkey[5] = ff(ss[5] = le32_to_cpu(key[5]));
473                 ctx->dkey[6] = ff(ss[6] = le32_to_cpu(key[6]));
474                 ctx->dkey[7] = ff(ss[7] = le32_to_cpu(key[7]));
475                 kdf8(ctx->dkey, 0);
476                 for (i = 1; i < 6; i++)
477                         kd8(ctx->dkey, i);
478                 kdl8(ctx->dkey, 6);
479                 break;
480         }
481         return 0;
482 }
483
484 static inline void aes_encrypt(void *ctx, u8 *dst, const u8 *src)
485 {
486         aes_enc_blk(src, dst, ctx);
487 }
488 static inline void aes_decrypt(void *ctx, u8 *dst, const u8 *src)
489 {
490         aes_dec_blk(src, dst, ctx);
491 }
492
493
494 #ifndef BUILD_FOR_L4
495
496 static struct crypto_alg aes_alg = {
497         .cra_name               =       "aes",
498         .cra_driver_name        =       "aes-i586",
499         .cra_priority           =       200,
500         .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
501         .cra_blocksize          =       AES_BLOCK_SIZE,
502         .cra_ctxsize            =       sizeof(struct aes_ctx),
503         .cra_module             =       THIS_MODULE,
504         .cra_list               =       LIST_HEAD_INIT(aes_alg.cra_list),
505         .cra_u                  =       {
506                 .cipher = {
507                         .cia_min_keysize        =       AES_MIN_KEY_SIZE,
508                         .cia_max_keysize        =       AES_MAX_KEY_SIZE,
509                         .cia_setkey             =       aes_set_key,
510                         .cia_encrypt            =       aes_encrypt,
511                         .cia_decrypt            =       aes_decrypt
512                 }
513         }
514 };
515
516 static int __init aes_init(void)
517 {
518         gen_tabs();
519         return crypto_register_alg(&aes_alg);
520 }
521
522 static void __exit aes_fini(void)
523 {
524         crypto_unregister_alg(&aes_alg);
525 }
526
527 module_init(aes_init);
528 module_exit(aes_fini);
529
530 MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm, i586 asm optimized");
531 MODULE_LICENSE("Dual BSD/GPL");
532 MODULE_AUTHOR("Fruhwirth Clemens, James Morris, Brian Gladman, Adam Richter");
533 MODULE_ALIAS("aes");
534
535 #else
536
537 crypto_cipher_set_key_fn_t aes_cipher_set_key = (crypto_cipher_set_key_fn_t) aes_set_key;
538 crypto_cipher_encrypt_fn_t aes_cipher_encrypt = (crypto_cipher_encrypt_fn_t) aes_encrypt;
539 crypto_cipher_decrypt_fn_t aes_cipher_decrypt = (crypto_cipher_decrypt_fn_t) aes_decrypt;
540
541 static void init(void) __attribute__((constructor));
542 static void init(void)
543 {
544         gen_tabs();
545 }
546
547 #endif /* BUILD_FOR_L4 */