[PATCH] Add private_function for private functions within glibc [BZ #21598]

Joseph Myers joseph@codesourcery.com
Tue Aug 8 21:13:00 GMT 2017


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



More information about the Libc-alpha mailing list