aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ld/data.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-03-09 11:18:29 -0500
committerRuss Cox <rsc@golang.org>2011-03-09 11:18:29 -0500
commitf0ab14647ad3c61cd13ffd169ef4a64275e87a21 (patch)
treebb040c4939dffb17ae9cdaef9de3f3c4cd0f64c6 /src/cmd/ld/data.c
parentad102e143c9ad6be22ca1ea067daf9bd1ba296fc (diff)
downloadgo-f0ab14647ad3c61cd13ffd169ef4a64275e87a21.tar.xz
ld: preserve symbol sizes during data layout
Fixes the broken linux/amd64 build. The symbol table, itself a symbol, was having its size rounded up to the nearest word boundary. If the rounding add >7 zero bytes then it confused the debug/gosym symbol table parser. So you've got a 1/8 chance to hit the bug on an amd64 system. Just started in the recent change because I fixed the rounding to round to word boundary instead of to 4-byte boundary. R=r CC=golang-dev https://golang.org/cl/4241056
Diffstat (limited to 'src/cmd/ld/data.c')
-rw-r--r--src/cmd/ld/data.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/cmd/ld/data.c b/src/cmd/ld/data.c
index 4066cd8143..848c3637d3 100644
--- a/src/cmd/ld/data.c
+++ b/src/cmd/ld/data.c
@@ -788,7 +788,6 @@ dodata(void)
for(; s != nil && s->type < SDATA; s = s->next) {
s->type = SRODATA;
t = rnd(s->size, PtrSize);
- s->size = t;
s->value = datsize;
datsize += t;
}
@@ -835,7 +834,6 @@ dodata(void)
datsize = rnd(datsize, 4);
else
datsize = rnd(datsize, 8);
- s->size = t;
s->value = datsize;
datsize += t;
}