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 <da.gomez@samsung.com> Closes: https://lore.kernel.org/all/20240807-macos-build-support-v1-12-4cd1ded85694@samsung.com/ Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
1 parent e332a5a commit 1472464

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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)