From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-02-12 11:15:17
|
Commit-ID: 09b56b421a01863679a9c43e94cc5a675b9add81 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=09b56b421a01863679a9c43e94cc5a675b9add81 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Fri, 12 Feb 2016 03:13:00 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Fri, 12 Feb 2016 03:13:00 -0800 outmac: move the format definitions down to the format-specific code Move the format definitions down the to where the format-specific initialization code lives. Signed-off-by: H. Peter Anvin <hp...@zy...> --- output/outmac.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/output/outmac.c b/output/outmac.c index 75a7838..1df45a3 100644 --- a/output/outmac.c +++ b/output/outmac.c @@ -100,28 +100,6 @@ struct macho_fmt { uint32_t nlist_size; /* Nlist (symbol) size */ }; -static const struct macho_fmt macho32_fmt = { - 4, - MH_MAGIC, - CPU_TYPE_I386, - LC_SEGMENT, - MACHO_HEADER_SIZE, - MACHO_SEGCMD_SIZE, - MACHO_SECTCMD_SIZE, - MACHO_NLIST_SIZE -}; - -static const struct macho_fmt macho64_fmt = { - 8, - MH_MAGIC_64, - CPU_TYPE_X86_64, - LC_SEGMENT_64, - MACHO_HEADER64_SIZE, - MACHO_SEGCMD64_SIZE, - MACHO_SECTCMD64_SIZE, - MACHO_NLIST64_SIZE -}; - static const struct macho_fmt *fmt; static void fwriteptr(uint64_t data, FILE * fp) @@ -1512,6 +1490,17 @@ static void debug_section_relocs (struct section *s) } #ifdef OF_MACHO32 +static const struct macho_fmt macho32_fmt = { + 4, + MH_MAGIC, + CPU_TYPE_I386, + LC_SEGMENT, + MACHO_HEADER_SIZE, + MACHO_SEGCMD_SIZE, + MACHO_SECTCMD_SIZE, + MACHO_NLIST_SIZE +}; + static void macho32_init(void) { fmt = &macho32_fmt; @@ -1542,6 +1531,17 @@ struct ofmt of_macho32 = { #endif #ifdef OF_MACHO64 +static const struct macho_fmt macho64_fmt = { + 8, + MH_MAGIC_64, + CPU_TYPE_X86_64, + LC_SEGMENT_64, + MACHO_HEADER64_SIZE, + MACHO_SEGCMD64_SIZE, + MACHO_SECTCMD64_SIZE, + MACHO_NLIST64_SIZE +}; + static void macho64_init(void) { fmt = &macho64_fmt; |