Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
442 changes: 19 additions & 423 deletions libr/bin/format/elf/elf.c

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions libr/bin/format/elf/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ typedef struct Elf_(dynamic_info) {
Elf_(Addr) dt_ppc64_glink; /* PPC64 ELFv1: DT_PPC64_GLINK lazy PLT resolver anchor */
Elf_(Addr) dt_crel; // Address of Crel relocs
bool dt_bind_now;
bool dt_aarch64_pac_plt; /* AArch64 -z pac-plt: 24 byte plt entries */
Elf_(Xword) dt_flags;
Elf_(Xword) dt_flags_1;
Elf_(Xword) dt_rpath;
Expand Down Expand Up @@ -183,6 +184,10 @@ struct Elf_(obj_t) {
RList *inits;
HtUU *rel_cache;
HtUU *ppc64_plt_stubs; // ppc64: slot_vaddr -> stub_vaddr (lazy, NULL until first use)
ut64 arm64_plt_esize; // aarch64: measured plt entry stride, 0 until probed
ut64 *ppc32_thunks; // ppc32: plt slot index -> call thunk vaddr, lazy
ut64 ppc32_nthunks;
bool ppc32_thunks_done;
ut32 g_reloc_num;
bool relocs_loaded;
RVecRBinElfReloc g_relocs;
Expand Down Expand Up @@ -257,5 +262,13 @@ bool Elf_(has_nobtcfi)(ELFOBJ *eo);
ut8 *Elf_(grab_regstate)(struct Elf_(obj_t) *bin, int *len);
RList *Elf_(get_maps)(ELFOBJ *bin);
ut64 Elf_(ppc64_get_plt_stub_for_slot)(ELFOBJ *eo, ut64 slot_vaddr);
/* plt.c */
ut64 Elf_(plt_get_import_addr)(ELFOBJ *eo, int sym);
int Elf_(plt_ppc64_abi)(ELFOBJ *eo);
ut64 Elf_(plt_arm64_entry)(ELFOBJ *eo, ut64 plt_addr, ut64 pos);
ut64 Elf_(plt_ppc32_thunk)(ELFOBJ *eo, ut64 slot_vaddr);
/* elf.c helpers exported for plt.c */
RBinElfSection *Elf_(plt_section_by_name)(ELFOBJ *eo, const char *name);
ut64 Elf_(plt_num_relocs)(ELFOBJ *eo);
R_API RBinSection *r_bin_section_clone(RBinSection *s);
#endif
Loading
Loading