CompCertELF: Verified Separate Compilation of C Programs into ELF Object Files - Archive ouverte HAL
Communication Dans Un Congrès Année : 2020

CompCertELF: Verified Separate Compilation of C Programs into ELF Object Files

Résumé

We present CompCertELF, the first extension to CompCert that supports verified compilation from C programs all the way to a standard binary file format, i.e., the ELF object format. Previous work on Stack-Aware CompCert provides a verified compilation chain from C programs to assembly programs with a realistic machine memory model. We build CompCertELF by modifying and extending this compilation chain with a verified assembler which further transforms assembly programs into ELF object files. CompCert supports large-scale verification via verified separate compilation: C modules can be written and compiled separately, and then linked together to get a target program that refines the semantics of the program linked from the source modules. However, verified separate compilation in CompCert only works for compilation to assembly programs, not to object files. For the latter, the main difficulty is to bridge the two different views of linking: one for CompCert’s programs that allows arbitrary shuffling of global definitions by linking and the other for object files that treats blocks of encoded definitions as indivisible units. We propose a lightweight approach that solves the above problem without any modification to CompCert’s framework for verified separate compilation: by introducing a notion of syntactical equivalence between programs and proving the commutativity between syntactical equivalence and the two different kinds of linking, we are able to transit from the more abstract linking operation in CompCert to the more concrete one for ELF object files. By applying this approach to CompCertELF, we obtain the first compiler that supports verified separate compilation of C programs into ELF object files.
Fichier principal
Vignette du fichier
compcertelf.pdf (339.39 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03114583 , version 1 (19-01-2021)

Licence

Identifiants

  • HAL Id : hal-03114583 , version 1

Citer

Yuting Wang, Xiangzhen Xu, Pierre Wilke, Zhong Shao. CompCertELF: Verified Separate Compilation of C Programs into ELF Object Files. OOPSLA 2020 : Conference on Object-Oriented Programming Systems, Languages,and Applications, Nov 2020, Chicago, United States. pp.1-28. ⟨hal-03114583⟩
84 Consultations
206 Téléchargements

Partager

More