Add a flag to InputSectionBase for linker script.
authorRui Ueyama <ruiu@google.com>
Sun, 20 Nov 2016 23:15:52 +0000 (23:15 +0000)
committerRui Ueyama <ruiu@google.com>
Sun, 20 Nov 2016 23:15:52 +0000 (23:15 +0000)
commitf94efdddc0ae3f979ad8840ff1a53017548012a4
treea9591fc2daa4552c62f9f5132c1d82b234e6c193
parenta228c46c2a1ec209ec1cc67ba2a58f8df4150668
Add a flag to InputSectionBase for linker script.

Previously, we set (uintptr_t)-1 to InputSectionBase::OutSec to record
that a section has already been set to be assigned to some output section
by linker scripts. Later, we restored nullptr to the pointer to use
the field for the original purpose. That overloading is not very easy to
understand.

This patch adds a bit flag for that purpose, so that we don't need
to piggyback the flag on an unrelated pointer.

llvm-svn: 287508
lld/ELF/InputSection.h
lld/ELF/LinkerScript.cpp