From f168823f3b9117c8fc98c3a9cd604a87cf668ff1 Mon Sep 17 00:00:00 2001 From: naddy Date: Tue, 28 Dec 2021 21:14:24 +0000 Subject: [PATCH] lld: restore upstream default for --[no-]allow-shlib-undefined ok patrick@ kettenis@ --- gnu/llvm/lld/ELF/Driver.cpp | 2 +- gnu/llvm/lld/docs/ld.lld.1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/llvm/lld/ELF/Driver.cpp b/gnu/llvm/lld/ELF/Driver.cpp index 633cc3d5143..f2de4ec1b3d 100644 --- a/gnu/llvm/lld/ELF/Driver.cpp +++ b/gnu/llvm/lld/ELF/Driver.cpp @@ -599,7 +599,7 @@ static void setUnresolvedSymbolPolicy(opt::InputArgList &args) { : UnresolvedPolicy::Warn; // -shared implies -unresolved-symbols=ignore-all because missing // symbols are likely to be resolved at runtime. - bool diagRegular = !config->shared, diagShlib = false; + bool diagRegular = !config->shared, diagShlib = !config->shared; for (const opt::Arg *arg : args) { switch (arg->getOption().getID()) { diff --git a/gnu/llvm/lld/docs/ld.lld.1 b/gnu/llvm/lld/docs/ld.lld.1 index 86d47f24378..bd67e58daa4 100644 --- a/gnu/llvm/lld/docs/ld.lld.1 +++ b/gnu/llvm/lld/docs/ld.lld.1 @@ -57,7 +57,7 @@ Do not error if a symbol is defined multiple times. The first definition will be used. .It Fl -allow-shlib-undefined Allow unresolved references in shared libraries. -This option is enabled by default. +This option is enabled by default when linking a shared library. .It Fl -apply-dynamic-relocs Apply link-time values for dynamic relocations. .It Fl -as-needed @@ -312,7 +312,7 @@ Print a link map to Do not page align sections, link against static libraries. .It Fl -no-allow-shlib-undefined Do not allow unresolved references in shared libraries. -This option is disabled by default. +This option is enabled by default when linking an executable. .It Fl -no-as-needed Always set .Dv DT_NEEDED -- 2.20.1