Pin
|
Enumerations | |
enum | SEC_TYPE { SEC_TYPE_INVALID, SEC_TYPE_UNUSED, SEC_TYPE_REGREL, SEC_TYPE_DYNREL, SEC_TYPE_EXEC, SEC_TYPE_DATA, SEC_TYPE_DYNAMIC, SEC_TYPE_OPD, SEC_TYPE_GOT, SEC_TYPE_STACK, SEC_TYPE_PLTOFF, SEC_TYPE_HASH, SEC_TYPE_LSDA, SEC_TYPE_UNWIND, SEC_TYPE_UNWINDINFO, SEC_TYPE_REGSYM, SEC_TYPE_DYNSYM, SEC_TYPE_DEBUG, SEC_TYPE_BSS, SEC_TYPE_SYMSTR, SEC_TYPE_DYNSTR, SEC_TYPE_SECSTR, SEC_TYPE_COMMENT, SEC_TYPE_LOOS, SEC_TYPE_USER, SEC_TYPE_PROC, SEC_TYPE_LAST } |
Functions | |
IMG | SEC_Img (SEC sec) |
SEC | SEC_Next (SEC sec) |
SEC | SEC_Prev (SEC sec) |
SEC | SEC_Invalid () |
BOOL | SEC_Valid (SEC x) |
RTN | SEC_RtnHead (SEC sec) |
RTN | SEC_RtnTail (SEC sec) |
const std::string & | SEC_Name (SEC sec) |
SEC_TYPE | SEC_Type (SEC sec) |
BOOL | SEC_Mapped (SEC sec) |
const VOID * | SEC_Data (SEC sec) |
ADDRINT | SEC_Address (SEC sec) |
BOOL | SEC_IsReadable (SEC sec) |
BOOL | SEC_IsWriteable (SEC sec) |
BOOL | SEC_IsExecutable (SEC sec) |
USIZE | SEC_Size (SEC sec) |
A SEC is modeled after the sections found inside elf images. Can be accessed at instrumentation time and analysis time.
SECs can be mapped or unmapped, a mapped SEC occupies address space inside the IMG. Unmapped SECs often contain debug and relocation information.
APIs from this group are available in any thread, including any internal thread spawned by the tool.
Iteration idioms:
enum SEC_TYPE |
This file contains SEC: Section Object and Mapping primitives
SEC types
ADDRINT SEC_Address | ( | SEC | sec | ) |
If image is loaded by system loader, the real virtual address of section will be returned. If the image is mapped by IMG_Open() the address will be inside the mapped image. On Unix, if the section is not loadable, 0 will be returned in the both cases.
const VOID* SEC_Data | ( | SEC | sec | ) |
On Linux, Pin maps the whole image file for processing. The pointer returned by SEC_Data() points inside the mapped file. Note, SEC_Data() pointer is always between IMG_StartAddress() and IMG_StartAddress() + IMG_SizeMapped(). If you are analyzing image in image-load callback, please remember that the image will be unmapped after the callback returns and the pointer provided by SEC_Data() becomes invalid. If you are working with IMG_Open() the pointer is valid until IMG_Close().
If section does not have raw data the function returns 0.
IMG SEC_Img | ( | SEC | sec | ) |
SEC SEC_Invalid | ( | ) |
BOOL SEC_IsExecutable | ( | SEC | sec | ) |
BOOL SEC_IsReadable | ( | SEC | sec | ) |
BOOL SEC_IsWriteable | ( | SEC | sec | ) |
BOOL SEC_Mapped | ( | SEC | sec | ) |
const std::string& SEC_Name | ( | SEC | sec | ) |
SEC SEC_Next | ( | SEC | sec | ) |
SEC SEC_Prev | ( | SEC | sec | ) |
RTN SEC_RtnHead | ( | SEC | sec | ) |
RTN SEC_RtnTail | ( | SEC | sec | ) |
USIZE SEC_Size | ( | SEC | sec | ) |
SEC_TYPE SEC_Type | ( | SEC | sec | ) |
BOOL SEC_Valid | ( | SEC | x | ) |