History

Old macho format does not work with previous push

herman ten brugge committed 3 years ago

Commit 14e78d71 parent b7356bb1 file · +7 −0Browse files

Unified · Split

tccmacho.c+7−0
@@ -1714,8 +1714,15 @@ static void collect_sections(TCCState *s1, struct macho *mo) · 1713 unmodified lines
17141714 for (sk = sk_unknown; sk < sk_last; sk++) {
17151715 struct section_64 *sec = NULL;
17161716 if (seg) {
1717+#ifdef CONFIG_NEW_MACHO
17171718 seg->vmsize = curaddr - seg->vmaddr;
17181719 seg->filesize = fileofs - seg->fileoff;
1720+#else
1721+ seg->vmsize = (curaddr - seg->vmaddr + SEG_PAGE_SIZE - 1) & -SEG_PAGE_SIZE;
1722+ seg->filesize = (fileofs - seg->fileoff + SEG_PAGE_SIZE - 1) & -SEG_PAGE_SIZE;
1723+ curaddr = seg->vmaddr + seg->vmsize;
1724+ fileofs = seg->fileoff + seg->filesize;
1725+#endif
17191726 }
17201727 #ifdef CONFIG_NEW_MACHO
17211728 if (sk == sk_linkedit) {

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