Skip to content
Commit ee6f22ce authored by George Rimar's avatar George Rimar
Browse files

[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
parent 6dedf65c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment