if (!alt_group) { if (init_orc_entry(&orc, insn->cfi, insn)) return -1; if (!memcmp(&prev_orc, &orc, sizeof(orc))) continue; if (orc_list_add(&orc_list, &orc, sec,
insn->offset)) return -1;
nr++;
prev_orc = orc;
empty = false; continue;
}
/* * Alternatives can have different stack layout * possibilities (but they shouldn't conflict). * Instead of traversing the instructions, use the * alt_group's flattened byte-offset-addressed CFI * array.
*/ for (i = 0; i < alt_group_len(alt_group); i++) { struct cfi_state *cfi = alt_group->cfi[i]; if (!cfi) continue; /* errors are reported on the original insn */ if (init_orc_entry(&orc, cfi, insn)) return -1; if (!memcmp(&prev_orc, &orc, sizeof(orc))) continue; if (orc_list_add(&orc_list, &orc, insn->sec,
insn->offset + i)) return -1;
nr++;
prev_orc = orc;
empty = false;
}
/* Skip to the end of the alt_group */
insn = alt_group->last_insn;
}
/* Add a section terminator */ if (!empty) {
orc_list_add(&orc_list, &null, sec, sec->sh.sh_size);
nr++;
}
} if (!nr) return 0;
/* Create .orc_unwind, .orc_unwind_ip and .rela.orc_unwind_ip sections: */
sec = find_section_by_name(file->elf, ".orc_unwind"); if (sec) {
WARN("file already has .orc_unwind section, skipping"); return -1;
}
orc_sec = elf_create_section(file->elf, ".orc_unwind", sizeof(struct orc_entry), nr); if (!orc_sec) return -1;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.