[PATCH] D72461: [AIX][XCOFF] Supporting the ReadOnlyWithRel SectionKnd

Digger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 07:34:13 PST 2020


DiggerLin marked an inline comment as done.
DiggerLin added inline comments.


================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1873
 
-  if (Kind.isData())
+  if (Kind.isData() || Kind.isReadOnlyWithRel())
     return DataSection;
----------------
hubert.reinterpretcast wrote:
> Please add a TODO for putting this under option control. The user may want to have read-only data with relocations placed into a read-only section by the compiler. There are linker options, such as `-Wl,-bforceimprw` (which would make sense to use alongside `-fdata-sections`), that support such cases.
and if we put the ReadOnlyWithRel as read-only section. I think the function     bool isReadOnly() const {
    return K == ReadOnly || isMergeableCString() ||
           isMergeableConst();
  } also need to be modified. 

We can put the change of SectionKind::isGlobalWriteableData() and isReadOnly() in the same new patch later.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72461





More information about the llvm-commits mailing list