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
323 323
324#ifndef CONFIG_RUNMEM_RO324#ifndef CONFIG_RUNMEM_RO
325# ifdef __APPLE__325# ifdef __APPLE__
326# define CONFIG_RUNMEM_RO 2326# define CONFIG_RUNMEM_RO 1
327# else327# else
328# define CONFIG_RUNMEM_RO 0328# define CONFIG_RUNMEM_RO 0
329# endif329# endif
@@ -359,23 +359,13 @@ redo: · 29 unmodified lines
359 if (copy == 3)359 if (copy == 3)
360 return 0;360 return 0;
361 361
362#if defined TCC_TARGET_MACHO
363 for (k = 0; k < 3; ++k) { /* 0:rx, 1:ro, 3:rw sections */
364#else
365 for (k = 0; k < 4; ++k) { /* 0:rx, 1:ro, 2:ro debug , 3:rw sections */362 for (k = 0; k < 4; ++k) { /* 0:rx, 1:ro, 2:ro debug , 3:rw sections */
366#endif
367 n = 0; addr = 0;363 n = 0; addr = 0;
368 for(i = 1; i < s1->nb_sections; i++) {364 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
374 static const char shf[] = {365 static const char shf[] = {
375 SHF_ALLOC|SHF_EXECINSTR, SHF_ALLOC, 0, SHF_ALLOC|SHF_WRITE366 SHF_ALLOC|SHF_EXECINSTR, SHF_ALLOC, 0, SHF_ALLOC|SHF_WRITE
376 };367 };
377 if (k == 2 && s1->do_debug == 0) continue;368 if (k == 2 && s1->do_debug == 0) continue;
378#endif
379 s = s1->sections[i];369 s = s1->sections[i];
380 if (shf[k] != (s->sh_flags & (SHF_ALLOC|SHF_WRITE|SHF_EXECINSTR)))370 if (shf[k] != (s->sh_flags & (SHF_ALLOC|SHF_WRITE|SHF_EXECINSTR)))
381 continue;371 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