From da909feb95326ce123cdc13c52486fc0d6fcae55 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 28 Jan 2020 13:08:40 -0800 Subject: [PATCH] Use relocation-packer style relocation packing between 23 and 28. Bug: http://b/147452927 Test: treehugger Change-Id: I8197dcb7884993d75775eaea667981d7822d6d1d --- cc/linker.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cc/linker.go b/cc/linker.go index c2b4a3a53..e74d9ad16 100644 --- a/cc/linker.go +++ b/cc/linker.go @@ -362,6 +362,8 @@ func (linker *baseLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags { 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 {