• Sasha Goldshtein's avatar
    cc: Correctly treat PIE files as shared objects for symbols · 7d8c29ce
    Sasha Goldshtein authored
    When resolving symbols, ProcSyms would treat position-independent
    executables (PIE files) incorrectly, resulting in symbol resolution
    failures. Specifically, PIE files are treated like shared objects
    for ASLR, which means all symbol addresses in the file need to be
    taken relative to the executable load address at runtime, the same
    as with dynamic library shared objects.
    
    The fix is in the `is_so()` method on `ProcSyms::Module`, which
    now uses the correct `bcc_elf_is_shared` helper for testing if a
    file is a shared object rather than just looking at the extension
    ".so", which is very brittle -- and wrong.
    7d8c29ce
bcc_syms.cc 8.37 KB