[7/7] Remove set-hooks.h from generic includes

Message ID 20221115193159.173838-8-adhemerval.zanella@linaro.org
State New
Headers
Series Fixing remaining lld issues |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit success Build for i686

Commit Message

Adhemerval Zanella Netto Nov. 15, 2022, 7:31 p.m. UTC
  The hooks mechanism uses symbol sets for running lists of functions,
which requires either extra linker directives to provide any hardening
(such RELRO) or additional code (such as pointer obfuscation via
mangling with random value).

Currently only hurd uses it and there multiple examples where using
direct function call provides both hardening and good code generation
without the need to extra link or code handling (for instance
nptl/nptlfreeres.c).
---
 {include => hurd}/set-hooks.h  | 0
 nptl/nptlfreeres.c             | 1 -
 sysdeps/mach/hurd/bits/errno.h | 1 -
 3 files changed, 2 deletions(-)
 rename {include => hurd}/set-hooks.h (100%)
  

Patch

diff --git a/include/set-hooks.h b/hurd/set-hooks.h
similarity index 100%
rename from include/set-hooks.h
rename to hurd/set-hooks.h
diff --git a/nptl/nptlfreeres.c b/nptl/nptlfreeres.c
index c67456d9d3..90b7b13287 100644
--- a/nptl/nptlfreeres.c
+++ b/nptl/nptlfreeres.c
@@ -16,7 +16,6 @@ 
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <set-hooks.h>
 #include <libc-symbols.h>
 #include <pthreadP.h>
 #include <nptl-stack.h>