133965Sjdp/* ldver.c -- Print linker version.
2218822Sdim   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002,
3218822Sdim   2003, 2007 Free Software Foundation, Inc.
433965Sjdp
5218822Sdim   This file is part of GLD, the Gnu Linker.
633965Sjdp
7218822Sdim   This program is free software; you can redistribute it and/or modify
8218822Sdim   it under the terms of the GNU General Public License as published by
9218822Sdim   the Free Software Foundation; either version 2 of the License, or
10218822Sdim   (at your option) any later version.
1133965Sjdp
12218822Sdim   This program is distributed in the hope that it will be useful,
13218822Sdim   but WITHOUT ANY WARRANTY; without even the implied warranty of
14218822Sdim   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15218822Sdim   GNU General Public License for more details.
1633965Sjdp
17218822Sdim   You should have received a copy of the GNU General Public License
18218822Sdim   along with this program; if not, write to the Free Software
19218822Sdim   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
2033965Sjdp
21218822Sdim#include "sysdep.h"
2233965Sjdp#include "bfd.h"
23130561Sobrien#include "bfdver.h"
2433965Sjdp
2533965Sjdp#include "ld.h"
2633965Sjdp#include "ldver.h"
2777298Sobrien#include "ldexp.h"
2877298Sobrien#include "ldlang.h"
2977298Sobrien#include "ldfile.h"
3033965Sjdp#include "ldemul.h"
3133965Sjdp#include "ldmain.h"
3233965Sjdp
3333965Sjdpvoid
34130561Sobrienldversion (int noisy)
3533965Sjdp{
3689857Sobrien  /* Output for noisy == 2 is intended to follow the GNU standards.  */
37218822Sdim  fprintf (stdout, _("GNU ld %s\n"), BFD_VERSION_STRING);
3833965Sjdp
3989857Sobrien  if (noisy & 2)
4033965Sjdp    {
41218822Sdim      printf (_("Copyright 2007 Free Software Foundation, Inc.\n"));
4289857Sobrien      printf (_("\
4389857SobrienThis program is free software; you may redistribute it under the terms of\n\
4489857Sobrienthe GNU General Public License.  This program has absolutely no warranty.\n"));
4589857Sobrien    }
4689857Sobrien
4789857Sobrien  if (noisy & 1)
4889857Sobrien    {
4933965Sjdp      ld_emulation_xfer_type **ptr = ld_emulations;
5077298Sobrien
5160484Sobrien      printf (_("  Supported emulations:\n"));
5277298Sobrien      while (*ptr)
5333965Sjdp	{
5433965Sjdp	  printf ("   %s\n", (*ptr)->emulation_name);
5533965Sjdp	  ptr++;
5633965Sjdp	}
5733965Sjdp    }
5833965Sjdp}
59