arm64-to-sim
arm64-to-sim copied to clipboard
Handle when "build_version_command.ntools!=0"
Background
Previous implementation was not supporting for case when build_version_command.ntools != 0
because ntools was hardcoded to 0.
Changes Based on how MachO files are loaded in dyld (attached below)
case LC_BUILD_VERSION:
if ( cmd->cmdsize != (sizeof(build_version_command) + ((build_version_command*)cmd)->ntools * sizeof(build_tool_version)) )
diag.error("LC_BUILD_VERSION load command size wrong");
else if ( hasMinVersion )
diag.error("LC_BUILD_VERSION cannot coexist LC_VERSION_MIN_* with load commands");
break;
Add a similar logic into function updateVersionMin.
@bogo Can you review my change? I am adding a handling of a case when ntools != 0
hey @yongjincho92! so sorry, this completely fell off my plate for a bit. I just merged #18 from @hdooley that was targeting a similar problem, in which ntools
was being overwritten - does this solve your problem?
@bogo thanks for the fix!