Re: [PATCH] scripts/link-vmlinux.sh: force error on kallsyms failure

From: Michal Marek
Date: Fri Feb 05 2016 - 04:58:44 EST


On 2016-02-04 18:09, Ard Biesheuvel wrote:
> - ${NM} -n ${1} | \
> - scripts/kallsyms ${kallsymopt} | \
> - ${CC} ${aflags} -c -o ${2} -x assembler-with-cpp -
> + # capture the return code of scripts/kallsyms in $RC
> + local RC=`(${NM} -n ${1} | \
> + (scripts/kallsyms ${kallsymopt}; echo $? 1>&3) | \
> + ${CC} ${aflags} -c -o ${2} -x assembler-with-cpp -) 3>&1`
> +
> + [ $RC -eq 0 ]

This now ignores errors by the assembler (and makes the function hard to
read). Please change it to use a temporary file.

Michal