[Wisp-cvs] wisp/users/dig pe.py,1.13,1.14 pe.tran,1.4,1.5 tran-builtins,1.34,1.35 tran.py,1.108,1.10
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-05-18 15:56:34
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv18747 Modified Files: pe.py pe.tran tran-builtins tran.py Log Message: employed weak symbols in |make-pe-section-header| Index: pe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- pe.py 18 May 2003 15:36:28 -0000 1.13 +++ pe.py 18 May 2003 15:56:30 -0000 1.14 @@ -159,10 +159,6 @@ sections = {'.text': text, '.data': data, '.bss': bss, '.imports': imports} for s in sectnames: interpret_single(["'", s, 'make-pe-section-header'], e, include = 'pe') - e.place_symbol('!' + s + '/reloc', 0) - e.place_symbol('!' + s + '/lineno', 0) - e.place_symbol('#' + s + '/reloc', 0) - e.place_symbol('#' + s + '/lineno', 0) e.place_symbol('#.text/flags', 0x60000020) e.place_symbol('#.data/flags', 0xc0000040) e.place_symbol('#.bss/flags', 0xc0000080) Index: pe.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/pe.tran,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- pe.tran 18 May 2003 15:36:28 -0000 1.4 +++ pe.tran 18 May 2003 15:56:30 -0000 1.5 @@ -31,6 +31,10 @@ #xCD b, #x21 b, \ int 0x21 ; +:[ sym ] (opt) \ ( symbol -- symbol ) + dup weaker 0 swap bind +; + :[ ] make-pe-section-header \ ( name -- ) 4 align dup 8 padded-symbol, @@ -38,10 +42,10 @@ dup mingle &* '#rva + t, \ IOW, it's a RVA dup mingle #*/filesz t, dup mingle !* t, - dup mingle !*/reloc t, - dup mingle !*/lineno t, - dup mingle #*/reloc w, - dup mingle #*/lineno w, + dup mingle !*/reloc (opt) t, + dup mingle !*/lineno (opt) t, + dup mingle #*/reloc (opt) w, + dup mingle #*/lineno (opt) w, mingle #*/flags t, ; Index: tran-builtins =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran-builtins,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- tran-builtins 18 May 2003 15:45:53 -0000 1.34 +++ tran-builtins 18 May 2003 15:56:30 -0000 1.35 @@ -238,4 +238,8 @@ w, sym interpreter.current[::2] = str(interpreter.regstack.pop()) +weaker sym + sym = str(interpreter.regstack.pop()) + interpreter.regstack.append(Symbol_Literal(sym[0] + '?' + sym[1:])) + # vim: ft=python Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.108 retrieving revision 1.109 diff -u -d -r1.108 -r1.109 --- tran.py 17 May 2003 16:19:42 -0000 1.108 +++ tran.py 18 May 2003 15:56:30 -0000 1.109 @@ -109,7 +109,7 @@ shlex.__init__(this, instream = open(filename, 'r'), infile = filename) this.commenters = '\\' this.quotes = '"' - this.wordchars += '!#$%&*+,-./:;<=>?@[]' + this.wordchars += '!#$%&()*+,-./:;<=>?@[]' def get_token (this): tok = shlex.get_token(this) if tok == '': tok = None |