> Hello, > > The attached adds a really simple BFD "target" and is used: > > bfd = bfd_open.. (...); > targ = target_bfd_reopen (bfd) > ... operation involving targ ... > target_close (targ, 0); > > Looking at solib-svr4, this object makes it possible to change this: > > load_addr = read_pc () - tmp_bfd->start_address; > > into this: > > load_addr = (read_pc () > - gdbarch_convert_from_func_ptr_addr (current_gdbarch, > bfd_get_start_address (tmp_bfd), tmp_bfd_target)); > > i.e., pointer conversion is performed using the original executable and not the running program. Something needed to fix PPC64 needs. I've attached the updated patch which I've just committed. Andrew > 2003-10-22 Andrew Cagney > > * target.h (struct target_ops): Add "to_data"; > * bfd-target.h, bfd-target.c: New files. > * Makefile.in (SFILES): Add "bfd-target.c". > (COMMON_OBS): Add "bfd-target.o". > (bfd-target.o): Specify dependencies. > (bfd_target_h): Define. > * defs.h (XZALLOC): Define. >