Suppose i have two functions in x86 assembly language defined as :
.globl func_name1;
.type func_name1, @function;
.align 2;
func_name1:
//Some assembly instructions here.
and similarly second function:
.globl func_name2;
.type func_name2, @function;
.align 2;
func_name2:
//Some assembly instructions here.
Now what is the meaning of the following-
.data
.globl var_temp
var_temp:
.long func_name1
.long func_name2
Thanks in advance !
Those .long’s define pointers to functions.
var_templooks like an array of 2 pointers to functions.