* elf32-m68k.c (elf32_m68k_set_private_flags): New.
[deliverable/binutils-gdb.git] / ld / ldmain.c
index ec4086a05e5d6763b9716637d7202c888dc173e4..1e710dbb6504cfe0937dd3c8bb294285a47ffaee 100644 (file)
@@ -1,5 +1,6 @@
 /* Main program of GNU linker.
-   Copyright (C) 1991, 92, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+   Free Software Foundation, Inc.
    Written by Steve Chamberlain steve@cygnus.com
 
 This file is part of GLD, the Gnu Linker.
@@ -82,6 +83,9 @@ boolean version_printed;
 /* Nonzero means link in every member of an archive.  */
 boolean whole_archive;
 
+/* True if we should demangle symbol names.  */
+boolean demangling;
+
 args_type command_line;
 
 ld_config_type config;
@@ -162,7 +166,9 @@ main (argc, argv)
   char *emulation;
   long start_time = get_run_time ();
 
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
   setlocale (LC_MESSAGES, "");
+#endif
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
@@ -192,10 +198,19 @@ main (argc, argv)
   whole_archive = false;
   config.build_constructors = true;
   config.dynamic_link = false;
+  config.has_shared = false;
   command_line.force_common_definition = false;
   command_line.interpreter = NULL;
   command_line.rpath = NULL;
   command_line.warn_mismatch = true;
+  command_line.check_section_addresses = true;
+
+  /* We initialize DEMANGLING based on the environment variable
+     COLLECT_NO_DEMANGLE.  The gcc collect2 program will demangle the
+     output of the linker, unless COLLECT_NO_DEMANGLE is set in the
+     environment.  Acting the same way here lets us provide the same
+     interface by default.  */
+  demangling = getenv ("COLLECT_NO_DEMANGLE") == NULL;
 
   link_info.callbacks = &link_callbacks;
   link_info.relocateable = false;
@@ -203,6 +218,8 @@ main (argc, argv)
   link_info.symbolic = false;
   link_info.static_link = false;
   link_info.traditional_format = false;
+  link_info.optimize = false;
+  link_info.no_undefined = false;
   link_info.strip = strip_none;
   link_info.discard = discard_none;
   link_info.keep_memory = true;
@@ -213,6 +230,7 @@ main (argc, argv)
   link_info.notice_all = false;
   link_info.notice_hash = NULL;
   link_info.wrap_hash = NULL;
+  link_info.mpc860c0 = 0;
   
   ldfile_add_arch ("");
 
@@ -234,8 +252,12 @@ main (argc, argv)
 
   if (link_info.relocateable)
     {
-      if (command_line.relax)
-       einfo (_("%P%F: -relax and -r may not be used together\n"));
+      if (command_line.gc_sections)
+       einfo ("%P%F: --gc-sections and -r may not be used together\n");
+      if (link_info.mpc860c0)
+       einfo (_("%P%F: -r and --mpc860c0 may not be used together\n"));
+      else if (command_line.relax)
+       einfo (_("%P%F: --relax and -r may not be used together\n"));
       if (link_info.shared)
        einfo (_("%P%F: -r and -shared may not be used together\n"));
     }
@@ -415,7 +437,6 @@ main (argc, argv)
 
   if (config.stats)
     {
-      extern char **environ;
 #ifdef HAVE_SBRK
       char *lim = (char *) sbrk (0);
 #endif
This page took 0.02367 seconds and 4 git commands to generate.