blob: 23af3c972c9a7d202c0a71a340e29067d4ac8d74 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/arch/arm/kernel/armksyms.c
3 *
4 * Copyright (C) 2000 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/module.h>
11#include <linux/string.h>
Nicolas Pitred07ad962005-11-08 22:43:05 +000012#include <linux/cryptohash.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/delay.h>
14#include <linux/in6.h>
15#include <linux/syscalls.h>
Russell King33fa9b12008-09-06 11:35:55 +010016#include <linux/uaccess.h>
Russell Kingfced80c2008-09-06 12:10:45 +010017#include <linux/io.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
19#include <asm/checksum.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/system.h>
Abhishek Sagar395a59d2008-06-21 23:47:27 +053021#include <asm/ftrace.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
23/*
24 * libgcc functions - functions that are used internally by the
25 * compiler... (prototypes are not correct though, but that
26 * doesn't really matter since they're not versioned).
27 */
28extern void __ashldi3(void);
29extern void __ashrdi3(void);
30extern void __divsi3(void);
31extern void __lshrdi3(void);
32extern void __modsi3(void);
33extern void __muldi3(void);
34extern void __ucmpdi2(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070035extern void __udivsi3(void);
36extern void __umodsi3(void);
37extern void __do_div64(void);
38
Nicolas Pitreba95e4e2006-01-14 16:18:29 +000039extern void __aeabi_idiv(void);
40extern void __aeabi_idivmod(void);
41extern void __aeabi_lasr(void);
42extern void __aeabi_llsl(void);
43extern void __aeabi_llsr(void);
44extern void __aeabi_lmul(void);
45extern void __aeabi_uidiv(void);
46extern void __aeabi_uidivmod(void);
47extern void __aeabi_ulcmp(void);
48
Linus Torvalds1da177e2005-04-16 15:20:36 -070049extern void fpundefinstr(void);
50extern void fp_enter(void);
51
52/*
53 * This has a special calling convention; it doesn't
54 * modify any of the usual registers, except for LR.
55 */
Todd Poynor7bc7fc52005-07-06 23:06:05 +010056#define EXPORT_CRC_ALIAS(sym) __CRC_SYMBOL(sym, "")
57
Linus Torvalds1da177e2005-04-16 15:20:36 -070058#define EXPORT_SYMBOL_ALIAS(sym,orig) \
Todd Poynor7bc7fc52005-07-06 23:06:05 +010059 EXPORT_CRC_ALIAS(sym) \
Ben Dooksa7b1bbb2005-10-12 19:58:07 +010060 static const struct kernel_symbol __ksymtab_##sym \
David Rientjesb91d8a12007-05-11 16:18:55 -070061 __used __attribute__((section("__ksymtab"))) = \
Linus Torvalds1da177e2005-04-16 15:20:36 -070062 { (unsigned long)&orig, #sym };
63
64/*
65 * floating point math emulator support.
66 * These symbols will never change their calling convention...
67 */
68EXPORT_SYMBOL_ALIAS(kern_fp_enter,fp_enter);
69EXPORT_SYMBOL_ALIAS(fp_printk,printk);
70EXPORT_SYMBOL_ALIAS(fp_send_sig,send_sig);
71
72EXPORT_SYMBOL(__backtrace);
73
74 /* platform dependent support */
75EXPORT_SYMBOL(__udelay);
76EXPORT_SYMBOL(__const_udelay);
77
78 /* networking */
79EXPORT_SYMBOL(csum_partial);
Frederik Deweerdt487194a2007-05-11 19:10:52 +020080EXPORT_SYMBOL(csum_partial_copy_from_user);
Linus Torvalds1da177e2005-04-16 15:20:36 -070081EXPORT_SYMBOL(csum_partial_copy_nocheck);
82EXPORT_SYMBOL(__csum_ipv6_magic);
83
84 /* io */
85#ifndef __raw_readsb
86EXPORT_SYMBOL(__raw_readsb);
87#endif
88#ifndef __raw_readsw
89EXPORT_SYMBOL(__raw_readsw);
90#endif
91#ifndef __raw_readsl
92EXPORT_SYMBOL(__raw_readsl);
93#endif
94#ifndef __raw_writesb
95EXPORT_SYMBOL(__raw_writesb);
96#endif
97#ifndef __raw_writesw
98EXPORT_SYMBOL(__raw_writesw);
99#endif
100#ifndef __raw_writesl
101EXPORT_SYMBOL(__raw_writesl);
102#endif
103
104 /* string / mem functions */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105EXPORT_SYMBOL(strchr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106EXPORT_SYMBOL(strrchr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700107EXPORT_SYMBOL(memset);
108EXPORT_SYMBOL(memcpy);
109EXPORT_SYMBOL(memmove);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700110EXPORT_SYMBOL(memchr);
111EXPORT_SYMBOL(__memzero);
112
113 /* user mem (segment) */
Russell King9641c7c2006-06-21 20:38:17 +0100114EXPORT_SYMBOL(__strnlen_user);
115EXPORT_SYMBOL(__strncpy_from_user);
116
117#ifdef CONFIG_MMU
Nicolas Pitre674a0a62008-12-09 03:13:39 +0100118EXPORT_SYMBOL(copy_page);
119
Russell King02fcb972006-06-21 14:44:52 +0100120EXPORT_SYMBOL(__copy_from_user);
121EXPORT_SYMBOL(__copy_to_user);
122EXPORT_SYMBOL(__clear_user);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700123
124EXPORT_SYMBOL(__get_user_1);
125EXPORT_SYMBOL(__get_user_2);
126EXPORT_SYMBOL(__get_user_4);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700127
128EXPORT_SYMBOL(__put_user_1);
129EXPORT_SYMBOL(__put_user_2);
130EXPORT_SYMBOL(__put_user_4);
131EXPORT_SYMBOL(__put_user_8);
Russell King9641c7c2006-06-21 20:38:17 +0100132#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133
Nicolas Pitred07ad962005-11-08 22:43:05 +0000134 /* crypto hash */
135EXPORT_SYMBOL(sha_transform);
136
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137 /* gcc lib functions */
138EXPORT_SYMBOL(__ashldi3);
139EXPORT_SYMBOL(__ashrdi3);
140EXPORT_SYMBOL(__divsi3);
141EXPORT_SYMBOL(__lshrdi3);
142EXPORT_SYMBOL(__modsi3);
143EXPORT_SYMBOL(__muldi3);
144EXPORT_SYMBOL(__ucmpdi2);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700145EXPORT_SYMBOL(__udivsi3);
146EXPORT_SYMBOL(__umodsi3);
147EXPORT_SYMBOL(__do_div64);
148
Nicolas Pitreba95e4e2006-01-14 16:18:29 +0000149#ifdef CONFIG_AEABI
150EXPORT_SYMBOL(__aeabi_idiv);
151EXPORT_SYMBOL(__aeabi_idivmod);
152EXPORT_SYMBOL(__aeabi_lasr);
153EXPORT_SYMBOL(__aeabi_llsl);
154EXPORT_SYMBOL(__aeabi_llsr);
155EXPORT_SYMBOL(__aeabi_lmul);
156EXPORT_SYMBOL(__aeabi_uidiv);
157EXPORT_SYMBOL(__aeabi_uidivmod);
158EXPORT_SYMBOL(__aeabi_ulcmp);
159#endif
160
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161 /* bitops */
162EXPORT_SYMBOL(_set_bit_le);
163EXPORT_SYMBOL(_test_and_set_bit_le);
164EXPORT_SYMBOL(_clear_bit_le);
165EXPORT_SYMBOL(_test_and_clear_bit_le);
166EXPORT_SYMBOL(_change_bit_le);
167EXPORT_SYMBOL(_test_and_change_bit_le);
168EXPORT_SYMBOL(_find_first_zero_bit_le);
169EXPORT_SYMBOL(_find_next_zero_bit_le);
170EXPORT_SYMBOL(_find_first_bit_le);
171EXPORT_SYMBOL(_find_next_bit_le);
172
173#ifdef __ARMEB__
174EXPORT_SYMBOL(_set_bit_be);
175EXPORT_SYMBOL(_test_and_set_bit_be);
176EXPORT_SYMBOL(_clear_bit_be);
177EXPORT_SYMBOL(_test_and_clear_bit_be);
178EXPORT_SYMBOL(_change_bit_be);
179EXPORT_SYMBOL(_test_and_change_bit_be);
180EXPORT_SYMBOL(_find_first_zero_bit_be);
181EXPORT_SYMBOL(_find_next_zero_bit_be);
182EXPORT_SYMBOL(_find_first_bit_be);
183EXPORT_SYMBOL(_find_next_bit_be);
184#endif
Russell Kingdb2c4392008-05-11 22:36:03 +0100185
Steven Rostedt606576c2008-10-06 19:06:12 -0400186#ifdef CONFIG_FUNCTION_TRACER
Abhishek Sagar395a59d2008-06-21 23:47:27 +0530187EXPORT_SYMBOL(mcount);
188#endif