Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ARM ELF specification.pdf
Скачиваний:
37
Добавлен:
23.08.2013
Размер:
281.27 Кб
Скачать

ARM ELF

4.1.1 Entry points

Entry point means a location to which control may be transferred by the execution environment.

A program can have many entry points—for example, corresponding to reset, interrupt, software interrupt, undefined instruction exception, and so on. A program loader cannot start such a program. A shared object usually has no entry point. Again, a loader cannot start execution.

An ELF executable that can be started by a program loader must have an entry address. It can be 0. EF_ARM_HASENTRY distinguishes an entry address of 0 from no program loader entry address. Consumers should accept a non-zero entry address, or a zero entry address with EF_ARM_HASENTRY set in e_flags. Producers should set EF_ARM_HASENTRY if the executable has an entry point.

In a re-locatable ELF file:

The section containing an entry point is flagged by SHF_ENTRYSECT (see section 4.3, Section headers).

The ELF header field e_entry gives the offset of the entry point in that section.

There can be at most one entry point in a re-locatable ELF file.

In an ARM executable ELF file, several program segments can be mapped at the same virtual address so:

The program segment containing the entry address is flagged by PF_ARM_ENTRY (see section4.6, Program headers).

4.2 Section names

An ARM section name is one that begins with one of the standard prefixes listed below that have pre-defined meanings, or a name containing a dollar ($) character. No other section names have special significance under the ARM EABI.

Note Bracketed SHF_ALLOC flags are set only if the section is contained in an executable program segment (one of type PT_LOAD or PT_DYNAMIC—see section 4.6, Program headers).

Note There can be many sections with the same name in an ELF file.

Figure 4-4, ARM standard section names and their meanings

Name prefix

Section type

Section attributes

Explanation

 

 

 

 

.bss

SHT_NOBITS

SHF_ALLOC+SHF_WRITE

Uninitialized data—set to zero before execution.

 

 

 

 

.comment

SHT_PROGBITS

None

A comment from the producing tool—version

 

 

 

data.

 

 

 

 

.data

SHT_PROGBITS

SHF_ALLOC+SHF_WRITE

Initialized data.

 

 

 

 

.debug…

SHT_PROGBITS

None

Debugging tables (may include line number

 

 

 

data).

 

 

 

 

.dynamic

SHT_DYNAMIC

SHF_ALLOC

Dynamic linking information—may not be

 

 

[+SHF_WRITE]

writable.

 

 

 

 

.dynsym

SHT_DYNSYM

[SHF_ALLOC]

A symbol table for dynamic linking.

 

 

 

 

.hash

SHT_HASH

[SHF_ALLOC]

A symbol hash table.

 

 

 

 

.line

SHT_PROGBITS

None

Line number data for debugging.

 

 

 

 

.rodata

SHT_PROGBITS

SHF_ALLOC

Initialized read-only data.

 

 

 

 

SWS ESPC 0003 B-02

Page 28 of 42