Back to index

cell-binutils  2.17cvs20070401
ldver.c
Go to the documentation of this file.
00001 /* ldver.c -- Print linker version.
00002    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002,
00003    2003, 2007 Free Software Foundation, Inc.
00004 
00005    This file is part of GLD, the Gnu Linker.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program; if not, write to the Free Software
00019    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00020 
00021 #include <stdio.h>
00022 #include "bfd.h"
00023 #include "bfdver.h"
00024 #include "sysdep.h"
00025 
00026 #include "ld.h"
00027 #include "ldver.h"
00028 #include "ldexp.h"
00029 #include "ldlang.h"
00030 #include "ldfile.h"
00031 #include "ldemul.h"
00032 #include "ldmain.h"
00033 
00034 void
00035 ldversion (int noisy)
00036 {
00037   /* Output for noisy == 2 is intended to follow the GNU standards.  */
00038   fprintf (stdout, _("GNU ld %s\n"), BFD_VERSION_STRING);
00039 
00040   if (noisy & 2)
00041     {
00042       printf (_("Copyright 2007 Free Software Foundation, Inc.\n"));
00043       printf (_("\
00044 This program is free software; you may redistribute it under the terms of\n\
00045 the GNU General Public License.  This program has absolutely no warranty.\n"));
00046     }
00047 
00048   if (noisy & 1)
00049     {
00050       ld_emulation_xfer_type **ptr = ld_emulations;
00051 
00052       printf (_("  Supported emulations:\n"));
00053       while (*ptr)
00054        {
00055          printf ("   %s\n", (*ptr)->emulation_name);
00056          ptr++;
00057        }
00058     }
00059 }