• David 'Digit' Turner's avatar
    android: crazy_linker: Add GNU hash table support. · 2c987e28
    David 'Digit' Turner authored
    The static linker currently generates two symbol hash tables by
    default in each ELF binary (executables or shared libraries).
    One uses the old, slow and large SysV format, and the other the
    much smaller and much faster GNU format.
    
    This CL adds support for the GNU format to the crazy linker
    library (which turns out to require very little code).
    
    This will allow the removal of the SysV table whenever the
    chromium linker is being used (i.e. for ChromePublic.apk and
    ChromeModernPublic.apk and their derivatives).
    
    This will also be handy when we split libchrome.so into
    several native libraries in the future (e.g. to support
    android app feature modules like VR), which will require
    exporting a lot more symbols.
    
    Note that MonochromePublic.apk, which only runs on Android N+
    already uses GNU tables exclusively (for the record, support
    for this format was added in Android M / API level 23).
    
    + Add unit-tests. And scripts to generate the test data from
      a known list of symbols.
    
    + Add a small script to regenerate all auto-generated sources
      at once.
    
    BUG=851391
    R=pasko@chromium.org, rmcilroy@chromium.org, agrieve@chromium.org, cjgrant@chromium.org
    
    Change-Id: I42b1aac46445b5b4d4b3b4f69eaa69ea47e7ab3c
    Reviewed-on: https://chromium-review.googlesource.com/1216122
    Commit-Queue: David Turner <digit@chromium.org>
    Reviewed-by: default avataragrieve <agrieve@chromium.org>
    Reviewed-by: default avatarEgor Pasko <pasko@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#590291}
    2c987e28
BUILD.gn 14.5 KB