Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NativeAOT/ARM] undefined symbol: NYI_Assert #97748

Closed
Tracked by #97729
filipnavara opened this issue Jan 31, 2024 · 4 comments · Fixed by #97755
Closed
Tracked by #97729

[NativeAOT/ARM] undefined symbol: NYI_Assert #97748

filipnavara opened this issue Jan 31, 2024 · 4 comments · Fixed by #97755

Comments

@filipnavara
Copy link
Member

Observed when compiling library tests:

ld.lld : error : undefined symbol: NYI_Assert [/home/navara/runtime/src/libraries/Common/tests/Common.Tests.csproj::TargetFramework=net9.0-linux]
  >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__BeginRead)
  >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__EndRead)
  >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__BeginWrite)
  >>> referenced 1 more times
clang-17 : error : linker command failed with exit code 1 (use -v to see invocation) [/home/navara/runtime/src/libraries/Common/tests/Common.Tests.csproj::TargetFramework=net9.0-linux]
@ghost
Copy link

ghost commented Jan 31, 2024

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Observed when compiling library tests:

ld.lld : error : undefined symbol: NYI_Assert [/home/navara/runtime/src/libraries/Common/tests/Common.Tests.csproj::TargetFramework=net9.0-linux]
  >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__BeginRead)
  >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__EndRead)
  >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__BeginWrite)
  >>> referenced 1 more times
clang-17 : error : linker command failed with exit code 1 (use -v to see invocation) [/home/navara/runtime/src/libraries/Common/tests/Common.Tests.csproj::TargetFramework=net9.0-linux]
Author: filipnavara
Assignees: -
Labels:

arch-arm32, area-NativeAOT-coreclr

Milestone: -

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jan 31, 2024
@filipnavara
Copy link
Member Author

This is likely the same issue as #97749

@MichalStrehovsky
Copy link
Member

ARMDebug.EmitHelperNYIAssert(factory, ref encoder, ReadyToRunHelperId.ResolveVirtualFunction);
/*
***
NOT TESTED!!!
***
MethodDesc targetMethod = (MethodDesc)Target;
if (targetMethod.OwningType.IsInterface)
{
encoder.EmitMOV(encoder.TargetRegister.Arg1, factory.InterfaceDispatchCell(targetMethod));
encoder.EmitJMP(factory.ExternSymbol("RhpResolveInterfaceMethod"));
}
else
{
if (relocsOnly)
break;
encoder.EmitLDR(encoder.TargetRegister.Result, encoder.TargetRegister.Arg0);
Debug.Assert(!targetMethod.CanMethodBeInSealedVTable());
int slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, targetMethod, targetMethod.OwningType);
Debug.Assert(slot != -1);
encoder.EmitLDR(encoder.TargetRegister.Result, encoder.TargetRegister.Result,
((short)(EETypeNode.GetVTableOffset(factory.Target.PointerSize) + (slot * factory.Target.PointerSize))));
encoder.EmitRET();
}
*/

@filipnavara
Copy link
Member Author

Yep, thanks, I have implemented it already. PR coming as soon as I test it.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 31, 2024
@ghost ghost removed in-pr There is an active PR which will close this issue when it is merged untriaged New issue has not been triaged by the area owner labels Jan 31, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants