Thursday, 31 May 2012

Relocation algorithm

Prg_linked_origin=<link origin> from linker cmd.
For each object module
1.T_origin = translated origin of the object module. OM_size= size of object of the object module.
2.Relocation_factor=prg_linked_origin - t_origin.
3.Read the machine language program in work_area.
4.Read RELOCTAB  of the object module.
5.For each entry in RELOCTAB
a.Trans_addr = address in RELOCTAB ENTRY.
b.Address_in_work_area := address of work_area + translated_addresst_origin.
c.Add relocation_factor to the operand address in the word with the address address_in_work_area.
6.Program_linked_origin=program_linked_origin + OM_size.

1 comment:

  1. I have read your blog its very attractive and impressive. I like it your blog.

    Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training

    Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training Institutes