This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: The ".value" directive
Amittai Aviram <amittai.aviram@yale.edu> writes:
> On Nov 30, 2011, at 4:18 PM, Ian Lance Taylor wrote:
>
>> Amittai Aviram <amittai.aviram@yale.edu> writes:
>>
>>> What does the ".value" directive mean and what is it for? The assembly code I'm looking at is for x86_64, if that makes a difference. Thanks!
>>
>>
>> It puts a two byte value into the output section. E.g.,
>>
>> short x = 1;
>>
>> might generate
>>
>> x:
>> .value 1
>>
>> Ian
>
>
> Thanks, Ian. I don't quite follow your example--I would have expected
>
> short x = 1;
>
> to result in something like
>
> push $1
I meant the case where x is a global or static variable.
Ian