View previous topic :: View next topic |
Author |
Message |
tattva Beginner
Joined: 02 Feb 2005 Posts: 97 Topics: 36
|
Posted: Fri Dec 16, 2005 10:15 am Post subject: Load Module Comparison |
|
|
Hi All,
I would like to know if there are any tools that can comapre two load modules.
Thanks,
Tattva |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Fri Dec 16, 2005 10:38 am Post subject: |
|
|
tattva,
Did you try 3.13 aka Superc?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
tattva Beginner
Joined: 02 Feb 2005 Posts: 97 Topics: 36
|
Posted: Fri Dec 16, 2005 11:16 am Post subject: |
|
|
Kolusu,
Here's an example of what am trying to achieve:-
Say a ADD statment is being replaced by COMPUTE statement, then am looking for a tool which will show me this diff by looking at the LOAD module.
Thanks,
Tattva |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Dec 16, 2005 1:53 pm Post subject: |
|
|
You are looking for a decompiler. There are companies that claim to do that, but they will not get you back to your original source. There is no way to know what the original source looked like for an optimized compiled-to-machine-code language, unless the load module contains a copy of the source and the metadata to correlate instructions to statements (some test related compiler options may do this for some languages, but you would almost never run that way in production).
Getting nearly original source, is possible in languages like Java that have bytecodes that correspond to the source, but not in a traditional language with an optimizing compiler like COBOL or PL/I. In fact, if the compiler's optimization is good, the code generated for a simple addition operation should be identical regardless of how the addition was coded in the source program. |
|
Back to top |
|
 |
tattva Beginner
Joined: 02 Feb 2005 Posts: 97 Topics: 36
|
Posted: Fri Dec 16, 2005 2:42 pm Post subject: |
|
|
semigeezer,
I got what you were trying to say, but the original business requirement is to migrate all the programs into our own system.
so we were looking whether we can compare the load module and see if the machine code generated would be the same.
Please let me know if any one has any more info on this.
Thanks,
Tattva |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Dec 16, 2005 8:42 pm Post subject: |
|
|
I assume you wil be compiling source from the old system on the compilers on the new system. I'm not sure I can be of much help, but a few thoughts come to mind and if I have any one major problem, it is keeping my thoughts to myself
The load modules will not be the same unless you are using the same compiler, compiler options and often the compilers must be not only at the same version, but also the same level of service. For some compilers, like the the enterprise cobol compiler, I've noticed that the object decks contain the compiler options used in the END cards. I doubt that information is also in the load modules but it may be.
Assuming that you want to compare load modules, there are a few things to consider.
Some data will always be different like compile dates and times. But there are other things that may be different even if you used the same source. For example the order of CSECTs in the load module may be in a different order resulting in many differences. If you link into load libraries of different blocksize, the layout will be different. There are probably other things that may differ, but a little familiarity with load module formats (documented in the linkage editor books I think) will let you know what differences to ignore.
SuperC may be smart enough to ignore some of those differences. I seem to remember something about SuperC being able to compare a simulated loaded image instead of the actual source, but that may be a "false memory".
Another approach might be to compare object decks instead of load modules. Just the RLD and ESD cards (maybe not even the RLD cards). There are utilities to delink load modules into object. I don't know anything about program objects or DLLs.
Or maybe comparing listings which include the generated assembler instead. I think it is a question for the auditors at your site to see what they would consider proof of "sameness". |
|
Back to top |
|
 |
Manas Biswal Intermediate

Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Mon Dec 19, 2005 1:41 pm Post subject: |
|
|
semigeezer,
That was quite an informative post. Thanks.
Regards,
Manas _________________ There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948) |
|
Back to top |
|
 |
|
|