This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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 convert a Linux ELF executable (with *.h file, no *.c file, no *.o file) to shared library (*.so)?


News Provider <dionysiusalexander@yahoo.com> writes:

> Summary
> =======
> Given only these two files:
>
> (1) an existing Linux32 executable file in ELF format (but no *.c file, and no *.o file), and
>
> (2) a corresponding C header file (*.h) declaring several 'extern' functions defined in the above ELF file...
>
>
> Question
> --------
> Is it possible to use gcc (or some similar tool) to produce a shared/dynamic library (*.so file) [or alternatively, a static library (*.a file)]...
>
> ...using **only** the original ELF executable and the C header file (*.h) - ie, with no C source file (*.c) and no object file (*.o) available?

No, it is not possible.  An executable is not a shared library.

Ian


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