[PATCH] D73999: [MC][ELF] Error for sh_type, sh_flags or sh_entsize change

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 19 22:25:43 PST 2020


MaskRay updated this revision to Diff 245580.
MaskRay retitled this revision from "[MC][ELF] Error changed sh_type, sh_flags or sh_entsize" to "[MC][ELF] Error for sh_type, sh_flags or sh_entsize change".
MaskRay edited the summary of this revision.
MaskRay added a comment.

Improve diagnostics

GNU as started to emit warnings in 2000
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=742f45cf3ae24b4dd4bd63ddcce18bddf1f31330

GNU as 2.35 will emit errors for most cases
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=33176d912add7680277ad5e18af0e6303d9a7af8

I think it is reasonable for us to start with errors. If there are justified complaints for sh_type, we can consider downgrading to warnings. sh_flags/sh_entsize changes are very likely real errors.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73999

Files:
  llvm/lib/MC/MCParser/ELFAsmParser.cpp
  llvm/test/MC/ELF/exclude-debug-dwo.s
  llvm/test/MC/ELF/section-entsize-changed.s
  llvm/test/MC/ELF/section-flags-changed.s
  llvm/test/MC/ELF/section-type-changed.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73999.245580.patch
Type: text/x-patch
Size: 4323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200220/5d525db2/attachment-0001.bin>


More information about the llvm-commits mailing list