This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM-ELF -> PE-COFF with objcopy


> "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

Well, in case if it's only possible to convert ELF executable how is that could be useful in my case?.. 
I want to test codec performance and for that I need to make millions of function calls in a loop to measure performance. In the ELF binary obviously I can't use anything that's os specific (file access for example). Or can I if I link to dynamic libc? The only possibility in this case is to embedde binary data into executable and process it by the executable. In this case I can't verify the output (unless I embed expected output also)
Maybe there are some other alternatives? Or maybe I could write a tool myself that dumps symbols into symbolsrec and then properly creates windll? I could build my code by VS and then simply replace chunks of machine code in that dll


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]