mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
whoops
This commit is contained in:
parent
0a61c07d59
commit
d9c2aa3a33
2 changed files with 0 additions and 54 deletions
BIN
acid/core
BIN
acid/core
Binary file not shown.
54
acid/elflink
54
acid/elflink
|
@ -1,54 +0,0 @@
|
|||
aggr Rdebug
|
||||
{
|
||||
'X' 0 version;
|
||||
'X' 4 map;
|
||||
};
|
||||
|
||||
aggr Rmap
|
||||
{
|
||||
'X' 0 addr;
|
||||
'X' 4 name;
|
||||
'X' 8 dynsect;
|
||||
'X' 12 next;
|
||||
'X' 16 prev;
|
||||
};
|
||||
|
||||
defn
|
||||
rdebug()
|
||||
{
|
||||
local a;
|
||||
|
||||
a = _DYNAMIC;
|
||||
while *a != 0 do {
|
||||
if *a == 21 then // 21 == DT_DEBUG
|
||||
return *(a+4);
|
||||
a = a+8;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
defn
|
||||
rlink()
|
||||
{
|
||||
local r, m, n;
|
||||
|
||||
r = rdebug();
|
||||
if r == 0 then
|
||||
return {};
|
||||
complex Rdebug r;
|
||||
print("version ", r.version, "\n");
|
||||
|
||||
m = r.map;
|
||||
n = 0;
|
||||
while m != 0 && n < 100 do {
|
||||
complex Rmap m;
|
||||
print("map ", m\X, " base ", m.addr\X, " next ", m.next\X, " name ");
|
||||
if m.name then
|
||||
print(*(m.name\s));
|
||||
else
|
||||
print("''");
|
||||
print("\n");
|
||||
m = m.next;
|
||||
n = n+1;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue