__on_dlclose should be aligned
Marking segments read-only was pushing the alignment of __on_dlclose by
2 bytes making it unaligned. This change makes sure the ARM code is
aligned to the 4 byte boundary.
Bug: 6313309
Change-Id: Ic2bf475e120dd61225ec19e5d8a9a8b1d0b7f081
diff --git a/libc/arch-arm/bionic/crtbegin_so.S b/libc/arch-arm/bionic/crtbegin_so.S
index 9275b1e..a54ed0d 100644
--- a/libc/arch-arm/bionic/crtbegin_so.S
+++ b/libc/arch-arm/bionic/crtbegin_so.S
@@ -26,6 +26,10 @@
* SUCH DAMAGE.
*/
+#include <machine/asm.h>
+
+ENTRY(__on_dlclose)
+
# Implement static C++ destructors when the shared
# library is unloaded through dlclose().
#
@@ -52,6 +56,8 @@
.long -1
.long __on_dlclose
+END(__on_dlclose)
+
#ifdef CRT_LEGACY_WORKAROUND
#include "__dso_handle.S"
#else