• Siddhartha's avatar
    Add util for reading library name from elf binary · b7b4a541
    Siddhartha authored
    1. Reading elf for the current binary could lead to seg fault if the
       full library is not loaded in memory. So, the util only takes mapped
       address and works on it. The caller must ensure the library is
       mapped.
    2. Add function to read soname from the .dynamic section in elf file.
    3. The Linux executable does not contain so name. So, use malloc_wrapper
       library to test.
    
    BUG=734705
    
    Change-Id: I1327f4786726143daba57a2aaa1eddd608143c04
    Reviewed-on: https://chromium-review.googlesource.com/1031854
    Commit-Queue: Siddhartha S <ssid@chromium.org>
    Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#554635}
    b7b4a541
BUILD.gn 108 KB