#include"../include/drd64_conf.h"
#include"../include/libgoblin.h"
#include"../include/libfiletype.h"
+#include"drd64_libgoblin_section.h"
#include"drd64_libgoblin_type.h"
#include"drd64_libgoblin_binfo.h"
#include"drd64_libgoblin_checkbin.h"
LIBGOBLIN_DEBUG_SYMINFO_EXTERN
int
LibGoblin_Debug_SymInfo_PrintWorkTable(
- LibGoblin_SymbolWork *p_symwork,
+ LibGoblin_SymbolWorkInfo *p_symwork,
DWord dw_symbols,
Byte b_level )
{
Ptr ptr_value = 0x0000000000000000;
int i_order = 0x00;
DWord dw_cnt;
- LibGoblin_SymbolWork *p_symnow;
+ LibGoblin_SymbolWorkInfo *p_symnow;
if( 0x00 < b_level )
{ puts("[DEBUG] Symbol WorkTable ---------------------------------------------"); }
LIBGOBLIN_DEBUG_SYMINFO_EXTERN
int LibGoblin_Debug_SymInfo_PrintWorkTable(
- LibGoblin_SymbolWork *p_symwork, DWord dw_symbols, Byte b_level );
+ LibGoblin_SymbolWorkInfo *p_symwork, DWord dw_symbols, Byte b_level );
#endif /* DRD64_HEADER_XXX */
Byte *pb_data;
DWord dw_symbols;
LibGoblin_BinaryFile *p_bfile;
- LibGoblin_SymbolWork *p_symwork;
+ LibGoblin_SymbolWorkInfo *p_symwork;
assert( NULL != p_binfo );
p_bfile = &(p_binfo->t_binfile[ i_analyzefid ]);
--- /dev/null
+/*DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
+
+ D r . D e a m o n 6 4
+ for INTEL64(R), AMD64(R)
+
+ Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL Koine Yuusuke(koinec) OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64*/
+
+/* File Info -----------------------------------------------------------
+File: drd64_.h
+Function: Header
+Comment:
+----------------------------------------------------------------------*/
+
+#ifndef DRD64_HEADER_LIBGOBLIN_SECTION
+#define DRD64_HEADER_LIBGOBLIN_SECTION
+
+#define LIBGOBLIN_ELF_SEC_ID_DEFAULT_MAX 0x22
+#define LIBGOBLIN_ELF_SEC_ID_MAX 0x3f
+
+#define LIBGOBLIN_ELF_SEC_ID_TEXT 0x00
+#define LIBGOBLIN_ELF_SEC_ID_TEXT_INIT 0x01
+#define LIBGOBLIN_ELF_SEC_ID_TEXT_FINI 0x02
+#define LIBGOBLIN_ELF_SEC_ID_DATA 0x03
+#define LIBGOBLIN_ELF_SEC_ID_BSS 0x04
+#define LIBGOBLIN_ELF_SEC_ID_GOT 0x05
+#define LIBGOBLIN_ELF_SEC_ID_GOT_PLT 0x06
+#define LIBGOBLIN_ELF_SEC_ID_PLT 0x07
+#define LIBGOBLIN_ELF_SEC_ID_REL_PLT 0x08
+#define LIBGOBLIN_ELF_SEC_ID_RELA_PLT 0x09
+#define LIBGOBLIN_ELF_SEC_ID_SHSTRTAB 0x0a
+#define LIBGOBLIN_ELF_SEC_ID_STRTAB 0x0b
+#define LIBGOBLIN_ELF_SEC_ID_SYMTAB 0x0c
+#define LIBGOBLIN_ELF_SEC_ID_DTORS 0x0d
+#define LIBGOBLIN_ELF_SEC_ID_CTORS 0x0e
+#define LIBGOBLIN_ELF_SEC_ID_DYNAMIC 0x0f
+#define LIBGOBLIN_ELF_SEC_ID_DYNSTR 0x10
+#define LIBGOBLIN_ELF_SEC_ID_DYNSYM 0x11
+#define LIBGOBLIN_ELF_SEC_ID_EH_FRAME 0x12
+#define LIBGOBLIN_ELF_SEC_ID_EH_FRAME_HDR 0x13
+#define LIBGOBLIN_ELF_SEC_ID_COMMENT 0x14
+#define LIBGOBLIN_ELF_SEC_ID_GNU_VERSION 0x15
+#define LIBGOBLIN_ELF_SEC_ID_GNU_VERSION_R 0x16
+#define LIBGOBLIN_ELF_SEC_ID_RODATA 0x17
+#define LIBGOBLIN_ELF_SEC_ID_NOTE_ABI_TAG 0x18
+#define LIBGOBLIN_ELF_SEC_ID_HASH 0x19
+#define LIBGOBLIN_ELF_SEC_ID_INTERP 0x1a
+#define LIBGOBLIN_ELF_SEC_ID_JCR 0x1b
+#define LIBGOBLIN_ELF_SEC_ID_DEBUG_ABBREV 0x1c
+#define LIBGOBLIN_ELF_SEC_ID_DEBUG_INFO 0x1d
+#define LIBGOBLIN_ELF_SEC_ID_DEBUG_LINE 0x1e
+#define LIBGOBLIN_ELF_SEC_ID_DEBUG_ARANGES 0x1f
+#define LIBGOBLIN_ELF_SEC_ID_DEBUG_FRAME 0x20
+#define LIBGOBLIN_ELF_SEC_ID_DEBUG_LOC 0x21
+#define LIBGOBLIN_ELF_SEC_ID_DEBUG_PUBNAMES 0x22
+
+#define LIBGOBLIN_ELF_SEC_STR_TEXT ".text"
+#define LIBGOBLIN_ELF_SEC_STR_TEXT_INIT ".init"
+#define LIBGOBLIN_ELF_SEC_STR_TEXT_FINI ".fini"
+#define LIBGOBLIN_ELF_SEC_STR_DATA ".data"
+#define LIBGOBLIN_ELF_SEC_STR_BSS ".bss"
+#define LIBGOBLIN_ELF_SEC_STR_GOT ".got"
+#define LIBGOBLIN_ELF_SEC_STR_GOT_PLT ".got.plt"
+#define LIBGOBLIN_ELF_SEC_STR_PLT ".plt"
+#define LIBGOBLIN_ELF_SEC_STR_REL_PLT ".rel.plt"
+#define LIBGOBLIN_ELF_SEC_STR_RELA_PLT ".rela.plt"
+#define LIBGOBLIN_ELF_SEC_STR_SHSTRTAB ".shstrtab"
+#define LIBGOBLIN_ELF_SEC_STR_STRTAB ".strtab"
+#define LIBGOBLIN_ELF_SEC_STR_SYMTAB ".symtab"
+#define LIBGOBLIN_ELF_SEC_STR_DTORS ".dtors"
+#define LIBGOBLIN_ELF_SEC_STR_CTORS ".ctors"
+#define LIBGOBLIN_ELF_SEC_STR_DYNAMIC ".dynamic"
+#define LIBGOBLIN_ELF_SEC_STR_DYNSTR ".dynstr"
+#define LIBGOBLIN_ELF_SEC_STR_DYNSYM ".dynsym"
+#define LIBGOBLIN_ELF_SEC_STR_EH_FRAME ".eh_frame"
+#define LIBGOBLIN_ELF_SEC_STR_EH_FRAME_HDR ".eh_frame_hdr"
+#define LIBGOBLIN_ELF_SEC_STR_COMMENT ".comment"
+#define LIBGOBLIN_ELF_SEC_STR_GNU_VERSION ".gnu.version"
+#define LIBGOBLIN_ELF_SEC_STR_GNU_VERSION_R ".gnu.version_r"
+#define LIBGOBLIN_ELF_SEC_STR_RODATA ".rodata"
+#define LIBGOBLIN_ELF_SEC_STR_NOTE_ABI_TAG ".note.ABI-tag"
+#define LIBGOBLIN_ELF_SEC_STR_HASH ".hash"
+#define LIBGOBLIN_ELF_SEC_STR_INTERP ".interp"
+#define LIBGOBLIN_ELF_SEC_STR_JCR ".jcr"
+#define LIBGOBLIN_ELF_SEC_STR_DEBUG_ABBREV ".debug_abbrev"
+#define LIBGOBLIN_ELF_SEC_STR_DEBUG_INFO ".debug_info"
+#define LIBGOBLIN_ELF_SEC_STR_DEBUG_LINE ".debug_line"
+#define LIBGOBLIN_ELF_SEC_STR_DEBUG_ARANGES ".debug_aranges"
+#define LIBGOBLIN_ELF_SEC_STR_DEBUG_FRAME ".debug_frame"
+#define LIBGOBLIN_ELF_SEC_STR_DEBUG_LOC ".debug_loc"
+#define LIBGOBLIN_ELF_SEC_STR_DEBUG_PUBNAMES ".debug_pubnames"
+
+
+#endif /* DRD64_HEADER_LIBGOBLIN_SECTION*/
+
+/* EOF of drd64_.h ----------------------------------- */
----------------------------------------------------------------------*/
void
LibGoblin_SymInfo_SwapWorkTable(
- LibGoblin_SymbolWork *p_worka,
- LibGoblin_SymbolWork *p_workb )
+ LibGoblin_SymbolWorkInfo *p_worka,
+ LibGoblin_SymbolWorkInfo *p_workb )
{
- LibGoblin_SymbolWork t_worktmp;
+ LibGoblin_SymbolWorkInfo t_worktmp;
- t_worktmp.ptr_address = p_worka->ptr_address;
- t_worktmp.pb_symbol = p_worka->pb_symbol;
+ memcpy( &t_worktmp, p_worka, sizeof( LibGoblin_SymbolWorkInfo ) );
+ memcpy( p_worka, p_workb, sizeof( LibGoblin_SymbolWorkInfo ) );
+ memcpy( p_workb, &t_worktmp, sizeof( LibGoblin_SymbolWorkInfo ) );
- p_worka->ptr_address = p_workb->ptr_address;
- p_worka->pb_symbol = p_workb->pb_symbol;
-
- p_workb->ptr_address = t_worktmp.ptr_address;
- p_workb->pb_symbol = t_worktmp.pb_symbol;
-
return;
}
----------------------------------------------------------------------*/
void
LibGoblin_SymInfo_QuickSortWorkTable(
- LibGoblin_SymbolWork *p_worktbl,
+ LibGoblin_SymbolWorkInfo *p_worktbl,
int i_min,
int i_max )
{
/*----------------------------------------------------------------------
----------------------------------------------------------------------*/
LIBGOBLIN_SYMINFO_EXTERN
-LibGoblin_SymbolWork *
+int
+ LibGoblin_SymInfo_AllocSymbolWorkTable(
+ LibGoblin_SymbolWorkTable *p_symwrktbl,
+ DWord dw_initsymbols )
+{
+ DWord dw_alloc_symbols;
+ DWord dw_sworksz;
+ LibGoblin_SymbolWorkInfo *p_symwork;
+
+ if( NULL == p_symwrktbl ) {
+ return -0x01;
+ }
+
+ dw_alloc_symbols = ((dw_initsymbols / LIBGOBLIN_SYMWORKINFO_UNITS) + 2)
+ * LIBGOBLIN_SYMWORKINFO_UNITS;
+
+ // Create & Alloc SymbolWorkTable
+ dw_sworksz = dw_alloc_symbols * sizeof( LibGoblin_SymbolWorkInfo );
+ p_symwork = (LibGoblin_SymbolWorkInfo *)malloc( dw_sworksz );
+ if( NULL == p_symwork ) {
+ return -0x02;
+ }
+ memset( p_symwork, 0x00, dw_sworksz );
+
+ p_symwrktbl->dw_alloc_symwork = dw_alloc_symbols;
+ p_symwrktbl->dw_max_symwork = 0;
+ p_symwrktbl->p_symwork = p_symwork;
+
+ return 0x00;
+}
+
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+LIBGOBLIN_SYMINFO_EXTERN
+int
+ LibGoblin_SymInfo_AddSymbolWorkInfo(
+ LibGoblin_SymbolWorkTable *p_symworktbl,
+ Ptr ptr_address,
+ Byte *pb_dataptr,
+ DWord dw_addrid,
+ DWord dw_type )
+{
+ LibGoblin_SymbolWorkInfo *p_symwork;
+ LibGoblin_SymbolWorkInfo *p_symtmp;
+
+ assert( NULL != p_symworktbl );
+ p_symwork = p_symworktbl->p_symwork;
+ assert( NULL != p_symwork );
+
+ if( p_symworktbl->dw_alloc_symwork == p_symworktbl->dw_max_symwork ) {
+ // expand SymbolWork MemoryArea.
+ p_symtmp = (LibGoblin_SymbolWorkInfo *)realloc( p_symwork,
+ p_symworktbl->dw_alloc_symwork + LIBGOBLIN_SYMWORKINFO_UNITS);
+ if( NULL == p_symtmp ) {
+ return -0x01;
+ }
+
+ p_symwork = p_symtmp;
+ }
+
+ p_symwork += p_symworktbl->dw_max_symwork;
+
+ p_symwork->ptr_address = ptr_address;
+ p_symwork->dw_type = dw_type;
+ p_symwork->pb_symbol = pb_dataptr;
+
+ return 0x00;
+}
+
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+LIBGOBLIN_SYMINFO_EXTERN
+LibGoblin_SymbolWorkInfo *
LibGoblin_SymInfo_CreateWorkTable(
LibGoblin_BinaryInfo *p_binfo,
DWord *pdw_items,
Elf32_Sym *p_sym32 = NULL;
Elf64_Sym *p_sym64 = NULL;
LibGoblin_SectionInfo *p_secinfo;
- LibGoblin_SymbolWork *p_symwork;
- LibGoblin_SymbolWork *p_swnow;
+ LibGoblin_SymbolWorkInfo *p_symwork;
+ LibGoblin_SymbolWorkInfo *p_swnow;
assert( NULL != p_binfo );
}
// Create & Alloc SymbolWorkTable
- dw_sworksz = dw_symbols * sizeof( LibGoblin_SymbolWork );
- p_symwork = (LibGoblin_SymbolWork *)malloc( dw_sworksz );
+ dw_sworksz = dw_symbols * sizeof( LibGoblin_SymbolWorkInfo );
+ p_symwork = (LibGoblin_SymbolWorkInfo *)malloc( dw_sworksz );
if( NULL == p_symwork ) {
return NULL;
}
LIBGOBLIN_SYMINFO_EXTERN
int
LibGoblin_SymInfo_FreeWorkTable(
- LibGoblin_SymbolWork *p_worktbl )
+ LibGoblin_SymbolWorkInfo *p_worktbl )
{
assert( NULL != p_worktbl );
#define LIBGOBLIN_SYMINFO_EXTERN extern
#endif
+#define LIBGOBLIN_SYMWORKINFO_UNITS 256
+
+#define LIBGOBLIN_SYMWORKINFO_ADDRID_INVALID 0xffffffff
+
+#define LIBGOBLIN_SYMWORKINFO_TYPE_SYMTAB 0x0100
+#define LIBGOBLIN_SYMWORKINFO_TYPE_DWARF 0x0200
+#define LIBGOBLIN_SYMWORKINFO_TYPE_ADDRTBL 0x0300
typedef struct {
Ptr ptr_address;
Byte *pb_symbol;
-} LibGoblin_SymbolWork;
+ DWord dw_type;
+} LibGoblin_SymbolWorkInfo;
+typedef struct {
+ DWord dw_alloc_symwork;
+ DWord dw_max_symwork;
+ LibGoblin_SymbolWorkInfo *p_symwork;
+} LibGoblin_SymbolWorkTable;
+
+LIBGOBLIN_SYMINFO_EXTERN
+ int LibGoblin_SymInfo_AllocSymbolWorkTable(
+ LibGoblin_SymbolWorkTable *p_symwrktbl, DWord dw_initsymbols );
LIBGOBLIN_SYMINFO_EXTERN
- LibGoblin_SymbolWork *LibGoblin_SymInfo_CreateWorkTable(
+ LibGoblin_SymbolWorkInfo *LibGoblin_SymInfo_CreateWorkTable(
LibGoblin_BinaryInfo *p_binfo, DWord *pdw_items, int i_analyzefid );
LIBGOBLIN_SYMINFO_EXTERN
- int LibGoblin_SymInfo_FreeWorkTable( LibGoblin_SymbolWork *p_worktbl );
+ int LibGoblin_SymInfo_FreeWorkTable( LibGoblin_SymbolWorkInfo *p_worktbl );
LIBGOBLIN_SYMINFO_EXTERN
int LibGoblin_SymInfo_Init( void );
LIBGOBLIN_SYMINFO_EXTERN
#define LIBGOBLIN_BINFO_FILE_EXTALLOC (DWord)0x02
#define LIBGOBLIN_BINFO_FILE_INTALLOC (DWord)0x04
-#define LIBGOBLIN_ELF_SEC_ID_TEXT 0x00
-#define LIBGOBLIN_ELF_SEC_ID_TEXT_INIT 0x01
-#define LIBGOBLIN_ELF_SEC_ID_TEXT_FINI 0x02
-#define LIBGOBLIN_ELF_SEC_ID_DATA 0x03
-#define LIBGOBLIN_ELF_SEC_ID_BSS 0x04
-#define LIBGOBLIN_ELF_SEC_ID_GOT 0x05
-#define LIBGOBLIN_ELF_SEC_ID_GOT_PLT 0x06
-#define LIBGOBLIN_ELF_SEC_ID_PLT 0x07
-#define LIBGOBLIN_ELF_SEC_ID_REL_PLT 0x08
-#define LIBGOBLIN_ELF_SEC_ID_RELA_PLT 0x09
-#define LIBGOBLIN_ELF_SEC_ID_SHSTRTAB 0x0a
-#define LIBGOBLIN_ELF_SEC_ID_STRTAB 0x0b
-#define LIBGOBLIN_ELF_SEC_ID_SYMTAB 0x0c
-#define LIBGOBLIN_ELF_SEC_ID_DTORS 0x0d
-#define LIBGOBLIN_ELF_SEC_ID_CTORS 0x0e
-#define LIBGOBLIN_ELF_SEC_ID_DYNAMIC 0x0f
-#define LIBGOBLIN_ELF_SEC_ID_DYNSTR 0x10
-#define LIBGOBLIN_ELF_SEC_ID_DYNSYM 0x11
-#define LIBGOBLIN_ELF_SEC_ID_EH_FRAME 0x12
-#define LIBGOBLIN_ELF_SEC_ID_EH_FRAME_HDR 0x13
-#define LIBGOBLIN_ELF_SEC_ID_COMMENT 0x14
-#define LIBGOBLIN_ELF_SEC_ID_GNU_VERSION 0x15
-#define LIBGOBLIN_ELF_SEC_ID_GNU_VERSION_R 0x16
-#define LIBGOBLIN_ELF_SEC_ID_RODATA 0x17
-#define LIBGOBLIN_ELF_SEC_ID_NOTE_ABI_TAG 0x18
-#define LIBGOBLIN_ELF_SEC_ID_HASH 0x19
-#define LIBGOBLIN_ELF_SEC_ID_INTERP 0x1a
-#define LIBGOBLIN_ELF_SEC_ID_JCR 0x1b
-#define LIBGOBLIN_ELF_SEC_ID_DEBUG_ABBREV 0x1c
-#define LIBGOBLIN_ELF_SEC_ID_DEBUG_INFO 0x1d
-#define LIBGOBLIN_ELF_SEC_ID_DEBUG_LINE 0x1e
-#define LIBGOBLIN_ELF_SEC_ID_DEBUG_ARANGES 0x1f
-#define LIBGOBLIN_ELF_SEC_ID_DEBUG_FRAME 0x20
-#define LIBGOBLIN_ELF_SEC_ID_DEBUG_LOC 0x21
-#define LIBGOBLIN_ELF_SEC_ID_DEBUG_PUBNAMES 0x22
-
-#define LIBGOBLIN_ELF_SEC_ID_DEFAULT_MAX 0x22
-#define LIBGOBLIN_ELF_SEC_ID_MAX 0x3f
-
-#define LIBGOBLIN_ELF_SEC_STR_TEXT ".text"
-#define LIBGOBLIN_ELF_SEC_STR_TEXT_INIT ".init"
-#define LIBGOBLIN_ELF_SEC_STR_TEXT_FINI ".fini"
-#define LIBGOBLIN_ELF_SEC_STR_DATA ".data"
-#define LIBGOBLIN_ELF_SEC_STR_BSS ".bss"
-#define LIBGOBLIN_ELF_SEC_STR_GOT ".got"
-#define LIBGOBLIN_ELF_SEC_STR_GOT_PLT ".got.plt"
-#define LIBGOBLIN_ELF_SEC_STR_PLT ".plt"
-#define LIBGOBLIN_ELF_SEC_STR_REL_PLT ".rel.plt"
-#define LIBGOBLIN_ELF_SEC_STR_RELA_PLT ".rela.plt"
-#define LIBGOBLIN_ELF_SEC_STR_SHSTRTAB ".shstrtab"
-#define LIBGOBLIN_ELF_SEC_STR_STRTAB ".strtab"
-#define LIBGOBLIN_ELF_SEC_STR_SYMTAB ".symtab"
-#define LIBGOBLIN_ELF_SEC_STR_DTORS ".dtors"
-#define LIBGOBLIN_ELF_SEC_STR_CTORS ".ctors"
-#define LIBGOBLIN_ELF_SEC_STR_DYNAMIC ".dynamic"
-#define LIBGOBLIN_ELF_SEC_STR_DYNSTR ".dynstr"
-#define LIBGOBLIN_ELF_SEC_STR_DYNSYM ".dynsym"
-#define LIBGOBLIN_ELF_SEC_STR_EH_FRAME ".eh_frame"
-#define LIBGOBLIN_ELF_SEC_STR_EH_FRAME_HDR ".eh_frame_hdr"
-#define LIBGOBLIN_ELF_SEC_STR_COMMENT ".comment"
-#define LIBGOBLIN_ELF_SEC_STR_GNU_VERSION ".gnu.version"
-#define LIBGOBLIN_ELF_SEC_STR_GNU_VERSION_R ".gnu.version_r"
-#define LIBGOBLIN_ELF_SEC_STR_RODATA ".rodata"
-#define LIBGOBLIN_ELF_SEC_STR_NOTE_ABI_TAG ".note.ABI-tag"
-#define LIBGOBLIN_ELF_SEC_STR_HASH ".hash"
-#define LIBGOBLIN_ELF_SEC_STR_INTERP ".interp"
-#define LIBGOBLIN_ELF_SEC_STR_JCR ".jcr"
-#define LIBGOBLIN_ELF_SEC_STR_DEBUG_ABBREV ".debug_abbrev"
-#define LIBGOBLIN_ELF_SEC_STR_DEBUG_INFO ".debug_info"
-#define LIBGOBLIN_ELF_SEC_STR_DEBUG_LINE ".debug_line"
-#define LIBGOBLIN_ELF_SEC_STR_DEBUG_ARANGES ".debug_aranges"
-#define LIBGOBLIN_ELF_SEC_STR_DEBUG_FRAME ".debug_frame"
-#define LIBGOBLIN_ELF_SEC_STR_DEBUG_LOC ".debug_loc"
-#define LIBGOBLIN_ELF_SEC_STR_DEBUG_PUBNAMES ".debug_pubnames"
-
/*=====================================================================*/
typedef struct {
} LibGoblin_SectionInfo;
/*=====================================================================*/
+typedef struct {
+ Word dw_id;
+ Word w_flag;
+ Ptr *p_address;
+ DWord dw_size;
+ DWord dw_srcid;
+ DWord dw_name;
+ DWord dw_next;
+ Word w_secid;
+} LibGoblin_AddressInfo;
+
+/*=====================================================================*/
typedef struct {
/* Binary-File Info. */
int i_fd;
/* Debug-Format Depending Info. (DWarf) */
void *p_debug;
- /* Exec. File ===========================================*/
+ /* Address Table Info. */
+ LibGoblin_AddressInfo *p_addrinfo;
+
+ /* Exec. File Info. */
LibGoblin_BinaryFile t_binfile[3];
/* Binary-Format Depending Info. (ELF)*/
-/*=====================================================================*/
-typedef struct {
- Word dw_id;
- Word w_flag;
- Ptr *p_address;
- DWord dw_size;
- DWord dw_srcid;
- DWord dw_name;
- DWord dw_next;
- Word w_secid;
-} LibGoblin_SymbolInfo;
-
-
#endif /* DRD64_HEADER_LIBGOBLIN_SYMINFO*/
/* EOF of drd64_.h ----------------------------------- */