This commit is contained in:
rsc 2004-04-19 19:29:25 +00:00
parent 0e3cc9f456
commit a84cbb2a17
53 changed files with 12038 additions and 0 deletions

50
src/libmach/symmacho.c Normal file
View file

@ -0,0 +1,50 @@
#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;
}