Unified · Split
| @@ -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_RO | 296 | #ifndef CONFIG_RUNMEM_RO |
| 293 | # define CONFIG_RUNMEM_RO 0 | 297 | # ifdef __APPLE__ |
| 298 | # define CONFIG_RUNMEM_RO 1 | ||
| 299 | # else | ||
| 300 | # define CONFIG_RUNMEM_RO 0 | ||
| 301 | # endif | ||
| 294 | #endif | 302 | #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, |