misc/sys/cdefs.h: Create FORTIFY redirects for internal calls
authorFrédéric Bérat <fberat@redhat.com>
Wed, 26 Apr 2023 09:32:04 +0000 (11:32 +0200)
committerFrédéric Bérat <fberat@redhat.com>
Wed, 5 Jul 2023 14:59:48 +0000 (16:59 +0200)
commiteea000f6e69a829425fae25a7c2519f5c79551de
tree12d02e16ae0ce9ab2f559d724d69c3a811dc4dbe
parent505c884aeb059ee7741c23d1bfc47956bd9c2a0e
misc/sys/cdefs.h: Create FORTIFY redirects for internal calls

The __REDIRECT* macros are creating aliases which may lead to unwanted
PLT entries when fortification is enabled.
To prevent these entries, the REDIRECT alias should be set to point to the
existing __GI_* aliases.
This is done transparently by creating a __REDIRECT_FORTIFY* version of
these macros, that can be overwritten internally when necessary.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
include/sys/cdefs.h
misc/sys/cdefs.h