xref: /rk3399_rockchip-uboot/lib/asm-offsets.c (revision 25ddd1fb0a2281b182529afbc8fda5de2dc16d96)
116a354f9SWolfgang Denk /*
216a354f9SWolfgang Denk  * Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c
316a354f9SWolfgang Denk  *
416a354f9SWolfgang Denk  * This program is used to generate definitions needed by
516a354f9SWolfgang Denk  * assembly language modules.
616a354f9SWolfgang Denk  *
716a354f9SWolfgang Denk  * We use the technique used in the OSF Mach kernel code:
816a354f9SWolfgang Denk  * generate asm statements containing #defines,
916a354f9SWolfgang Denk  * compile this file to assembler, and then extract the
1016a354f9SWolfgang Denk  * #defines from the assembly-language output.
1116a354f9SWolfgang Denk  *
1216a354f9SWolfgang Denk  * This program is free software; you can redistribute it and/or
1316a354f9SWolfgang Denk  * modify it under the terms of the GNU General Public License
1416a354f9SWolfgang Denk  * as published by the Free Software Foundation; either version
1516a354f9SWolfgang Denk  * 2 of the License, or (at your option) any later version.
1616a354f9SWolfgang Denk  */
1716a354f9SWolfgang Denk 
1816a354f9SWolfgang Denk #include <common.h>
1916a354f9SWolfgang Denk 
2016a354f9SWolfgang Denk #include <linux/kbuild.h>
2116a354f9SWolfgang Denk 
2216a354f9SWolfgang Denk int main(void)
2316a354f9SWolfgang Denk {
24*25ddd1fbSWolfgang Denk 	/* Round up to make sure size gives nice stack alignment */
25*25ddd1fbSWolfgang Denk 	DEFINE(GENERATED_GBL_DATA_SIZE,
26*25ddd1fbSWolfgang Denk 		(sizeof(struct global_data)+15) & ~15);
27*25ddd1fbSWolfgang Denk 
2816a354f9SWolfgang Denk 	return 0;
2916a354f9SWolfgang Denk }
30