From 04bf7d2d8a79bf8d06ca811518688ccda190b376 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 3 Aug 2023 21:16:41 +0200 Subject: chk: Add and fix hidden builtin definitions for *_chk Otherwise on gnu-i686 there are unwanted PLT entries in libc.so when fortification is enabled. Tested for i686-gnu, x86_64-gnu, i686-linux-gnu and x86_64-linux-gnu --- debug/longjmp_chk.c | 1 + debug/strncpy_chk.c | 1 + 2 files changed, 2 insertions(+) (limited to 'debug') diff --git a/debug/longjmp_chk.c b/debug/longjmp_chk.c index 1bc33c5..c527e22 100644 --- a/debug/longjmp_chk.c +++ b/debug/longjmp_chk.c @@ -21,3 +21,4 @@ #define __libc_siglongjmp __longjmp_chk #include +libc_hidden_def (__longjmp_chk) diff --git a/debug/strncpy_chk.c b/debug/strncpy_chk.c index cb142b8..966df27 100644 --- a/debug/strncpy_chk.c +++ b/debug/strncpy_chk.c @@ -27,3 +27,4 @@ __strncpy_chk (char *s1, const char *s2, size_t n, size_t s1len) return strncpy (s1, s2, n); } +libc_hidden_builtin_def (__strncpy_chk) -- cgit v1.1