diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-07-24 17:37:07 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-07-24 17:37:07 +0000 |
commit | 08d22f9b41e46aba888e694f380e78d05c4321a2 (patch) | |
tree | 4bb653dd86ad7900797661b952db05e7dcb8f000 /libgo | |
parent | f735ce315f6d9ee0c67c319d4ad58b65ed4ab28b (diff) | |
download | gcc-08d22f9b41e46aba888e694f380e78d05c4321a2.zip gcc-08d22f9b41e46aba888e694f380e78d05c4321a2.tar.gz gcc-08d22f9b41e46aba888e694f380e78d05c4321a2.tar.bz2 |
runtime: Check _end rather than end to find end of program.
This fixes a problem on Solaris, where end is not defined in
the main program but comes from some shared library. This
only matters for 32-bit targets.
From-SVN: r201220
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/runtime/malloc.goc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/runtime/malloc.goc b/libgo/runtime/malloc.goc index dfab683..4b93e97 100644 --- a/libgo/runtime/malloc.goc +++ b/libgo/runtime/malloc.goc @@ -319,7 +319,7 @@ runtime_mallocinit(void) { byte *p; uintptr arena_size, bitmap_size; - extern byte end[]; + extern byte _end[]; byte *want; uintptr limit; @@ -408,7 +408,7 @@ runtime_mallocinit(void) // So adjust it upward a little bit ourselves: 1/4 MB to get // away from the running binary image and then round up // to a MB boundary. - want = (byte*)(((uintptr)end + (1<<18) + (1<<20) - 1)&~((1<<20)-1)); + want = (byte*)(((uintptr)_end + (1<<18) + (1<<20) - 1)&~((1<<20)-1)); if(0xffffffff - (uintptr)want <= bitmap_size + arena_size) want = 0; p = runtime_SysReserve(want, bitmap_size + arena_size); |