drd64_libgoblin_dwarf.o \
drd64_libgoblin_dwarf_abbrev.o \
drd64_libgoblin_dwarf_attrform.o \
- drd64_libgoblin_dwarf_info.o \
+ drd64_libgoblin_dwarf_info_read.o \
drd64_libgoblin_dwarf_line.o \
drd64_libgoblin_dwarf_tag.o \
drd64_libgoblin_dwarf_common.o \
+ drd64_libgoblin_index_dwarfinfo.o \
drd64_libgoblin_debug_elf.o \
drd64_libgoblin_debug_dwarf_str.o \
drd64_libgoblin_debug_dwarf.o \
drd64_libgoblin_dwarf.h \
drd64_libgoblin_dwarf_abbrev.h \
drd64_libgoblin_dwarf_attrform.h \
- drd64_libgoblin_dwarf_info.h \
+ drd64_libgoblin_dwarf_info_read.h \
drd64_libgoblin_dwarf_line.h \
drd64_libgoblin_dwarf_tag.h \
drd64_libgoblin_dwarf_common.h \
+ drd64_libgoblin_index_dwarfinfo.h \
drd64_libgoblin_debug_elf.h \
drd64_libgoblin_debug_dwarf_str.h \
drd64_libgoblin_debug_dwarf.h \
drd64_libgoblin_dwarf_attrform.c $(HEADER)
$(CC) -c -o drd64_libgoblin_dwarf_attrform.o $(FLAGS_DEBUG) \
drd64_libgoblin_dwarf_attrform.c
-drd64_libgoblin_dwarf_info.o: \
- drd64_libgoblin_dwarf_info.c $(HEADER)
- $(CC) -c -o drd64_libgoblin_dwarf_info.o $(FLAGS_DEBUG) \
- drd64_libgoblin_dwarf_info.c
+drd64_libgoblin_dwarf_info_read.o: \
+ drd64_libgoblin_dwarf_info_read.c $(HEADER)
+ $(CC) -c -o drd64_libgoblin_dwarf_info_read.o $(FLAGS_DEBUG) \
+ drd64_libgoblin_dwarf_info_read.c
drd64_libgoblin_dwarf_line.o: \
drd64_libgoblin_dwarf_line.c $(HEADER)
$(CC) -c -o drd64_libgoblin_dwarf_line.o $(FLAGS_DEBUG) \
drd64_libgoblin_dwarf_common.o: drd64_libgoblin_dwarf_common.c $(HEADER)
$(CC) -c -o drd64_libgoblin_dwarf_common.o $(FLAGS_DEBUG) \
drd64_libgoblin_dwarf_common.c
+drd64_libgoblin_index_dwarfinfo.o: \
+ drd64_libgoblin_index_dwarfinfo.c $(HEADER)
+ $(CC) -c -o drd64_libgoblin_index_dwarfinfo.o $(FLAGS_DEBUG) \
+ drd64_libgoblin_index_dwarfinfo.c
drd64_libgoblin_debug_elf.o: drd64_libgoblin_debug_elf.c $(HEADER)
$(CC) -c -o drd64_libgoblin_debug_elf.o $(FLAGS_DEBUG) \
rm -f *.o
rm -f *.xml
rm -f *.core
+ rm -f *.log
rm -f $(CALLGRAPH)
rm -f $(TARGET)
rm -f $(TEST_TARGET)
#include"drd64_libgoblin_dwarf_common.h"
#include"drd64_libgoblin_dwarf_abbrev.h"
#include"drd64_libgoblin_dwarf_attrform.h"
-#include"drd64_libgoblin_dwarf_info.h"
+#include"drd64_libgoblin_dwarf_info_read.h"
#include"drd64_libgoblin_dwarf_line.h"
#include"drd64_libgoblin_dwarf_tag.h"
#include"drd64_libgoblin_dwarf.h"
+#include"drd64_libgoblin_index_dwarfinfo.h"
#include"drd64_libgoblin_debug_dwarf_str.h"
#include"drd64_libgoblin_debug_dwarf.h"
#include"drd64_libgoblin_debug_elf.h"
"DW_AT_bit_stride", /* 0x2e = DW_AT_stride_size */
"DW_AT_upper_bound", /* 0x2f */
+ "none_AT: 0x30", /* 0x30 */
"DW_AT_abstract_origin", /* 0x31 */
"DW_AT_accessibility", /* 0x32 */
"DW_AT_address_class", /* 0x33 */
Comment:
----------------------------------------------------------------------*/
-#define DRD64_SRC_LIBGOBLIN_DWARF_INFO
+#define DRD64_SRC_LIBGOBLIN_DWARF_INFO_READ
#include"drd64_libgoblin.h"
LibGoblin_DWARF_Info_CUHeader *pt_cuheader )
{
int i_childlv;
- int i_cnt;
char *pstr_srcpath = NULL;
char str_temp[DRD64_MAX_PATH+1];
DWord dw_arvid;
/*----------------------------------------------------------------------
----------------------------------------------------------------------*/
-LIBGOBLIN_DWARF_INFO_EXTERN
+LIBGOBLIN_DWARF_INFO_READ_EXTERN
int
DWARF_Info_Read(
LibGoblin_BinaryInfo *p_binfo )
pb_info = DWARF_AttrForm_ReadDIEValue(
pb_info, &qw_size_cu, p_arvnow, p_binfo, &t_cuheader );
- if( 0x00 != p_arvnow->b_children ) { i_childlv++; }
-
// Dispatch for generate Rapid-Access Table by DIE-tag
i_result = DWARF_Tag_Dispatch( p_binfo, p_bfile, p_srcfile, p_arvnow );
Debug_DWARF_PrintDIE( p_binfo, p_abbrev, dw_arvid, i_childlv );
+ if( 0x00 != p_arvnow->b_children ) { i_childlv++; }
+
}while( 0 != qw_size_cu );
qw_size_info -= t_cuheader.qw_unitsize;
}
-
/* EOF of drd64_.c ----------------------------------- */
Comment:
----------------------------------------------------------------------*/
-#ifndef DRD64_HEADER_LIBGOBLIN_DWARF_INFO
-#define DRD64_HEADER_LIBGOBLIN_DWARF_INFO
+#ifndef DRD64_HEADER_LIBGOBLIN_DWARF_INFO_READ
+#define DRD64_HEADER_LIBGOBLIN_DWARF_INFO_READ
#include"drd64_libgoblin.h"
-#ifdef DRD64_SRC_LIBGOBLIN_DWARF_INFO
- #define LIBGOBLIN_DWARF_INFO_EXTERN
+#ifdef DRD64_SRC_LIBGOBLIN_DWARF_INFO_READ
+ #define LIBGOBLIN_DWARF_INFO_READ_EXTERN
#else
- #define LIBGOBLIN_DWARF_INFO_EXTERN extern
+ #define LIBGOBLIN_DWARF_INFO_READ_EXTERN extern
#endif
#define LIBGOBLIN_DWARF_INFO_MAXDIENUMS 30
-LIBGOBLIN_DWARF_INFO_EXTERN
+LIBGOBLIN_DWARF_INFO_READ_EXTERN
int DWARF_Info_Read( LibGoblin_BinaryInfo *p_binfo );
-#ifdef DRD64_SRC_LIBGOBLIN_DWARF_INFO
+#ifdef DRD64_SRC_LIBGOBLIN_DWARF_INFO_READ
#endif
#endif /* DRD64_HEADER_LIBGOBLIN_BINFO */
ptr_addr = (PtrValue)p_sym->st_value;
qw_size = p_sym->st_size;
}
- dw_status = OBJINFO_STATUS_DYNAMIC;
+ dw_status |= OBJINFO_STATUS_DYNAMIC;
}
if( 0x00000000 < ptr_addr ) {
p_pginfo, p_binfo, ptr_addr, qw_size, p_sym, pb_dynstr );
}
- if(( NULL != p_obj ) && ( OBJINFO_STATUS_DYNAMIC == dw_status )) {
+ if(( NULL != p_obj ) && ( OBJINFO_STATUS_DYNAMIC & dw_status )) {
p_obj->dynamic.i_binfo_origin = i_bid;
p_obj->dynamic.i_dynsym_index = i_symindex;
p_obj->dw_status |= (OBJINFO_STATUS_DYNAMIC | OBJINFO_STATUS_RESOLV1);
--- /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_.c
+Function:
+Comment:
+----------------------------------------------------------------------*/
+
+#define DRD64_SRC_LIBGOBLIN_INDEX_DWARFINFO
+#include"drd64_libgoblin.h"
+
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+LIBGOBLIN_INDEX_DWARFINFO_EXTERN
+int
+ Index_DWARFInfo_SearchObjectInfo(
+ LibGoblin_BinaryInfo *p_binfo,
+ Byte *pb_dwinfo )
+{
+ int i_objid = NO_OBJ;
+ int i_start;
+ int i_end;
+ int i_now;
+ LibGoblin_ProgramInfo *p_pginfo;
+ LibGoblin_Index_DWARFInfo *p_offset;
+ LibGoblin_Index_DWARFInfo *p_offbase;
+
+ p_pginfo = ProgInfo_GetProgInfo( p_binfo->i_pginfo );
+ assert( NULL != p_pginfo );
+
+ p_offbase = p_pginfo->objinfo.p_offset;
+
+ i_start = 0;
+ i_end = p_pginfo->objinfo.i_max_offset;
+
+ do {
+ i_now = (i_start + i_end) / 2;
+ p_offset = p_offbase + i_now;
+ if( pb_dwinfo < p_offset->pb_dwinfo )
+ { i_end = (( 0 < i_now ) ? (i_now - 1) : 0); }
+ else if( p_offset->pb_dwinfo < pb_dwinfo )
+ { i_start = (( i_now < i_end ) ? (i_now + 1) : i_end); }
+ else {
+ i_objid = i_now;
+ break;
+ }
+ }while( i_start != i_end );
+
+ return i_objid;
+}
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+LIBGOBLIN_INDEX_DWARFINFO_EXTERN
+int
+ Index_DWARFInfo_RegistObjectInfo(
+ LibGoblin_BinaryInfo *p_binfo,
+ LibGoblin_ObjectInfo *p_objinfo,
+ Byte *pb_dwinfo )
+{
+ int i_result;
+ int i_items;
+ LibGoblin_ProgramInfo *p_pginfo;
+ LibGoblin_Index_DWARFInfo *p_offset;
+ LibGoblin_SectionInfo *psec_dwinfo;
+
+ p_pginfo = ProgInfo_GetProgInfo( p_binfo->i_pginfo );
+ assert( NULL != p_pginfo );
+
+ if(( 0 < p_pginfo->objinfo.i_alloced_offset)
+ && ( p_pginfo->objinfo.i_max_offset < p_pginfo->objinfo.i_alloced_offset)) {
+ p_offset = p_pginfo->objinfo.p_offset;
+ }
+ else {
+ p_offset = NULL;
+ // Init. Alloced Offset Table Memory ---
+ if( 0 == p_pginfo->objinfo.i_alloced_offset) {
+ psec_dwinfo = Section_GetSectionInfo( p_binfo, LIBGOBLIN_SECTION_ID_DEBUG_INFO );
+ assert( NULL != psec_dwinfo );
+
+ i_items = (int)(psec_dwinfo->qw_size / 8);
+
+ p_offset = (LibGoblin_Index_DWARFInfo *)
+ malloc( sizeof( LibGoblin_Index_DWARFInfo ) * i_items );
+ }
+ else if( p_pginfo->objinfo.i_max_offset
+ == p_pginfo->objinfo.i_alloced_offset) {
+ i_items = p_pginfo->objinfo.i_alloced_offset
+ + ( p_pginfo->objinfo.i_alloced_offset / 2 );
+
+ p_offset = (LibGoblin_Index_DWARFInfo *)
+ realloc( p_pginfo->objinfo.p_offset, i_items );
+ }
+
+ if( NULL == p_offset ) {
+ i_result = -0x01;
+ goto goto_Index_DWARFInfo_RegistObjectInfo_post;
+ }
+
+ p_pginfo->objinfo.p_offset = p_offset;
+ p_pginfo->objinfo.i_alloced_offset = i_items;
+ }
+
+ p_offset += p_pginfo->objinfo.i_max_offset;
+ p_offset->i_obj_id = p_objinfo->i_id;
+ p_offset->pb_dwinfo = pb_dwinfo;
+
+ p_pginfo->objinfo.i_max_offset++;
+
+goto_Index_DWARFInfo_RegistObjectInfo_post:
+ return 0x00;
+}
+
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+LIBGOBLIN_INDEX_DWARFINFO_EXTERN
+int
+ Index_DWARFInfo_Term(
+ LibGoblin_ProgramInfo *p_pginfo,
+ LibGoblin_ObjectInfo *p_objinfo )
+{
+ if( NULL != p_pginfo->objinfo.p_offset ) {
+ free( p_pginfo->objinfo.p_offset );
+
+ p_pginfo->objinfo.p_offset = NULL;
+ p_pginfo->objinfo.i_max_offset = 0;
+ p_pginfo->objinfo.i_alloced_offset = 0;
+ }
+
+ return 0x00;
+}
+
+
+
+/* EOF of drd64_.c ----------------------------------- */
--- /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_INDEX_DWARFINFO
+#define DRD64_HEADER_LIBGOBLIN_INDEX_DWARFINFO
+
+#include"drd64_libgoblin.h"
+
+#ifdef DRD64_SRC_LIBGOBLIN_INDEX_DWARFINFO
+ #define LIBGOBLIN_INDEX_DWARFINFO_EXTERN
+#else
+ #define LIBGOBLIN_INDEX_DWARFINFO_EXTERN extern
+#endif
+
+LIBGOBLIN_INDEX_DWARFINFO_EXTERN
+ int Index_DWARFInfo_SearchObjectInfo(
+ LibGoblin_BinaryInfo *p_binfo, Byte *pb_dwinfo );
+LIBGOBLIN_INDEX_DWARFINFO_EXTERN
+ int Index_DWARFInfo_RegistObjectInfo(
+ LibGoblin_BinaryInfo *p_binfo,
+ LibGoblin_ObjectInfo *p_objinfo,
+ Byte *pb_dwinfo );
+LIBGOBLIN_INDEX_DWARFINFO_EXTERN
+ int Index_DWARFInfo_Term(
+ LibGoblin_ProgramInfo *p_pginfo,
+ LibGoblin_ObjectInfo *p_objinfo );
+
+#endif /* DRD64_HEADER_LIBGOBLIN_BINFO */
+
+/* EOF of drd64_.h ----------------------------------- */
memset( p_objinfo, 0x00, sizeof( LibGoblin_ObjectInfo ) );
p_objinfo->i_id = i_id;
- p_objinfo->dw_status = OBJINFO_STATUS_INVALID;
+ p_objinfo->dw_status = OBJINFO_STATUS_INVALID; // Clear dw_status
+
+ p_objinfo->addrlink.i_next_id = NO_OBJ;
+ p_objinfo->addrlink.i_prev_id = NO_OBJ;
p_objinfo->grplink.i_parent_id = NO_OBJ;
p_objinfo->grplink.i_child_topid = NO_OBJ;
p_objinfo->grplink.i_next_id = NO_OBJ;
p_objinfo->grplink.i_prev_id = NO_OBJ;
- p_objinfo->addrlink.i_next_id = NO_OBJ;
- p_objinfo->addrlink.i_prev_id = NO_OBJ;
+ p_objinfo->typelink.i_prev_id = NO_OBJ;
+ p_objinfo->typelink.i_next_id = NO_OBJ;
return;
}
return NULL;
}
+ // Set Alloced ObjectInfo for Empty-Chain ---
for( i_cnt = (i_items - 1); i_cnt >= p_pginfo->objinfo.i_alloced; i_cnt-- ) {
p_objtemp = p_objbase + i_cnt;
ObjectInfo_ClearObjectInfo( p_objtemp );
p_pginfo->objinfo.i_empty = p_objinfo->grplink.i_next_id;
ObjectInfo_ClearObjectInfo( p_objinfo );
- p_objinfo->dw_status = OBJINFO_STATUS_VALID;
+ p_objinfo->dw_status |= OBJINFO_STATUS_VALID;
p_pginfo->objinfo.i_used++;
return p_objinfo;
goto goto_ObjectInfo_InsetObject_post;
}
- p_objnow = ((NO_OBJ != p_parent->grplink.i_child_topid)
- ? OBJINFO( p_pginfo, p_parent->grplink.i_child_topid ) : NULL );
+ //p_objnow = ((NO_OBJ != p_parent->grplink.i_child_topid)
+ // ? OBJINFO( p_pginfo, p_parent->grplink.i_child_topid ) : NULL );
+ assert( NO_OBJ != p_parent->grplink.i_child_topid );
+ p_objnow = OBJINFO( p_pginfo, p_parent->grplink.i_child_topid );
p_objprev = NULL;
do {
if( ptr_value == p_objnow->addr.ptr_addr.value ) {
return 0x01;
}
- if( OBJINFO_STATUS_INVALID == p_objinfo->dw_status ) {
+ if( OBJINFO_STATUS_INVALID & p_objinfo->dw_status ) {
return 0x02;
}
void )
{
int i_cnt;
+ int i_items;
int i_id_now = -0x01;
LibGoblin_ProgramInfo *p_pginfo = NULL;
+ LibGoblin_ProgramInfo *p_pgtemp;
LibGoblin_ProgramInfo *p_pgbase;
if( gi_now_program_info < gi_max_program_info ) {
}
if( gi_now_program_info == gi_alloc_program_info ) {
+ i_items = gi_alloc_program_info + LIBGOBLIN_PROGINFO_UNITS;
p_pgbase = (LibGoblin_ProgramInfo *)realloc( gp_program_info,
- sizeof( LibGoblin_ProgramInfo ) *
- ( gi_alloc_program_info + LIBGOBLIN_PROGINFO_UNITS ) );
+ sizeof( LibGoblin_ProgramInfo ) * i_items );
if( NULL == p_pgbase ) {
LibBrownie_Error_SetErrorInfo(
DRD64_ERROR( DRD64_ERROR_PTN_NOMEMORY, 0x01, 0x02 ),
goto goto_ProgInfo_AllocProgInfo_post;
}
+ for( i_cnt = (i_items - 1); i_cnt >= gi_alloc_program_info; i_cnt-- ) {
+ p_pgtemp = PGINFO( i_cnt );
+ ProgInfo_ClearProgInfo( p_pgtemp );
+ }
+
gp_program_info = p_pgbase;
gi_alloc_program_info += LIBGOBLIN_PROGINFO_UNITS;
}
/*=====================================================================*/
+typedef union {
+ int i_obj_id;
+ Byte *pb_info;
+} LibGoblin_ObjInfo_Link;
+
+
+/*=====================================================================*/
+typedef struct {
+ Byte *pb_dwinfo;
+ int i_obj_id;
+} LibGoblin_Index_DWARFInfo;
+
+
+/*=====================================================================*/
typedef struct {
QWord qw_unitsize;
Word w_version;
#define OBJINFO_STATUS_VALID 0x00000001 // bit 0
#define OBJINFO_STATUS_DYNAMIC 0x00000002 // bit 1
#define OBJINFO_STATUS_RESOLV1 0x00000004 // bit 2 (Specified BinaryInfo & Index)
-#define OBJINFO_STATUS_RESOLV2 0x00000008 // bit 3 (Loaded .so)
+//#define OBJINFO_STATUS_RESOLV2 0x00000008 // bit 3 (Loaded .so)
#define OBJINFO_STATUS_REL 0x00000100
-
-#define OBJINFO_TYPE_NULL 0x00
-#define OBJINFO_TYPE_PROGRAM 0x01
-#define OBJINFO_TYPE_MASTER 0x02
-#define OBJINFO_TYPE_PROGHDR 0x03
-#define OBJINFO_TYPE_SECTION 0x04
-#define OBJINFO_TYPE_FUNCTION 0x05
-#define OBJINFO_TYPE_OBJECT 0x06
-#define OBJINFO_TYPE_COMMON 0x07
-#define OBJINFO_TYPE_TLS 0x08
-#define OBJINFO_TYPE_REL 0x09
+#define OBJINFO_STATUS_SOLVED 0x00001000
+
+#define OBJINFO_TYPE_NULL 0x00
+#define OBJINFO_TYPE_PROGRAM 0x01
+#define OBJINFO_TYPE_MASTER 0x02
+#define OBJINFO_TYPE_PROGHDR 0x03
+#define OBJINFO_TYPE_SECTION 0x04
+#define OBJINFO_TYPE_FUNCTION 0x05
+#define OBJINFO_TYPE_OBJECT 0x06
+#define OBJINFO_TYPE_COMMON 0x07
+#define OBJINFO_TYPE_TLS 0x08
+#define OBJINFO_TYPE_REL 0x09
+#define OBJINFO_TYPE_TYPE_SINGLE 0x10
+#define OBJINFO_TYPE_TYPE_MULTI 0x11
typedef struct {
int i_id;
// [Symbol ] st_size - Size of associated object.
} addr;
+ // Address Order Link ---
+ struct {
+ int i_next_id; // Next Address ObjectInfo
+ int i_prev_id; // Prev Address ObjectInfo
+ } addrlink;
+
// Group(Parent-Child) Order Link ---
struct {
int i_parent_id; // Parent ObjectInfo
int i_next_id; // Next
} grplink;
- // Address Order Link ---
+ // Type Link ---
struct {
- int i_next_id; // Next Address ObjectInfo
- int i_prev_id; // Prev Address ObjectInfo
- } addrlink;
+ int i_prev_id;
+ int i_next_id;
+ } typelink;
// File Info ---
struct {
Word w_secindex; // st_shndx - Section index of symbol.
} symbol;
+ struct {
+ DWord dw_size;
+ LibGoblin_ObjInfo_Link t_link;
+ } type;
+
} info;
struct {
int i_objid_origin;
} rel;
+ Byte *pb_dwarf_info;
+
int i_secid;
int i_srcid; // SourceInfo struct ID
int i_alloced; // Alloced ObjectInfo
int i_used; // ObjectInfo Items
int i_topid; // Top-Ptr ObjectInfo
+
+ LibGoblin_Index_DWARFInfo *p_offset;
+ int i_alloced_offset;
+ int i_max_offset;
} objinfo;
LibGoblin_AddressInfo *p_addrinfo;
Word dw_flag;
-
int i_binfo_id;
int i_binfo_id_core;