Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1328a1ae authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Masahiro Yamada
Browse files

kbuild: thin archives final link close --whole-archives option



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.

This matches more closely with the incremental final link.

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent df91b026
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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			\