diff --git a/cc/cc.go b/cc/cc.go
index a877f47..18bffb5 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -46,9 +46,9 @@
 var CcMakeVarsInfoProvider = blueprint.NewProvider[*CcMakeVarsInfo]()
 
 type CcObjectInfo struct {
-	objFiles   android.Paths
-	tidyFiles  android.Paths
-	kytheFiles android.Paths
+	ObjFiles   android.Paths
+	TidyFiles  android.Paths
+	KytheFiles android.Paths
 }
 
 var CcObjectInfoProvider = blueprint.NewProvider[CcObjectInfo]()
@@ -73,13 +73,14 @@
 }
 
 type LinkerInfo struct {
-	Whole_static_libs proptools.Configurable[[]string]
+	WholeStaticLibs proptools.Configurable[[]string]
 	// list of modules that should be statically linked into this module.
-	Static_libs proptools.Configurable[[]string]
+	StaticLibs proptools.Configurable[[]string]
 	// list of modules that should be dynamically linked into this module.
-	Shared_libs proptools.Configurable[[]string]
+	SharedLibs proptools.Configurable[[]string]
 	// list of modules that should only provide headers for this module.
-	Header_libs proptools.Configurable[[]string]
+	HeaderLibs           proptools.Configurable[[]string]
+	UnstrippedOutputFile android.Path
 
 	BinaryDecoratorInfo    *BinaryDecoratorInfo
 	LibraryDecoratorInfo   *LibraryDecoratorInfo
@@ -90,7 +91,7 @@
 
 type BinaryDecoratorInfo struct{}
 type LibraryDecoratorInfo struct {
-	Export_include_dirs proptools.Configurable[[]string]
+	ExportIncludeDirs proptools.Configurable[[]string]
 }
 type TestBinaryInfo struct {
 	Gtest bool
@@ -2166,13 +2167,13 @@
 	}
 
 	ccObjectInfo := CcObjectInfo{
-		kytheFiles: objs.kytheFiles,
+		KytheFiles: objs.kytheFiles,
 	}
 	if !ctx.Config().KatiEnabled() || !android.ShouldSkipAndroidMkProcessing(ctx, c) {
-		ccObjectInfo.objFiles = objs.objFiles
-		ccObjectInfo.tidyFiles = objs.tidyFiles
+		ccObjectInfo.ObjFiles = objs.objFiles
+		ccObjectInfo.TidyFiles = objs.tidyFiles
 	}
-	if len(ccObjectInfo.kytheFiles)+len(ccObjectInfo.objFiles)+len(ccObjectInfo.tidyFiles) > 0 {
+	if len(ccObjectInfo.KytheFiles)+len(ccObjectInfo.ObjFiles)+len(ccObjectInfo.TidyFiles) > 0 {
 		android.SetProvider(ctx, CcObjectInfoProvider, ccObjectInfo)
 	}
 
@@ -2199,16 +2200,17 @@
 		switch decorator := c.compiler.(type) {
 		case *libraryDecorator:
 			ccInfo.CompilerInfo.LibraryDecoratorInfo = &LibraryDecoratorInfo{
-				Export_include_dirs: decorator.flagExporter.Properties.Export_include_dirs,
+				ExportIncludeDirs: decorator.flagExporter.Properties.Export_include_dirs,
 			}
 		}
 	}
 	if c.linker != nil {
 		ccInfo.LinkerInfo = &LinkerInfo{
-			Whole_static_libs: c.linker.baseLinkerProps().Whole_static_libs,
-			Static_libs:       c.linker.baseLinkerProps().Static_libs,
-			Shared_libs:       c.linker.baseLinkerProps().Shared_libs,
-			Header_libs:       c.linker.baseLinkerProps().Header_libs,
+			WholeStaticLibs:      c.linker.baseLinkerProps().Whole_static_libs,
+			StaticLibs:           c.linker.baseLinkerProps().Static_libs,
+			SharedLibs:           c.linker.baseLinkerProps().Shared_libs,
+			HeaderLibs:           c.linker.baseLinkerProps().Header_libs,
+			UnstrippedOutputFile: c.UnstrippedOutputFile(),
 		}
 		switch decorator := c.linker.(type) {
 		case *binaryDecorator:
@@ -4080,7 +4082,7 @@
 func (ks *kytheExtractAllSingleton) GenerateBuildActions(ctx android.SingletonContext) {
 	var xrefTargets android.Paths
 	ctx.VisitAllModuleProxies(func(module android.ModuleProxy) {
-		files := android.OtherModuleProviderOrDefault(ctx, module, CcObjectInfoProvider).kytheFiles
+		files := android.OtherModuleProviderOrDefault(ctx, module, CcObjectInfoProvider).KytheFiles
 		if len(files) > 0 {
 			xrefTargets = append(xrefTargets, files...)
 		}
diff --git a/cc/cmake_snapshot.go b/cc/cmake_snapshot.go
index 408aea6..a40b863 100644
--- a/cc/cmake_snapshot.go
+++ b/cc/cmake_snapshot.go
@@ -208,19 +208,19 @@
 			return prop.GetOrDefault(ctx, nil)
 		},
 		"getWholeStaticLibsProperty": func(ctx android.ModuleContext, info *CcInfo) []string {
-			prop := info.LinkerInfo.Whole_static_libs
+			prop := info.LinkerInfo.WholeStaticLibs
 			return prop.GetOrDefault(ctx, nil)
 		},
 		"getStaticLibsProperty": func(ctx android.ModuleContext, info *CcInfo) []string {
-			prop := info.LinkerInfo.Static_libs
+			prop := info.LinkerInfo.StaticLibs
 			return prop.GetOrDefault(ctx, nil)
 		},
 		"getSharedLibsProperty": func(ctx android.ModuleContext, info *CcInfo) []string {
-			prop := info.LinkerInfo.Shared_libs
+			prop := info.LinkerInfo.SharedLibs
 			return prop.GetOrDefault(ctx, nil)
 		},
 		"getHeaderLibsProperty": func(ctx android.ModuleContext, info *CcInfo) []string {
-			prop := info.LinkerInfo.Header_libs
+			prop := info.LinkerInfo.HeaderLibs
 			return prop.GetOrDefault(ctx, nil)
 		},
 		"getExtraLibs":   getExtraLibs,
@@ -552,7 +552,7 @@
 func getIncludeDirs(ctx android.ModuleContext, m android.ModuleProxy, info *CcInfo) []string {
 	moduleDir := ctx.OtherModuleDir(m) + string(filepath.Separator)
 	if info.CompilerInfo.LibraryDecoratorInfo != nil {
-		return sliceWithPrefix(moduleDir, info.CompilerInfo.LibraryDecoratorInfo.Export_include_dirs.GetOrDefault(ctx, nil))
+		return sliceWithPrefix(moduleDir, info.CompilerInfo.LibraryDecoratorInfo.ExportIncludeDirs.GetOrDefault(ctx, nil))
 	}
 	return nil
 }
diff --git a/cc/compiler.go b/cc/compiler.go
index 91f107c..f2bced1 100644
--- a/cc/compiler.go
+++ b/cc/compiler.go
@@ -367,7 +367,7 @@
 	modulePath := ctx.ModuleDir()
 
 	reuseObjs := false
-	if len(ctx.GetDirectDepsWithTag(reuseObjTag)) > 0 {
+	if len(ctx.GetDirectDepsProxyWithTag(reuseObjTag)) > 0 {
 		reuseObjs = true
 	}
 
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index 2411614..197a4b2 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -296,20 +296,20 @@
 }
 
 func (this *stubDecorator) findImplementationLibrary(ctx ModuleContext) android.Path {
-	dep := ctx.GetDirectDepWithTag(strings.TrimSuffix(ctx.ModuleName(), ndkLibrarySuffix),
+	dep := ctx.GetDirectDepProxyWithTag(strings.TrimSuffix(ctx.ModuleName(), ndkLibrarySuffix),
 		stubImplementation)
 	if dep == nil {
-		ctx.ModuleErrorf("Could not find implementation for stub")
+		ctx.ModuleErrorf("Could not find implementation for stub: ")
 		return nil
 	}
-	impl, ok := dep.(*Module)
+	info, ok := android.OtherModuleProvider(ctx, *dep, CcInfoProvider)
 	if !ok {
 		ctx.ModuleErrorf("Implementation for stub is not correct module type")
 		return nil
 	}
-	output := impl.UnstrippedOutputFile()
+	output := info.LinkerInfo.UnstrippedOutputFile
 	if output == nil {
-		ctx.ModuleErrorf("implementation module (%s) has no output", impl)
+		ctx.ModuleErrorf("implementation module (%s) has no output", *dep)
 		return nil
 	}
 
diff --git a/cc/tidy.go b/cc/tidy.go
index 6481b95..18e6f35 100644
--- a/cc/tidy.go
+++ b/cc/tidy.go
@@ -222,8 +222,8 @@
 	ctx.VisitAllModuleVariantProxies(module, func(variant android.ModuleProxy) {
 		osName := android.OtherModuleProviderOrDefault(ctx, variant, android.CommonModuleInfoKey).CompileTarget.Os.Name
 		info := android.OtherModuleProviderOrDefault(ctx, variant, CcObjectInfoProvider)
-		addToOSGroup(osName, info.objFiles, allObjFileGroups, subsetObjFileGroups)
-		addToOSGroup(osName, info.tidyFiles, allTidyFileGroups, subsetTidyFileGroups)
+		addToOSGroup(osName, info.ObjFiles, allObjFileGroups, subsetObjFileGroups)
+		addToOSGroup(osName, info.TidyFiles, allTidyFileGroups, subsetTidyFileGroups)
 	})
 
 	// (2) Add an all-OS group, with "" or "subset" name, to include all os-specific phony targets.
