This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Fix problem with (maybe) non-relocated .opd section on powerpc64-linux
On Thu, May 15, 2008 at 06:14:50PM +0200, Ulrich Weigand wrote:
> Well, it seems that this field is set to RT_CONSISTENT *before* the
> objects are relocated (from elf/dl-open.c):
Yuck. I thought it was just before calling _dl_init, but I was
clearly wrong. This makes relying on the opd contents from the target
unreliable whenever we are not in the midst of a call, I guess.
This makes the assumption that all .opd entries are always relocated
by the same offset the section itself was relocated. */
Do Linux kernel modules have an opd section? I'd recommend the
routine the dwarf reader uses to apply relocations except it would be
very inefficient unless we cached the result.
> > We went round the choice of where to read memory from several times on
> > the previous patch, but I don't know the details.
>
> OK, thanks.
It looks like the main issue was making sure we did read from the
target if the target_ops provided said to; the exception being the use
of tmp_bfd_target in solib-svr4.c. I don't see a problem with your
change other than the offset assumption I mentioned above.
--
Daniel Jacobowitz
CodeSourcery