PE: Use no red zone on AMD64
This commit is contained in:
committed by
Markus F.X.J. Oberhumer
parent
f3e710394a
commit
966b571b7c
@@ -205,6 +205,7 @@ section LZMA_HEAD
|
|||||||
mov esi, IMM32(lzma_c_len)
|
mov esi, IMM32(lzma_c_len)
|
||||||
|
|
||||||
.att_syntax
|
.att_syntax
|
||||||
|
#define NO_RED_ZONE
|
||||||
#include "arch/amd64/regs.h"
|
#include "arch/amd64/regs.h"
|
||||||
#include "arch/amd64/lzma_d.S"
|
#include "arch/amd64/lzma_d.S"
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ vpath %.c $(top_srcdir)/src/stub/src/c
|
|||||||
STUBS =
|
STUBS =
|
||||||
include $(top_srcdir)/src/stub/src/c/Makevars.lzma
|
include $(top_srcdir)/src/stub/src/c/Makevars.lzma
|
||||||
ifneq ($(UPX_LZMA_VERSION),)
|
ifneq ($(UPX_LZMA_VERSION),)
|
||||||
STUBS += lzma_d_cf.S lzma_d_cs.S
|
STUBS += lzma_d_cf.S lzma_d_cs.S lzma_d_cn.S
|
||||||
endif
|
endif
|
||||||
|
|
||||||
default.targets = all
|
default.targets = all
|
||||||
@@ -52,3 +52,4 @@ lzma_d_c%.S : lzma_d_c.c
|
|||||||
|
|
||||||
lzma_d_cf.% : PP_FLAGS = -DFAST
|
lzma_d_cf.% : PP_FLAGS = -DFAST
|
||||||
lzma_d_cs.% : PP_FLAGS = -DSMALL
|
lzma_d_cs.% : PP_FLAGS = -DSMALL
|
||||||
|
lzma_d_cn.% : PP_FLAGS = -DFAST -mno-red-zone
|
||||||
|
|||||||
@@ -92,12 +92,21 @@ section LZMA_ELF00
|
|||||||
|
|
||||||
pushq %rax // return address slot (dummy CALL)
|
pushq %rax // return address slot (dummy CALL)
|
||||||
|
|
||||||
|
#ifndef NO_RED_ZONE
|
||||||
|
|
||||||
section LZMA_DEC10
|
section LZMA_DEC10
|
||||||
#include "lzma_d_cs.S"
|
#include "lzma_d_cs.S"
|
||||||
|
|
||||||
section LZMA_DEC20
|
section LZMA_DEC20
|
||||||
#include "lzma_d_cf.S"
|
#include "lzma_d_cf.S"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
section LZMA_DEC20
|
||||||
|
#include "lzma_d_cn.S"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
section LZMA_DEC30
|
section LZMA_DEC30
|
||||||
movq -1*8(%rbp),%rsi // src [after header]
|
movq -1*8(%rbp),%rsi // src [after header]
|
||||||
movq 2*8(%rbp),%rdi // dst
|
movq 2*8(%rbp),%rdi // dst
|
||||||
|
|||||||
Reference in New Issue
Block a user