This patch allows compiler-rt to build for targets that don't have support for mprotect (ie. baremetal) by providing an empty version of enable_execute_stack.
Okay to commit?
Thanks,
Catherine
Differential D33018
[compiler-rt][cmake] Provide empty version of enable_execute_stack for baremetal targets clm on May 9 2017, 3:28 PM. Authored by
Details This patch allows compiler-rt to build for targets that don't have support for mprotect (ie. baremetal) by providing an empty version of enable_execute_stack. Okay to commit? Thanks,
Diff Detail
Event TimelineComment Actions The first version of the patch failed to include the empty version of enable_execute_stack. The diff is now updated.
Comment Actions Why do you call __enable_execute_stack in first place? I would just leave it and fix any potential callers. Comment Actions To expand on what I said on IRC: (1) I don't think anything should normally call it. For GCC, it depends on the target configuration whether it believes __enable_execute_stack is supported/required or not. As such, I'd prefer to just skip the whole default implementation for platforms where it shouldn't be used. This includes bare-metal. Comment Actions I've now updated the patch based on Joerg's comments. This version checks the setting of COMPILER_RT_BAREMETAL_BUILD before building enable_execute_stack.c. |