[PATCH] D46874: [MC] - Add .stack_size sections into groups and link them with .text

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 23 02:12:39 PDT 2018


jhenderson added subscribers: ruiu, edd.
jhenderson added a comment.

I've been thinking more about this since asking you to do the numbers. Our problem is that without doing this, we will need some other approach to handle .stack_sizes entries referring to removed functions (e.g. discarded COMDATs or GC'ed sections). This is essentially the same problem as we have with things like debug data - the stack size entry will have an address (probably zero) that on at least some platforms is a valid address, which would cause problems for consumers of the section. Either they have to special case it (which may not be possible), or they get potentially misleading output.

Is .stack_sizes off by default? I assume so, and if it isn't, it probably should be, since it's not necessarily useful for everybody. If so, I'd suggest you go ahead with this change - it will only impact those who are using it, and they probably want it done properly if they are using -ffunction-sections. Maybe @ruiu has some suggestions from the linker's point of view too?


https://reviews.llvm.org/D46874





More information about the llvm-commits mailing list