diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-02-18 22:37:06 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-02-18 22:37:06 +0000 |
| commit | 7eff647615f93a9aaff1997e1880b195dc3aabe6 (patch) | |
| tree | ae348c384d518be05d73326fbfc22a1f66eb56d0 /lld/ELF/Arch/PPC64.cpp | |
| parent | 1e9a9d6d056506b23ad26952df45eaac949385c7 (diff) | |
Vendor import of llvm-project branch release/14.x llvmorg-14.0.0-rc1-74-g4dc3cb8e3255.vendor/llvm-project/llvmorg-14.0.0-rc1-74-g4dc3cb8e3255
Diffstat (limited to 'lld/ELF/Arch/PPC64.cpp')
| -rw-r--r-- | lld/ELF/Arch/PPC64.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp index c083484f4280..7d051c43af0d 100644 --- a/lld/ELF/Arch/PPC64.cpp +++ b/lld/ELF/Arch/PPC64.cpp @@ -1380,9 +1380,10 @@ bool PPC64::needsThunk(RelExpr expr, RelType type, const InputFile *file, if (type == R_PPC64_REL24_NOTOC && (s.stOther >> 5) > 1) return true; - // If a symbol is a weak undefined and we are compiling an executable - // it doesn't need a range-extending thunk since it can't be called. - if (s.isUndefWeak() && !config->shared) + // An undefined weak symbol not in a PLT does not need a thunk. If it is + // hidden, its binding has been converted to local, so we just check + // isUndefined() here. A undefined non-weak symbol has been errored. + if (s.isUndefined()) return false; // If the offset exceeds the range of the branch type then it will need |
