2005-04-16 15:20:36 -07:00
|
|
|
#include <linux/module.h>
|
2009-10-26 19:51:19 -07:00
|
|
|
#include <linux/string.h>
|
|
|
|
#include <linux/uaccess.h>
|
|
|
|
#include <linux/delay.h>
|
|
|
|
#include <linux/mm.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
#include <asm/checksum.h>
|
2009-10-26 19:51:19 -07:00
|
|
|
#include <asm/sections.h>
|
2005-04-16 15: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-26 19: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(_ebss);
|
|
|
|
EXPORT_SYMBOL(empty_zero_page);
|
2005-04-16 15: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 01:19:35 -07:00
|
|
|
#define DECLARE_EXPORT(name) \
|
|
|
|
extern void name(void);EXPORT_SYMBOL(name)
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-11-19 23:26:35 -07:00
|
|
|
DECLARE_EXPORT(__udivsi3);
|
|
|
|
DECLARE_EXPORT(__sdivsi3);
|
2008-11-18 01:33:48 -07:00
|
|
|
DECLARE_EXPORT(__lshrsi3);
|
2007-07-20 00: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 01:33:48 -07:00
|
|
|
DECLARE_EXPORT(__movstr);
|
2007-07-20 00:59:49 -07:00
|
|
|
DECLARE_EXPORT(__movstrSI8);
|
|
|
|
DECLARE_EXPORT(__movstrSI12);
|
2006-10-02 21:14:04 -07:00
|
|
|
DECLARE_EXPORT(__movstrSI16);
|
2007-07-20 00: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-16 15:20:36 -07:00
|
|
|
DECLARE_EXPORT(__movstr_i4_even);
|
|
|
|
DECLARE_EXPORT(__movstr_i4_odd);
|
|
|
|
DECLARE_EXPORT(__movstrSI12_i4);
|
2009-09-29 23:17:34 -07:00
|
|
|
DECLARE_EXPORT(__movmem);
|
2009-10-22 04: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-25 11:44:07 -07:00
|
|
|
DECLARE_EXPORT(__movmem_i4_even);
|
|
|
|
DECLARE_EXPORT(__movmem_i4_odd);
|
|
|
|
DECLARE_EXPORT(__movmemSI12_i4);
|
2008-11-18 01:33:48 -07:00
|
|
|
DECLARE_EXPORT(__udiv_qrnnd_16);
|
2008-11-19 23:26:35 -07:00
|
|
|
DECLARE_EXPORT(__sdivsi3_i4);
|
|
|
|
DECLARE_EXPORT(__udivsi3_i4);
|
2008-11-18 01:33:48 -07:00
|
|
|
DECLARE_EXPORT(__sdivsi3_i4i);
|
|
|
|
DECLARE_EXPORT(__udivsi3_i4i);
|
2009-07-11 03:56:58 -07:00
|
|
|
#ifdef CONFIG_MCOUNT
|
2009-07-11 04:32:14 -07:00
|
|
|
DECLARE_EXPORT(mcount);
|
2008-09-21 00:43:45 -07:00
|
|
|
#endif
|