Created attachment 38503 [details]
preprocessed source file
When compiling the GNU libc on mips64el-linux-gnuabi64 with GCC >= 4.9, the resulting libc causes lua 5.2 to not work correcty. It happens this is due to wrong the compilation of libio/oldstdfiles.c. When using GCC <= 4.8, the _IO_stdin_ symbol ends up in the data.rel section just like _IO_stdout_ and _IO_stderr_. When using GCC >= 4.9, the _IO_stdin_ symbol is moved to the .data.rel.local section, while the two others are unchanged.
This is also reproducible with GCC 5 and GCC 6.
The issue seems to have been introduced by the following patch:
I have attached the preprocessed source file, the original source file can be found there: