Use CONFIG_RUNMEM_RO=1 on apple
This commit is contained in:
		
							parent
							
								
									42395a1912
								
							
						
					
					
						commit
						9675c1e245
					
				
					 1 changed files with 9 additions and 1 deletions
				
			
		
							
								
								
									
										10
									
								
								tccrun.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								tccrun.c
									
										
									
									
									
								
							|  | @ -289,8 +289,16 @@ static void cleanup_sections(TCCState *s1) | |||
| /* 0 = .text rwx  other 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 | ||||
| # define CONFIG_RUNMEM_RO 0 | ||||
| # ifdef __APPLE__ | ||||
| #   define CONFIG_RUNMEM_RO 1 | ||||
| # else | ||||
| #   define CONFIG_RUNMEM_RO 0 | ||||
| #  endif | ||||
| #endif | ||||
| 
 | ||||
| /* relocate code. Return -1 on error, required size if ptr is NULL,
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue