View previous topic :: View next topic
|
Author |
Message |
abhay pratap singh
New User
Joined: 22 Nov 2007 Posts: 77 Location: noida
|
|
|
|
Please let me know Whats difference between object code and load module. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Object code is the output of a compile or an assembly.
A load module is the output of the linkage editor and is the executable. |
|
Back to top |
|
|
abhay pratap singh
New User
Joined: 22 Nov 2007 Posts: 77 Location: noida
|
|
|
|
dick scherrer wrote: |
Hello,
Object code is the output of a compile or an assembly.
A load module is the output of the linkage editor and is the executable. |
But I want to know what is the difference between the output of compile and linkage editor. Why output of compile is not executable. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The difference is that one is object (intermediate) code and the other is executable (final).
Quote: |
Why output of compile is not executable. |
Because the environment is designed this way.
Not everything in an object module is resolved. The linkage editor uses the object module and other needed components as "input", resolves unresolved references, and formats the output as a load module that is stored in a load library. Compiled object output is considerably different than linkedited load module output.
If you browse the output from a compile and the output from the linkedit of the same program, you will notice considerable differences.
Do you have some requirement or is this primarily for learning? |
|
Back to top |
|
|
abhay pratap singh
New User
Joined: 22 Nov 2007 Posts: 77 Location: noida
|
|
|
|
dick scherrer wrote: |
Hello,
The difference is that one is object (intermediate) code and the other is executable (final).
Quote: |
Why output of compile is not executable. |
Do you have some requirement or is this primarily for learning? |
This is just for learning. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
This is just for learning. |
As more is learned, there will be more questions. Someone should be here to clarify when new questions arise.
At the top of the page there is a link to "IBM Manuals". Among the cobol material is the Enterprise COBOL Programming Guide. This manual has considerable material that will answer what you ask. It also far more info that will become useful. Much of what we are talking about is here:
2.0 Compiling and debugging your program |
|
Back to top |
|
|
km_abdullah
New User
Joined: 03 Nov 2008 Posts: 60
|
|
|
|
Hi Abhay,
Quote: |
The linkage editor uses the object module and other needed components as "input", resolves unresolved references, and formats the output as a load module that is stored in a load library. |
One example for the above is, if your program calls a subprogram then the location of load module of subprogram has to be mentioned in the linkediting step. This is one main difference b/w object code and load module. |
|
Back to top |
|
|
|