diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-01-09 20:00:28 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:14:10 +0000 |
| commit | cdc20ff6a7f12464aed70d9b6e67ea07da9f0399 (patch) | |
| tree | 0c2f259d41b6d1f146c344cb9cf2b15ea99d35bb /contrib/llvm-project/lld/ELF/LinkerScript.cpp | |
| parent | 7adf29b6244fe016ef869f287a66048195f9af29 (diff) | |
Diffstat (limited to 'contrib/llvm-project/lld/ELF/LinkerScript.cpp')
| -rw-r--r-- | contrib/llvm-project/lld/ELF/LinkerScript.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/llvm-project/lld/ELF/LinkerScript.cpp b/contrib/llvm-project/lld/ELF/LinkerScript.cpp index 28ae4b854306..03aec187668a 100644 --- a/contrib/llvm-project/lld/ELF/LinkerScript.cpp +++ b/contrib/llvm-project/lld/ELF/LinkerScript.cpp @@ -57,6 +57,10 @@ static StringRef getOutputSectionName(const InputSectionBase *s) { if (auto *isec = dyn_cast<InputSection>(s)) { if (InputSectionBase *rel = isec->getRelocatedSection()) { OutputSection *out = rel->getOutputSection(); + if (!out) { + assert(config->relocatable && (rel->flags & SHF_LINK_ORDER)); + return s->name; + } if (s->type == SHT_RELA) return saver().save(".rela" + out->name); return saver().save(".rel" + out->name); |
