From bbe6d9ccc63b682ba7fa606b5c087581cd905c13 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Fri, 17 Apr 2026 20:45:29 +0000 Subject: [PATCH 1/2] fno-unwind-tables --- Tools/jit/_stencils.py | 1 + Tools/jit/_targets.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/jit/_stencils.py b/Tools/jit/_stencils.py index e2ae3d988fc7ac..aab5e52ccea572 100644 --- a/Tools/jit/_stencils.py +++ b/Tools/jit/_stencils.py @@ -90,6 +90,7 @@ class HoleValue(enum.Enum): "R_AARCH64_MOVW_UABS_G1_NC": "patch_aarch64_16b", "R_AARCH64_MOVW_UABS_G2_NC": "patch_aarch64_16c", "R_AARCH64_MOVW_UABS_G3": "patch_aarch64_16d", + "R_AARCH64_PREL32": "patch_32r", # x86_64-unknown-linux-gnu: "R_X86_64_64": "patch_64", "R_X86_64_GOTPCRELX": "patch_x86_64_32rx", diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py index fd5c143b8a812f..d68a4ede70cdc6 100644 --- a/Tools/jit/_targets.py +++ b/Tools/jit/_targets.py @@ -166,7 +166,7 @@ async def _compile( # This debug info isn't necessary, and bloats out the JIT'ed code. # We *may* be able to re-enable this, process it, and JIT it for a # nicer debugging experience... but that needs a lot more research: - "-fno-asynchronous-unwind-tables", + "-fno-unwind-tables", # Don't call built-in functions that we can't find or patch: "-fno-builtin", # Don't call stack-smashing canaries that we can't find or patch: @@ -435,6 +435,7 @@ def _handle_section( "SHT_NULL", "SHT_STRTAB", "SHT_SYMTAB", + "SHT_X86_64_UNWIND", }, section_type def _handle_relocation( From 26dcb740a60a193edc57a8a73c2bda390c0701a2 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Fri, 17 Apr 2026 21:23:53 +0000 Subject: [PATCH 2/2] Try both flags --- Tools/jit/_stencils.py | 1 - Tools/jit/_targets.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Tools/jit/_stencils.py b/Tools/jit/_stencils.py index aab5e52ccea572..e2ae3d988fc7ac 100644 --- a/Tools/jit/_stencils.py +++ b/Tools/jit/_stencils.py @@ -90,7 +90,6 @@ class HoleValue(enum.Enum): "R_AARCH64_MOVW_UABS_G1_NC": "patch_aarch64_16b", "R_AARCH64_MOVW_UABS_G2_NC": "patch_aarch64_16c", "R_AARCH64_MOVW_UABS_G3": "patch_aarch64_16d", - "R_AARCH64_PREL32": "patch_32r", # x86_64-unknown-linux-gnu: "R_X86_64_64": "patch_64", "R_X86_64_GOTPCRELX": "patch_x86_64_32rx", diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py index d68a4ede70cdc6..74109a8564c470 100644 --- a/Tools/jit/_targets.py +++ b/Tools/jit/_targets.py @@ -166,6 +166,7 @@ async def _compile( # This debug info isn't necessary, and bloats out the JIT'ed code. # We *may* be able to re-enable this, process it, and JIT it for a # nicer debugging experience... but that needs a lot more research: + "-fno-asynchronous-unwind-tables", "-fno-unwind-tables", # Don't call built-in functions that we can't find or patch: "-fno-builtin", @@ -435,7 +436,6 @@ def _handle_section( "SHT_NULL", "SHT_STRTAB", "SHT_SYMTAB", - "SHT_X86_64_UNWIND", }, section_type def _handle_relocation(