12a6b7db3Sskrll /* ldver.c -- Print linker version.
2*cb63e24eSchristos Copyright (C) 1991-2024 Free Software Foundation, Inc.
32a6b7db3Sskrll
42a6b7db3Sskrll This file is part of the GNU Binutils.
52a6b7db3Sskrll
62a6b7db3Sskrll This program is free software; you can redistribute it and/or modify
72a6b7db3Sskrll it under the terms of the GNU General Public License as published by
82a6b7db3Sskrll the Free Software Foundation; either version 3 of the License, or
92a6b7db3Sskrll (at your option) any later version.
102a6b7db3Sskrll
112a6b7db3Sskrll This program is distributed in the hope that it will be useful,
122a6b7db3Sskrll but WITHOUT ANY WARRANTY; without even the implied warranty of
132a6b7db3Sskrll MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
142a6b7db3Sskrll GNU General Public License for more details.
152a6b7db3Sskrll
162a6b7db3Sskrll You should have received a copy of the GNU General Public License
172a6b7db3Sskrll along with this program; if not, write to the Free Software
182a6b7db3Sskrll Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
192a6b7db3Sskrll MA 02110-1301, USA. */
202a6b7db3Sskrll
212a6b7db3Sskrll #include "sysdep.h"
222a6b7db3Sskrll #include "bfd.h"
232a6b7db3Sskrll #include "bfdver.h"
246f4ced0bSchristos #include "bfdlink.h"
256f4ced0bSchristos #include "ctf-api.h"
262a6b7db3Sskrll #include "ld.h"
272a6b7db3Sskrll #include "ldver.h"
282a6b7db3Sskrll #include "ldexp.h"
292a6b7db3Sskrll #include "ldlang.h"
302a6b7db3Sskrll #include "ldfile.h"
312a6b7db3Sskrll #include "ldemul.h"
322a6b7db3Sskrll #include "ldmain.h"
332a6b7db3Sskrll
342a6b7db3Sskrll void
ldversion(int noisy)352a6b7db3Sskrll ldversion (int noisy)
362a6b7db3Sskrll {
372a6b7db3Sskrll /* Output for noisy == 2 is intended to follow the GNU standards. */
382a6b7db3Sskrll fprintf (stdout, _("GNU ld %s\n"), BFD_VERSION_STRING);
392a6b7db3Sskrll
402a6b7db3Sskrll if (noisy & 2)
412a6b7db3Sskrll {
42*cb63e24eSchristos printf (_("Copyright (C) 2024 Free Software Foundation, Inc.\n"));
432a6b7db3Sskrll printf (_("\
442a6b7db3Sskrll This program is free software; you may redistribute it under the terms of\n\
452a6b7db3Sskrll the GNU General Public License version 3 or (at your option) a later version.\n\
462a6b7db3Sskrll This program has absolutely no warranty.\n"));
472a6b7db3Sskrll }
482a6b7db3Sskrll
492a6b7db3Sskrll if (noisy & 1)
502a6b7db3Sskrll {
512a6b7db3Sskrll ld_emulation_xfer_type **ptr = ld_emulations;
522a6b7db3Sskrll
532a6b7db3Sskrll printf (_(" Supported emulations:\n"));
542a6b7db3Sskrll while (*ptr)
552a6b7db3Sskrll {
562a6b7db3Sskrll printf (" %s\n", (*ptr)->emulation_name);
572a6b7db3Sskrll ptr++;
582a6b7db3Sskrll }
592a6b7db3Sskrll }
602a6b7db3Sskrll }
61