special_alt
bool arch_support_alt_relocation(struct special_alt *special_alt,
bool arch_support_alt_relocation(struct special_alt *special_alt,
void arch_handle_alternative(struct special_alt *alt)
static struct special_alt *group, *prev;
struct special_alt *iter = group;
bool arch_support_alt_relocation(struct special_alt *special_alt,
struct special_alt *special_alt,
orig_alt_group->cfi = calloc(special_alt->orig_len,
if (insn->offset >= special_alt->orig_off + special_alt->orig_len)
orig_alt_group->first_insn->offset != special_alt->orig_len) {
special_alt->orig_len);
if (special_alt->new_len < special_alt->orig_len) {
nop->sec = special_alt->new_sec;
nop->offset = special_alt->new_off + special_alt->new_len;
nop->len = special_alt->orig_len - special_alt->new_len;
if (!special_alt->new_len) {
if (insn->offset >= special_alt->new_off + special_alt->new_len)
!arch_support_alt_relocation(special_alt, insn, alt_reloc)) {
if (dest_off == special_alt->new_off + special_alt->new_len) {
ERROR_FUNC(special_alt->new_sec, special_alt->new_off,
new_alt_group->feature = special_alt->feature;
struct special_alt *special_alt,
if (opts.hack_jump_label && special_alt->key_addend & 2) {
struct special_alt *special_alt, *tmp;
list_for_each_entry_safe(special_alt, tmp, &special_alts, list) {
orig_insn = find_insn(file, special_alt->orig_sec,
special_alt->orig_off);
ERROR_FUNC(special_alt->orig_sec, special_alt->orig_off,
if (!special_alt->group || special_alt->new_len) {
new_insn = find_insn(file, special_alt->new_sec,
special_alt->new_off);
ERROR_FUNC(special_alt->new_sec, special_alt->new_off,
if (special_alt->group) {
if (!special_alt->orig_len) {
if (handle_group_alt(file, special_alt, orig_insn, &new_insn))
} else if (special_alt->jump_or_nop) {
if (handle_jump_alt(file, special_alt, orig_insn, &new_insn))
list_del(&special_alt->list);
free(special_alt);
void arch_handle_alternative(struct special_alt *alt);
bool arch_support_alt_relocation(struct special_alt *special_alt,
struct special_alt *alt;
void __weak arch_handle_alternative(struct special_alt *alt)
struct special_alt *alt)