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 {