diff options
Diffstat (limited to 'lld/ELF/LTO.cpp')
| -rw-r--r-- | lld/ELF/LTO.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp index 098e842597d..d5c4d80cd5b 100644 --- a/lld/ELF/LTO.cpp +++ b/lld/ELF/LTO.cpp @@ -160,8 +160,9 @@ void BitcodeCompiler::add(BitcodeFile &F) { // Skip absolute symbols from ELF objects, otherwise PC-rel relocations // will be generated by for them, triggering linker errors. // Symbol section is always null for bitcode symbols, hence the check - // for isElf(). - !(Sym->File && Sym->File->isElf() && DR->Section == nullptr); + // for isElf(). Skip linker script defined symbols as well: they have + // no File defined. + !(DR->Section == nullptr && (!Sym->File || Sym->File->isElf())); if (R.Prevailing) undefine(Sym); |

