Merge "Better obstruct optimization for ordering test" into main
diff --git a/benchmarks/property_benchmark.cpp b/benchmarks/property_benchmark.cpp
index 15a621b..1b4ba23 100644
--- a/benchmarks/property_benchmark.cpp
+++ b/benchmarks/property_benchmark.cpp
@@ -40,9 +40,10 @@
       : nprops(nprops), valid(false), system_properties_(false) {
     static const char prop_name_chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_.";
 
-    valid = system_properties_.AreaInit(dir_.path, nullptr);
+    valid = system_properties_.AreaInit(dir_.path, nullptr, true);
     if (!valid) {
-      return;
+      printf("Failed to initialize properties, terminating...\n");
+      exit(1);
     }
 
     names = new char* [nprops];
@@ -100,6 +101,9 @@
     }
 
     system_properties_.contexts_->FreeAndUnmap();
+    if (system_properties_.appcompat_override_contexts_) {
+      system_properties_.appcompat_override_contexts_->FreeAndUnmap();
+    }
 
     for (int i = 0; i < nprops; i++) {
       delete names[i];
diff --git a/libc/Android.bp b/libc/Android.bp
index 174ecd9..ced306e 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1736,7 +1736,12 @@
         arm: {
             // TODO: This is to work around b/24465209. Remove after root cause is fixed.
             pack_relocations: false,
-            ldflags: ["-Wl,--hash-style=both"],
+            ldflags: [
+                "-Wl,--hash-style=both",
+                // Since we are preserving the debug_frame, do not compress
+                // in this case to make unwinds as fast as possible.
+                "-Wl,--compress-debug-sections=none",
+            ],
 
             version_script: ":libc.arm.map",
             no_libcrt: true,
diff --git a/libc/include/elf.h b/libc/include/elf.h
index 04a73f7..81a50db 100644
--- a/libc/include/elf.h
+++ b/libc/include/elf.h
@@ -229,6 +229,8 @@
 #undef SHT_NUM
 #define SHT_NUM 20
 
+#define SHT_RISCV_ATTRIBUTES 0x70000003
+
 /*
  * Experimental support for SHT_RELR sections. For details, see proposal
  * at https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg.
diff --git a/libc/include/string.h b/libc/include/string.h
index 89b2a45..47bdd72 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -37,7 +37,7 @@
 
 __BEGIN_DECLS
 
-#if defined(__USE_BSD)
+#if defined(__USE_BSD) || defined(__USE_GNU)
 #include <strings.h>
 #endif
 
diff --git a/libc/include/sys/_system_properties.h b/libc/include/sys/_system_properties.h
index 30dea89..079c825 100644
--- a/libc/include/sys/_system_properties.h
+++ b/libc/include/sys/_system_properties.h
@@ -139,7 +139,7 @@
  * Returns 0 on success, -1 if the system properties failed to re-initialize (same conditions as
  * __system properties_init)
  */
-int __system_properties_zygote_reload(void); __INTRODUCED_IN(__ANDROID_API_V__)
+int __system_properties_zygote_reload(void) __INTRODUCED_IN(__ANDROID_API_V__);
 
 /* Deprecated: use __system_property_wait instead. */
 uint32_t __system_property_wait_any(uint32_t __old_serial);