利用ccstudio提供的工具解析出coff文件

利用ccstudio提供的工具解析出coff文件

文件路径 : CCStudio_v3.3\C6000\cgtools\bin\ofd6x.exe

命令参数:

 ofd6x.exe -g main.obj   > main.txt

main.obj只需要编译过就对,不一定需要链接通过。



main.obj文件的源代码:











//#if 0
//#ifdef __cplusplus
//#if __cplusplus
//extern "C" {
//#endif /* __cpluscplus */
//#endif /* __cpluscplus */

//#pragma DATA_SECTION(g_array,".whatfuck")


int *p_1;
int **p_2;

#pragma DATA_SECTION(p_3, ".whatfuck")
int *p_3[10];
#pragma DATA_SECTION(p_4, ".whatfuck")
int (*p_4)[10];
#pragma DATA_SECTION(p_5, ".whatfuck")
int **p_5[10];

#pragma DATA_SECTION(pFun5, ".whatfuck")

int (*pFun5[100])(int a1, char a2); 


int ts_a = 0;

#pragma DATA_SECTION(pFun6, ".whatfuck")
void (*pFun6[100])(int a);   //def type ??? 

#pragma DATA_SECTION(g_array_5, ".whatfuck")
char g_array_5[] = "shit!shit!";

#pragma DATA_SECTION(ccc, ".whatfuck")
int ccc = 7;    //def type??

#pragma DATA_SECTION(charss, ".whatfuck")
char charss[] = "what's up";


#pragma DATA_SECTION(gggg,".whatfuck")
char gggg;

#pragma DATA_SECTION(structa,".whatfuck")
struct aaa{
char b;
}structa;  

#pragma DATA_SECTION(dddd,".whatfuck")
char dddd = 'z'; 

#pragma DATA_SECTION(g_arra1,".whatfuck")
char g_arra1[3] = "fc";

#pragma DATA_SECTION(int_test1,".whatfuck")
int int_test1 = 0xAAAAAAAA;

#pragma DATA_SECTION(g_arra2,".whatfuck")
char g_arra2[5];

#pragma DATA_SECTION(int_test2,".whatfuck")
int int_test2 = 0xAAAAAAAA;

#pragma DATA_SECTION(g_arra3,".whatfuck")
char g_arra3[9];

#pragma DATA_SECTION(int_test3,".whatfuck")
int int_test3 = 0xAAAAAAAA;

#pragma DATA_SECTION(g_arra4,".whatfuck")
char g_arra4[1];

char g_mut_array[100][100][100];

typedef int (*func1)(int, char, long);

func1 g_func1[100][200];

int* (*func2[20])(int, char);

//char g_array_5[] = "shit!shit!";

//int ccc = 7;

//char charss[] = "what's up";
//#pragma DATA_SECTION(test,".whatfuck")

void test( )
{
//	memset(g_array, 0xFF, sizeof(g_array));
//	CheckGlobleVars(pFun6, 100*4, 1, 1);
    InitList();
}

void test2()
{
    int i = 0;
    char szString[1024];
	memset(szString, 0, 1024);
	
	for (i = 0; i < 1024; i ++)
	{
	    szString[i] = i;
	}
	

}

#pragma DATA_SECTION(int_test3,".whatfuck")
int a[3];

int main()
{

 	test();
    
    return 1;
}


#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
//#endif






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值