next up previous contents index
Next: 23.2.4 exec_info_t: executable information Up: 23.2 Types Previous: 23.2.2 exec_read_exec_func_t: executable file

23.2.3 exec_sectype_t: section type flags word

   

SYNOPSIS

#include <oskit/exec/exec.h>

typedef int exec_sectype_t;

DESCRIPTION

The following flag definitions describe the section_type value that the executable program interpreter library passes back to the client in the read_exec callback:
EXEC_SECTYPE_READ
Indicates that the pages into which this section is loaded should be given read permission.
EXEC_SECTYPE_WRITE
Indicates that the pages into which this section is loaded should be given write permission.
EXEC_SECTYPE_EXECUTE
Indicates that the pages into which this section is loaded should be given execute permission.
EXEC_SECTYPE_PROT_MASK
This is a bit mask containing the above three bits; it can be used to isolate the protection information in the section type flags word.
EXEC_SECTYPE_ALLOC
This bit indicates that this section's virtual address range is valid and the corresponding region should be allocated in the loaded program's virtual address space. Most normal program sections include both EXEC_SECTYPE_ALLOC and EXEC_SECTYPE_LOAD, indicating that the section should be allocated and loaded. However, a section with only EXEC_SECTYPE_ALLOC corresponds to an uninitialized data or ``BSS'' section: the section's address range is allocated and zero-filled. Sections that don't include EXEC_SECTYPE_ALLOC typically contain debugging, symbol table, relocations, or other information not normally loaded with the program.
EXEC_SECTYPE_LOAD
This bit indicates that at least some of the section's virtual address range should be initialized by loading it from the executable program image, as specified in the file_ofs and file_size parameters to the read_exec function above. Implies EXEC_SECTYPE_ALLOC.
EXEC_SECTYPE_DEBUG
Indicates that this section contains debugging information, such as symbol table or line number information. The specific type of debugging information it contains is indicated by other bits defined below.
EXEC_SECTYPE_AOUT_SYMTAB
Indicates that this section is the symbol table section from an a.out executable. Implies EXEC_SECTYPE_DEBUG.
EXEC_SECTYPE_AOUT_STRTAB
Indicates that this section is the string table section from an a.out executable. Implies EXEC_SECTYPE_DEBUG.


next up previous contents index
Next: 23.2.4 exec_info_t: executable information Up: 23.2 Types Previous: 23.2.2 exec_read_exec_func_t: executable file

University of Utah Flux Research Group