blob: 32e64392b730cd314aa93acad2df6cb389c1fd80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
diff -Nrup yaboot-1.3.13.orig/Config.gentoo yaboot-1.3.13/Config.gentoo
--- yaboot-1.3.13.orig/Config.gentoo 1970-01-01 00:00:00.000000000 +0000
+++ yaboot-1.3.13/Config.gentoo 2005-06-12 00:41:14.889576152 +0000
@@ -0,0 +1,6 @@
+check_gcc=$(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
+ then echo "$(1)"; else echo "$(2)"; fi)
+
+CFLAGS += $(call check_gcc, -fno-stack-protector)
+CFLAGS += $(call check_gcc, --nopie)
+
diff -Nrup yaboot-1.3.13.orig/Makefile yaboot-1.3.13/Makefile
--- yaboot-1.3.13.orig/Makefile 2004-07-11 20:12:03.000000000 +0000
+++ yaboot-1.3.13/Makefile 2005-06-12 00:41:14.890576000 +0000
@@ -1,6 +1,7 @@
## Setup
include Config
+include Config.gentoo
VERSION = 1.3.13
# Debug mode (spam/verbose)
@@ -79,7 +80,7 @@ HOSTCFLAGS = -O2 $(CFLAGS) -Wall -I/usr/
OBJS = second/crt0.o second/yaboot.o second/cache.o second/prom.o second/file.o \
second/partition.o second/fs.o second/cfg.o second/setjmp.o second/cmdline.o \
second/fs_of.o second/fs_ext2.o second/fs_iso.o second/iso_util.o \
- lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o
+ lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o lib/ssp.o
ifeq ($(USE_MD5_PASSWORDS),y)
OBJS += second/md5.o
diff -Nrup yaboot-1.3.13.orig/lib/ssp.c yaboot-1.3.13/lib/ssp.c
--- yaboot-1.3.13.orig/lib/ssp.c 1970-01-01 00:00:00.000000000 +0000
+++ yaboot-1.3.13/lib/ssp.c 2005-06-12 00:42:17.087120688 +0000
@@ -0,0 +1,17 @@
+unsigned long __guard = 0UL;
+static void __guard_setup (void) __attribute__ ((constructor));
+void __stack_smash_handler (char func[], int damaged
+ __attribute__ ((unused)));
+static void
+__guard_setup (void)
+{
+ if (__guard != 0UL)
+ return;
+ __guard = 0xFF0A0D00UL;
+}
+
+void
+__stack_smash_handler (char func[], int damaged)
+{
+ return;
+}
|