This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add private_function for private functions within glibc [BZ #21598]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 8 Aug 2017 21:12:51 +0000
- Subject: Re: [PATCH] Add private_function for private functions within glibc [BZ #21598]
- Authentication-results: sourceware.org; auth=none
- References: <20170808182536.GA24765@gmail.com>
On Tue, 8 Aug 2017, H.J. Lu wrote:
> since shadow stack doesn't match return stack. We need to use register
> indirect branch via %ecx. That means only 2 parameters can be passed
> in registers for external function calls with lazy binding when shadow
> stack is enabled. However, internal_function, which should be used only
> with hidden function within libc.so, are also used with private function
> calls between different shared objects of glibc.
Should we consider it part of the ABI that users' shared objects, not just
glibc ones, may export functions with regparm calling convention? It's
certainly possible at present, but I don't know how widely used it is.
> This patch removes USE_REGPARMS from config.h.in. Instead, it defines
> internal_function and private_function, which is for private function
> calss between different shared objects, in config.h.in. Currently,
> sysdeps/i386/configure.ac defines private_function as
I'd expect these definitions to go in a sysdeps header (for which i386 has
a version overriding the default version), as suggested in
<https://sourceware.org/ml/libc-alpha/2014-06/msg00784.html>, rather than
being defined directly from a configure.ac file.
--
Joseph S. Myers
joseph@codesourcery.com