blob: 7b2905dda56c4df16224946f11c19657c282d481 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Gabe Black27a4d072011-11-29 18:05:07 +00002/*
3 * Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c
4 *
5 * This program is used to generate definitions needed by
6 * assembly language modules.
7 *
8 * We use the technique used in the OSF Mach kernel code:
9 * generate asm statements containing #defines,
10 * compile this file to assembler, and then extract the
11 * #defines from the assembly-language output.
Gabe Black27a4d072011-11-29 18:05:07 +000012 */
13
Simon Glass3ba929a2020-10-30 21:38:53 -060014#include <asm/global_data.h>
Gabe Black27a4d072011-11-29 18:05:07 +000015#include <linux/kbuild.h>
16
17int main(void)
18{
Bin Meng8c5acf42014-12-12 21:05:22 +080019 DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
Park, Aiden6e3cc362019-08-03 08:30:12 +000020#ifdef CONFIG_USE_HOB
Bin Meng005f0af2014-12-12 21:05:31 +080021 DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
22#endif
Simon Glassf95ad8c2015-08-04 12:33:57 -060023 DEFINE(GD_TABLE, offsetof(gd_t, arch.table));
Gabe Black27a4d072011-11-29 18:05:07 +000024 return 0;
25}