binutils-gdb/bfd/init.c
Alan Modra b1c95bc4dd Move bfd_init to bfd.c
init.c contains just one function that doesn't do much.  Move it to
bfd.c and give it something to do, initialising static state.  So far
the only initialisation is for bfd.c static variables.

The idea behind reinitialising state is to see whether some set of
flaky oss-fuzz crashes go away.  oss-fuzz stresses binutils in ways
that can't occur in reality, feeding multiple testcases into the
internals of binutils.  So one testcase may affect the result of the
next testcase.

	* init.c: Delete file.  Move bfd_init to..
	* bfd.c (bfd_init): ..here.  Init static variables.
	* Makefile.am (BFD32_LIBS): Remove init.lo.
	(BFD32_LIBS_CFILES, BFD_H_FILES): Remove init.c.
	* doc/local.mk: Remove mention of init.texi and init.c.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
2023-01-10 09:15:51 +10:30

36 lines
1.1 KiB
C

/* bfd initialization stuff
Copyright (C) 1990-2023 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
#include "sysdep.h"
#include "bfd.h"
#include "libbfd.h"
/*
SECTION
Initialization
SUBSECTION
Initialization functions
These are the functions that handle initializing a BFD.
*/