This is the mail archive of the
mailing list for the glibc project.
Re: Fix -Os getc_unlocked linknamespace, localplt issues (bug 15105, bug 19463)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 21 Feb 2018 09:02:32 -0800
- Subject: Re: Fix -Os getc_unlocked linknamespace, localplt issues (bug 15105, bug 19463)
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.email@example.com>
On Fri, Feb 16, 2018 at 10:10 AM, Joseph Myers <firstname.lastname@example.org> wrote:
> Continuing the fixes for linknamespace and localplt test failures with
> -Os that arise from functions not being inlined in that case, this
> patch fixes such failures for getc_unlocked. This is relative to a
> tree with <https://sourceware.org/ml/libc-alpha/2018-02/msg00442.html>
> (pending review) applied, but has only trivial textual dependence on
> that patch.
> __getc_unlocked already exists; this patch makes it explicitly hidden,
> calls it where needed for namespace reasons, adds an inline function
> for it when inline functions are used and adds libc_hidden_proto /
> libc_hidden_weak for getc_unlocked.
> Tested for x86_64 (both without -Os to make sure that case continues
> to work, and with -Os to make sure all the relevant linknamespace and
> localplt test failures are resolved). Because of other such failures
> that remain after this patch, neither of the bugs can yet be closed.
> 2018-02-16 Joseph Myers <email@example.com>
> [BZ #15105]
> [BZ #19463]
> * libio/getc_u.c (getc_unlocked): Use libc_hidden_weak.
> * include/stdio.h [!_ISOMAC] (__getc_unlocked): Use
> attribute_hidden, and define inline if [__USE_EXTERN_INLINES].
> [!_ISOMAC] (getc_unlocked): Use libc_hidden_proto.
> * misc/getttyent.c (__getttyent): Call __getc_unlocked instead of
> * time/tzfile.c (__tzfile_read): Likewise.