Hi Nicholas, 2017-06-09 14:24 GMT+09:00 Nicholas Piggin <npiggin@xxxxxxxxx>: > Close the --whole-archives option with --no-whole-archive. Some > architectures end up including additional .o and files multiple > times after this, and they get duplicate symbols when they are > brought under the --whole-archives option. Which architectures have additional files after --no-whole-archive ? I see this case only for ARCH = "um" in vmlinux_link() where it adds some -l* options after --no-whole-archive. I think it is good to close the --whole-archives everywhere. So, the code looks OK to me, but I just wondered about the log. > This matches more closely with the incremental final link. > > Signed-off-by: Nicholas Piggin <npiggin@xxxxxxxxx> > --- > scripts/link-vmlinux.sh | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > index c80291319cb2..2a062ea130b5 100755 > --- a/scripts/link-vmlinux.sh > +++ b/scripts/link-vmlinux.sh > @@ -63,7 +63,7 @@ modpost_link() > local objects > > if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then > - objects="--whole-archive built-in.o" > + objects="--whole-archive built-in.o --no-whole-archive" > else > objects="${KBUILD_VMLINUX_INIT} \ > --start-group \ > @@ -83,7 +83,7 @@ vmlinux_link() > > if [ "${SRCARCH}" != "um" ]; then > if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then > - objects="--whole-archive built-in.o ${1}" > + objects="--whole-archive built-in.o ${1} --no-whole-archive" > else > objects="${KBUILD_VMLINUX_INIT} \ > --start-group \ > @@ -96,7 +96,7 @@ vmlinux_link() > -T ${lds} ${objects} > else > if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then > - objects="-Wl,--whole-archive built-in.o ${1}" > + objects="-Wl,--whole-archive built-in.o ${1} -Wl,--no-whole-archive" > else > objects="${KBUILD_VMLINUX_INIT} \ > -Wl,--start-group \ -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html