In this paper we present co-transformation, a novel approach to the mapping of execution information from the source code of a program to the object code for the purpose of worst-case execution time (WCET) analysis. Our approach is designed to handle the problems introduced by optimizing compilers, i.e. that the structure of the object code is very different from the structure of the source code. The co-transformer allows us to keep track of how different compiler transformations, including optimizations, influence the execution time of a program. This allows us to statically calculate the execution time of a program at the object code level, using information about the program execution obtained at the source code level.