[PATCH] D91455: [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX

Jason Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 30 13:58:37 PST 2020


jasonliu added inline comments.


================
Comment at: llvm/lib/MC/MCObjectFileInfo.cpp:889
+  CompactUnwindSection =
+      Ctx->getXCOFFSection(".eh_info_table", XCOFF::StorageMappingClass::XMC_RW,
+                           XCOFF::XTY_SD, SectionKind::getData());
----------------
daltenty wrote:
> I think this may have been discussed elsewhere, but why do we want to emit this as a RW section?
Yes, this has been discussed before. And it's a good question.
If we emit this as an RO section, then we could not put 
```
.vbyte	4, GCC_except_table1
.vbyte	4, __xlcxx_personality_v1[DS]
```
into this csect directly. 
If we do that, we would hit linker error during link time. It seems that for read only csects (RO, PR mapping classes), we could not have relocation types like `R_POS` or `R_NEG` because the result coming out of it is not link-time constant. And the relocation types in read only csects needs to be link time constant.

Extra work (both compiler and runtime) will be needed if we want to make this RO.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91455/new/

https://reviews.llvm.org/D91455



More information about the cfe-commits mailing list