diff --git a/src/format/elf.c b/src/format/elf.c index 6f5ad8c..9c00c95 100644 --- a/src/format/elf.c +++ b/src/format/elf.c @@ -23,7 +23,7 @@ #include #include #include "elf/common.h" -#include "elf/format.h" +#include "elf/elf.h" /* ELF */ diff --git a/src/format/elf/format.c b/src/format/elf/elf.c similarity index 100% rename from src/format/elf/format.c rename to src/format/elf/elf.c diff --git a/src/format/elf/elf.h b/src/format/elf/elf.h new file mode 100644 index 0000000..4f2a1ee --- /dev/null +++ b/src/format/elf/elf.h @@ -0,0 +1,38 @@ +/* $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 . */ + + +#ifndef ASM_FORMAT_ELF_FORMAT_H +# define ASM_FORMAT_ELF_FORMAT_H + +# include "common.h" + + +/* functions */ +/* ELF32 */ +int elf32_init(AsmFormatPlugin * format); +int elf32_destroy(AsmFormatPlugin * format); +int elf32_section(AsmFormatPlugin * format, char const * name); +char const * elf32_detect(AsmFormatPlugin * format, Elf32_Ehdr * ehdr); +int elf32_decode(AsmFormatPlugin * format, int raw); + +/* ELF64 */ +int elf64_init(AsmFormatPlugin * format); +int elf64_destroy(AsmFormatPlugin * format); +int elf64_section(AsmFormatPlugin * format, char const * name); +char const * elf64_detect(AsmFormatPlugin * format, Elf64_Ehdr * ehdr); +int elf64_decode(AsmFormatPlugin * format, int raw); + +#endif diff --git a/src/format/elf/elf32.c b/src/format/elf/elf32.c index 990b3ab..21b5f5c 100644 --- a/src/format/elf/elf32.c +++ b/src/format/elf/elf32.c @@ -17,9 +17,9 @@ #include #define ELFSIZE 32 -#include "format.h" +#include "elf.h" -#include "format.c" +#include "elf.c" /* ELF32 */ diff --git a/src/format/elf/elf64.c b/src/format/elf/elf64.c index 2231240..e5e548d 100644 --- a/src/format/elf/elf64.c +++ b/src/format/elf/elf64.c @@ -17,9 +17,9 @@ #include #define ELFSIZE 64 -#include "format.h" +#include "elf.h" -#include "format.c" +#include "elf.c" /* ELF64 */ diff --git a/src/format/project.conf b/src/format/project.conf index ab9b0aa..687c511 100644 --- a/src/format/project.conf +++ b/src/format/project.conf @@ -3,7 +3,7 @@ cppflags_force=-I ../../include cflags_force=-W `pkg-config --cflags libSystem` cflags=-Wall -g -O2 -fPIC -pedantic ldflags_force=-W `pkg-config --libs libSystem` -dist=Makefile,elf/common.h,elf/format.h,elf/format.c +dist=Makefile,elf/common.h,elf/elf.h,elf/elf.c [dex] type=plugin @@ -22,10 +22,10 @@ depends=elf/common.h depends=elf/common.h [elf/elf32.c] -depends=elf/common.h,elf/format.h,elf/format.c +depends=elf/common.h,elf/elf.h,elf/elf.c [elf/elf64.c] -depends=elf/common.h,elf/format.h,elf/format.c +depends=elf/common.h,elf/elf.h,elf/elf.c [flat] type=plugin