diff options
author | Alan Modra <amodra@gmail.com> | 2022-05-27 15:28:34 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-05-27 22:08:59 +0930 |
commit | 601598589589734c21bacfc00cd4aed4f3fd1a1f (patch) | |
tree | 0aa92f84b76198ccaa2ba47b2ad647b920639289 /bfd/elflink.c | |
parent | 65d13793d9ea142bc4383216e375b24cfa654751 (diff) | |
download | fsf-binutils-gdb-601598589589734c21bacfc00cd4aed4f3fd1a1f.zip fsf-binutils-gdb-601598589589734c21bacfc00cd4aed4f3fd1a1f.tar.gz fsf-binutils-gdb-601598589589734c21bacfc00cd4aed4f3fd1a1f.tar.bz2 |
Replace bfd_hostptr_t with uintptr_t
bfd_hostptr_t is defined as a type large enough to hold either a long
or a pointer. It mostly appears in the coff backend code in casts.
include/coff/internal.h struct internal_syment and union
internal_auxent have the only uses in data structures, where
comparison with include/coff/external.h and other code reveals that
the type only needs to be large enough for a 32-bit integer or a
pointer. That should mean replacing with uintptr_t is OK.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index fc3a335..e4f6df4 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -8372,8 +8372,7 @@ elf_create_symbuf (size_t symcount, Elf_Internal_Sym *isymbuf) ssymhead->count++; } BFD_ASSERT ((size_t) (ssymhead - ssymbuf) == shndx_count - && (((bfd_hostptr_t) ssym - (bfd_hostptr_t) ssymbuf) - == total_size)); + && (uintptr_t) ssym - (uintptr_t) ssymbuf == total_size); free (indbuf); return ssymbuf; |