Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is absolute code and why is it known at compile time?

While studying for my Operating System Concepts final, I stumbled across

Compile time: If memory location knows, **absolute code** can be generated;
must recompile code if starting location changes

And the example gives for absolute code is the interrupt vector table. I was wondering what exactly that statement means and why is the interrupt vector table known at compile time?

like image 415
Ryan Newman Avatar asked Dec 20 '22 15:12

Ryan Newman


1 Answers

It means code that loads at a known, fixed memory address. Since that address is fixed, jumps can be compiled to point directly to their target memory addresses, with no need to use relative jump instructions or fixup anything at load time.

like image 196
Chris Tavares Avatar answered Dec 24 '22 01:12

Chris Tavares