Skip to content

Commit a329dd8

Browse files
committed
Change to diagnostics upstream workaround.
dotnet/diagnostics#5791 LLVM 22 is not properly emitting asm files compiled with --noexecstack: llvm/llvm-project#186004
1 parent f493370 commit a329dd8

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ set(FEATURE_EVENT_TRACE 0)
8484
# `add_executable(${ARGV} ${VERSION_FILE_PATH})` to `add_executable(${ARGV})`
8585
# - correct `third_party/diagnostics/src/shared/clrdefinitions.cmake`, comment line `add_custom_target(eventing_headers)`
8686
# since we disable `FEATURE_EVENT_TRACE` and diagnostics don't have `eventing_headers` project in sources
87-
# - correct `third_party/diagnostics/src/shared/pal/src/arch/amd64/debugbreak.S`, add after header lines:
88-
# // Mark this file as not requiring executable stack
89-
# .section .note.GNU-stack,"",@progbits
9087
#
9188
###
9289

‎third_party/diagnostics/src/shared/pal/inc/unixasmmacros.inc‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,10 @@
5757
#elif defined(HOST_POWERPC64)
5858
#include "unixasmmacrosppc64le.inc"
5959
#endif
60+
61+
// Mark the stack as non-executable for ELF targets.
62+
// https://github.com/dotnet/runtime/issues/125469
63+
#if !defined(__APPLE__)
64+
.pushsection .note.GNU-stack,"",%progbits
65+
.popsection
66+
#endif

‎third_party/diagnostics/src/shared/pal/src/arch/amd64/debugbreak.S‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
// Mark this file as not requiring executable stack
5-
.section .note.GNU-stack,"",@progbits
6-
74
.intel_syntax noprefix
85
#include "unixasmmacros.inc"
96

0 commit comments

Comments
 (0)