[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 07:51:11 PDT 2018


jhenderson added a comment.

Maybe I've been confusing things, because from what I'm seeing in this, there is now a unique stack sizes section for every function, even without -ffunction-sections, which I don't think we want. What I kind of expect to see is this:

1. Without function sections:
  1. Non-COMDAT functions all share a stack_sizes section which refers via SHF_LINK_ORDER to .text.
  2. COMDAT functions have their own stack_sizes section, which optionally refers via SHF_LINK_ORDER to .text.<symbol>, and is a member of the COMDAT group.
2. With function sections:
  1. All functions have their own unique stack_sizes section, which refer to their corresponding section via SHF_LINK_ORDER.
  2. COMDAT functions' .stack_sizes sections are members of their group.

Does that make sense?

I think it would be easy to do by only using ID in the elf section creation/fetching if we are for a group section or in ffunction-sections.


https://reviews.llvm.org/D46874





More information about the llvm-commits mailing list