[ELF] --orphan-handling=: don't warn/error for input SHT_REL[A] retained by --emit...
authorFangrui Song <maskray@google.com>
Wed, 26 Feb 2020 00:39:31 +0000 (16:39 -0800)
committerFangrui Song <maskray@google.com>
Wed, 26 Feb 2020 18:32:54 +0000 (10:32 -0800)
commit37c7f0d9456b3ff4a87829ad842823da6aa2401f
treed4f4d3aa544de156b9a5f21dd18caf9ce73c5995
parente4af56db27e5007ae6f6095a0ba0421211de9ba3
[ELF] --orphan-handling=: don't warn/error for input SHT_REL[A] retained by --emit-relocs

They are purposefully skipped by input section descriptions (rL295324).
Similarly, --orphan-handling= should not warn/error for them.
This behavior matches GNU ld.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D75151
lld/ELF/LinkerScript.cpp
lld/test/ELF/linkerscript/emit-reloc.s