WSL2-Linux-Kernel/arch/sh/lib
Geert Uytterhoeven 84ed8a9905 sh: always link in helper functions extracted from libgcc
E.g. landisk_defconfig, which has CONFIG_NTFS_FS=m:

  ERROR: "__ashrdi3" [fs/ntfs/ntfs.ko] undefined!

For "lib-y", if no symbols in a compilation unit are referenced by other
units, the compilation unit will not be included in vmlinux.  This
breaks modules that do reference those symbols.

Use "obj-y" instead to fix this.

http://kisskb.ellerman.id.au/kisskb/buildresult/8838077/

This doesn't fix all cases. There are others, e.g. udivsi3.
This is also not limited to sh, many architectures handle this in the
same way.

A simple solution is to unconditionally include all helper functions.
A more complex solution is to make the choice of "lib-y" or "obj-y" depend
on CONFIG_MODULES:

  obj-$(CONFIG_MODULES) += ...
  lib-y($CONFIG_MODULES) += ...

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Tested-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-12-18 19:04:51 -08:00
..
Makefile sh: always link in helper functions extracted from libgcc 2013-12-18 19:04:51 -08:00
__clear_user.S Merge branch 'master' into sh/smp 2009-09-01 13:54:14 +09:00
ashiftrt.S sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32. 2008-12-22 18:42:53 +09:00
ashldi3.c sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32. 2008-12-22 18:42:53 +09:00
ashlsi3.S sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32. 2008-12-22 18:42:53 +09:00
ashrdi3.c sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32. 2008-12-22 18:42:53 +09:00
ashrsi3.S sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32. 2008-12-22 18:42:53 +09:00
checksum.S sh: Handle calling csum_partial with misaligned data 2009-01-29 11:56:02 +09:00
copy_page.S sh: Kill off dcache writeback from copy_page(). 2009-09-08 16:23:08 +09:00
delay.c sh: Ensure ST40-300 BogoMIPS value is consistent 2011-02-15 16:24:05 +09:00
div64-generic.c sh: fixup many sparse errors. 2008-09-08 10:35:04 +09:00
div64.S
io.c sh: Fix up the __raw_read/writeX() definitions. 2008-10-01 15:12:27 +09:00
libgcc.h arch/sh/lib/libgcc.h: Checkpatch cleanup 2010-03-01 11:57:29 +09:00
lshrdi3.c sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32. 2008-12-22 18:42:53 +09:00
lshrsi3.S sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32. 2008-12-22 18:42:53 +09:00
mcount.S sh: Fix up stack debugging build. 2013-01-14 18:07:36 +09:00
memchr.S
memcpy-sh4.S sh: Fix up optimized SH-4 memcpy on big endian. 2008-05-16 14:55:07 +09:00
memcpy.S
memmove.S
memset-sh4.S sh: Optimised memset for SH4 2009-11-24 16:28:43 +09:00
memset.S
movmem.S sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32. 2008-12-22 18:42:53 +09:00
strlen.S arch/sh/lib/strlen.S: Checkpatch cleanup 2010-05-24 08:11:07 +09:00
udiv_qrnnd.S sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32. 2008-12-22 18:42:53 +09:00
udivsi3.S sh: Add plain udivsi3 (not _i4*) for gcc-4.1 and lower. 2008-12-22 18:43:53 +09:00
udivsi3_i4i-Os.S sh: Add plain udivsi3 (not _i4*) for gcc-4.1 and lower. 2008-12-22 18:43:53 +09:00
udivsi3_i4i.S sh: Add plain udivsi3 (not _i4*) for gcc-4.1 and lower. 2008-12-22 18:43:53 +09:00