[llvm] [Object][Wasm] Use offset instead of index for Global address and store size (PR #81781)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 12:57:52 PST 2024


sbc100 wrote:

> Currently the address reported by binutils for a global is its index; but its offset (in the file or section) is more useful for binary size attribution. This PR treats globals similarly to functions, and tracks their offset and size. It also centralizes the logic differentiating linked from object and dylib files (where section addresses are 0).

On the other hand, the "address" of a global is kind of its index right?  i.e. if you want to access a global you need to know its address (index) to pass to global.get/global.set.


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


More information about the llvm-commits mailing list