arch_path);
base = lbasename (solib);
- ret = openp (buf, 1, base, o_flags, temp_pathname);
+ ret = openp (buf, OPF_TRY_CWD_FIRST | OPF_RETURN_REALPATH, base, o_flags,
+ temp_pathname);
if (ret < 0 && base != solib)
{
xsnprintf (arch_path, arch_len, "/%s", solib);
if (ret >= 0)
*temp_pathname = gdb_realpath (arch_path);
else
- **temp_pathname = '\0';
+ *temp_pathname = NULL;
}
}
return ret;
/* Neutrino treats the l_addr base address field in link.h as different than
the base address in the System V ABI and so the offset needs to be
calculated and applied to relocations. */
- Elf_Internal_Phdr *phdr = find_load_phdr (sec->bfd);
+ Elf_Internal_Phdr *phdr = find_load_phdr (sec->the_bfd_section->owner);
unsigned vaddr = phdr ? phdr->p_vaddr : 0;
sec->addr = nto_truncate_ptr (sec->addr + lm_addr (so) - vaddr);
int
nto_in_dynsym_resolve_code (CORE_ADDR pc)
{
- if (in_plt_section (pc, NULL))
+ if (in_plt_section (pc))
return 1;
return 0;
}