diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-04-28 10:35:15 +0200 | 
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-04-28 10:35:15 +0200 | 
| commit | c1ba1a0fec4aed430709030f98a3bdb90bfeea16 (patch) | |
| tree | 3df18657e50a0313ed6defcda30e4474cb28a467 /src/cmd/ld/dwarf.c | |
| parent | 7b15ed9ef455b6b66c6b376898a88aef5d6a9970 (diff) | |
| download | golang-c1ba1a0fec4aed430709030f98a3bdb90bfeea16.tar.gz | |
Imported Upstream version 2011.04.27upstream/2011.04.27
Diffstat (limited to 'src/cmd/ld/dwarf.c')
| -rw-r--r-- | src/cmd/ld/dwarf.c | 22 | 
1 files changed, 8 insertions, 14 deletions
| diff --git a/src/cmd/ld/dwarf.c b/src/cmd/ld/dwarf.c index fa55fcbb4..98b068008 100644 --- a/src/cmd/ld/dwarf.c +++ b/src/cmd/ld/dwarf.c @@ -1376,20 +1376,18 @@ synthesizemaptypes(DWDie *die)  static void  synthesizechantypes(DWDie *die)  { -	DWDie *sudog, *waitq, *link, *hchan, +	DWDie *sudog, *waitq, *hchan,  		*dws, *dww, *dwh, *elemtype;  	DWAttr *a; -	int elemsize, linksize, sudogsize; +	int elemsize, sudogsize;  	sudog = defgotype(lookup_or_diag("type.runtime.sudog"));  	waitq = defgotype(lookup_or_diag("type.runtime.waitq")); -	link  = defgotype(lookup_or_diag("type.runtime.link"));  	hchan = defgotype(lookup_or_diag("type.runtime.hchan")); -	if (sudog == nil || waitq == nil || link == nil || hchan == nil) +	if (sudog == nil || waitq == nil || hchan == nil)  		return;  	sudogsize = getattr(sudog, DW_AT_byte_size)->value; -	linksize = getattr(link, DW_AT_byte_size)->value;  	for (; die != nil; die = die->link) {  		if (die->abbrev != DW_ABRV_CHANTYPE) @@ -1422,7 +1420,7 @@ synthesizechantypes(DWDie *die)  		copychildren(dwh, hchan);  		substitutetype(dwh, "recvq", dww);  		substitutetype(dwh, "sendq", dww); -		substitutetype(dwh, "free", dws); +		substitutetype(dwh, "free", defptrto(dws));  		newattr(dwh, DW_AT_byte_size, DW_CLS_CONSTANT,  			getattr(hchan, DW_AT_byte_size)->value, NULL); @@ -2569,12 +2567,8 @@ dwarfaddpeheaders(void)  	newPEDWARFSection(".debug_line", linesize);  	newPEDWARFSection(".debug_frame", framesize);  	newPEDWARFSection(".debug_info", infosize); -	if (pubnamessize > 0) -		newPEDWARFSection(".debug_pubnames", pubnamessize); -	if (pubtypessize > 0) -		newPEDWARFSection(".debug_pubtypes", pubtypessize); -	if (arangessize > 0) -		newPEDWARFSection(".debug_aranges", arangessize); -	if (gdbscriptsize > 0) -		newPEDWARFSection(".debug_gdb_scripts", gdbscriptsize); +	newPEDWARFSection(".debug_pubnames", pubnamessize); +	newPEDWARFSection(".debug_pubtypes", pubtypessize); +	newPEDWARFSection(".debug_aranges", arangessize); +	newPEDWARFSection(".debug_gdb_scripts", gdbscriptsize);  } | 
