diff --git a/cc/linker.go b/cc/linker.go index 3e4426996..5a16cbdea 100644 --- a/cc/linker.go +++ b/cc/linker.go @@ -367,6 +367,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 {