From: Florian Weimer Date: Thu, 5 Jul 2018 20:57:45 +0000 (+0200) Subject: Build csu/elf-init.c and csu/static-reloc.c with stack protector X-Git-Tag: glibc-2.28~115 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3a885c1f51b18852869a91cf59a1b39da1595c7a;p=thirdparty%2Fglibc.git Build csu/elf-init.c and csu/static-reloc.c with stack protector This does not change generated code (with -fstack-protector-strong), but is important for formal compiler flags compliance. Reviewed-by: Carlos O'Donell --- diff --git a/ChangeLog b/ChangeLog index 3bfd61a44a0..5a1f291b858 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-07-05 Florian Weimer + + * csu/Makefile (CFLAGS-static-reloc.os): Build with stack + protector. + (CFLAGS-elf-init.oS): Likewise. + 2018-07-05 Florian Weimer Carlos O'Donell diff --git a/csu/Makefile b/csu/Makefile index f3498960f89..88fc77662ef 100644 --- a/csu/Makefile +++ b/csu/Makefile @@ -50,6 +50,22 @@ CFLAGS-.o += $(no-stack-protector) CFLAGS-.op += $(no-stack-protector) CFLAGS-.os += $(no-stack-protector) +# Dummy object not actually used for anything. It is linked into +# crt1.o nevertheless, which in turn is statically linked into +# applications, so that build flags matter. +# See . +# NB: Using $(stack-protector) in this way causes a wrong definition +# STACK_PROTECTOR_LEVEL due to the preceding $(no-stack-protector), +# but it does not matter for this source file. +CFLAGS-static-reloc.os += $(stack-protector) + +# This file is not actually part of the startup code in the nonshared +# case and statically linked into applications. See +# , +# . +# Also see the note above regarding STACK_PROTECTOR_LEVEL. +CFLAGS-elf-init.oS += $(stack-protector) + ifeq (yes,$(build-shared)) extra-objs += S$(start-installed-name) gmon-start.os ifneq ($(start-installed-name),$(static-start-installed-name))