Bug 71155 - symbol in wrong section .data.rel.local on mips64el
Summary: symbol in wrong section .data.rel.local on mips64el
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-16 22:50 UTC by Aurelien Jarno
Modified: 2016-05-17 06:49 UTC (History)
0 users

See Also:
Host: mips64el-linux-gnuabi64
Target: mips64el-linux-gnuabi64
Build: mips64el-linux-gnuabi64
Known to work: 4.8.5
Known to fail: 4.9.3, 5.3.1, 6.1.1, 7.0
Last reconfirmed:


Attachments
preprocessed source file (46.81 KB, text/plain)
2016-05-16 22:50 UTC, Aurelien Jarno
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aurelien Jarno 2016-05-16 22:50:25 UTC
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:
https://gcc.gnu.org/ml/gcc-patches/2014-01/msg01169.html

I have attached the preprocessed source file, the original source file can be found there:
https://sourceware.org/git/?p=glibc.git;a=blob;f=libio/oldstdfiles.c;h=609b7d9ef2d78f851a29b3d25efbb03f9c76ca91;hb=HEAD