Super Mario 64s source code (from a leak on 4chan so be careful)
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.

83 lines
2.5 KiB

6 years ago
  1. #ifndef _PREVENT_BSS_REORDERING_H
  2. #define _PREVENT_BSS_REORDERING_H
  3. /**
  4. * To determine variable order for .bss, the compiler sorts variables by their
  5. * "name index" mod 256, where name index is something that, with -g, gets
  6. * incremented by struct and variable declarations, typedefs, and file markers,
  7. * among else. (Without -g, only variable declarations affects the index.)
  8. * This file contains enough dummy declarations to bump the index by 128.
  9. * Including it, or removing the include, should fix bss reordering problems
  10. * for a file, assuming the name index distance between its first and last bss
  11. * variable is at most 128.
  12. * Note that if a variable is declared "extern" within a header file, the name
  13. * index is taken at that point of the extern declaration. Thus, this include
  14. * must come before any such header.
  15. */
  16. struct Dummy0 { int x; };
  17. struct Dummy1 { int x; };
  18. struct Dummy2 { int x; };
  19. struct Dummy3 { int x; };
  20. struct Dummy4 { int x; };
  21. struct Dummy5 { int x; };
  22. struct Dummy6 { int x; };
  23. struct Dummy7 { int x; };
  24. struct Dummy8 { int x; };
  25. struct Dummy9 { int x; };
  26. struct Dummy10 { int x; };
  27. struct Dummy11 { int x; };
  28. struct Dummy12 { int x; };
  29. struct Dummy13 { int x; };
  30. struct Dummy14 { int x; };
  31. struct Dummy15 { int x; };
  32. struct Dummy16 { int x; };
  33. struct Dummy17 { int x; };
  34. struct Dummy18 { int x; };
  35. struct Dummy19 { int x; };
  36. struct Dummy20 { int x; };
  37. struct Dummy21 { int x; };
  38. struct Dummy22 { int x; };
  39. struct Dummy23 { int x; };
  40. struct Dummy24 { int x; };
  41. struct Dummy25 { int x; };
  42. struct Dummy26 { int x; };
  43. struct Dummy27 { int x; };
  44. struct Dummy28 { int x; };
  45. struct Dummy29 { int x; };
  46. struct Dummy30 { int x; };
  47. struct Dummy31 { int x; };
  48. struct Dummy32 { int x; };
  49. struct Dummy33 { int x; };
  50. struct Dummy34 { int x; };
  51. struct Dummy35 { int x; };
  52. struct Dummy36 { int x; };
  53. struct Dummy37 { int x; };
  54. struct Dummy38 { int x; };
  55. struct Dummy39 { int x; };
  56. struct Dummy40 { int x; };
  57. struct Dummy41 { int x; };
  58. struct Dummy42 { int x; };
  59. struct Dummy43 { int x; };
  60. struct Dummy44 { int x; };
  61. struct Dummy45 { int x; };
  62. struct Dummy46 { int x; };
  63. struct Dummy47 { int x; };
  64. struct Dummy48 { int x; };
  65. struct Dummy49 { int x; };
  66. struct Dummy50 { int x; };
  67. struct Dummy51 { int x; };
  68. struct Dummy52 { int x; };
  69. struct Dummy53 { int x; };
  70. struct Dummy54 { int x; };
  71. struct Dummy55 { int x; };
  72. struct Dummy56 { int x; };
  73. struct Dummy57 { int x; };
  74. struct Dummy58 { int x; };
  75. struct Dummy59 { int x; };
  76. struct Dummy60 { int x; };
  77. struct Dummy61 { int x; };
  78. struct Dummy62 { int x; };
  79. typedef int Dummy63;
  80. #endif