Index: src/cmd/ld/decodesym.c |
=================================================================== |
--- a/src/cmd/ld/decodesym.c |
+++ b/src/cmd/ld/decodesym.c |
@@ -70,14 +70,28 @@ |
static int |
commonsize(void) |
{ |
- return 7*PtrSize + 8; |
+ return 8*PtrSize + 8; |
} |
// Type.commonType.kind |
uint8 |
decodetype_kind(LSym *s) |
{ |
- return s->p[1*PtrSize + 7] & ~KindNoPointers; // 0x13 / 0x1f |
+ return s->p[1*PtrSize + 7] & KindMask; // 0x13 / 0x1f |
+} |
+ |
+// Type.commonType.kind |
+uint8 |
+decodetype_noptr(LSym *s) |
+{ |
+ return s->p[1*PtrSize + 7] & KindNoPointers; // 0x13 / 0x1f |
+} |
+ |
+// Type.commonType.kind |
+uint8 |
+decodetype_usegcprog(LSym *s) |
+{ |
+ return s->p[1*PtrSize + 7] & KindGCProg; // 0x13 / 0x1f |
} |
// Type.commonType.size |
@@ -89,9 +103,15 @@ |
// Type.commonType.gc |
LSym* |
-decodetype_gc(LSym *s) |
+decodetype_gcprog(LSym *s) |
{ |
- return decode_reloc_sym(s, 1*PtrSize + 8 + 1*PtrSize); |
+ return decode_reloc_sym(s, 1*PtrSize + 8 + 2*PtrSize); |
+} |
+ |
+uint8* |
+decodetype_gcmask(LSym *s) |
+{ |
+ return (uint8*)(s->p + 1*PtrSize + 8 + 1*PtrSize); |
} |
// Type.ArrayType.elem and Type.SliceType.Elem |