summaryrefslogtreecommitdiff
path: root/tools/include/linux/kbuild.h
blob: 957fd55cd159f3588ebabb0ae468e1a31c69a796 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __TOOLS_LINUX_KBUILD_H
#define __TOOLS_LINUX_KBUILD_H

#define DEFINE(sym, val) \
	asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))

#define OFFSET(sym, str, mem) \
	DEFINE(sym, __builtin_offsetof(struct str, mem))

#endif /* __TOOLS_LINUX_KBUILD_H */