1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00

Exclude routines from fortification

Since the _FORTIFY_SOURCE feature uses some routines of Glibc, they need to
be excluded from the fortification.

On top of that:
 - some tests explicitly verify that some level of fortification works
   appropriately, we therefore shouldn't modify the level set for them.
 - some objects need to be build with optimization disabled, which
   prevents _FORTIFY_SOURCE to be used for them.

Assembler files that implement architecture specific versions of the
fortified routines were not excluded from _FORTIFY_SOURCE as there is no
C header included that would impact their behavior.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
Frédéric Bérat
2023-03-17 10:17:28 +01:00
parent 64d9580cdf
commit 20c894d21e
17 changed files with 248 additions and 26 deletions

View File

@ -118,6 +118,23 @@ routines := \
xpg-strerror \
# routines
# Exclude fortified routines from being built with _FORTIFY_SOURCE
routines_no_fortify += \
explicit_bzero \
memcpy \
memmove \
mempcpy \
memset \
stpcpy \
stpncpy \
strcat \
strcpy \
strlcat \
strlcpy \
strncat \
strncpy \
# routines_no_fortify
tests := \
bug-envz1 \
bug-strcoll1 \