[LLD][ELF] - Handle SHT_GROUP more carefully. NFCI.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 15 Aug 2018 12:20:38 +0000 (12:20 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 15 Aug 2018 12:20:38 +0000 (12:20 +0000)
commit28356068899d188f9f1061257710d13024599d4e
treef769c88b69fab8a4f7f1ae04d9734a160a590868
parent5290af8ad9ad8f5258305a11ca82936504fe5f42
[LLD][ELF] - Handle SHT_GROUP more carefully. NFCI.

This patch solves 2 problems:
1) It adds a test to check the line below:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputFiles.cpp#L334
Test case contains SHT_GROUP section with a broken (0xFF) flag.

2) The patch fixes the case when we silently accepted such broken groups
in the case when there were no other objects with the same group signature.

llvm-svn: 339765
lld/ELF/InputFiles.cpp
lld/test/ELF/invalid/comdat-broken.test [new file with mode: 0644]