2006-05-24 Paul Gilliam = interp_plt_sect_low + && sym_addr + load_addr < interp_plt_sect_high) + { + interp_sect = bfd_get_section_by_name (tmp_bfd, ".plt"); + sect_offset = interp_plt_sect_low - load_addr; + } + else + { + interp_sect = bfd_get_section_by_name (tmp_bfd, ".opd"); + if (interp_sect != 0) + { + sect_offset = bfd_section_vma (tmp_bfd, interp_sect); + if (sym_addr < sect_offset) + interp_sect == 0; + else if (sym_addr - sect_offset >= + bfd_section_size (tmp_bfd, interp_sect)) + interp_sect == 0; + } + } + if (interp_sect != 0) + { + /* Try to convert the function descriptor we found above, into + the address we need. It will be relocated below by adding + "load_addr" to it. */ + char *buf = alloca (sizeof (LONGEST)); + if (bfd_get_section_contents (tmp_bfd, interp_sect, buf, + sym_addr - sect_offset, + sizeof (LONGEST))) + sym_addr = extract_unsigned_integer (buf, sizeof (LONGEST)); + else + sym_addr = 0; + } + } + /* We're done with both the temporary bfd and target. Remember, closing the target closes the underlying bfd. */ target_close (tmp_bfd_target, 0);