diff options
author | jasonliu <jasonliu.development@gmail.com> | 2020-12-02 14:48:52 +0000 |
---|---|---|
committer | jasonliu <jasonliu.development@gmail.com> | 2020-12-02 18:42:44 +0000 |
commit | a65d8c5d720db8c646adb0ad9dac54da5d5fa230 (patch) | |
tree | f56efc405cd907274a7c263ce7256414f8a6a217 /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 9d6d24c25056c17db56cf1ef5124f82eb18afc2c (diff) | |
download | llvm-a65d8c5d720db8c646adb0ad9dac54da5d5fa230.zip llvm-a65d8c5d720db8c646adb0ad9dac54da5d5fa230.tar.gz llvm-a65d8c5d720db8c646adb0ad9dac54da5d5fa230.tar.bz2 |
[XCOFF][AIX] Generate LSDA data and compact unwind section on AIX
Summary:
AIX uses the existing EH infrastructure in clang and llvm.
The major differences would be
1. AIX do not have CFI instructions.
2. AIX uses a new personality routine, named __xlcxx_personality_v1.
It doesn't use the GCC personality rountine, because the
interoperability is not there yet on AIX.
3. AIX do not use eh_frame sections. Instead, it would use a eh_info
section (compat unwind section) to store the information about
personality routine and LSDA data address.
Reviewed By: daltenty, hubert.reinterpretcast
Differential Revision: https://reviews.llvm.org/D91455
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index fbc7cf1..a67e4b33 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -883,6 +883,14 @@ void MCObjectFileInfo::initXCOFFMCObjectFileInfo(const Triple &T) { // The TOC-base always has 0 size, but 4 byte alignment. TOCBaseSection->setAlignment(Align(4)); + LSDASection = Ctx->getXCOFFSection(".gcc_except_table", + XCOFF::StorageMappingClass::XMC_RO, + XCOFF::XTY_SD, SectionKind::getReadOnly()); + + CompactUnwindSection = + Ctx->getXCOFFSection(".eh_info_table", XCOFF::StorageMappingClass::XMC_RW, + XCOFF::XTY_SD, SectionKind::getData()); + // DWARF sections for XCOFF are not csects. They are special STYP_DWARF // sections, and the individual DWARF sections are distinguished by their // section subtype. |