https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85894
--- Comment #4 from Rogerio Alves <rcardoso at linux dot vnet.ibm.com> --- (In reply to Tulio Magno Quites Machado Filho from comment #2) > This is loading 0 because of glibc bug #21895, where the TOC pointer is not > restored in the stack frame for static programs. > That's why the the segfault happens. Yes it's happening because TOC pointer is not being restored. In fact I already sent a patch to libc that fix this. But, I was not sure about this behavior on alloca.