Automatic date update in version.in
[binutils-gdb.git] / bfd / init.c
blob802a615f718db191d225e4fd54b42b6f424726d9
1 /* bfd initialization stuff
2 Copyright (C) 1990-2022 Free Software Foundation, Inc.
3 Written by Steve Chamberlain of Cygnus Support.
5 This file is part of BFD, the Binary File Descriptor library.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
22 #include "sysdep.h"
23 #include "bfd.h"
24 #include "libbfd.h"
27 SECTION
28 Initialization
30 SUBSECTION
31 Initialization functions
33 These are the functions that handle initializing a BFD.
37 FUNCTION
38 bfd_init
40 SYNOPSIS
41 unsigned int bfd_init (void);
43 DESCRIPTION
44 This routine must be called before any other BFD function to
45 initialize magical internal data structures.
46 Returns a magic number, which may be used to check
47 that the bfd library is configured as expected by users.
49 .{* Value returned by bfd_init. *}
51 .#define BFD_INIT_MAGIC (sizeof (struct bfd_section))
54 /* Actually, there is currently nothing for this function to do.
55 However, someday it may be needed, so keep it around. */
57 unsigned int
58 bfd_init (void)
60 return BFD_INIT_MAGIC;