您的位置:首页 > 其它

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

2011-11-26 14:08 417 查看
利用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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: