1 #ifndef _LTTNG_WRAPPER_KALLSYMS_H
2 #define _LTTNG_WRAPPER_KALLSYMS_H
7 * wrapper around kallsyms_lookup_name. Implements arch-dependent code for
8 * arches where the address of the start of the function body is different
9 * from the pointer which can be used to call the function, e.g. ARM THUMB2.
11 * Copyright (C) 2011 Avik Sil (avik.sil@linaro.org)
12 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; only
17 * version 2.1 of the License.
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29 #include <linux/kallsyms.h>
32 unsigned long kallsyms_lookup_funcptr(const char *name
)
36 addr
= kallsyms_lookup_name(name
);
38 #ifdef CONFIG_THUMB2_KERNEL
40 addr
|= 1; /* set bit 0 in address for thumb mode */
47 unsigned long kallsyms_lookup_dataptr(const char *name
)
49 return kallsyms_lookup_name(name
);
51 #endif /* _LTTNG_WRAPPER_KALLSYMS_H */
This page took 0.029709 seconds and 4 git commands to generate.