• simonb@chromium.org's avatar
    Preserve section and data alignment in libchrome.<ver>.so. · dd1d104c
    simonb@chromium.org authored
    Current packing preserves 4-byte alignment (in practice, 8-byte alignment,
    because a whole number of R_ARM_RELATIVE relocations is removed).  However
    this is insufficient for some NEON vector instructions.  For example:
    
      18b0c:       f42c026f        vld1.16 {d0-d3}, [ip :128]
    
    requires a 16-byte alignment, and fails with SIGBUS if not aligned.
    
    The NDK toolchain aligns .text and .data to 256 bytes.  Retain this by
    padding the non-packed (non-R_ARM_RELATIVE) relocations with sufficient
    R_ARM_NONE entries so that 256 byte alignment is preserved.  Update
    test data so that enough R_ARM_RELATIVE entries are present for packing
    to reduce file size.
    
    BUG=385553
    
    Review URL: https://codereview.chromium.org/341483002
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278105 0039d316-1c4b-4281-b951-d872f2087c98
    dd1d104c
elf_file.cc 38.6 KB