diff --git a/core/relinker/relinker/tests/test_tls_function_coverage.py b/core/relinker/relinker/tests/test_tls_function_coverage.py index 3a8cae4dd..d0af236cd 100644 --- a/core/relinker/relinker/tests/test_tls_function_coverage.py +++ b/core/relinker/relinker/tests/test_tls_function_coverage.py @@ -1,5 +1,6 @@ import os from pathlib import Path +import platform import struct import subprocess import sys @@ -9,6 +10,8 @@ from test_optional_plt import fixture TLS_LOAD = bytes.fromhex("66 66 66 64 48 8b 04 25 00 00 00 00") +RUNNER = Path(__file__).with_name("windows_image_runner.py") +RUNS_ON_HOST = sys.platform == "linux" and platform.machine() == "x86_64" def register_load(register): @@ -307,6 +310,10 @@ def main(): if os.name == "nt": executed = subprocess.run([str(output)], capture_output=True, timeout=30) assert executed.returncode == 42, (name, executed.returncode, executed.stderr) + elif RUNS_ON_HOST: + entry = 0x10000 + struct.unpack_from("