Skip to content

gnu_bcc_sparc.py

ofrak_patch_maker.toolchain.gnu_bcc_sparc

GNU_BCC_SPARC_Toolchain (Abstract_GNU_Toolchain)

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

name: str property readonly

Returns:

Type Description
str

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

_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
Optional[str]

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_bcc_sparc.py
def _get_assembler_target(self, processor: ArchInfo) -> Optional[str]:
    if self._config.assembler_target:
        return self._config.assembler_target
    return None

_get_compiler_target(self, processor) private

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

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
Optional[str]
Source code in ofrak_patch_maker/toolchain/gnu_bcc_sparc.py
def _get_compiler_target(self, processor: ArchInfo) -> Optional[str]:
    if self._config.compiler_target:
        return self._config.compiler_target
    return processor.isa.value.lower()