diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-05-23 10:32:18 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-05-23 10:32:18 +0000 |
commit | d65cd7a57bf0600b722afc770838a5d0c1c3a8e1 (patch) | |
tree | 0ae3978be5d5ef52ee35aa732555aaa432406a2b /contrib/llvm-project/lld/ELF/OutputSections.cpp | |
parent | 2bbab0af6dd5aa825fbe86813d917565bb885b67 (diff) | |
parent | ec2b0f99f245da9ce98e41cf4cc2b6b2a02726f6 (diff) | |
download | src-d65cd7a57bf0600b722afc770838a5d0c1c3a8e1.tar.gz src-d65cd7a57bf0600b722afc770838a5d0c1c3a8e1.zip |
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1).
MFC after: 3 weeks
Notes
Notes:
svn path=/head/; revision=361410
Diffstat (limited to 'contrib/llvm-project/lld/ELF/OutputSections.cpp')
-rw-r--r-- | contrib/llvm-project/lld/ELF/OutputSections.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/llvm-project/lld/ELF/OutputSections.cpp b/contrib/llvm-project/lld/ELF/OutputSections.cpp index 6142cb0783ce..b609878be319 100644 --- a/contrib/llvm-project/lld/ELF/OutputSections.cpp +++ b/contrib/llvm-project/lld/ELF/OutputSections.cpp @@ -114,8 +114,7 @@ void OutputSection::commitSection(InputSection *isec) { flags = isec->flags; } else { // Otherwise, check if new type or flags are compatible with existing ones. - unsigned mask = SHF_TLS | SHF_LINK_ORDER; - if ((flags & mask) != (isec->flags & mask)) + if ((flags ^ isec->flags) & SHF_TLS) error("incompatible section flags for " + name + "\n>>> " + toString(isec) + ": 0x" + utohexstr(isec->flags) + "\n>>> output section " + name + ": 0x" + utohexstr(flags)); @@ -367,8 +366,9 @@ void OutputSection::finalize() { // all InputSections in the OutputSection have the same dependency. if (auto *ex = dyn_cast<ARMExidxSyntheticSection>(first)) link = ex->getLinkOrderDep()->getParent()->sectionIndex; - else if (auto *d = first->getLinkOrderDep()) - link = d->getParent()->sectionIndex; + else if (first->flags & SHF_LINK_ORDER) + if (auto *d = first->getLinkOrderDep()) + link = d->getParent()->sectionIndex; } if (type == SHT_GROUP) { |