- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I have received from somebody else a Fortran object file (created under Linux). Can I convert it back to the source file? (I have Windows 7)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No you need the original source file (.for / .f90) , the o file is the compiled binary code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A tool that does this is called a "decompiler". As far as I know, in practical terms, especially if the object file was produced by an optimizing compiler or the -g compiler was not used, there is no such tool.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The best you might hope to achieve is to convert it to assembly code and as that is rather platform-dependent, you would have to figure out from that code what is really going on. It would be much easier to reprogram the thing if you know what it is meant to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No you can not
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An alternative question might be can you convert the Fortran Linux built .o file into a compatible Fortran Windows build .obj file. It might be possible to do this, but you may need to add helper functions if the calling conventions differ. Other than that, it is reverse engineering from the assembly code.
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page