• Joshua Peraza's avatar
    android: Launch Crashpad with /system/bin/linker on Q · 54c5c662
    Joshua Peraza authored
    This adds a small executable, libcrashpad_handler_trampoline.so, to
    Monochrome, Trichrome, and SystemWebView. The trampoline loads the
    remaining Crashpad handler code from the main native library, which
    must export `CrashpadHandlerMain()`.
    
    All three packages will continue to use /system/bin/app_process to
    launch Crashpad on P-.
    
    Note on static_initializers.gni:
    
    There aren't any real, new static initializers. The increased count is
    due to the addition of the new object. Static initializers are counted
    by measuring the size of each object's .init_array and dividing by the
    object's pointer size. libcrashpad_handler_trampoline.so has two
    invalid slots which are ignored by the loader:
    
    readelf -x .init_array libcrashpad_handler_trampoline.so
    
    Hex dump of section '.init_array':
      0x00001008 ffffffff 00000000
    
    Bug: 928422
    Change-Id: Iba56cd6feda73ebc91f6758724d823e48b5c6e8f
    Reviewed-on: https://chromium-review.googlesource.com/c/1454078Reviewed-by: default avatarRichard Coles <torne@chromium.org>
    Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
    Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
    Commit-Queue: Joshua Peraza <jperaza@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#635269}
    54c5c662
generate_linker_version_script.py 1.8 KB