* [PATCH/RFC] sh: Always link in helper functions extracted from libgcc
@ 2013-05-29 8:16 Geert Uytterhoeven
2013-12-05 6:49 ` Nobuhiro Iwamatsu
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2013-05-29 8:16 UTC (permalink / raw)
To: Paul Mundt; +Cc: linux-sh, linux-arch, linux-kernel, Geert Uytterhoeven
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.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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) += ...
What do you think?
Thanks for your comments!
arch/sh/lib/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile
index 7b95f29..3baff31 100644
--- a/arch/sh/lib/Makefile
+++ b/arch/sh/lib/Makefile
@@ -6,7 +6,7 @@ lib-y = delay.o memmove.o memchr.o \
checksum.o strlen.o div64.o div64-generic.o
# Extracted from libgcc
-lib-y += movmem.o ashldi3.o ashrdi3.o lshrdi3.o \
+obj-y += movmem.o ashldi3.o ashrdi3.o lshrdi3.o \
ashlsi3.o ashrsi3.o ashiftrt.o lshrsi3.o \
udiv_qrnnd.o
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH/RFC] sh: Always link in helper functions extracted from libgcc
2013-05-29 8:16 [PATCH/RFC] sh: Always link in helper functions extracted from libgcc Geert Uytterhoeven
@ 2013-12-05 6:49 ` Nobuhiro Iwamatsu
2013-12-08 10:16 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Nobuhiro Iwamatsu @ 2013-12-05 6:49 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Paul Mundt, Linux-sh, linux-arch, Linux Kernel Mailing List,
Andrew Morton, stable
# Add akpm@linux-foundation.org and stable@vger.kernel.org to CC.
Hi, Geert.
I was just creating a patch as your patch.... I noticed your patch by chance.
I think your proposal is good.
But Paul does not maintain the SH tree.
Andrew, Could you pickup this patch ?
Tested-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Best regards,
Nobuhiro
2013/5/29 Geert Uytterhoeven <geert@linux-m68k.org>:
> 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.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> 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) += ...
>
> What do you think?
> Thanks for your comments!
>
> arch/sh/lib/Makefile | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile
> index 7b95f29..3baff31 100644
> --- a/arch/sh/lib/Makefile
> +++ b/arch/sh/lib/Makefile
> @@ -6,7 +6,7 @@ lib-y = delay.o memmove.o memchr.o \
> checksum.o strlen.o div64.o div64-generic.o
>
> # Extracted from libgcc
> -lib-y += movmem.o ashldi3.o ashrdi3.o lshrdi3.o \
> +obj-y += movmem.o ashldi3.o ashrdi3.o lshrdi3.o \
> ashlsi3.o ashrsi3.o ashiftrt.o lshrsi3.o \
> udiv_qrnnd.o
>
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Nobuhiro Iwamatsu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH/RFC] sh: Always link in helper functions extracted from libgcc
2013-12-05 6:49 ` Nobuhiro Iwamatsu
@ 2013-12-08 10:16 ` Geert Uytterhoeven
0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2013-12-08 10:16 UTC (permalink / raw)
To: Nobuhiro Iwamatsu
Cc: Paul Mundt, Linux-sh, Linux-Arch, Linux Kernel Mailing List,
Andrew Morton, stable
Hi Iwamatsu-san,
On Thu, Dec 5, 2013 at 7:49 AM, Nobuhiro Iwamatsu
<nobuhiro.iwamatsu.yj@renesas.com> wrote:
> I was just creating a patch as your patch.... I noticed your patch by chance.
> I think your proposal is good.
>
> But Paul does not maintain the SH tree.
> Andrew, Could you pickup this patch ?
As Andrew wasn't CCed on the original submission, I forwarded the original
patch to him.
> Tested-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-08 10:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-29 8:16 [PATCH/RFC] sh: Always link in helper functions extracted from libgcc Geert Uytterhoeven
2013-12-05 6:49 ` Nobuhiro Iwamatsu
2013-12-08 10:16 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).