Skip to content
Draft
Changes from all commits
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
24 changes: 24 additions & 0 deletions src/shared/pal/inc/unixasmmacros.inc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@
.equiv \New, \Old
.endm

// GC type flags
#define GC_ALLOC_FINALIZE 1
#define GC_ALLOC_ALIGN8_BIAS 4
#define GC_ALLOC_ALIGN8 8

#define G_FREE_OBJECT_METHOD_TABLE g_pFreeObjectMethodTable

// Offset of ee_alloc_context relative to INLINE_GET_ALLOC_CONTEXT_BASE.
//
// Since we have a disparity on how thread locals are accessed on various platforms and
// the current value of OFFSETOF__RuntimeThreadLocals__ee_alloc_context is zero we expect
// the helpers to add the OFFSETOF__RuntimeThreadLocals__ee_alloc_context constant to the
// base and set the additional offset to zero.
// In other words, we treat INLINE_GET_ALLOC_CONTEXT_BASE as returning the same value as
// GetThreadEEAllocContext.
#define OFFSETOF__ee_alloc_context 0

#if defined(HOST_X86)
#include "unixasmmacrosx86.inc"
#elif defined(HOST_AMD64)
Expand All @@ -57,3 +74,10 @@
#elif defined(HOST_POWERPC64)
#include "unixasmmacrosppc64le.inc"
#endif

// Mark the stack as non-executable for ELF targets.
// https://github.com/dotnet/runtime/issues/125469
#if !defined(__APPLE__)
.pushsection .note.GNU-stack,"",%progbits
.popsection
#endif