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:

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

I don't really understand what you are trying to do or why you are using
ELF at all.  Why not just compile your code into PE format in the first
place?

The only realistic way that you can create a PE DLL is to compile code
with a PE compiler.  Otherwise you aren't going to get the right code
sequences and relocations.  It is theoretically possible to pursue other
paths but they are all going to be complex and difficult.

Ian


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