[ELF] Improve error message for incompatible section flags
authorRui Ueyama <ruiu@google.com>
Tue, 25 Apr 2017 16:00:44 +0000 (16:00 +0000)
committerRui Ueyama <ruiu@google.com>
Tue, 25 Apr 2017 16:00:44 +0000 (16:00 +0000)
commit577168ecdeadbb991dabf16d7879f31f73b9901d
treeba400d847371c560fb0e8e131301beb4ce89a21a
parent4800fc4363167ec57a8ae0e5be5de63c3028d4ab
[ELF] Improve error message for incompatible section flags

Previously we were not printing out the flags of the incompatible
section which made it difficult to determine what the problem was.

The error message format has been change to the following:

  error: incompatible section flags for .bar
  >>> /foo/bar/incompatible-section-flags.s.tmp.o:(.bar): 0x403
  >>> output section .bar: 0x3

Patch by Alexander Richardson.

Differential Revision: https://reviews.llvm.org/D32484

llvm-svn: 301319
lld/ELF/OutputSections.cpp
lld/test/ELF/incompatible-section-flags.s