* bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.

(BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
	(bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
	(bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
	(bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
	* configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
	(BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
	when using long.
	* libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
	(bfd_getb64): Return bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
	(bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
	(bfd_putb64): Accept bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
	(bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
	* dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
	(read_8_bytes, read_indirect_string, read_address): Likewise.
	(read_abbrevs, parse_comp_unit): Likewise.
	* targets.c (struct bfd_target): Likewise.
	* aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
	* hppabsd-core.c: Likewise.  Formatting.
	* hpux-core.c: Likewise.
	* irix-core.c: Likewise.
	* netbsd-core.c: Likewise.
	* osf-core.c: Likewise.
	* ptrace-core.c: Likewise.
	* sco5-core.c: Likewise.
	* trad-core.c: Likewise.
	* configure: Regenerate.
	* bfd-in2.h: Regenerate.
This commit is contained in:
Alan Modra 2004-03-15 14:21:43 +00:00
parent 7bfeee7be2
commit 8ce8c090f3
17 changed files with 589 additions and 522 deletions

View File

@ -1,3 +1,34 @@
2004-03-15 Alan Modra <amodra@bigpond.net.au>
* bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
(BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
(bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
(bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
(bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
* configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
(BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
when using long.
* libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
(bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
(bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
(bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
(bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
* dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
(read_8_bytes, read_indirect_string, read_address): Likewise.
(read_abbrevs, parse_comp_unit): Likewise.
* targets.c (struct bfd_target): Likewise.
* aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
* hppabsd-core.c: Likewise. Formatting.
* hpux-core.c: Likewise.
* irix-core.c: Likewise.
* netbsd-core.c: Likewise.
* osf-core.c: Likewise.
* ptrace-core.c: Likewise.
* sco5-core.c: Likewise.
* trad-core.c: Likewise.
* configure: Regenerate.
* bfd-in2.h: Regenerate.
2004-03-15 Alan Modra <amodra@bigpond.net.au>
* bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.

View File

@ -225,6 +225,9 @@ swap_abort ()
#define NO_GET ((bfd_vma (*) (const void *)) swap_abort)
#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort)
#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
const bfd_target aix386_core_vec = {
"aix386-core",
@ -239,10 +242,10 @@ const bfd_target aix386_core_vec = {
0, /* leading underscore */
' ', /* ar_pad_char */
16, /* ar_max_namelen */
NO_GET, NO_GETS, NO_PUT,
NO_GET64, NO_GETS64, NO_PUT64,
NO_GET, NO_GETS, NO_PUT,
NO_GET, NO_GETS, NO_PUT, /* data */
NO_GET, NO_GETS, NO_PUT,
NO_GET64, NO_GETS64, NO_PUT64,
NO_GET, NO_GETS, NO_PUT,
NO_GET, NO_GETS, NO_PUT, /* hdrs */

View File

@ -55,6 +55,8 @@ extern "C" {
#if @BFD_HOST_64_BIT_DEFINED@
#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@
typedef BFD_HOST_64_BIT bfd_int64_t;
typedef BFD_HOST_U_64_BIT bfd_uint64_t;
#endif
#if BFD_ARCH_SIZE >= 64
@ -95,24 +97,6 @@ typedef int bfd_boolean;
#define true dont_use_true_in_bfd
#endif
/* Support for different sizes of target format ints and addresses.
If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be
set to 1 above. Otherwise, if the host compiler used during
configuration supports long long, this code will use it.
Otherwise, BFD_HOST_64_BIT must be defined above. */
#ifndef BFD_HOST_64_BIT
# if BFD_HOST_64BIT_LONG
# define BFD_HOST_64_BIT long
# define BFD_HOST_U_64_BIT unsigned long
# else
# if BFD_HOST_LONG_LONG
# define BFD_HOST_64_BIT long long
# define BFD_HOST_U_64_BIT unsigned long long
# endif /* ! BFD_HOST_LONG_LONG */
# endif /* ! BFD_HOST_64BIT_LONG */
#endif /* ! defined (BFD_HOST_64_BIT) */
#ifdef BFD64
#ifndef BFD_HOST_64_BIT
@ -160,6 +144,15 @@ typedef unsigned long bfd_size_type;
#endif /* not BFD64 */
#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_file_ptr@ file_ptr;
@ -518,10 +511,10 @@ extern bfd_boolean bfd_record_phdr
/* Byte swapping routines. */
bfd_vma bfd_getb64 (const void *);
bfd_vma bfd_getl64 (const void *);
bfd_signed_vma bfd_getb_signed_64 (const void *);
bfd_signed_vma bfd_getl_signed_64 (const void *);
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 *);
bfd_vma bfd_getb32 (const void *);
bfd_vma bfd_getl32 (const void *);
bfd_signed_vma bfd_getb_signed_32 (const void *);
@ -530,8 +523,8 @@ bfd_vma bfd_getb16 (const void *);
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_vma, void *);
void bfd_putl64 (bfd_vma, void *);
void bfd_putb64 (bfd_uint64_t, void *);
void bfd_putl64 (bfd_uint64_t, void *);
void bfd_putb32 (bfd_vma, void *);
void bfd_putl32 (bfd_vma, void *);
void bfd_putb16 (bfd_vma, void *);
@ -539,8 +532,8 @@ void bfd_putl16 (bfd_vma, void *);
/* Byte swapping routines which take size and endiannes as arguments. */
bfd_vma bfd_get_bits (const void *, int, bfd_boolean);
void bfd_put_bits (bfd_vma, void *, int, bfd_boolean);
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
/* Externally visible ECOFF routines. */

View File

@ -62,6 +62,8 @@ extern "C" {
#if @BFD_HOST_64_BIT_DEFINED@
#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@
typedef BFD_HOST_64_BIT bfd_int64_t;
typedef BFD_HOST_U_64_BIT bfd_uint64_t;
#endif
#if BFD_ARCH_SIZE >= 64
@ -102,24 +104,6 @@ typedef int bfd_boolean;
#define true dont_use_true_in_bfd
#endif
/* Support for different sizes of target format ints and addresses.
If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be
set to 1 above. Otherwise, if the host compiler used during
configuration supports long long, this code will use it.
Otherwise, BFD_HOST_64_BIT must be defined above. */
#ifndef BFD_HOST_64_BIT
# if BFD_HOST_64BIT_LONG
# define BFD_HOST_64_BIT long
# define BFD_HOST_U_64_BIT unsigned long
# else
# if BFD_HOST_LONG_LONG
# define BFD_HOST_64_BIT long long
# define BFD_HOST_U_64_BIT unsigned long long
# endif /* ! BFD_HOST_LONG_LONG */
# endif /* ! BFD_HOST_64BIT_LONG */
#endif /* ! defined (BFD_HOST_64_BIT) */
#ifdef BFD64
#ifndef BFD_HOST_64_BIT
@ -167,6 +151,15 @@ typedef unsigned long bfd_size_type;
#endif /* not BFD64 */
#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_file_ptr@ file_ptr;
@ -525,10 +518,10 @@ extern bfd_boolean bfd_record_phdr
/* Byte swapping routines. */
bfd_vma bfd_getb64 (const void *);
bfd_vma bfd_getl64 (const void *);
bfd_signed_vma bfd_getb_signed_64 (const void *);
bfd_signed_vma bfd_getl_signed_64 (const void *);
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 *);
bfd_vma bfd_getb32 (const void *);
bfd_vma bfd_getl32 (const void *);
bfd_signed_vma bfd_getb_signed_32 (const void *);
@ -537,8 +530,8 @@ bfd_vma bfd_getb16 (const void *);
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_vma, void *);
void bfd_putl64 (bfd_vma, void *);
void bfd_putb64 (bfd_uint64_t, void *);
void bfd_putl64 (bfd_uint64_t, void *);
void bfd_putb32 (bfd_vma, void *);
void bfd_putl32 (bfd_vma, void *);
void bfd_putb16 (bfd_vma, void *);
@ -546,8 +539,8 @@ void bfd_putl16 (bfd_vma, void *);
/* Byte swapping routines which take size and endiannes as arguments. */
bfd_vma bfd_get_bits (const void *, int, bfd_boolean);
void bfd_put_bits (bfd_vma, void *, int, bfd_boolean);
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
/* Externally visible ECOFF routines. */
@ -4102,9 +4095,9 @@ typedef struct bfd_target
/* Entries for byte swapping for data. These are different from the
other entry points, since they don't take a BFD asthe first argument.
Certain other handlers could do the same. */
bfd_vma (*bfd_getx64) (const void *);
bfd_signed_vma (*bfd_getx_signed_64) (const void *);
void (*bfd_putx64) (bfd_vma, void *);
bfd_uint64_t (*bfd_getx64) (const void *);
bfd_int64_t (*bfd_getx_signed_64) (const void *);
void (*bfd_putx64) (bfd_uint64_t, void *);
bfd_vma (*bfd_getx32) (const void *);
bfd_signed_vma (*bfd_getx_signed_32) (const void *);
void (*bfd_putx32) (bfd_vma, void *);
@ -4113,9 +4106,9 @@ typedef struct bfd_target
void (*bfd_putx16) (bfd_vma, void *);
/* Byte swapping for the headers. */
bfd_vma (*bfd_h_getx64) (const void *);
bfd_signed_vma (*bfd_h_getx_signed_64) (const void *);
void (*bfd_h_putx64) (bfd_vma, void *);
bfd_uint64_t (*bfd_h_getx64) (const void *);
bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
void (*bfd_h_putx64) (bfd_uint64_t, void *);
bfd_vma (*bfd_h_getx32) (const void *);
bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
void (*bfd_h_putx32) (bfd_vma, void *);

637
bfd/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -133,6 +133,7 @@ AC_COMPILE_CHECK_SIZEOF(long)
if test "x${ac_cv_sizeof_long}" = "x8"; then
host64=true
HOST_64BIT_TYPE="long"
HOST_U_64BIT_TYPE="unsigned long"
elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
HOST_64BIT_TYPE="long long"
HOST_U_64BIT_TYPE="unsigned long long"
@ -140,7 +141,8 @@ fi
if test "x${HOST_64BIT_TYPE}" = "xlong"; then
BFD_HOST_64BIT_LONG=1
elif test "x${HOST_64BIT_TYPE}" != "x"; then
fi
if test "x${HOST_64BIT_TYPE}" != "x"; then
BFD_HOST_64_BIT_DEFINED=1
BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}

View File

@ -61,8 +61,8 @@ struct attribute
{
char *str;
struct dwarf_block *blk;
bfd_vma val;
bfd_signed_vma sval;
bfd_uint64_t val;
bfd_int64_t sval;
}
u;
};
@ -230,7 +230,7 @@ read_4_bytes (bfd *abfd, char *buf)
return bfd_get_32 (abfd, buf);
}
static bfd_vma
static bfd_uint64_t
read_8_bytes (bfd *abfd, char *buf)
{
return bfd_get_64 (abfd, buf);
@ -268,7 +268,7 @@ read_indirect_string (struct comp_unit* unit,
char *buf,
unsigned int *bytes_read_ptr)
{
bfd_vma offset;
bfd_uint64_t offset;
struct dwarf2_debug *stash = unit->stash;
if (unit->offset_size == 4)
@ -378,7 +378,7 @@ read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
/* END VERBATIM */
static bfd_vma
static bfd_uint64_t
read_address (struct comp_unit *unit, char *buf)
{
switch (unit->addr_size)
@ -422,7 +422,7 @@ lookup_abbrev (unsigned int number, struct abbrev_info **abbrevs)
in a hash table. */
static struct abbrev_info**
read_abbrevs (bfd *abfd, bfd_vma offset, struct dwarf2_debug *stash)
read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash)
{
struct abbrev_info **abbrevs;
char *abbrev_ptr;
@ -1436,7 +1436,7 @@ parse_comp_unit (bfd *abfd,
{
struct comp_unit* unit;
unsigned int version;
bfd_vma abbrev_offset = 0;
bfd_uint64_t abbrev_offset = 0;
unsigned int addr_size;
struct abbrev_info** abbrevs;
unsigned int abbrev_number, bytes_read, i;

View File

@ -239,6 +239,9 @@ swap_abort ()
#define NO_GET ((bfd_vma (*) (const void *)) swap_abort)
#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort)
#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
const bfd_target hppabsd_core_vec =
{
@ -253,26 +256,26 @@ const bfd_target hppabsd_core_vec =
0, /* symbol prefix */
' ', /* ar_pad_char */
16, /* ar_max_namelen */
NO_GET, NO_GETS, NO_PUT, /* 64 bit data */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */
NO_GET, NO_GETS, NO_PUT, /* 32 bit data */
NO_GET, NO_GETS, NO_PUT, /* 16 bit data */
NO_GET, NO_GETS, NO_PUT, /* 64 bit hdrs */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */
{ /* bfd_check_format */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
hppabsd_core_core_file_p /* a core file */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
hppabsd_core_core_file_p /* a core file */
},
{ /* bfd_set_format */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
{ /* bfd_write_contents */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
@ -288,5 +291,5 @@ const bfd_target hppabsd_core_vec =
NULL,
(PTR) 0 /* backend_data */
};
};
#endif

View File

@ -348,9 +348,13 @@ swap_abort ()
{
abort(); /* This way doesn't require any declaration for ANSI to fuck up */
}
#define NO_GET ((bfd_vma (*) (const void *)) swap_abort)
#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort)
#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
const bfd_target hpux_core_vec =
{
@ -365,26 +369,26 @@ const bfd_target hpux_core_vec =
0, /* symbol prefix */
' ', /* ar_pad_char */
16, /* ar_max_namelen */
NO_GET, NO_GETS, NO_PUT, /* 64 bit data */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */
NO_GET, NO_GETS, NO_PUT, /* 32 bit data */
NO_GET, NO_GETS, NO_PUT, /* 16 bit data */
NO_GET, NO_GETS, NO_PUT, /* 64 bit hdrs */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */
{ /* bfd_check_format */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
hpux_core_core_file_p /* a core file */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
hpux_core_core_file_p /* a core file */
},
{ /* bfd_set_format */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
{ /* bfd_write_contents */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
@ -400,4 +404,4 @@ const bfd_target hpux_core_vec =
NULL,
(PTR) 0 /* backend_data */
};
};

View File

@ -299,9 +299,13 @@ swap_abort()
{
abort(); /* This way doesn't require any declaration for ANSI to fuck up */
}
#define NO_GET ((bfd_vma (*) (const void *)) swap_abort)
#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort)
#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
const bfd_target irix_core_vec =
{
@ -316,26 +320,26 @@ const bfd_target irix_core_vec =
0, /* symbol prefix */
' ', /* ar_pad_char */
16, /* ar_max_namelen */
NO_GET, NO_GETS, NO_PUT, /* 64 bit data */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */
NO_GET, NO_GETS, NO_PUT, /* 32 bit data */
NO_GET, NO_GETS, NO_PUT, /* 16 bit data */
NO_GET, NO_GETS, NO_PUT, /* 64 bit hdrs */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */
{ /* bfd_check_format */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
irix_core_core_file_p /* a core file */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
irix_core_core_file_p /* a core file */
},
{ /* bfd_set_format */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
{ /* bfd_write_contents */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
@ -351,6 +355,6 @@ const bfd_target irix_core_vec =
NULL,
(PTR) 0 /* backend_data */
};
};
#endif /* IRIX_CORE */

View File

@ -391,9 +391,9 @@ DESCRIPTION
/* Sign extension to bfd_signed_vma. */
#define COERCE16(x) (((bfd_signed_vma) (x) ^ 0x8000) - 0x8000)
#define COERCE32(x) (((bfd_signed_vma) (x) ^ 0x80000000) - 0x80000000)
#define EIGHT_GAZILLION ((BFD_HOST_64_BIT) 1 << 63)
#define EIGHT_GAZILLION ((bfd_int64_t) 1 << 63)
#define COERCE64(x) \
(((bfd_signed_vma) (x) ^ EIGHT_GAZILLION) - EIGHT_GAZILLION)
(((bfd_int64_t) (x) ^ EIGHT_GAZILLION) - EIGHT_GAZILLION)
bfd_vma
bfd_getb16 (const void *p)
@ -491,12 +491,12 @@ bfd_getl_signed_32 (const void *p)
return COERCE32 (v);
}
bfd_vma
bfd_uint64_t
bfd_getb64 (const void *p ATTRIBUTE_UNUSED)
{
#ifdef BFD64
#ifdef BFD_HOST_64_BIT
const bfd_byte *addr = p;
bfd_vma v;
bfd_uint64_t v;
v = addr[0]; v <<= 8;
v |= addr[1]; v <<= 8;
@ -514,12 +514,12 @@ bfd_getb64 (const void *p ATTRIBUTE_UNUSED)
#endif
}
bfd_vma
bfd_uint64_t
bfd_getl64 (const void *p ATTRIBUTE_UNUSED)
{
#ifdef BFD64
#ifdef BFD_HOST_64_BIT
const bfd_byte *addr = p;
bfd_vma v;
bfd_uint64_t v;
v = addr[7]; v <<= 8;
v |= addr[6]; v <<= 8;
@ -538,12 +538,12 @@ bfd_getl64 (const void *p ATTRIBUTE_UNUSED)
}
bfd_signed_vma
bfd_int64_t
bfd_getb_signed_64 (const void *p ATTRIBUTE_UNUSED)
{
#ifdef BFD64
#ifdef BFD_HOST_64_BIT
const bfd_byte *addr = p;
bfd_vma v;
bfd_uint64_t v;
v = addr[0]; v <<= 8;
v |= addr[1]; v <<= 8;
@ -561,12 +561,12 @@ bfd_getb_signed_64 (const void *p ATTRIBUTE_UNUSED)
#endif
}
bfd_signed_vma
bfd_int64_t
bfd_getl_signed_64 (const void *p ATTRIBUTE_UNUSED)
{
#ifdef BFD64
#ifdef BFD_HOST_64_BIT
const bfd_byte *addr = p;
bfd_vma v;
bfd_uint64_t v;
v = addr[7]; v <<= 8;
v |= addr[6]; v <<= 8;
@ -605,9 +605,9 @@ bfd_putl32 (bfd_vma data, void *p)
}
void
bfd_putb64 (bfd_vma data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED)
bfd_putb64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED)
{
#ifdef BFD64
#ifdef BFD_HOST_64_BIT
bfd_byte *addr = p;
addr[0] = (data >> (7*8)) & 0xff;
addr[1] = (data >> (6*8)) & 0xff;
@ -623,9 +623,9 @@ bfd_putb64 (bfd_vma data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED)
}
void
bfd_putl64 (bfd_vma data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED)
bfd_putl64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED)
{
#ifdef BFD64
#ifdef BFD_HOST_64_BIT
bfd_byte *addr = p;
addr[7] = (data >> (7*8)) & 0xff;
addr[6] = (data >> (6*8)) & 0xff;
@ -641,7 +641,7 @@ bfd_putl64 (bfd_vma data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED)
}
void
bfd_put_bits (bfd_vma data, void *p, int bits, bfd_boolean big_p)
bfd_put_bits (bfd_uint64_t data, void *p, int bits, bfd_boolean big_p)
{
bfd_byte *addr = p;
int i;
@ -660,11 +660,11 @@ bfd_put_bits (bfd_vma data, void *p, int bits, bfd_boolean big_p)
}
}
bfd_vma
bfd_uint64_t
bfd_get_bits (const void *p, int bits, bfd_boolean big_p)
{
const bfd_byte *addr = p;
bfd_vma data;
bfd_uint64_t data;
int i;
int bytes;

View File

@ -231,6 +231,9 @@ swap_abort ()
#define NO_GET ((bfd_vma (*) (const void *)) swap_abort)
#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort)
#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
const bfd_target netbsd_core_vec =
{
@ -245,39 +248,39 @@ const bfd_target netbsd_core_vec =
0, /* Symbol prefix. */
' ', /* ar_pad_char. */
16, /* ar_max_namelen. */
NO_GET, NO_GETS, NO_PUT, /* 64 bit data. */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data. */
NO_GET, NO_GETS, NO_PUT, /* 32 bit data. */
NO_GET, NO_GETS, NO_PUT, /* 16 bit data. */
NO_GET, NO_GETS, NO_PUT, /* 64 bit hdrs. */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs. */
NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs. */
NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs. */
{ /* bfd_check_format. */
_bfd_dummy_target, /* Unknown format. */
_bfd_dummy_target, /* Object file. */
_bfd_dummy_target, /* Archive. */
netbsd_core_file_p /* A core file. */
{ /* bfd_check_format. */
_bfd_dummy_target, /* Unknown format. */
_bfd_dummy_target, /* Object file. */
_bfd_dummy_target, /* Archive. */
netbsd_core_file_p /* A core file. */
},
{ /* bfd_set_format. */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
{ /* bfd_write_contents. */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (netbsd),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (_bfd_generic),
BFD_JUMP_TABLE_LINK (_bfd_nolink),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (netbsd),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (_bfd_generic),
BFD_JUMP_TABLE_LINK (_bfd_nolink),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
(PTR) 0 /* Backend_data. */
};
};

View File

@ -185,9 +185,13 @@ swap_abort()
{
abort(); /* This way doesn't require any declaration for ANSI to fuck up */
}
#define NO_GET ((bfd_vma (*) (const void *)) swap_abort)
#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort)
#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
const bfd_target osf_core_vec =
{
@ -202,26 +206,26 @@ const bfd_target osf_core_vec =
0, /* symbol prefix */
' ', /* ar_pad_char */
16, /* ar_max_namelen */
NO_GET, NO_GETS, NO_PUT, /* 64 bit data */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */
NO_GET, NO_GETS, NO_PUT, /* 32 bit data */
NO_GET, NO_GETS, NO_PUT, /* 16 bit data */
NO_GET, NO_GETS, NO_PUT, /* 64 bit hdrs */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */
{ /* bfd_check_format */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
osf_core_core_file_p /* a core file */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
osf_core_core_file_p /* a core file */
},
{ /* bfd_set_format */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
{ /* bfd_write_contents */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
@ -237,4 +241,4 @@ const bfd_target osf_core_vec =
NULL,
(PTR) 0 /* backend_data */
};
};

View File

@ -167,9 +167,13 @@ swap_abort ()
{
abort (); /* This way doesn't require any declaration for ANSI to fuck up */
}
#define NO_GET ((bfd_vma (*) (const void *)) swap_abort)
#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort)
#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
const bfd_target ptrace_core_vec =
{
@ -184,41 +188,41 @@ const bfd_target ptrace_core_vec =
0, /* symbol prefix */
' ', /* ar_pad_char */
16, /* ar_max_namelen */
NO_GET, NO_GETS, NO_PUT, /* 64 bit data */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */
NO_GET, NO_GETS, NO_PUT, /* 32 bit data */
NO_GET, NO_GETS, NO_PUT, /* 16 bit data */
NO_GET, NO_GETS, NO_PUT, /* 64 bit hdrs */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */
{ /* bfd_check_format */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
ptrace_unix_core_file_p /* a core file */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
ptrace_unix_core_file_p /* a core file */
},
{ /* bfd_set_format */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
{ /* bfd_write_contents */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (ptrace_unix),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (_bfd_generic),
BFD_JUMP_TABLE_LINK (_bfd_nolink),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (ptrace_unix),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (_bfd_generic),
BFD_JUMP_TABLE_LINK (_bfd_nolink),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
(PTR) 0 /* backend_data */
};
};
#endif /* PTRACE_CORE */

View File

@ -361,9 +361,13 @@ swap_abort ()
{
abort (); /* This way doesn't require any declaration for ANSI to fuck up */
}
#define NO_GET ((bfd_vma (*) (const void *)) swap_abort)
#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort)
#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
const bfd_target sco5_core_vec =
{
@ -378,26 +382,26 @@ const bfd_target sco5_core_vec =
0, /* symbol prefix */
' ', /* ar_pad_char */
16, /* ar_max_namelen */
NO_GET, NO_GETS, NO_PUT, /* 64 bit data */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */
NO_GET, NO_GETS, NO_PUT, /* 32 bit data */
NO_GET, NO_GETS, NO_PUT, /* 16 bit data */
NO_GET, NO_GETS, NO_PUT, /* 64 bit hdrs */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */
{ /* bfd_check_format */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
sco5_core_file_p /* a core file */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
sco5_core_file_p /* a core file */
},
{ /* bfd_set_format */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
{ /* bfd_write_contents */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
@ -413,4 +417,4 @@ const bfd_target sco5_core_vec =
NULL,
(PTR) 0 /* backend_data */
};
};

View File

@ -203,9 +203,9 @@ DESCRIPTION
. {* Entries for byte swapping for data. These are different from the
. other entry points, since they don't take a BFD asthe first argument.
. Certain other handlers could do the same. *}
. bfd_vma (*bfd_getx64) (const void *);
. bfd_signed_vma (*bfd_getx_signed_64) (const void *);
. void (*bfd_putx64) (bfd_vma, void *);
. bfd_uint64_t (*bfd_getx64) (const void *);
. bfd_int64_t (*bfd_getx_signed_64) (const void *);
. void (*bfd_putx64) (bfd_uint64_t, void *);
. bfd_vma (*bfd_getx32) (const void *);
. bfd_signed_vma (*bfd_getx_signed_32) (const void *);
. void (*bfd_putx32) (bfd_vma, void *);
@ -214,9 +214,9 @@ DESCRIPTION
. void (*bfd_putx16) (bfd_vma, void *);
.
. {* Byte swapping for the headers. *}
. bfd_vma (*bfd_h_getx64) (const void *);
. bfd_signed_vma (*bfd_h_getx_signed_64) (const void *);
. void (*bfd_h_putx64) (bfd_vma, void *);
. bfd_uint64_t (*bfd_h_getx64) (const void *);
. bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
. void (*bfd_h_putx64) (bfd_uint64_t, void *);
. bfd_vma (*bfd_h_getx32) (const void *);
. bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
. void (*bfd_h_putx32) (bfd_vma, void *);

View File

@ -272,9 +272,13 @@ swap_abort ()
{
abort (); /* This way doesn't require any declaration for ANSI to fuck up */
}
#define NO_GET ((bfd_vma (*) (const void *)) swap_abort)
#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort)
#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
const bfd_target trad_core_vec =
{
@ -289,39 +293,39 @@ const bfd_target trad_core_vec =
0, /* symbol prefix */
' ', /* ar_pad_char */
16, /* ar_max_namelen */
NO_GET, NO_GETS, NO_PUT, /* 64 bit data */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */
NO_GET, NO_GETS, NO_PUT, /* 32 bit data */
NO_GET, NO_GETS, NO_PUT, /* 16 bit data */
NO_GET, NO_GETS, NO_PUT, /* 64 bit hdrs */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */
NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */
{ /* bfd_check_format */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
trad_unix_core_file_p /* a core file */
_bfd_dummy_target, /* unknown format */
_bfd_dummy_target, /* object file */
_bfd_dummy_target, /* archive */
trad_unix_core_file_p /* a core file */
},
{ /* bfd_set_format */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
{ /* bfd_write_contents */
bfd_false, bfd_false,
bfd_false, bfd_false
bfd_false, bfd_false,
bfd_false, bfd_false
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (trad_unix),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (_bfd_generic),
BFD_JUMP_TABLE_LINK (_bfd_nolink),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (trad_unix),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (_bfd_generic),
BFD_JUMP_TABLE_LINK (_bfd_nolink),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
(PTR) 0 /* backend_data */
};
};