Skip to content

Commit

Permalink
Specify -z notext on linux-musl-x86 and riscv64 (#83682)
Browse files Browse the repository at this point in the history
* Specify -z notext on linux-musl-x86

* Fix riscv64 build with clang/lld v15+

* Inline visibility attribute

* Fix gcc build
  • Loading branch information
am11 authored Apr 25, 2023
1 parent 12b041b commit 9f07f65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ if(CLR_CMAKE_HOST_UNIX)
endif()
endif()

if(CLR_CMAKE_TARGET_LINUX AND CLR_CMAKE_TARGET_ARCH_I386)
if(CLR_CMAKE_TARGET_LINUX AND (CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_RISCV64))
add_linker_flag(-Wl,-z,notext)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/exceptionhandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5857,7 +5857,7 @@ struct _Unwind_Exception;
// This is a personality routine for TheUMEntryPrestub and UMThunkStub Unix asm stubs.
// An exception propagating through these stubs is an unhandled exception.
// This function dumps managed stack trace and terminates the current process.
EXTERN_C _Unwind_Reason_Code
EXTERN_C __attribute__((visibility("default"))) _Unwind_Reason_Code
UnhandledExceptionHandlerUnix(
IN int version,
IN _Unwind_Action action,
Expand Down

0 comments on commit 9f07f65

Please sign in to comment.