ProcSyms should treat the executable like any other mapped file when
authorDave Marchevsky <davemarchevsky@fb.com>
Sat, 19 Jun 2021 02:34:55 +0000 (19:34 -0700)
committerDave Marchevsky <davemarchevsky@fb.com>
Sat, 19 Jun 2021 02:34:55 +0000 (19:34 -0700)
commit649cb3e3d1870a1514238ab63b9167a1a402fdd2
treee7b4c7ac48fbf888cc05a7aeaf5471359b077dbc
parent8b1c973f01f74c7229d84417454b7c91ade6e7f5
ProcSyms should treat the executable like any other mapped file when
symbolizing

As reported in #3487, when `/proc/PID/exe`'s symlink points to a
mountns-relative path from a different mountns than the tracing process,
we can fail to open it as we don't prepend `/proc/PID/root` .

A few potential solutions were discussed in that issue, we settled on
treating the main exe like any other map in `/proc/PID/maps`. Since it's
always the first map we can reuse existing code and get rid of
exe-specific helpers.
src/cc/bcc_syms.cc
src/cc/syms.h