aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-10-06 11:07:08 +0000
committerNick Clifton <nickc@redhat.com>2003-10-06 11:07:08 +0000
commit854770991f736fdad0fe6dca6c0cc6e280f8a6ce (patch)
tree07dd0cf7bf9ae71260bea8ce75eedc616092ce73 /ld/lexsup.c
parent85cf2a8a15d156b4bd8bc3362c0a9b3924a705f4 (diff)
downloadgdb-854770991f736fdad0fe6dca6c0cc6e280f8a6ce.zip
gdb-854770991f736fdad0fe6dca6c0cc6e280f8a6ce.tar.gz
gdb-854770991f736fdad0fe6dca6c0cc6e280f8a6ce.tar.bz2
lexsup.c (parse_args): Report unresolved symbols in shared libraries when
creating a dynamic executable. This is a restoration of the default behaviour for previous versions of the linker.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index fe19e61..556a5ba 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -660,12 +660,19 @@ parse_args (unsigned argc, char **argv)
break;
case OPTION_CALL_SHARED:
config.dynamic_link = TRUE;
- /* When linking against shared libraries, the default
- behaviour is to ignore any unresolved references. */
+ /* When linking against shared libraries, the default behaviour is
+ to report any unresolved references. This is for backwards
+ comptability with previous linker behaviour. Whilst strictly
+ speaking it is not a failure to encounter unresolved symbols at
+ link time - the symbol *might* be available at load time - it is
+ nevertheless necessary for the correct execution of the autoconf
+ package. (It needs to be able to detect functions that are not
+ provided by the host OS). Since this package is used by lots of
+ projects, maintaining the old linker behaviour is important. */
if (link_info.unresolved_syms_in_objects == RM_NOT_YET_SET)
link_info.unresolved_syms_in_objects = RM_IGNORE;
if (link_info.unresolved_syms_in_shared_libs == RM_NOT_YET_SET)
- link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
+ link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols;
break;
case OPTION_NON_SHARED:
config.dynamic_link = FALSE;