llvm-project
bf8f5cc9 - Reland: [llvm-cov][WebAssembly] Read `__llvm_prf_names` from data segments (#112569)

Commit
1 year ago
Reland: [llvm-cov][WebAssembly] Read `__llvm_prf_names` from data segments (#112569) On WebAssembly, most coverage metadata contents read by llvm-cov (like `__llvm_covmap` and `__llvm_covfun`) are stored in custom sections because they are not referenced at runtime. However, `__llvm_prf_names` is referenced at runtime by the profile runtime library and is read by llvm-cov post-processing tools, so it needs to be stored in a data segment, which is allocatable at runtime and accessible by tools as long as "name" section is present in the binary. This patch changes the way llvm-cov reads `__llvm_prf_names` on WebAssembly. Instead of looking for a section, it looks for a data segment with the same name. This reverts commit 157f10ddf2d851125a85a71e530dc9d50cb032a2 and fixes PE/COFF `.lprfn$A` section handling.
Parents
Loading