[llvm] Add STACK_SIZES section for MachOS. (PR #77106)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 07:18:28 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mc

Author: None (shamithoke)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/77106.diff


1 Files Affected:

- (modified) llvm/lib/MC/MCObjectFileInfo.cpp (+3) 


``````````diff
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index a79759557b2e3d..c7932be7e8680e 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -316,6 +316,9 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) {
   RemarksSection = Ctx->getMachOSection(
       "__LLVM", "__remarks", MachO::S_ATTR_DEBUG, SectionKind::getMetadata());
 
+  StackSizesSection = Ctx->getMachOSection("__STACK_SIZES", "__stack_sizes",
+                                           0, SectionKind::getData());
+
   // The architecture of dsymutil makes it very difficult to copy the Swift
   // reflection metadata sections into the __TEXT segment, so dsymutil creates
   // these sections in the __DWARF segment instead.

``````````

</details>


https://github.com/llvm/llvm-project/pull/77106


More information about the llvm-commits mailing list