[PTX] crt0
Nathan Sidwell
nathan@acm.org
Wed May 25 15:49:00 GMT 2016
On 05/25/16 09:28, Alexander Monakov wrote:
> On Wed, 25 May 2016, Nathan Sidwell wrote:
>
>> This patch reimplements crt0 as C rather than assembly. That means it;ll be
>> good with 32 bit addresses. I've also completely moved abort and exit into
>> newlib (a fork on github), which had it's own copies that failed to set the
>> exit code. Things happened to work because they were never found, being
>> hidden by the ones provided in crt0.s. You'll need to update your newlib
>> sources for exit codes to continue to work.
>
> Doesn't this break offloading compilation?
It won't -- but you're right about .weak not being undefined-is-zero.
>> Or is that something nvptx-run should check for and initialize?
>
> The interface between nvptx-run and crt0 would need to change to allow that.
That is exactly what I'm suggesting. nvptx-run looks for a __soft_stack symbol
and goes poking at it before launch.
nathan
More information about the Gcc-patches
mailing list