alpha: fix modversions for strcpy() et.al.
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 19 Dec 2023 03:59:26 +0000 (22:59 -0500)
committerArnd Bergmann <arnd@arndb.de>
Fri, 3 May 2024 20:09:09 +0000 (22:09 +0200)
commit397c66c2c989ff98a5016c69cb1547676d596fd1
tree0f801fe64491ae12f3e14e9b6124cea89a524dff
parent5d7531517427429e31d7bb84c00b0c7bec30e280
alpha: fix modversions for strcpy() et.al.

        On alpha str{n,}{cpy,cat}() implementations are playing
fun games with shared chunks of code.  The problem is, they are
using direct branches and need to be next to each other.
        Currently it's done by building them in separate object
files, then using ld -r to link those together.  Unfortunately,
genksyms machinery has no idea what to do with that - we have
generated in arch/alpha/lib/.strcat.S.cmd, but there's nothing
to propagate that into .stycpy.S.cmd, so modpost doesn't find
anything for those symbols, resulting in
WARNING: modpost: EXPORT symbol "strcpy" [vmlinux] version generation failed, symbol will not be versioned.
Is "strcpy" prototyped in <asm/asm-prototypes.h>?
WARNING: modpost: EXPORT symbol "strcat" [vmlinux] version generation failed, symbol will not be versioned.
Is "strcat" prototyped in <asm/asm-prototypes.h>?
WARNING: modpost: EXPORT symbol "strncpy" [vmlinux] version generation failed, symbol will not be versioned.
Is "strncpy" prototyped in <asm/asm-prototypes.h>?
WARNING: modpost: EXPORT symbol "strncat" [vmlinux] version generation failed, symbol will not be versioned.
Is "strncat" prototyped in <asm/asm-prototypes.h>?
spew on modversion-enabled builds (all 4 functions in question
are in fact prototyped in asm-prototypes.h)

        Fixing doesn't require messing with kbuild, thankfully -
just build one object (i.e. have sty{n,}cpy.S with includes of relevant
*.S instead of playing with ld -r) and that's it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/alpha/lib/Makefile
arch/alpha/lib/stycpy.S [new file with mode: 0644]
arch/alpha/lib/styncpy.S [new file with mode: 0644]