Answer the question
In order to leave comments, you need to log in
Why do we need alignment of (assembler) code when compiling (linking)?
Here I wrote some code, in C's for example. I fed it to the compiler, got a binary (executable). Why does the compiler (or maybe the linker) add NOPs after functions so that functions start from addresses that are multiples of some number?
I understand that you can store data on hard drives this way, round to sectors, tracks, or something like that, but in RAM, access to any section takes the same amount of time, so I don’t understand the point of rounding function addresses.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question