[PATCH] D47396: [LLD] Place .nv_fatbin section at the beginning of the executable.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 30 11:04:41 PDT 2018


ruiu added a comment.

While discussing this with Artem, I got this idea: sorting by size. We could sort section by size so that larger sections are inserted before smaller sections, we could solve the issue. This workaround is based on the observation that, if you have a very large section, it is unlikely that you refer that section by a relative relocation, but because doing so could easily cause relocation overflow. So, even though it's heuristics, I don't think it's a bad idea.

What do you think?


https://reviews.llvm.org/D47396





More information about the llvm-commits mailing list