History

Another update for macos

Sorry about last commit. I had no access to a macos machine for a for weeks.

herman ten brugge committed 10 months ago

Commit 518279d1 parent 14019671 file · +1 −11Browse files

Unified · Split

tccrun.c+1−11
@@ -323,7 +323,7 @@ static void cleanup_sections(TCCState *s1) · 322 unmodified lines
323323
324324 #ifndef CONFIG_RUNMEM_RO
325325 # ifdef __APPLE__
326−# define CONFIG_RUNMEM_RO 2
326+# define CONFIG_RUNMEM_RO 1
327327 # else
328328 # define CONFIG_RUNMEM_RO 0
329329 # endif
@@ -359,23 +359,13 @@ redo: · 29 unmodified lines
359359 if (copy == 3)
360360 return 0;
361361
362−#if defined TCC_TARGET_MACHO
363− for (k = 0; k < 3; ++k) { /* 0:rx, 1:ro, 3:rw sections */
364−#else
365362 for (k = 0; k < 4; ++k) { /* 0:rx, 1:ro, 2:ro debug , 3:rw sections */
366−#endif
367363 n = 0; addr = 0;
368364 for(i = 1; i < s1->nb_sections; i++) {
369−#if defined TCC_TARGET_MACHO
370− static const char shf[] = {
371− SHF_ALLOC|SHF_EXECINSTR, SHF_ALLOC, SHF_ALLOC|SHF_WRITE
372− };
373−#else
374365 static const char shf[] = {
375366 SHF_ALLOC|SHF_EXECINSTR, SHF_ALLOC, 0, SHF_ALLOC|SHF_WRITE
376367 };
377368 if (k == 2 && s1->do_debug == 0) continue;
378−#endif
379369 s = s1->sections[i];
380370 if (shf[k] != (s->sh_flags & (SHF_ALLOC|SHF_WRITE|SHF_EXECINSTR)))
381371 continue;

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