[PATCH] D99257: [XCOFF] dynamically allocating the section and csect group

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 06:01:44 PDT 2021


shchenz created this revision.
shchenz added reviewers: jasonliu, jsji, hubert.reinterpretcast, daltenty, PowerPC.
Herald added subscribers: hiraditya, nemanjai.
shchenz requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We add DWARF support in https://reviews.llvm.org/D97184. For DWARF sections, because there are many of them especially for DWARF 5, 20 DWARF sections without split-dwarf feature and 30 sections with split-dwarf support, it is not good to predefine them as we do for csect sections(text, data, bss). We should dynamically allocate section entries for DWARF sections.

This patch refactors the generation for csect sections to be dynamically allocated, so csect sections can be handled the same way as DWARF sections.

This patch also refactors the groups to be dynamically allocated in one csect section.

Because of dynamically allocating, the order of the sections/groups is determined by the object writer's caller. As shown in the test, the order of BSSCsects and FuncDSCsects is changed after this patch.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99257

Files:
  llvm/lib/MC/XCOFFObjectWriter.cpp
  llvm/test/CodeGen/PowerPC/aix-extern-weak.ll
  llvm/test/CodeGen/PowerPC/aix-extern.ll
  llvm/test/CodeGen/PowerPC/aix-return55.ll
  llvm/test/CodeGen/PowerPC/aix-weak.ll
  llvm/test/CodeGen/PowerPC/aix-xcoff-data-sections.ll
  llvm/test/CodeGen/PowerPC/aix-xcoff-explicit-section.ll
  llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll
  llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll
  llvm/test/CodeGen/PowerPC/aix-xcoff-symbol-rename.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99257.332948.patch
Type: text/x-patch
Size: 63685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210324/8a71e6c7/attachment.bin>


More information about the llvm-commits mailing list