• Monty's avatar
    Fixed my_addr_resolve · a93c5145
    Monty authored
    When a server is compiled with -fPIE, my_addr_resolve needs to subtract the info.dli_fbase from symbol addresses in memory for addr2line to recognize them.
    When a server is compiled without -fPIE, my_addr_resolve should not do it.
    Unfortunately not all compilers define __PIE__ when -fPIE was used
    (e.g. older gcc doesn't), so we have to resort to run-time detection.
    a93c5145
my_addr_resolve.c 8.03 KB