[PATCH] compiler-rt: Fix windows executable stack handling
Stephen Hines
srhines at google.com
Fri Sep 5 16:37:39 PDT 2014
Does this look better?
Thanks,
Steve
From: Stephen Hines <srhines at google.com>
Date: Tue, 2 Sep 2014 14:34:58 -0700
Subject: [PATCH] Remove enable_execute_stack functionality on Windows.
---
lib/builtins/enable_execute_stack.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/builtins/enable_execute_stack.c
b/lib/builtins/enable_execute_stack.c
index 63d836b..c02be2a 100644
--- a/lib/builtins/enable_execute_stack.c
+++ b/lib/builtins/enable_execute_stack.c
@@ -8,6 +8,7 @@
*
===----------------------------------------------------------------------===
*/
+#if !defined(_WIN32)
#include "int_lib.h"
#include <sys/mman.h>
@@ -56,3 +57,5 @@ __enable_execute_stack(void* addr)
size_t length = endPage - startPage;
(void) mprotect((void *)startPage, length, PROT_READ | PROT_WRITE |
PROT_EXEC);
}
+
+#endif
--
2.1.0.rc2.206.gedb03e5
On Fri, Sep 5, 2014 at 1:36 PM, Reid Kleckner <rnk at google.com> wrote:
> Wow. It looks like LLVM doesn't reference this builtin. GCC however
> references it for nested function trampolines. It's not clear to me if we
> need to support that.
>
> In the short term, I would just ifdef out the whole file on Windows. Feel
> free to just commit that if it makes your build work. In the longer term,
> I'd like to know if we can just delete this builtin.
>
>
> On Fri, Sep 5, 2014 at 1:13 PM, Stephen Hines <srhines at google.com> wrote:
>
>> Ping.
>>
>>
>> On Tue, Sep 2, 2014 at 2:41 PM, Stephen Hines <srhines at google.com> wrote:
>>
>>> The following patch allows compiler-rt to build/execute under a mingw
>>> build for windows. The existing code (ifdef-ed out on windows) doesn't
>>> build or execute correctly for this environment. Please take a look and let
>>> me know if it is ok to commit it.
>>>
>>> Thanks,
>>> Steve
>>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140905/e46d87c6/attachment.html>
More information about the llvm-commits
mailing list