summaryrefslogtreecommitdiff
path: root/arch/um/drivers/chan_user.c
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2024-10-16 14:12:38 -0700
committerJohannes Berg <johannes.berg@intel.com>2024-10-17 10:33:31 +0200
commit1e3071d629b2e2cd7faeb8de2f88ba31cfd7231a (patch)
treebe9fd2d0f1469f82e26cfd053e98e732cbfae0f4 /arch/um/drivers/chan_user.c
parent89350defd1f0eb5a58a7e1155d9e322080f0bf15 (diff)
um: Disable auto variable initialization for stub_exe.c
When automatic variable initialization is enabled via CONFIG_INIT_STACK_ALL_{PATTERN,ZERO}, clang will insert a call to memset() to initialize an object created with __builtin_alloca(). This ultimately breaks the build when linking stub_exe because it is a standalone executable that does not include or link against memset(). ld: arch/um/kernel/skas/stub_exe.o: in function `_start': arch/um/kernel/skas/stub_exe.c:83:(.ltext+0x15): undefined reference to `memset' Disable automatic variable initialization for stub_exe.c by passing the default value of 'uninitialized' to '-ftrivial-auto-var-init', which avoids generating the call to memset(). This code is small and runs quickly as it is just designed to set up an environment, so stack variable initialization is unnecessary overhead for little gain. Fixes: 32e8eaf263d9 ("um: use execveat to create userspace MMs") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20241016-uml-fix-stub_exe-clang-v1-2-3d6381dc5a78@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'arch/um/drivers/chan_user.c')
0 files changed, 0 insertions, 0 deletions