Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,18 @@ private void EmitObject(string objectFilePath, IReadOnlyCollection<DependencyNod
n.Offset == 0 && isMethod ? nodeContents.Data.Length : 0);
if (_nodeFactory.GetSymbolAlternateName(n) is string alternateName)
{
string alternateCName = ExternCName(alternateName);
sectionWriter.EmitSymbolDefinition(
ExternCName(alternateName),
alternateCName,
n.Offset + thumbBit,
n.Offset == 0 && isMethod ? nodeContents.Data.Length : 0,
global: true);

if (n is IMethodNode)
{
// https://github.com/dotnet/runtime/issues/105330: consider exports CFG targets
EmitReferencedMethod(alternateCName);
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/tests/nativeaot/SmokeTests/SharedLibrary/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
project (SharedLibrary)
include_directories(${INC_PLATFORM_DIR})

# Regression test for https://github.com/dotnet/runtime/issues/105330, enable CFG on the EXE
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /guard:cf")

add_executable (SharedLibraryDriver SharedLibrary.cpp)

if (CLR_CMAKE_TARGET_UNIX)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<NativeLib>Shared</NativeLib>
<!-- Unable to compile a project with the Library output type for apple mobile devices -->
<CLRTestTargetUnsupported Condition="'$(TargetsAppleMobile)' == 'true'">true</CLRTestTargetUnsupported>

<!-- Regression test for https://github.com/dotnet/runtime/issues/105330: make sure the UnmanagedCallersOnly are completely unreferenced,
not even from stack trace mapping data -->
<StackTraceSupport>false</StackTraceSupport>
</PropertyGroup>

<PropertyGroup>
Expand Down