This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: _IO_check_libio miscompiled on mips64el


On 2016-06-04 16:51, Florian Weimer wrote:
> On 06/04/2016 03:39 PM, Aurelien Jarno wrote:
> > Hi all,
> > 
> > The problem I report here looks like a GCC issue, but given it affects
> > the GNU libc, I am also asking for help here. I have found that the
> > function _IO_check_libio in libio/oldstdfiles.c is not compiled
> > correctly on mips64el-linux-gnuabi64 when using GCC >= 4.9. The
> > _IO_stdin_ symbol appears in the .data.rel.local section while I think
> > it should be in the data.rel section just like  _IO_stdout_ and
> > _IO_stderr_. This causes, among other things, lua to fail to work
> > correctly.
> 
> _IO_check_libio should do nothing at all because _IO_stdin_used is defined
> in all current binaries.  If the definitions in oldstdfiles.c make *any*
> difference, this is (perhaps another) bug.

Indeed, you are correct. It appears that most binaries define it, but
the /usr/bin/lua binary doesn't for a reason I haven't identified yet.
It is not specific to mips64el and can also be seen on i386.

> Does this mechanism work in previous GCC versions, i.e. _IO_stdin_used is
> defined there?

It's the same with previous GCC versions, _IO_stdin_used is not defined
in the /usr/bin/lua binary so the whole conditional code is executed,
that said the resulting libc works with lua.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]