On Saturday, March 18, 2017, Mark Kettenis <mark.kette...@xs4all.nl> wrote:

> The way lld applies version scripts is a bit broken for
> linker-generated symbols.  In particular, even if you explicitly mark
> rhose symbols als global, they will end up local if that's the default.
> So even with the following version script:
>
>   { global: _end; local: *; };
>
> The linker-generated _end will end up as a local symbol.
> Unfortunately our brk()/sbrk() implementation relies on _end being
> global.  The diff below adds a workaround while I take this up with
> upstream.
>
> ok?
>

I guess the alternative would be to change crt0 to pass &_end as an
additional argument to _csu_finish(), which could then set a variable local
to libc for brk/sbrk to use...but that'll require a major bump and now is
not the time for that.

So yeah, this diff seems like the reasonable fix for now.


Philip

Reply via email to