mirror of
https://github.com/darlinghq/cctools-port.git
synced 2024-11-23 04:09:48 +00:00
Add arm64e patches from elucubratus
This commit is contained in:
parent
f2890afb8a
commit
7c5dc14232
@ -670,6 +670,9 @@ static const ArchInfo archInfoArray[] = {
|
||||
#endif
|
||||
#if SUPPORT_ARCH_arm64v8
|
||||
{ "arm64v8", CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64_V8, "arm64v8-", "aarch64-", true, false },
|
||||
#endif
|
||||
#if SUPPORT_ARCH_arm64e
|
||||
{ "arm64e", CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64E, "arm64e-", "aarch64-", true, false },
|
||||
#endif
|
||||
{ NULL, 0, 0, NULL, NULL, false, false }
|
||||
};
|
||||
|
@ -11,12 +11,12 @@ else
|
||||
fi
|
||||
|
||||
if [ -z "${RC_SUPPORTED_ARCHS}" ]; then
|
||||
RC_SUPPORTED_ARCHS="i386 x86_64 x86_64h armv6 armv7 armv7s armv7m armv7k arm64"
|
||||
RC_SUPPORTED_ARCHS="i386 x86_64 x86_64h armv6 armv7 armv7s armv7m armv7k arm64 arm64e"
|
||||
fi
|
||||
|
||||
for ANARCH in ${RC_SUPPORTED_ARCHS}
|
||||
do
|
||||
KNOWN_ARCHS=",armv4t,armv5,armv6,armv7,armv7f,armv7k,armv7s,armv6m,armv7m,armv7em,armv8,arm64,arm64v8,i386,x86_64,x86_64h,"
|
||||
KNOWN_ARCHS=",armv4t,armv5,armv6,armv7,armv7f,armv7k,armv7s,armv6m,armv7m,armv7em,armv8,arm64,arm64v8,arm64e,i386,x86_64,x86_64h,"
|
||||
FOUND=`echo "$KNOWN_ARCHS" | grep ",$ANARCH,"`
|
||||
if [ $FOUND ]; then
|
||||
echo "#define SUPPORT_ARCH_$ANARCH 1" >> ${DERIVED_FILE_DIR}/configure.h
|
||||
|
@ -676,7 +676,7 @@ void Options::setArchitecture(cpu_type_t type, cpu_subtype_t subtype, ld::Platfo
|
||||
#endif
|
||||
}
|
||||
#if SUPPORT_ARCH_arm64e
|
||||
if ( (fArchitecture == CPU_TYPE_ARM64) && (fSubArchitecture == CPU_SUBTYPE_ARM64_E) ) {
|
||||
if ( (fArchitecture == CPU_TYPE_ARM64) && (fSubArchitecture == CPU_SUBTYPE_ARM64E) ) {
|
||||
fSupportsAuthenticatedPointers = true;
|
||||
}
|
||||
#endif
|
||||
@ -4838,7 +4838,7 @@ void Options::reconfigureDefaults()
|
||||
break;
|
||||
case Options::kDyld:
|
||||
// arm64e has support for compressed LINKEDIT.
|
||||
if ( (fArchitecture == CPU_TYPE_ARM64) && (fSubArchitecture == CPU_SUBTYPE_ARM64_E) )
|
||||
if ( (fArchitecture == CPU_TYPE_ARM64) && (fSubArchitecture == CPU_SUBTYPE_ARM64E) )
|
||||
break;
|
||||
case Options::kPreload:
|
||||
case Options::kStaticExecutable:
|
||||
@ -4903,7 +4903,7 @@ void Options::reconfigureDefaults()
|
||||
|
||||
if (fArchitecture == CPU_TYPE_ARM64) {
|
||||
#if SUPPORT_ARCH_arm64e
|
||||
if (fSubArchitecture == CPU_SUBTYPE_ARM64_E)
|
||||
if (fSubArchitecture == CPU_SUBTYPE_ARM64E)
|
||||
{
|
||||
// FIXME: Move some of these to arm64
|
||||
fNoLazyBinding = true;
|
||||
@ -4962,7 +4962,7 @@ void Options::reconfigureDefaults()
|
||||
fUseLinkedListBinding = true;
|
||||
fNoLazyBinding = true;
|
||||
#if SUPPORT_ARCH_arm64e
|
||||
if ( (fArchitecture == CPU_TYPE_ARM64) && (fSubArchitecture == CPU_SUBTYPE_ARM64_E) )
|
||||
if ( (fArchitecture == CPU_TYPE_ARM64) && (fSubArchitecture == CPU_SUBTYPE_ARM64E) )
|
||||
fSupportsAuthenticatedPointers = true;
|
||||
#endif
|
||||
break;
|
||||
@ -5361,7 +5361,7 @@ void Options::reconfigureDefaults()
|
||||
}
|
||||
else if ( platforms().minOS(ld::iOS_10_0) ) {
|
||||
#if SUPPORT_ARCH_arm64e
|
||||
if ( (fArchitecture == CPU_TYPE_ARM64) && (fSubArchitecture == CPU_SUBTYPE_ARM64_E) ) {
|
||||
if ( (fArchitecture == CPU_TYPE_ARM64) && (fSubArchitecture == CPU_SUBTYPE_ARM64E) ) {
|
||||
fUnalignedPointerTreatment = Options::kUnalignedPointerError;
|
||||
} else
|
||||
#endif
|
||||
|
@ -1322,7 +1322,7 @@ void doPass(const Options& opts, ld::Internal& state)
|
||||
#if SUPPORT_ARCH_arm64
|
||||
case CPU_TYPE_ARM64:
|
||||
#if SUPPORT_ARCH_arm64e
|
||||
if (opts.subArchitecture() == CPU_SUBTYPE_ARM64_E) {
|
||||
if (opts.subArchitecture() == CPU_SUBTYPE_ARM64E) {
|
||||
doPass<arm64e, true>(opts, state);
|
||||
break;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ ld::Atom* Pass::makeStub(const ld::Atom& target, bool weakImport)
|
||||
#if SUPPORT_ARCH_arm64
|
||||
case CPU_TYPE_ARM64:
|
||||
#if SUPPORT_ARCH_arm64e
|
||||
if ( (_options.subArchitecture() == CPU_SUBTYPE_ARM64_E) && _options.useAuthenticatedStubs() ) {
|
||||
if ( (_options.subArchitecture() == CPU_SUBTYPE_ARM64E) && _options.useAuthenticatedStubs() ) {
|
||||
if ( (_options.outputKind() == Options::kKextBundle) && _options.kextsUseStubs() )
|
||||
return new ld::passes::stubs::arm64e::NonLazyStubAtom(*this, target, weakImport);
|
||||
else if ( usingCompressedLINKEDIT() && !forLazyDylib && _options.noLazyBinding() && !stubToResolver )
|
||||
|
Loading…
Reference in New Issue
Block a user