5 * Dynamic Binary Instrumentation Module based on KProbes
6 * modules/ksyms/ksyms.h
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * Copyright (C) Samsung Electronics, 2013
24 * 2013 Vyacheslav Cherkashin <v.cherkashin@samsung.com>
28 #include <linux/version.h>
29 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
30 #include <linux/autoconf.h>
32 #include <generated/autoconf.h>
35 #include <linux/kallsyms.h>
37 #ifdef CONFIG_KALLSYMS
39 static inline int swap_get_ksyms(void)
44 static inline void swap_put_ksyms(void)
48 static inline unsigned long swap_ksyms(const char *name)
50 return kallsyms_lookup_name(name);
53 #else /* !CONFIG_KALLSYMS */
55 int swap_get_ksyms(void);
56 void swap_put_ksyms(void);
57 unsigned long swap_ksyms(const char *name);
59 #endif /*CONFIG_KALLSYMS*/
61 #endif /*__KSYMS_H__*/