summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-02-05 11:25:05 +0100
committerMichal Marek <mmarek@suse.com>2016-02-08 20:45:09 +0100
commita043934207c5eb271deeaed2e9bd019c3be92cad (patch)
tree8be5eff4e91002b0e2b57b8f98179dee580d4fb6 /scripts
parentb41c29b0527c7fd6a95d0f71274abb79933bf960 (diff)
downloadlinux-a043934207c5eb271deeaed2e9bd019c3be92cad.tar.bz2
scripts/link-vmlinux.sh: force error on kallsyms failure
Since the output of the invocation of scripts/kallsyms is piped directly into the assembler, error messages it emits are visible on stderr, but a non-zero return code is ignored, and the build simply proceeds in that case. However, the resulting kernel is most likely broken, and will crash at boot. So instead, capture the output of kallsyms in a separate .S file, and pass that to the assembler in a separate step. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/link-vmlinux.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index ba6c34ea5429..8f22654c71b4 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -93,9 +93,10 @@ kallsyms()
local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \
${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
- ${NM} -n ${1} | \
- scripts/kallsyms ${kallsymopt} | \
- ${CC} ${aflags} -c -o ${2} -x assembler-with-cpp -
+ local afile="`basename ${2} .o`.S"
+
+ ${NM} -n ${1} | scripts/kallsyms ${kallsymopt} > ${afile}
+ ${CC} ${aflags} -c -o ${2} ${afile}
}
# Create map file with all symbols from ${1}