diff --git a/cc/androidmk.go b/cc/androidmk.go
index 285a5a7..f446333 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -81,6 +81,7 @@
 func (library *libraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
 	if !library.static() {
 		ctx.subAndroidMk(ret, &library.stripper)
+		ctx.subAndroidMk(ret, &library.relocationPacker)
 	}
 
 	if library.static() {
@@ -181,6 +182,15 @@
 	})
 }
 
+func (packer *relocationPacker) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
+	ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
+		if packer.Properties.PackingRelocations {
+			fmt.Fprintln(w, "LOCAL_PACK_MODULE_RELOCATIONS := true")
+		}
+		return nil
+	})
+}
+
 func (installer *baseInstaller) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
 	ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
 		path := installer.path.RelPathString()
diff --git a/cc/library.go b/cc/library.go
index 5119c90..cc5ff15 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -151,6 +151,7 @@
 
 	flagExporter
 	stripper
+	relocationPacker
 
 	// If we're used as a whole_static_lib, our missing dependencies need
 	// to be given
@@ -177,7 +178,8 @@
 	return append(props,
 		&library.Properties,
 		&library.flagExporter.Properties,
-		&library.stripper.StripProperties)
+		&library.stripper.StripProperties,
+		&library.relocationPacker.Properties)
 }
 
 func (library *libraryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
@@ -289,6 +291,8 @@
 	library.baseInstaller.location = location
 
 	library.baseLinker.linkerInit(ctx)
+
+	library.relocationPacker.packingInit(ctx)
 }
 
 func (library *libraryDecorator) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
@@ -386,6 +390,12 @@
 
 	builderFlags := flagsToBuilderFlags(flags)
 
+	if library.relocationPacker.needsPacking(ctx) {
+		packedOutputFile := outputFile
+		outputFile = android.PathForModuleOut(ctx, "unpacked", fileName)
+		library.relocationPacker.pack(ctx, outputFile, packedOutputFile, builderFlags)
+	}
+
 	if library.stripper.needsStrip(ctx) {
 		strippedOutputFile := outputFile
 		outputFile = android.PathForModuleOut(ctx, "unstripped", fileName)
diff --git a/cc/relocation_packer.go b/cc/relocation_packer.go
new file mode 100644
index 0000000..c509f31
--- /dev/null
+++ b/cc/relocation_packer.go
@@ -0,0 +1,84 @@
+// Copyright 2016 Google Inc. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package cc
+
+import (
+	"runtime"
+
+	"github.com/google/blueprint"
+
+	"android/soong/android"
+)
+
+func init() {
+	pctx.SourcePathVariable("relocationPackerCmd", "prebuilts/misc/${config.HostPrebuiltTag}/relocation_packer/relocation_packer")
+}
+
+var relocationPackerRule = pctx.AndroidStaticRule("packRelocations",
+	blueprint.RuleParams{
+		Command:     "rm -f $out && cp $in $out && $relocationPackerCmd $out",
+		CommandDeps: []string{"$relocationPackerCmd"},
+		Description: "pack relocations $out",
+	})
+
+type RelocationPackerProperties struct {
+	Pack_relocations *bool `android:"arch_variant"`
+
+	// This will be true even if we're embedded in Make, in which case
+	// we'll defer to make to actually do the packing.
+	PackingRelocations bool `blueprint:"mutated"`
+}
+
+type relocationPacker struct {
+	Properties RelocationPackerProperties
+}
+
+func (p *relocationPacker) packingInit(ctx BaseModuleContext) {
+	enabled := true
+	// Relocation packer isn't available on Darwin yet
+	if runtime.GOOS == "darwin" {
+		enabled = false
+	}
+	if ctx.Target().Os != android.Android {
+		enabled = false
+	}
+	if ctx.AConfig().Getenv("DISABLE_RELOCATION_PACKER") == "true" {
+		enabled = false
+	}
+	if ctx.sdk() {
+		enabled = false
+	}
+	if p.Properties.Pack_relocations != nil &&
+		*p.Properties.Pack_relocations == false {
+		enabled = false
+	}
+
+	p.Properties.PackingRelocations = enabled
+}
+
+func (p *relocationPacker) needsPacking(ctx ModuleContext) bool {
+	if ctx.AConfig().EmbeddedInMake() {
+		return false
+	}
+	return p.Properties.PackingRelocations
+}
+
+func (p *relocationPacker) pack(ctx ModuleContext, in, out android.ModuleOutPath, flags builderFlags) {
+	ctx.ModuleBuild(pctx, android.ModuleBuildParams{
+		Rule:   relocationPackerRule,
+		Output: out,
+		Input:  in,
+	})
+}
