xref: /dragonfly/contrib/binutils-2.27/ld/ldver.c (revision a9fa9459)
1*a9fa9459Szrj /* ldver.c -- Print linker version.
2*a9fa9459Szrj    Copyright (C) 1991-2016 Free Software Foundation, Inc.
3*a9fa9459Szrj 
4*a9fa9459Szrj    This file is part of the GNU Binutils.
5*a9fa9459Szrj 
6*a9fa9459Szrj    This program is free software; you can redistribute it and/or modify
7*a9fa9459Szrj    it under the terms of the GNU General Public License as published by
8*a9fa9459Szrj    the Free Software Foundation; either version 3 of the License, or
9*a9fa9459Szrj    (at your option) any later version.
10*a9fa9459Szrj 
11*a9fa9459Szrj    This program is distributed in the hope that it will be useful,
12*a9fa9459Szrj    but WITHOUT ANY WARRANTY; without even the implied warranty of
13*a9fa9459Szrj    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*a9fa9459Szrj    GNU General Public License for more details.
15*a9fa9459Szrj 
16*a9fa9459Szrj    You should have received a copy of the GNU General Public License
17*a9fa9459Szrj    along with this program; if not, write to the Free Software
18*a9fa9459Szrj    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19*a9fa9459Szrj    MA 02110-1301, USA.  */
20*a9fa9459Szrj 
21*a9fa9459Szrj #include "sysdep.h"
22*a9fa9459Szrj #include "bfd.h"
23*a9fa9459Szrj #include "bfdver.h"
24*a9fa9459Szrj 
25*a9fa9459Szrj #include "ld.h"
26*a9fa9459Szrj #include "ldver.h"
27*a9fa9459Szrj #include "ldexp.h"
28*a9fa9459Szrj #include "ldlang.h"
29*a9fa9459Szrj #include "ldfile.h"
30*a9fa9459Szrj #include "ldemul.h"
31*a9fa9459Szrj #include "ldmain.h"
32*a9fa9459Szrj 
33*a9fa9459Szrj void
ldversion(int noisy)34*a9fa9459Szrj ldversion (int noisy)
35*a9fa9459Szrj {
36*a9fa9459Szrj   /* Output for noisy == 2 is intended to follow the GNU standards.  */
37*a9fa9459Szrj   fprintf (stdout, _("GNU ld %s\n"), BFD_VERSION_STRING);
38*a9fa9459Szrj 
39*a9fa9459Szrj   if (noisy & 2)
40*a9fa9459Szrj     {
41*a9fa9459Szrj       printf (_("Copyright (C) 2016 Free Software Foundation, Inc.\n"));
42*a9fa9459Szrj       printf (_("\
43*a9fa9459Szrj This program is free software; you may redistribute it under the terms of\n\
44*a9fa9459Szrj the GNU General Public License version 3 or (at your option) a later version.\n\
45*a9fa9459Szrj This program has absolutely no warranty.\n"));
46*a9fa9459Szrj     }
47*a9fa9459Szrj 
48*a9fa9459Szrj   if (noisy & 1)
49*a9fa9459Szrj     {
50*a9fa9459Szrj       ld_emulation_xfer_type **ptr = ld_emulations;
51*a9fa9459Szrj 
52*a9fa9459Szrj       printf (_("  Supported emulations:\n"));
53*a9fa9459Szrj       while (*ptr)
54*a9fa9459Szrj 	{
55*a9fa9459Szrj 	  printf ("   %s\n", (*ptr)->emulation_name);
56*a9fa9459Szrj 	  ptr++;
57*a9fa9459Szrj 	}
58*a9fa9459Szrj     }
59*a9fa9459Szrj }
60