Android ndk and revision 8B released

Source: Internet
Author: 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:
  • FixedLOCAL_SHORT_COMMANDSIssues 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 inndk-gdb:
    • Updated tool to pass flags-e,-dAnd-sTo ADB moreconsistently.
    • Updated tool to accept device serial names containing spaces.
    • Updated tool to retrieve/system/bin/linkInformation, so
      gdb
      Onthe host can set a breakpoint in__dl_rtld_db_dlactivityAnd be aware of linker activity (e.g., rescan
      solibSymbols whendlopen()Is called ).
  • Fixedndk-build cleanOn Windows, which was failing to remove./libs/*/lib*.so.
  • Fixedndk-build.cmdTo return a non-zeroERRORLEVELWhen
    makeFails.
  • Fixedlibc.soTo stop incorrectly exporting__exidx_startAnd__exidx_endSymbols.
  • FixedSEGVWhen unwinding the stack past__libc_initFor arm andmips.
Important changes:
  • Added GCC 4.6 toolchain (binutils2.21goldAnd GDB 7.3.x) Toco-exist with the original GCC 4.4.3 toolchain (binutils2.19 and GDB 6.6 ).

    • GCC 4.6 is now the default toolchain. You may setNDK_TOOLCHAIN_VERSION=4.4.3In
      Application.mkTo select the original one.
    • Support forgoldLinker is only available for ARM and x86ubuntures on Linux and Mac OS hosts. This support is disabled by default. Add
      LOCAL_LDLIBS += -fuse-ld=goldInAndroid.mkTo enable it.
    • Programs compiled-fPIERequire the newGDBFor debugging, including binaries in Android 4.1 (API level 16) system images.
    • Thebinutils2.21ldTool contains back-ported fixes fromversion 2.22:
      • Fixedld --gc-sections, Which incorrectly retains zombie references toexternal libraries. (moreinfo ).
      • Fixed armstripCommand to preserve the originalp_alignAndp_flagsIn
        GNU_RELROSection if they are valid. Without this fix, programsbuilt
        -fPIECocould not be debugged. (More Info)
    • Disabledsincos()Optimization for compatibility with older platforms.
  • Updated build options to enable the never execute (nx) bit andrelro/bind_nowProtections by default:
    • Added--noexecstackTo inform er and-z noexecstackTo linkerthat provides NX protection against buffer overflow attacks by enabling NX bit on Stack andheap.
    • Added-z relroAnd-z nowTo linker for hardening of internaldata sections after linking to guard against security vulnerabilities caused by memory resume uption. (More Info:
      1, 2)
    • These features can be disabled using the following options:
      1. Disable NX protection by setting--execstackOption for thepolicer and
        -z execstackFor the linker.
      2. Disable hardening of internal data by setting-z norelroAnd-z lazyOptions for the linker.
      3. Disable these protections in the ndkjni/Android.mkBy setting thefollowing options:
        LOCAL_DISABLE_NO_EXECUTE=true  # disable "--noexecstack" and "-z noexecstack"DISABLE_RELRO=true             # disable "-z relro" and "-z now"

      Seedocs/ANDROID-MK.htmlFor more details.

  • Added branding for Android executables with.note.ABI-tagSection (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:
  • Fixedmips-linux-gnuRelocation truncated to fitR_MIPS_TLS_LDMIssue. (More Info)
  • FixedldTool segfaults when using--gc-sections. (More Info)
  • Fixed MIPSGOT_PAGECounting issue. (More Info)
  • Fixed follow warning symbol linkmips_elf_count_got_symbols.
  • Fixed follow warning symbol linkmips_elf_allocate_lazy_stub.
  • Moved MIPS.dynamicTo the data segment, so that it is writable.
  • Replaced hard-coded values for symbols with correct segment sizes for MIPS.
  • Removed-mno-sharedOption from the defaults in the MIPs toolchain. The default for Android toolchain is
    -fPIC(Or-fpicIf supported). If you do notexplicitly specify
    -mshared,-fpic,-fPIC,-fpie, Or
    -fPIE, The MIPs compiler adds-mno-sharedThat turns off pic. Fixed compiler not to add-mno-sharedIn this case.
  • Fixed wrong package names in Sampleshello-jniAndtwo-libsSo thatthe
    testsProject underneath it can compile.
Other changes:
  • Changed locations of Binaries:

    • MovedgdbserverFromtoolchain/<arch-os-ver>/prebuilt/gdbserverToprebuilt/android-<arch>/gdbserver/gdbserver.
    • Renamed x86 toolchain prefix fromi686-android-linux-Toi686-linux-android-.
    • Movedsources/cxx-stl/gnu-libstdc++/includeAndlibTosources/cxx-stl/gnu-libstdc++/4.6When compiled with GCC 4.6, orsources/cxx-stl/gnu-libstdc++/4.4.3When compiled with GCC 4.4.3.
    • Movedlibbfd.aAndlibintl.aFromlib/To
      lib32/.
  • Added and improved various scripts in the rebuild and test ndk toolchain:
    • Addedbuild-mingw64-toolchain.shTo generate a new Linux-hosted toolchainthat generates Win32 and win64 executables.
    • Improved speeddownload-toolchain-sources.shBy using
      clone
      Command and only usingcheckoutFor the directories that are needed to build the ndktoolchain binaries.
    • Addedbuild-host-gcc.shAndbuild-host-gdb.shScripts.
    • Addedtests/check-release.shTo check the content of a given ndkinstallation directory, or an existing ndk package.
    • Rewrotetests/standalone/run.shStandalone tests.
  • Removedif_dl.hHeader from all platforms and ubuntures.
    AF_LINKAndsockaddr_dlElements It describes are specific to BSD (I. e., They don't existin Linux ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.