1. A method for improving performance of a processor having a defective cache, the method comprising: accessing first object code; and generating second object code from the first object code, the generation of the second object code taking into account one or more locations of one or more defects in a cache on a processor such that one or more instructions in the second object code are written only to nondefective locations in the cache.