Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In GNU Assembler, what does a dot signify at the beginning of a name?

The following is a line from a microprocessor startup file, intended for input into the GNU assembler as:

.section  .isr_vector,"a",%progbits

Does the dot at the beginning of the name .isr_vector mean anything special? PS: This name is referenced by the GNU linker ld.

EDIT:

This name also shows up in readelf output as a Section Header:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  ...
  [ 1] .isr_vector       PROGBITS        08000000 008000 0001ac 00   A  0   0  1
like image 699
Sabuncu Avatar asked Dec 29 '13 21:12

Sabuncu


People also ask

What does dot mean in assembly?

A dot preceding a name is either an assembler directive or a local label. An assembler directive tells as to do something special, for example . text tells it to generate data in the text section of the object file (for things like code and literals that cannot be changed). There's also directives like .

How to define a symbol in assembly?

Symbol definition. An ordinary symbol is defined in: The name entry in a machine or assembler instruction of the assembler language. One of the operands of an EXTRN or WXTRN instruction.

What does #$ mean in assembly?

The dollar $ sign simply means the value after it is given in hex. No dollar would mean it is in decimal. i.e. lda #$ff. is the same as.

What are the assembler directives?

Directives are instructions used by the assembler to help automate the assembly process and to improve program readability. Examples of common assembler directives are ORG (origin), EQU (equate), and DS. B (define space for a byte).

What does space do in the GNU Assembler?

Warning: In most versions of the GNU assembler, the directive .space has the effect of .block See section Machine Dependent Features . There are three directives that begin `.stab' . All emit symbols (see section Symbols ), for use by symbolic debuggers.

How do you name an assembler directive?

, previous, next, last section, table of contents . All assembler directives have names that begin with a period ( `.' ). The rest of the name is letters, usually in lower case. This chapter discusses directives that are available regardless of the target machine configuration for the GNU assembler.

Why machine codes are not generated for assembler directives?

However, machine codes are only generated for the program that must be provided to the processor and not for assembler directives because they do not belong to the actual program. The assembler directives given below are used by 8085 and 8086 assemblers:

What is the use of double-word in assembly language?

The is used to inform the assembler that the stored data in memory is a double word. Thus memory stores the given data in the form: It is used to initialise quad words (8-bytes) either one or more than one. Thereby informing the assembler that the data stored in memory is quad-word. It is used to allocate and initialize 10 bytes of a variable.


1 Answers

A dot preceding a name is either an assembler directive or a local label.

An assembler directive tells as to do something special, for example .text tells it to generate data in the text section of the object file (for things like code and literals that cannot be changed). There's also directives like .space which tell it to allocate empty space in the object file, this is often used to allocate space in the bss section.

On the other hand, we have local labels like .L1 that are used in the code but aren't meant to be exported in the object file and should be hidden from the symbol table.

like image 105
randomusername Avatar answered Oct 18 '22 10:10

randomusername