Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ca95d4b
Enable NativeAOT osx-arm64 builds
filipnavara Aug 31, 2022
35a40f0
Restrict alignment in VirtualReserveInner
filipnavara Aug 31, 2022
387b31b
Fix generation and handling of compact unwinding info on osx-arm64
filipnavara Aug 31, 2022
50eb6f6
Fix PC check in findFDE in DWARF CFI unwinding
filipnavara Sep 6, 2022
cb81686
Handle MAP_JIT for P/Invoke on osx-arm64
filipnavara Sep 7, 2022
69fd921
Handle P/Invoke with MAP_JIT on osx-arm64
filipnavara Sep 7, 2022
b05ba08
Fix incorrect OS_PAGE_SIZE definition
filipnavara Sep 7, 2022
8742268
Fix TLS register trashing
filipnavara Sep 8, 2022
92a7164
Fix memory trashing caused by incorrect PREPARE_EXTERNAL_VAR_INDIRECT…
filipnavara Sep 8, 2022
6325ba7
Ignore ESRCH in PalHijack (thread is already gone)
filipnavara Sep 8, 2022
125bed7
Make CompactUnwinder_* parametrized with registry class
filipnavara Sep 8, 2022
817b10c
Remove custom CompactUnwinder
filipnavara Sep 8, 2022
f44843f
Update src/coreclr/nativeaot/Runtime/CommonMacros.h
filipnavara Sep 8, 2022
3308493
Update llvm-libunwind-version.txt
filipnavara Sep 8, 2022
8b9d0dc
Fix initial alignment for __module_initializer. ARM64 requires absolu…
filipnavara Sep 9, 2022
9d73bfa
Allow publishing with the osx-arm64 RID
filipnavara Sep 9, 2022
5244049
Use pointer sized alignment for fat function pointers since they cont…
filipnavara Sep 9, 2022
59b79b3
Remove __builtin___clear_cache, it was already fixed
filipnavara Sep 11, 2022
d8c7ee0
Update src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp
jkotas Sep 11, 2022
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
Prev Previous commit
Next Next commit
Use pointer sized alignment for fat function pointers since they cont…
…ain absolute relocations. ld64 seem to silently corrupt them if they are not aligned to pointer size.
  • Loading branch information
filipnavara committed Sep 11, 2022
commit 52440495c30998ba05e29f30c6c92140492ce21f
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
{
var builder = new ObjectDataBuilder(factory, relocsOnly);

// These need to be aligned the same as methods because they show up in same contexts
builder.RequireInitialAlignment(factory.Target.MinimumFunctionAlignment);
// These need to be aligned the same as method pointers because they show up in same contexts
// (macOS ARM64 has even stricter alignment requirement for the linker, so round up to pointer size)
builder.RequireInitialAlignment(factory.Target.PointerSize);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is actually hell to diagnose because it produces no error but causes corruption when linking. If absolute relocation of a symbols is 4-byte aligned and spans between two pages in the executable then only the lower part of the relocation is written correctly into the final executable.

This was the root cause of the intermittent problem I've hit earlier.


builder.AddSymbol(this);

Expand Down