Merge "rust: Emit frame pointers on 64-bit device targets." into main
diff --git a/cc/config/riscv64_device.go b/cc/config/riscv64_device.go
index 40919c0..e048622 100644
--- a/cc/config/riscv64_device.go
+++ b/cc/config/riscv64_device.go
@@ -26,14 +26,14 @@
// Help catch common 32/64-bit errors.
"-Werror=implicit-function-declaration",
"-fno-emulated-tls",
- "-march=rv64gc_zba_zbb_zbs",
+ "-march=rv64gcv_zba_zbb_zbs",
}
riscv64ArchVariantCflags = map[string][]string{}
riscv64Ldflags = []string{
"-Wl,--hash-style=gnu",
- "-march=rv64gc_zba_zbb_zbs",
+ "-march=rv64gcv_zba_zbb_zbs",
}
riscv64Lldflags = append(riscv64Ldflags,
diff --git a/filesystem/avb_add_hash_footer.go b/filesystem/avb_add_hash_footer.go
index f3fecd0..dabbc46 100644
--- a/filesystem/avb_add_hash_footer.go
+++ b/filesystem/avb_add_hash_footer.go
@@ -68,6 +68,9 @@
// List of properties to add to the footer
Props []avbProp
+ // The index used to prevent rollback of the image on device.
+ Rollback_index *int64
+
// Include descriptors from images
Include_descriptors_from_images []string `android:"path,arch_variant"`
}
@@ -128,6 +131,14 @@
addAvbProp(ctx, cmd, prop)
}
+ if a.properties.Rollback_index != nil {
+ rollbackIndex := proptools.Int(a.properties.Rollback_index)
+ if rollbackIndex < 0 {
+ ctx.PropertyErrorf("rollback_index", "Rollback index must be non-negative")
+ }
+ cmd.Flag(fmt.Sprintf(" --rollback_index %x", rollbackIndex))
+ }
+
cmd.FlagWithOutput("--image ", a.output)
builder.Build("avbAddHashFooter", fmt.Sprintf("avbAddHashFooter %s", ctx.ModuleName()))