commit | 4089f56e6c7438eb98cb86c249cf0c01e22219c5 | [log] [tgz] |
---|---|---|
author | Ryan Prichard <rprichard@google.com> | Wed Jun 27 17:21:50 2018 -0700 |
committer | Ryan Prichard <rprichard@google.com> | Thu Jun 28 14:03:10 2018 -0700 |
tree | 80affcdf249524cf1414767b8eb40f00ca8acd0b | |
parent | 81788f3d99d2c5952fa9a6d673e8d6a53b76d511 [diff] |
libgcc: work around old Bionic loader bug dl_iterate_phdr returns a 0 load_base for a PIE executable when it should return the address where the executable was loaded (e.g. the load base or load bias). Recalculate the load base when it is zero. This recalculation should work on any ELF file with a PT_PHDR segment -- it will calculate 0 for a non-PIE executable. The load base is added to an ELF virtual address to produce a run-time address. Recalculate it by subtracting the PT_PHDR's virtual address from its run-time address. Bug: https://github.com/android-ndk/ndk/issues/505 Test: manual Test: run NDK tests (./checkbuild.py && ./run_tests.py) Change-Id: I7de46c07a8b04e794b59f07b4d554238cfd6d5d9
The following process is used to build the GCC that is used by both the Android platfrom and the NDK.
Both Linux and Windows toolchains are built on Linux machines. Windows host binaries are built with mingw. Building binaries for Mac OS X should be built using 10.8 to ensure compatibility with Android's minimum supported hosts.
Check out the branch gcc
repo init -u https://android.googlesource.com/platform/manifest -b gcc # Googlers, use repo init -u \ persistent-https://android.git.corp.google.com/platform/manifest \ -b gcc
Additional Linux Dependencies (available from apt):
Mac OS X also requires Xcode.
# Additional options and toolchain names will be show with --help. $ python build.py --toolchain TOOLCHAIN_NAME
$ python build.py --system windows TOOLCHAIN_NAME