0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

output: centralize the null definition of ofmt->segbase

Only two output formats (obj and ieee) actually need ofmt->segbase, so
move the common dummy definion into nullout.c.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin
2018-06-14 22:41:00 -07:00
parent e803010163
commit 0125c446dd
10 changed files with 22 additions and 56 deletions

View File

@@ -1373,11 +1373,6 @@ bin_directive(enum directive directive, char *args, int pass)
}
}
static int32_t bin_segbase(int32_t segment)
{
return segment;
}
const struct ofmt of_bin, of_ith, of_srec;
static void binfmt_init(void);
static void do_output_bin(void);
@@ -1645,7 +1640,7 @@ const struct ofmt of_bin = {
bin_secname,
NULL,
bin_sectalign,
bin_segbase,
null_segbase,
bin_directive,
bin_cleanup,
NULL /* pragma list */
@@ -1668,7 +1663,7 @@ const struct ofmt of_ith = {
bin_secname,
NULL,
bin_sectalign,
bin_segbase,
null_segbase,
bin_directive,
bin_cleanup,
NULL /* pragma list */
@@ -1691,7 +1686,7 @@ const struct ofmt of_srec = {
bin_secname,
NULL,
bin_sectalign,
bin_segbase,
null_segbase,
bin_directive,
bin_cleanup,
NULL /* pragma list */