summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2020-02-17 03:30:40 -0800
committerJohn Levon <john.levon@joyent.com>2020-02-18 09:45:42 -0800
commite912cc3d5decbbfbb3005d9f678e9fc3ccbcf91f (patch)
tree632a79149d79816b9a792b31c902371d4c259025 /usr/src
parent20de283b9b1939fdc5b617ccc0c6e5ce8b7c6160 (diff)
downloadillumos-joyent-e912cc3d5decbbfbb3005d9f678e9fc3ccbcf91f.tar.gz
12314 ld fatal warnings miss some guidance messages
Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/sgs/libld/common/ldmain.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr/src/cmd/sgs/libld/common/ldmain.c b/usr/src/cmd/sgs/libld/common/ldmain.c
index 330a1cdf56..21703efc6f 100644
--- a/usr/src/cmd/sgs/libld/common/ldmain.c
+++ b/usr/src/cmd/sgs/libld/common/ldmain.c
@@ -24,6 +24,8 @@
* All Rights Reserved
*
* Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Copyright 2020 Joyent, Inc.
*/
/*
@@ -480,8 +482,18 @@ ld_main(int argc, char **argv, Half mach)
dbg_cleanup();
/* If any ERR_GUIDANCE messages were issued, add a summary */
- if (ofl->ofl_guideflags & FLG_OFG_ISSUED)
+ if (ofl->ofl_guideflags & FLG_OFG_ISSUED) {
ld_eprintf(ofl, ERR_GUIDANCE, MSG_INTL(MSG_GUIDE_SUMMARY));
+ ofl->ofl_guideflags &= ~FLG_OFG_ISSUED;
+ }
+
+ /*
+ * One final check for any new warnings we found that should fail the
+ * link edit.
+ */
+ if ((ofl->ofl_flags & (FLG_OF_WARN | FLG_OF_FATWARN)) ==
+ (FLG_OF_WARN | FLG_OF_FATWARN))
+ return (ld_exit(ofl));
/*
* For performance reasons we don't actually free up the memory we've