aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-04-16 11:10:44 +0930
committerAlan Modra <amodra@gmail.com>2019-04-16 17:13:04 +0930
commit90bd3c903fe76a8a3a5ced98c76e4366c5a0948f (patch)
tree883b93e7f2f76a5fdd2e8eabe16e3a5ae831dc4f /gas/write.c
parent871a6bd2d852b0fb677386e1be78c3f4c6939b48 (diff)
downloadgdb-90bd3c903fe76a8a3a5ced98c76e4366c5a0948f.zip
gdb-90bd3c903fe76a8a3a5ced98c76e4366c5a0948f.tar.gz
gdb-90bd3c903fe76a8a3a5ced98c76e4366c5a0948f.tar.bz2
Make fixup fx_where unsigned
Another field that only stores unsigned values. * write.h (struct fix <fx_where>): Make unsigned. (fix_new, fix_at_start, fix_new_exp): Adjust prototypes. * write.c (fix_new, fix_new_exp, fix_at_start): Make "where" and "size" parameters unsigned long. (fix_new_internal): Likewise. Adjust error format string to suit. * config/tc-mips.c (md_convert_frag): Remove cast of fx_where. * config/tc-sparc.c (md_apply_fix): Likewise. * config/tc-score.c (s3_convert_frag): Adjust for unsigned fx_where. * config/tc-score7.c (s7_convert_frag): Likewise.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gas/write.c b/gas/write.c
index 2c4305e..91767fb 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -143,8 +143,8 @@ static int n_fixups;
static fixS *
fix_new_internal (fragS *frag, /* Which frag? */
- int where, /* Where in that frag? */
- int size, /* 1, 2, or 4 usually. */
+ unsigned long where, /* Where in that frag? */
+ unsigned long size, /* 1, 2, or 4 usually. */
symbolS *add_symbol, /* X_add_symbol. */
symbolS *sub_symbol, /* X_op_symbol. */
offsetT offset, /* X_add_number. */
@@ -164,7 +164,7 @@ fix_new_internal (fragS *frag, /* Which frag? */
/* We've made fx_size a narrow field; check that it's wide enough. */
if (fixP->fx_size != size)
{
- as_bad (_("field fx_size too small to hold %d"), size);
+ as_bad (_("field fx_size too small to hold %lu"), size);
abort ();
}
fixP->fx_addsy = add_symbol;
@@ -228,10 +228,10 @@ fix_new_internal (fragS *frag, /* Which frag? */
/* Create a fixup relative to a symbol (plus a constant). */
fixS *
-fix_new (fragS *frag, /* Which frag? */
- int where, /* Where in that frag? */
- int size, /* 1, 2, or 4 usually. */
- symbolS *add_symbol, /* X_add_symbol. */
+fix_new (fragS *frag, /* Which frag? */
+ unsigned long where, /* Where in that frag? */
+ unsigned long size, /* 1, 2, or 4 usually. */
+ symbolS *add_symbol, /* X_add_symbol. */
offsetT offset, /* X_add_number. */
int pcrel, /* TRUE if PC-relative relocation. */
RELOC_ENUM r_type /* Relocation type. */)
@@ -246,8 +246,8 @@ fix_new (fragS *frag, /* Which frag? */
fixS *
fix_new_exp (fragS *frag, /* Which frag? */
- int where, /* Where in that frag? */
- int size, /* 1, 2, or 4 usually. */
+ unsigned long where, /* Where in that frag? */
+ unsigned long size, /* 1, 2, or 4 usually. */
expressionS *exp, /* Expression. */
int pcrel, /* TRUE if PC-relative relocation. */
RELOC_ENUM r_type /* Relocation type. */)
@@ -313,7 +313,7 @@ fix_new_exp (fragS *frag, /* Which frag? */
as for fix_new, except that WHERE is implicitly 0. */
fixS *
-fix_at_start (fragS *frag, int size, symbolS *add_symbol,
+fix_at_start (fragS *frag, unsigned long size, symbolS *add_symbol,
offsetT offset, int pcrel, RELOC_ENUM r_type)
{
return fix_new_internal (frag, 0, size, add_symbol,