This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question about keywords and declarations in assembly code


Hi,

I've been looking at the assembly code that is produced by 
gcc and have a few questions about some of the declarations 
and keywords found in the assembly file.

When declaring variables in ".Lfe1", what does the following 
mean?
      .Lfe1:
           .comm  aVariable,4,1
           .comm  anotherVariable,4,1

And what function does ".Lfe1" perform?

I can see that the second number means the number of bytes 
this variable should take in memory - but what does the 
second number mean, and what does ".comm" stand for? 

When a name of a function is declared "extern" in assembly 
what does this mean? i.e.
       extern aFunction

When there is ".sect" , ".text" , and ".type" at the top of 
the main declaration what do these mean? i.e.
      .sect  .text
      .type  main,@function

I'm guessing that the "main,@function" is saying that main 
is a function - is this correct?

The ".globl" keyword I guess means that this function can be 
called from anywhere in the assembly code - is this correct? 
i.e.
      .globl aFunction

Is there an online manual where I can find answers to 
questions like these above??

Thankyou for your help with these questions, I really 
appreciate it.

Simon Reynolds.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]