Jump to page: 1 2
Thread overview
objconv 2.03 released (includes .OBJ disassembler)
Dec 07, 2008
Don
Dec 07, 2008
John Reimer
Dec 07, 2008
Tim M
Dec 08, 2008
Robert M. Münch
Dec 09, 2008
Esa Kylli
Dec 09, 2008
Tim M
Dec 10, 2008
Esa Kylli
Jan 14, 2009
Hoenir
Jan 14, 2009
Don
Jan 14, 2009
Hoenir
Jan 14, 2009
Don
December 07, 2008
Agner Fog's objconv utility 2.03 has just been released.
It supports conversions between object file types
(OMF<->COFF<->ELF<->Mach-O).
This latest release is significant for users of  DMD - Windows, since it
is the first one which can disassemble OMF files containing COMDAT sections - which means every .obj file produced by DMD Windows.

It cannot do everything which Walter's obj2asm can do, but it does have a comprehensive disassembler which includes all x87, MMX, SSE, SSE2, SSE3, SSE4, SSE5, AVX, and FMA instructions. So many D programmers should find it useful.

Source code is released under the GPL. The support for COMDAT, and testing for DMD was done by me. Everything else is by Agner.

Download it from
http://www.agner.org/optimize/
in the section "Object File Converter".
December 07, 2008
Hello Don,

> Agner Fog's objconv utility 2.03 has just been released.
> It supports conversions between object file types
> (OMF<->COFF<->ELF<->Mach-O).
> This latest release is significant for users of  DMD - Windows, since
> it
> is the first one which can disassemble OMF files containing COMDAT
> sections - which means every .obj file produced by DMD Windows.
> It cannot do everything which Walter's obj2asm can do, but it does
> have a comprehensive disassembler which includes all x87, MMX, SSE,
> SSE2, SSE3, SSE4, SSE5, AVX, and FMA instructions. So many D
> programmers should find it useful.
> 
> Source code is released under the GPL. The support for COMDAT, and
> testing for DMD was done by me. Everything else is by Agner.
> 
> Download it from
> http://www.agner.org/optimize/
> in the section "Object File Converter".


Nice! Thanks!

:-)

-JJR


December 07, 2008
Thanks to you and agner. I use this tool all the time for my ms-vs coff to omf conversions.

 On Sun, 07 Dec 2008 19:19:16 +1300, Don <nospam@nospam.com> wrote:

> Agner Fog's objconv utility 2.03 has just been released.
> It supports conversions between object file types
> (OMF<->COFF<->ELF<->Mach-O).
> This latest release is significant for users of  DMD - Windows, since it
> is the first one which can disassemble OMF files containing COMDAT sections - which means every .obj file produced by DMD Windows.
>
> It cannot do everything which Walter's obj2asm can do, but it does have a comprehensive disassembler which includes all x87, MMX, SSE, SSE2, SSE3, SSE4, SSE5, AVX, and FMA instructions. So many D programmers should find it useful.
>
> Source code is released under the GPL. The support for COMDAT, and testing for DMD was done by me. Everything else is by Agner.
>
> Download it from
> http://www.agner.org/optimize/
> in the section "Object File Converter".

December 08, 2008
On Sun, 07 Dec 2008 07:19:16 +0100, Don <nospam@nospam.com> wrote:

> Agner Fog's objconv utility 2.03 has just been released.
> It supports conversions between object file types
> (OMF<->COFF<->ELF<->Mach-O).
> [...]

I think this will help a lot of DMC users as well. I sometimes have quite a problem when converting .lib files compiled with MSVC to use them with DMC. Thanks a lot for this.

-- 
Robert M. Münch
Management & IT Freelancer
http://www.robertmuench.de
December 09, 2008
Hi,

I'm a newbie to D and this tool.
I'm trying to convert an .OBJ file compiled in MSVC to OMF-format so that I can link to it from my D code.
I get no errors in the conversion. But when I try to link to the OMF OBJ-file I get these errors:
Error 42: Symbol Undefined __RTC_Shutdown
Error 42: Symbol Undefined __RTC_InitBase
Error 42: Symbol Undefined __RTC_CheckEsp

Anyone know what's going on here?
I would be grateful for any tips.

Another problem I have is when I try to convert the MSCV compiled OBJ-file to OMF-format, but this time it's been compiled in release mode, I get the following error:
Error 2006: Unsupported file type for file Main2.obj: Whole program optimization intermediate file, Microsoft specific

Could this be caused by the fact that objconv doesn't support this case?

Best regards,
/Esa


Don Wrote:

> Agner Fog's objconv utility 2.03 has just been released.
> It supports conversions between object file types
> (OMF<->COFF<->ELF<->Mach-O).
> This latest release is significant for users of  DMD - Windows, since it
> is the first one which can disassemble OMF files containing COMDAT
> sections - which means every .obj file produced by DMD Windows.
> 
> It cannot do everything which Walter's obj2asm can do, but it does have a comprehensive disassembler which includes all x87, MMX, SSE, SSE2, SSE3, SSE4, SSE5, AVX, and FMA instructions. So many D programmers should find it useful.
> 
> Source code is released under the GPL. The support for COMDAT, and testing for DMD was done by me. Everything else is by Agner.
> 
> Download it from
> http://www.agner.org/optimize/
> in the section "Object File Converter".

December 09, 2008
On Tue, Dec 9, 2008 at 10:02 AM, Esa Kylli <esa.kylli@swipnet.se> wrote:
> Hi,
>
> I'm a newbie to D and this tool.
> I'm trying to convert an .OBJ file compiled in MSVC to OMF-format so that I can link to it from my D code.
> I get no errors in the conversion. But when I try to link to the OMF OBJ-file I get these errors:
> Error 42: Symbol Undefined __RTC_Shutdown
> Error 42: Symbol Undefined __RTC_InitBase
> Error 42: Symbol Undefined __RTC_CheckEsp
>
> Anyone know what's going on here?
> I would be grateful for any tips.

Those look like symbols for the MSVC runtime library.  Your converted library apparently needs them.

This is the problem with converting object files - even if you can convert it, you still have to deal with the fact that compilers will insert all kinds of dependencies on other libraries and objects that you don't know about.  Compilers will also make assumptions about the way things are linked, and so even if you are able to convert the object, it might not work.

> Another problem I have is when I try to convert the MSCV compiled OBJ-file to OMF-format, but this time it's been compiled in release mode, I get the following error:
> Error 2006: Unsupported file type for file Main2.obj: Whole program optimization intermediate file, Microsoft specific
>
> Could this be caused by the fact that objconv doesn't support this case?

Uh, yeah, that's pretty much exactly what the error message says. "Unsupported" means "I don't support this" ;)
December 09, 2008
It's not really that much of a problem though. Just project->properties in ms vs and change a few options then it's plain sailing. Can't remember what it was though and it may of been a multiple of things but try code generation->buffer secuirty check off.



On Wed, 10 Dec 2008 04:23:00 +1300, Jarrett Billingsley <jarrett.billingsley@gmail.com> wrote:

> On Tue, Dec 9, 2008 at 10:02 AM, Esa Kylli <esa.kylli@swipnet.se> wrote:
>> Hi,
>>
>> I'm a newbie to D and this tool.
>> I'm trying to convert an .OBJ file compiled in MSVC to OMF-format so that I can link to it from my D code.
>> I get no errors in the conversion. But when I try to link to the OMF OBJ-file I get these errors:
>> Error 42: Symbol Undefined __RTC_Shutdown
>> Error 42: Symbol Undefined __RTC_InitBase
>> Error 42: Symbol Undefined __RTC_CheckEsp
>>
>> Anyone know what's going on here?
>> I would be grateful for any tips.
>
> Those look like symbols for the MSVC runtime library.  Your converted
> library apparently needs them.
>
> This is the problem with converting object files - even if you can
> convert it, you still have to deal with the fact that compilers will
> insert all kinds of dependencies on other libraries and objects that
> you don't know about.  Compilers will also make assumptions about the
> way things are linked, and so even if you are able to convert the
> object, it might not work.
>
>> Another problem I have is when I try to convert the MSCV compiled OBJ-file to OMF-format, but this time it's been compiled in release mode, I get the following error:
>> Error 2006: Unsupported file type for file Main2.obj: Whole program optimization intermediate file, Microsoft specific
>>
>> Could this be caused by the fact that objconv doesn't support this case?
>
> Uh, yeah, that's pretty much exactly what the error message says.
> "Unsupported" means "I don't support this" ;)

December 10, 2008
Thanks for the tip.
That setting didn't do it, but changing Basic Runtime Checks to Default did it.

Thanks for the help :-)

Best regards,
/Esa


Tim M Wrote:

> It's not really that much of a problem though. Just project->properties in ms vs and change a few options then it's plain sailing. Can't remember what it was though and it may of been a multiple of things but try code generation->buffer secuirty check off.
> 
> 
> 
> On Wed, 10 Dec 2008 04:23:00 +1300, Jarrett Billingsley <jarrett.billingsley@gmail.com> wrote:
> 
> > On Tue, Dec 9, 2008 at 10:02 AM, Esa Kylli <esa.kylli@swipnet.se> wrote:
> >> Hi,
> >>
> >> I'm a newbie to D and this tool.
> >> I'm trying to convert an .OBJ file compiled in MSVC to OMF-format so
> >> that I can link to it from my D code.
> >> I get no errors in the conversion. But when I try to link to the OMF
> >> OBJ-file I get these errors:
> >> Error 42: Symbol Undefined __RTC_Shutdown
> >> Error 42: Symbol Undefined __RTC_InitBase
> >> Error 42: Symbol Undefined __RTC_CheckEsp
> >>
> >> Anyone know what's going on here?
> >> I would be grateful for any tips.
> >
> > Those look like symbols for the MSVC runtime library.  Your converted library apparently needs them.
> >
> > This is the problem with converting object files - even if you can convert it, you still have to deal with the fact that compilers will insert all kinds of dependencies on other libraries and objects that you don't know about.  Compilers will also make assumptions about the way things are linked, and so even if you are able to convert the object, it might not work.
> >
> >> Another problem I have is when I try to convert the MSCV compiled
> >> OBJ-file to OMF-format, but this time it's been compiled in release
> >> mode, I get the following error:
> >> Error 2006: Unsupported file type for file Main2.obj: Whole program
> >> optimization intermediate file, Microsoft specific
> >>
> >> Could this be caused by the fact that objconv doesn't support this case?
> >
> > Uh, yeah, that's pretty much exactly what the error message says. "Unsupported" means "I don't support this" ;)
> 

January 14, 2009
Don schrieb:
> This latest release is significant for users of  DMD - Windows, since it
> is the first one which can disassemble OMF files containing COMDAT sections - which means every .obj file produced by DMD Windows.

It isn't even capable to convert the simplest example in the current version:

extern(C):
int global1=5;

int doSomething(int num)
{
	printf("blablub\n");
	return global1;
}

-> Error 2305: 2 Communal Sections found. Currently not supported.
January 14, 2009
Hoenir wrote:
> Don schrieb:
>> This latest release is significant for users of  DMD - Windows, since it
>> is the first one which can disassemble OMF files containing COMDAT sections - which means every .obj file produced by DMD Windows.
> 
> It isn't even capable to convert the simplest example in the current version:
> 
> extern(C):
> int global1=5;
> 
> int doSomething(int num)
> {
>     printf("blablub\n");
>     return global1;
> }
> 
> -> Error 2305: 2 Communal Sections found. Currently not supported.

Works for me. Looks like you have an older version?
« First   ‹ Prev
1 2