diff options
| author | Alex Brainman <alex.brainman@gmail.com> | 2011-05-13 16:05:47 +1000 |
|---|---|---|
| committer | Alex Brainman <alex.brainman@gmail.com> | 2011-05-13 16:05:47 +1000 |
| commit | 34ac4ec30ca8bca47fb3552bae0116ef140b11cb (patch) | |
| tree | 2d4ee7792e0002398f062617d37e4db09320b412 /src/cmd/6l | |
| parent | 142008c325da1bb6e23f051fddd69c1f0de1dd35 (diff) | |
| download | go-34ac4ec30ca8bca47fb3552bae0116ef140b11cb.tar.xz | |
6l, 8l: emit windows dwarf sections similar to other platforms
R=golang-dev, rsc
CC=golang-dev, vcc.163
https://golang.org/cl/4517056
Diffstat (limited to 'src/cmd/6l')
| -rw-r--r-- | src/cmd/6l/asm.c | 68 |
1 files changed, 39 insertions, 29 deletions
diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c index dda19e48d0..9aeef3c4d8 100644 --- a/src/cmd/6l/asm.c +++ b/src/cmd/6l/asm.c @@ -787,40 +787,50 @@ asmb(void) symo = rnd(symo, PEFILEALIGN); break; } - /* - * the symbol information is stored as - * 32-bit symbol table size - * 32-bit line number table size - * symbol table - * line number table - */ - seek(cout, symo+8, 0); - if(debug['v']) - Bprint(&bso, "%5.2f sp\n", cputime()); - Bflush(&bso); - if(debug['v']) - Bprint(&bso, "%5.2f pc\n", cputime()); - Bflush(&bso); - if(!debug['s']) - strnput("", INITRND-(8+symsize+lcsize)%INITRND); - cflush(); - seek(cout, symo, 0); - lputl(symsize); - lputl(lcsize); - cflush(); - if(HEADTYPE != Hwindows && !debug['s']) { - elfsymo = symo+8+symsize+lcsize; - seek(cout, elfsymo, 0); - asmelfsym64(); - cflush(); - elfstro = seek(cout, 0, 1); - elfsymsize = elfstro - elfsymo; - ewrite(cout, elfstrdat, elfstrsize); + switch(HEADTYPE) { + default: + if(iself) { + /* + * the symbol information is stored as + * 32-bit symbol table size + * 32-bit line number table size + * symbol table + * line number table + */ + seek(cout, symo+8, 0); + if(debug['v']) + Bprint(&bso, "%5.2f sp\n", cputime()); + Bflush(&bso); + if(debug['v']) + Bprint(&bso, "%5.2f pc\n", cputime()); + Bflush(&bso); + if(!debug['s']) + strnput("", INITRND-(8+symsize+lcsize)%INITRND); + cflush(); + seek(cout, symo, 0); + lputl(symsize); + lputl(lcsize); + cflush(); + elfsymo = symo+8+symsize+lcsize; + seek(cout, elfsymo, 0); + asmelfsym64(); + cflush(); + elfstro = seek(cout, 0, 1); + elfsymsize = elfstro - elfsymo; + ewrite(cout, elfstrdat, elfstrsize); + if(debug['v']) + Bprint(&bso, "%5.2f dwarf\n", cputime()); + + dwarfemitdebugsections(); + } + break; + case Hwindows: if(debug['v']) Bprint(&bso, "%5.2f dwarf\n", cputime()); dwarfemitdebugsections(); + break; } } |
