Back to index

cell-binutils  2.17cvs20070401
lexsup.c
Go to the documentation of this file.
00001 /* Parse options for the GNU linker.
00002    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
00003    2001, 2002, 2003, 2004, 2005, 2006, 2007
00004    Free Software Foundation, Inc.
00005 
00006    This file is part of GLD, the Gnu Linker.
00007 
00008    GLD is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 2, or (at your option)
00011    any later version.
00012 
00013    GLD is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with GLD; see the file COPYING.  If not, write to the Free
00020    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00021    02110-1301, USA.  */
00022 
00023 #include "config.h"
00024 #include "bfd.h"
00025 #include "bfdver.h"
00026 #include "sysdep.h"
00027 #include "libiberty.h"
00028 #include <stdio.h>
00029 #include <string.h>
00030 #include "safe-ctype.h"
00031 #include "getopt.h"
00032 #include "bfdlink.h"
00033 #include "ld.h"
00034 #include "ldmain.h"
00035 #include "ldmisc.h"
00036 #include "ldexp.h"
00037 #include "ldlang.h"
00038 #include <ldgram.h>
00039 #include "ldlex.h"
00040 #include "ldfile.h"
00041 #include "ldver.h"
00042 #include "ldemul.h"
00043 #include "demangle.h"
00044 
00045 #ifndef PATH_SEPARATOR
00046 #if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN32__))
00047 #define PATH_SEPARATOR ';'
00048 #else
00049 #define PATH_SEPARATOR ':'
00050 #endif
00051 #endif
00052 
00053 /* Somewhere above, sys/stat.h got included . . . .  */
00054 #if !defined(S_ISDIR) && defined(S_IFDIR)
00055 #define       S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
00056 #endif
00057 
00058 static void set_default_dirlist (char *);
00059 static void set_section_start (char *, char *);
00060 static void set_segment_start (const char *, char *);
00061 static void help (void);
00062 
00063 /* Non-zero if we are processing a --defsym from the command line.  */
00064 int parsing_defsym = 0;
00065 
00066 /* Codes used for the long options with no short synonyms.  150 isn't
00067    special; it's just an arbitrary non-ASCII char value.  */
00068 enum option_values
00069 {
00070   OPTION_ASSERT = 150,
00071   OPTION_CALL_SHARED,
00072   OPTION_CREF,
00073   OPTION_DEFSYM,
00074   OPTION_DEMANGLE,
00075   OPTION_DYNAMIC_LINKER,
00076   OPTION_SYSROOT,
00077   OPTION_EB,
00078   OPTION_EL,
00079   OPTION_EMBEDDED_RELOCS,
00080   OPTION_EXPORT_DYNAMIC,
00081   OPTION_HELP,
00082   OPTION_IGNORE,
00083   OPTION_MAP,
00084   OPTION_NO_DEMANGLE,
00085   OPTION_NO_KEEP_MEMORY,
00086   OPTION_NO_WARN_MISMATCH,
00087   OPTION_NOINHIBIT_EXEC,
00088   OPTION_NON_SHARED,
00089   OPTION_NO_WHOLE_ARCHIVE,
00090   OPTION_OFORMAT,
00091   OPTION_RELAX,
00092   OPTION_RETAIN_SYMBOLS_FILE,
00093   OPTION_RPATH,
00094   OPTION_RPATH_LINK,
00095   OPTION_SHARED,
00096   OPTION_SONAME,
00097   OPTION_SORT_COMMON,
00098   OPTION_SORT_SECTION,
00099   OPTION_STATS,
00100   OPTION_SYMBOLIC,
00101   OPTION_SYMBOLIC_FUNCTIONS,
00102   OPTION_TASK_LINK,
00103   OPTION_TBSS,
00104   OPTION_TDATA,
00105   OPTION_TTEXT,
00106   OPTION_TRADITIONAL_FORMAT,
00107   OPTION_UR,
00108   OPTION_VERBOSE,
00109   OPTION_VERSION,
00110   OPTION_VERSION_SCRIPT,
00111   OPTION_VERSION_EXPORTS_SECTION,
00112   OPTION_DYNAMIC_LIST,
00113   OPTION_DYNAMIC_LIST_CPP_NEW,
00114   OPTION_DYNAMIC_LIST_CPP_TYPEINFO,
00115   OPTION_DYNAMIC_LIST_DATA,
00116   OPTION_WARN_COMMON,
00117   OPTION_WARN_CONSTRUCTORS,
00118   OPTION_WARN_FATAL,
00119   OPTION_WARN_MULTIPLE_GP,
00120   OPTION_WARN_ONCE,
00121   OPTION_WARN_SECTION_ALIGN,
00122   OPTION_SPLIT_BY_RELOC,
00123   OPTION_SPLIT_BY_FILE ,
00124   OPTION_WHOLE_ARCHIVE,
00125   OPTION_ADD_NEEDED,
00126   OPTION_NO_ADD_NEEDED,
00127   OPTION_AS_NEEDED,
00128   OPTION_NO_AS_NEEDED,
00129   OPTION_WRAP,
00130   OPTION_FORCE_EXE_SUFFIX,
00131   OPTION_GC_SECTIONS,
00132   OPTION_NO_GC_SECTIONS,
00133   OPTION_PRINT_GC_SECTIONS,
00134   OPTION_NO_PRINT_GC_SECTIONS,
00135   OPTION_HASH_SIZE,
00136   OPTION_CHECK_SECTIONS,
00137   OPTION_NO_CHECK_SECTIONS,
00138   OPTION_NO_UNDEFINED,
00139   OPTION_INIT,
00140   OPTION_FINI,
00141   OPTION_SECTION_START,
00142   OPTION_UNIQUE,
00143   OPTION_TARGET_HELP,
00144   OPTION_ALLOW_SHLIB_UNDEFINED,
00145   OPTION_NO_ALLOW_SHLIB_UNDEFINED,
00146   OPTION_ALLOW_MULTIPLE_DEFINITION,
00147   OPTION_NO_UNDEFINED_VERSION,
00148   OPTION_DEFAULT_SYMVER,
00149   OPTION_DEFAULT_IMPORTED_SYMVER,
00150   OPTION_DISCARD_NONE,
00151   OPTION_SPARE_DYNAMIC_TAGS,
00152   OPTION_NO_DEFINE_COMMON,
00153   OPTION_NOSTDLIB,
00154   OPTION_NO_OMAGIC,
00155   OPTION_STRIP_DISCARDED,
00156   OPTION_NO_STRIP_DISCARDED,
00157   OPTION_ACCEPT_UNKNOWN_INPUT_ARCH,
00158   OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH,
00159   OPTION_PIE,
00160   OPTION_UNRESOLVED_SYMBOLS,
00161   OPTION_WARN_UNRESOLVED_SYMBOLS,
00162   OPTION_ERROR_UNRESOLVED_SYMBOLS,
00163   OPTION_WARN_SHARED_TEXTREL,
00164   OPTION_REDUCE_MEMORY_OVERHEADS,
00165   OPTION_DEFAULT_SCRIPT
00166 };
00167 
00168 /* The long options.  This structure is used for both the option
00169    parsing and the help text.  */
00170 
00171 struct ld_option
00172 {
00173   /* The long option information.  */
00174   struct option opt;
00175   /* The short option with the same meaning ('\0' if none).  */
00176   char shortopt;
00177   /* The name of the argument (NULL if none).  */
00178   const char *arg;
00179   /* The documentation string.  If this is NULL, this is a synonym for
00180      the previous option.  */
00181   const char *doc;
00182   enum {
00183     /* Use one dash before long option name.  */
00184     ONE_DASH,
00185     /* Use two dashes before long option name.  */
00186     TWO_DASHES,
00187     /* Only accept two dashes before the long option name.
00188        This is an overloading of the use of this enum, since originally it
00189        was only intended to tell the --help display function how to display
00190        the long option name.  This feature was added in order to resolve
00191        the confusion about the -omagic command line switch.  Is it setting
00192        the output file name to "magic" or is it setting the NMAGIC flag on
00193        the output ?  It has been decided that it is setting the output file
00194        name, and that if you want to set the NMAGIC flag you should use -N
00195        or --omagic.  */
00196     EXACTLY_TWO_DASHES,
00197     /* Don't mention this option in --help output.  */
00198     NO_HELP
00199   } control;
00200 };
00201 
00202 static const struct ld_option ld_options[] =
00203 {
00204   { {NULL, required_argument, NULL, '\0'},
00205     'a', N_("KEYWORD"), N_("Shared library control for HP/UX compatibility"),
00206     ONE_DASH },
00207   { {"architecture", required_argument, NULL, 'A'},
00208     'A', N_("ARCH"), N_("Set architecture") , TWO_DASHES },
00209   { {"format", required_argument, NULL, 'b'},
00210     'b', N_("TARGET"), N_("Specify target for following input files"),
00211     TWO_DASHES },
00212   { {"mri-script", required_argument, NULL, 'c'},
00213     'c', N_("FILE"), N_("Read MRI format linker script"), TWO_DASHES },
00214   { {"dc", no_argument, NULL, 'd'},
00215     'd', NULL, N_("Force common symbols to be defined"), ONE_DASH },
00216   { {"dp", no_argument, NULL, 'd'},
00217     '\0', NULL, NULL, ONE_DASH },
00218   { {"entry", required_argument, NULL, 'e'},
00219     'e', N_("ADDRESS"), N_("Set start address"), TWO_DASHES },
00220   { {"export-dynamic", no_argument, NULL, OPTION_EXPORT_DYNAMIC},
00221     'E', NULL, N_("Export all dynamic symbols"), TWO_DASHES },
00222   { {"EB", no_argument, NULL, OPTION_EB},
00223     '\0', NULL, N_("Link big-endian objects"), ONE_DASH },
00224   { {"EL", no_argument, NULL, OPTION_EL},
00225     '\0', NULL, N_("Link little-endian objects"), ONE_DASH },
00226   { {"auxiliary", required_argument, NULL, 'f'},
00227     'f', N_("SHLIB"), N_("Auxiliary filter for shared object symbol table"),
00228     TWO_DASHES },
00229   { {"filter", required_argument, NULL, 'F'},
00230     'F', N_("SHLIB"), N_("Filter for shared object symbol table"),
00231     TWO_DASHES },
00232   { {NULL, no_argument, NULL, '\0'},
00233     'g', NULL, N_("Ignored"), ONE_DASH },
00234   { {"gpsize", required_argument, NULL, 'G'},
00235     'G', N_("SIZE"), N_("Small data size (if no size, same as --shared)"),
00236     TWO_DASHES },
00237   { {"soname", required_argument, NULL, OPTION_SONAME},
00238     'h', N_("FILENAME"), N_("Set internal name of shared library"), ONE_DASH },
00239   { {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
00240     'I', N_("PROGRAM"), N_("Set PROGRAM as the dynamic linker to use"),
00241     TWO_DASHES },
00242   { {"library", required_argument, NULL, 'l'},
00243     'l', N_("LIBNAME"), N_("Search for library LIBNAME"), TWO_DASHES },
00244   { {"library-path", required_argument, NULL, 'L'},
00245     'L', N_("DIRECTORY"), N_("Add DIRECTORY to library search path"),
00246     TWO_DASHES },
00247   { {"sysroot=<DIRECTORY>", required_argument, NULL, OPTION_SYSROOT},
00248     '\0', NULL, N_("Override the default sysroot location"), TWO_DASHES },
00249   { {NULL, required_argument, NULL, '\0'},
00250     'm', N_("EMULATION"), N_("Set emulation"), ONE_DASH },
00251   { {"print-map", no_argument, NULL, 'M'},
00252     'M', NULL, N_("Print map file on standard output"), TWO_DASHES },
00253   { {"nmagic", no_argument, NULL, 'n'},
00254     'n', NULL, N_("Do not page align data"), TWO_DASHES },
00255   { {"omagic", no_argument, NULL, 'N'},
00256     'N', NULL, N_("Do not page align data, do not make text readonly"),
00257     EXACTLY_TWO_DASHES },
00258   { {"no-omagic", no_argument, NULL, OPTION_NO_OMAGIC},
00259     '\0', NULL, N_("Page align data, make text readonly"),
00260     EXACTLY_TWO_DASHES },
00261   { {"output", required_argument, NULL, 'o'},
00262     'o', N_("FILE"), N_("Set output file name"), EXACTLY_TWO_DASHES },
00263   { {NULL, required_argument, NULL, '\0'},
00264     'O', NULL, N_("Optimize output file"), ONE_DASH },
00265   { {"Qy", no_argument, NULL, OPTION_IGNORE},
00266     '\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH },
00267   { {"emit-relocs", no_argument, NULL, 'q'},
00268     'q', NULL, "Generate relocations in final output", TWO_DASHES },
00269   { {"relocatable", no_argument, NULL, 'r'},
00270     'r', NULL, N_("Generate relocatable output"), TWO_DASHES },
00271   { {NULL, no_argument, NULL, '\0'},
00272     'i', NULL, NULL, ONE_DASH },
00273   { {"just-symbols", required_argument, NULL, 'R'},
00274     'R', N_("FILE"), N_("Just link symbols (if directory, same as --rpath)"),
00275     TWO_DASHES },
00276   { {"strip-all", no_argument, NULL, 's'},
00277     's', NULL, N_("Strip all symbols"), TWO_DASHES },
00278   { {"strip-debug", no_argument, NULL, 'S'},
00279     'S', NULL, N_("Strip debugging symbols"), TWO_DASHES },
00280   { {"strip-discarded", no_argument, NULL, OPTION_STRIP_DISCARDED},
00281     '\0', NULL, N_("Strip symbols in discarded sections"), TWO_DASHES },
00282   { {"no-strip-discarded", no_argument, NULL, OPTION_NO_STRIP_DISCARDED},
00283     '\0', NULL, N_("Do not strip symbols in discarded sections"), TWO_DASHES },
00284   { {"trace", no_argument, NULL, 't'},
00285     't', NULL, N_("Trace file opens"), TWO_DASHES },
00286   { {"script", required_argument, NULL, 'T'},
00287     'T', N_("FILE"), N_("Read linker script"), TWO_DASHES },
00288   { {"default-script", required_argument, NULL, OPTION_DEFAULT_SCRIPT},
00289     '\0', N_("FILE"), N_("Read default linker script"), TWO_DASHES },
00290   { {"dT", required_argument, NULL, OPTION_DEFAULT_SCRIPT},
00291     '\0', NULL, NULL, ONE_DASH },
00292   { {"undefined", required_argument, NULL, 'u'},
00293     'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"),
00294     TWO_DASHES },
00295   { {"unique", optional_argument, NULL, OPTION_UNIQUE},
00296     '\0', N_("[=SECTION]"),
00297     N_("Don't merge input [SECTION | orphan] sections"), TWO_DASHES },
00298   { {"Ur", no_argument, NULL, OPTION_UR},
00299     '\0', NULL, N_("Build global constructor/destructor tables"), ONE_DASH },
00300   { {"version", no_argument, NULL, OPTION_VERSION},
00301     'v', NULL, N_("Print version information"), TWO_DASHES },
00302   { {NULL, no_argument, NULL, '\0'},
00303     'V', NULL, N_("Print version and emulation information"), ONE_DASH },
00304   { {"discard-all", no_argument, NULL, 'x'},
00305     'x', NULL, N_("Discard all local symbols"), TWO_DASHES },
00306   { {"discard-locals", no_argument, NULL, 'X'},
00307     'X', NULL, N_("Discard temporary local symbols (default)"), TWO_DASHES },
00308   { {"discard-none", no_argument, NULL, OPTION_DISCARD_NONE},
00309     '\0', NULL, N_("Don't discard any local symbols"), TWO_DASHES },
00310   { {"trace-symbol", required_argument, NULL, 'y'},
00311     'y', N_("SYMBOL"), N_("Trace mentions of SYMBOL"), TWO_DASHES },
00312   { {NULL, required_argument, NULL, '\0'},
00313     'Y', N_("PATH"), N_("Default search path for Solaris compatibility"),
00314     ONE_DASH },
00315   { {"start-group", no_argument, NULL, '('},
00316     '(', NULL, N_("Start a group"), TWO_DASHES },
00317   { {"end-group", no_argument, NULL, ')'},
00318     ')', NULL, N_("End a group"), TWO_DASHES },
00319   { {"accept-unknown-input-arch", no_argument, NULL,
00320      OPTION_ACCEPT_UNKNOWN_INPUT_ARCH},
00321     '\0', NULL,
00322     N_("Accept input files whose architecture cannot be determined"),
00323     TWO_DASHES },
00324   { {"no-accept-unknown-input-arch", no_argument, NULL,
00325      OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH},
00326     '\0', NULL, N_("Reject input files whose architecture is unknown"),
00327     TWO_DASHES },
00328   { {"add-needed", no_argument, NULL, OPTION_ADD_NEEDED},
00329     '\0', NULL, N_("Set DT_NEEDED tags for DT_NEEDED entries in\n"
00330                  "\t\t\t\tfollowing dynamic libs"), TWO_DASHES },
00331   { {"no-add-needed", no_argument, NULL, OPTION_NO_ADD_NEEDED},
00332     '\0', NULL, N_("Do not set DT_NEEDED tags for DT_NEEDED entries\n"
00333                  "\t\t\t\tin following dynamic libs"), TWO_DASHES },
00334   { {"as-needed", no_argument, NULL, OPTION_AS_NEEDED},
00335     '\0', NULL, N_("Only set DT_NEEDED for following dynamic libs if used"),
00336     TWO_DASHES },
00337   { {"no-as-needed", no_argument, NULL, OPTION_NO_AS_NEEDED},
00338     '\0', NULL, N_("Always set DT_NEEDED for following dynamic libs"),
00339     TWO_DASHES },
00340   { {"assert", required_argument, NULL, OPTION_ASSERT},
00341     '\0', N_("KEYWORD"), N_("Ignored for SunOS compatibility"), ONE_DASH },
00342   { {"Bdynamic", no_argument, NULL, OPTION_CALL_SHARED},
00343     '\0', NULL, N_("Link against shared libraries"), ONE_DASH },
00344   { {"dy", no_argument, NULL, OPTION_CALL_SHARED},
00345     '\0', NULL, NULL, ONE_DASH },
00346   { {"call_shared", no_argument, NULL, OPTION_CALL_SHARED},
00347     '\0', NULL, NULL, ONE_DASH },
00348   { {"Bstatic", no_argument, NULL, OPTION_NON_SHARED},
00349     '\0', NULL, N_("Do not link against shared libraries"), ONE_DASH },
00350   { {"dn", no_argument, NULL, OPTION_NON_SHARED},
00351     '\0', NULL, NULL, ONE_DASH },
00352   { {"non_shared", no_argument, NULL, OPTION_NON_SHARED},
00353     '\0', NULL, NULL, ONE_DASH },
00354   { {"static", no_argument, NULL, OPTION_NON_SHARED},
00355     '\0', NULL, NULL, ONE_DASH },
00356   { {"Bsymbolic", no_argument, NULL, OPTION_SYMBOLIC},
00357     '\0', NULL, N_("Bind global references locally"), ONE_DASH },
00358   { {"Bsymbolic-functions", no_argument, NULL, OPTION_SYMBOLIC_FUNCTIONS},
00359     '\0', NULL, N_("Bind global function references locally"), ONE_DASH },
00360   { {"check-sections", no_argument, NULL, OPTION_CHECK_SECTIONS},
00361     '\0', NULL, N_("Check section addresses for overlaps (default)"),
00362     TWO_DASHES },
00363   { {"no-check-sections", no_argument, NULL, OPTION_NO_CHECK_SECTIONS},
00364     '\0', NULL, N_("Do not check section addresses for overlaps"),
00365     TWO_DASHES },
00366   { {"cref", no_argument, NULL, OPTION_CREF},
00367     '\0', NULL, N_("Output cross reference table"), TWO_DASHES },
00368   { {"defsym", required_argument, NULL, OPTION_DEFSYM},
00369     '\0', N_("SYMBOL=EXPRESSION"), N_("Define a symbol"), TWO_DASHES },
00370   { {"demangle", optional_argument, NULL, OPTION_DEMANGLE},
00371     '\0', N_("[=STYLE]"), N_("Demangle symbol names [using STYLE]"),
00372     TWO_DASHES },
00373   { {"embedded-relocs", no_argument, NULL, OPTION_EMBEDDED_RELOCS},
00374     '\0', NULL, N_("Generate embedded relocs"), TWO_DASHES},
00375   { {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL},
00376     '\0', NULL, N_("Treat warnings as errors"),
00377     TWO_DASHES },
00378   { {"fini", required_argument, NULL, OPTION_FINI},
00379     '\0', N_("SYMBOL"), N_("Call SYMBOL at unload-time"), ONE_DASH },
00380   { {"force-exe-suffix", no_argument, NULL, OPTION_FORCE_EXE_SUFFIX},
00381     '\0', NULL, N_("Force generation of file with .exe suffix"), TWO_DASHES},
00382   { {"gc-sections", no_argument, NULL, OPTION_GC_SECTIONS},
00383     '\0', NULL, N_("Remove unused sections (on some targets)"),
00384     TWO_DASHES },
00385   { {"no-gc-sections", no_argument, NULL, OPTION_NO_GC_SECTIONS},
00386     '\0', NULL, N_("Don't remove unused sections (default)"),
00387     TWO_DASHES },
00388   { {"print-gc-sections", no_argument, NULL, OPTION_PRINT_GC_SECTIONS},
00389     '\0', NULL, N_("List removed unused sections on stderr"),
00390     TWO_DASHES },
00391   { {"no-print-gc-sections", no_argument, NULL, OPTION_NO_PRINT_GC_SECTIONS},
00392     '\0', NULL, N_("Do not list removed unused sections"),
00393     TWO_DASHES },
00394   { {"hash-size=<NUMBER>", required_argument, NULL, OPTION_HASH_SIZE},
00395     '\0', NULL, N_("Set default hash table size close to <NUMBER>"),
00396     TWO_DASHES },
00397   { {"help", no_argument, NULL, OPTION_HELP},
00398     '\0', NULL, N_("Print option help"), TWO_DASHES },
00399   { {"init", required_argument, NULL, OPTION_INIT},
00400     '\0', N_("SYMBOL"), N_("Call SYMBOL at load-time"), ONE_DASH },
00401   { {"Map", required_argument, NULL, OPTION_MAP},
00402     '\0', N_("FILE"), N_("Write a map file"), ONE_DASH },
00403   { {"no-define-common", no_argument, NULL, OPTION_NO_DEFINE_COMMON},
00404     '\0', NULL, N_("Do not define Common storage"), TWO_DASHES },
00405   { {"no-demangle", no_argument, NULL, OPTION_NO_DEMANGLE },
00406     '\0', NULL, N_("Do not demangle symbol names"), TWO_DASHES },
00407   { {"no-keep-memory", no_argument, NULL, OPTION_NO_KEEP_MEMORY},
00408     '\0', NULL, N_("Use less memory and more disk I/O"), TWO_DASHES },
00409   { {"no-undefined", no_argument, NULL, OPTION_NO_UNDEFINED},
00410     '\0', NULL, N_("Do not allow unresolved references in object files"),
00411     TWO_DASHES },
00412   { {"allow-shlib-undefined", no_argument, NULL, OPTION_ALLOW_SHLIB_UNDEFINED},
00413     '\0', NULL, N_("Allow unresolved references in shared libaries"),
00414     TWO_DASHES },
00415   { {"no-allow-shlib-undefined", no_argument, NULL,
00416      OPTION_NO_ALLOW_SHLIB_UNDEFINED},
00417     '\0', NULL, N_("Do not allow unresolved references in shared libs"),
00418     TWO_DASHES },
00419   { {"allow-multiple-definition", no_argument, NULL,
00420      OPTION_ALLOW_MULTIPLE_DEFINITION},
00421     '\0', NULL, N_("Allow multiple definitions"), TWO_DASHES },
00422   { {"no-undefined-version", no_argument, NULL, OPTION_NO_UNDEFINED_VERSION},
00423     '\0', NULL, N_("Disallow undefined version"), TWO_DASHES },
00424   { {"default-symver", no_argument, NULL, OPTION_DEFAULT_SYMVER},
00425     '\0', NULL, N_("Create default symbol version"), TWO_DASHES },
00426   { {"default-imported-symver", no_argument, NULL,
00427       OPTION_DEFAULT_IMPORTED_SYMVER},
00428     '\0', NULL, N_("Create default symbol version for imported symbols"),
00429     TWO_DASHES },
00430   { {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
00431     '\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
00432   { {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
00433     '\0', NULL, N_("Turn off --whole-archive"), TWO_DASHES },
00434   { {"noinhibit-exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
00435     '\0', NULL, N_("Create an output file even if errors occur"),
00436     TWO_DASHES },
00437   { {"noinhibit_exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
00438     '\0', NULL, NULL, NO_HELP },
00439   { {"nostdlib", no_argument, NULL, OPTION_NOSTDLIB},
00440     '\0', NULL, N_("Only use library directories specified on\n"
00441                  "\t\t\t\tthe command line"), ONE_DASH },
00442   { {"oformat", required_argument, NULL, OPTION_OFORMAT},
00443     '\0', N_("TARGET"), N_("Specify target of output file"),
00444     EXACTLY_TWO_DASHES },
00445   { {"qmagic", no_argument, NULL, OPTION_IGNORE},
00446     '\0', NULL, N_("Ignored for Linux compatibility"), ONE_DASH },
00447   { {"reduce-memory-overheads", no_argument, NULL,
00448      OPTION_REDUCE_MEMORY_OVERHEADS},
00449     '\0', NULL, N_("Reduce memory overheads, possibly taking much longer"),
00450     TWO_DASHES },
00451   { {"relax", no_argument, NULL, OPTION_RELAX},
00452     '\0', NULL, N_("Relax branches on certain targets"), TWO_DASHES },
00453   { {"retain-symbols-file", required_argument, NULL,
00454      OPTION_RETAIN_SYMBOLS_FILE},
00455     '\0', N_("FILE"), N_("Keep only symbols listed in FILE"), TWO_DASHES },
00456   { {"rpath", required_argument, NULL, OPTION_RPATH},
00457     '\0', N_("PATH"), N_("Set runtime shared library search path"), ONE_DASH },
00458   { {"rpath-link", required_argument, NULL, OPTION_RPATH_LINK},
00459     '\0', N_("PATH"), N_("Set link time shared library search path"),
00460     ONE_DASH },
00461   { {"shared", no_argument, NULL, OPTION_SHARED},
00462     '\0', NULL, N_("Create a shared library"), ONE_DASH },
00463   { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD.  */
00464     '\0', NULL, NULL, ONE_DASH },
00465   { {"pie", no_argument, NULL, OPTION_PIE},
00466     '\0', NULL, N_("Create a position independent executable"), ONE_DASH },
00467   { {"pic-executable", no_argument, NULL, OPTION_PIE},
00468     '\0', NULL, NULL, TWO_DASHES },
00469   { {"sort-common", no_argument, NULL, OPTION_SORT_COMMON},
00470     '\0', NULL, N_("Sort common symbols by size"), TWO_DASHES },
00471   { {"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
00472     '\0', NULL, NULL, NO_HELP },
00473   { {"sort-section", required_argument, NULL, OPTION_SORT_SECTION},
00474     '\0', N_("name|alignment"), 
00475     N_("Sort sections by name or maximum alignment"), TWO_DASHES },
00476   { {"spare-dynamic-tags", required_argument, NULL, OPTION_SPARE_DYNAMIC_TAGS},
00477     '\0', N_("COUNT"), N_("How many tags to reserve in .dynamic section"),
00478     TWO_DASHES },
00479   { {"split-by-file", optional_argument, NULL, OPTION_SPLIT_BY_FILE},
00480     '\0', N_("[=SIZE]"), N_("Split output sections every SIZE octets"),
00481     TWO_DASHES },
00482   { {"split-by-reloc", optional_argument, NULL, OPTION_SPLIT_BY_RELOC},
00483     '\0', N_("[=COUNT]"), N_("Split output sections every COUNT relocs"),
00484     TWO_DASHES },
00485   { {"stats", no_argument, NULL, OPTION_STATS},
00486     '\0', NULL, N_("Print memory usage statistics"), TWO_DASHES },
00487   { {"target-help", no_argument, NULL, OPTION_TARGET_HELP},
00488     '\0', NULL, N_("Display target specific options"), TWO_DASHES },
00489   { {"task-link", required_argument, NULL, OPTION_TASK_LINK},
00490     '\0', N_("SYMBOL"), N_("Do task level linking"), TWO_DASHES },
00491   { {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
00492     '\0', NULL, N_("Use same format as native linker"), TWO_DASHES },
00493   { {"section-start", required_argument, NULL, OPTION_SECTION_START},
00494     '\0', N_("SECTION=ADDRESS"), N_("Set address of named section"),
00495     TWO_DASHES },
00496   { {"Tbss", required_argument, NULL, OPTION_TBSS},
00497     '\0', N_("ADDRESS"), N_("Set address of .bss section"), ONE_DASH },
00498   { {"Tdata", required_argument, NULL, OPTION_TDATA},
00499     '\0', N_("ADDRESS"), N_("Set address of .data section"), ONE_DASH },
00500   { {"Ttext", required_argument, NULL, OPTION_TTEXT},
00501     '\0', N_("ADDRESS"), N_("Set address of .text section"), ONE_DASH },
00502   { {"unresolved-symbols=<method>", required_argument, NULL,
00503      OPTION_UNRESOLVED_SYMBOLS},
00504     '\0', NULL, N_("How to handle unresolved symbols.  <method> is:\n"
00505                  "\t\t\t\tignore-all, report-all, ignore-in-object-files,\n"
00506                  "\t\t\t\tignore-in-shared-libs"), TWO_DASHES },
00507   { {"verbose", no_argument, NULL, OPTION_VERBOSE},
00508     '\0', NULL, N_("Output lots of information during link"), TWO_DASHES },
00509   { {"dll-verbose", no_argument, NULL, OPTION_VERBOSE}, /* Linux.  */
00510     '\0', NULL, NULL, NO_HELP },
00511   { {"version-script", required_argument, NULL, OPTION_VERSION_SCRIPT },
00512     '\0', N_("FILE"), N_("Read version information script"), TWO_DASHES },
00513   { {"version-exports-section", required_argument, NULL,
00514      OPTION_VERSION_EXPORTS_SECTION },
00515     '\0', N_("SYMBOL"), N_("Take export symbols list from .exports, using\n"
00516                         "\t\t\t\tSYMBOL as the version."), TWO_DASHES },
00517   { {"dynamic-list-data", no_argument, NULL, OPTION_DYNAMIC_LIST_DATA},
00518     '\0', NULL, N_("Add data symbols to dynamic list"), TWO_DASHES },
00519   { {"dynamic-list-cpp-new", no_argument, NULL, OPTION_DYNAMIC_LIST_CPP_NEW},
00520     '\0', NULL, N_("Use C++ operator new/delete dynamic list"), TWO_DASHES },
00521   { {"dynamic-list-cpp-typeinfo", no_argument, NULL, OPTION_DYNAMIC_LIST_CPP_TYPEINFO},
00522     '\0', NULL, N_("Use C++ typeinfo dynamic list"), TWO_DASHES },
00523   { {"dynamic-list", required_argument, NULL, OPTION_DYNAMIC_LIST},
00524     '\0', N_("FILE"), N_("Read dynamic list"), TWO_DASHES },
00525   { {"warn-common", no_argument, NULL, OPTION_WARN_COMMON},
00526     '\0', NULL, N_("Warn about duplicate common symbols"), TWO_DASHES },
00527   { {"warn-constructors", no_argument, NULL, OPTION_WARN_CONSTRUCTORS},
00528     '\0', NULL, N_("Warn if global constructors/destructors are seen"),
00529     TWO_DASHES },
00530   { {"warn-multiple-gp", no_argument, NULL, OPTION_WARN_MULTIPLE_GP},
00531     '\0', NULL, N_("Warn if the multiple GP values are used"), TWO_DASHES },
00532   { {"warn-once", no_argument, NULL, OPTION_WARN_ONCE},
00533     '\0', NULL, N_("Warn only once per undefined symbol"), TWO_DASHES },
00534   { {"warn-section-align", no_argument, NULL, OPTION_WARN_SECTION_ALIGN},
00535     '\0', NULL, N_("Warn if start of section changes due to alignment"),
00536     TWO_DASHES },
00537   { {"warn-shared-textrel", no_argument, NULL, OPTION_WARN_SHARED_TEXTREL},
00538     '\0', NULL, N_("Warn if shared object has DT_TEXTREL"),
00539     TWO_DASHES },
00540   { {"warn-unresolved-symbols", no_argument, NULL,
00541      OPTION_WARN_UNRESOLVED_SYMBOLS},
00542     '\0', NULL, N_("Report unresolved symbols as warnings"), TWO_DASHES },
00543   { {"error-unresolved-symbols", no_argument, NULL,
00544      OPTION_ERROR_UNRESOLVED_SYMBOLS},
00545     '\0', NULL, N_("Report unresolved symbols as errors"), TWO_DASHES },
00546   { {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
00547     '\0', NULL, N_("Include all objects from following archives"),
00548     TWO_DASHES },
00549   { {"wrap", required_argument, NULL, OPTION_WRAP},
00550     '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
00551 };
00552 
00553 #define OPTION_COUNT ARRAY_SIZE (ld_options)
00554 
00555 void
00556 parse_args (unsigned argc, char **argv)
00557 {
00558   unsigned i;
00559   int is, il, irl;
00560   int ingroup = 0;
00561   char *default_dirlist = NULL;
00562   char *shortopts;
00563   struct option *longopts;
00564   struct option *really_longopts;
00565   int last_optind;
00566   enum report_method how_to_report_unresolved_symbols = RM_GENERATE_ERROR;
00567 
00568   shortopts = xmalloc (OPTION_COUNT * 3 + 2);
00569   longopts = xmalloc (sizeof (*longopts) * (OPTION_COUNT + 1));
00570   really_longopts = xmalloc (sizeof (*really_longopts) * (OPTION_COUNT + 1));
00571 
00572   /* Starting the short option string with '-' is for programs that
00573      expect options and other ARGV-elements in any order and that care about
00574      the ordering of the two.  We describe each non-option ARGV-element
00575      as if it were the argument of an option with character code 1.  */
00576   shortopts[0] = '-';
00577   is = 1;
00578   il = 0;
00579   irl = 0;
00580   for (i = 0; i < OPTION_COUNT; i++)
00581     {
00582       if (ld_options[i].shortopt != '\0')
00583        {
00584          shortopts[is] = ld_options[i].shortopt;
00585          ++is;
00586          if (ld_options[i].opt.has_arg == required_argument
00587              || ld_options[i].opt.has_arg == optional_argument)
00588            {
00589              shortopts[is] = ':';
00590              ++is;
00591              if (ld_options[i].opt.has_arg == optional_argument)
00592               {
00593                 shortopts[is] = ':';
00594                 ++is;
00595               }
00596            }
00597        }
00598       if (ld_options[i].opt.name != NULL)
00599        {
00600          if (ld_options[i].control == EXACTLY_TWO_DASHES)
00601            {
00602              really_longopts[irl] = ld_options[i].opt;
00603              ++irl;
00604            }
00605          else
00606            {
00607              longopts[il] = ld_options[i].opt;
00608              ++il;
00609            }
00610        }
00611     }
00612   shortopts[is] = '\0';
00613   longopts[il].name = NULL;
00614   really_longopts[irl].name = NULL;
00615 
00616   ldemul_add_options (is, &shortopts, il, &longopts, irl, &really_longopts);
00617 
00618   /* The -G option is ambiguous on different platforms.  Sometimes it
00619      specifies the largest data size to put into the small data
00620      section.  Sometimes it is equivalent to --shared.  Unfortunately,
00621      the first form takes an argument, while the second does not.
00622 
00623      We need to permit the --shared form because on some platforms,
00624      such as Solaris, gcc -shared will pass -G to the linker.
00625 
00626      To permit either usage, we look through the argument list.  If we
00627      find -G not followed by a number, we change it into --shared.
00628      This will work for most normal cases.  */
00629   for (i = 1; i < argc; i++)
00630     if (strcmp (argv[i], "-G") == 0
00631        && (i + 1 >= argc
00632            || ! ISDIGIT (argv[i + 1][0])))
00633       argv[i] = (char *) "--shared";
00634 
00635   /* Because we permit long options to start with a single dash, and
00636      we have a --library option, and the -l option is conventionally
00637      used with an immediately following argument, we can have bad
00638      results if somebody tries to use -l with a library whose name
00639      happens to start with "ibrary", as in -li.  We avoid problems by
00640      simply turning -l into --library.  This means that users will
00641      have to use two dashes in order to use --library, which is OK
00642      since that's how it is documented.
00643 
00644      FIXME: It's possible that this problem can arise for other short
00645      options as well, although the user does always have the recourse
00646      of adding a space between the option and the argument.  */
00647   for (i = 1; i < argc; i++)
00648     {
00649       if (argv[i][0] == '-'
00650          && argv[i][1] == 'l'
00651          && argv[i][2] != '\0')
00652        {
00653          char *n;
00654 
00655          n = xmalloc (strlen (argv[i]) + 20);
00656          sprintf (n, "--library=%s", argv[i] + 2);
00657          argv[i] = n;
00658        }
00659     }
00660 
00661   last_optind = -1;
00662   while (1)
00663     {
00664       int longind;
00665       int optc;
00666 
00667       /* Using last_optind lets us avoid calling ldemul_parse_args
00668         multiple times on a single option, which would lead to
00669         confusion in the internal static variables maintained by
00670         getopt.  This could otherwise happen for an argument like
00671         -nx, in which the -n is parsed as a single option, and we
00672         loop around to pick up the -x.  */
00673       if (optind != last_optind)
00674        if (ldemul_parse_args (argc, argv))
00675          continue;
00676 
00677       /* getopt_long_only is like getopt_long, but '-' as well as '--'
00678         can indicate a long option.  */
00679       opterr = 0;
00680       last_optind = optind;
00681       optc = getopt_long_only (argc, argv, shortopts, longopts, &longind);
00682       if (optc == '?')
00683        {
00684          optind = last_optind;
00685          optc = getopt_long (argc, argv, "-", really_longopts, &longind);
00686        }
00687 
00688       if (ldemul_handle_option (optc))
00689        continue;
00690 
00691       if (optc == -1)
00692        break;
00693 
00694       switch (optc)
00695        {
00696        case '?':
00697          einfo (_("%P: unrecognized option '%s'\n"), argv[last_optind]);
00698          /* Fall through.  */
00699 
00700        default:
00701          einfo (_("%P%F: use the --help option for usage information\n"));
00702 
00703        case 1:                     /* File name.  */
00704          lang_add_input_file (optarg, lang_input_file_is_file_enum, NULL);
00705          break;
00706 
00707        case OPTION_IGNORE:
00708          break;
00709        case 'a':
00710          /* For HP/UX compatibility.  Actually -a shared should mean
00711             ``use only shared libraries'' but, then, we don't
00712             currently support shared libraries on HP/UX anyhow.  */
00713          if (strcmp (optarg, "archive") == 0)
00714            config.dynamic_link = FALSE;
00715          else if (strcmp (optarg, "shared") == 0
00716                  || strcmp (optarg, "default") == 0)
00717            config.dynamic_link = TRUE;
00718          else
00719            einfo (_("%P%F: unrecognized -a option `%s'\n"), optarg);
00720          break;
00721        case OPTION_ASSERT:
00722          /* FIXME: We just ignore these, but we should handle them.  */
00723          if (strcmp (optarg, "definitions") == 0)
00724            ;
00725          else if (strcmp (optarg, "nodefinitions") == 0)
00726            ;
00727          else if (strcmp (optarg, "nosymbolic") == 0)
00728            ;
00729          else if (strcmp (optarg, "pure-text") == 0)
00730            ;
00731          else
00732            einfo (_("%P%F: unrecognized -assert option `%s'\n"), optarg);
00733          break;
00734        case 'A':
00735          ldfile_add_arch (optarg);
00736          break;
00737        case 'b':
00738          lang_add_target (optarg);
00739          break;
00740        case 'c':
00741          ldfile_open_command_file (optarg);
00742          parser_input = input_mri_script;
00743          yyparse ();
00744          break;
00745        case OPTION_CALL_SHARED:
00746          config.dynamic_link = TRUE;
00747          break;
00748        case OPTION_NON_SHARED:
00749          config.dynamic_link = FALSE;
00750          break;
00751        case OPTION_CREF:
00752          command_line.cref = TRUE;
00753          link_info.notice_all = TRUE;
00754          break;
00755        case 'd':
00756          command_line.force_common_definition = TRUE;
00757          break;
00758        case OPTION_DEFSYM:
00759          lex_string = optarg;
00760          lex_redirect (optarg);
00761          parser_input = input_defsym;
00762          parsing_defsym = 1;
00763          yyparse ();
00764          parsing_defsym = 0;
00765          lex_string = NULL;
00766          break;
00767        case OPTION_DEMANGLE:
00768          demangling = TRUE;
00769          if (optarg != NULL)
00770            {
00771              enum demangling_styles style;
00772 
00773              style = cplus_demangle_name_to_style (optarg);
00774              if (style == unknown_demangling)
00775               einfo (_("%F%P: unknown demangling style `%s'"),
00776                      optarg);
00777 
00778              cplus_demangle_set_style (style);
00779            }
00780          break;
00781        case 'I':            /* Used on Solaris.  */
00782        case OPTION_DYNAMIC_LINKER:
00783          command_line.interpreter = optarg;
00784          break;
00785        case OPTION_SYSROOT:
00786          /* Already handled in ldmain.c.  */
00787          break;
00788        case OPTION_EB:
00789          command_line.endian = ENDIAN_BIG;
00790          break;
00791        case OPTION_EL:
00792          command_line.endian = ENDIAN_LITTLE;
00793          break;
00794        case OPTION_EMBEDDED_RELOCS:
00795          command_line.embedded_relocs = TRUE;
00796          break;
00797        case OPTION_EXPORT_DYNAMIC:
00798        case 'E': /* HP/UX compatibility.  */
00799          link_info.export_dynamic = TRUE;
00800          break;
00801        case 'e':
00802          lang_add_entry (optarg, TRUE);
00803          break;
00804        case 'f':
00805          if (command_line.auxiliary_filters == NULL)
00806            {
00807              command_line.auxiliary_filters = xmalloc (2 * sizeof (char *));
00808              command_line.auxiliary_filters[0] = optarg;
00809              command_line.auxiliary_filters[1] = NULL;
00810            }
00811          else
00812            {
00813              int c;
00814              char **p;
00815 
00816              c = 0;
00817              for (p = command_line.auxiliary_filters; *p != NULL; p++)
00818               ++c;
00819              command_line.auxiliary_filters
00820               = xrealloc (command_line.auxiliary_filters,
00821                          (c + 2) * sizeof (char *));
00822              command_line.auxiliary_filters[c] = optarg;
00823              command_line.auxiliary_filters[c + 1] = NULL;
00824            }
00825          break;
00826        case 'F':
00827          command_line.filter_shlib = optarg;
00828          break;
00829        case OPTION_FORCE_EXE_SUFFIX:
00830          command_line.force_exe_suffix = TRUE;
00831          break;
00832        case 'G':
00833          {
00834            char *end;
00835            g_switch_value = strtoul (optarg, &end, 0);
00836            if (*end)
00837              einfo (_("%P%F: invalid number `%s'\n"), optarg);
00838          }
00839          break;
00840        case 'g':
00841          /* Ignore.  */
00842          break;
00843        case OPTION_GC_SECTIONS:
00844          link_info.gc_sections = TRUE;
00845          break;
00846        case OPTION_PRINT_GC_SECTIONS:
00847          link_info.print_gc_sections = TRUE;
00848          break;
00849        case OPTION_HELP:
00850          help ();
00851          xexit (0);
00852          break;
00853        case 'L':
00854          ldfile_add_library_path (optarg, TRUE);
00855          break;
00856        case 'l':
00857          lang_add_input_file (optarg, lang_input_file_is_l_enum, NULL);
00858          break;
00859        case 'M':
00860          config.map_filename = "-";
00861          break;
00862        case 'm':
00863          /* Ignore.  Was handled in a pre-parse.   */
00864          break;
00865        case OPTION_MAP:
00866          config.map_filename = optarg;
00867          break;
00868        case 'N':
00869          config.text_read_only = FALSE;
00870          config.magic_demand_paged = FALSE;
00871          config.dynamic_link = FALSE;
00872          break;
00873        case OPTION_NO_OMAGIC:
00874          config.text_read_only = TRUE;
00875          config.magic_demand_paged = TRUE;
00876          /* NB/ Does not set dynamic_link to TRUE.
00877             Use --call-shared or -Bdynamic for this.  */
00878          break;
00879        case 'n':
00880          config.magic_demand_paged = FALSE;
00881          config.dynamic_link = FALSE;
00882          break;
00883        case OPTION_NO_DEFINE_COMMON:
00884          command_line.inhibit_common_definition = TRUE;
00885          break;
00886        case OPTION_NO_DEMANGLE:
00887          demangling = FALSE;
00888          break;
00889        case OPTION_NO_GC_SECTIONS:
00890          link_info.gc_sections = FALSE;
00891          break;
00892        case OPTION_NO_PRINT_GC_SECTIONS:
00893          link_info.print_gc_sections = FALSE;
00894          break;
00895        case OPTION_NO_KEEP_MEMORY:
00896          link_info.keep_memory = FALSE;
00897          break;
00898        case OPTION_NO_UNDEFINED:
00899          link_info.unresolved_syms_in_objects
00900            = how_to_report_unresolved_symbols;
00901          break;
00902        case OPTION_ALLOW_SHLIB_UNDEFINED:
00903          link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
00904          break;
00905        case OPTION_NO_ALLOW_SHLIB_UNDEFINED:
00906          link_info.unresolved_syms_in_shared_libs
00907            = how_to_report_unresolved_symbols;
00908          break;
00909        case OPTION_UNRESOLVED_SYMBOLS:
00910          if (strcmp (optarg, "ignore-all") == 0)
00911            {
00912              link_info.unresolved_syms_in_objects = RM_IGNORE;
00913              link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
00914            }
00915          else if (strcmp (optarg, "report-all") == 0)
00916            {
00917              link_info.unresolved_syms_in_objects
00918               = how_to_report_unresolved_symbols;
00919              link_info.unresolved_syms_in_shared_libs
00920               = how_to_report_unresolved_symbols;
00921            }
00922          else if (strcmp (optarg, "ignore-in-object-files") == 0)
00923            {
00924              link_info.unresolved_syms_in_objects = RM_IGNORE;
00925              link_info.unresolved_syms_in_shared_libs
00926               = how_to_report_unresolved_symbols;
00927            }
00928          else if (strcmp (optarg, "ignore-in-shared-libs") == 0)
00929            {
00930              link_info.unresolved_syms_in_objects
00931               = how_to_report_unresolved_symbols;
00932              link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
00933            }
00934          else
00935            einfo (_("%P%F: bad --unresolved-symbols option: %s\n"), optarg);
00936          break;
00937        case OPTION_WARN_UNRESOLVED_SYMBOLS:
00938          how_to_report_unresolved_symbols = RM_GENERATE_WARNING;
00939          if (link_info.unresolved_syms_in_objects == RM_GENERATE_ERROR)
00940            link_info.unresolved_syms_in_objects = RM_GENERATE_WARNING;
00941          if (link_info.unresolved_syms_in_shared_libs == RM_GENERATE_ERROR)
00942            link_info.unresolved_syms_in_shared_libs = RM_GENERATE_WARNING;
00943          break;
00944 
00945        case OPTION_ERROR_UNRESOLVED_SYMBOLS:
00946          how_to_report_unresolved_symbols = RM_GENERATE_ERROR;
00947          if (link_info.unresolved_syms_in_objects == RM_GENERATE_WARNING)
00948            link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
00949          if (link_info.unresolved_syms_in_shared_libs == RM_GENERATE_WARNING)
00950            link_info.unresolved_syms_in_shared_libs = RM_GENERATE_ERROR;
00951          break;
00952        case OPTION_ALLOW_MULTIPLE_DEFINITION:
00953          link_info.allow_multiple_definition = TRUE;
00954          break;
00955        case OPTION_NO_UNDEFINED_VERSION:
00956          link_info.allow_undefined_version = FALSE;
00957          break;
00958        case OPTION_DEFAULT_SYMVER:
00959          link_info.create_default_symver = TRUE;
00960          break;
00961        case OPTION_DEFAULT_IMPORTED_SYMVER:
00962          link_info.default_imported_symver = TRUE;
00963          break;
00964        case OPTION_NO_WARN_MISMATCH:
00965          command_line.warn_mismatch = FALSE;
00966          break;
00967        case OPTION_NOINHIBIT_EXEC:
00968          force_make_executable = TRUE;
00969          break;
00970        case OPTION_NOSTDLIB:
00971          config.only_cmd_line_lib_dirs = TRUE;
00972          break;
00973        case OPTION_NO_WHOLE_ARCHIVE:
00974          whole_archive = FALSE;
00975          break;
00976        case 'O':
00977          /* FIXME "-O<non-digits> <value>" used to set the address of
00978             section <non-digits>.  Was this for compatibility with
00979             something, or can we create a new option to do that
00980             (with a syntax similar to -defsym)?
00981             getopt can't handle two args to an option without kludges.  */
00982 
00983          /* Enable optimizations of output files.  */
00984          link_info.optimize = strtoul (optarg, NULL, 0) ? TRUE : FALSE;
00985          break;
00986        case 'o':
00987          lang_add_output (optarg, 0);
00988          break;
00989        case OPTION_OFORMAT:
00990          lang_add_output_format (optarg, NULL, NULL, 0);
00991          break;
00992        case 'q':
00993          link_info.emitrelocations = TRUE;
00994          break;
00995        case 'i':
00996        case 'r':
00997          if (optind == last_optind)
00998            /* This can happen if the user put "-rpath,a" on the command
00999               line.  (Or something similar.  The comma is important).
01000               Getopt becomes confused and thinks that this is a -r option
01001               but it cannot parse the text after the -r so it refuses to
01002               increment the optind counter.  Detect this case and issue
01003               an error message here.  We cannot just make this a warning,
01004               increment optind, and continue because getopt is too confused
01005               and will seg-fault the next time around.  */
01006            einfo(_("%P%F: bad -rpath option\n"));
01007 
01008          link_info.relocatable = TRUE;
01009          config.build_constructors = FALSE;
01010          config.magic_demand_paged = FALSE;
01011          config.text_read_only = FALSE;
01012          config.dynamic_link = FALSE;
01013          break;
01014        case 'R':
01015          /* The GNU linker traditionally uses -R to mean to include
01016             only the symbols from a file.  The Solaris linker uses -R
01017             to set the path used by the runtime linker to find
01018             libraries.  This is the GNU linker -rpath argument.  We
01019             try to support both simultaneously by checking the file
01020             named.  If it is a directory, rather than a regular file,
01021             we assume -rpath was meant.  */
01022          {
01023            struct stat s;
01024 
01025            if (stat (optarg, &s) >= 0
01026               && ! S_ISDIR (s.st_mode))
01027              {
01028               lang_add_input_file (optarg,
01029                                  lang_input_file_is_symbols_only_enum,
01030                                  NULL);
01031               break;
01032              }
01033          }
01034          /* Fall through.  */
01035        case OPTION_RPATH:
01036          if (command_line.rpath == NULL)
01037            command_line.rpath = xstrdup (optarg);
01038          else
01039            {
01040              size_t rpath_len = strlen (command_line.rpath);
01041              size_t optarg_len = strlen (optarg);
01042              char *buf;
01043              char *cp = command_line.rpath;
01044 
01045              /* First see whether OPTARG is already in the path.  */
01046              do
01047               {
01048                 if (strncmp (optarg, cp, optarg_len) == 0
01049                     && (cp[optarg_len] == 0
01050                        || cp[optarg_len] == config.rpath_separator))
01051                   /* We found it.  */
01052                   break;
01053 
01054                 /* Not yet found.  */
01055                 cp = strchr (cp, config.rpath_separator);
01056                 if (cp != NULL)
01057                   ++cp;
01058               }
01059              while (cp != NULL);
01060 
01061              if (cp == NULL)
01062               {
01063                 buf = xmalloc (rpath_len + optarg_len + 2);
01064                 sprintf (buf, "%s%c%s", command_line.rpath,
01065                         config.rpath_separator, optarg);
01066                 free (command_line.rpath);
01067                 command_line.rpath = buf;
01068               }
01069            }
01070          break;
01071        case OPTION_RPATH_LINK:
01072          if (command_line.rpath_link == NULL)
01073            command_line.rpath_link = xstrdup (optarg);
01074          else
01075            {
01076              char *buf;
01077 
01078              buf = xmalloc (strlen (command_line.rpath_link)
01079                           + strlen (optarg)
01080                           + 2);
01081              sprintf (buf, "%s%c%s", command_line.rpath_link,
01082                      config.rpath_separator, optarg);
01083              free (command_line.rpath_link);
01084              command_line.rpath_link = buf;
01085            }
01086          break;
01087        case OPTION_RELAX:
01088          command_line.relax = TRUE;
01089          break;
01090        case OPTION_RETAIN_SYMBOLS_FILE:
01091          add_keepsyms_file (optarg);
01092          break;
01093        case 'S':
01094          link_info.strip = strip_debugger;
01095          break;
01096        case 's':
01097          link_info.strip = strip_all;
01098          break;
01099        case OPTION_STRIP_DISCARDED:
01100          link_info.strip_discarded = TRUE;
01101          break;
01102        case OPTION_NO_STRIP_DISCARDED:
01103          link_info.strip_discarded = FALSE;
01104          break;
01105        case OPTION_SHARED:
01106          if (config.has_shared)
01107            {
01108              link_info.shared = TRUE;
01109              /* When creating a shared library, the default
01110                behaviour is to ignore any unresolved references.  */
01111              if (link_info.unresolved_syms_in_objects == RM_NOT_YET_SET)
01112               link_info.unresolved_syms_in_objects = RM_IGNORE;
01113              if (link_info.unresolved_syms_in_shared_libs == RM_NOT_YET_SET)
01114               link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
01115            }
01116          else
01117            einfo (_("%P%F: -shared not supported\n"));
01118          break;
01119        case OPTION_PIE:
01120          if (config.has_shared)
01121            {
01122              link_info.shared = TRUE;
01123              link_info.pie = TRUE;
01124            }
01125          else
01126            einfo (_("%P%F: -pie not supported\n"));
01127          break;
01128        case 'h':            /* Used on Solaris.  */
01129        case OPTION_SONAME:
01130          command_line.soname = optarg;
01131          break;
01132        case OPTION_SORT_COMMON:
01133          config.sort_common = TRUE;
01134          break;
01135        case OPTION_SORT_SECTION:
01136          if (strcmp (optarg, N_("name")) == 0)
01137            sort_section = by_name;
01138          else if (strcmp (optarg, N_("alignment")) == 0)
01139            sort_section = by_alignment;
01140          else
01141            einfo (_("%P%F: invalid section sorting option: %s\n"),
01142                  optarg);
01143          break;
01144        case OPTION_STATS:
01145          config.stats = TRUE;
01146          break;
01147        case OPTION_SYMBOLIC:
01148          command_line.symbolic = symbolic;
01149          break;
01150        case OPTION_SYMBOLIC_FUNCTIONS:
01151          command_line.symbolic = symbolic_functions;
01152          break;
01153        case 't':
01154          trace_files = TRUE;
01155          break;
01156        case 'T':
01157          ldfile_open_command_file (optarg);
01158          parser_input = input_script;
01159          yyparse ();
01160          break;
01161        case OPTION_DEFAULT_SCRIPT:
01162          command_line.default_script = optarg;
01163          break;
01164        case OPTION_SECTION_START:
01165          {
01166            char *optarg2;
01167            char *sec_name;
01168            int len;
01169 
01170            /* Check for <something>=<somthing>...  */
01171            optarg2 = strchr (optarg, '=');
01172            if (optarg2 == NULL)
01173              einfo (_("%P%F: invalid argument to option"
01174                      " \"--section-start\"\n"));
01175 
01176            optarg2++;
01177 
01178            /* So far so good.  Are all the args present?  */
01179            if ((*optarg == '\0') || (*optarg2 == '\0'))
01180              einfo (_("%P%F: missing argument(s) to option"
01181                      " \"--section-start\"\n"));
01182 
01183            /* We must copy the section name as set_section_start
01184               doesn't do it for us.  */
01185            len = optarg2 - optarg;
01186            sec_name = xmalloc (len);
01187            memcpy (sec_name, optarg, len - 1);
01188            sec_name[len - 1] = 0;
01189 
01190            /* Then set it...  */
01191            set_section_start (sec_name, optarg2);
01192          }
01193          break;
01194        case OPTION_TARGET_HELP:
01195          /* Mention any target specific options.  */
01196          ldemul_list_emulation_options (stdout);
01197          exit (0);
01198        case OPTION_TBSS:
01199          set_segment_start (".bss", optarg);
01200          break;
01201        case OPTION_TDATA:
01202          set_segment_start (".data", optarg);
01203          break;
01204        case OPTION_TTEXT:
01205          set_segment_start (".text", optarg);
01206          break;
01207        case OPTION_TRADITIONAL_FORMAT:
01208          link_info.traditional_format = TRUE;
01209          break;
01210        case OPTION_TASK_LINK:
01211          link_info.task_link = TRUE;
01212          /* Fall through - do an implied -r option.  */
01213        case OPTION_UR:
01214          link_info.relocatable = TRUE;
01215          config.build_constructors = TRUE;
01216          config.magic_demand_paged = FALSE;
01217          config.text_read_only = FALSE;
01218          config.dynamic_link = FALSE;
01219          break;
01220        case 'u':
01221          ldlang_add_undef (optarg);
01222          break;
01223        case OPTION_UNIQUE:
01224          if (optarg != NULL)
01225            lang_add_unique (optarg);
01226          else
01227            config.unique_orphan_sections = TRUE;
01228          break;
01229        case OPTION_VERBOSE:
01230          ldversion (1);
01231          version_printed = TRUE;
01232          trace_file_tries = TRUE;
01233          overflow_cutoff_limit = -2;
01234          break;
01235        case 'v':
01236          ldversion (0);
01237          version_printed = TRUE;
01238          break;
01239        case 'V':
01240          ldversion (1);
01241          version_printed = TRUE;
01242          break;
01243        case OPTION_VERSION:
01244          ldversion (2);
01245          xexit (0);
01246          break;
01247        case OPTION_VERSION_SCRIPT:
01248          /* This option indicates a small script that only specifies
01249             version information.  Read it, but don't assume that
01250             we've seen a linker script.  */
01251          {
01252            FILE *hold_script_handle;
01253 
01254            hold_script_handle = saved_script_handle;
01255            ldfile_open_command_file (optarg);
01256            saved_script_handle = hold_script_handle;
01257            parser_input = input_version_script;
01258            yyparse ();
01259          }
01260          break;
01261        case OPTION_VERSION_EXPORTS_SECTION:
01262          /* This option records a version symbol to be applied to the
01263             symbols listed for export to be found in the object files
01264             .exports sections.  */
01265          command_line.version_exports_section = optarg;
01266          break;
01267        case OPTION_DYNAMIC_LIST_DATA:
01268          command_line.dynamic_list = dynamic_list_data;
01269          if (command_line.symbolic == symbolic)
01270            command_line.symbolic = symbolic_unset;
01271          break;
01272        case OPTION_DYNAMIC_LIST_CPP_TYPEINFO:
01273          lang_append_dynamic_list_cpp_typeinfo ();
01274          if (command_line.dynamic_list != dynamic_list_data)
01275            command_line.dynamic_list = dynamic_list;
01276          if (command_line.symbolic == symbolic)
01277            command_line.symbolic = symbolic_unset;
01278          break;
01279        case OPTION_DYNAMIC_LIST_CPP_NEW:
01280          lang_append_dynamic_list_cpp_new ();
01281          if (command_line.dynamic_list != dynamic_list_data)
01282            command_line.dynamic_list = dynamic_list;
01283          if (command_line.symbolic == symbolic)
01284            command_line.symbolic = symbolic_unset;
01285          break;
01286        case OPTION_DYNAMIC_LIST:
01287          /* This option indicates a small script that only specifies
01288             a dynamic list.  Read it, but don't assume that we've
01289             seen a linker script.  */
01290          {
01291            FILE *hold_script_handle;
01292 
01293            hold_script_handle = saved_script_handle;
01294            ldfile_open_command_file (optarg);
01295            saved_script_handle = hold_script_handle;
01296            parser_input = input_dynamic_list;
01297            yyparse ();
01298          }
01299          if (command_line.dynamic_list != dynamic_list_data)
01300            command_line.dynamic_list = dynamic_list;
01301          if (command_line.symbolic == symbolic)
01302            command_line.symbolic = symbolic_unset;
01303          break;
01304        case OPTION_WARN_COMMON:
01305          config.warn_common = TRUE;
01306          break;
01307        case OPTION_WARN_CONSTRUCTORS:
01308          config.warn_constructors = TRUE;
01309          break;
01310        case OPTION_WARN_FATAL:
01311          config.fatal_warnings = TRUE;
01312          break;
01313        case OPTION_WARN_MULTIPLE_GP:
01314          config.warn_multiple_gp = TRUE;
01315          break;
01316        case OPTION_WARN_ONCE:
01317          config.warn_once = TRUE;
01318          break;
01319        case OPTION_WARN_SECTION_ALIGN:
01320          config.warn_section_align = TRUE;
01321          break;
01322        case OPTION_WARN_SHARED_TEXTREL:
01323          link_info.warn_shared_textrel = TRUE;
01324          break;
01325        case OPTION_WHOLE_ARCHIVE:
01326          whole_archive = TRUE;
01327          break;
01328        case OPTION_ADD_NEEDED:
01329          add_needed = TRUE;
01330          break;
01331        case OPTION_NO_ADD_NEEDED:
01332          add_needed = FALSE;
01333          break;
01334        case OPTION_AS_NEEDED:
01335          as_needed = TRUE;
01336          break;
01337        case OPTION_NO_AS_NEEDED:
01338          as_needed = FALSE;
01339          break;
01340        case OPTION_WRAP:
01341          add_wrap (optarg);
01342          break;
01343        case OPTION_DISCARD_NONE:
01344          link_info.discard = discard_none;
01345          break;
01346        case 'X':
01347          link_info.discard = discard_l;
01348          break;
01349        case 'x':
01350          link_info.discard = discard_all;
01351          break;
01352        case 'Y':
01353          if (CONST_STRNEQ (optarg, "P,"))
01354            optarg += 2;
01355          if (default_dirlist != NULL)
01356            free (default_dirlist);
01357          default_dirlist = xstrdup (optarg);
01358          break;
01359        case 'y':
01360          add_ysym (optarg);
01361          break;
01362        case OPTION_SPARE_DYNAMIC_TAGS:
01363          link_info.spare_dynamic_tags = strtoul (optarg, NULL, 0);
01364          break;
01365        case OPTION_SPLIT_BY_RELOC:
01366          if (optarg != NULL)
01367            config.split_by_reloc = strtoul (optarg, NULL, 0);
01368          else
01369            config.split_by_reloc = 32768;
01370          break;
01371        case OPTION_SPLIT_BY_FILE:
01372          if (optarg != NULL)
01373            config.split_by_file = bfd_scan_vma (optarg, NULL, 0);
01374          else
01375            config.split_by_file = 1;
01376          break;
01377        case OPTION_CHECK_SECTIONS:
01378          command_line.check_section_addresses = TRUE;
01379          break;
01380        case OPTION_NO_CHECK_SECTIONS:
01381          command_line.check_section_addresses = FALSE;
01382          break;
01383        case OPTION_ACCEPT_UNKNOWN_INPUT_ARCH:
01384          command_line.accept_unknown_input_arch = TRUE;
01385          break;
01386        case OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH:
01387          command_line.accept_unknown_input_arch = FALSE;
01388          break;
01389        case '(':
01390          if (ingroup)
01391            einfo (_("%P%F: may not nest groups (--help for usage)\n"));
01392 
01393          lang_enter_group ();
01394          ingroup = 1;
01395          break;
01396        case ')':
01397          if (! ingroup)
01398            einfo (_("%P%F: group ended before it began (--help for usage)\n"));
01399 
01400          lang_leave_group ();
01401          ingroup = 0;
01402          break;
01403 
01404        case OPTION_INIT:
01405          link_info.init_function = optarg;
01406          break;
01407 
01408        case OPTION_FINI:
01409          link_info.fini_function = optarg;
01410          break;
01411 
01412        case OPTION_REDUCE_MEMORY_OVERHEADS:
01413          link_info.reduce_memory_overheads = TRUE;
01414          if (config.hash_table_size == 0)
01415            config.hash_table_size = 1021;
01416          break;
01417 
01418         case OPTION_HASH_SIZE:
01419          {
01420            bfd_size_type new_size;
01421 
01422             new_size = strtoul (optarg, NULL, 0);
01423             if (new_size)
01424               config.hash_table_size = new_size;
01425             else
01426               einfo (_("%P%X: --hash-size needs a numeric argument\n"));
01427           }
01428           break;
01429        }
01430     }
01431 
01432   if (ingroup)
01433     lang_leave_group ();
01434 
01435   if (default_dirlist != NULL)
01436     {
01437       set_default_dirlist (default_dirlist);
01438       free (default_dirlist);
01439     }
01440 
01441   if (link_info.unresolved_syms_in_objects == RM_NOT_YET_SET)
01442     /* FIXME: Should we allow emulations a chance to set this ?  */
01443     link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols;
01444 
01445   if (link_info.unresolved_syms_in_shared_libs == RM_NOT_YET_SET)
01446     /* FIXME: Should we allow emulations a chance to set this ?  */
01447     link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols;
01448 }
01449 
01450 /* Add the (colon-separated) elements of DIRLIST_PTR to the
01451    library search path.  */
01452 
01453 static void
01454 set_default_dirlist (char *dirlist_ptr)
01455 {
01456   char *p;
01457 
01458   while (1)
01459     {
01460       p = strchr (dirlist_ptr, PATH_SEPARATOR);
01461       if (p != NULL)
01462        *p = '\0';
01463       if (*dirlist_ptr != '\0')
01464        ldfile_add_library_path (dirlist_ptr, TRUE);
01465       if (p == NULL)
01466        break;
01467       dirlist_ptr = p + 1;
01468     }
01469 }
01470 
01471 static void
01472 set_section_start (char *sect, char *valstr)
01473 {
01474   const char *end;
01475   bfd_vma val = bfd_scan_vma (valstr, &end, 16);
01476   if (*end)
01477     einfo (_("%P%F: invalid hex number `%s'\n"), valstr);
01478   lang_section_start (sect, exp_intop (val), NULL);
01479 }
01480 
01481 static void
01482 set_segment_start (const char *section, char *valstr)
01483 {
01484   const char *name;
01485   const char *end;
01486   segment_type *seg;
01487 
01488   bfd_vma val = bfd_scan_vma (valstr, &end, 16);
01489   if (*end)
01490     einfo (_("%P%F: invalid hex number `%s'\n"), valstr);
01491   /* If we already have an entry for this segment, update the existing
01492      value.  */
01493   name = section + 1;
01494   for (seg = segments; seg; seg = seg->next)
01495     if (strcmp (seg->name, name) == 0)
01496       {
01497        seg->value = val;
01498        return;
01499       }
01500   /* There was no existing value so we must create a new segment
01501      entry.  */
01502   seg = stat_alloc (sizeof (*seg));
01503   seg->name = name;
01504   seg->value = val;
01505   seg->used = FALSE;
01506   /* Add it to the linked list of segments.  */
01507   seg->next = segments;
01508   segments = seg;
01509   /* Historically, -Ttext and friends set the base address of a
01510      particular section.  For backwards compatibility, we still do
01511      that.  If a SEGMENT_START directive is seen, the section address
01512      assignment will be disabled.  */
01513   lang_section_start (section, exp_intop (val), seg);
01514 }
01515 
01516 
01517 /* Print help messages for the options.  */
01518 
01519 static void
01520 help (void)
01521 {
01522   unsigned i;
01523   const char **targets, **pp;
01524   int len;
01525 
01526   printf (_("Usage: %s [options] file...\n"), program_name);
01527 
01528   printf (_("Options:\n"));
01529   for (i = 0; i < OPTION_COUNT; i++)
01530     {
01531       if (ld_options[i].doc != NULL)
01532        {
01533          bfd_boolean comma;
01534          unsigned j;
01535 
01536          printf ("  ");
01537 
01538          comma = FALSE;
01539          len = 2;
01540 
01541          j = i;
01542          do
01543            {
01544              if (ld_options[j].shortopt != '\0'
01545                 && ld_options[j].control != NO_HELP)
01546               {
01547                 printf ("%s-%c", comma ? ", " : "", ld_options[j].shortopt);
01548                 len += (comma ? 2 : 0) + 2;
01549                 if (ld_options[j].arg != NULL)
01550                   {
01551                     if (ld_options[j].opt.has_arg != optional_argument)
01552                      {
01553                        printf (" ");
01554                        ++len;
01555                      }
01556                     printf ("%s", _(ld_options[j].arg));
01557                     len += strlen (_(ld_options[j].arg));
01558                   }
01559                 comma = TRUE;
01560               }
01561              ++j;
01562            }
01563          while (j < OPTION_COUNT && ld_options[j].doc == NULL);
01564 
01565          j = i;
01566          do
01567            {
01568              if (ld_options[j].opt.name != NULL
01569                 && ld_options[j].control != NO_HELP)
01570               {
01571                 int two_dashes =
01572                   (ld_options[j].control == TWO_DASHES
01573                    || ld_options[j].control == EXACTLY_TWO_DASHES);
01574 
01575                 printf ("%s-%s%s",
01576                        comma ? ", " : "",
01577                        two_dashes ? "-" : "",
01578                        ld_options[j].opt.name);
01579                 len += ((comma ? 2 : 0)
01580                        + 1
01581                        + (two_dashes ? 1 : 0)
01582                        + strlen (ld_options[j].opt.name));
01583                 if (ld_options[j].arg != NULL)
01584                   {
01585                     printf (" %s", _(ld_options[j].arg));
01586                     len += 1 + strlen (_(ld_options[j].arg));
01587                   }
01588                 comma = TRUE;
01589               }
01590              ++j;
01591            }
01592          while (j < OPTION_COUNT && ld_options[j].doc == NULL);
01593 
01594          if (len >= 30)
01595            {
01596              printf ("\n");
01597              len = 0;
01598            }
01599 
01600          for (; len < 30; len++)
01601            putchar (' ');
01602 
01603          printf ("%s\n", _(ld_options[i].doc));
01604        }
01605     }
01606   printf (_("  @FILE"));
01607   for (len = strlen ("  @FILE"); len < 30; len++)
01608     putchar (' ');
01609   printf (_("Read options from FILE\n"));
01610 
01611   /* Note: Various tools (such as libtool) depend upon the
01612      format of the listings below - do not change them.  */
01613   /* xgettext:c-format */
01614   printf (_("%s: supported targets:"), program_name);
01615   targets = bfd_target_list ();
01616   for (pp = targets; *pp != NULL; pp++)
01617     printf (" %s", *pp);
01618   free (targets);
01619   printf ("\n");
01620 
01621   /* xgettext:c-format */
01622   printf (_("%s: supported emulations: "), program_name);
01623   ldemul_list_emulations (stdout);
01624   printf ("\n");
01625 
01626   /* xgettext:c-format */
01627   printf (_("%s: emulation specific options:\n"), program_name);
01628   ldemul_list_emulation_options (stdout);
01629   printf ("\n");
01630 
01631   if (REPORT_BUGS_TO[0])
01632     printf (_("Report bugs to %s\n"), REPORT_BUGS_TO);
01633 }