From 601598589589734c21bacfc00cd4aed4f3fd1a1f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 27 May 2022 15:28:34 +0930 Subject: 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. --- include/coff/internal.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/coff/internal.h b/include/coff/internal.h index 4d2046e..4e03191 100644 --- a/include/coff/internal.h +++ b/include/coff/internal.h @@ -469,8 +469,8 @@ struct internal_syment char _n_name[SYMNMLEN] ATTRIBUTE_NONSTRING; /* old COFF version */ struct { - bfd_hostptr_t _n_zeroes; /* new == 0 */ - bfd_hostptr_t _n_offset; /* offset into string table */ + uintptr_t _n_zeroes; /* new == 0 */ + uintptr_t _n_offset; /* offset into string table */ } _n_n; char *_n_nptr[2]; /* allows for overlaying */ } _n; @@ -595,11 +595,11 @@ union internal_auxent char x_fname[20]; struct { - /* PR 28630: We use bfd_hostptr_t because these fields may be + /* PR 28630: We use uintptr_t because these fields may be used to hold pointers. We assume that this type is at least - as big as the long type. */ - bfd_hostptr_t x_zeroes; - bfd_hostptr_t x_offset; + 32 bits. */ + uintptr_t x_zeroes; + uintptr_t x_offset; } x_n; } x_n; -- cgit v1.1