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: How to debug without having debug section in an executable ?


On 03 February 2006 04:35, Ian Lance Taylor wrote:

> ashwani raina <ashwani.raina@gmail.com> writes:
> 
>> 1. My project is to convert PE (user created dynamic link libraries on
>> windows) to ELF (shared object on linux ). When i convert a Dll
>> providing some functionalities like some file operations . But when an
>> application (executable not a shared object or library) converted from
>> PE to ELF, having usage of symbols in it but defined in shared object
>> which i have created and converted,  is executed it doesnot find the
>> symbol .
> 
> I'm not completely sure, but it is probably possible to convert a DLL
> from PE to ELF for the x86 architecture.  But you will have to completely
> rewrite the DLL.  You will have to extract the import and export tables
> and convert them to the ELF dynamic symbol table, in the .dynsym and
> .dynstr sections.  You will have to translate the relocation tables.  You
> will have to build the ELF dynamic symbol hash table, and you will have
> to build the ELF dynamic information (DT_NEEDED, etc.).  You will have to
> use the imported symbols to build an ELF procedure linkage table and a
> global offset table.        


  The really difficult bit is going to be converting all the windows API calls in the .code section into linux syscalls that do the
equivalent file operations, isn't it?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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