aboutsummaryrefslogtreecommitdiff
path: root/bfd/init.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-01-06 21:15:31 +1030
committerAlan Modra <amodra@gmail.com>2023-01-10 09:15:51 +1030
commitb1c95bc4dd737d3d0a6c9a1b6e022e3ef85110bc (patch)
treedf905a16b08b2e250e5d8adb4d79c149556531a7 /bfd/init.c
parentbf716a53bd8f725975979397b3c6b9d4bd4434ef (diff)
downloadgdb-b1c95bc4dd737d3d0a6c9a1b6e022e3ef85110bc.zip
gdb-b1c95bc4dd737d3d0a6c9a1b6e022e3ef85110bc.tar.gz
gdb-b1c95bc4dd737d3d0a6c9a1b6e022e3ef85110bc.tar.bz2
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.
Diffstat (limited to 'bfd/init.c')
-rw-r--r--bfd/init.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/bfd/init.c b/bfd/init.c
index eee9891..bcae3cb 100644
--- a/bfd/init.c
+++ b/bfd/init.c
@@ -33,29 +33,3 @@ SUBSECTION
These are the functions that handle initializing a BFD.
*/
-/*
-FUNCTION
- bfd_init
-
-SYNOPSIS
- unsigned int bfd_init (void);
-
-DESCRIPTION
- This routine must be called before any other BFD function to
- initialize magical internal data structures.
- Returns a magic number, which may be used to check
- that the bfd library is configured as expected by users.
-.
-.{* Value returned by bfd_init. *}
-.
-.#define BFD_INIT_MAGIC (sizeof (struct bfd_section))
-*/
-
-/* Actually, there is currently nothing for this function to do.
- However, someday it may be needed, so keep it around. */
-
-unsigned int
-bfd_init (void)
-{
- return BFD_INIT_MAGIC;
-}