Bladeren bron

Disabling stack protector

For those OSes that has it enabled by default

Signed-off-by: Álvaro Jurado <elbingmiss@gmail.com>
Álvaro Jurado 6 jaren geleden
bovenliggende
commit
de343e15da
3 gewijzigde bestanden met toevoegingen van 4 en 0 verwijderingen
  1. 1 0
      amd64/include/cflags.json
  2. 1 0
      amd64/include/klib.json
  3. 2 0
      sys/src/9/amd64/core.json

+ 1 - 0
amd64/include/cflags.json

@@ -4,6 +4,7 @@
 			"-ffreestanding",
 			"-fno-builtin",
 			"-fno-omit-frame-pointer",
+			"-fno-stack-protector",
 			"-g",
 			"-gdwarf-2",
 			"-ggdb",

+ 1 - 0
amd64/include/klib.json

@@ -6,6 +6,7 @@
 			"-mno-red-zone",
 			"-ffreestanding",
 			"-fno-builtin",
+			"-fno-stack-protector",
 			"-Wall",
 			"-Werror",
 			"-g"

+ 2 - 0
sys/src/9/amd64/core.json

@@ -2,6 +2,8 @@
 	"core": {
 		"Cflags": [
 			"-fno-stack-protector",
+			"-mindirect-branch=keep",
+			"-mfunction-return=keep",
 			"-mcmodel=kernel",
 			"-O0",
 			"-static",