summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2021-12-28 21:14:25 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2021-12-28 21:14:25 +0000
commitbecd4fddcf946c4bb5738726b2b16b51744345c1 (patch)
tree24922bbb5195c802888207be2a4e52068516f474 /gnu
parent1c1bed5dccd054f33303db50d5c6bdc62e4ab5d0 (diff)
lld: restore upstream default for --[no-]allow-shlib-undefined
ok patrick@ kettenis@
Diffstat (limited to 'gnu')
-rw-r--r--gnu/llvm/lld/ELF/Driver.cpp2
-rw-r--r--gnu/llvm/lld/docs/ld.lld.14
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