diff --git a/cc/binary.go b/cc/binary.go
index 60ef2ce..51e68fc 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -417,6 +417,10 @@
 	return binary.symlinks
 }
 
+func (binary *binaryDecorator) nativeCoverage() bool {
+	return true
+}
+
 // /system/bin/linker -> /apex/com.android.runtime/bin/linker
 func (binary *binaryDecorator) installSymlinkToRuntimeApex(ctx ModuleContext, file android.Path) {
 	dir := binary.baseInstaller.installDir(ctx)
diff --git a/cc/cc.go b/cc/cc.go
index a7f1417..f5a1567 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -267,6 +267,7 @@
 	isStubs() bool
 	bootstrap() bool
 	mustUseVendorVariant() bool
+	nativeCoverage() bool
 }
 
 type ModuleContext interface {
@@ -312,6 +313,8 @@
 	link(ctx ModuleContext, flags Flags, deps PathDeps, objs Objects) android.Path
 	appendLdflags([]string)
 	unstrippedOutputFilePath() android.Path
+
+	nativeCoverage() bool
 }
 
 type installer interface {
@@ -604,6 +607,10 @@
 	return Bool(c.Properties.Bootstrap)
 }
 
+func (c *Module) nativeCoverage() bool {
+	return c.linker != nil && c.linker.nativeCoverage()
+}
+
 func isBionic(name string) bool {
 	switch name {
 	case "libc", "libm", "libdl", "linker":
@@ -794,6 +801,10 @@
 	return ctx.mod.bootstrap()
 }
 
+func (ctx *moduleContextImpl) nativeCoverage() bool {
+	return ctx.mod.nativeCoverage()
+}
+
 func newBaseModule(hod android.HostOrDeviceSupported, multilib android.Multilib) *Module {
 	return &Module{
 		hod:      hod,
diff --git a/cc/coverage.go b/cc/coverage.go
index fabcbf4..9dc7f06 100644
--- a/cc/coverage.go
+++ b/cc/coverage.go
@@ -42,6 +42,23 @@
 }
 
 func (cov *coverage) deps(ctx BaseModuleContext, deps Deps) Deps {
+	if cov.Properties.NeedCoverageBuild {
+		// Link libprofile-extras/libprofile-extras_ndk when coverage
+		// variant is required.  This is a no-op unless coverage is
+		// actually enabled during linking, when
+		// '-uinit_profile_extras' is added (in flags()) to force the
+		// setup code in libprofile-extras be linked into the
+		// binary/library.
+		//
+		// We cannot narrow it further to only the 'cov' variant since
+		// the mutator hasn't run (and we don't have the 'cov' variant
+		// yet).
+		if !ctx.useSdk() {
+			deps.LateStaticLibs = append(deps.LateStaticLibs, "libprofile-extras")
+		} else {
+			deps.LateStaticLibs = append(deps.LateStaticLibs, "libprofile-extras_ndk")
+		}
+	}
 	return deps
 }
 
@@ -96,6 +113,9 @@
 
 	if cov.linkCoverage {
 		flags.LdFlags = append(flags.LdFlags, "--coverage")
+
+		// Force linking of constructor/setup code in libprofile-extras
+		flags.LdFlags = append(flags.LdFlags, "-uinit_profile_extras")
 	}
 
 	return flags
@@ -113,10 +133,8 @@
 	if ctx.Host() {
 		// TODO(dwillemsen): because of -nodefaultlibs, we must depend on libclang_rt.profile-*.a
 		// Just turn off for now.
-	} else if ctx.isStubs() {
-		// Do not enable coverage for platform stub libraries
-	} else if ctx.isNDKStubLibrary() {
-		// Do not enable coverage for NDK stub libraries
+	} else if !ctx.nativeCoverage() {
+		// Native coverage is not supported for this module type.
 	} else {
 		// Check if Native_coverage is set to false.  This property defaults to true.
 		needCoverageVariant = BoolDefault(cov.Properties.Native_coverage, true)
diff --git a/cc/library.go b/cc/library.go
index bb2e1df..cab75ac 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -761,6 +761,13 @@
 	return library.unstrippedOutputFile
 }
 
+func (library *libraryDecorator) nativeCoverage() bool {
+	if library.header() || library.buildStubs() {
+		return false
+	}
+	return true
+}
+
 func getRefAbiDumpFile(ctx ModuleContext, vndkVersion, fileName string) android.Path {
 	isLlndk := inList(ctx.baseModuleName(), llndkLibraries) || inList(ctx.baseModuleName(), ndkMigratedLibs)
 
diff --git a/cc/llndk_library.go b/cc/llndk_library.go
index cdd2c48..5a36b7f 100644
--- a/cc/llndk_library.go
+++ b/cc/llndk_library.go
@@ -161,6 +161,10 @@
 	return stub.libraryDecorator.link(ctx, flags, deps, objs)
 }
 
+func (stub *llndkStubDecorator) nativeCoverage() bool {
+	return false
+}
+
 func NewLLndkStubLibrary() *Module {
 	module, library := NewLibrary(android.DeviceSupported)
 	library.BuildOnlyShared()
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index 3ae4452..7199467 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -338,6 +338,10 @@
 	return stub.libraryDecorator.link(ctx, flags, deps, objs)
 }
 
+func (stub *stubDecorator) nativeCoverage() bool {
+	return false
+}
+
 func (stub *stubDecorator) install(ctx ModuleContext, path android.Path) {
 	arch := ctx.Target().Arch.ArchType.Name
 	apiLevel := stub.properties.ApiLevel
diff --git a/cc/object.go b/cc/object.go
index c9ca07a..50ecc38 100644
--- a/cc/object.go
+++ b/cc/object.go
@@ -114,3 +114,7 @@
 func (object *objectLinker) unstrippedOutputFilePath() android.Path {
 	return nil
 }
+
+func (object *objectLinker) nativeCoverage() bool {
+	return true
+}
diff --git a/cc/prebuilt.go b/cc/prebuilt.go
index 4c893d4..966ec36 100644
--- a/cc/prebuilt.go
+++ b/cc/prebuilt.go
@@ -108,6 +108,10 @@
 	return p.libraryDecorator.shared()
 }
 
+func (p *prebuiltLibraryLinker) nativeCoverage() bool {
+	return false
+}
+
 func prebuiltSharedLibraryFactory() android.Module {
 	module, _ := NewPrebuiltSharedLibrary(android.HostAndDeviceSupported)
 	return module.Init()
diff --git a/cc/toolchain_library.go b/cc/toolchain_library.go
index 5811b01..ae08b1c 100644
--- a/cc/toolchain_library.go
+++ b/cc/toolchain_library.go
@@ -77,3 +77,7 @@
 
 	return android.PathForSource(ctx, *library.Properties.Src)
 }
+
+func (library *toolchainLibraryDecorator) nativeCoverage() bool {
+	return false
+}
