Fix -Os gnu_dev_* linknamespace, localplt issues (bug 15105, bug 19463)

Florian Weimer fweimer@redhat.com
Wed Feb 7 14:48:00 GMT 2018


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
> gnu_dev_makedev.
> 
> 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.

Florian



More information about the Libc-alpha mailing list