aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-05-27 15:28:34 +0930
committerAlan Modra <amodra@gmail.com>2022-05-27 22:08:59 +0930
commit601598589589734c21bacfc00cd4aed4f3fd1a1f (patch)
tree0aa92f84b76198ccaa2ba47b2ad647b920639289 /gas
parent65d13793d9ea142bc4383216e375b24cfa654751 (diff)
downloadgdb-601598589589734c21bacfc00cd4aed4f3fd1a1f.zip
gdb-601598589589734c21bacfc00cd4aed4f3fd1a1f.tar.gz
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 'gas')
-rw-r--r--gas/symbols.c8
-rw-r--r--gas/write.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/gas/symbols.c b/gas/symbols.c
index fb480be..e3fddee 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -3023,7 +3023,7 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
if (!name || !name[0])
name = "(unnamed)";
fprintf (file, "sym ");
- fprintf_vma (file, (bfd_vma) ((bfd_hostptr_t) sym));
+ fprintf_vma (file, (bfd_vma) (uintptr_t) sym);
fprintf (file, " %s", name);
if (sym->flags.local_symbol)
@@ -3034,7 +3034,7 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
&& locsym->frag != NULL)
{
fprintf (file, " frag ");
- fprintf_vma (file, (bfd_vma) ((bfd_hostptr_t) locsym->frag));
+ fprintf_vma (file, (bfd_vma) (uintptr_t) locsym->frag);
}
if (locsym->flags.resolved)
fprintf (file, " resolved");
@@ -3045,7 +3045,7 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
if (sym->frag != &zero_address_frag)
{
fprintf (file, " frag ");
- fprintf_vma (file, (bfd_vma) ((bfd_hostptr_t) sym->frag));
+ fprintf_vma (file, (bfd_vma) (uintptr_t) sym->frag);
}
if (sym->flags.written)
fprintf (file, " written");
@@ -3121,7 +3121,7 @@ void
print_expr_1 (FILE *file, expressionS *exp)
{
fprintf (file, "expr ");
- fprintf_vma (file, (bfd_vma) ((bfd_hostptr_t) exp));
+ fprintf_vma (file, (bfd_vma) (uintptr_t) exp);
fprintf (file, " ");
switch (exp->X_op)
{
diff --git a/gas/write.c b/gas/write.c
index f607562..20f5ce2 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -3212,7 +3212,7 @@ print_fixup (fixS *fixp)
{
indent_level = 1;
fprintf (stderr, "fix ");
- fprintf_vma (stderr, (bfd_vma)((bfd_hostptr_t) fixp));
+ fprintf_vma (stderr, (bfd_vma) (uintptr_t) fixp);
fprintf (stderr, " %s:%d",fixp->fx_file, fixp->fx_line);
if (fixp->fx_pcrel)
fprintf (stderr, " pcrel");
@@ -3223,7 +3223,7 @@ print_fixup (fixS *fixp)
if (fixp->fx_done)
fprintf (stderr, " done");
fprintf (stderr, "\n size=%d frag=", fixp->fx_size);
- fprintf_vma (stderr, (bfd_vma) ((bfd_hostptr_t) fixp->fx_frag));
+ fprintf_vma (stderr, (bfd_vma) (uintptr_t) fixp->fx_frag);
fprintf (stderr, " where=%ld offset=%lx addnumber=%lx",
(long) fixp->fx_where,
(unsigned long) fixp->fx_offset,