projects
/
ldtrace
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
run script should use the loader
[ldtrace]
/
genasm.sh
1
#!/bin/sh
2
3
awk '
4
/dlsym/ {next}
5
/__syscall/ {next}
6
{
7
a[++n] = $1
8
print ".global " $1
9
print ".type " $1 ",@function"
10
print $1 ":"
11
print " pushl $sym_" $1
12
print " call wrap_help"
13
print " pop %ecx"
14
print " jmp *%eax"
15
}
16
END{
17
print ".section .rodata"
18
for (i=1;i<=n;i++) {
19
print "sym_" a[i] ":"
20
print " .string \"" a[i] "\""
21
}
22
}'