3 * \brief Branch/Call/Jump conversion filters
4 * \note Never include this file directly. Use <lzma.h> instead.
6 * See ../lzma.h for information about liblzma as a whole.
10 * Author: Lasse Collin
12 * This file has been put into the public domain.
13 * You can do whatever you want with this file.
16 #ifndef LZMA_H_INTERNAL
17 # error Never include this file directly. Use <lzma.h> instead.
21 /* Filter IDs for lzma_filter.id */
23 #define LZMA_FILTER_X86 LZMA_VLI_C(0x04)
25 * Filter for x86 binaries
28 #define LZMA_FILTER_POWERPC LZMA_VLI_C(0x05)
30 * Filter for Big endian PowerPC binaries
33 #define LZMA_FILTER_IA64 LZMA_VLI_C(0x06)
35 * Filter for IA-64 (Itanium) binaries.
38 #define LZMA_FILTER_ARM LZMA_VLI_C(0x07)
40 * Filter for ARM binaries.
43 #define LZMA_FILTER_ARMTHUMB LZMA_VLI_C(0x08)
45 * Filter for ARM-Thumb binaries.
48 #define LZMA_FILTER_SPARC LZMA_VLI_C(0x09)
50 * Filter for SPARC binaries.
53 #define LZMA_FILTER_ARM64 LZMA_VLI_C(0x0A)
55 * Filter for ARM64 binaries.
59 * \brief Options for BCJ filters (except ARM64)
61 * The BCJ filters never change the size of the data. Specifying options
62 * for them is optional: if pointer to options is NULL, default value is
63 * used. You probably never need to specify options to BCJ filters, so just
64 * set the options pointer to NULL and be happy.
66 * If options with non-default values have been specified when encoding,
67 * the same options must also be specified when decoding.
69 * \note At the moment, none of the BCJ filters support
70 * LZMA_SYNC_FLUSH. If LZMA_SYNC_FLUSH is specified,
71 * LZMA_OPTIONS_ERROR will be returned. If there is need,
72 * partial support for LZMA_SYNC_FLUSH can be added in future.
73 * Partial means that flushing would be possible only at
74 * offsets that are multiple of 2, 4, or 16 depending on
75 * the filter, except x86 which cannot be made to support
76 * LZMA_SYNC_FLUSH predictably.
80 * \brief Start offset for conversions
82 * This setting is useful only when the same filter is used
83 * _separately_ for multiple sections of the same executable file,
84 * and the sections contain cross-section branch/call/jump
85 * instructions. In that case it is beneficial to set the start
86 * offset of the non-first sections so that the relative addresses
87 * of the cross-section branch/call/jump instructions will use the
88 * same absolute addresses as in the first section.
90 * When the pointer to options is NULL, the default value (zero)
93 uint32_t start_offset
;