Skip to content

Commit

Permalink
Makefile: unconditionally disable SSP
Browse files Browse the repository at this point in the history
-fno-stack-protector must also be
passed to avoid linking errors related to undefined references to
'__stack_chk_guard' and '__stack_chk_fail' if toolchain enforces
-fstack-protector.

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
  • Loading branch information
RevySR authored and guoren83 committed Oct 18, 2023
1 parent 5fe1ba6 commit 85ad3d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AR = $(CROSS_COMPILE)ar
LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
CFLAGS = -fPIC
CFLAGS = -fPIC -fno-stack-protector
TARGET = zero_stage_boot
${TARGET}.elf: start.o feature.o jump.o
$(LD) -Tlink.lds $^ -o $@
Expand Down

0 comments on commit 85ad3d2

Please sign in to comment.