OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

153 lines
5.5 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../modutils/gcc-4.0.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. --- modutils-2.4.27/obj/obj_kallsyms.c.vanilla 2005-08-29 07:31:59.000000000 +0200
  17. +++ modutils-2.4.27/obj/obj_kallsyms.c 2005-08-29 07:42:14.000000000 +0200
  18. @@ -200,8 +200,8 @@
  19. /* Initial contents, header + one entry per input section. No strings. */
  20. osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec);
  21. - a_hdr = (struct kallsyms_header *) osec->contents =
  22. - xmalloc(osec->header.sh_size);
  23. + osec->contents = xmalloc(osec->header.sh_size);
  24. + a_hdr = (struct kallsyms_header *) osec->contents;
  25. memset(osec->contents, 0, osec->header.sh_size);
  26. a_hdr->size = sizeof(*a_hdr);
  27. a_hdr->sections = loaded;
  28. @@ -275,8 +275,8 @@
  29. a_hdr->symbol_off +
  30. a_hdr->symbols*a_hdr->symbol_size +
  31. strings_size - strings_left;
  32. - a_hdr = (struct kallsyms_header *) osec->contents =
  33. - xrealloc(a_hdr, a_hdr->total_size);
  34. + osec->contents = xrealloc(a_hdr, a_hdr->total_size);
  35. + a_hdr = (struct kallsyms_header *) osec->contents;
  36. p = (char *)a_hdr + a_hdr->symbol_off;
  37. memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size);
  38. free(symbols);
  39. --- modutils-2.4.27/example/kallsyms.c.vanilla 2005-08-29 07:42:33.000000000 +0200
  40. +++ modutils-2.4.27/example/kallsyms.c 2005-08-29 07:42:53.000000000 +0200
  41. @@ -48,6 +48,8 @@
  42. static struct module *local_module_list;
  43. +static int errors;
  44. +
  45. static void get_module_list(void)
  46. {
  47. const struct kallsyms_header *ka_hdr;
  48. --- modutils-2.4.27/depmod/depmod.c.vanilla 2005-08-29 07:45:03.000000000 +0200
  49. +++ modutils-2.4.27/depmod/depmod.c 2005-08-29 07:46:24.000000000 +0200
  50. @@ -60,6 +60,8 @@
  51. #define __u8 u_int8_t
  52. #endif
  53. +static int errors;
  54. +
  55. typedef struct SYMBOL{
  56. struct SYMBOL *next; /* List connected via hashing */
  57. struct MODULE *module; /* Module declaring this symbol */
  58. @@ -1132,8 +1134,10 @@
  59. return -1;
  60. for (ksym = ksyms; so_far < nksyms; ++so_far, ksym++) {
  61. - if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0)
  62. - ((char *)ksym->name) += 8;
  63. + if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0) {
  64. + char* n = ksym->name; n += 8;
  65. + ksym->name = n;
  66. + }
  67. assert(n_syms < MAX_MAP_SYM);
  68. symtab[n_syms++] = addsym((char *)ksym->name, mod, SYM_DEFINED, 0);
  69. }
  70. --- modutils-2.4.27/insmod/rmmod.c.vanilla 2005-08-29 07:40:57.000000000 +0200
  71. +++ modutils-2.4.27/insmod/rmmod.c 2005-08-29 07:41:32.000000000 +0200
  72. @@ -51,6 +51,8 @@
  73. #define main rmmod_main
  74. #endif
  75. +static int errors;
  76. +
  77. struct module_parm {
  78. struct obj_symbol *sym;
  79. int max;
  80. --- modutils-2.4.27/insmod/kallsyms.c.vanilla 2005-08-29 07:43:40.000000000 +0200
  81. +++ modutils-2.4.27/insmod/kallsyms.c 2005-08-29 07:43:51.000000000 +0200
  82. @@ -37,6 +37,8 @@
  83. extern int kallsyms_main_32(int argc, char **argv);
  84. extern int kallsyms_main_64(int argc, char **argv);
  85. +int errors;
  86. +
  87. /*======================================================================*/
  88. /* For common 3264 code, only compile the usage message once, in the 64 bit version */
  89. --- modutils-2.4.27/insmod/insmod.c.vanilla 2005-08-29 07:34:20.000000000 +0200
  90. +++ modutils-2.4.27/insmod/insmod.c 2005-08-29 07:40:32.000000000 +0200
  91. @@ -100,6 +100,7 @@
  92. static int n_ext_modules_used;
  93. static int m_has_modinfo;
  94. static int gplonly_seen;
  95. +static int errors;
  96. static int warnings;
  97. extern int insmod_main(int argc, char **argv);
  98. @@ -274,8 +275,11 @@
  99. */
  100. if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
  101. gplonly_seen = 1;
  102. - if (gpl)
  103. - ((char *)s->name) += 8;
  104. + if (gpl) {
  105. + char* n = (char*) s->name;
  106. + n += 8;
  107. + s->name = n;
  108. + }
  109. else
  110. continue;
  111. }
  112. --- modutils-2.4.27/include/util.h.vanilla 2005-08-29 07:38:19.000000000 +0200
  113. +++ modutils-2.4.27/include/util.h 2005-08-29 07:38:30.000000000 +0200
  114. @@ -40,7 +40,7 @@
  115. /* Error logging */
  116. extern int log;
  117. -extern int errors;
  118. +//extern int errors;
  119. extern const char *error_file;
  120. extern int flag_verbose;
  121. --- ./obj/obj_ppc.c.vanilla 2005-10-27 01:18:59.247661544 +0300
  122. +++ ./obj/obj_ppc.c 2005-10-27 01:19:35.521739000 +0300
  123. @@ -255,7 +255,7 @@
  124. archdata_sec->header.sh_size = 0;
  125. sec = obj_find_section(f, "__ftr_fixup");
  126. if (sec) {
  127. - ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));
  128. + ad = (archdata_sec->contents) = xmalloc(sizeof(*ad));
  129. memset(ad, 0, sizeof(*ad));
  130. archdata_sec->header.sh_size = sizeof(*ad);
  131. ad->__start___ftr_fixup = sec->header.sh_addr;
  132. --- modutils-2.4.27/obj/obj_mips.c.vanilla 2005-11-13 17:55:36.000000000 +0100
  133. +++ modutils-2.4.27/obj/obj_mips.c 2005-11-13 17:55:52.000000000 +0100
  134. @@ -244,7 +244,7 @@
  135. archdata_sec->header.sh_size = 0;
  136. sec = obj_find_section(f, "__dbe_table");
  137. if (sec) {
  138. - ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));
  139. + ad = /* (struct archdata *)*/ (archdata_sec->contents) = xmalloc(sizeof(*ad));
  140. memset(ad, 0, sizeof(*ad));
  141. archdata_sec->header.sh_size = sizeof(*ad);
  142. ad->__start___dbe_table = sec->header.sh_addr;