arsenm wrote: > > (You can even place `.quad sym[0].hash; .long sym[0].size` in a section > > `SHF_LINK_ORDER` linking to the global variable for linker garbage > > collection.) > > The runtime can build a map correlating hashes to sizes, which can be used > > to answer variable size queries. > > AMD language runtimes provide queries for the size of device global symbols > and functions to copy data to and from device global variables. Currently, > runtime gets the needed information form the ELF symbol sizes in the symbol > table. So, in #70166 We have come up with approach of adding two symbols (at > the same offset but with different sizes) for the same global, one symbol > which reports actual global size and other symbol which reports instrumented > size.
Have you looked into switching to the suggested approach of having a separately emitted field? https://github.com/llvm/llvm-project/pull/68865 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits