Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/binutils regen most architectures



details:   https://anonhg.NetBSD.org/src/rev/c698e6eb3fb0
branches:  trunk
changeset: 373083:c698e6eb3fb0
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jan 16 15:10:32 2023 +0000

description:
regen most architectures

diffstat:

 external/gpl3/binutils/lib/libbfd/arch/earm/bfd.h             |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/earm/bfdver.h          |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/earm/config.h          |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/ia64/bfd.h             |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/ia64/bfdver.h          |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/ia64/config.h          |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/m68000/bfd.h           |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/m68000/bfdver.h        |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/m68000/config.h        |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/m68k/bfd.h             |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/m68k/bfdver.h          |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/m68k/config.h          |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h         |  983 +++++----
 external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfdver.h      |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/mips64eb/config.h      |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/mips64eb/defs.mk       |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd.h         |  983 +++++----
 external/gpl3/binutils/lib/libbfd/arch/mips64el/bfdver.h      |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/mips64el/config.h      |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/mips64el/defs.mk       |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/mipseb/bfd.h           |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/mipseb/bfdver.h        |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/mipseb/config.h        |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/mipseb/defs.mk         |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/mipsel/bfd.h           |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/mipsel/bfdver.h        |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/mipsel/config.h        |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/mipsel/defs.mk         |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/mipsn64eb/bfd.h        |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/mipsn64eb/bfdver.h     |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/mipsn64eb/config.h     |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/mipsn64eb/defs.mk      |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd.h          |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/powerpc/bfdver.h       |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/powerpc/config.h       |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd.h        |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfdver.h     |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/powerpc64/config.h     |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfd.h            |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfdver.h         |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/sh3eb/config.h         |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/sh3el/bfd.h            |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/sh3el/bfdver.h         |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/sh3el/config.h         |  103 +-
 external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h              |  979 +++++----
 external/gpl3/binutils/lib/libbfd/arch/vax/bfdver.h           |    8 +-
 external/gpl3/binutils/lib/libbfd/arch/vax/config.h           |  103 +-
 external/gpl3/binutils/lib/libgnuctf/arch/earm/config.h       |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/earm/defs.mk        |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/ia64/config.h       |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/ia64/defs.mk        |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/m68000/config.h     |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/m68000/defs.mk      |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/m68k/config.h       |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/m68k/defs.mk        |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/mips64eb/config.h   |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/mips64eb/defs.mk    |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/mips64el/config.h   |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/mips64el/defs.mk    |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/mipseb/config.h     |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/mipseb/defs.mk      |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/mipsel/config.h     |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/mipsel/defs.mk      |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/mipsn64eb/config.h  |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/mipsn64eb/defs.mk   |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/powerpc/config.h    |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/powerpc/defs.mk     |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/powerpc64/config.h  |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/powerpc64/defs.mk   |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/sh3eb/config.h      |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/sh3eb/defs.mk       |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/sh3el/config.h      |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/sh3el/defs.mk       |    4 +-
 external/gpl3/binutils/lib/libgnuctf/arch/vax/config.h        |   43 +-
 external/gpl3/binutils/lib/libgnuctf/arch/vax/defs.mk         |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/earm/defs.mk        |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/ia64/defs.mk        |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/m68000/defs.mk      |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/m68k/defs.mk        |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/mips64eb/defs.mk    |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/mips64el/defs.mk    |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/mipseb/defs.mk      |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/mipsel/defs.mk      |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/mipsn64eb/defs.mk   |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/powerpc/defs.mk     |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/powerpc64/defs.mk   |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/sh3eb/defs.mk       |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/sh3el/defs.mk       |    4 +-
 external/gpl3/binutils/lib/libiberty/arch/vax/defs.mk         |    4 +-
 external/gpl3/binutils/lib/libopcodes/arch/earm/config.h      |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/ia64/config.h      |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/m68000/config.h    |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/m68k/config.h      |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/mips64eb/config.h  |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/mips64el/config.h  |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/mipseb/config.h    |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/mipsel/config.h    |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/mipsn64eb/config.h |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/powerpc/config.h   |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/powerpc64/config.h |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/sh3eb/config.h     |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/sh3el/config.h     |   20 +-
 external/gpl3/binutils/lib/libopcodes/arch/vax/config.h       |   20 +-
 external/gpl3/binutils/usr.bin/common/arch/earm/config.h      |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/earm/defs.mk       |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/ia64/config.h      |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/ia64/defs.mk       |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/m68000/config.h    |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/m68000/defs.mk     |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/m68k/config.h      |  123 +-
 external/gpl3/binutils/usr.bin/common/arch/m68k/defs.mk       |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/mips64eb/config.h  |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/mips64eb/defs.mk   |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/mips64el/config.h  |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/mips64el/defs.mk   |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/mipseb/config.h    |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/mipseb/defs.mk     |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/mipsel/config.h    |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/mipsel/defs.mk     |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/mipsn64eb/config.h |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/mipsn64eb/defs.mk  |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/mipsn64el/defs.mk  |    6 +-
 external/gpl3/binutils/usr.bin/common/arch/powerpc/config.h   |  123 +-
 external/gpl3/binutils/usr.bin/common/arch/powerpc/defs.mk    |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/powerpc64/config.h |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/powerpc64/defs.mk  |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/sh3eb/config.h     |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/sh3eb/defs.mk      |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/sh3el/config.h     |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/sh3el/defs.mk      |   16 +-
 external/gpl3/binutils/usr.bin/common/arch/vax/config.h       |  121 +-
 external/gpl3/binutils/usr.bin/common/arch/vax/defs.mk        |   14 +-
 external/gpl3/binutils/usr.bin/gas/arch/earm/config.h         |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/earm/defs.mk          |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/earm/targ-env.h       |    4 +-
 external/gpl3/binutils/usr.bin/gas/arch/ia64/config.h         |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/ia64/defs.mk          |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/m68000/config.h       |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/m68000/defs.mk        |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/m68k/config.h         |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/m68k/defs.mk          |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/mips64eb/config.h     |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/mips64eb/defs.mk      |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/mips64el/config.h     |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/mips64el/defs.mk      |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/mipseb/config.h       |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/mipseb/defs.mk        |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/mipsel/config.h       |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/mipsel/defs.mk        |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/mipsn64eb/config.h    |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/mipsn64eb/defs.mk     |    4 +-
 external/gpl3/binutils/usr.bin/gas/arch/powerpc/config.h      |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/powerpc/defs.mk       |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/powerpc64/config.h    |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/powerpc64/defs.mk     |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/sh3eb/config.h        |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/sh3eb/defs.mk         |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/sh3el/config.h        |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/sh3el/defs.mk         |    6 +-
 external/gpl3/binutils/usr.bin/gas/arch/vax/config.h          |  119 +-
 external/gpl3/binutils/usr.bin/gas/arch/vax/defs.mk           |    6 +-
 external/gpl3/binutils/usr.bin/gprof/arch/earm/gconfig.h      |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/ia64/gconfig.h      |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/m68000/gconfig.h    |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/m68k/gconfig.h      |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/mips64eb/gconfig.h  |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/mips64el/gconfig.h  |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/mipseb/gconfig.h    |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/mipsel/gconfig.h    |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/mipsn64eb/gconfig.h |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/powerpc/gconfig.h   |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/powerpc64/gconfig.h |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/sh3eb/gconfig.h     |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/sh3el/gconfig.h     |   15 +-
 external/gpl3/binutils/usr.bin/gprof/arch/vax/gconfig.h       |   15 +-
 external/gpl3/binutils/usr.bin/ld/arch/earm/config.h          |   80 +-
 external/gpl3/binutils/usr.bin/ld/arch/earm/defs.mk           |    4 +-
 external/gpl3/binutils/usr.bin/ld/arch/ia64/config.h          |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/m68000/config.h        |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/m68k/config.h          |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/mips64eb/config.h      |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/mips64el/config.h      |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/mips64el/defs.mk       |    8 +-
 external/gpl3/binutils/usr.bin/ld/arch/mips64el/ldemul-list.h |   20 +-
 external/gpl3/binutils/usr.bin/ld/arch/mipseb/config.h        |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/mipsel/config.h        |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/mipsn64eb/config.h     |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/powerpc/config.h       |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/powerpc64/config.h     |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/sh3eb/config.h         |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/sh3el/config.h         |   78 +-
 external/gpl3/binutils/usr.bin/ld/arch/vax/config.h           |   78 +-
 192 files changed, 9972 insertions(+), 11344 deletions(-)

diffs (truncated from 45924 to 300 lines):

diff -r dc63724998f6 -r c698e6eb3fb0 external/gpl3/binutils/lib/libbfd/arch/earm/bfd.h
--- a/external/gpl3/binutils/lib/libbfd/arch/earm/bfd.h Mon Jan 16 15:00:03 2023 +0000
+++ b/external/gpl3/binutils/lib/libbfd/arch/earm/bfd.h Mon Jan 16 15:10:32 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 0
-#define BFD_HOST_64BIT_LONG_LONG 1
-#if 1
-#define BFD_HOST_64_BIT long long
-#define BFD_HOST_U_64_BIT unsigned long 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
+# undef TRUE
+# define FALSE 0
+# define TRUE 1
+#endif
+
+/* Silence "applying zero offset to null pointer" UBSAN warnings.  */
+#define PTR_ADD(P,A) ((A) != 0 ? (P) + (A) : (P))
+/* Also prevent non-zero offsets from being applied to a null pointer.  */
+#define NPTR_ADD(P,A) ((P) != NULL ? (P) + (A) : (P))
 
 #ifdef BFD64
 
-#ifndef BFD_HOST_64_BIT
- #error No 64 bit integer type available
-#endif /* ! defined (BFD_HOST_64_BIT) */
-
-typedef BFD_HOST_U_64_BIT bfd_vma;
-typedef BFD_HOST_64_BIT bfd_signed_vma;
-typedef BFD_HOST_U_64_BIT bfd_size_type;
-typedef BFD_HOST_U_64_BIT symvalue;
-
-#if BFD_HOST_64BIT_LONG
-#define BFD_VMA_FMT "l"
-#elif defined (__MSVCRT__)
-#define BFD_VMA_FMT "I64"
-#else
-#define BFD_VMA_FMT "ll"
-#endif
-
-#ifndef fprintf_vma
-#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
-#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
-#endif
-
-#else /* not BFD64  */
-
 /* Represent a target address.  Also used as a generic unsigned type
    which is guaranteed to be big enough to hold any arithmetic types
    we need to deal with.  */
-typedef unsigned long bfd_vma;
+typedef uint64_t bfd_vma;
 
 /* A generic signed type which is guaranteed to be big enough to hold any
    arithmetic types we need to deal with.  Can be assumed to be compatible
    with bfd_vma in the same way that signed and unsigned ints are compatible
    (as parameters, in assignment, etc).  */
+typedef int64_t bfd_signed_vma;
+
+typedef uint64_t bfd_size_type;
+typedef uint64_t symvalue;
+
+#define BFD_VMA_FMT "ll"
+
+#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)
+
+#else /* not BFD64  */
+
+typedef unsigned long bfd_vma;
 typedef long bfd_signed_vma;
-
 typedef unsigned long symvalue;
 typedef unsigned long bfd_size_type;
 
-/* Print a bfd_vma x on stream s.  */
 #define BFD_VMA_FMT "l"
+
 #define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x)
 #define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x)
 
@@ -206,19 +146,10 @@
 #define HALF_BFD_SIZE_TYPE \
   (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
 
-#ifndef BFD_HOST_64_BIT
-/* Fall back on a 32 bit type.  The idea is to make these types always
-   available for function return types, but in the case that
-   BFD_HOST_64_BIT is undefined such a function should abort or
-   otherwise signal an error.  */
-typedef bfd_signed_vma bfd_int64_t;
-typedef bfd_vma bfd_uint64_t;
-#endif
-
 /* An offset into a file.  BFD always uses the largest possible offset
    based on the build time availability of fseek, fseeko, or fseeko64.  */
-typedef BFD_HOST_64_BIT file_ptr;
-typedef unsigned BFD_HOST_64_BIT ufile_ptr;
+typedef int64_t file_ptr;
+typedef uint64_t ufile_ptr;
 
 extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
 extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
@@ -366,7 +297,7 @@
 };
 
 /* Initialize a hash table.  */
-extern bfd_boolean bfd_hash_table_init
+extern bool bfd_hash_table_init
   (struct bfd_hash_table *,
    struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
                               struct bfd_hash_table *,
@@ -374,7 +305,7 @@
    unsigned int);
 
 /* Initialize a hash table specifying a size.  */
-extern bfd_boolean bfd_hash_table_init_n
+extern bool bfd_hash_table_init_n
   (struct bfd_hash_table *,
    struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
                               struct bfd_hash_table *,
@@ -390,8 +321,7 @@
    COPY argument must be TRUE if this routine should copy the string
    into newly allocated memory when adding an entry.  */
 extern struct bfd_hash_entry *bfd_hash_lookup
-  (struct bfd_hash_table *, const char *, bfd_boolean create,
-   bfd_boolean copy);
+  (struct bfd_hash_table *, const char *, bool create, bool copy);
 
 /* Insert an entry in a hash table.  */
 extern struct bfd_hash_entry *bfd_hash_insert
@@ -419,7 +349,7 @@
    INFO argument is passed to the function.  */
 extern void bfd_hash_traverse
   (struct bfd_hash_table *,
-   bfd_boolean (*) (struct bfd_hash_entry *, void *),
+   bool (*) (struct bfd_hash_entry *, void *),
    void *info);
 
 /* Allows the default size of a hash table to be configured. New hash
@@ -482,22 +412,22 @@
 #endif
 extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
 
-extern bfd_boolean bfd_cache_close
+extern bool bfd_cache_close
   (bfd *abfd);
 /* NB: This declaration should match the autogenerated one in libbfd.h.  */
 
-extern bfd_boolean bfd_cache_close_all (void);
-
-extern bfd_boolean bfd_record_phdr
-  (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
-   bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
+extern bool bfd_cache_close_all (void);
+
+extern bool bfd_record_phdr
+  (bfd *, unsigned long, bool, flagword, bool, bfd_vma,
+   bool, bool, unsigned int, struct bfd_section **);
 
 /* Byte swapping routines.  */
 
-bfd_uint64_t bfd_getb64 (const void *);
-bfd_uint64_t bfd_getl64 (const void *);
-bfd_int64_t bfd_getb_signed_64 (const void *);
-bfd_int64_t bfd_getl_signed_64 (const void *);
+uint64_t bfd_getb64 (const void *);
+uint64_t bfd_getl64 (const void *);
+int64_t bfd_getb_signed_64 (const void *);
+int64_t bfd_getl_signed_64 (const void *);
 bfd_vma bfd_getb32 (const void *);
 bfd_vma bfd_getl32 (const void *);
 bfd_signed_vma bfd_getb_signed_32 (const void *);
@@ -506,8 +436,8 @@
 bfd_vma bfd_getl16 (const void *);
 bfd_signed_vma bfd_getb_signed_16 (const void *);
 bfd_signed_vma bfd_getl_signed_16 (const void *);
-void bfd_putb64 (bfd_uint64_t, void *);
-void bfd_putl64 (bfd_uint64_t, void *);
+void bfd_putb64 (uint64_t, void *);
+void bfd_putl64 (uint64_t, void *);
 void bfd_putb32 (bfd_vma, void *);
 void bfd_putl32 (bfd_vma, void *);
 void bfd_putb24 (bfd_vma, void *);



Home | Main Index | Thread Index | Old Index