WIP/RFC patch for Linux termios overhaul
Andreas Schwab
schwab@suse.de
Wed Mar 26 09:28:26 GMT 2025
On Mär 25 2025, H. Peter Anvin wrote:
> My biggest confusion at this point is the libc_hidden_proto () definitions
> in <include/termios.h>:
>
> /* Now define the internal interfaces. */
> extern int __tcgetattr (int __fd, struct termios *__termios_p);
> extern int __tcsetattr (int __fd, int __optional_actions,
> const struct termios *__termios_p);
>
> extern int __libc_tcdrain (int __fd);
>
> libc_hidden_proto (__tcgetattr)
> libc_hidden_proto (tcsetattr)
> libc_hidden_proto (cfsetispeed)
> libc_hidden_proto (cfsetospeed)
>
> This seems... random?! which ones are declared that way?
Those that need it. All libc-internal references require those aliases.
> The result in my case is that the alias symbols for cfset[io]speed() end
> up marked hidden in libc.a, whereas cfget[io]speed() are not. This seems
> broken...
The visibility is irrelevant for a static link.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Libc-alpha
mailing list