diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-06-09 01:24:13 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-06-29 20:03:02 -0400 |
commit | 1328a1ae0e9048ff4b7f6b60c497db7a2799e1b1 (patch) | |
tree | d12ecc8be3bd763789a9db18e07ed992973fab6b /scripts | |
parent | df91b0262e2cff23db5eac77126ea0bef06d54d2 (diff) |
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: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/link-vmlinux.sh | 6 |
1 files 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() | |||
63 | local objects | 63 | local objects |
64 | 64 | ||
65 | if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then | 65 | if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then |
66 | objects="--whole-archive built-in.o" | 66 | objects="--whole-archive built-in.o --no-whole-archive" |
67 | else | 67 | else |
68 | objects="${KBUILD_VMLINUX_INIT} \ | 68 | objects="${KBUILD_VMLINUX_INIT} \ |
69 | --start-group \ | 69 | --start-group \ |
@@ -83,7 +83,7 @@ vmlinux_link() | |||
83 | 83 | ||
84 | if [ "${SRCARCH}" != "um" ]; then | 84 | if [ "${SRCARCH}" != "um" ]; then |
85 | if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then | 85 | if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then |
86 | objects="--whole-archive built-in.o ${1}" | 86 | objects="--whole-archive built-in.o ${1} --no-whole-archive" |
87 | else | 87 | else |
88 | objects="${KBUILD_VMLINUX_INIT} \ | 88 | objects="${KBUILD_VMLINUX_INIT} \ |
89 | --start-group \ | 89 | --start-group \ |
@@ -96,7 +96,7 @@ vmlinux_link() | |||
96 | -T ${lds} ${objects} | 96 | -T ${lds} ${objects} |
97 | else | 97 | else |
98 | if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then | 98 | if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then |
99 | objects="-Wl,--whole-archive built-in.o ${1}" | 99 | objects="-Wl,--whole-archive built-in.o ${1} -Wl,--no-whole-archive" |
100 | else | 100 | else |
101 | objects="${KBUILD_VMLINUX_INIT} \ | 101 | objects="${KBUILD_VMLINUX_INIT} \ |
102 | -Wl,--start-group \ | 102 | -Wl,--start-group \ |