[ELF] - Do not segfault when using -r and section groups.
If we had SHT_GROUP sections, then when -r was used we might crash. This is PR31952. Issue happened because we emited relocation section though its target was discared because was a member of duplicated group. When we tried to get VA of target, segfault happened. Core cause is the bug that GNU as 2.27 (and probably later versions) has. In compare with llvm-mc, it does not include relocation sections into the group, like shown in testcase. This patch covers that case. Differential revision: https://reviews.llvm.org/D29929 llvm-svn: 295067
Loading
Please register or sign in to comment