Commit fd604b44 authored by Brenden Blanco's avatar Brenden Blanco

Merge pull request #479 from LucaCanali/master

Fix for find_symbol method, issue #478
parents 5cb8de7a eea0bbf5
...@@ -464,7 +464,8 @@ class BPF(object): ...@@ -464,7 +464,8 @@ class BPF(object):
return symbols[sym] return symbols[sym]
with os.popen("""/usr/bin/objdump -tT %s | \ with os.popen("""/usr/bin/objdump -tT %s | \
awk -v sym=%s '$NF == sym && $4 == ".text" \ awk -v sym=%s '$NF == sym && ($4 == ".text" \
|| $4 == "text.hot" || $4 == "text.unlikely") \
{ print $1; exit }'""" % (path, sym)) as f: { print $1; exit }'""" % (path, sym)) as f:
data = f.read().rstrip() data = f.read().rstrip()
if not data: if not data:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment