mirror of
https://github.com/golang/go
synced 2024-11-19 21:34:45 -07:00
6l, 8l: emit windows dwarf sections similar to other platforms
R=golang-dev, rsc CC=golang-dev, vcc.163 https://golang.org/cl/4517056
This commit is contained in:
parent
142008c325
commit
34ac4ec30c
@ -787,6 +787,9 @@ asmb(void)
|
||||
symo = rnd(symo, PEFILEALIGN);
|
||||
break;
|
||||
}
|
||||
switch(HEADTYPE) {
|
||||
default:
|
||||
if(iself) {
|
||||
/*
|
||||
* the symbol information is stored as
|
||||
* 32-bit symbol table size
|
||||
@ -808,7 +811,6 @@ asmb(void)
|
||||
lputl(symsize);
|
||||
lputl(lcsize);
|
||||
cflush();
|
||||
if(HEADTYPE != Hwindows && !debug['s']) {
|
||||
elfsymo = symo+8+symsize+lcsize;
|
||||
seek(cout, elfsymo, 0);
|
||||
asmelfsym64();
|
||||
@ -822,6 +824,14 @@ asmb(void)
|
||||
|
||||
dwarfemitdebugsections();
|
||||
}
|
||||
break;
|
||||
case Hwindows:
|
||||
if(debug['v'])
|
||||
Bprint(&bso, "%5.2f dwarf\n", cputime());
|
||||
|
||||
dwarfemitdebugsections();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(debug['v'])
|
||||
|
@ -742,25 +742,13 @@ asmb(void)
|
||||
symo = rnd(symo, INITRND);
|
||||
break;
|
||||
case Hwindows:
|
||||
// TODO(brainman): not sure what symo meant to be, but it is not used for Windows PE for now anyway
|
||||
symo = rnd(HEADR+segtext.filelen, PEFILEALIGN)+segdata.filelen;
|
||||
symo = rnd(symo, PEFILEALIGN);
|
||||
break;
|
||||
}
|
||||
if(HEADTYPE == Hplan9x32) {
|
||||
seek(cout, symo, 0);
|
||||
asmplan9sym();
|
||||
cflush();
|
||||
|
||||
sym = lookup("pclntab", 0);
|
||||
if(sym != nil) {
|
||||
lcsize = sym->np;
|
||||
for(i=0; i < lcsize; i++)
|
||||
cput(sym->p[i]);
|
||||
|
||||
cflush();
|
||||
}
|
||||
} else if(iself) {
|
||||
switch(HEADTYPE) {
|
||||
default:
|
||||
if(iself) {
|
||||
if(debug['v'])
|
||||
Bprint(&bso, "%5.2f elfsym\n", cputime());
|
||||
elfsymo = symo+8+symsize+lcsize;
|
||||
@ -775,6 +763,28 @@ asmb(void)
|
||||
Bprint(&bso, "%5.2f dwarf\n", cputime());
|
||||
dwarfemitdebugsections();
|
||||
}
|
||||
break;
|
||||
case Hplan9x32:
|
||||
seek(cout, symo, 0);
|
||||
asmplan9sym();
|
||||
cflush();
|
||||
|
||||
sym = lookup("pclntab", 0);
|
||||
if(sym != nil) {
|
||||
lcsize = sym->np;
|
||||
for(i=0; i < lcsize; i++)
|
||||
cput(sym->p[i]);
|
||||
|
||||
cflush();
|
||||
}
|
||||
break;
|
||||
case Hwindows:
|
||||
seek(cout, symo, 0);
|
||||
if(debug['v'])
|
||||
Bprint(&bso, "%5.2f dwarf\n", cputime());
|
||||
dwarfemitdebugsections();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(debug['v'])
|
||||
Bprint(&bso, "%5.2f headr\n", cputime());
|
||||
|
@ -2562,7 +2562,6 @@ dwarfaddmachoheaders(void)
|
||||
void
|
||||
dwarfaddpeheaders(void)
|
||||
{
|
||||
dwarfemitdebugsections();
|
||||
newPEDWARFSection(".debug_abbrev", abbrevsize);
|
||||
newPEDWARFSection(".debug_line", linesize);
|
||||
newPEDWARFSection(".debug_frame", framesize);
|
||||
|
@ -484,13 +484,13 @@ asmbpe(void)
|
||||
d->Characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA|
|
||||
IMAGE_SCN_MEM_READ|IMAGE_SCN_MEM_WRITE;
|
||||
|
||||
if(!debug['s'])
|
||||
dwarfaddpeheaders();
|
||||
|
||||
addimports(nextfileoff, d);
|
||||
|
||||
addexports(nextfileoff);
|
||||
|
||||
if(!debug['s'])
|
||||
dwarfaddpeheaders();
|
||||
|
||||
addsymtable();
|
||||
|
||||
fh.NumberOfSections = nsect;
|
||||
|
Loading…
Reference in New Issue
Block a user