Use relocation-packer style relocation packing between 23 and 28.
Bug: http://b/147452927
Test: treehugger
Change-Id: I8197dcb7884993d75775eaea667981d7822d6d1d
diff --git a/cc/linker.go b/cc/linker.go
index c2b4a3a..e74d9ad 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -362,6 +362,8 @@
flags.Global.LdFlags = append(flags.Global.LdFlags,
"-Wl,--pack-dyn-relocs=android+relr",
"-Wl,--use-android-relr-tags")
+ } else if CheckSdkVersionAtLeast(ctx, 23) {
+ flags.Global.LdFlags = append(flags.Global.LdFlags, "-Wl,--pack-dyn-relocs=android")
}
}
} else {