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 ?


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.

For this project you are going to have to have a complete
understanding of what both a PE DLL and an ELF shared library look
like.  It's not a simple task.

BFD isn't going to help you very much with this job.

I don't know the answer to your specific questions.  It could be any
number of different things.

Good luck.

Ian


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