daltenty 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());
----------------
jasonliu wrote:
> 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.
Thanks for clarifying. I guess we'd presumably need to add the TOC indirections 
to get to the LSDA and personality routine's function descriptor,  similar  to 
elsewhere. 

Since this structure is version'd, seems like we have the flexibility to defer 
that work, so I guess that's OK.


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

https://reviews.llvm.org/D91455

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to