Stop dereferencing _end in crt1.c. This was only needed for brk/sbrk so is
no longer needed. Sponsored by: ABT Systems Ltd
This commit is contained in:
parent
fbd6b95ef9
commit
46c1105fbb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300406
@ -71,17 +71,8 @@ __start(int argc, char *argv[], char *env[], void (*cleanup)(void))
|
|||||||
|
|
||||||
if (&_DYNAMIC != NULL)
|
if (&_DYNAMIC != NULL)
|
||||||
atexit(cleanup);
|
atexit(cleanup);
|
||||||
else {
|
else
|
||||||
/*
|
|
||||||
* Hack to resolve _end so we read the correct symbol.
|
|
||||||
* Without this it will resolve to the copy in the library
|
|
||||||
* that firsts requests it. We should fix the toolchain,
|
|
||||||
* however this is is needed until this can take place.
|
|
||||||
*/
|
|
||||||
*(volatile long *)&_end;
|
|
||||||
|
|
||||||
_init_tls();
|
_init_tls();
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef GCRT
|
#ifdef GCRT
|
||||||
atexit(_mcleanup);
|
atexit(_mcleanup);
|
||||||
|
Loading…
Reference in New Issue
Block a user