Allow dlclose() to properly call static C++ destructors.

With this patch _and_ an upcoming build/ patch, the destruction
of static C++ objects contained in shared libraries will happen
properly when dlclose() is called.

Note that this change introduces crtbegin_so.S and crtend_so.S which
are currently ignored by the build system.

+ move definition of __dso_handle to the right place
(before that, all shared libraries used the __dso_handle
global variable from the C library).

Note that we keep a 'weak' __dso_handle in aeabi.c to avoid
breaking the build until the next patch to build/core/combo/
appears. We will be able to remove that later.

+ move bionic/aeabi.c to arch-arm/bionic/ (its proper location)

NOTE: The NDK will need to be modified to enable this feature in
         the shared libraries that are generated through it.

Change-Id: I99cd801375bbaef0581175893d1aa0943211b9bc
diff --git a/libc/arch-sh/bionic/crtbegin_static.S b/libc/arch-sh/bionic/crtbegin_static.S
index 97db1e4..1d3fdf8 100644
--- a/libc/arch-sh/bionic/crtbegin_static.S
+++ b/libc/arch-sh/bionic/crtbegin_static.S
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 The Android Open Source Project
+ * Copyright (C) 2009-2010 The Android Open Source Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -68,12 +68,6 @@
     .long   __FINI_ARRAY__
     .long   __CTOR_LIST__
 
-# the .ctors section contains a list of pointers to "constructor"
-# functions that need to be called in order during C library initialization,
-# just before the program is being run. This is a C++ requirement
-#
-# the last entry shall be 0, and is defined in crtend.S
-#
     .section .preinit_array, "aw"
     .globl __PREINIT_ARRAY__
 __PREINIT_ARRAY__:
@@ -94,3 +88,4 @@
 __CTOR_LIST__:
     .long -1
 
+#include "__dso_handle.S"