Register the "mbr" file format in the static tools

This commit is contained in:
Pierre Pronchery 2015-09-05 15:54:21 +02:00
parent a4e292443e
commit 92d8eafc09
3 changed files with 24 additions and 2 deletions

View File

@ -25,6 +25,7 @@ extern AsmFormatPluginDefinition format_plugin_dex;
extern AsmFormatPluginDefinition format_plugin_elf;
extern AsmFormatPluginDefinition format_plugin_flat;
extern AsmFormatPluginDefinition format_plugin_java;
extern AsmFormatPluginDefinition format_plugin_mbr;
extern AsmFormatPluginDefinition format_plugin_pe;
static struct
@ -37,6 +38,7 @@ static struct
{ "elf", NULL },
{ "flat", NULL },
{ "java", NULL },
{ "mbr", NULL },
{ "pe", NULL }
};
@ -135,6 +137,7 @@ static void _format_init(void)
_formats[1].definition = &format_plugin_elf;
_formats[2].definition = &format_plugin_flat;
_formats[3].definition = &format_plugin_java;
_formats[4].definition = &format_plugin_pe;
_formats[4].definition = &format_plugin_mbr;
_formats[5].definition = &format_plugin_pe;
}
}

19
tools/format/mbr.c Normal file
View File

@ -0,0 +1,19 @@
/* $Id$ */
/* Copyright (c) 2015 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS Devel Asm */
/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define format_plugin format_plugin_mbr
#include "../src/format/mbr.c"

View File

@ -7,7 +7,7 @@ dist=Makefile
[libAsm]
type=library
sources=arch.c,arch/amd64.c,arch/arm.c,arch/armeb.c,arch/armel.c,arch/dalvik.c,arch/i386.c,arch/i386_real.c,arch/i486.c,arch/i586.c,arch/i686.c,arch/java.c,arch/mips.c,arch/mipseb.c,arch/mipsel.c,arch/sparc.c,arch/sparc64.c,arch/template.c,arch/yasep.c,arch/yasep16.c,arch/yasep32.c,format.c,format/dex.c,format/elf.c,format/elf/elf32.c,format/elf/elf64.c,format/flat.c,format/java.c,format/pe.c,asm.c,code.c,parser.c,token.c
sources=arch.c,arch/amd64.c,arch/arm.c,arch/armeb.c,arch/armel.c,arch/dalvik.c,arch/i386.c,arch/i386_real.c,arch/i486.c,arch/i586.c,arch/i686.c,arch/java.c,arch/mips.c,arch/mipseb.c,arch/mipsel.c,arch/sparc.c,arch/sparc64.c,arch/template.c,arch/yasep.c,arch/yasep16.c,arch/yasep32.c,format.c,format/dex.c,format/elf.c,format/elf/elf32.c,format/elf/elf64.c,format/flat.c,format/java.c,format/mbr.c,format/pe.c,asm.c,code.c,parser.c,token.c
cflags=-fPIC
[arch.c]