[PATCH] D101068: [ELF] Emit diagnostic for invalid size directive

Brian Cain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 07:35:51 PDT 2021


bcain created this revision.
bcain added a reviewer: MaskRay.
Herald added subscribers: hiraditya, emaste.
bcain requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

If a .size directive which uses an expression to calculate the size has a typo
in a label reference or references a label from another section, it is invalid.
Emit an error instead of a fatal error, and if there's a way to hint at the
cause, emit relevant diagnostic notes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101068

Files:
  llvm/lib/MC/ELFObjectWriter.cpp
  llvm/test/MC/ELF/size-error.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101068.339624.patch
Type: text/x-patch
Size: 5768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210422/85c11642/attachment.bin>


More information about the llvm-commits mailing list