aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorNiklas Baumstark <niklas.baumstark@gmail.com>2016-03-03 17:50:33 +0100
committerNiklas Baumstark <niklas.baumstark@gmail.com>2016-03-03 17:50:33 +0100
commit0b811b2df37c471e3ff89bf371f5c4c1277ca720 (patch)
tree8094577342048af6dc96b6d798a121a9cfc054ae /common
parentdfdb3e306a900dba439adf4674f4b254f31ba4bb (diff)
downloadlibc-database-0b811b2df37c471e3ff89bf371f5c4c1277ca720.tar.gz
libc-database-0b811b2df37c471e3ff89bf371f5c4c1277ca720.zip
fix bug when detecting libc_start_main return address
Diffstat (limited to 'common')
-rw-r--r--common/libc.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/libc.sh b/common/libc.sh
index 4d27b6d..b054595 100644
--- a/common/libc.sh
+++ b/common/libc.sh
@@ -17,9 +17,9 @@ extract_label() {
dump_libc_start_main_ret() {
local call_main=`objdump -D $1 \
- | grep -A 100 '<__libc_start_main>' \
+ | egrep -A 100 '<__libc_start_main.*>' \
| grep call \
- | grep -B 1 '<exit>' \
+ | egrep -B 1 '<exit.*>' \
| head -n 1 \
| extract_label`
local offset=`objdump -D $1 | egrep -A 1 "(^| )$call_main:" | tail -n 1 | extract_label`