address of var in gas

Programming, for all ages and all languages.
Post Reply
srg

address of var in gas

Post by srg »

Hi

In AT&T syntax, how would I get the address of a certain symbol, say as variable or a C function?

if this would put the contents of mycar into eax:

movl myvar, %eax

how would I put the address of myvar into eax?

movl (myvar), %eax

or maybe

movl $myvar, %eax

thanks
srg
Post Reply