make memory for generated opcodes executable so the program works with
enabled NX feature.
This commit is contained in:
parent
dbf7caec10
commit
13039ef44f
2 changed files with 2 additions and 10 deletions
|
@ -385,12 +385,11 @@ static int doas(char* in, char* out, unsigned char** compiledcode)
|
||||||
|
|
||||||
if((*compiledcode = (unsigned char*)buf))
|
if((*compiledcode = (unsigned char*)buf))
|
||||||
{
|
{
|
||||||
#ifdef VM_X86_64_STANDALONE // no idea why
|
// need to be able to exec code
|
||||||
if(mprotect(buf, allocsize, PROT_READ|PROT_EXEC) == -1)
|
if(mprotect(buf, allocsize, PROT_READ|PROT_WRITE|PROT_EXEC) == -1)
|
||||||
{
|
{
|
||||||
Com_Error(ERR_FATAL, "mprotect failed on %p+%x: %s\n", buf, allocsize, strerror(errno));
|
Com_Error(ERR_FATAL, "mprotect failed on %p+%x: %s\n", buf, allocsize, strerror(errno));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -870,13 +870,6 @@ ifeq ($(ARCH),x86)
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH),x86_64)
|
ifeq ($(ARCH),x86_64)
|
||||||
Q3OBJ += $(B)/client/vm_x86_64.o
|
Q3OBJ += $(B)/client/vm_x86_64.o
|
||||||
|
|
||||||
#FIXME: why do these need to be here?
|
|
||||||
Q3OBJ += \
|
|
||||||
$(B)/client/snd_mixa.o \
|
|
||||||
$(B)/client/matha.o \
|
|
||||||
$(B)/client/ftola.o \
|
|
||||||
$(B)/client/snapvectora.o
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),ppc)
|
ifeq ($(ARCH),ppc)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue