[PATCH] D39788: [MC] Function stack size section.

Sean Eveson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 02:55:07 PST 2017


seaneveson marked 2 inline comments as done.
seaneveson added inline comments.


================
Comment at: lib/MC/MCObjectFileInfo.cpp:597-598
       Ctx->getELFSection(".eh_frame", EHSectionType, EHSectionFlags);
+
+  StackSizesSection = Ctx->getELFSection(".stack_sizes", ELF::SHT_PROGBITS, 0);
 }
----------------
MatzeB wrote:
> I'm no expert with ELF, but `PROGBITS` feels wrong to me as I would expect it to get loaded/memory mapped. Is `NOTE` a better fit?
`PROGBITS` sections are only loaded when the `SHF_ALLOC` attribute flag is set, for example the .comment and .debug* sections are `PROGBITS`.

`NOTE` has a specific format (array of 4-byte words), which this section doesn't meet.


https://reviews.llvm.org/D39788





More information about the llvm-commits mailing list