aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/modutils/files/gcc4.patch
blob: 53750bc617cd8ec05a40f0527b15a7040f514ccd (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Index: modutils-2.4.27/depmod/depmod.c
===================================================================
--- modutils-2.4.27.orig/depmod/depmod.c
+++ modutils-2.4.27/depmod/depmod.c
@@ -1133,7 +1133,7 @@ static int addksyms(char *file_syms)
 
 		for (ksym = ksyms; so_far < nksyms; ++so_far, ksym++) {
 			if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0)
-				((char *)ksym->name) += 8;
+				ksym->name += 8;
 			assert(n_syms < MAX_MAP_SYM);
 			symtab[n_syms++] = addsym((char *)ksym->name, mod, SYM_DEFINED, 0);
 		}
Index: modutils-2.4.27/genksyms/genksyms.c
===================================================================
--- modutils-2.4.27.orig/genksyms/genksyms.c
+++ modutils-2.4.27/genksyms/genksyms.c
@@ -45,7 +45,7 @@ char *cur_filename, *output_directory;
 int flag_debug, flag_dump_defs, flag_warnings;
 int checksum_version = 1, kernel_version = version(2,0,0);
 
-static int errors;
+int errors;
 static int nsyms;
 
 static struct symbol *expansion_trail;
Index: modutils-2.4.27/insmod/insmod.c
===================================================================
--- modutils-2.4.27.orig/insmod/insmod.c
+++ modutils-2.4.27/insmod/insmod.c
@@ -275,7 +275,7 @@ static int add_symbols_from(struct obj_f
 		if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
 			gplonly_seen = 1;
 			if (gpl)
-				((char *)s->name) += 8;
+				s->name += 8;
 			else
 				continue;
 		}
Index: modutils-2.4.27/obj/obj_kallsyms.c
===================================================================
--- modutils-2.4.27.orig/obj/obj_kallsyms.c
+++ modutils-2.4.27/obj/obj_kallsyms.c
@@ -200,7 +200,7 @@ obj_kallsyms (struct obj_file *fin, stru
 
     /* Initial contents, header + one entry per input section.  No strings. */
     osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec);
-    a_hdr = (struct kallsyms_header *) osec->contents =
+    a_hdr = osec->contents =
     	xmalloc(osec->header.sh_size);
     memset(osec->contents, 0, osec->header.sh_size);
     a_hdr->size = sizeof(*a_hdr);
@@ -275,7 +275,7 @@ obj_kallsyms (struct obj_file *fin, stru
 	a_hdr->symbol_off +
 	a_hdr->symbols*a_hdr->symbol_size +
 	strings_size - strings_left;
-    a_hdr = (struct kallsyms_header *) osec->contents =
+    a_hdr = osec->contents =
 	xrealloc(a_hdr, a_hdr->total_size);
     p = (char *)a_hdr + a_hdr->symbol_off;
     memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size);
Index: modutils-2.4.27/obj/obj_mips.c
===================================================================
--- modutils-2.4.27.orig/obj/obj_mips.c
+++ modutils-2.4.27/obj/obj_mips.c
@@ -244,7 +244,9 @@ arch_archdata (struct obj_file *f, struc
   archdata_sec->header.sh_size = 0;
   sec = obj_find_section(f, "__dbe_table");
   if (sec) {
-    ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));
+/*    ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));*/
+    archdata_sec->contents = xmalloc(sizeof(*ad));
+    ad = (struct archdata *) (archdata_sec->contents);
     memset(ad, 0, sizeof(*ad));
     archdata_sec->header.sh_size = sizeof(*ad);
     ad->__start___dbe_table = sec->header.sh_addr;
Index: modutils-2.4.27/obj/obj_ppc.c
===================================================================
--- modutils-2.4.27.orig/obj/obj_ppc.c
+++ modutils-2.4.27/obj/obj_ppc.c
@@ -255,7 +255,9 @@ arch_archdata (struct obj_file *f, struc
   archdata_sec->header.sh_size = 0;
   sec = obj_find_section(f, "__ftr_fixup");
   if (sec) {
-    ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));
+    /* ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad)); */
+    archdata_sec->contents = xmalloc(sizeof(*ad));
+    ad = (struct archdata *) (archdata_sec->contents);
     memset(ad, 0, sizeof(*ad));
     archdata_sec->header.sh_size = sizeof(*ad);
     ad->__start___ftr_fixup = sec->header.sh_addr;