diff --git a/tools/format.c b/tools/format.c index 143b44b..79b4a02 100644 --- a/tools/format.c +++ b/tools/format.c @@ -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; } } diff --git a/tools/format/mbr.c b/tools/format/mbr.c new file mode 100644 index 0000000..ca3e1cb --- /dev/null +++ b/tools/format/mbr.c @@ -0,0 +1,19 @@ +/* $Id$ */ +/* Copyright (c) 2015 Pierre Pronchery */ +/* 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 . */ + + + +#define format_plugin format_plugin_mbr +#include "../src/format/mbr.c" diff --git a/tools/project.conf b/tools/project.conf index 86c471b..22e67f7 100644 --- a/tools/project.conf +++ b/tools/project.conf @@ -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]