Fix shared build

This commit is contained in:
pancake 2014-03-18 01:51:36 +01:00
parent 6a835f159d
commit 31b8c6f377
4 changed files with 8 additions and 10 deletions

View File

@ -14,8 +14,8 @@
#define R_API static
#undef R_IPI
#define R_IPI static
#include "../../../shlr/java/code.h"
#include "../../../shlr/java/class.h"
#include "../../../shlr/java/code.c"
#include "../../../shlr/java/class.c"
//#include "../../../shlr/java/ssa_java.h"
#undef R_API
#define R_API

View File

@ -16,4 +16,4 @@ out: ${OBJS} main.o
-lr_util ${SHLR}/sdb/src/libsdb.a -o out
clean:
rm -f ${OBJS} a.out
rm -f ${OBJS} main.o a.out

View File

@ -11,13 +11,13 @@ typedef struct java_op {
ut64 op_type;
} JavaOp;
extern struct java_op JAVA_OPS[];
#ifndef R_IPI
#define R_IPI
#endif
R_IPI struct java_op JAVA_OPS[];
R_IPI int java_print_opcode(RBinJavaObj *obj, ut64 addr, int idx, const ut8 *bytes, char *output, int outlen);
R_IPI unsigned short read_short(FILE *fd);
R_IPI int java_classdump(const char *file, int verbose);
R_API int r_java_disasm(RBinJavaObj *obj, ut64 addr, const ut8 *bytes, char *output, int len);
R_API int r_java_assemble(ut8 *bytes, const char *string);
//R_API void r_java_set_obj(RBinJavaObj *obj);

View File

@ -4,9 +4,8 @@
#include <stdio.h>
#include "code.h"
struct java_op JAVA_OPS[] = {
R_IPI struct java_op JAVA_OPS[] = {
{ "nop" , 0x00, 1, R_ANAL_EX_NOP},
{ "aconst_null" , 0x01, 1, R_ANAL_EX_LDST_LOAD_FROM_CONST_REF_TO_STACK},
{ "iconst_m1" , 0x02, 1, R_ANAL_EX_LDST_LOAD_FROM_CONST_TO_STACK},
{ "iconst_0" , 0x03, 1, R_ANAL_EX_LDST_LOAD_FROM_CONST_TO_STACK},
@ -303,4 +302,3 @@ struct java_op JAVA_OPS[] = {
{ "impdep1" , 0xfe, 1, R_ANAL_EX_ILL_OP},
{ "impdep2" , 0xff, 1, R_ANAL_EX_ILL_OP},
};