summaryrefslogtreecommitdiff
path: root/x86_64-linux-android/lib/ldscripts/i386linux.xu
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2013-07-17 15:35:49 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2013-08-02 21:41:25 -0700
commit7f61ceb88132c4329380c0cf9634e305dda9fe76 (patch)
tree89ca063758a2407e3de4e14aa478acd7a8c8c4a2 /x86_64-linux-android/lib/ldscripts/i386linux.xu
parentbbe08f8958377ba3a06f4081ed13b2399db448fb (diff)
downloadx86_64-linux-android-4.7-7f61ceb88132c4329380c0cf9634e305dda9fe76.tar.gz
New x86 toolchain: x86_64-linux-android-4.7
This toolchain can generates x86, x32, and x86_64 (default) code. Android build system already adds "-m32" to HOST_GLOBAL_CFLAGS and HOST_GLOBAL_LDFLAGS for projects to compiled in x86. Build instructions: export AOSP=your-AOSP-path export NDK=$AOSP/ndk cd $NDK ; ./build/tools/dev-cleanup.sh ./build/tools/download-toolchain-sources.sh /tmp/ndk-$USER/src ./build/tools/gen-platforms.sh --minimal --dst-dir=$NDK --ndk-dir=$NDK --arch=x86_64 ./build/tools/build-gcc.sh /tmp/ndk-$USER/src $NDK x86_64-4.7 --try-64 rm -rf $NDK/toolchains/x86_64-4.7/prebuilt/linux-x86_64/sysroot cp -a $NDK/toolchains/x86_64-4.7/prebuilt/linux-x86_64/* \ $AOSP/prebuilts/gcc/linux-x86_64/x86/x86_64-linux-android-4.7 Change-Id: Iddb5246ff74c39feea79539e4471d5ddc15afe5c
Diffstat (limited to 'x86_64-linux-android/lib/ldscripts/i386linux.xu')
-rw-r--r--x86_64-linux-android/lib/ldscripts/i386linux.xu38
1 files changed, 38 insertions, 0 deletions
diff --git a/x86_64-linux-android/lib/ldscripts/i386linux.xu b/x86_64-linux-android/lib/ldscripts/i386linux.xu
new file mode 100644
index 0000000..6847100
--- /dev/null
+++ b/x86_64-linux-android/lib/ldscripts/i386linux.xu
@@ -0,0 +1,38 @@
+/* Script for ld -Ur: link w/out relocation, do create constructors */
+OUTPUT_FORMAT("a.out-i386-linux", "a.out-i386-linux",
+ "a.out-i386-linux")
+OUTPUT_ARCH(i386)
+SECTIONS
+{
+ .text :
+ {
+ CREATE_OBJECT_SYMBOLS
+ *(.text)
+ /* The next six sections are for SunOS dynamic linking. The order
+ is important. */
+ *(.dynrel)
+ *(.hash)
+ *(.dynsym)
+ *(.dynstr)
+ *(.rules)
+ *(.need)
+ }
+ .data :
+ {
+ /* The first three sections are for SunOS dynamic linking. */
+ *(.dynamic)
+ *(.got)
+ *(.plt)
+ *(.data)
+ *(.linux-dynamic) /* For Linux dynamic linking. */
+ CONSTRUCTORS
+ }
+ .bss :
+ {
+ ;
+ *(.bss)
+ *(COMMON)
+ ;
+ ;
+ }
+}