mirror of
git://repo.or.cz/tinycc.git
synced 2026-07-04 02:18:50 +08:00
Use CONFIG_RUNMEM_RO=1 on apple
This commit is contained in:
parent
42395a1912
commit
9675c1e245
10
tccrun.c
10
tccrun.c
@ -289,8 +289,16 @@ static void cleanup_sections(TCCState *s1)
|
|||||||
/* 0 = .text rwx other rw */
|
/* 0 = .text rwx other rw */
|
||||||
/* 1 = .text rx .rdata r .data/.bss rw */
|
/* 1 = .text rx .rdata r .data/.bss rw */
|
||||||
|
|
||||||
|
/* Some targets implement secutiry options that do not allow write in
|
||||||
|
executable code. These targets need CONFIG_RUNMEM_RO=1.
|
||||||
|
The disadvantage of this is that it requires a little bit more memory. */
|
||||||
|
|
||||||
#ifndef CONFIG_RUNMEM_RO
|
#ifndef CONFIG_RUNMEM_RO
|
||||||
# define CONFIG_RUNMEM_RO 0
|
# ifdef __APPLE__
|
||||||
|
# define CONFIG_RUNMEM_RO 1
|
||||||
|
# else
|
||||||
|
# define CONFIG_RUNMEM_RO 0
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* relocate code. Return -1 on error, required size if ptr is NULL,
|
/* relocate code. Return -1 on error, required size if ptr is NULL,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user