Skip to content

Conversation

@rjmansfield
Copy link
Contributor

This includes an update to the Darwin XNU/Mach-O headers, as well as scripts and docs to reproduce the changes and updates to the headers.

Updates third_party/darwin_xnu_macho headers to latest versions from
Apple open source repositories:

- mach-o headers from cctools (include/mach-o/)
- mach headers from XNU (osfmk/mach/)

Fixes google#438
fully reproducible.

Usage:
  # To update headers to versions specified in METADATA:
  python3 update_headers.py

  # To regenerate patches after manual modifications:
  python3 generate_patches.py

Current patches:
 - mach_machine.h.patch: Adds __has_include() guards and fallback typedefs
 - mach-o_loader.h.patch: Uses bundled header instead of system header

Fixes google#438
@EricRahm
Copy link
Collaborator

Thanks! Taking a look at this today, I'm going to start with reproducing your changes locally.

Copy link
Collaborator

@EricRahm EricRahm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for taking the time to add detailed documentation including the upgrade scripts, this made reviewing much easier and will make future upgrades easier as well. Locally I reproduced the same set of changes using the update_headers.py script.

@EricRahm EricRahm merged commit 6788d17 into google:main Nov 19, 2025
9 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants