diff options
author | Ian Lance Taylor <ian@airs.com> | 1998-12-06 22:14:30 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1998-12-06 22:14:30 +0000 |
commit | 859a615e589069b5f8dcdfa29f869a30102b3254 (patch) | |
tree | a8d58e338836e8783637ce901fa5cef743c4c1be /bfd | |
parent | fa06287137f04f68eb864d8347cf23366b12f87d (diff) | |
download | gdb-859a615e589069b5f8dcdfa29f869a30102b3254.zip gdb-859a615e589069b5f8dcdfa29f869a30102b3254.tar.gz gdb-859a615e589069b5f8dcdfa29f869a30102b3254.tar.bz2 |
* bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if
possible, rather than only if BFD64.
* elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT,
not __GNUC__.
* bfd-in2.h: Rebuild.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 26 | ||||
-rw-r--r-- | bfd/elflink.h | 13 |
3 files changed, 27 insertions, 18 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 091f6d5..07f7b50 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ Sun Dec 6 16:30:33 1998 Ian Lance Taylor <ian@cygnus.com> + * bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if + possible, rather than only if BFD64. + * elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT, + not __GNUC__. + * bfd-in2.h: Rebuild. + * srec.c (srec_set_section_contents): Correct test to avoid switching to 4 byte addresses after seeing a second section which requires 3 byte addresses. From Joel Schantz diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 36eccc1..b829418 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -121,20 +121,24 @@ typedef long int file_ptr; use gcc's "long long" type. 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 +# ifdef __GNUC__ +# if __GNUC__ >= 2 +# define BFD_HOST_64_BIT long long +# define BFD_HOST_U_64_BIT unsigned long long +# endif /* __GNUC__ >= 2 */ +# endif /* ! defined (__GNUC__) */ +# endif /* ! BFD_HOST_64BIT_LONG */ +#endif /* ! defined (BFD_HOST_64_BIT) */ + #ifdef BFD64 #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 -#ifdef __GNUC__ -#define BFD_HOST_64_BIT long long -#define BFD_HOST_U_64_BIT unsigned long long -#else /* ! defined (__GNUC__) */ #error No 64 bit integer type available -#endif /* ! defined (__GNUC__) */ -#endif /* ! BFD_HOST_64BIT_LONG */ #endif /* ! defined (BFD_HOST_64_BIT) */ typedef BFD_HOST_U_64_BIT bfd_vma; @@ -175,7 +179,9 @@ typedef unsigned long bfd_size_type; /* Print a bfd_vma x on stream s. */ #define fprintf_vma(s,x) fprintf(s, "%08lx", x) #define sprintf_vma(s,x) sprintf(s, "%08lx", x) + #endif /* not BFD64 */ + #define printf_vma(x) fprintf_vma(stdout,x) typedef unsigned int flagword; /* 32 bits of flags */ diff --git a/bfd/elflink.h b/bfd/elflink.h index 841a8e7..decfba2 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -2240,13 +2240,10 @@ compute_bucket_count (info) elf_link_hash_traverse (elf_hash_table (info), elf_collect_hash_codes, &hashcodesp); -/* We have a problem here. The following code to optimize the table size - requires an integer type with more the 32 bits. If BFD_HOST_U_64_BIT - is set or GCC 2 is used we know about such a type. */ -#if defined BFD_HOST_U_64_BIT || __GNUC__ >= 2 -# ifndef BFD_HOST_U_64_BIT -# define BFD_HOST_U_64_BIT unsigned long long int -# endif +/* We have a problem here. The following code to optimize the table + size requires an integer type with more the 32 bits. If + BFD_HOST_U_64_BIT is set we know about such a type. */ +#ifdef BFD_HOST_U_64_BIT if (info->optimize == true) { unsigned long int nsyms = hashcodesp - hashcodes; @@ -2336,7 +2333,7 @@ compute_bucket_count (info) free (counts); } else -#endif +#endif /* defined (BFD_HOST_U_64_BIT) */ { /* This is the fallback solution if no 64bit type is available or if we are not supposed to spend much time on optimizations. We select the |