[llvm] [BOLT] Detect Linux kernel version if the binary is a Linux kernel (PR #119088)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 11:24:46 PST 2024


maksfb wrote:

> Multiple symbols with the same address but different sizes are mapped to the same `BinaryData`, which has a size of the first symbol.
> 
> So we usually can not be certain about the size of a `BinaryData` we get from a symbol, since there might be a symbol with the same address but different size registered first. I think it is not good.
> 
> Is it by design?

`BinaryData` concept was introduced for the purpose of data reordering optimizations some time ago. We didn't pursue the optimization any further (for a number of reasons), but the framework remains. Regarding the sizes, I vaguely recall there was a support for embedded objects that start at the same address and all data objects could be accessed. But I could be wrong. In any case, we are open to changing the `BinaryData` handling.

https://github.com/llvm/llvm-project/pull/119088


More information about the llvm-commits mailing list