Android NDK, Revision 8b 發布

來源:互聯網
上載者:User
Downloads
Platform Package Size MD5 Checksum
Windows android-ndk-r8b-windows.zip 188724991 bytes 6d290d4f2729ef2063c5ae5b1e335622
Mac OS X (intel) android-ndk-r8b-darwin-x86.tar.bz2 181255568 bytes 94fe392194ea41f8a70cfce0dee3870f
Linux 32/64-bit (x86) android-ndk-r8b-linux-x86.tar.bz2 160466240 bytes 6694ccc04d543500f0661a75f6c46526
Revisions

The sections below provide information and notes about successive releases ofthe NDK, as denoted by revision number.

Android NDK, Revision 8b
(July 2012)

The main features of this release are a new GNU Compiler Collection (GCC) 4.6 toolchain andGNU Debugger (GDB) 7.3.x which adds debugging support for the Android 4.1 (API Level 16) systemimage.

Important bug fixes:
  • Fixed LOCAL_SHORT_COMMANDS issues on Mac OS, Windows Cygwin environments forstatic libraries. List file generation is faster, and it is not regenerated to avoid repeatedproject rebuilds.
  • Fixed several issues in ndk-gdb:
    • Updated tool to pass flags -e, -d and -s to adb moreconsistently.
    • Updated tool to accept device serial names containing spaces.
    • Updated tool to retrieve /system/bin/link information, so
      gdb
      onthe host can set a breakpoint in __dl_rtld_db_dlactivity and be aware of linker activity(e.g., rescan
      solib symbols when dlopen() is called).
  • Fixed ndk-build clean on Windows, which was failing to remove./libs/*/lib*.so.
  • Fixed ndk-build.cmd to return a non-zero ERRORLEVEL when
    makefails.
  • Fixed libc.so to stop incorrectly exporting the __exidx_start and__exidx_end symbols.
  • Fixed SEGV when unwinding the stack past __libc_init for ARM andMIPS.
Important changes:
  • Added GCC 4.6 toolchain (binutils 2.21 with gold and GDB 7.3.x) toco-exist with the original GCC 4.4.3 toolchain (binutils 2.19 and GDB 6.6).

    • GCC 4.6 is now the default toolchain. You may set NDK_TOOLCHAIN_VERSION=4.4.3 in
      Application.mk to select the original one.
    • Support for the gold linker is only available for ARM and x86architectures on Linux and Mac OS hosts. This support is disabled by default. Add
      LOCAL_LDLIBS += -fuse-ld=gold in Android.mk to enable it.
    • Programs compiled with -fPIE require the new GDB for debugging,including binaries in Android 4.1 (API Level 16) system images.
    • The binutils 2.21 ld tool contains back-ported fixes fromversion 2.22:
      • Fixed ld --gc-sections, which incorrectly retains zombie references toexternal libraries. (moreinfo).
      • Fixed ARM strip command to preserve the original p_align andp_flags in
        GNU_RELRO section if they are valid. Without this fix, programsbuilt with
        -fPIE could not be debugged. (more info)
    • Disabled sincos() optimization for compatibility with older platforms.
  • Updated build options to enable the Never eXecute (NX) bit and relro/bind_now protections by default:
    • Added --noexecstack to assembler and -z noexecstack to linkerthat provides NX protection against buffer overflow attacks by enabling NX bit on stack andheap.
    • Added -z relro and -z now to linker for hardening of internaldata sections after linking to guard against security vulnerabilities caused by memory corruption.(more info:
      1,2)
    • These features can be disabled using the following options:
      1. Disable NX protection by setting the --execstack option for theassembler and
        -z execstack for the linker.
      2. Disable hardening of internal data by setting the -z norelro and-z lazy options for the linker.
      3. Disable these protections in the NDK jni/Android.mk by setting thefollowing options:
        LOCAL_DISABLE_NO_EXECUTE=true  # disable "--noexecstack" and "-z noexecstack"DISABLE_RELRO=true             # disable "-z relro" and "-z now"

      See docs/ANDROID-MK.html for more details.

  • Added branding for Android executables with the .note.ABI-tag section (incrtbegin_static/dynamic.o) so that debugging tools can act accordingly. The structuremember and values are defined as follows:
    static const struct {  int32_t namesz;  /* = 4,  sizeof ("GNU") */  int32_t descsz;  /* = 6 * sizeof(int32_t) */  int32_t type;    /* = 1 */  char  name[sizeof "GNU"];  /* = "GNU" */  int32_t os;      /* = 0 */  int32_t major;   /* = 2 */  int32_t minor;   /* = 6 */  int32_t teeny;   /* = 15 */  int32_t os_variant;  /* = 1 */  int32_t android_api; /* = 3, 4, 5, 8, 9, 14 */}
Other bug fixes:
  • Fixed mips-linux-gnu relocation truncated to fit R_MIPS_TLS_LDM issue. (more info)
  • Fixed ld tool segfaults when using --gc-sections. (more info)
  • Fixed MIPS GOT_PAGE counting issue. (more info)
  • Fixed follow warning symbol link for mips_elf_count_got_symbols.
  • Fixed follow warning symbol link for mips_elf_allocate_lazy_stub.
  • Moved MIPS .dynamic to the data segment, so that it is writable.
  • Replaced hard-coded values for symbols with correct segment sizes for MIPS.
  • Removed the -mno-shared option from the defaults in the MIPS toolchain.The default for Android toolchain is
    -fPIC (or -fpic if supported). If you do notexplicitly specify
    -mshared, -fpic, -fPIC, -fpie, or
    -fPIE,the MIPS compiler adds -mno-shared that turns off PIC. Fixed compiler not to add-mno-shared in this case.
  • Fixed wrong package names in samples hello-jni and two-libs so thatthe
    tests project underneath it can compile.
Other Changes:
  • Changed locations of binaries:

    • Moved gdbserver fromtoolchain/<arch-os-ver>/prebuilt/gdbserver toprebuilt/android-<arch>/gdbserver/gdbserver.
    • Renamed x86 toolchain prefix from i686-android-linux- toi686-linux-android-.
    • Moved sources/cxx-stl/gnu-libstdc++/include and lib tosources/cxx-stl/gnu-libstdc++/4.6 when compiled with GCC 4.6, orsources/cxx-stl/gnu-libstdc++/4.4.3 when compiled with GCC 4.4.3.
    • Moved libbfd.a and libintl.a from lib/ to
      lib32/.
  • Added and improved various scripts in the rebuild and test NDK toolchain:
    • Added build-mingw64-toolchain.sh to generate a new Linux-hosted toolchainthat generates Win32 and Win64 executables.
    • Improved speed of download-toolchain-sources.sh by using the
      clone
      command and only using checkout for the directories that are needed to build the NDKtoolchain binaries.
    • Added build-host-gcc.sh and build-host-gdb.sh scripts.
    • Added tests/check-release.sh to check the content of a given NDKinstallation directory, or an existing NDK package.
    • Rewrote the tests/standalone/run.sh standalone tests .
  • Removed if_dl.h header from all platforms and architectures. The
    AF_LINK and sockaddr_dl elements it describes are specific to BSD (i.e., they don't existin Linux).

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.