[PATCH] D78138: [MC][COFF][ELF] Reject instructions in IMAGE_SCN_CNT_UNINITIALIZED_DATA/SHT_NOBITS sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 12:37:16 PDT 2020


MaskRay added inline comments.


================
Comment at: llvm/lib/MC/MCAssembler.cpp:689
           if (DF.getContents()[i]) {
             if (auto *ELFSec = dyn_cast<const MCSectionELF>(Sec))
+              getContext().reportError(
----------------
rnk wrote:
> This can also be unified to use the new method, right?
This would be really difficult... so difficult that I have to mention it in the description

```
It'd be nice to report the location but so many directives can call emitIntValue()
and it is difficult to track every location.
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78138





More information about the llvm-commits mailing list