[RFA/solib-svr4] use AT_BASE auxiliary entry to compute load base address
Ulrich Weigand
uweigand@de.ibm.com
Thu Apr 17 21:45:00 GMT 2008
Daniel Jacobowitz wrote:
> On Thu, Apr 17, 2008 at 05:11:38PM +0200, Ulrich Weigand wrote:
> > GDB used to work correctly in the presence of prelinking anyway,
> > because for regular shared libraries it detected that mismatch by
> > comparing the load addresses from the BFD it reads with those
> > recorded in the dynamic loader's data structures (LM_ADDR_CHECK),
> > and adjusting its expectations if it detects prelinking.
>
> Can we read the dynamic linker's ELF header from the target, to
> compare?
>
> Wait, no, we can't... if we knew where it was loaded we wouldn't
> need AT_BASE. Well, we could ask gdbserver to read from the
> target filesystem for us...
Yes, that's on my to-do list anyway ...
However, even that would not fix the same issue with core files
(if prelink changed a library between core file generation and
use in GDB).
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
More information about the Gdb-patches
mailing list