Jump to content
Tuts 4 You
Sign in to follow this  
XiaoHang

vc2010 produced .obj is not a COFF type file ,there is anybody know why?

Recommended Posts

XiaoHang
I try to build a crypto++ .lib file for make .sig file of IDA,building crypto++ .lib was succeeded ,
but when I try to use flair to make .sig , it tell me can't recognize those .obj file type that linked in .lib .

so I open a .obj read it ,and this's what is see .
 
Quote:
00000000 00 00 FF FF 01 00 4C 01 A6 C8 36 57 38 FE B3 0C  L θ6W8
00000010 A5 D9 AB 4D AC 9B D6 B6 22 26 53 C2 47 DE 06 00 ベ玀瑳侄"&S翯?
00000020 13 0C 07 00 A6 C8 36 57 23 DD 06 00 10 00 00 00 θ6W#?
00000030 00 00 00 00 2E 64 72 65 63 74 76 65 00 00 00 00 .drectve
00000040 00 00 00 00 51 00 00 00 2C 01 00 00 00 00 00 00 Q ,
00000050 00 00 00 00 00 00 00 00 00 0A 10 00 2E 63 69 6C .cil
00000060 24 66 67 00 00 00 00 00 00 00 00 00 EA 00 00 00 $fg ?
00000070 7D 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 }
00000080 40 00 10 40 2E 63 69 6C 24 67 6C 00 00 00 00 00 @ @.cil$gl
coff type file shold be like this ,first word is magic number 0x14C
 
Quote:
00000000 4C 01 04 00 0F A3 35 57 D8 0B 00 00 27 00 00 00 L ?W? '
00000010 00 00 00 00 2E 74 65 78 74 00 00 00 00 00 00 00 .text
00000020 00 00 00 00 BB 00 00 00 B4 00 00 00 00 00 00 00 ? ?
00000030 00 00 00 00 00 00 00 00 20 00 50 60 2E 64 61 74 P`.dat
00000040 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000060 40 00 50 C0 2E 64 65 62 75 67 24 53 00 00 00 00 @ P?debug$S
00000070 00 00 00 00 D0 07 00 00 6F 01 00 00 40 09 00 00 ? o @
00000080 00 00 00 00 3A 00 00 00 40 00 10 42 2E 64 65 62 : @ B.deb
00000090 75 67 24 54 00 00 00 00 00 00 00 00 54 00 00 00 ug$T T
000000A0 84 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?
so what kind file type it is ,it's not COFF or OMF ,definitely not ELF

progress.gif

Share this post


Link to post
kao

Probably this will help you: https://social.msdn.microsoft.com/Forums/sharepoint/en-US/0de72088-5fd8-4caf-8651-ee38eaa37e3e/strange-release-coff-format?forum=vcgeneral

 

EDIT: you can also convert your strange OBJ file into a normal one using the following command-line (tested with link.exe from VS2010):

link.exe /cvtcil {your_strange.obj} /out:{your_fixed.obj}

 

Edited by kao (see edit history)
  • Like 2

Share this post


Link to post
XiaoHang
22 hours ago, kao said:

Probably this will help you: https://social.msdn.microsoft.com/Forums/sharepoint/en-US/0de72088-5fd8-4caf-8651-ee38eaa37e3e/strange-release-coff-format?forum=vcgeneral

 

EDIT: you can also convert your strange OBJ file into a normal one using the following command-line (tested with link.exe from VS2010):


link.exe /cvtcil {your_strange.obj} /out:{your_fixed.obj}

 

 this answer is not what I wanted but still thank you  .

I got answer and solution from another forum  though,

 those are  internal VC format (different for each version of VC) - that only turns into real code when the final module (EXE, DLL, ...) is linked.

the solution is disable "Link Time Code Generation"

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×
×
  • Create New...