Add const qualifiers at various places.
[binutils-gdb.git] / ld / ldmain.c
index 577928d5504ea51fab1316c9fc0d1106e5258c3c..21133ab72090a6e2f8fcb80a2c11f40f8fc12fb0 100644 (file)
@@ -1,5 +1,5 @@
 /* Main program of GNU linker.
-   Copyright (C) 1991-2015 Free Software Foundation, Inc.
+   Copyright (C) 1991-2016 Free Software Foundation, Inc.
    Written by Steve Chamberlain steve@cygnus.com
 
    This file is part of the GNU Binutils.
@@ -222,15 +222,7 @@ main (int argc, char **argv)
   /* Set up the sysroot directory.  */
   ld_sysroot = get_sysroot (argc, argv);
   if (*ld_sysroot)
-    {
-      if (*TARGET_SYSTEM_ROOT == 0)
-       {
-         einfo ("%P%F: this linker was not configured to use sysroots\n");
-         ld_sysroot = "";
-       }
-      else
-       ld_canon_sysroot = lrealpath (ld_sysroot);
-    }
+    ld_canon_sysroot = lrealpath (ld_sysroot);
   if (ld_canon_sysroot)
     ld_canon_sysroot_len = strlen (ld_canon_sysroot);
   else
@@ -286,9 +278,13 @@ main (int argc, char **argv)
   link_info.fini_function = "_fini";
   link_info.relax_pass = 1;
   link_info.extern_protected_data = -1;
+  link_info.dynamic_undefined_weak = -1;
   link_info.pei386_auto_import = -1;
   link_info.spare_dynamic_tags = 5;
   link_info.path_separator = ':';
+#ifdef DEFAULT_FLAG_COMPRESS_DEBUG
+  link_info.compress_debug = COMPRESS_DEBUG_GABI_ZLIB;
+#endif
 
   ldfile_add_arch ("");
   emulation = get_emulation (argc, argv);