The FreeRADIUS server $Id: f3670dba8951ca10eb4948feb3dc3db9423a334f $
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions | Variables
elf.c File Reference
#include "config.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <link.h>
#include "backtrace.h"
#include "internal.h"
+ Include dependency graph for elf.c:

Go to the source code of this file.

Data Structures

struct  b_elf_chdr
 
struct  b_elf_ehdr
 
struct  b_elf_note
 
struct  b_elf_shdr
 
struct  b_elf_sym
 
struct  elf_ppc64_opd_data
 
struct  elf_symbol
 
struct  elf_syminfo_data
 
struct  elf_view
 
struct  elf_zstd_fse_baseline_entry
 
struct  elf_zstd_fse_entry
 
struct  elf_zstd_seq_decode
 
struct  phdr_data
 

Macros

#define __builtin_prefetch(p, r, l)
 
#define BACKTRACE_ELFCLASS   ELFCLASS64
 
#define EF_PPC64_ABI   3
 
#define EI_CLASS   4
 
#define EI_DATA   5
 
#define EI_MAG0   0
 
#define EI_MAG1   1
 
#define EI_MAG2   2
 
#define EI_MAG3   3
 
#define EI_NIDENT   16
 
#define EI_VERSION   6
 
#define ELFCLASS32   1
 
#define ELFCLASS64   2
 
#define ELFCOMPRESS_ZLIB   1
 
#define ELFCOMPRESS_ZSTD   2
 
#define ELFDATA2LSB   1
 
#define ELFDATA2MSB   2
 
#define ELFMAG0   0x7f
 
#define ELFMAG1   'E'
 
#define ELFMAG2   'L'
 
#define ELFMAG3   'F'
 
#define EM_PPC64   21
 
#define ET_DYN   3
 
#define EV_CURRENT   1
 
#define LZMA_ALIGN_SIZE   (16)
 
#define LZMA_DIST_ALIGN(dist)    (LZMA_PROB_DIST_ALIGN_OFFSET + (dist))
 
#define LZMA_DIST_MODEL_END   (14)
 
#define LZMA_DIST_MODEL_START   (4)
 
#define LZMA_DIST_SLOT(dist, slot)    (LZMA_PROB_DIST_SLOT_OFFSET + (dist) * LZMA_DIST_SLOTS + (slot))
 
#define LZMA_DIST_SLOTS   (64)
 
#define LZMA_DIST_SPECIAL(dist)    (LZMA_PROB_DIST_SPECIAL_OFFSET + (dist))
 
#define LZMA_DIST_STATES   (4)
 
#define LZMA_FULL_DISTANCES   (128)
 
#define LZMA_IS_MATCH(state, pos)    (LZMA_PROB_IS_MATCH_OFFSET + (state) * LZMA_POS_STATES + (pos))
 
#define LZMA_IS_REP(state)    (LZMA_PROB_IS_REP_OFFSET + (state))
 
#define LZMA_IS_REP0(state)    (LZMA_PROB_IS_REP0_OFFSET + (state))
 
#define LZMA_IS_REP0_LONG(state, pos)    (LZMA_PROB_IS_REP0_LONG_OFFSET + (state) * LZMA_POS_STATES + (pos))
 
#define LZMA_IS_REP1(state)    (LZMA_PROB_IS_REP1_OFFSET + (state))
 
#define LZMA_IS_REP2(state)    (LZMA_PROB_IS_REP2_OFFSET + (state))
 
#define LZMA_LEN_HIGH_SYMBOLS   (256)
 
#define LZMA_LEN_LOW_SYMBOLS   (8)
 
#define LZMA_LEN_MID_SYMBOLS   (8)
 
#define LZMA_LITERAL(code, size)    (LZMA_PROB_LITERAL_OFFSET + (code) * LZMA_LITERAL_CODER_SIZE + (size))
 
#define LZMA_LITERAL_CODER_SIZE   (0x300)
 
#define LZMA_LITERAL_CODERS_MAX   (16)
 
#define LZMA_MATCH_LEN_CHOICE    LZMA_PROB_MATCH_LEN_CHOICE_OFFSET
 
#define LZMA_MATCH_LEN_CHOICE2    LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET
 
#define LZMA_MATCH_LEN_HIGH(sym)    (LZMA_PROB_MATCH_LEN_HIGH_OFFSET + (sym))
 
#define LZMA_MATCH_LEN_LOW(pos, sym)    (LZMA_PROB_MATCH_LEN_LOW_OFFSET + (pos) * LZMA_LEN_LOW_SYMBOLS + (sym))
 
#define LZMA_MATCH_LEN_MID(pos, sym)    (LZMA_PROB_MATCH_LEN_MID_OFFSET + (pos) * LZMA_LEN_MID_SYMBOLS + (sym))
 
#define LZMA_POS_STATES   (16)
 
#define LZMA_PROB_DIST_ALIGN_LEN   LZMA_ALIGN_SIZE
 
#define LZMA_PROB_DIST_ALIGN_OFFSET    (LZMA_PROB_DIST_SPECIAL_OFFSET + LZMA_PROB_DIST_SPECIAL_LEN)
 
#define LZMA_PROB_DIST_SLOT_LEN   (LZMA_DIST_STATES * LZMA_DIST_SLOTS)
 
#define LZMA_PROB_DIST_SLOT_OFFSET    (LZMA_PROB_IS_REP0_LONG_OFFSET + LZMA_PROB_IS_REP0_LONG_LEN)
 
#define LZMA_PROB_DIST_SPECIAL_LEN   (LZMA_FULL_DISTANCES - LZMA_DIST_MODEL_END)
 
#define LZMA_PROB_DIST_SPECIAL_OFFSET    (LZMA_PROB_DIST_SLOT_OFFSET + LZMA_PROB_DIST_SLOT_LEN)
 
#define LZMA_PROB_IS_MATCH_LEN   (LZMA_STATES * LZMA_POS_STATES)
 
#define LZMA_PROB_IS_MATCH_OFFSET   0
 
#define LZMA_PROB_IS_REP0_LEN   LZMA_STATES
 
#define LZMA_PROB_IS_REP0_LONG_LEN   (LZMA_STATES * LZMA_POS_STATES)
 
#define LZMA_PROB_IS_REP0_LONG_OFFSET    (LZMA_PROB_IS_REP2_OFFSET + LZMA_PROB_IS_REP2_LEN)
 
#define LZMA_PROB_IS_REP0_OFFSET    (LZMA_PROB_IS_REP_OFFSET + LZMA_PROB_IS_REP_LEN)
 
#define LZMA_PROB_IS_REP1_LEN   LZMA_STATES
 
#define LZMA_PROB_IS_REP1_OFFSET    (LZMA_PROB_IS_REP0_OFFSET + LZMA_PROB_IS_REP0_LEN)
 
#define LZMA_PROB_IS_REP2_LEN   LZMA_STATES
 
#define LZMA_PROB_IS_REP2_OFFSET    (LZMA_PROB_IS_REP1_OFFSET + LZMA_PROB_IS_REP1_LEN)
 
#define LZMA_PROB_IS_REP_LEN   LZMA_STATES
 
#define LZMA_PROB_IS_REP_OFFSET    (LZMA_PROB_IS_MATCH_OFFSET + LZMA_PROB_IS_MATCH_LEN)
 
#define LZMA_PROB_LITERAL_LEN    (LZMA_LITERAL_CODERS_MAX * LZMA_LITERAL_CODER_SIZE)
 
#define LZMA_PROB_LITERAL_OFFSET    (LZMA_PROB_REP_LEN_HIGH_OFFSET + LZMA_PROB_REP_LEN_HIGH_LEN)
 
#define LZMA_PROB_MATCH_LEN_CHOICE2_LEN   1
 
#define LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET    (LZMA_PROB_MATCH_LEN_CHOICE_OFFSET + LZMA_PROB_MATCH_LEN_CHOICE_LEN)
 
#define LZMA_PROB_MATCH_LEN_CHOICE_LEN   1
 
#define LZMA_PROB_MATCH_LEN_CHOICE_OFFSET    (LZMA_PROB_DIST_ALIGN_OFFSET + LZMA_PROB_DIST_ALIGN_LEN)
 
#define LZMA_PROB_MATCH_LEN_HIGH_LEN   LZMA_LEN_HIGH_SYMBOLS
 
#define LZMA_PROB_MATCH_LEN_HIGH_OFFSET    (LZMA_PROB_MATCH_LEN_MID_OFFSET + LZMA_PROB_MATCH_LEN_MID_LEN)
 
#define LZMA_PROB_MATCH_LEN_LOW_LEN   (LZMA_POS_STATES * LZMA_LEN_LOW_SYMBOLS)
 
#define LZMA_PROB_MATCH_LEN_LOW_OFFSET    (LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET + LZMA_PROB_MATCH_LEN_CHOICE2_LEN)
 
#define LZMA_PROB_MATCH_LEN_MID_LEN   (LZMA_POS_STATES * LZMA_LEN_MID_SYMBOLS)
 
#define LZMA_PROB_MATCH_LEN_MID_OFFSET    (LZMA_PROB_MATCH_LEN_LOW_OFFSET + LZMA_PROB_MATCH_LEN_LOW_LEN)
 
#define LZMA_PROB_REP_LEN_CHOICE2_LEN   1
 
#define LZMA_PROB_REP_LEN_CHOICE2_OFFSET    (LZMA_PROB_REP_LEN_CHOICE_OFFSET + LZMA_PROB_REP_LEN_CHOICE_LEN)
 
#define LZMA_PROB_REP_LEN_CHOICE_LEN   1
 
#define LZMA_PROB_REP_LEN_CHOICE_OFFSET    (LZMA_PROB_MATCH_LEN_HIGH_OFFSET + LZMA_PROB_MATCH_LEN_HIGH_LEN)
 
#define LZMA_PROB_REP_LEN_HIGH_LEN   LZMA_LEN_HIGH_SYMBOLS
 
#define LZMA_PROB_REP_LEN_HIGH_OFFSET    (LZMA_PROB_REP_LEN_MID_OFFSET + LZMA_PROB_REP_LEN_MID_LEN)
 
#define LZMA_PROB_REP_LEN_LOW_LEN   (LZMA_POS_STATES * LZMA_LEN_LOW_SYMBOLS)
 
#define LZMA_PROB_REP_LEN_LOW_OFFSET    (LZMA_PROB_REP_LEN_CHOICE2_OFFSET + LZMA_PROB_REP_LEN_CHOICE2_LEN)
 
#define LZMA_PROB_REP_LEN_MID_LEN   (LZMA_POS_STATES * LZMA_LEN_MID_SYMBOLS)
 
#define LZMA_PROB_REP_LEN_MID_OFFSET    (LZMA_PROB_REP_LEN_LOW_OFFSET + LZMA_PROB_REP_LEN_LOW_LEN)
 
#define LZMA_PROB_TOTAL_COUNT    (LZMA_PROB_LITERAL_OFFSET + LZMA_PROB_LITERAL_LEN)
 
#define LZMA_REP_LEN_CHOICE    LZMA_PROB_REP_LEN_CHOICE_OFFSET
 
#define LZMA_REP_LEN_CHOICE2    LZMA_PROB_REP_LEN_CHOICE2_OFFSET
 
#define LZMA_REP_LEN_HIGH(sym)    (LZMA_PROB_REP_LEN_HIGH_OFFSET + (sym))
 
#define LZMA_REP_LEN_LOW(pos, sym)    (LZMA_PROB_REP_LEN_LOW_OFFSET + (pos) * LZMA_LEN_LOW_SYMBOLS + (sym))
 
#define LZMA_REP_LEN_MID(pos, sym)    (LZMA_PROB_REP_LEN_MID_OFFSET + (pos) * LZMA_LEN_MID_SYMBOLS + (sym))
 
#define LZMA_STATES   (12)
 
#define NT_GNU_BUILD_ID   3
 
#define S_IFLNK   0120000
 
#define S_IFMT   0170000
 
#define S_ISLNK(m)   (((m) & S_IFMT) == S_IFLNK)
 
#define SHF_COMPRESSED   0x800
 
#define SHN_LORESERVE   0xFF00 /* Begin range of reserved indices */
 
#define SHN_UNDEF   0x0000 /* Undefined section */
 
#define SHN_XINDEX   0xFFFF /* Section index is held elsewhere */
 
#define SHT_DYNSYM   11
 
#define SHT_PROGBITS   1
 
#define SHT_STRTAB   3
 
#define SHT_SYMTAB   2
 
#define strnlen   xstrnlen
 
#define STT_FUNC   2
 
#define STT_OBJECT   1
 
#define SYSTEM_BUILD_ID_DIR   "/usr/lib/debug/.build-id/"
 
#define unlikely(x)   (x)
 
#define ZDEBUG_TABLE_SIZE    (ZLIB_TABLE_SIZE > ZSTD_TABLE_SIZE ? ZLIB_TABLE_SIZE : ZSTD_TABLE_SIZE)
 
#define ZLIB_HUFFMAN_BITS_MASK   0x7
 
#define ZLIB_HUFFMAN_BITS_SHIFT   9
 
#define ZLIB_HUFFMAN_SECONDARY_SHIFT   12
 
#define ZLIB_HUFFMAN_TABLE_SIZE   (1024)
 
#define ZLIB_HUFFMAN_VALUE_MASK   0x01ff
 
#define ZLIB_TABLE_CODELEN_OFFSET
 
#define ZLIB_TABLE_SIZE
 
#define ZLIB_TABLE_WORK_OFFSET    (2 * ZLIB_HUFFMAN_TABLE_SIZE * sizeof (uint16_t))
 
#define ZSTD_DECODE_BASEBITS(baseline_basebits)    ((uint32_t)(baseline_basebits) >> 24)
 
#define ZSTD_DECODE_BASELINE(baseline_basebits)    ((uint32_t)(baseline_basebits) & 0xffffff)
 
#define ZSTD_ENCODE_BASELINE_BITS(baseline, basebits)    ((uint32_t)(baseline) | ((uint32_t)(basebits) << 24))
 
#define ZSTD_LITERAL_LENGTH_BASELINE_OFFSET   (16)
 
#define ZSTD_MATCH_LENGTH_BASELINE_OFFSET   (32)
 
#define ZSTD_TABLE_HUFFMAN_OFFSET
 
#define ZSTD_TABLE_LITERAL_FSE_OFFSET   (0)
 
#define ZSTD_TABLE_MATCH_FSE_OFFSET    (512 * sizeof (struct elf_zstd_fse_baseline_entry))
 
#define ZSTD_TABLE_OFFSET_FSE_OFFSET
 
#define ZSTD_TABLE_SIZE
 
#define ZSTD_TABLE_WORK_OFFSET    (ZSTD_TABLE_HUFFMAN_OFFSET + 2048 * sizeof (uint16_t))
 

Typedefs

typedef uint64_t b_elf_addr
 
typedef uint16_t b_elf_half
 
typedef uint64_t b_elf_off
 
typedef int32_t b_elf_sword
 
typedef int64_t b_elf_sxword
 
typedef uint32_t b_elf_word
 
typedef uint64_t b_elf_wxword
 
typedef uint64_t b_elf_xword
 

Functions

int backtrace_initialize (struct backtrace_state *state, const char *filename, int descriptor, backtrace_error_callback error_callback, void *data, fileline *fileline_fn)
 
int backtrace_uncompress_lzma (struct backtrace_state *state, const unsigned char *compressed, size_t compressed_size, backtrace_error_callback error_callback, void *data, unsigned char **uncompressed, size_t *uncompressed_size)
 
int backtrace_uncompress_zdebug (struct backtrace_state *state, const unsigned char *compressed, size_t compressed_size, backtrace_error_callback error_callback, void *data, unsigned char **uncompressed, size_t *uncompressed_size)
 
int backtrace_uncompress_zstd (struct backtrace_state *state, const unsigned char *compressed, size_t compressed_size, backtrace_error_callback error_callback, void *data, unsigned char *uncompressed, size_t uncompressed_size)
 
static int elf_add (struct backtrace_state *state, const char *filename, int descriptor, const unsigned char *memory, size_t memory_size, struct libbacktrace_base_address base_address, struct elf_ppc64_opd_data *caller_opd, backtrace_error_callback error_callback, void *data, fileline *fileline_fn, int *found_sym, int *found_dwarf, struct dwarf_data **fileline_entry, int exe, int debuginfo, const char *with_buildid_data, uint32_t with_buildid_size)
 
static void elf_add_syminfo_data (struct backtrace_state *state, struct elf_syminfo_data *edata)
 
static uint32_t elf_crc32 (uint32_t crc, const unsigned char *buf, size_t len)
 
static uint32_t elf_crc32_file (struct backtrace_state *state, int descriptor, backtrace_error_callback error_callback, void *data)
 
static int elf_fetch_backward_init (const unsigned char **ppin, const unsigned char *pinend, uint64_t *pval, unsigned int *pbits)
 
static int elf_fetch_bits (const unsigned char **ppin, const unsigned char *pinend, uint64_t *pval, unsigned int *pbits)
 
static int elf_fetch_bits_backward (const unsigned char **ppin, const unsigned char *pinend, uint64_t *pval, unsigned int *pbits)
 
static int elf_find_debugfile_by_debuglink (struct backtrace_state *state, const char *filename, const char *debuglink_name, backtrace_error_callback error_callback, void *data)
 
static int elf_get_view (struct backtrace_state *state, int descriptor, const unsigned char *memory, size_t memory_size, off_t offset, uint64_t size, backtrace_error_callback error_callback, void *data, struct elf_view *view)
 
static int elf_initialize_syminfo (struct backtrace_state *state, struct libbacktrace_base_address base_address, const unsigned char *symtab_data, size_t symtab_size, const unsigned char *strtab, size_t strtab_size, backtrace_error_callback error_callback, void *data, struct elf_syminfo_data *sdata, struct elf_ppc64_opd_data *opd)
 
static int elf_is_symlink (const char *filename)
 
static int elf_lzma_bit (const unsigned char *compressed, size_t compressed_size, uint16_t *prob, size_t *poffset, uint32_t *prange, uint32_t *pcode)
 
static uint32_t elf_lzma_integer (const unsigned char *compressed, size_t compressed_size, uint16_t *probs, uint32_t bits, size_t *poffset, uint32_t *prange, uint32_t *pcode)
 
static uint32_t elf_lzma_len (const unsigned char *compressed, size_t compressed_size, uint16_t *probs, int is_rep, unsigned int pos_state, size_t *poffset, uint32_t *prange, uint32_t *pcode)
 
static void elf_lzma_range_normalize (const unsigned char *compressed, size_t compressed_size, size_t *poffset, uint32_t *prange, uint32_t *pcode)
 
static uint32_t elf_lzma_reverse_integer (const unsigned char *compressed, size_t compressed_size, uint16_t *probs, uint32_t bits, size_t *poffset, uint32_t *prange, uint32_t *pcode)
 
static int elf_lzma_varint (const unsigned char *compressed, size_t compressed_size, size_t *poffset, uint64_t *val)
 
static int elf_nodebug (struct backtrace_state *state, uintptr_t pc, backtrace_full_callback callback, backtrace_error_callback error_callback, void *data)
 
static void elf_nosyms (struct backtrace_state *state ATTRIBUTE_UNUSED, uintptr_t addr ATTRIBUTE_UNUSED, backtrace_syminfo_callback callback ATTRIBUTE_UNUSED, backtrace_error_callback error_callback, void *data)
 
static int elf_open_debugfile_by_buildid (struct backtrace_state *state, const char *buildid_data, size_t buildid_size, backtrace_error_callback error_callback, void *data)
 
static int elf_open_debugfile_by_debuglink (struct backtrace_state *state, const char *filename, const char *debuglink_name, uint32_t debuglink_crc, backtrace_error_callback error_callback, void *data)
 
static char * elf_readlink (struct backtrace_state *state, const char *filename, backtrace_error_callback error_callback, void *data, size_t *plen)
 
static void elf_release_view (struct backtrace_state *state, struct elf_view *view, backtrace_error_callback error_callback, void *data)
 
static int elf_symbol_compare (const void *v1, const void *v2)
 
static int elf_symbol_search (const void *vkey, const void *ventry)
 
static void elf_syminfo (struct backtrace_state *state, uintptr_t addr, backtrace_syminfo_callback callback, backtrace_error_callback error_callback ATTRIBUTE_UNUSED, void *data)
 
static int elf_try_debugfile (struct backtrace_state *state, const char *prefix, size_t prefix_len, const char *prefix2, size_t prefix2_len, const char *debuglink_name, backtrace_error_callback error_callback, void *data)
 
static int elf_uncompress_chdr (struct backtrace_state *state, const unsigned char *compressed, size_t compressed_size, uint16_t *zdebug_table, backtrace_error_callback error_callback, void *data, unsigned char **uncompressed, size_t *uncompressed_size)
 
static void elf_uncompress_failed (void)
 
static int elf_uncompress_lzma (struct backtrace_state *state, const unsigned char *compressed, size_t compressed_size, backtrace_error_callback error_callback, void *data, unsigned char **uncompressed, size_t *uncompressed_size)
 
static int elf_uncompress_lzma_block (const unsigned char *compressed, size_t compressed_size, unsigned char check, uint16_t *probs, unsigned char *uncompressed, size_t uncompressed_size, size_t *poffset)
 
static int elf_uncompress_zdebug (struct backtrace_state *state, const unsigned char *compressed, size_t compressed_size, uint16_t *zdebug_table, backtrace_error_callback error_callback, void *data, unsigned char **uncompressed, size_t *uncompressed_size)
 
static int elf_zlib_inflate (const unsigned char *pin, size_t sin, uint16_t *zdebug_table, unsigned char *pout, size_t sout)
 
static int elf_zlib_inflate_and_verify (const unsigned char *pin, size_t sin, uint16_t *zdebug_table, unsigned char *pout, size_t sout)
 
static int elf_zlib_inflate_table (unsigned char *codes, size_t codes_len, uint16_t *zdebug_table, uint16_t *table)
 
static int elf_zlib_verify_checksum (const unsigned char *checkbytes, const unsigned char *uncompressed, size_t uncompressed_size)
 
static int elf_zstd_build_fse (const int16_t *, int, uint16_t *, int, struct elf_zstd_fse_entry *)
 
static int elf_zstd_decompress (const unsigned char *pin, size_t sin, unsigned char *zdebug_table, unsigned char *pout, size_t sout)
 
static int elf_zstd_make_literal_baseline_fse (const struct elf_zstd_fse_entry *fse_table, int table_bits, struct elf_zstd_fse_baseline_entry *baseline_table)
 
static int elf_zstd_make_match_baseline_fse (const struct elf_zstd_fse_entry *fse_table, int table_bits, struct elf_zstd_fse_baseline_entry *baseline_table)
 
static int elf_zstd_make_offset_baseline_fse (const struct elf_zstd_fse_entry *fse_table, int table_bits, struct elf_zstd_fse_baseline_entry *baseline_table)
 
static int elf_zstd_read_fse (const unsigned char **ppin, const unsigned char *pinend, uint16_t *zdebug_table, int maxidx, struct elf_zstd_fse_entry *table, int *table_bits)
 
static int elf_zstd_read_huff (const unsigned char **ppin, const unsigned char *pinend, uint16_t *zdebug_table, uint16_t *table, int *ptable_bits)
 
static int elf_zstd_read_literals (const unsigned char **ppin, const unsigned char *pinend, unsigned char *pout, unsigned char *poutend, uint16_t *scratch, uint16_t *huffman_table, int *phuffman_table_bits, unsigned char **pplit)
 
static int elf_zstd_unpack_seq_decode (int mode, const unsigned char **ppin, const unsigned char *pinend, const struct elf_zstd_fse_baseline_entry *predef, int predef_bits, uint16_t *scratch, int maxidx, struct elf_zstd_fse_baseline_entry *table, int table_bits, int(*conv)(const struct elf_zstd_fse_entry *, int, struct elf_zstd_fse_baseline_entry *), struct elf_zstd_seq_decode *decode)
 
static int phdr_callback (struct dl_phdr_info *info, size_t size ATTRIBUTE_UNUSED, void *pdata)
 
static size_t xstrnlen (const char *s, size_t maxlen)
 

Variables

static const char *const dwarf_section_names [DEBUG_MAX]
 
static const uint16_t elf_zlib_default_dist_table [0x100]
 
static const uint16_t elf_zlib_default_table [0x170]
 
static const struct elf_zstd_fse_baseline_entry elf_zstd_lit_table [64]
 
static const uint32_t elf_zstd_literal_length_base []
 
static const uint32_t elf_zstd_match_length_base []
 
static const struct elf_zstd_fse_baseline_entry elf_zstd_match_table [64]
 
static const struct elf_zstd_fse_baseline_entry elf_zstd_offset_table [32]
 

Data Structure Documentation

◆ b_elf_chdr

struct b_elf_chdr

Definition at line 334 of file elf.c.

Data Fields
b_elf_xword ch_addralign
b_elf_word ch_reserved
b_elf_xword ch_size
b_elf_word ch_type

◆ b_elf_ehdr

struct b_elf_ehdr

Definition at line 217 of file elf.c.

Data Fields
b_elf_half e_ehsize
b_elf_addr e_entry
b_elf_word e_flags
unsigned char e_ident[EI_NIDENT]
b_elf_half e_machine
b_elf_half e_phentsize
b_elf_half e_phnum
b_elf_off e_phoff
b_elf_half e_shentsize
b_elf_half e_shnum
b_elf_off e_shoff
b_elf_half e_shstrndx
b_elf_half e_type
b_elf_word e_version

◆ b_elf_note

struct b_elf_note

Definition at line 313 of file elf.c.

Data Fields
uint32_t descsz
char name[1]
uint32_t namesz
uint32_t type

◆ b_elf_shdr

struct b_elf_shdr

Definition at line 260 of file elf.c.

Data Fields
b_elf_addr sh_addr
b_elf_wxword sh_addralign
b_elf_wxword sh_entsize
b_elf_wxword sh_flags
b_elf_word sh_info
b_elf_word sh_link
b_elf_word sh_name
b_elf_off sh_offset
b_elf_wxword sh_size
b_elf_word sh_type

◆ b_elf_sym

struct b_elf_sym

Definition at line 298 of file elf.c.

Data Fields
unsigned char st_info
b_elf_word st_name
unsigned char st_other
b_elf_half st_shndx
b_elf_xword st_size
b_elf_addr st_value

◆ debug_section_info

struct debug_section_info

Definition at line 364 of file elf.c.

Data Fields
int compressed
const unsigned char * data
off_t offset
size_t size

◆ elf_ppc64_opd_data

struct elf_ppc64_opd_data

Definition at line 410 of file elf.c.

+ Collaboration diagram for elf_ppc64_opd_data:
Data Fields
b_elf_addr addr
const char * data
size_t size
struct elf_view view

◆ elf_symbol

struct elf_symbol

Definition at line 378 of file elf.c.

Data Fields
uintptr_t address
const char * name
size_t size

◆ elf_syminfo_data

struct elf_syminfo_data

Definition at line 390 of file elf.c.

+ Collaboration diagram for elf_syminfo_data:
Data Fields
size_t count
struct elf_syminfo_data * next
struct elf_symbol * symbols

◆ elf_view

struct elf_view

Definition at line 402 of file elf.c.

+ Collaboration diagram for elf_view:
Data Fields
int release
struct backtrace_view view

◆ elf_zstd_fse_baseline_entry

struct elf_zstd_fse_baseline_entry

Definition at line 3059 of file elf.c.

Data Fields
uint16_t base
unsigned char basebits
uint32_t baseline
unsigned char bits

◆ elf_zstd_fse_entry

struct elf_zstd_fse_entry

Definition at line 2697 of file elf.c.

Data Fields
uint16_t base
unsigned char bits
unsigned char symbol

◆ elf_zstd_seq_decode

struct elf_zstd_seq_decode

Definition at line 4259 of file elf.c.

+ Collaboration diagram for elf_zstd_seq_decode:
Data Fields
const struct elf_zstd_fse_baseline_entry * table
int table_bits

◆ phdr_data

struct phdr_data

Definition at line 7334 of file elf.c.

+ Collaboration diagram for phdr_data:
Data Fields
void * data
backtrace_error_callback error_callback
int exe_descriptor
const char * exe_filename
fileline * fileline_fn
int * found_dwarf
int * found_sym
struct backtrace_state * state

Macro Definition Documentation

◆ __builtin_prefetch

#define __builtin_prefetch (   p,
  r,
 
)

Definition at line 65 of file elf.c.

◆ BACKTRACE_ELFCLASS

#define BACKTRACE_ELFCLASS   ELFCLASS64

◆ EF_PPC64_ABI

#define EF_PPC64_ABI   3

Definition at line 258 of file elf.c.

◆ EI_CLASS

#define EI_CLASS   4

Definition at line 238 of file elf.c.

◆ EI_DATA

#define EI_DATA   5

Definition at line 239 of file elf.c.

◆ EI_MAG0

#define EI_MAG0   0

Definition at line 234 of file elf.c.

◆ EI_MAG1

#define EI_MAG1   1

Definition at line 235 of file elf.c.

◆ EI_MAG2

#define EI_MAG2   2

Definition at line 236 of file elf.c.

◆ EI_MAG3

#define EI_MAG3   3

Definition at line 237 of file elf.c.

◆ EI_NIDENT

#define EI_NIDENT   16

Definition at line 215 of file elf.c.

◆ EI_VERSION

#define EI_VERSION   6

Definition at line 240 of file elf.c.

◆ ELFCLASS32

#define ELFCLASS32   1

Definition at line 247 of file elf.c.

◆ ELFCLASS64

#define ELFCLASS64   2

Definition at line 248 of file elf.c.

◆ ELFCOMPRESS_ZLIB

#define ELFCOMPRESS_ZLIB   1

Definition at line 344 of file elf.c.

◆ ELFCOMPRESS_ZSTD

#define ELFCOMPRESS_ZSTD   2

Definition at line 345 of file elf.c.

◆ ELFDATA2LSB

#define ELFDATA2LSB   1

Definition at line 250 of file elf.c.

◆ ELFDATA2MSB

#define ELFDATA2MSB   2

Definition at line 251 of file elf.c.

◆ ELFMAG0

#define ELFMAG0   0x7f

Definition at line 242 of file elf.c.

◆ ELFMAG1

#define ELFMAG1   'E'

Definition at line 243 of file elf.c.

◆ ELFMAG2

#define ELFMAG2   'L'

Definition at line 244 of file elf.c.

◆ ELFMAG3

#define ELFMAG3   'F'

Definition at line 245 of file elf.c.

◆ EM_PPC64

#define EM_PPC64   21

Definition at line 257 of file elf.c.

◆ ET_DYN

#define ET_DYN   3

Definition at line 255 of file elf.c.

◆ EV_CURRENT

#define EV_CURRENT   1

Definition at line 253 of file elf.c.

◆ LZMA_ALIGN_SIZE

#define LZMA_ALIGN_SIZE   (16)

Definition at line 5220 of file elf.c.

◆ LZMA_DIST_ALIGN

#define LZMA_DIST_ALIGN (   dist)     (LZMA_PROB_DIST_ALIGN_OFFSET + (dist))

Definition at line 5333 of file elf.c.

◆ LZMA_DIST_MODEL_END

#define LZMA_DIST_MODEL_END   (14)

Definition at line 5214 of file elf.c.

◆ LZMA_DIST_MODEL_START

#define LZMA_DIST_MODEL_START   (4)

Definition at line 5211 of file elf.c.

◆ LZMA_DIST_SLOT

#define LZMA_DIST_SLOT (   dist,
  slot 
)     (LZMA_PROB_DIST_SLOT_OFFSET + (dist) * LZMA_DIST_SLOTS + (slot))

Definition at line 5329 of file elf.c.

◆ LZMA_DIST_SLOTS

#define LZMA_DIST_SLOTS   (64)

Definition at line 5207 of file elf.c.

◆ LZMA_DIST_SPECIAL

#define LZMA_DIST_SPECIAL (   dist)     (LZMA_PROB_DIST_SPECIAL_OFFSET + (dist))

Definition at line 5331 of file elf.c.

◆ LZMA_DIST_STATES

#define LZMA_DIST_STATES   (4)

Definition at line 5203 of file elf.c.

◆ LZMA_FULL_DISTANCES

#define LZMA_FULL_DISTANCES   (128)

Definition at line 5217 of file elf.c.

◆ LZMA_IS_MATCH

#define LZMA_IS_MATCH (   state,
  pos 
)     (LZMA_PROB_IS_MATCH_OFFSET + (state) * LZMA_POS_STATES + (pos))

Definition at line 5317 of file elf.c.

◆ LZMA_IS_REP

#define LZMA_IS_REP (   state)     (LZMA_PROB_IS_REP_OFFSET + (state))

Definition at line 5319 of file elf.c.

◆ LZMA_IS_REP0

#define LZMA_IS_REP0 (   state)     (LZMA_PROB_IS_REP0_OFFSET + (state))

Definition at line 5321 of file elf.c.

◆ LZMA_IS_REP0_LONG

#define LZMA_IS_REP0_LONG (   state,
  pos 
)     (LZMA_PROB_IS_REP0_LONG_OFFSET + (state) * LZMA_POS_STATES + (pos))

Definition at line 5327 of file elf.c.

◆ LZMA_IS_REP1

#define LZMA_IS_REP1 (   state)     (LZMA_PROB_IS_REP1_OFFSET + (state))

Definition at line 5323 of file elf.c.

◆ LZMA_IS_REP2

#define LZMA_IS_REP2 (   state)     (LZMA_PROB_IS_REP2_OFFSET + (state))

Definition at line 5325 of file elf.c.

◆ LZMA_LEN_HIGH_SYMBOLS

#define LZMA_LEN_HIGH_SYMBOLS   (256)

Definition at line 5226 of file elf.c.

◆ LZMA_LEN_LOW_SYMBOLS

#define LZMA_LEN_LOW_SYMBOLS   (8)

Definition at line 5224 of file elf.c.

◆ LZMA_LEN_MID_SYMBOLS

#define LZMA_LEN_MID_SYMBOLS   (8)

Definition at line 5225 of file elf.c.

◆ LZMA_LITERAL

#define LZMA_LITERAL (   code,
  size 
)     (LZMA_PROB_LITERAL_OFFSET + (code) * LZMA_LITERAL_CODER_SIZE + (size))

Definition at line 5355 of file elf.c.

◆ LZMA_LITERAL_CODER_SIZE

#define LZMA_LITERAL_CODER_SIZE   (0x300)

Definition at line 5230 of file elf.c.

◆ LZMA_LITERAL_CODERS_MAX

#define LZMA_LITERAL_CODERS_MAX   (16)

Definition at line 5229 of file elf.c.

◆ LZMA_MATCH_LEN_CHOICE

#define LZMA_MATCH_LEN_CHOICE    LZMA_PROB_MATCH_LEN_CHOICE_OFFSET

Definition at line 5335 of file elf.c.

◆ LZMA_MATCH_LEN_CHOICE2

#define LZMA_MATCH_LEN_CHOICE2    LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET

Definition at line 5337 of file elf.c.

◆ LZMA_MATCH_LEN_HIGH

#define LZMA_MATCH_LEN_HIGH (   sym)     (LZMA_PROB_MATCH_LEN_HIGH_OFFSET + (sym))

Definition at line 5343 of file elf.c.

◆ LZMA_MATCH_LEN_LOW

#define LZMA_MATCH_LEN_LOW (   pos,
  sym 
)     (LZMA_PROB_MATCH_LEN_LOW_OFFSET + (pos) * LZMA_LEN_LOW_SYMBOLS + (sym))

Definition at line 5339 of file elf.c.

◆ LZMA_MATCH_LEN_MID

#define LZMA_MATCH_LEN_MID (   pos,
  sym 
)     (LZMA_PROB_MATCH_LEN_MID_OFFSET + (pos) * LZMA_LEN_MID_SYMBOLS + (sym))

Definition at line 5341 of file elf.c.

◆ LZMA_POS_STATES

#define LZMA_POS_STATES   (16)

Definition at line 5199 of file elf.c.

◆ LZMA_PROB_DIST_ALIGN_LEN

#define LZMA_PROB_DIST_ALIGN_LEN   LZMA_ALIGN_SIZE

Definition at line 5247 of file elf.c.

◆ LZMA_PROB_DIST_ALIGN_OFFSET

#define LZMA_PROB_DIST_ALIGN_OFFSET    (LZMA_PROB_DIST_SPECIAL_OFFSET + LZMA_PROB_DIST_SPECIAL_LEN)

Definition at line 5279 of file elf.c.

◆ LZMA_PROB_DIST_SLOT_LEN

#define LZMA_PROB_DIST_SLOT_LEN   (LZMA_DIST_STATES * LZMA_DIST_SLOTS)

Definition at line 5245 of file elf.c.

◆ LZMA_PROB_DIST_SLOT_OFFSET

#define LZMA_PROB_DIST_SLOT_OFFSET    (LZMA_PROB_IS_REP0_LONG_OFFSET + LZMA_PROB_IS_REP0_LONG_LEN)

Definition at line 5275 of file elf.c.

◆ LZMA_PROB_DIST_SPECIAL_LEN

#define LZMA_PROB_DIST_SPECIAL_LEN   (LZMA_FULL_DISTANCES - LZMA_DIST_MODEL_END)

Definition at line 5246 of file elf.c.

◆ LZMA_PROB_DIST_SPECIAL_OFFSET

#define LZMA_PROB_DIST_SPECIAL_OFFSET    (LZMA_PROB_DIST_SLOT_OFFSET + LZMA_PROB_DIST_SLOT_LEN)

Definition at line 5277 of file elf.c.

◆ LZMA_PROB_IS_MATCH_LEN

#define LZMA_PROB_IS_MATCH_LEN   (LZMA_STATES * LZMA_POS_STATES)

Definition at line 5239 of file elf.c.

◆ LZMA_PROB_IS_MATCH_OFFSET

#define LZMA_PROB_IS_MATCH_OFFSET   0

Definition at line 5264 of file elf.c.

◆ LZMA_PROB_IS_REP0_LEN

#define LZMA_PROB_IS_REP0_LEN   LZMA_STATES

Definition at line 5241 of file elf.c.

◆ LZMA_PROB_IS_REP0_LONG_LEN

#define LZMA_PROB_IS_REP0_LONG_LEN   (LZMA_STATES * LZMA_POS_STATES)

Definition at line 5244 of file elf.c.

◆ LZMA_PROB_IS_REP0_LONG_OFFSET

#define LZMA_PROB_IS_REP0_LONG_OFFSET    (LZMA_PROB_IS_REP2_OFFSET + LZMA_PROB_IS_REP2_LEN)

Definition at line 5273 of file elf.c.

◆ LZMA_PROB_IS_REP0_OFFSET

#define LZMA_PROB_IS_REP0_OFFSET    (LZMA_PROB_IS_REP_OFFSET + LZMA_PROB_IS_REP_LEN)

Definition at line 5267 of file elf.c.

◆ LZMA_PROB_IS_REP1_LEN

#define LZMA_PROB_IS_REP1_LEN   LZMA_STATES

Definition at line 5242 of file elf.c.

◆ LZMA_PROB_IS_REP1_OFFSET

#define LZMA_PROB_IS_REP1_OFFSET    (LZMA_PROB_IS_REP0_OFFSET + LZMA_PROB_IS_REP0_LEN)

Definition at line 5269 of file elf.c.

◆ LZMA_PROB_IS_REP2_LEN

#define LZMA_PROB_IS_REP2_LEN   LZMA_STATES

Definition at line 5243 of file elf.c.

◆ LZMA_PROB_IS_REP2_OFFSET

#define LZMA_PROB_IS_REP2_OFFSET    (LZMA_PROB_IS_REP1_OFFSET + LZMA_PROB_IS_REP1_LEN)

Definition at line 5271 of file elf.c.

◆ LZMA_PROB_IS_REP_LEN

#define LZMA_PROB_IS_REP_LEN   LZMA_STATES

Definition at line 5240 of file elf.c.

◆ LZMA_PROB_IS_REP_OFFSET

#define LZMA_PROB_IS_REP_OFFSET    (LZMA_PROB_IS_MATCH_OFFSET + LZMA_PROB_IS_MATCH_LEN)

Definition at line 5265 of file elf.c.

◆ LZMA_PROB_LITERAL_LEN

#define LZMA_PROB_LITERAL_LEN    (LZMA_LITERAL_CODERS_MAX * LZMA_LITERAL_CODER_SIZE)

Definition at line 5258 of file elf.c.

◆ LZMA_PROB_LITERAL_OFFSET

Definition at line 5301 of file elf.c.

◆ LZMA_PROB_MATCH_LEN_CHOICE2_LEN

#define LZMA_PROB_MATCH_LEN_CHOICE2_LEN   1

Definition at line 5249 of file elf.c.

◆ LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET

#define LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET    (LZMA_PROB_MATCH_LEN_CHOICE_OFFSET + LZMA_PROB_MATCH_LEN_CHOICE_LEN)

Definition at line 5283 of file elf.c.

◆ LZMA_PROB_MATCH_LEN_CHOICE_LEN

#define LZMA_PROB_MATCH_LEN_CHOICE_LEN   1

Definition at line 5248 of file elf.c.

◆ LZMA_PROB_MATCH_LEN_CHOICE_OFFSET

#define LZMA_PROB_MATCH_LEN_CHOICE_OFFSET    (LZMA_PROB_DIST_ALIGN_OFFSET + LZMA_PROB_DIST_ALIGN_LEN)

Definition at line 5281 of file elf.c.

◆ LZMA_PROB_MATCH_LEN_HIGH_LEN

#define LZMA_PROB_MATCH_LEN_HIGH_LEN   LZMA_LEN_HIGH_SYMBOLS

Definition at line 5252 of file elf.c.

◆ LZMA_PROB_MATCH_LEN_HIGH_OFFSET

#define LZMA_PROB_MATCH_LEN_HIGH_OFFSET    (LZMA_PROB_MATCH_LEN_MID_OFFSET + LZMA_PROB_MATCH_LEN_MID_LEN)

Definition at line 5289 of file elf.c.

◆ LZMA_PROB_MATCH_LEN_LOW_LEN

#define LZMA_PROB_MATCH_LEN_LOW_LEN   (LZMA_POS_STATES * LZMA_LEN_LOW_SYMBOLS)

Definition at line 5250 of file elf.c.

◆ LZMA_PROB_MATCH_LEN_LOW_OFFSET

Definition at line 5285 of file elf.c.

◆ LZMA_PROB_MATCH_LEN_MID_LEN

#define LZMA_PROB_MATCH_LEN_MID_LEN   (LZMA_POS_STATES * LZMA_LEN_MID_SYMBOLS)

Definition at line 5251 of file elf.c.

◆ LZMA_PROB_MATCH_LEN_MID_OFFSET

#define LZMA_PROB_MATCH_LEN_MID_OFFSET    (LZMA_PROB_MATCH_LEN_LOW_OFFSET + LZMA_PROB_MATCH_LEN_LOW_LEN)

Definition at line 5287 of file elf.c.

◆ LZMA_PROB_REP_LEN_CHOICE2_LEN

#define LZMA_PROB_REP_LEN_CHOICE2_LEN   1

Definition at line 5254 of file elf.c.

◆ LZMA_PROB_REP_LEN_CHOICE2_OFFSET

#define LZMA_PROB_REP_LEN_CHOICE2_OFFSET    (LZMA_PROB_REP_LEN_CHOICE_OFFSET + LZMA_PROB_REP_LEN_CHOICE_LEN)

Definition at line 5293 of file elf.c.

◆ LZMA_PROB_REP_LEN_CHOICE_LEN

#define LZMA_PROB_REP_LEN_CHOICE_LEN   1

Definition at line 5253 of file elf.c.

◆ LZMA_PROB_REP_LEN_CHOICE_OFFSET

#define LZMA_PROB_REP_LEN_CHOICE_OFFSET    (LZMA_PROB_MATCH_LEN_HIGH_OFFSET + LZMA_PROB_MATCH_LEN_HIGH_LEN)

Definition at line 5291 of file elf.c.

◆ LZMA_PROB_REP_LEN_HIGH_LEN

#define LZMA_PROB_REP_LEN_HIGH_LEN   LZMA_LEN_HIGH_SYMBOLS

Definition at line 5257 of file elf.c.

◆ LZMA_PROB_REP_LEN_HIGH_OFFSET

#define LZMA_PROB_REP_LEN_HIGH_OFFSET    (LZMA_PROB_REP_LEN_MID_OFFSET + LZMA_PROB_REP_LEN_MID_LEN)

Definition at line 5299 of file elf.c.

◆ LZMA_PROB_REP_LEN_LOW_LEN

#define LZMA_PROB_REP_LEN_LOW_LEN   (LZMA_POS_STATES * LZMA_LEN_LOW_SYMBOLS)

Definition at line 5255 of file elf.c.

◆ LZMA_PROB_REP_LEN_LOW_OFFSET

Definition at line 5295 of file elf.c.

◆ LZMA_PROB_REP_LEN_MID_LEN

#define LZMA_PROB_REP_LEN_MID_LEN   (LZMA_POS_STATES * LZMA_LEN_MID_SYMBOLS)

Definition at line 5256 of file elf.c.

◆ LZMA_PROB_REP_LEN_MID_OFFSET

#define LZMA_PROB_REP_LEN_MID_OFFSET    (LZMA_PROB_REP_LEN_LOW_OFFSET + LZMA_PROB_REP_LEN_LOW_LEN)

Definition at line 5297 of file elf.c.

◆ LZMA_PROB_TOTAL_COUNT

#define LZMA_PROB_TOTAL_COUNT    (LZMA_PROB_LITERAL_OFFSET + LZMA_PROB_LITERAL_LEN)

Definition at line 5304 of file elf.c.

◆ LZMA_REP_LEN_CHOICE

#define LZMA_REP_LEN_CHOICE    LZMA_PROB_REP_LEN_CHOICE_OFFSET

Definition at line 5345 of file elf.c.

◆ LZMA_REP_LEN_CHOICE2

#define LZMA_REP_LEN_CHOICE2    LZMA_PROB_REP_LEN_CHOICE2_OFFSET

Definition at line 5347 of file elf.c.

◆ LZMA_REP_LEN_HIGH

#define LZMA_REP_LEN_HIGH (   sym)     (LZMA_PROB_REP_LEN_HIGH_OFFSET + (sym))

Definition at line 5353 of file elf.c.

◆ LZMA_REP_LEN_LOW

#define LZMA_REP_LEN_LOW (   pos,
  sym 
)     (LZMA_PROB_REP_LEN_LOW_OFFSET + (pos) * LZMA_LEN_LOW_SYMBOLS + (sym))

Definition at line 5349 of file elf.c.

◆ LZMA_REP_LEN_MID

#define LZMA_REP_LEN_MID (   pos,
  sym 
)     (LZMA_PROB_REP_LEN_MID_OFFSET + (pos) * LZMA_LEN_MID_SYMBOLS + (sym))

Definition at line 5351 of file elf.c.

◆ LZMA_STATES

#define LZMA_STATES   (12)

Definition at line 5194 of file elf.c.

◆ NT_GNU_BUILD_ID

#define NT_GNU_BUILD_ID   3

Definition at line 321 of file elf.c.

◆ S_IFLNK

#define S_IFLNK   0120000

Definition at line 56 of file elf.c.

◆ S_IFMT

#define S_IFMT   0170000

Definition at line 59 of file elf.c.

◆ S_ISLNK

#define S_ISLNK (   m)    (((m) & S_IFMT) == S_IFLNK)

Definition at line 61 of file elf.c.

◆ SHF_COMPRESSED

#define SHF_COMPRESSED   0x800

Definition at line 282 of file elf.c.

◆ SHN_LORESERVE

#define SHN_LORESERVE   0xFF00 /* Begin range of reserved indices */

Definition at line 274 of file elf.c.

◆ SHN_UNDEF

#define SHN_UNDEF   0x0000 /* Undefined section */

Definition at line 273 of file elf.c.

◆ SHN_XINDEX

#define SHN_XINDEX   0xFFFF /* Section index is held elsewhere */

Definition at line 275 of file elf.c.

◆ SHT_DYNSYM

#define SHT_DYNSYM   11

Definition at line 280 of file elf.c.

◆ SHT_PROGBITS

#define SHT_PROGBITS   1

Definition at line 277 of file elf.c.

◆ SHT_STRTAB

#define SHT_STRTAB   3

Definition at line 279 of file elf.c.

◆ SHT_SYMTAB

#define SHT_SYMTAB   2

Definition at line 278 of file elf.c.

◆ strnlen

#define strnlen   xstrnlen

Definition at line 86 of file elf.c.

◆ STT_FUNC

#define STT_FUNC   2

Definition at line 311 of file elf.c.

◆ STT_OBJECT

#define STT_OBJECT   1

Definition at line 310 of file elf.c.

◆ SYSTEM_BUILD_ID_DIR

#define SYSTEM_BUILD_ID_DIR   "/usr/lib/debug/.build-id/"

Definition at line 860 of file elf.c.

◆ unlikely

#define unlikely (   x)    (x)

Definition at line 66 of file elf.c.

◆ ZDEBUG_TABLE_SIZE

Definition at line 5008 of file elf.c.

◆ ZLIB_HUFFMAN_BITS_MASK

#define ZLIB_HUFFMAN_BITS_MASK   0x7

Definition at line 1317 of file elf.c.

◆ ZLIB_HUFFMAN_BITS_SHIFT

#define ZLIB_HUFFMAN_BITS_SHIFT   9

Definition at line 1316 of file elf.c.

◆ ZLIB_HUFFMAN_SECONDARY_SHIFT

#define ZLIB_HUFFMAN_SECONDARY_SHIFT   12

Definition at line 1318 of file elf.c.

◆ ZLIB_HUFFMAN_TABLE_SIZE

#define ZLIB_HUFFMAN_TABLE_SIZE   (1024)

Definition at line 1311 of file elf.c.

◆ ZLIB_HUFFMAN_VALUE_MASK

#define ZLIB_HUFFMAN_VALUE_MASK   0x01ff

Definition at line 1315 of file elf.c.

◆ ZLIB_TABLE_CODELEN_OFFSET

#define ZLIB_TABLE_CODELEN_OFFSET
Value:
+ (286 + 30) * sizeof (uint16_t))
#define ZLIB_HUFFMAN_TABLE_SIZE
Definition elf.c:1311
unsigned short uint16_t

Definition at line 1331 of file elf.c.

◆ ZLIB_TABLE_SIZE

#define ZLIB_TABLE_SIZE
Value:
+ (286 + 30) * sizeof (uint16_t) \
+ (286 + 30) * sizeof (unsigned char))

Definition at line 1326 of file elf.c.

◆ ZLIB_TABLE_WORK_OFFSET

#define ZLIB_TABLE_WORK_OFFSET    (2 * ZLIB_HUFFMAN_TABLE_SIZE * sizeof (uint16_t))

Definition at line 1335 of file elf.c.

◆ ZSTD_DECODE_BASEBITS

#define ZSTD_DECODE_BASEBITS (   baseline_basebits)     ((uint32_t)(baseline_basebits) >> 24)

Definition at line 2990 of file elf.c.

◆ ZSTD_DECODE_BASELINE

#define ZSTD_DECODE_BASELINE (   baseline_basebits)     ((uint32_t)(baseline_basebits) & 0xffffff)

Definition at line 2987 of file elf.c.

◆ ZSTD_ENCODE_BASELINE_BITS

#define ZSTD_ENCODE_BASELINE_BITS (   baseline,
  basebits 
)     ((uint32_t)(baseline) | ((uint32_t)(basebits) << 24))

Definition at line 2984 of file elf.c.

◆ ZSTD_LITERAL_LENGTH_BASELINE_OFFSET

#define ZSTD_LITERAL_LENGTH_BASELINE_OFFSET   (16)

Definition at line 2997 of file elf.c.

◆ ZSTD_MATCH_LENGTH_BASELINE_OFFSET

#define ZSTD_MATCH_LENGTH_BASELINE_OFFSET   (32)

Definition at line 3026 of file elf.c.

◆ ZSTD_TABLE_HUFFMAN_OFFSET

#define ZSTD_TABLE_HUFFMAN_OFFSET
Value:
+ 256 * sizeof (struct elf_zstd_fse_baseline_entry))
#define ZSTD_TABLE_OFFSET_FSE_OFFSET
Definition elf.c:2684
Definition elf.c:3060

Definition at line 2688 of file elf.c.

◆ ZSTD_TABLE_LITERAL_FSE_OFFSET

#define ZSTD_TABLE_LITERAL_FSE_OFFSET   (0)

Definition at line 2679 of file elf.c.

◆ ZSTD_TABLE_MATCH_FSE_OFFSET

#define ZSTD_TABLE_MATCH_FSE_OFFSET    (512 * sizeof (struct elf_zstd_fse_baseline_entry))

Definition at line 2681 of file elf.c.

◆ ZSTD_TABLE_OFFSET_FSE_OFFSET

#define ZSTD_TABLE_OFFSET_FSE_OFFSET
Value:
+ 512 * sizeof (struct elf_zstd_fse_baseline_entry))
#define ZSTD_TABLE_MATCH_FSE_OFFSET
Definition elf.c:2681

Definition at line 2684 of file elf.c.

◆ ZSTD_TABLE_SIZE

#define ZSTD_TABLE_SIZE
Value:
(2 * 512 * sizeof (struct elf_zstd_fse_baseline_entry) \
+ 256 * sizeof (struct elf_zstd_fse_baseline_entry) \
+ 2048 * sizeof (uint16_t) \
+ 512 * sizeof (uint16_t) + 256 * sizeof (uint32_t))
unsigned int uint32_t

Definition at line 2673 of file elf.c.

◆ ZSTD_TABLE_WORK_OFFSET

#define ZSTD_TABLE_WORK_OFFSET    (ZSTD_TABLE_HUFFMAN_OFFSET + 2048 * sizeof (uint16_t))

Definition at line 2692 of file elf.c.

Typedef Documentation

◆ b_elf_addr

typedef uint64_t b_elf_addr

Definition at line 204 of file elf.c.

◆ b_elf_half

Definition at line 191 of file elf.c.

◆ b_elf_off

typedef uint64_t b_elf_off

Definition at line 205 of file elf.c.

◆ b_elf_sword

typedef int32_t b_elf_sword

Definition at line 193 of file elf.c.

◆ b_elf_sxword

typedef int64_t b_elf_sxword

Definition at line 207 of file elf.c.

◆ b_elf_word

Definition at line 192 of file elf.c.

◆ b_elf_wxword

typedef uint64_t b_elf_wxword

Definition at line 209 of file elf.c.

◆ b_elf_xword

typedef uint64_t b_elf_xword

Definition at line 206 of file elf.c.

Function Documentation

◆ backtrace_initialize()

int backtrace_initialize ( struct backtrace_state state,
const char *  filename,
int  descriptor,
backtrace_error_callback  error_callback,
void *  data,
fileline fileline_fn 
)

Definition at line 7410 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ backtrace_uncompress_lzma()

int backtrace_uncompress_lzma ( struct backtrace_state state,
const unsigned char *  compressed,
size_t  compressed_size,
backtrace_error_callback  error_callback,
void *  data,
unsigned char **  uncompressed,
size_t uncompressed_size 
)

Definition at line 6488 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ backtrace_uncompress_zdebug()

int backtrace_uncompress_zdebug ( struct backtrace_state state,
const unsigned char *  compressed,
size_t  compressed_size,
backtrace_error_callback  error_callback,
void *  data,
unsigned char **  uncompressed,
size_t uncompressed_size 
)

Definition at line 5146 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ backtrace_uncompress_zstd()

int backtrace_uncompress_zstd ( struct backtrace_state state,
const unsigned char *  compressed,
size_t  compressed_size,
backtrace_error_callback  error_callback,
void *  data,
unsigned char *  uncompressed,
size_t  uncompressed_size 
)

Definition at line 5172 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_add()

static int elf_add ( struct backtrace_state state,
const char *  filename,
int  descriptor,
const unsigned char *  memory,
size_t  memory_size,
struct libbacktrace_base_address  base_address,
struct elf_ppc64_opd_data caller_opd,
backtrace_error_callback  error_callback,
void *  data,
fileline fileline_fn,
int *  found_sym,
int *  found_dwarf,
struct dwarf_data **  fileline_entry,
int  exe,
int  debuginfo,
const char *  with_buildid_data,
uint32_t  with_buildid_size 
)
static

Definition at line 6507 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_add_syminfo_data()

static void elf_add_syminfo_data ( struct backtrace_state state,
struct elf_syminfo_data edata 
)
static

Definition at line 721 of file elf.c.

+ Here is the caller graph for this function:

◆ elf_crc32()

static uint32_t elf_crc32 ( uint32_t  crc,
const unsigned char *  buf,
size_t  len 
)
static

Definition at line 465 of file elf.c.

+ Here is the caller graph for this function:

◆ elf_crc32_file()

static uint32_t elf_crc32_file ( struct backtrace_state state,
int  descriptor,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 533 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_fetch_backward_init()

static int elf_fetch_backward_init ( const unsigned char **  ppin,
const unsigned char *  pinend,
uint64_t *  pval,
unsigned int *  pbits 
)
static

Definition at line 1231 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_fetch_bits()

static int elf_fetch_bits ( const unsigned char **  ppin,
const unsigned char *  pinend,
uint64_t *  pval,
unsigned int *  pbits 
)
static

Definition at line 1119 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_fetch_bits_backward()

static int elf_fetch_bits_backward ( const unsigned char **  ppin,
const unsigned char *  pinend,
uint64_t *  pval,
unsigned int *  pbits 
)
static

Definition at line 1173 of file elf.c.

+ Here is the caller graph for this function:

◆ elf_find_debugfile_by_debuglink()

static int elf_find_debugfile_by_debuglink ( struct backtrace_state state,
const char *  filename,
const char *  debuglink_name,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 958 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_get_view()

static int elf_get_view ( struct backtrace_state state,
int  descriptor,
const unsigned char *  memory,
size_t  memory_size,
off_t  offset,
uint64_t  size,
backtrace_error_callback  error_callback,
void *  data,
struct elf_view view 
)
static

Definition at line 425 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_initialize_syminfo()

static int elf_initialize_syminfo ( struct backtrace_state state,
struct libbacktrace_base_address  base_address,
const unsigned char *  symtab_data,
size_t  symtab_size,
const unsigned char *  strtab,
size_t  strtab_size,
backtrace_error_callback  error_callback,
void *  data,
struct elf_syminfo_data sdata,
struct elf_ppc64_opd_data opd 
)
static

Definition at line 635 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_is_symlink()

static int elf_is_symlink ( const char *  filename)
static

Definition at line 814 of file elf.c.

+ Here is the caller graph for this function:

◆ elf_lzma_bit()

static int elf_lzma_bit ( const unsigned char *  compressed,
size_t  compressed_size,
uint16_t prob,
size_t poffset,
uint32_t prange,
uint32_t pcode 
)
static

Definition at line 5425 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_lzma_integer()

static uint32_t elf_lzma_integer ( const unsigned char *  compressed,
size_t  compressed_size,
uint16_t probs,
uint32_t  bits,
size_t poffset,
uint32_t prange,
uint32_t pcode 
)
static

Definition at line 5453 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_lzma_len()

static uint32_t elf_lzma_len ( const unsigned char *  compressed,
size_t  compressed_size,
uint16_t probs,
int  is_rep,
unsigned int  pos_state,
size_t poffset,
uint32_t prange,
uint32_t pcode 
)
static

Definition at line 5505 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_lzma_range_normalize()

static void elf_lzma_range_normalize ( const unsigned char *  compressed,
size_t  compressed_size,
size_t poffset,
uint32_t prange,
uint32_t pcode 
)
static

Definition at line 5402 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_lzma_reverse_integer()

static uint32_t elf_lzma_reverse_integer ( const unsigned char *  compressed,
size_t  compressed_size,
uint16_t probs,
uint32_t  bits,
size_t poffset,
uint32_t prange,
uint32_t pcode 
)
static

Definition at line 5477 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_lzma_varint()

static int elf_lzma_varint ( const unsigned char *  compressed,
size_t  compressed_size,
size_t poffset,
uint64_t *  val 
)
static

Definition at line 5362 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_nodebug()

static int elf_nodebug ( struct backtrace_state state,
uintptr_t  pc,
backtrace_full_callback  callback,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 572 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_nosyms()

static void elf_nosyms ( struct backtrace_state *state  ATTRIBUTE_UNUSED,
uintptr_t addr  ATTRIBUTE_UNUSED,
backtrace_syminfo_callback callback  ATTRIBUTE_UNUSED,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 561 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_open_debugfile_by_buildid()

static int elf_open_debugfile_by_buildid ( struct backtrace_state state,
const char *  buildid_data,
size_t  buildid_size,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 869 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_open_debugfile_by_debuglink()

static int elf_open_debugfile_by_debuglink ( struct backtrace_state state,
const char *  filename,
const char *  debuglink_name,
uint32_t  debuglink_crc,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 1074 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_readlink()

static char * elf_readlink ( struct backtrace_state state,
const char *  filename,
backtrace_error_callback  error_callback,
void *  data,
size_t plen 
)
static

Definition at line 828 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_release_view()

static void elf_release_view ( struct backtrace_state state,
struct elf_view view,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 454 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_symbol_compare()

static int elf_symbol_compare ( const void *  v1,
const void *  v2 
)
static

Definition at line 599 of file elf.c.

+ Here is the caller graph for this function:

◆ elf_symbol_search()

static int elf_symbol_search ( const void *  vkey,
const void *  ventry 
)
static

Definition at line 617 of file elf.c.

+ Here is the caller graph for this function:

◆ elf_syminfo()

static void elf_syminfo ( struct backtrace_state state,
uintptr_t  addr,
backtrace_syminfo_callback  callback,
backtrace_error_callback error_callback  ATTRIBUTE_UNUSED,
void *  data 
)
static

Definition at line 763 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_try_debugfile()

static int elf_try_debugfile ( struct backtrace_state state,
const char *  prefix,
size_t  prefix_len,
const char *  prefix2,
size_t  prefix2_len,
const char *  debuglink_name,
backtrace_error_callback  error_callback,
void *  data 
)
static

Definition at line 925 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_uncompress_chdr()

static int elf_uncompress_chdr ( struct backtrace_state state,
const unsigned char *  compressed,
size_t  compressed_size,
uint16_t zdebug_table,
backtrace_error_callback  error_callback,
void *  data,
unsigned char **  uncompressed,
size_t uncompressed_size 
)
static

Definition at line 5073 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_uncompress_failed()

static void elf_uncompress_failed ( void  )
static

Definition at line 1108 of file elf.c.

+ Here is the caller graph for this function:

◆ elf_uncompress_lzma()

static int elf_uncompress_lzma ( struct backtrace_state state,
const unsigned char *  compressed,
size_t  compressed_size,
backtrace_error_callback  error_callback,
void *  data,
unsigned char **  uncompressed,
size_t uncompressed_size 
)
static

Definition at line 6257 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_uncompress_lzma_block()

static int elf_uncompress_lzma_block ( const unsigned char *  compressed,
size_t  compressed_size,
unsigned char  check,
uint16_t probs,
unsigned char *  uncompressed,
size_t  uncompressed_size,
size_t poffset 
)
static

Definition at line 5562 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_uncompress_zdebug()

static int elf_uncompress_zdebug ( struct backtrace_state state,
const unsigned char *  compressed,
size_t  compressed_size,
uint16_t zdebug_table,
backtrace_error_callback  error_callback,
void *  data,
unsigned char **  uncompressed,
size_t uncompressed_size 
)
static

Definition at line 5020 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zlib_inflate()

static int elf_zlib_inflate ( const unsigned char *  pin,
size_t  sin,
uint16_t zdebug_table,
unsigned char *  pout,
size_t  sout 
)
static

Definition at line 1825 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zlib_inflate_and_verify()

static int elf_zlib_inflate_and_verify ( const unsigned char *  pin,
size_t  sin,
uint16_t zdebug_table,
unsigned char *  pout,
size_t  sout 
)
static

Definition at line 2652 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zlib_inflate_table()

static int elf_zlib_inflate_table ( unsigned char *  codes,
size_t  codes_len,
uint16_t zdebug_table,
uint16_t table 
)
static

Definition at line 1352 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zlib_verify_checksum()

static int elf_zlib_verify_checksum ( const unsigned char *  checkbytes,
const unsigned char *  uncompressed,
size_t  uncompressed_size 
)
static

Definition at line 2526 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zstd_build_fse()

static int elf_zstd_build_fse ( const int16_t *  norm,
int  idx,
uint16_t next,
int  table_bits,
struct elf_zstd_fse_entry table 
)
static

Definition at line 2906 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zstd_decompress()

static int elf_zstd_decompress ( const unsigned char *  pin,
size_t  sin,
unsigned char *  zdebug_table,
unsigned char *  pout,
size_t  sout 
)
static

Definition at line 4345 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zstd_make_literal_baseline_fse()

static int elf_zstd_make_literal_baseline_fse ( const struct elf_zstd_fse_entry fse_table,
int  table_bits,
struct elf_zstd_fse_baseline_entry baseline_table 
)
static

Definition at line 3075 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zstd_make_match_baseline_fse()

static int elf_zstd_make_match_baseline_fse ( const struct elf_zstd_fse_entry fse_table,
int  table_bits,
struct elf_zstd_fse_baseline_entry baseline_table 
)
static

Definition at line 3194 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zstd_make_offset_baseline_fse()

static int elf_zstd_make_offset_baseline_fse ( const struct elf_zstd_fse_entry fse_table,
int  table_bits,
struct elf_zstd_fse_baseline_entry baseline_table 
)
static

Definition at line 3131 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zstd_read_fse()

static int elf_zstd_read_fse ( const unsigned char **  ppin,
const unsigned char *  pinend,
uint16_t zdebug_table,
int  maxidx,
struct elf_zstd_fse_entry table,
int *  table_bits 
)
static

Definition at line 2720 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zstd_read_huff()

static int elf_zstd_read_huff ( const unsigned char **  ppin,
const unsigned char *  pinend,
uint16_t zdebug_table,
uint16_t table,
int *  ptable_bits 
)
static

Definition at line 3446 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zstd_read_literals()

static int elf_zstd_read_literals ( const unsigned char **  ppin,
const unsigned char *  pinend,
unsigned char *  pout,
unsigned char *  poutend,
uint16_t scratch,
uint16_t huffman_table,
int *  phuffman_table_bits,
unsigned char **  pplit 
)
static

Definition at line 3737 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ elf_zstd_unpack_seq_decode()

static int elf_zstd_unpack_seq_decode ( int  mode,
const unsigned char **  ppin,
const unsigned char *  pinend,
const struct elf_zstd_fse_baseline_entry predef,
int  predef_bits,
uint16_t scratch,
int  maxidx,
struct elf_zstd_fse_baseline_entry table,
int  table_bits,
int(*)(const struct elf_zstd_fse_entry *, int, struct elf_zstd_fse_baseline_entry *)  conv,
struct elf_zstd_seq_decode decode 
)
static

Definition at line 4268 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ phdr_callback()

static int phdr_callback ( struct dl_phdr_info *  info,
size_t size  ATTRIBUTE_UNUSED,
void *  pdata 
)
static

Definition at line 7353 of file elf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xstrnlen()

static size_t xstrnlen ( const char *  s,
size_t  maxlen 
)
static

Definition at line 76 of file elf.c.

Variable Documentation

◆ dwarf_section_names

const char* const dwarf_section_names[DEBUG_MAX]
static
Initial value:
=
{
".debug_info",
".debug_line",
".debug_abbrev",
".debug_ranges",
".debug_str",
".debug_addr",
".debug_str_offsets",
".debug_line_str",
".debug_rnglists"
}

Definition at line 349 of file elf.c.

◆ elf_zlib_default_dist_table

const uint16_t elf_zlib_default_dist_table[0x100]
static

Definition at line 1785 of file elf.c.

◆ elf_zlib_default_table

const uint16_t elf_zlib_default_table[0x170]
static

Definition at line 1735 of file elf.c.

◆ elf_zstd_lit_table

const struct elf_zstd_fse_baseline_entry elf_zstd_lit_table[64]
static
Initial value:
=
{
{ 0, 0, 4, 0 }, { 0, 0, 4, 16 }, { 1, 0, 5, 32 },
{ 3, 0, 5, 0 }, { 4, 0, 5, 0 }, { 6, 0, 5, 0 },
{ 7, 0, 5, 0 }, { 9, 0, 5, 0 }, { 10, 0, 5, 0 },
{ 12, 0, 5, 0 }, { 14, 0, 6, 0 }, { 16, 1, 5, 0 },
{ 20, 1, 5, 0 }, { 22, 1, 5, 0 }, { 28, 2, 5, 0 },
{ 32, 3, 5, 0 }, { 48, 4, 5, 0 }, { 64, 6, 5, 32 },
{ 128, 7, 5, 0 }, { 256, 8, 6, 0 }, { 1024, 10, 6, 0 },
{ 4096, 12, 6, 0 }, { 0, 0, 4, 32 }, { 1, 0, 4, 0 },
{ 2, 0, 5, 0 }, { 4, 0, 5, 32 }, { 5, 0, 5, 0 },
{ 7, 0, 5, 32 }, { 8, 0, 5, 0 }, { 10, 0, 5, 32 },
{ 11, 0, 5, 0 }, { 13, 0, 6, 0 }, { 16, 1, 5, 32 },
{ 18, 1, 5, 0 }, { 22, 1, 5, 32 }, { 24, 2, 5, 0 },
{ 32, 3, 5, 32 }, { 40, 3, 5, 0 }, { 64, 6, 4, 0 },
{ 64, 6, 4, 16 }, { 128, 7, 5, 32 }, { 512, 9, 6, 0 },
{ 2048, 11, 6, 0 }, { 0, 0, 4, 48 }, { 1, 0, 4, 16 },
{ 2, 0, 5, 32 }, { 3, 0, 5, 32 }, { 5, 0, 5, 32 },
{ 6, 0, 5, 32 }, { 8, 0, 5, 32 }, { 9, 0, 5, 32 },
{ 11, 0, 5, 32 }, { 12, 0, 5, 32 }, { 15, 0, 6, 0 },
{ 18, 1, 5, 32 }, { 20, 1, 5, 32 }, { 24, 2, 5, 32 },
{ 28, 2, 5, 32 }, { 40, 3, 5, 32 }, { 48, 4, 5, 32 },
{ 65536, 16, 6, 0 }, { 32768, 15, 6, 0 }, { 16384, 14, 6, 0 },
{ 8192, 13, 6, 0 },
}

Definition at line 3372 of file elf.c.

◆ elf_zstd_literal_length_base

const uint32_t elf_zstd_literal_length_base[]
static

◆ elf_zstd_match_length_base

const uint32_t elf_zstd_match_length_base[]
static

◆ elf_zstd_match_table

const struct elf_zstd_fse_baseline_entry elf_zstd_match_table[64]
static
Initial value:
=
{
{ 3, 0, 6, 0 }, { 4, 0, 4, 0 }, { 5, 0, 5, 32 },
{ 6, 0, 5, 0 }, { 8, 0, 5, 0 }, { 9, 0, 5, 0 },
{ 11, 0, 5, 0 }, { 13, 0, 6, 0 }, { 16, 0, 6, 0 },
{ 19, 0, 6, 0 }, { 22, 0, 6, 0 }, { 25, 0, 6, 0 },
{ 28, 0, 6, 0 }, { 31, 0, 6, 0 }, { 34, 0, 6, 0 },
{ 37, 1, 6, 0 }, { 41, 1, 6, 0 }, { 47, 2, 6, 0 },
{ 59, 3, 6, 0 }, { 83, 4, 6, 0 }, { 131, 7, 6, 0 },
{ 515, 9, 6, 0 }, { 4, 0, 4, 16 }, { 5, 0, 4, 0 },
{ 6, 0, 5, 32 }, { 7, 0, 5, 0 }, { 9, 0, 5, 32 },
{ 10, 0, 5, 0 }, { 12, 0, 6, 0 }, { 15, 0, 6, 0 },
{ 18, 0, 6, 0 }, { 21, 0, 6, 0 }, { 24, 0, 6, 0 },
{ 27, 0, 6, 0 }, { 30, 0, 6, 0 }, { 33, 0, 6, 0 },
{ 35, 1, 6, 0 }, { 39, 1, 6, 0 }, { 43, 2, 6, 0 },
{ 51, 3, 6, 0 }, { 67, 4, 6, 0 }, { 99, 5, 6, 0 },
{ 259, 8, 6, 0 }, { 4, 0, 4, 32 }, { 4, 0, 4, 48 },
{ 5, 0, 4, 16 }, { 7, 0, 5, 32 }, { 8, 0, 5, 32 },
{ 10, 0, 5, 32 }, { 11, 0, 5, 32 }, { 14, 0, 6, 0 },
{ 17, 0, 6, 0 }, { 20, 0, 6, 0 }, { 23, 0, 6, 0 },
{ 26, 0, 6, 0 }, { 29, 0, 6, 0 }, { 32, 0, 6, 0 },
{ 65539, 16, 6, 0 }, { 32771, 15, 6, 0 }, { 16387, 14, 6, 0 },
{ 8195, 13, 6, 0 }, { 4099, 12, 6, 0 }, { 2051, 11, 6, 0 },
{ 1027, 10, 6, 0 },
}

Definition at line 3398 of file elf.c.

◆ elf_zstd_offset_table

const struct elf_zstd_fse_baseline_entry elf_zstd_offset_table[32]
static
Initial value:
=
{
{ 1, 0, 5, 0 }, { 61, 6, 4, 0 }, { 509, 9, 5, 0 },
{ 32765, 15, 5, 0 }, { 2097149, 21, 5, 0 }, { 5, 3, 5, 0 },
{ 125, 7, 4, 0 }, { 4093, 12, 5, 0 }, { 262141, 18, 5, 0 },
{ 8388605, 23, 5, 0 }, { 29, 5, 5, 0 }, { 253, 8, 4, 0 },
{ 16381, 14, 5, 0 }, { 1048573, 20, 5, 0 }, { 1, 2, 5, 0 },
{ 125, 7, 4, 16 }, { 2045, 11, 5, 0 }, { 131069, 17, 5, 0 },
{ 4194301, 22, 5, 0 }, { 13, 4, 5, 0 }, { 253, 8, 4, 16 },
{ 8189, 13, 5, 0 }, { 524285, 19, 5, 0 }, { 2, 1, 5, 0 },
{ 61, 6, 4, 16 }, { 1021, 10, 5, 0 }, { 65533, 16, 5, 0 },
{ 268435453, 28, 5, 0 }, { 134217725, 27, 5, 0 }, { 67108861, 26, 5, 0 },
{ 33554429, 25, 5, 0 }, { 16777213, 24, 5, 0 },
}

Definition at line 3424 of file elf.c.