mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
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.
This commit is contained in:
@ -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 "
|
||||
|
Reference in New Issue
Block a user