This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Sanity check PIE displacement #2
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: jan dot kratochvil at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 13 Feb 2010 22:55:00 +0100 (CET)
- Subject: Re: [patch] Sanity check PIE displacement #2
- References: <20100213201206.GA17808@host0.dyn.jankratochvil.net>
> Date: Sat, 13 Feb 2010 21:12:06 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> + /* Check of the alignment against max (p_align) of PT_LOAD segments
> + cannot be used here as in LM_ADDR_CHECK for PIC libraries as at
> + least amd64 PIE executables have 2MB p_align while Linux kernel
> + loads them with arbitrary 4KB displacement. As in this case there
> + is no LM_ADDR_FROM_LINK_MAP to verify the possible offset GDB has
> + to depend just on MINPAGESIZE. */
To me this sounds as if you've found a bug in the Linux kernel and/or
ld.so. I'd argue the warning is totally appropriate.