1 /*DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
4 for INTEL64(R), AMD64(R)
6 Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are met:
11 1. Redistributions of source code must retain the above copyright notice,
12 this list of conditions and the following disclaimer.
13 2. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
17 THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
18 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 DISCLAIMED. IN NO EVENT SHALL Koine Yuusuke(koinec) OR CONTRIBUTORS BE
21 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27 OF THE POSSIBILITY OF SUCH DAMAGE.
29 DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64*/
31 /* File Info -----------------------------------------------------------
35 ----------------------------------------------------------------------*/
37 #ifndef DRD64_HEADER_LIBGOBLIN_BINFO
38 #define DRD64_HEADER_LIBGOBLIN_BINFO
40 #include"drd64_libgoblin.h"
42 #ifdef DRD64_SRC_LIBGOBLIN_BINFO
43 #define LIBGOBLIN_BINFO_EXTERN
45 #define LIBGOBLIN_BINFO_EXTERN extern
48 #if defined DRD64_SRC_LIBGOBLIN_BINFO
49 #define LIBGOBLIN_BINFO_INTERNALFUNC
50 #elif defined DRD64_SRC_TEST_LIBGOBLIN_BINFO
51 #define LIBGOBLIN_BINFO_INTERNALFUNC
55 #define LIBGOBLIN_BINFO_UNITS 8
57 #ifdef DRD64_SRC_LIBGOBLIN_BINFO
58 LibGoblin_BinaryInfo *gp_binary_info = NULL;
59 int gi_alloc_binary_info = 0;
60 int gi_max_binary_info = 0;
61 int gi_now_binary_info = 0;
64 #define BINFO(n) ((LibGoblin_BinaryInfo *)(gp_binary_info + (n)))
65 #define BINFOID(n) ((n)->i_id)
67 LIBGOBLIN_BINFO_EXTERN
68 LibGoblin_BinaryInfo *BinaryInfo_GetBinInfo( int i_bid );
69 LIBGOBLIN_BINFO_EXTERN
70 int BinInfo_SearchFilename_inProgInfo( char *pstr_libname, LibGoblin_ProgramInfo *p_pginfo );
71 LIBGOBLIN_BINFO_EXTERN
72 int BinInfo_SearchFilename( char *pstr_libname, LibGoblin_BinaryInfo *p_binfo_self );
73 LIBGOBLIN_BINFO_EXTERN
74 int BinInfo_SearchNextSlave( int i_bid_self, int i_bid_now );
75 LIBGOBLIN_BINFO_EXTERN
76 int BinaryInfo_SetRPath(
77 LibGoblin_BinaryInfo *p_binfo, const char *pstr_rpath );
78 LIBGOBLIN_BINFO_EXTERN
79 int BinaryInfo_SetRunPath(
80 LibGoblin_BinaryInfo *p_binfo, const char *pstr_runpath );
81 LIBGOBLIN_BINFO_EXTERN
82 int BinaryInfo_SetProgramPath(
83 LibGoblin_BinaryInfo *p_binfo, const char *pstr_progpath, const char *pstr_realpath );
84 LIBGOBLIN_BINFO_EXTERN
85 LibGoblin_BinaryInfo *BinaryInfo_AllocBinInfo(
86 LibGoblin_ProgramInfo *p_pginfo, const char *pstr_filename, int i_parent_bid );
87 LIBGOBLIN_BINFO_EXTERN
88 int BinaryInfo_FreeBinInfo( LibGoblin_BinaryInfo *p_binfo );
89 LIBGOBLIN_BINFO_EXTERN
90 int BinaryInfo_Init( void );
91 LIBGOBLIN_BINFO_EXTERN
92 int BinaryInfo_Term( void );
95 #ifdef LIBGOBLIN_BINFO_INTERNALFUNC
96 void BinaryInfo_ClearBinInfo( LibGoblin_BinaryInfo *p_binfo );
97 int BinInfo_AppendChain( LibGoblin_BinaryInfo *p_binfo_now );
98 int BinInfo_DeleteChain( LibGoblin_BinaryInfo *p_binfo_del );
102 #endif /* DRD64_HEADER_LIBGOBLIN_BINFO */
104 /* EOF of drd64_.h ----------------------------------- */