This is the mail archive of the
mailing list for the glibc project.
Re: Fix -Os gnu_dev_* linknamespace, localplt issues (bug 15105, bug 19463)
- From: Florian Weimer <fweimer at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 7 Feb 2018 15:10:32 +0100
- Subject: Re: Fix -Os gnu_dev_* linknamespace, localplt issues (bug 15105, bug 19463)
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.email@example.com>
On 02/02/2018 06:43 PM, Joseph Myers wrote:
Building with -Os produces linknamespace and localplt failures for,
among other functions, gnu_dev_major, gnu_dev_minor and
The issue is that those functions are not inlined when building with
-Os. While one could force them to be inlined in that case, it seems
more natural to fix this issue similarly to other namespace issues.
Thus, this patch makes gnu_dev_* into weak aliases for hidden symbols
__gnu_dev_*; __gnu_dev_* are then defined as inlines in the internal
include/sys/sysmacros.h, and uses of gnu_dev_* (often via the macros
major, minor and makedev) for which there are namespace issues are
changed to use __gnu_dev_*; where there are no namespace issues, use
of libc_hidden_proto serves to avoid unnecessary local PLT entry use.
Patch looks reasonable. Thanks.