diff options
author | Kenny Root <kroot@google.com> | 2012-04-10 17:24:24 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2012-04-10 17:53:11 -0700 |
commit | 03273f8fc0a7ac2b54fa2c983d4a647580e34458 (patch) | |
tree | 17f5d239e3a94929fdafe78b4358d174e7573c3c | |
parent | 7f03d2356f1380637d5a38fca20d2cd9b3f6c900 (diff) | |
download | bionic-03273f8fc0a7ac2b54fa2c983d4a647580e34458.zip bionic-03273f8fc0a7ac2b54fa2c983d4a647580e34458.tar.gz bionic-03273f8fc0a7ac2b54fa2c983d4a647580e34458.tar.bz2 |
__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
-rw-r--r-- | libc/Android.mk | 3 | ||||
-rw-r--r-- | libc/arch-arm/bionic/crtbegin_so.S | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libc/Android.mk b/libc/Android.mk index 5e41741..885fb93 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -514,8 +514,9 @@ libc_common_c_includes := \ # Needed to access private/__dso_handle.S from # crtbegin_xxx.S and crtend_xxx.S +# and machine/asm.h # -libc_crt_target_cflags += -I$(LOCAL_PATH)/private +libc_crt_target_cflags += -I$(LOCAL_PATH)/private -I$(LOCAL_PATH)/arch-$(TARGET_ARCH)/include # Define the libc run-time (crt) support object files that must be built, # which are needed to build all other objects (shared/static libs and 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 @@ __FINI_ARRAY__: .long -1 .long __on_dlclose +END(__on_dlclose) + #ifdef CRT_LEGACY_WORKAROUND #include "__dso_handle.S" #else |