www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Alloca copy: What's _pastdata?

I'm creating a minimal DRuntime (for messing around). Right now, 
I have a very basic program that doesn't even link to the C 
runtime, and uses syscalls for everything. I'm trying to 
implement alloca so that I can parse arguments (long story), and 
so I went to druntime/src/rt/alloca.d.

Everything I found there looked OK except for _pastdata.
I saw the comment before the function declaration declaring 
_pastdata to be an extern C variable, and I defined it as such. 
DMD failed to compile, saying that it cannot load from TLS. I 
then added '__gshared' to the declaration, but DMD failed again, 
saying "Cannot directly load global variable with PIC code." Is 
there any way I can get alloca to work?
Apr 02 2018