Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/binutils fix and regen mips64
details: https://anonhg.NetBSD.org/src/rev/edbbb104bb9f
branches: trunk
changeset: 373408:edbbb104bb9f
user: christos <christos%NetBSD.org@localhost>
date: Tue Feb 07 20:39:01 2023 +0000
description:
fix and regen mips64
diffstat:
external/gpl3/binutils/dist/bfd/config.bfd | 12 +-
external/gpl3/binutils/dist/bfd/elfn32-mips.c | 11 +-
external/gpl3/binutils/dist/ld/configure.tgt | 12 +-
external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h | 4 +-
external/gpl3/binutils/lib/libbfd/arch/mips64eb/config.h | 4 +-
external/gpl3/binutils/lib/libbfd/arch/mips64eb/defs.mk | 6 +-
external/gpl3/binutils/lib/libbfd/arch/mipsn64eb/defs.mk | 6 +-
external/gpl3/binutils/lib/libbfd/arch/mipsn64el/bfd.h | 979 +++++----
external/gpl3/binutils/lib/libbfd/arch/mipsn64el/bfdver.h | 8 +-
external/gpl3/binutils/lib/libbfd/arch/mipsn64el/config.h | 103 +-
external/gpl3/binutils/lib/libbfd/arch/mipsn64el/defs.mk | 4 +-
external/gpl3/binutils/lib/libgnuctf/arch/mipsn64el/config.h | 43 +-
external/gpl3/binutils/lib/libgnuctf/arch/mipsn64el/defs.mk | 4 +-
external/gpl3/binutils/lib/libiberty/arch/mips64eb/config.h | 6 +-
external/gpl3/binutils/lib/libiberty/arch/mipsn64el/defs.mk | 4 +-
external/gpl3/binutils/lib/libopcodes/arch/mips64eb/config.h | 2 +-
external/gpl3/binutils/lib/libopcodes/arch/mipsn64el/config.h | 20 +-
external/gpl3/binutils/usr.bin/common/arch/mips64eb/config.h | 2 +-
external/gpl3/binutils/usr.bin/common/arch/mipsn64el/config.h | 121 +-
external/gpl3/binutils/usr.bin/common/arch/mipsn64el/defs.mk | 14 +-
external/gpl3/binutils/usr.bin/gas/arch/mipsn64el/config.h | 119 +-
external/gpl3/binutils/usr.bin/gas/arch/mipsn64el/defs.mk | 4 +-
external/gpl3/binutils/usr.bin/gprof/arch/mipsn64el/gconfig.h | 15 +-
external/gpl3/binutils/usr.bin/ld/arch/mips64eb/config.h | 2 +-
external/gpl3/binutils/usr.bin/ld/arch/mipsn64el/config.h | 78 +-
25 files changed, 748 insertions(+), 835 deletions(-)
diffs (truncated from 3511 to 300 lines):
diff -r 394a04ad69c7 -r edbbb104bb9f external/gpl3/binutils/dist/bfd/config.bfd
--- a/external/gpl3/binutils/dist/bfd/config.bfd Tue Feb 07 20:37:48 2023 +0000
+++ b/external/gpl3/binutils/dist/bfd/config.bfd Tue Feb 07 20:39:01 2023 +0000
@@ -863,13 +863,21 @@
;;
#ifdef BFD64
+ mips64*el-*-netbsd*)
+ targ_defvec=mips_elf32_ntrad_le_vec
+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec mips_ecoff_le_vec mips_ecoff_be_vec"
+ ;;
+ mips64*-*-netbsd*)
+ targ_defvec=mips_elf32_ntrad_be_vec
+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
+ ;;
mips*el-*-netbsd*)
targ_defvec=mips_elf32_trad_le_vec
- targ_selvecs="mips_elf32_trad_be_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_le_vec mips_ecoff_be_vec"
+ targ_selvecs="mips_elf32_trad_be_vec mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_le_vec mips_ecoff_be_vec"
;;
mips*-*-netbsd*)
targ_defvec=mips_elf32_trad_be_vec
- targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
+ targ_selvecs="mips_elf32_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec mips_ecoff_be_vec mips_ecoff_le_vec"
;;
mips*el-*-haiku*)
targ_defvec=mips_elf32_le_vec
diff -r 394a04ad69c7 -r edbbb104bb9f external/gpl3/binutils/dist/bfd/elfn32-mips.c
--- a/external/gpl3/binutils/dist/bfd/elfn32-mips.c Tue Feb 07 20:37:48 2023 +0000
+++ b/external/gpl3/binutils/dist/bfd/elfn32-mips.c Tue Feb 07 20:39:01 2023 +0000
@@ -80,9 +80,8 @@
(bfd *, Elf_Internal_Note *);
static bool elf32_mips_grok_psinfo
(bfd *, Elf_Internal_Note *);
-static bfd_boolean mips_elf_n32_is_local_label_name
+static bool mips_elf_n32_is_local_label_name
(bfd *, const char *);
-static bfd_boolean elf_n32_mips_grok_freebsd_prstatus
static bool elf_n32_mips_grok_freebsd_prstatus
(bfd *, Elf_Internal_Note *);
static irix_compat_t elf_n32_mips_irix_compat
@@ -3198,7 +3197,7 @@
false); /* pcrel_offset */
-/* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a
+/* Set the GP value for OUTPUT_BFD. Returns false if this is a
dangerous relocation. */
static bool
@@ -3848,7 +3847,7 @@
|| bfd_is_com_section (bfd_asymbol_section (sym)));
}
-/* Likewise, return TRUE if the symbol table split overall must be
+/* Likewise, return true if the symbol table split overall must be
between section symbols and all other symbols. */
static bool
mips_elf_n32_elfsym_local_is_section (bfd *abfd)
@@ -4030,11 +4029,11 @@
}
/* MIPS ELF local labels start with "$L". */
-static bfd_boolean
+static bool
mips_elf_n32_is_local_label_name (bfd *abfd, const char *name)
{
if (name[0] == '$' && name[1] == 'L')
- return TRUE;
+ return true;
/* We accept the generic ELF local label syntax as well. */
return _bfd_elf_is_local_label_name (abfd, name);
diff -r 394a04ad69c7 -r edbbb104bb9f external/gpl3/binutils/dist/ld/configure.tgt
--- a/external/gpl3/binutils/dist/ld/configure.tgt Tue Feb 07 20:37:48 2023 +0000
+++ b/external/gpl3/binutils/dist/ld/configure.tgt Tue Feb 07 20:39:01 2023 +0000
@@ -544,14 +544,18 @@
mips*el-*-haiku*) targ_emul=elf_mipsel_haiku
targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
;;
+mips64*el-*-netbsd*) targ_emul=elf32ltsmipn32
+ targ_extra_emuls="elf64btsmip elf64ltsmip elf32ltsmip elf32btsmipn32 elf32btsmip"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+mips64*-*-netbsd*) targ_emul=elf32btsmipn32
+ targ_extra_emuls="elf64ltsmip elf64btsmip elf32btsmip elf32ltsmipn32 elf32ltsmip"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
mipsn64*el-*-netbsd*) targ_emul=elf64ltsmip
targ_extra_emuls="elf64btsmip elf32ltsmip elf32btsmip elf32btsmipn32 elf32ltsmipn32"
targ_extra_libpath=$targ_extra_emuls
;;
-mips64*-*-netbsd*) targ_emul=elf32btsmipn32
- targ_extra_emuls="elf64ltsmip elf64btsmip elf32btsmip elf32ltsmipn32 elf32ltsmip"
- targ_extra_libpath=$targ_extra_emuls
- ;;
mipsn64*-*-netbsd*) targ_emul=elf64btsmip
targ_extra_emuls="elf64ltsmip elf64btsmip elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32"
targ_extra_libpath=$targ_extra_emuls
diff -r 394a04ad69c7 -r edbbb104bb9f external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h
--- a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h Tue Feb 07 20:37:48 2023 +0000
+++ b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h Tue Feb 07 20:39:01 2023 +0000
@@ -78,7 +78,7 @@
#define BFD_ARCH_SIZE 64
/* The word size of the default bfd target. */
-#define BFD_DEFAULT_TARGET_SIZE 32
+#define BFD_DEFAULT_TARGET_SIZE 64
#include <inttypes.h>
@@ -124,7 +124,7 @@
typedef uint64_t bfd_size_type;
typedef uint64_t symvalue;
-#define BFD_VMA_FMT "ll"
+#define BFD_VMA_FMT "l"
#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
diff -r 394a04ad69c7 -r edbbb104bb9f external/gpl3/binutils/lib/libbfd/arch/mips64eb/config.h
--- a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/config.h Tue Feb 07 20:37:48 2023 +0000
+++ b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/config.h Tue Feb 07 20:39:01 2023 +0000
@@ -266,7 +266,7 @@
#define SIZEOF_INT 4
/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
+#define SIZEOF_LONG 8
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
@@ -275,7 +275,7 @@
#define SIZEOF_OFF_T 8
/* The size of `void *', as computed by sizeof. */
-#define SIZEOF_VOID_P 4
+#define SIZEOF_VOID_P 8
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
diff -r 394a04ad69c7 -r edbbb104bb9f external/gpl3/binutils/lib/libbfd/arch/mips64eb/defs.mk
--- a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/defs.mk Tue Feb 07 20:37:48 2023 +0000
+++ b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/defs.mk Tue Feb 07 20:39:01 2023 +0000
@@ -2,9 +2,9 @@
# Generated from: NetBSD: mknative-binutils,v 1.14 2022/12/24 20:17:46 christos Exp
# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp
#
-G_libbfd_la_DEPENDENCIES=elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo ecofflink.lo coffgen.lo elf64-mips.lo
elf64.lo coff-mips.lo ecoff.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-mips.lo netbsd-core.lo archive64.lo ofiles
+G_libbfd_la_DEPENDENCIES=elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo ecofflink.lo coffgen.lo elf32-mips.lo
elf64-mips.lo elf64.lo coff-mips.lo ecoff.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-mips.lo netbsd-core.lo archive64.lo ofiles
G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo
opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo
G_DEFS=-DHAVE_CONFIG_H
G_INCLUDES=
-G_TDEFAULTS=-DDEFAULT_VECTOR=mips_elf32_trad_be_vec
-DSELECT_VECS='&mips_elf32_trad_be_vec,&mips_elf32_trad_le_vec,&mips_elf64_trad_be_vec,&mips_elf64_trad_le_vec,&mips_ecoff_be_vec,&mips_ecoff_le_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec'
-DSELECT_ARCHITECTURES='&bfd_mips_arch'
-G_HAVEVECS=-DHAVE_mips_elf32_trad_be_vec -DHAVE_mips_elf32_trad_le_vec -DHAVE_mips_elf64_trad_be_vec -DHAVE_mips_elf64_trad_le_vec -DHAVE_mips_ecoff_be_vec -DHAVE_mips_ecoff_le_vec
-DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec
+G_TDEFAULTS=-DDEFAULT_VECTOR=mips_elf32_ntrad_be_vec
-DSELECT_VECS='&mips_elf32_ntrad_be_vec,&mips_elf32_ntrad_le_vec,&mips_elf32_trad_be_vec,&mips_elf32_trad_le_vec,&mips_elf64_trad_be_vec,&mips_elf64_trad_le_vec,&mips_ecoff_be_vec,&mips_ecoff_le_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec'
-DSELECT_ARCHITECTURES='&bfd_mips_arch'
+G_HAVEVECS=-DHAVE_mips_elf32_ntrad_be_vec -DHAVE_mips_elf32_ntrad_le_vec -DHAVE_mips_elf32_trad_be_vec -DHAVE_mips_elf32_trad_le_vec -DHAVE_mips_elf64_trad_be_vec -DHAVE_mips_elf64_trad_le_vec
-DHAVE_mips_ecoff_be_vec -DHAVE_mips_ecoff_le_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec
diff -r 394a04ad69c7 -r edbbb104bb9f external/gpl3/binutils/lib/libbfd/arch/mipsn64eb/defs.mk
--- a/external/gpl3/binutils/lib/libbfd/arch/mipsn64eb/defs.mk Tue Feb 07 20:37:48 2023 +0000
+++ b/external/gpl3/binutils/lib/libbfd/arch/mipsn64eb/defs.mk Tue Feb 07 20:39:01 2023 +0000
@@ -2,9 +2,9 @@
# Generated from: NetBSD: mknative-binutils,v 1.14 2022/12/24 20:17:46 christos Exp
# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp
#
-G_libbfd_la_DEPENDENCIES=elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo ecofflink.lo coffgen.lo elf64-mips.lo
elf64.lo coff-mips.lo ecoff.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-mips.lo netbsd-core.lo archive64.lo ofiles
+G_libbfd_la_DEPENDENCIES=elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo ecofflink.lo coffgen.lo elfn32-mips.lo
elf64-mips.lo elf64.lo coff-mips.lo ecoff.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-mips.lo netbsd-core.lo archive64.lo ofiles
G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo
opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo
G_DEFS=-DHAVE_CONFIG_H
G_INCLUDES=
-G_TDEFAULTS=-DDEFAULT_VECTOR=mips_elf32_trad_be_vec
-DSELECT_VECS='&mips_elf32_trad_be_vec,&mips_elf32_trad_le_vec,&mips_elf64_trad_be_vec,&mips_elf64_trad_le_vec,&mips_ecoff_be_vec,&mips_ecoff_le_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec'
-DSELECT_ARCHITECTURES='&bfd_mips_arch'
-G_HAVEVECS=-DHAVE_mips_elf32_trad_be_vec -DHAVE_mips_elf32_trad_le_vec -DHAVE_mips_elf64_trad_be_vec -DHAVE_mips_elf64_trad_le_vec -DHAVE_mips_ecoff_be_vec -DHAVE_mips_ecoff_le_vec
-DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec
+G_TDEFAULTS=-DDEFAULT_VECTOR=mips_elf32_trad_be_vec
-DSELECT_VECS='&mips_elf32_trad_be_vec,&mips_elf32_trad_le_vec,&mips_elf32_ntrad_be_vec,&mips_elf32_ntrad_le_vec,&mips_elf64_trad_le_vec,&mips_elf64_trad_be_vec,&mips_ecoff_be_vec,&mips_ecoff_le_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec'
-DSELECT_ARCHITECTURES='&bfd_mips_arch'
+G_HAVEVECS=-DHAVE_mips_elf32_trad_be_vec -DHAVE_mips_elf32_trad_le_vec -DHAVE_mips_elf32_ntrad_be_vec -DHAVE_mips_elf32_ntrad_le_vec -DHAVE_mips_elf64_trad_le_vec -DHAVE_mips_elf64_trad_be_vec
-DHAVE_mips_ecoff_be_vec -DHAVE_mips_ecoff_le_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec
diff -r 394a04ad69c7 -r edbbb104bb9f external/gpl3/binutils/lib/libbfd/arch/mipsn64el/bfd.h
--- a/external/gpl3/binutils/lib/libbfd/arch/mipsn64el/bfd.h Tue Feb 07 20:37:48 2023 +0000
+++ b/external/gpl3/binutils/lib/libbfd/arch/mipsn64el/bfd.h Tue Feb 07 20:39:01 2023 +0000
@@ -1,5 +1,5 @@
/* This file is automatically generated. DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */
+/* Generated from: NetBSD: mknative-binutils,v 1.14 2022/12/24 20:17:46 christos Exp */
/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */
/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
@@ -11,7 +11,7 @@
/* Main header file for the bfd library -- portable access to object files.
- Copyright (C) 1990-2020 Free Software Foundation, Inc.
+ Copyright (C) 1990-2022 Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -45,9 +45,11 @@
#include "ansidecl.h"
#include "symcat.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
+#include <stdbool.h>
#include "diagnostics.h"
#include <stdarg.h>
+#include <string.h>
#include <sys/stat.h>
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
@@ -67,23 +69,6 @@
comma and then the length of the string. Doing this by hand
is error prone, so using this macro is safer. */
#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
-/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
- to create the arguments to another macro, since the preprocessor
- will mis-count the number of arguments to the outer macro (by not
- evaluating STRING_COMMA_LEN and so missing the comma). This is a
- problem for example when trying to use STRING_COMMA_LEN to build
- the arguments to the strncmp() macro. Hence this alternative
- definition of strncmp is provided here.
-
- Note - these macros do NOT work if STR2 is not a constant string. */
-#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
- /* strcpy() can have a similar problem, but since we know we are
- copying a constant string, we can use memcpy which will be faster
- since there is no need to check for a NUL byte inside STR. We
- can also save time if we do not need to copy the terminating NUL. */
-#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
-#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
-
#define BFD_SUPPORTS_PLUGINS 1
@@ -95,109 +80,64 @@
/* The word size of the default bfd target. */
#define BFD_DEFAULT_TARGET_SIZE 32
-#define BFD_HOST_64BIT_LONG 1
-#define BFD_HOST_64BIT_LONG_LONG 0
-#if 1
-#define BFD_HOST_64_BIT long
-#define BFD_HOST_U_64_BIT unsigned long
-typedef BFD_HOST_64_BIT bfd_int64_t;
-typedef BFD_HOST_U_64_BIT bfd_uint64_t;
-#endif
-
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if BFD_HOST_64BIT_LONG
-# define BFD_PRI64 "l"
-# elif defined (__MSVCRT__)
-# define BFD_PRI64 "I64"
-# else
-# define BFD_PRI64 "ll"
-# endif
-# undef PRId64
-# define PRId64 BFD_PRI64 "d"
-# undef PRIu64
-# define PRIu64 BFD_PRI64 "u"
-# undef PRIx64
-# define PRIx64 BFD_PRI64 "x"
-#endif
+#include <inttypes.h>
#if BFD_ARCH_SIZE >= 64
#define BFD64
#endif
-#ifndef INLINE
-#if __GNUC__ >= 2
-#define INLINE __inline__
-#else
-#define INLINE
-#endif
-#endif
-
-/* Declaring a type wide enough to hold a host long and a host pointer. */
-#define BFD_HOSTPTR_T unsigned long
-typedef BFD_HOSTPTR_T bfd_hostptr_t;
-
/* Forward declaration. */
typedef struct bfd bfd;
-/* Boolean type used in bfd. Too many systems define their own
- versions of "boolean" for us to safely typedef a "boolean" of
- our own. Using an enum for "bfd_boolean" has its own set of
- problems, with strange looking casts required to avoid warnings
- on some older compilers. Thus we just use an int.
-
+/* Boolean type used in bfd.
General rule: Functions which are bfd_boolean return TRUE on
success and FALSE on failure (unless they're a predicate). */
-typedef int bfd_boolean;
-#undef FALSE
-#undef TRUE
-#define FALSE 0
-#define TRUE 1
+#ifdef POISON_BFD_BOOLEAN
+# pragma GCC poison bfd_boolean
+#else
+# define bfd_boolean bool
+# undef FALSE
Home |
Main Index |
Thread Index |
Old Index