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
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 .
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.
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.
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).
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.
, 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.
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:
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With