diff --git a/libyasm/arch.h b/libyasm/arch.h index ece57e1b..48f04aad 100644 --- a/libyasm/arch.h +++ b/libyasm/arch.h @@ -40,9 +40,9 @@ struct arch { void (*bc_print) (FILE *f, const bytecode *bc); /* See bytecode.h comments on bc_calc_len() */ - int (*bc_calc_len) (bytecode *bc, /*@only@*/ /*@null@*/ - intnum *(*resolve_label) (section *sect, /*@null@*/ - bytecode *bc)); + unsigned long (*bc_calc_len) (bytecode *bc, /*@only@*/ /*@null@*/ + intnum *(*resolve_label) (section *sect, + /*@null@*/ bytecode *bc)); } bc; }; diff --git a/libyasm/bytecode.c b/libyasm/bytecode.c index c35a71d6..225966ca 100644 --- a/libyasm/bytecode.c +++ b/libyasm/bytecode.c @@ -307,7 +307,7 @@ bc_print(FILE *f, const bytecode *bc) fprintf(f, "%*sOffset=%lx\n", indent_level, "", bc->offset); } -int +unsigned long bc_calc_len(bytecode *bc, intnum *(*resolve_label) (section *sect, /*@null@*/ bytecode *bc)) { diff --git a/libyasm/bytecode.h b/libyasm/bytecode.h index e8607c12..3cb06718 100644 --- a/libyasm/bytecode.h +++ b/libyasm/bytecode.h @@ -63,9 +63,9 @@ void bc_print(FILE *f, const bytecode *bc); * resolve_label is the function used to determine the value (offset) of a * in-file label (eg, not an EXTERN variable, which is indeterminate). */ -int bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/ - intnum *(*resolve_label) (section *sect, - /*@null@*/ bytecode *bc)); +unsigned long bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/ + intnum *(*resolve_label) (section *sect, + /*@null@*/ bytecode *bc)); /* void bcs_initialize(bytecodehead *headp); */ #define bcs_initialize(headp) STAILQ_INIT(headp) diff --git a/modules/arch/x86/x86-int.h b/modules/arch/x86/x86-int.h index a75c9995..f8d79ed5 100644 --- a/modules/arch/x86/x86-int.h +++ b/modules/arch/x86/x86-int.h @@ -96,9 +96,9 @@ typedef struct x86_jmprel { void x86_bc_delete(bytecode *bc); void x86_bc_print(FILE *f, const bytecode *bc); -int x86_bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/ - intnum *(*resolve_label) (section *sect, - /*@null@*/ bytecode *bc)); +unsigned long x86_bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/ + intnum *(*resolve_label) (section *sect, + /*@null@*/ bytecode *bc)); int x86_expr_checkea(expr **ep, unsigned char *addrsize, unsigned char bits, unsigned char nosplit, unsigned char *displen, diff --git a/modules/arch/x86/x86bc.c b/modules/arch/x86/x86bc.c index a4237713..2f1602da 100644 --- a/modules/arch/x86/x86bc.c +++ b/modules/arch/x86/x86bc.c @@ -460,7 +460,7 @@ x86_bc_print(FILE *f, const bytecode *bc) } } -static int +static unsigned long x86_bc_calc_len_insn(x86_insn *insn, /*@only@*/ /*@null@*/ intnum *(*resolve_label) (section *sect, /*@null@*/ bytecode *bc)) @@ -518,7 +518,7 @@ x86_bc_calc_len_insn(x86_insn *insn, /*@only@*/ /*@null@*/ return 0; } -int +unsigned long x86_bc_calc_len(bytecode *bc, intnum *(*resolve_label) (section *sect, /*@null@*/ bytecode *bc)) diff --git a/src/arch.h b/src/arch.h index ece57e1b..48f04aad 100644 --- a/src/arch.h +++ b/src/arch.h @@ -40,9 +40,9 @@ struct arch { void (*bc_print) (FILE *f, const bytecode *bc); /* See bytecode.h comments on bc_calc_len() */ - int (*bc_calc_len) (bytecode *bc, /*@only@*/ /*@null@*/ - intnum *(*resolve_label) (section *sect, /*@null@*/ - bytecode *bc)); + unsigned long (*bc_calc_len) (bytecode *bc, /*@only@*/ /*@null@*/ + intnum *(*resolve_label) (section *sect, + /*@null@*/ bytecode *bc)); } bc; }; diff --git a/src/arch/x86/x86-int.h b/src/arch/x86/x86-int.h index a75c9995..f8d79ed5 100644 --- a/src/arch/x86/x86-int.h +++ b/src/arch/x86/x86-int.h @@ -96,9 +96,9 @@ typedef struct x86_jmprel { void x86_bc_delete(bytecode *bc); void x86_bc_print(FILE *f, const bytecode *bc); -int x86_bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/ - intnum *(*resolve_label) (section *sect, - /*@null@*/ bytecode *bc)); +unsigned long x86_bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/ + intnum *(*resolve_label) (section *sect, + /*@null@*/ bytecode *bc)); int x86_expr_checkea(expr **ep, unsigned char *addrsize, unsigned char bits, unsigned char nosplit, unsigned char *displen, diff --git a/src/arch/x86/x86bc.c b/src/arch/x86/x86bc.c index a4237713..2f1602da 100644 --- a/src/arch/x86/x86bc.c +++ b/src/arch/x86/x86bc.c @@ -460,7 +460,7 @@ x86_bc_print(FILE *f, const bytecode *bc) } } -static int +static unsigned long x86_bc_calc_len_insn(x86_insn *insn, /*@only@*/ /*@null@*/ intnum *(*resolve_label) (section *sect, /*@null@*/ bytecode *bc)) @@ -518,7 +518,7 @@ x86_bc_calc_len_insn(x86_insn *insn, /*@only@*/ /*@null@*/ return 0; } -int +unsigned long x86_bc_calc_len(bytecode *bc, intnum *(*resolve_label) (section *sect, /*@null@*/ bytecode *bc)) diff --git a/src/bytecode.c b/src/bytecode.c index c35a71d6..225966ca 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -307,7 +307,7 @@ bc_print(FILE *f, const bytecode *bc) fprintf(f, "%*sOffset=%lx\n", indent_level, "", bc->offset); } -int +unsigned long bc_calc_len(bytecode *bc, intnum *(*resolve_label) (section *sect, /*@null@*/ bytecode *bc)) { diff --git a/src/bytecode.h b/src/bytecode.h index e8607c12..3cb06718 100644 --- a/src/bytecode.h +++ b/src/bytecode.h @@ -63,9 +63,9 @@ void bc_print(FILE *f, const bytecode *bc); * resolve_label is the function used to determine the value (offset) of a * in-file label (eg, not an EXTERN variable, which is indeterminate). */ -int bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/ - intnum *(*resolve_label) (section *sect, - /*@null@*/ bytecode *bc)); +unsigned long bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/ + intnum *(*resolve_label) (section *sect, + /*@null@*/ bytecode *bc)); /* void bcs_initialize(bytecodehead *headp); */ #define bcs_initialize(headp) STAILQ_INIT(headp)