Fixing app compat issue b/72143978

This is a squash revert of a4a4854 and 1b0f2b4

  Revert "Remove a test for backwards compatibility we no longer support."

  This reverts commit a4a485454a3a117eccdca1113681f770d765d865.

  # This is the commit message #2:

  Revert "Remove obsolete workaround."

  This reverts commit 1b0f2b49d528c90842b4263269d9039d7e07415e.

Bug: 72143978
Bug: 24465209
Test: Tested failing case on sailfish, reverted back all CL's since
Test: 3471433 for b/24465209 and apps open
diff --git a/libm/Android.bp b/libm/Android.bp
index f7d8a8b..6d6fafa 100644
--- a/libm/Android.bp
+++ b/libm/Android.bp
@@ -294,6 +294,7 @@
                 ],
             },
             instruction_set: "arm",
+            ldflags: ["-Wl,--hash-style=both"],
             version_script: "libm.arm.map",
         },
 
@@ -420,6 +421,7 @@
                 ],
             },
             local_include_dirs: ["i387"],
+            ldflags: ["-Wl,--hash-style=both"],
             version_script: "libm.x86.map",
         },