Skip to content

gnu_x86.py

ofrak_patch_maker.toolchain.gnu_x86

GNU_X86_32_LINUX_EABI_10_3_0_Toolchain (GNU_X86_64_LINUX_EABI_10_3_0_Toolchain)

name: str property readonly

Returns:

Type Description
str

name property that matches the value used in toolchain.conf to access paths

segment_alignment: int property readonly

For example, x86 returns 16. This will most often be used when programmatically allocating memory for code/data.

Returns:

Type Description
int

required alignment factor for the toolchain/ISA

_get_assembler_target(self, processor) private

Red Balloon Security strongly recommends all users provide their specific hardware target for best results.

Parameters:

Name Type Description Default
processor ArchInfo required

Returns:

Type Description

a default assembler target for the provided processor unless one is provided in self._config.

Exceptions:

Type Description
PatchMakerException

if no target provided and program attributes do not correspond to a default value.

Source code in ofrak_patch_maker/toolchain/gnu_x86.py
def _get_assembler_target(self, processor: ArchInfo):
    if self._config.assembler_target:
        return self._config.assembler_target
    return "generic32"