History

Use CONFIG_RUNMEM_RO=1 on apple

herman ten brugge committed 2 years ago

Commit 9675c1e1 parent 42395a11 file · +9 −1Browse files

Unified · Split

tccrun.c+9−1
@@ -289,8 +289,16 @@ static void cleanup_sections(TCCState *s1) · 288 unmodified lines
289/* 0 = .text rwx other rw */289/* 0 = .text rwx other rw */
290/* 1 = .text rx .rdata r .data/.bss rw */290/* 1 = .text rx .rdata r .data/.bss rw */
291 291
292/* Some targets implement secutiry options that do not allow write in
293 executable code. These targets need CONFIG_RUNMEM_RO=1.
294 The disadvantage of this is that it requires a little bit more memory. */
295
292#ifndef CONFIG_RUNMEM_RO296#ifndef CONFIG_RUNMEM_RO
293# define CONFIG_RUNMEM_RO 0297# ifdef __APPLE__
298# define CONFIG_RUNMEM_RO 1
299# else
300# define CONFIG_RUNMEM_RO 0
301# endif
294#endif302#endif
295 303
296/* relocate code. Return -1 on error, required size if ptr is NULL,304/* relocate code. Return -1 on error, required size if ptr is NULL,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t