Unified · Split
| @@ -17,6 +17,20 @@ · 16 unmodified lines | ||
| 17 | 17 | */ |
| 18 | 18 | #include "tcc.h" |
| 19 | 19 | |
| 20 | +/* In order to make life easy for us we are generating Mach-O files which | |
| 21 | + don't make use of some modern features, but which aren't entirely classic | |
| 22 | + either in that they do use some modern features. We're also only | |
| 23 | + generating 64bit Mach-O files, and only native endian at that. | |
| 24 | + | |
| 25 | + In particular we're generating executables that don't make use of | |
| 26 | + DYLD_INFO for dynamic linking info, as that requires us building a | |
| 27 | + trie of exported names. We're simply using classic symbol tables which | |
| 28 | + are still supported by modern dyld. | |
| 29 | + | |
| 30 | + But we do use LC_MAIN, which is a "modern" feature in order to not have | |
| 31 | + to setup our own crt code. We're not using lazy linking, so even function | |
| 32 | + calls are resolved at startup. */ | |
| 33 | + | |
| 20 | 34 | #define DEBUG_MACHO 0 |
| 21 | 35 | #define dprintf if (DEBUG_MACHO) printf |
| 22 | 36 | |