diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2024-01-24 19:17:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:24:44 +0000 |
commit | ab50317e96e57dee5b3ff4ad3f16f205b2a3359e (patch) | |
tree | 4b1f388eb6a07e574417aaacecd3ec4a83550718 /contrib/llvm-project/lld/ELF/InputSection.cpp | |
parent | 412542983a5ba62902141a8a7e155cceb9196a66 (diff) |
Merge llvm-project main llvmorg-18-init-18359-g93248729cfae
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
last commit before the upstream release/18.x branch was created.
PR: 276104
MFC after: 1 month
(cherry picked from commit 7a6dacaca14b62ca4b74406814becb87a3fefac0)
Diffstat (limited to 'contrib/llvm-project/lld/ELF/InputSection.cpp')
-rw-r--r-- | contrib/llvm-project/lld/ELF/InputSection.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/llvm-project/lld/ELF/InputSection.cpp b/contrib/llvm-project/lld/ELF/InputSection.cpp index 586404643cc1..c728dd6c6306 100644 --- a/contrib/llvm-project/lld/ELF/InputSection.cpp +++ b/contrib/llvm-project/lld/ELF/InputSection.cpp @@ -245,6 +245,8 @@ InputSection *InputSectionBase::getLinkOrderDep() const { // Find a symbol that encloses a given location. Defined *InputSectionBase::getEnclosingSymbol(uint64_t offset, uint8_t type) const { + if (file->isInternal()) + return nullptr; for (Symbol *b : file->getSymbols()) if (Defined *d = dyn_cast<Defined>(b)) if (d->section == this && d->value <= offset && @@ -344,7 +346,7 @@ template <class ELFT> void InputSection::copyShtGroup(uint8_t *buf) { } InputSectionBase *InputSection::getRelocatedSection() const { - if (!file || (type != SHT_RELA && type != SHT_REL)) + if (!file || file->isInternal() || (type != SHT_RELA && type != SHT_REL)) return nullptr; ArrayRef<InputSectionBase *> sections = file->getSections(); return sections[info]; |