arm64 support very broken
-
NavilleZhang
- Posts: 19
- Joined: Fri May 27, 2022 6:23 am
arm64 support very broken
Literally trying to protect any fat macho on my computer results in ``Runtime Error at OpenResource``
Trying to protect a thin arm64 macho results in ``Not enough space for the new segment in the file header``
Trying to protect a thin arm64 macho results in ``Not enough space for the new segment in the file header``
Last edited by NavilleZhang on Fri Sep 19, 2025 8:04 am, edited 1 time in total.
-
NavilleZhang
- Posts: 19
- Joined: Fri May 27, 2022 6:23 am
Re: arm64 support very broken for MachO
on AArch64 Linux ELF so, vmp just crashes right at "saving startup code"
Re: arm64 support very broken
Send us examples (original binaries + VMP files) that show your problems.
-
NavilleZhang
- Posts: 19
- Joined: Fri May 27, 2022 6:23 am
Re: arm64 support very broken
emailed samples to info@vmpsoft.com
Re: arm64 support very broken for MachO
It seems you tried to protect library for Android that isn't supported by VMProtect.NavilleZhang wrote: ↑Fri Sep 19, 2025 8:04 am on AArch64 Linux ELF so, vmp just crashes right at "saving startup code"
Try to use "-headerpad 0x500" for ld to increase the header size.NavilleZhang wrote: ↑Fri Sep 19, 2025 8:00 am Trying to protect a thin arm64 macho results in ``Not enough space for the new segment in the file header``
Fixed in the 2426 build.NavilleZhang wrote: ↑Fri Sep 19, 2025 8:00 am Literally trying to protect any fat macho on my computer results in ``Runtime Error at OpenResource``
-
NavilleZhang
- Posts: 19
- Joined: Fri May 27, 2022 6:23 am
Re: arm64 support very broken
Thank you!
Is there any plan to:
- Support Android Dynamic Library
- Emit that ``headerpad`` fix suggestion along with the error message so I dont have to remember it?
FYI I havn't received 2426 yet
Is there any plan to:
- Support Android Dynamic Library
- Emit that ``headerpad`` fix suggestion along with the error message so I dont have to remember it?
FYI I havn't received 2426 yet
-
NavilleZhang
- Posts: 19
- Joined: Fri May 27, 2022 6:23 am
Re: arm64 support very broken
Also, compiling with:
-Wl,-headerpad_max_install_names -Xlinker -headerpad -Xlinker 0x500
seems to yield the exact same error
-Wl,-headerpad_max_install_names -Xlinker -headerpad -Xlinker 0x500
seems to yield the exact same error
Re: arm64 support very broken
Do you see any difference (the file size was changed, etc.) in your binary after usage of "-headerpad"?
P.S. The answer from Google's AI:
P.S. The answer from Google's AI:
The -headerpad flag in Xcode is a linker flag used to add padding to the header of a Mach-O executable or dynamic library. This padding is primarily used to reserve space for future modifications to the dylib ID or loaded dylib paths without requiring a full re-linking of the binary.
How to use -headerpad in Xcode:
Select your Project or Target: In the Xcode Project Navigator, select your project or the specific target you want to apply the flag to.
Navigate to Build Settings: In the main editor area, select the "Build Settings" tab.
Find "Other Linker Flags": Search for "Other Linker Flags" (or OTHER_LDFLAGS) within the Build Settings.
Add the Flag:
Double-click the value area next to "Other Linker Flags."
Click the "+" button to add a new flag.
Enter -headerpad into the new entry.
You can also specify a value for the padding, for example, -headerpad 0x1000 to add 4KB of padding. If no value is specified, the linker will use a default padding size.
-
NavilleZhang
- Posts: 19
- Joined: Fri May 27, 2022 6:23 am
Re: arm64 support very broken
My project uses CMake, that implicitly injects ``-headerpad_max_***`` (see https://github.com/Kitware/CMake/blob/c ... .cmake#L10 ) and ld64 ignore my -headerpad 0x500 .
I had to manually remove that CMake command, and raise the custom headpad to 0x4096 for this to work.
The problem is, modifying CMake itself is non-trivial and complicate the process by **A LOT**
I had to manually remove that CMake command, and raise the custom headpad to 0x4096 for this to work.
The problem is, modifying CMake itself is non-trivial and complicate the process by **A LOT**
-
NavilleZhang
- Posts: 19
- Joined: Fri May 27, 2022 6:23 am
Re: arm64 support very broken
I believe Clang allows you to inject custom sections using source level annotations? Can we support using that feature to reserve the load command that VMP needs so we don't need all this trouble?
Re: arm64 support very broken
Here is an example:
clang++ ... -Wl,-headerpad,0x1000
I have no idea how to pass these parameters from sources.
P.S. The topic is closed.