blob: 89e87fe7bc0cfa2fe7e2a1883f4066ad4fd34420 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#include <u.h>
#include <libc.h>
#include <mach.h>
#include "macho.h"
#if 0
static int
machosyminit(Fhdr *fp)
{
/* XXX should parse dynamic symbol table here */
return 0;
}
#endif
int
symmacho(Fhdr *fp)
{
int ret;
Macho *m;
m = fp->macho;
if(m == nil){
werrstr("not a macho");
return -1;
}
ret = -1;
if(machdebug)
fprint(2, "macho symbols...\n");
/*
if(machosyminit(fp) < 0)
fprint(2, "initializing macho symbols: %r\n");
else
ret = 0;
*/
if(fp->stabs.stabbase){
if(machdebug)
fprint(2, "stabs symbols...\n");
if(symstabs(fp) < 0)
fprint(2, "initializing stabs: %r");
else
ret = 0;
}
return ret;
}
|