Lines Matching refs:arch

154 	libsym->arch.type = PPC_PLT_RESOLVED;
155 libsym->arch.resolved_value = value;
184 uint32_t insn1 = libsym->arch.resolved_value >> 32;
185 uint32_t insn2 = (uint32_t) libsym->arch.resolved_value;
190 == (arch_addr_t) (long) libsym->lib->arch.pltgot_addr)))
192 mark_as_resolved(libsym, libsym->arch.resolved_value);
204 &libsym->arch.resolved_value) < 0) {
220 libsym->arch.plt_slot_addr
245 if (lte->ehdr.e_machine == EM_PPC && lte->arch.secure_plt) {
246 assert(lte->arch.plt_stub_vma != 0);
247 return lte->arch.plt_stub_vma + PPC_PLT_STUB_SIZE * ndx;
274 assert(lte->arch.plt_stub_vma != 0);
275 return lte->arch.plt_stub_vma + PPC64_PLT_STUB_SIZE * ndx;
313 = (GElf_Addr)(uintptr_t)addr - lte->arch.opd_base;
315 if (elf_read_u64(lte->arch.opd_data, offset, &value) < 0) {
340 lte->arch.opd_data = elf_rawdata(sec, NULL);
341 if (lte->arch.opd_data == NULL)
344 lte->arch.opd_base = shdr.sh_addr + lte->bias;
345 lte->arch.opd_size = shdr.sh_size;
437 lte->arch.secure_plt = !(lte->plt_flags & SHF_EXECINSTR);
443 if (lte->ehdr.e_machine == EM_PPC && !lte->arch.secure_plt)
444 lib->arch.bss_plt_prelinked = nonzero_data(lte->plt_data);
448 lib->arch.bss_plt_prelinked = -1;
458 if ((lte->ehdr.e_machine == EM_PPC64 || lte->arch.secure_plt)
478 if (lte->ehdr.e_machine == EM_PPC && lte->arch.secure_plt) {
487 lte->arch.plt_stub_vma = glink_vma
489 debug(1, "stub_vma is %#" PRIx64, lte->arch.plt_stub_vma);
500 lte->arch.plt_stub_vma = glink_vma + 32;
505 &lib->arch.pltgot_addr) < 0) {
532 for (sym = lte->arch.stubs; sym != NULL; ) {
538 lte->arch.stubs = NULL;
583 libsym->arch.type = PPC64_PLT_STUB;
584 libsym->next = lte->arch.stubs;
585 lte->arch.stubs = libsym;
718 if (! lte->arch.secure_plt) {
735 for (symp = &lte->arch.stubs; *symp != NULL; ) {
783 libsym->arch.plt_slot_addr = plt_slot_addr;
787 libsym->arch.type = PPC_PLT_UNRESOLVED;
788 libsym->arch.resolved_value = plt_entry_addr;
796 libsym->arch.type = PPC_PLT_NEED_UNRESOLVE;
797 libsym->arch.data = malloc(sizeof *libsym->arch.data);
798 if (libsym->arch.data == NULL)
801 libsym->arch.data->self = libsym->arch.data;
802 libsym->arch.data->plt_entry_addr = plt_entry_addr;
803 libsym->arch.data->plt_slot_addr = plt_slot_addr;
804 libsym->arch.data->plt_slot_value = plt_slot_value;
805 libsym->arch.data->is_irelative = is_irelative;
816 for (sym = lte->arch.stubs; sym != NULL; ) {
829 struct process_stopping_handler *self = proc->arch.handler;
834 if (read_plt_slot_value(proc, libsym->arch.plt_slot_addr, &value) < 0)
839 unresolve_plt_slot(proc, libsym->arch.plt_slot_addr,
840 libsym->arch.resolved_value);
847 proc->arch.handler = NULL;
856 assert(self->task_enabling_breakpoint->arch.handler == NULL);
857 self->task_enabling_breakpoint->arch.handler = self;
869 if (read_plt_slot_value(proc, libsym->arch.plt_slot_addr, &value) < 0)
874 if (value == libsym->arch.resolved_value)
883 && unresolve_plt_slot(proc, libsym->arch.plt_slot_addr,
884 libsym->arch.resolved_value) < 0)
913 if (leader == NULL || leader->arch.dl_plt_update_bp != NULL)
920 leader->arch.dl_plt_update_bp = insert_breakpoint_at(proc, addr, NULL);
921 if (leader->arch.dl_plt_update_bp == NULL)
927 leader->arch.dl_plt_update_bp->cbs = &dl_plt_update_cbs;
931 breakpoint_turn_off(leader->arch.dl_plt_update_bp, proc);
945 (uintptr_t)bp->libsym->arch.resolved_value;
956 assert(bp->arch.irel_libsym != NULL);
957 bp->libsym = bp->arch.irel_libsym;
958 bp->arch.irel_libsym = NULL;
961 switch (bp->libsym->arch.type) {
970 assert(bp->libsym->lib->arch.bss_plt_prelinked == 0);
979 if (leader != NULL && leader->arch.dl_plt_update_bp != NULL
980 && breakpoint_turn_on(leader->arch.dl_plt_update_bp,
1010 assert(bp->libsym->arch.type != bp->libsym->arch.type);
1050 && bp->libsym->arch.type == PPC_PLT_RESOLVED) {
1052 unresolve_plt_slot(proc, bp->libsym->arch.plt_slot_addr,
1053 bp->libsym->arch.resolved_value);
1063 libsym = bp->arch.irel_libsym;
1066 if (libsym->arch.type == PPC_PLT_NEED_UNRESOLVE) {
1076 struct ppc_unresolve_data *data = libsym->arch.data;
1077 libsym->arch.data = NULL;
1089 libsym->arch.type = PPC_PLT_IRELATIVE;
1090 libsym->arch.resolved_value = plt_entry_addr;
1126 libsym->arch.type = PPC_DEFAULT;
1133 if (libsym->arch.type == PPC_PLT_NEED_UNRESOLVE) {
1134 assert(libsym->arch.data->self == libsym->arch.data);
1135 free(libsym->arch.data);
1136 libsym->arch.data = NULL;
1144 retp->arch = libsym->arch;
1154 bp->arch.irel_libsym = NULL;
1162 && bp->libsym->lib->arch.bss_plt_prelinked != 0)
1167 && bp->libsym->arch.type == PPC64_PLT_STUB)
1179 if (bp->libsym->arch.type == PPC_PLT_IRELATIVE) {
1180 bp->arch.irel_libsym = bp->libsym;
1195 retp->arch = sbp->arch;
1202 proc->arch.dl_plt_update_bp = NULL;
1203 proc->arch.handler = NULL;
1215 retp->arch = proc->arch;
1217 if (retp->arch.dl_plt_update_bp != NULL) {
1221 retp->arch.dl_plt_update_bp
1223 retp->arch.dl_plt_update_bp->addr);
1225 assert(retp->arch.dl_plt_update_bp != NULL);