forsyth: add allexport, though this is not currently wired up to any cmd line option Reference: /n/atom/patch/applied/6lallexport Date: Sun Aug 16 03:58:35 CES 2015 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/6l/l.h Sun Aug 16 03:58:20 2015 +++ /sys/src/cmd/6l/l.h Sun Aug 16 03:58:21 2015 @@ -339,7 +339,7 @@ EXTERN Adr* reloca; EXTERN int doexp, dlm; EXTERN int imports, nimports; -EXTERN int exports, nexports; +EXTERN int exports, nexports, allexport; EXTERN char* EXPTAB; EXTERN Prog undefp; @@ -391,9 +391,9 @@ void ldobj(int, long, char*); void loadlib(void); void listinit(void); -Sym* lookup(char*, int); void llput(vlong v); void llputl(vlong v); +Sym* lookup(char*, int); void lput(long); void lputl(long); void main(int, char*[]); --- /sys/src/cmd/6l/pass.c Sun Aug 16 03:58:24 2015 +++ /sys/src/cmd/6l/pass.c Sun Aug 16 03:58:25 2015 @@ -713,14 +713,14 @@ n = 0; for(i = 0; i < NHASH; i++) for(s = hash[i]; s != S; s = s->link) - if(s->sig != 0 && s->type != SXREF && s->type != SUNDEF && (nexports == 0 || s->subtype == SEXPORT)) + if(s->type != SXREF && s->type != SUNDEF && (nexports == 0 && s->sig != 0 || s->subtype == SEXPORT || allexport)) n++; esyms = malloc(n*sizeof(Sym*)); ne = n; n = 0; for(i = 0; i < NHASH; i++) for(s = hash[i]; s != S; s = s->link) - if(s->sig != 0 && s->type != SXREF && s->type != SUNDEF && (nexports == 0 || s->subtype == SEXPORT)) + if(s->type != SXREF && s->type != SUNDEF && (nexports == 0 && s->sig != 0 || s->subtype == SEXPORT || allexport)) esyms[n++] = s; for(i = 0; i < ne-1; i++) for(j = i+1; j < ne; j++)