Use crtbegin_so%O%s/crtend_so%O%s for -mandroid -shared
authorH.J. Lu <hongjiu.lu@intel.com>
Thu, 29 Mar 2012 12:57:05 +0000 (12:57 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Thu, 29 Mar 2012 12:57:05 +0000 (05:57 -0700)
2012-03-29  H.J. Lu  <hongjiu.lu@intel.com>

* config/linux-android.h (ANDROID_STARTFILE_SPEC): Use
crtbegin_so%O%s for -shared.
(ANDROID_ENDFILE_SPEC): Use crtend_so%O%s for -shared.

From-SVN: r185958

gcc/ChangeLog
gcc/config/linux-android.h

index 0d75540b2924d4ea1efc3c22601c6eab7bd6c555..9d3d5152d08f6f17b62f544920c4a2bf993f4e9b 100644 (file)
@@ -1,3 +1,9 @@
+2012-03-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/linux-android.h (ANDROID_STARTFILE_SPEC): Use
+       crtbegin_so%O%s for -shared.
+       (ANDROID_ENDFILE_SPEC): Use crtend_so%O%s for -shared.
+
 2012-03-29  Richard Guenther  <rguenther@suse.de>
 
        * tree-flow.h (struct pre_expr_d): Remove forward declaration.
index 94c52748fdb54f351a11a33fb38e812318dc4940..acbc6627f952dc6f93ae25179888cdc5197be727 100644 (file)
@@ -53,8 +53,8 @@
   "%{!static: -ldl}"
 
 #define ANDROID_STARTFILE_SPEC                                         \
-  "%{!shared:"                                                         \
+  "%{shared: crtbegin_so%O%s;:"                                                \
   "  %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}"
 
 #define ANDROID_ENDFILE_SPEC \
-  "%{!shared: crtend_android%O%s}"
+  "%{shared: crtend_so%O%s;: crtend_android%O%s}"