Page 1 of 1

address of var in gas

Posted: Mon Apr 18, 2005 10:59 am
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