![]() |
Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
|
To determine variable order for .bss, the compiler sorts variables by their "name index" mod 256, where name index is something that, with -g, gets incremented by struct and variable declarations, typedefs, and file markers, among else. More...
#include <prevent_bss_reordering.h>
Data Fields | |
int | x |
To determine variable order for .bss, the compiler sorts variables by their "name index" mod 256, where name index is something that, with -g, gets incremented by struct and variable declarations, typedefs, and file markers, among else.
(Without -g, only variable declarations affects the index.) This file contains enough dummy declarations to bump the index by 128. Including it, or removing the include, should fix bss reordering problems for a file, assuming the name index distance between its first and last bss variable is at most 128. Note that if a variable is declared "extern" within a header file, the name index is taken at that point of the extern declaration. Thus, this include must come before any such header.
int Dummy0::x |