diff --git a/src/Build/NativeSourceProjectBuilder.php b/src/Build/NativeSourceProjectBuilder.php index 76d86c2e..621ade9e 100644 --- a/src/Build/NativeSourceProjectBuilder.php +++ b/src/Build/NativeSourceProjectBuilder.php @@ -414,10 +414,8 @@ final class NativeSourceProjectBuilder } $nm = $this->resolveExecutable('nm'); - $auditor->assertUndefinedSymbols( - $project->target, - $this->runCapture([$nm, '-u', ...$objects], dirname($project->file)), - ); + /* Native objects may deliberately provide an OS ABI to one another. + * The linked artifact is the actual host-capability boundary. */ $auditor->assertUndefinedSymbols( $project->target, $this->runCapture( diff --git a/src/Translator.php b/src/Translator.php index 5391b368..16f0fc48 100644 --- a/src/Translator.php +++ b/src/Translator.php @@ -2297,10 +2297,9 @@ CODE; ); return; } - $auditor->assertUndefinedSymbols( - 'native', - $this->captureNativeCommand(['nm', '-u', ...$objectFiles]), - ); + /* Native objects may deliberately provide an OS ABI to one another + * (for example a freestanding syscall shim). Only unresolved imports + * in the final ELF cross the host-capability boundary. */ $auditor->assertUndefinedSymbols( 'native', $this->captureNativeCommand(['nm', '-u', $targetFile]),