Skip to content

Commit f37e958

Browse files
authored
Merge pull request below#48 from below/AppleWarning
Add a warning about function call numbers
2 parents cbe7332 + b2da01e commit f37e958

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ To silence the warning, I insert `.align 4` (or `.p2align 2`), because Darwin li
7373

7474
System calls in Linux and macOS have several differences due to the unique conventions of each system. Here are some key distinctions:
7575
* Function Number: The function numbers differ between the two systems, with Linux using 64 and macOS using 4. The table for Darwin (Apple) system calls can be found at this link: [Darwin System Calls](https://opensource.apple.com/source/xnu/xnu-7195.81.3/bsd/kern/syscalls.master.auto.html). Please note that this is a specific version (the most recent at the time of writing), and newer versions can be found [here](https://opensource.apple.com/source/xnu/).
76+
> [!CAUTION]
77+
> Darwin function numbers are considered private by Apple, and are subject to change. They are provided here for educational purposes only
7678
* Address for Storing Function Numbers: The address used for storing function numbers also varies. In Linux, it’s on X8, while in macOS, it’s on X16.
7779
* Interruption Call: The call for interruption is 0 in Linux, whereas it’s 0x80 on Apple Silicon.
7880

0 commit comments

Comments
 (0)