Path: blob/master/Utilities/cmliblzma/liblzma/api/lzma/bcj.h
3158 views
/* SPDX-License-Identifier: 0BSD */12/**3* \file lzma/bcj.h4* \brief Branch/Call/Jump conversion filters5* \note Never include this file directly. Use <lzma.h> instead.6*/78/*9* Author: Lasse Collin10*/1112#ifndef LZMA_H_INTERNAL13# error Never include this file directly. Use <lzma.h> instead.14#endif151617/* Filter IDs for lzma_filter.id */1819/**20* \brief Filter for x86 binaries21*/22#define LZMA_FILTER_X86 LZMA_VLI_C(0x04)2324/**25* \brief Filter for Big endian PowerPC binaries26*/27#define LZMA_FILTER_POWERPC LZMA_VLI_C(0x05)2829/**30* \brief Filter for IA-64 (Itanium) binaries31*/32#define LZMA_FILTER_IA64 LZMA_VLI_C(0x06)3334/**35* \brief Filter for ARM binaries36*/37#define LZMA_FILTER_ARM LZMA_VLI_C(0x07)3839/**40* \brief Filter for ARM-Thumb binaries41*/42#define LZMA_FILTER_ARMTHUMB LZMA_VLI_C(0x08)4344/**45* \brief Filter for SPARC binaries46*/47#define LZMA_FILTER_SPARC LZMA_VLI_C(0x09)4849/**50* \brief Filter for ARM64 binaries51*/52#define LZMA_FILTER_ARM64 LZMA_VLI_C(0x0A)5354/**55* \brief Filter for RISC-V binaries56*/57#define LZMA_FILTER_RISCV LZMA_VLI_C(0x0B)585960/**61* \brief Options for BCJ filters62*63* The BCJ filters never change the size of the data. Specifying options64* for them is optional: if pointer to options is NULL, default value is65* used. You probably never need to specify options to BCJ filters, so just66* set the options pointer to NULL and be happy.67*68* If options with non-default values have been specified when encoding,69* the same options must also be specified when decoding.70*71* \note At the moment, none of the BCJ filters support72* LZMA_SYNC_FLUSH. If LZMA_SYNC_FLUSH is specified,73* LZMA_OPTIONS_ERROR will be returned. If there is need,74* partial support for LZMA_SYNC_FLUSH can be added in future.75* Partial means that flushing would be possible only at76* offsets that are multiple of 2, 4, or 16 depending on77* the filter, except x86 which cannot be made to support78* LZMA_SYNC_FLUSH predictably.79*/80typedef struct {81/**82* \brief Start offset for conversions83*84* This setting is useful only when the same filter is used85* _separately_ for multiple sections of the same executable file,86* and the sections contain cross-section branch/call/jump87* instructions. In that case it is beneficial to set the start88* offset of the non-first sections so that the relative addresses89* of the cross-section branch/call/jump instructions will use the90* same absolute addresses as in the first section.91*92* When the pointer to options is NULL, the default value (zero)93* is used.94*/95uint32_t start_offset;9697} lzma_options_bcj;9899100