aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/5l
diff options
context:
space:
mode:
authorDave Cheney <dave@cheney.net>2013-01-20 20:14:24 +1100
committerDave Cheney <dave@cheney.net>2013-01-20 20:14:24 +1100
commit9b568ef2b86ad383e5db9bc57723d4ce554a319e (patch)
treed07037adc09e6d9c08ac6cb6ede222704817531d /src/cmd/5l
parent42c86828b17146bde52e8b804174012e99d455fc (diff)
downloadgo-9b568ef2b86ad383e5db9bc57723d4ce554a319e.tar.xz
cmd/5l: reduce the size of Prog and Sym
Prog * Remove the unused Prog* dlink * note that align is also unused, but removing it does not help due to alignment issues. Saves 4 bytes, sizeof(Prog): 84 => 80. Sym * Align {u,}char fields on word boundaries Saves 4 bytes, sizeof(Sym): 136 => 132. Tested on linux/arm and freebsd/arm. R=minux.ma, remyoudompheng, rsc CC=golang-dev https://golang.org/cl/7106050
Diffstat (limited to 'src/cmd/5l')
-rw-r--r--src/cmd/5l/l.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cmd/5l/l.h b/src/cmd/5l/l.h
index 69c8557878..21a3bced8e 100644
--- a/src/cmd/5l/l.h
+++ b/src/cmd/5l/l.h
@@ -108,7 +108,6 @@ struct Prog
} u0;
Prog* cond;
Prog* link;
- Prog* dlink;
int32 pc;
int32 line;
int32 spadj;
@@ -117,7 +116,7 @@ struct Prog
uchar as;
uchar scond;
uchar reg;
- uchar align;
+ uchar align; // unused
};
#define regused u0.u0regused
@@ -136,8 +135,6 @@ struct Sym
uchar reachable;
uchar dynexport;
uchar leaf;
- uchar stkcheck;
- uchar hide;
int32 dynid;
int32 plt;
int32 got;
@@ -148,6 +145,8 @@ struct Sym
int32 elfsym;
uchar special;
uchar fnptr; // used as fn ptr
+ uchar stkcheck;
+ uchar hide;
Sym* hash; // in hash table
Sym* allsym; // in all symbol list
Sym* next; // in text or data list