aboutsummaryrefslogtreecommitdiff
path: root/tccrun.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccrun.c')
-rw-r--r--tccrun.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tccrun.c b/tccrun.c
index a53330f..97f4761 100644
--- a/tccrun.c
+++ b/tccrun.c
@@ -60,6 +60,8 @@ LIBTCCAPI int tcc_relocate(TCCState *s1, void *ptr)
#ifdef HAVE_SELINUX
{ /* Use mmap instead of malloc for Selinux. */
+ s1->mem_size = ret;
+
s1->write_mem = mmap (NULL, ret, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
if (s1->write_mem == MAP_FAILED)