assembly - The address of the "call" instruction's location -


i think "call" instruction kind of "jump" instruction. "jump" instruction have address go. , "call" instruction either should have target address. when disassemble binary, "call" instruction have lable of target function. then, how know go? in other words, can found target address of each function? x86, arm whatever.

the addresses in assembly programming labeled symbolic names. , true not call instruction other instructions.

there reason approach - addresses depend on in memory program loaded. also, instructions contains not address itself, offset, relative current address program executed.

on other hand, programmer doesn't care exact value of address. want know address placed. why symbolic labels used.

using symbolic labels meaningful names improves readability of source code , makes program easy support , extending.

these symbolic addresses (labels) translated numbers during assembling of source code executable binary.

depending on executable format, translation partial - offsets relative beginning of code computed. these called "relocatable" labels.

later, when os loads binary particular address in memory, relocatable addresses fixed in order proper numeric values place binary loaded.

this approach common dynamic loaded libraries (dll) because loading address unknown (and different) every time library loaded in memory.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -