2005-04-17 05:20:36 +07:00
|
|
|
#include <linux/module.h>
|
2009-10-27 09:51:19 +07:00
|
|
|
#include <linux/string.h>
|
|
|
|
#include <linux/uaccess.h>
|
|
|
|
#include <linux/delay.h>
|
|
|
|
#include <linux/mm.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
#include <asm/checksum.h>
|
2009-10-27 09:51:19 +07:00
|
|
|
#include <asm/sections.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
|
|
|
|
EXPORT_SYMBOL(memchr);
|
|
|
|
EXPORT_SYMBOL(memcpy);
|
|
|
|
EXPORT_SYMBOL(memset);
|
|
|
|
EXPORT_SYMBOL(memmove);
|
|
|
|
EXPORT_SYMBOL(__copy_user);
|
|
|
|
EXPORT_SYMBOL(__udelay);
|
|
|
|
EXPORT_SYMBOL(__ndelay);
|
|
|
|
EXPORT_SYMBOL(__const_udelay);
|
2009-10-27 09:51:19 +07:00
|
|
|
EXPORT_SYMBOL(strlen);
|
|
|
|
EXPORT_SYMBOL(csum_partial);
|
|
|
|
EXPORT_SYMBOL(csum_partial_copy_generic);
|
|
|
|
EXPORT_SYMBOL(copy_page);
|
|
|
|
EXPORT_SYMBOL(__clear_user);
|
|
|
|
EXPORT_SYMBOL(empty_zero_page);
|
2014-01-03 03:58:53 +07:00
|
|
|
#ifdef CONFIG_FLATMEM
|
|
|
|
/* need in pfn_valid macro */
|
|
|
|
EXPORT_SYMBOL(min_low_pfn);
|
|
|
|
EXPORT_SYMBOL(max_low_pfn);
|
|
|
|
#endif
|
2005-04-17 05:20:36 +07:00
|
|
|
|
sh: Fix FPU tuning on toolchains with mismatched multilib targets.
Presently there is very little standing in the way of using an SH-4
toolchain for building an SH-2 kernel, and vice versa. Binutils itself
has no limitations whatsoever and supports explicit ISA hinting, which
we already use with varying degrees of success today.
This leaves GCC as the odd one out, due to a rather dubious policy
decision by the GCC folks to not include all of the CPU family variants
in the default list of multilib targets in GCC4. Despite best efforts to
the contrary, libgcc itself already contains awareness of the various CPU
types and remains generally usable, allowing it to safely be referenced
even on a mismatched target (and indeed, explicit ISA tuning by binutils
keeps us honest in terms of ensuring that we do not link incompatible
objects in).
In order to support this, a couple of changes had to be made. Firstly,
the introduction of MAYBE_DECLARE_EXPORT(), which provides a __weak
extern reference for libgcc resident routines when finer-grained
-m<cpu-family> based tuning is not supported by the toolchain. This
fixes up the __sdivsi3_i4i and __udivsi3_i4i references when dealing
with SH-2 kernels linked with an SH-4 libgcc. Secondly, in case where we
are unable to find a suitable match for CPU family tuning but still
have a toolchain that defaults to FP instruction generation, a suitable
nofpu target must be selected. This is accomplished by selecting the
first nofpu multilib target supported by the toolchain, which is
also necessary for selecting the proper libgcc to link against.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28 15:19:35 +07:00
|
|
|
#define DECLARE_EXPORT(name) \
|
|
|
|
extern void name(void);EXPORT_SYMBOL(name)
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2008-11-20 13:26:35 +07:00
|
|
|
DECLARE_EXPORT(__udivsi3);
|
|
|
|
DECLARE_EXPORT(__sdivsi3);
|
2008-11-18 15:33:48 +07:00
|
|
|
DECLARE_EXPORT(__lshrsi3);
|
2007-07-20 14:59:49 +07:00
|
|
|
DECLARE_EXPORT(__ashrsi3);
|
|
|
|
DECLARE_EXPORT(__ashlsi3);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_6);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_7);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_8);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_9);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_10);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_11);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_12);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_13);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_14);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_15);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_20);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_21);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_22);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_23);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_24);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_27);
|
|
|
|
DECLARE_EXPORT(__ashiftrt_r4_30);
|
2008-11-18 15:33:48 +07:00
|
|
|
DECLARE_EXPORT(__movstr);
|
2007-07-20 14:59:49 +07:00
|
|
|
DECLARE_EXPORT(__movstrSI8);
|
|
|
|
DECLARE_EXPORT(__movstrSI12);
|
2006-10-03 11:14:04 +07:00
|
|
|
DECLARE_EXPORT(__movstrSI16);
|
2007-07-20 14:59:49 +07:00
|
|
|
DECLARE_EXPORT(__movstrSI20);
|
|
|
|
DECLARE_EXPORT(__movstrSI24);
|
|
|
|
DECLARE_EXPORT(__movstrSI28);
|
|
|
|
DECLARE_EXPORT(__movstrSI32);
|
|
|
|
DECLARE_EXPORT(__movstrSI36);
|
|
|
|
DECLARE_EXPORT(__movstrSI40);
|
|
|
|
DECLARE_EXPORT(__movstrSI44);
|
|
|
|
DECLARE_EXPORT(__movstrSI48);
|
|
|
|
DECLARE_EXPORT(__movstrSI52);
|
|
|
|
DECLARE_EXPORT(__movstrSI56);
|
|
|
|
DECLARE_EXPORT(__movstrSI60);
|
2005-04-17 05:20:36 +07:00
|
|
|
DECLARE_EXPORT(__movstr_i4_even);
|
|
|
|
DECLARE_EXPORT(__movstr_i4_odd);
|
|
|
|
DECLARE_EXPORT(__movstrSI12_i4);
|
2009-09-30 13:17:34 +07:00
|
|
|
DECLARE_EXPORT(__movmem);
|
2009-10-22 18:58:37 +07:00
|
|
|
DECLARE_EXPORT(__movmemSI8);
|
|
|
|
DECLARE_EXPORT(__movmemSI12);
|
|
|
|
DECLARE_EXPORT(__movmemSI16);
|
|
|
|
DECLARE_EXPORT(__movmemSI20);
|
|
|
|
DECLARE_EXPORT(__movmemSI24);
|
|
|
|
DECLARE_EXPORT(__movmemSI28);
|
|
|
|
DECLARE_EXPORT(__movmemSI32);
|
|
|
|
DECLARE_EXPORT(__movmemSI36);
|
|
|
|
DECLARE_EXPORT(__movmemSI40);
|
|
|
|
DECLARE_EXPORT(__movmemSI44);
|
|
|
|
DECLARE_EXPORT(__movmemSI48);
|
|
|
|
DECLARE_EXPORT(__movmemSI52);
|
|
|
|
DECLARE_EXPORT(__movmemSI56);
|
|
|
|
DECLARE_EXPORT(__movmemSI60);
|
2008-11-26 01:44:07 +07:00
|
|
|
DECLARE_EXPORT(__movmem_i4_even);
|
|
|
|
DECLARE_EXPORT(__movmem_i4_odd);
|
|
|
|
DECLARE_EXPORT(__movmemSI12_i4);
|
2008-11-18 15:33:48 +07:00
|
|
|
DECLARE_EXPORT(__udiv_qrnnd_16);
|
2008-11-20 13:26:35 +07:00
|
|
|
DECLARE_EXPORT(__sdivsi3_i4);
|
|
|
|
DECLARE_EXPORT(__udivsi3_i4);
|
2008-11-18 15:33:48 +07:00
|
|
|
DECLARE_EXPORT(__sdivsi3_i4i);
|
|
|
|
DECLARE_EXPORT(__udivsi3_i4i);
|
2009-07-11 17:56:58 +07:00
|
|
|
#ifdef CONFIG_MCOUNT
|
2009-07-11 18:32:14 +07:00
|
|
|
DECLARE_EXPORT(mcount);
|
2008-09-21 14:43:45 +07:00
|
|
|
#endif
|