XZ Utils  5.4.1
Functions
arm64.c File Reference

Filter for ARM64 binaries. More...

#include "simple_private.h"

Functions

static size_t arm64_code (void *simple lzma_attribute((__unused__)), uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size)
 
static lzma_ret arm64_coder_init (lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters, bool is_encoder)
 

Detailed Description

Filter for ARM64 binaries.

This converts ARM64 relative addresses in the BL and ADRP immediates to absolute values to increase redundancy of ARM64 code.

Converting B or ADR instructions was also tested but it's not useful. A majority of the jumps for the B instruction are very small (+/- 0xFF). These are typical for loops and if-statements. Encoding them to their absolute address reduces redundancy since many of the small relative jump values are repeated, but very few of the absolute addresses are.