Skip to content

Commit 1472464

Browse files
committed
kbuild: avoid scripts/kallsyms parsing /dev/null
On macOS, as reported by Daniel Gomez, getline() sets ENOTTY to errno if it is requested to read from /dev/null. If this is worth fixing, I would rather pass an empty file to scripts/kallsyms instead of adding the ugly #ifdef __APPLE__. Fixes: c442db3 ("kbuild: remove PROVIDE() for kallsyms symbols") Reported-by: Daniel Gomez <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]> Reviewed-by: Daniel Gomez <[email protected]>
1 parent e332a5a commit 1472464

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/link-vmlinux.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ kallsymso=
219219
strip_debug=
220220

221221
if is_enabled CONFIG_KALLSYMS; then
222-
kallsyms /dev/null .tmp_vmlinux0.kallsyms
222+
truncate -s0 .tmp_vmlinux.kallsyms0.syms
223+
kallsyms .tmp_vmlinux.kallsyms0.syms .tmp_vmlinux0.kallsyms
223224
fi
224225

225226
if is_enabled CONFIG_KALLSYMS || is_enabled CONFIG_DEBUG_INFO_BTF; then

0 commit comments

Comments
 (0)