diff options
author | Russ Cox <rsc@golang.org> | 2010-04-27 22:40:26 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-04-27 22:40:26 -0700 |
commit | 9febb2629da0a0104979998947689ff2722ed743 (patch) | |
tree | 7db5ba59a0995dd0eb21073fa33d25b800ea844e /src/cmd/5l/span.c | |
parent | d73000e8e65eff91259019ccbde72998c1df3551 (diff) | |
download | golang-9febb2629da0a0104979998947689ff2722ed743.tar.gz |
5l, 6l, 8l, runtime: make -s binaries work
5l, 6l, 8l: change ELF header so that strip doesn't destroy binary
Fixes issue 261.
R=iant, r
CC=golang-dev
http://codereview.appspot.com/994044
Diffstat (limited to 'src/cmd/5l/span.c')
-rw-r--r-- | src/cmd/5l/span.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cmd/5l/span.c b/src/cmd/5l/span.c index 1272b05ec..a97af07f9 100644 --- a/src/cmd/5l/span.c +++ b/src/cmd/5l/span.c @@ -708,6 +708,10 @@ aclass(Adr *a) s->name, TNAME); s->type = SDATA; } + if(s->type == SFIXED) { + instoffset = s->value + a->offset; + return C_LCON; + } instoffset = s->value + a->offset + INITDAT; if(s->type == STEXT || s->type == SLEAF || s->type == SUNDEF) { instoffset = s->value + a->offset; @@ -756,6 +760,9 @@ aclass(Adr *a) s->name, TNAME); s->type = SDATA; break; + case SFIXED: + instoffset = s->value + a->offset; + return C_LCON; case SUNDEF: case STEXT: case SSTRING: |