diff options
author | rsc <devnull@localhost> | 2005-01-07 18:45:17 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-01-07 18:45:17 +0000 |
commit | 39dbe6e72b5e0ffc7989da7f1e59f41498d2b492 (patch) | |
tree | 3eac9a6134aeca1429116c2ce3e391d540cbe518 /src/libmach | |
parent | 60efa1d2b90cbcfedcd93a988834fc595a5368bb (diff) | |
download | plan9port-39dbe6e72b5e0ffc7989da7f1e59f41498d2b492.tar.gz plan9port-39dbe6e72b5e0ffc7989da7f1e59f41498d2b492.tar.bz2 plan9port-39dbe6e72b5e0ffc7989da7f1e59f41498d2b492.zip |
small hidings
Diffstat (limited to 'src/libmach')
-rw-r--r-- | src/libmach/Linux.c | 4 | ||||
-rw-r--r-- | src/libmach/sym.c | 17 | ||||
-rw-r--r-- | src/libmach/symdwarf.c | 2 | ||||
-rw-r--r-- | src/libmach/symelf.c | 4 | ||||
-rw-r--r-- | src/libmach/symstabs.c | 4 | ||||
-rw-r--r-- | src/libmach/t.c | 6 |
6 files changed, 24 insertions, 13 deletions
diff --git a/src/libmach/Linux.c b/src/libmach/Linux.c index def8925e..9127434f 100644 --- a/src/libmach/Linux.c +++ b/src/libmach/Linux.c @@ -42,7 +42,7 @@ static int ptraceregrw(Regs*, char*, ulong*, int); static int attachedpids[1000]; static int nattached; -int +static int ptraceattach(int pid) { int i; @@ -91,8 +91,6 @@ unmapproc(Map *map) } } - - int mapproc(int pid, Map *map, Regs **rp) { diff --git a/src/libmach/sym.c b/src/libmach/sym.c index a5cf0314..b5d3eacf 100644 --- a/src/libmach/sym.c +++ b/src/libmach/sym.c @@ -439,7 +439,7 @@ bynamecmp(const void *va, const void *vb) } int -syminit(Fhdr *hdr) +symopen(Fhdr *hdr) { int i; Symbol *r, *w, *es; @@ -474,8 +474,21 @@ syminit(Fhdr *hdr) return 0; } +void +symclose(Fhdr *hdr) +{ + _delhdr(hdr); + if(hdr->symclose) + hdr->symclose(hdr); + free(hdr->byname); + hdr->byname = nil; + free(hdr->sym); + hdr->sym = nil; + hdr->nsym = 0; +} + Symbol* -addsym(Fhdr *fp, Symbol *sym) +_addsym(Fhdr *fp, Symbol *sym) { Symbol *s; diff --git a/src/libmach/symdwarf.c b/src/libmach/symdwarf.c index 3ac12577..c56667b1 100644 --- a/src/libmach/symdwarf.c +++ b/src/libmach/symdwarf.c @@ -212,7 +212,7 @@ dwarfsyminit(Fhdr *fp) case TagVariable: if(dwarftosym(fp, d, &s, &sym, 0) < 0) continue; - addsym(fp, &sym); + _addsym(fp, &sym); } } } diff --git a/src/libmach/symelf.c b/src/libmach/symelf.c index 0b9f410e..40dec113 100644 --- a/src/libmach/symelf.c +++ b/src/libmach/symelf.c @@ -46,7 +46,7 @@ elfsyminit(Fhdr *fp) sym.type = 'U'; if(esym.bind==ElfSymBindLocal) sym.type += 'a' - 'A'; - addsym(fp, &sym); + _addsym(fp, &sym); } for(i=0; i<elf->nprog; i++){ @@ -60,7 +60,7 @@ elfsyminit(Fhdr *fp) sym.hiloc = locaddr(p->vaddr+p->filesz); sym.type = 'D'; sym.class = CDATA; - addsym(fp, &sym); + _addsym(fp, &sym); } return 0; } diff --git a/src/libmach/symstabs.c b/src/libmach/symstabs.c index 07bbd9fc..472dd872 100644 --- a/src/libmach/symstabs.c +++ b/src/libmach/symstabs.c @@ -196,7 +196,7 @@ stabssyminit(Fhdr *fp) fun = nil; if(stabcvtsym(&sym, &s, dir, file, i) < 0) continue; - if((fun = addsym(fp, &s)) == nil) + if((fun = _addsym(fp, &s)) == nil) goto err; locals = 0; params = 0; @@ -249,7 +249,7 @@ stabssyminit(Fhdr *fp) /* create new symbol, add it */ if(stabcvtsym(&sym, &s, dir, file, i) < 0) continue; - if(addsym(fp, &s) == nil) + if(_addsym(fp, &s) == nil) goto err; break; } diff --git a/src/libmach/t.c b/src/libmach/t.c index d11cb7dd..68d2bdfc 100644 --- a/src/libmach/t.c +++ b/src/libmach/t.c @@ -163,9 +163,9 @@ main(int argc, char **argv) attachargs(argc, argv, OREAD); attachdynamic(); - if(!corpid && !corhdr) - sysfatal("could not attach to process"); - +// if(!corpid && !corhdr) +// sysfatal("could not attach to process"); +// p.pid = corpid; if((e = td_ta_new(&p, &ta)) != TD_OK) sysfatal("td_ta_new: %s", terr(e)); |