Removing internal_function

Florian Weimer fweimer@redhat.com
Mon Apr 3 15:06:00 GMT 2017


Should we remove internal_function?  It's only used on i386 and causes 
portability hazards due to the i386-specific build failures it can 
introduce.  (Unlike attribute_hidden and most other function attributes, 
internal_function has to be repeated on both declaration and definition.)

internal_function specifies an alternative calling convention.  For 
static functions, GCC has been doing similar optimizations for a long 
time.  I assume internal_function could disable those optimizations by 
explicitly specifying a different (less optimal) calling convention.

The original intent was that internal_function would not be used across 
DSO boundaries (because the non-ABI calling convention), but we no 
longer stick to that.

Disabling internal_function appears to increase the text size of 
libc.so.6 by about 8K, or 0.45%.  Considering the relative importance of 
the i386 target today, I think this is a reasonable trade-off for the 
avoidance of spurious build failures.

Comments?

Thanks,
Florian



More information about the Libc-alpha mailing list