Skip to content

Commit 9f07f65

Browse files
authored
Specify -z notext on linux-musl-x86 and riscv64 (#83682)
* Specify -z notext on linux-musl-x86 * Fix riscv64 build with clang/lld v15+ * Inline visibility attribute * Fix gcc build
1 parent 12b041b commit 9f07f65

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/coreclr/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ if(CLR_CMAKE_HOST_UNIX)
109109
endif()
110110
endif()
111111

112-
if(CLR_CMAKE_TARGET_LINUX AND CLR_CMAKE_TARGET_ARCH_I386)
112+
if(CLR_CMAKE_TARGET_LINUX AND (CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_RISCV64))
113113
add_linker_flag(-Wl,-z,notext)
114114
endif()
115115

src/coreclr/vm/exceptionhandling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5857,7 +5857,7 @@ struct _Unwind_Exception;
58575857
// This is a personality routine for TheUMEntryPrestub and UMThunkStub Unix asm stubs.
58585858
// An exception propagating through these stubs is an unhandled exception.
58595859
// This function dumps managed stack trace and terminates the current process.
5860-
EXTERN_C _Unwind_Reason_Code
5860+
EXTERN_C __attribute__((visibility("default"))) _Unwind_Reason_Code
58615861
UnhandledExceptionHandlerUnix(
58625862
IN int version,
58635863
IN _Unwind_Action action,

0 commit comments

Comments
 (0)