bug#41994: Emacs on Apple ARM devices

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

bug#41994: Emacs on Apple ARM devices

Roland Kaufmann
Code generation on Apple's ARM devices is mostly similar to MacOS,
except that they expect a code signature section, which to avoid
wasting too many bytes, are not aligned on page size as with code,
but rather to nearest 16 bytes. In addition, the ARM compiler will
also emit some relative pointer relocation records, which it seems
can be safely ignored as sections aren't rearranged.

This changeset implements those changes on the Mach-O dumper so
that Emacs can be compiled for ARM devices. With the ongoing
convergence between the MacOS and iOS platform, and the increasing
importance of code-signing in later MacOS versions, I think it
could be nice to mainline these changes.

Since these sections do not occur in current MacOS builds -
otherwise they would generate errors for being unknown - the
changes should not impact existing places where Emacs build, and
it would not work on iOS without to begin with.

Hat tip to Aaron Griffith for sharing his knowledge.


--
Sincerely,

Roland Kaufmann







0001-Let-us-know-unknown-number-being-complained-about.patch (750 bytes) Download Attachment
0002-Make-function-generally-available-for-sections.patch (1017 bytes) Download Attachment
0003-Allow-padding-of-sections-to-other-than-page-size.patch (1K) Download Attachment
0004-Output-code-signature-sections-align-on-16-bytes.patch (1K) Download Attachment
0005-Make-relocation-of-relative-pointers-a-no-op.patch (960 bytes) Download Attachment
0006-Allow-build-configuration-on-Apple-ARM-devices.patch (735 bytes) Download Attachment