diff --git a/output/nullout.c b/output/nullout.c index daf24f53..ad451e8b 100644 --- a/output/nullout.c +++ b/output/nullout.c @@ -54,3 +54,8 @@ void null_reset(void) { /* Nothing to do */ } + +int32_t null_segbase(int32_t segment) +{ + return segment; +} diff --git a/output/outaout.c b/output/outaout.c index ba2dbd5e..a662994e 100644 --- a/output/outaout.c +++ b/output/outaout.c @@ -889,11 +889,6 @@ static void aout_sect_write(struct Section *sect, sect->len += len; } -static int32_t aout_segbase(int32_t segment) -{ - return segment; -} - extern macros_t aout_stdmac[]; #endif /* OF_AOUT || OF_AOUTB */ @@ -917,7 +912,7 @@ const struct ofmt of_aout = { aout_section_names, NULL, null_sectalign, - aout_segbase, + null_segbase, null_directive, aout_cleanup, NULL /* pragma list */ @@ -944,7 +939,7 @@ const struct ofmt of_aoutb = { aout_section_names, NULL, null_sectalign, - aout_segbase, + null_segbase, null_directive, aout_cleanup, NULL /* pragma list */ diff --git a/output/outas86.c b/output/outas86.c index 3f9867b9..a72f37aa 100644 --- a/output/outas86.c +++ b/output/outas86.c @@ -605,11 +605,6 @@ static void as86_sect_write(struct Section *sect, sect->datalen += len; } -static int32_t as86_segbase(int32_t segment) -{ - return segment; -} - extern macros_t as86_stdmac[]; const struct ofmt of_as86 = { @@ -629,7 +624,7 @@ const struct ofmt of_as86 = { as86_section_names, NULL, null_sectalign, - as86_segbase, + null_segbase, null_directive, as86_cleanup, NULL /* pragma list */ diff --git a/output/outbin.c b/output/outbin.c index 28535f99..8c1cf0a7 100644 --- a/output/outbin.c +++ b/output/outbin.c @@ -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 */ diff --git a/output/outcoff.c b/output/outcoff.c index a2fd302c..58659e06 100644 --- a/output/outcoff.c +++ b/output/outcoff.c @@ -1135,11 +1135,6 @@ static void coff_sectalign(int32_t seg, unsigned int value) s->flags = (s->flags & ~IMAGE_SCN_ALIGN_MASK) | value; } -static int32_t coff_segbase(int32_t segment) -{ - return segment; -} - extern macros_t coff_stdmac[]; #endif /* defined(OF_COFF) || defined(OF_WIN32) */ @@ -1163,7 +1158,7 @@ const struct ofmt of_coff = { coff_section_names, NULL, coff_sectalign, - coff_segbase, + null_segbase, coff_directives, coff_cleanup, NULL /* pragma list */ @@ -1194,7 +1189,7 @@ const struct ofmt of_win32 = { coff_section_names, NULL, coff_sectalign, - coff_segbase, + null_segbase, coff_directives, coff_cleanup, NULL /* pragma list */ @@ -1223,7 +1218,7 @@ const struct ofmt of_win64 = { coff_section_names, NULL, coff_sectalign, - coff_segbase, + null_segbase, coff_directives, coff_cleanup, NULL /* pragma list */ diff --git a/output/outdbg.c b/output/outdbg.c index 84cccf73..70f8e375 100644 --- a/output/outdbg.c +++ b/output/outdbg.c @@ -318,11 +318,6 @@ static void dbg_sectalign(int32_t seg, unsigned int value) seg, value); } -static int32_t dbg_segbase(int32_t segment) -{ - return segment; -} - static enum directive_result dbg_directive(enum directive directive, char *value, int pass) { @@ -480,7 +475,7 @@ const struct ofmt of_dbg = { dbg_section_names, dbg_herelabel, dbg_sectalign, - dbg_segbase, + null_segbase, dbg_directive, dbg_cleanup, dbg_pragma_list diff --git a/output/outelf.c b/output/outelf.c index a32e1335..492ee22f 100644 --- a/output/outelf.c +++ b/output/outelf.c @@ -2220,11 +2220,6 @@ static void elf_sectalign(int32_t seg, unsigned int value) s->align = value; } -static int32_t elf_segbase(int32_t segment) -{ - return segment; -} - extern macros_t elf_stdmac[]; /* Claim "elf" as a pragma namespace, for the future */ @@ -2281,7 +2276,7 @@ const struct ofmt of_elf32 = { elf_section_names, NULL, elf_sectalign, - elf_segbase, + null_segbase, elf_directive, elf_cleanup, elf_pragma_list, @@ -2333,7 +2328,7 @@ const struct ofmt of_elf64 = { elf_section_names, NULL, elf_sectalign, - elf_segbase, + null_segbase, elf_directive, elf_cleanup, elf_pragma_list, @@ -2385,7 +2380,7 @@ const struct ofmt of_elfx32 = { elf_section_names, NULL, elf_sectalign, - elf_segbase, + null_segbase, elf_directive, elf_cleanup, NULL /* pragma list */ diff --git a/output/outlib.h b/output/outlib.h index 664ca389..6dc7bdad 100644 --- a/output/outlib.h +++ b/output/outlib.h @@ -44,6 +44,7 @@ enum directive_result null_directive(enum directive directive, char *value, int pass); void null_sectalign(int32_t seg, unsigned int value); void null_reset(void); +int32_t null_segbase(int32_t seg); /* Do-nothing versions of all the debug routines */ void null_debug_init(void); diff --git a/output/outmacho.c b/output/outmacho.c index 9f937c90..207fa90e 100644 --- a/output/outmacho.c +++ b/output/outmacho.c @@ -1191,11 +1191,6 @@ static void macho_sectalign(int32_t seg, unsigned int value) s->align = align; } -static int32_t macho_segbase(int32_t section) -{ - return section; -} - extern macros_t macho_stdmac[]; /* Comparison function for qsort symbol layout. */ @@ -2394,7 +2389,7 @@ const struct ofmt of_macho32 = { macho_section, macho_herelabel, macho_sectalign, - macho_segbase, + null_segbase, null_directive, macho_cleanup, macho_pragma_list @@ -2461,7 +2456,7 @@ const struct ofmt of_macho64 = { macho_section, macho_herelabel, macho_sectalign, - macho_segbase, + null_segbase, null_directive, macho_cleanup, macho_pragma_list, diff --git a/output/outrdf2.c b/output/outrdf2.c index 9af827cb..4e161a03 100644 --- a/output/outrdf2.c +++ b/output/outrdf2.c @@ -712,11 +712,6 @@ static void rdf2_cleanup(void) fwriteint16_t(0, ofile); } -static int32_t rdf2_segbase(int32_t segment) -{ - return segment; -} - /* * Handle RDOFF2 specific directives */ @@ -779,7 +774,7 @@ const struct ofmt of_rdf2 = { rdf2_section_names, NULL, null_sectalign, - rdf2_segbase, + null_segbase, rdf2_directive, rdf2_cleanup, NULL /* pragma list */