* ldmisc.h (xmalloc, xrealloc, xexit, yyerror): Don't declare.
* emultempl/pdp11.em: Include libiberty.h.
* emultempl/ticoff.em: Likewise.
* emultempl/vms.em: Likewise.
* ldctor.c: Likewise.
* ldelfgen.c: Likewise.
* ldgram.y: Likewise.
(yyerror): Prototype and make static.
fragment <<EOF
/* --- \begin{pdp11.em} */
+#include "libiberty.h"
#include "getopt.h"
static void
#define TARGET_IS_${EMULATION_NAME}
#include "sysdep.h"
+#include "libiberty.h"
#include "bfd.h"
#include "bfdlink.h"
#include "ctf-api.h"
# This file is sourced from generic.em.
fragment <<EOF
+#include "libiberty.h"
#include "getopt.h"
static void
MA 02110-1301, USA. */
#include "sysdep.h"
+#include "libiberty.h"
#include "bfd.h"
#include "bfdlink.h"
#include "safe-ctype.h"
MA 02110-1301, USA. */
#include "sysdep.h"
+#include "libiberty.h"
#include "bfd.h"
#include "bfdlink.h"
#include "ctf-api.h"
#define DONTDECLARE_MALLOC
#include "sysdep.h"
+#include "libiberty.h"
#include "bfd.h"
#include "bfdlink.h"
#include "ctf-api.h"
static int error_index;
#define PUSH_ERROR(x) if (error_index < ERROR_NAME_MAX) error_names[error_index] = x; error_index++;
#define POP_ERROR() error_index--;
+
+static void yyerror (const char *);
%}
%union {
bfd_vma integer;
;
%%
-void
-yyerror(arg)
- const char *arg;
+static void
+yyerror (const char *arg)
{
if (ldfile_assumed_script)
einfo (_("%P:%s: file format not recognized; treating as linker script\n"),
extern void info_msg (const char *, ...);
extern void lfinfo (FILE *, const char *, ...);
extern void info_assert (const char *, unsigned int);
-extern void yyerror (const char *);
-extern void *xmalloc (size_t);
-extern void *xrealloc (void *, size_t);
-extern void xexit (int);
#define ASSERT(x) \
do { if (!(x)) info_assert(__FILE__,__LINE__); } while (0)