1. A method for resolving an initialization order of static objects located in a plurality of object files using a processor device, comprising: for each object file, categorizing the objects in the object file as defined static objects or undefined objects; creating a directed graph of the plurality of object files; and applying topological sorting to the directed graph to yield an order of the plurality of object files that ensures a correct initialization of the static objects.