[ELF] - Add a test case for relocation pointing to deduplicated COMDAT.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 4 Jul 2018 10:38:12 +0000 (10:38 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 4 Jul 2018 10:38:12 +0000 (10:38 +0000)
commit514ac22d8f5d4d04f8d1f5a7c085996ce1786eae
tree101ee80e29ced0bb07269f07477a4dace531d7fe
parentbee9ca6568863c35cb71247bbc7966e4d39e655c
[ELF] - Add a test case for relocation pointing to deduplicated COMDAT.

ELF spec doesn't allow a relocation to point to a deduplicated
COMDAT section. Unfortunately this happens in practice (e.g. .eh_frame)

We have a code in MarkLive.cpp for that and it was uncovered by any test case:
https://github.com/llvm-mirror/lld/blob/master/ELF/MarkLive.cpp#L199

Patch adds a test.

llvm-svn: 336259
lld/test/ELF/Inputs/comdat-discarded-reloc.s [new file with mode: 0644]
lld/test/ELF/comdat-discarded-reloc.s [new file with mode: 0644]