ARM-ELF -> PE-COFF with objcopy

Ian Lance Taylor iant@google.com
Mon Apr 27 22:49:00 GMT 2009


"i-love-spam" <i-love-spam@yandex.ru> writes:

> I'm completely lost, seems that objcopy can't do anything related to elf->coff properly.
> test.cpp:
> __declspec(dllexport) int add(int a, int b){ return a+b; }
>
> then:
> armcc --cpu=6 -Otime -O3 --shared --apcs=/fpic test.cpp
> and 
> objcopy.exe  -I elf32-littlearm -O pei-arm-wince-little __image.axf testi.dll
> objcopy.exe  -I elf32-littlearm -O pe-arm-wince-little __image.axf test.dll

objcopy is definitely not going to be able to convert an ELF shared
library into a PE DLL.  I don't think that is programmatically possible,
becuase they use very different models for accessing globally visible
functions and variables.

objcopy might be able to convert a statically linked ELF executable into
PE format.

Ian



More information about the Binutils mailing list