Add Spanish translation to gold.
[binutils-gdb.git] / gold / gold.h
index 62c014ead88d4eedd2548955fa2ed574200dfc10..a0cc62deb3a48572151266537ffbdc3ce584638a 100644 (file)
@@ -1,6 +1,6 @@
 // gold.h -- general definitions for gold   -*- C++ -*-
 
-// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
 #include "ansidecl.h"
 
 #include <cstddef>
+#include <cstring>
+#include <stdint.h>
 #include <sys/types.h>
 
+#ifndef ENABLE_NLS
+  // The Solaris version of locale.h always includes libintl.h.  If we
+  // have been configured with --disable-nls then ENABLE_NLS will not
+  // be defined and the dummy definitions of bindtextdomain (et al)
+  // below will conflict with the defintions in libintl.h.  So we
+  // define these values to prevent the bogus inclusion of libintl.h.
+# define _LIBINTL_H
+# define _LIBGETTEXT_H
+#endif
+
+// Always include <clocale> first to avoid conflicts with the macros
+// used when ENABLE_NLS is not defined.
+#include <clocale>
+
 #ifdef ENABLE_NLS
 # include <libintl.h>
 # define _(String) gettext (String)
@@ -115,6 +131,7 @@ class Command_line;
 class Input_argument_list;
 class Dirsearch;
 class Input_objects;
+class Mapfile;
 class Symbol;
 class Symbol_table;
 class Layout;
@@ -185,12 +202,22 @@ gold_warning_at_location(const Relocate_info<size, big_endian>*,
                         size_t, off_t, const char* format, ...)
   TEMPLATE_ATTRIBUTE_PRINTF_4;
 
-// This function is called to report an undefined symbol.
+// This function is called to report an undefined symbol without
+// a relocation (e.g., referenced by a dynamic object).  SYM is
+// the undefined symbol.  The file name associated with the SYM
+// is used to print a location for the undefined symbol.
+extern void
+gold_undefined_symbol(const Symbol*);
+
+// This function is called to report an undefined symbol resulting
+// from a relocation.  SYM is the undefined symbol.  RELINFO is the
+// general relocation info.  RELNUM is the number of the reloc,
+// and RELOFFSET is the reloc's offset.
 template<int size, bool big_endian>
 extern void
-gold_undefined_symbol(const Symbol*,
-                     const Relocate_info<size, big_endian>*,
-                     size_t, off_t);
+gold_undefined_symbol_at_location(const Symbol*,
+                                 const Relocate_info<size, big_endian>*,
+                                 size_t, off_t);
 
 // This is function is called in some cases if we run out of memory.
 extern void
@@ -241,7 +268,20 @@ queue_initial_tasks(const General_options&,
                    Workqueue*,
                    Input_objects*,
                    Symbol_table*,
-                   Layout*);
+                   Layout*,
+                   Mapfile*);
+
+// Queue up the set of tasks to be done before
+// the middle set of tasks.  Only used when garbage
+// collection is to be done. 
+extern void
+queue_middle_gc_tasks(const General_options&,
+                      const Task*,
+                      const Input_objects*,
+                      Symbol_table*,
+                      Layout*,
+                      Workqueue*,
+                      Mapfile*);
 
 // Queue up the middle set of tasks.
 extern void
@@ -250,7 +290,8 @@ queue_middle_tasks(const General_options&,
                   const Input_objects*,
                   Symbol_table*,
                   Layout*,
-                  Workqueue*);
+                  Workqueue*,
+                  Mapfile*);
 
 // Queue up the final set of tasks.
 extern void
@@ -261,6 +302,12 @@ queue_final_tasks(const General_options&,
                  Workqueue*,
                  Output_file* of);
 
+inline bool
+is_prefix_of(const char* prefix, const char* str)
+{
+  return strncmp(prefix, str, strlen(prefix)) == 0;
+}
+
 } // End namespace gold.
 
 #endif // !defined(GOLD_GOLD_H)