gc_globals.mx raw

   1  //go:build baremetal || moxie.wasm
   2  
   3  package runtime
   4  
   5  // This file implements findGlobals for all systems where the start and end of
   6  // the globals section can be found through linker-defined symbols.
   7  
   8  // findGlobals finds all globals (which are reachable by definition) and calls
   9  // the callback for them.
  10  //
  11  // This implementation marks all globals conservatively and assumes it can use
  12  // linker-defined symbols for the start and end of the .data section.
  13  func findGlobals(found func(start, end uintptr)) {
  14  	found(globalsStart, globalsEnd)
  15  }
  16