aboutsummaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2015-04-23 13:56:40 -0700
committerSriraman Tallam <tmsriram@google.com>2015-04-23 13:56:40 -0700
commita100d66fb42044153dc0e93c96d7944dab0cc674 (patch)
tree7ab7ef6c6911cde3a440fed3c688e6b533d973f4 /gold/options.h
parent65eb8c79be0c71f9b52d14563c0817fc5ca33c0d (diff)
downloadgdb-a100d66fb42044153dc0e93c96d7944dab0cc674.zip
gdb-a100d66fb42044153dc0e93c96d7944dab0cc674.tar.gz
gdb-a100d66fb42044153dc0e93c96d7944dab0cc674.tar.bz2
Add option --weak-unresolved-symbols to treat unresolved symbols as weak ref.
This patch adds option --weak-unresolved-symbols to treat unresolved symbols as weak references. This is helpful when we want the link to succeed with unresolved symbols and the dynamic loader to not complain at run-time. Option --warn-unresolved-symbols lets the link succeed but could fail at run-time with unresolved symbol warnings especially when the unresolved symbols have GOT entries and dynamic relocations against them, like when -fPIE is used.
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h
index c1a5743..bb3bee6 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -1219,6 +1219,9 @@ class General_options
options::TWO_DASHES, '\0',
N_("Report unresolved symbols as errors"),
NULL, true);
+ DEFINE_bool(weak_unresolved_symbols, options::TWO_DASHES, '\0', false,
+ N_("Convert unresolved symbols to weak references"),
+ NULL);
DEFINE_bool(wchar_size_warning, options::TWO_DASHES, '\0', true, NULL,
N_("(ARM only) Do not warn about objects with incompatible "